【仅供内部供应商使用,不提供对外解答和培训】
...
index:Number,可选,插入位置。数组进行splice操作的起始位置,不填则插入到最后一步。
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
// 第一个参数为步骤对象
// 第二个参数为插入的位置
BI.config("dec.provider.schedule", function (provider) {
provider.registerTaskStep({
text: BI.i18nText("新增步骤"),
value: "plugin_step",
cardType: "dec.schedule.task.plugin"
}, 1);
}); |
...
从上述可以看出来,添加任务的过程,有一个全局的model用来保存当前已经设置值。可以通过this.model.currTask获取和修改当前编辑任务的值。
registerDispatcher(dispatcher[, handings])
...
handings:Array,可选,新增对象类型的处理方式。处理方式定义参考下述新增文件处理方式,不填则默认不注册处理方式,后续可以通过registerHandingWay方式新增处理方式。
...
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
// 第一个参数为新增调度对象
// 第二个参数为新增调度对象的处理方式
BI.config("dec.provider.schedule", function (provider) {
provider.registerDispatcher({
value: "plugin",
text: "新增类型",
cardType: "dec.schedule.task.dispatcher.plugin"
}, []);
}); |
页面的实现同新增一个步骤, 需要实现必选函数getValue,可选函数validation。
registerHandingWay(config, scopes)
...