简体中文
md.batchAdd.end
约 233 字小于 1 分钟
2025-12-15
该钩子发生在批量新建从对象数据时选完数据并且执行UI事件/计算逻辑之后。 批量新建从对象数据且执行UI事件/计算逻辑之后执行额外的业务动作,包含且不限于以下功能:
- 校验数据
参数
| 参数 | 说明 | 类型 |
|---|---|---|
| 通用参数 | 详见 | -- |
| objApiName | 从对象apiName | String |
| recordType | 从对象业务类型 | String |
| lookupField | 新建从对象时所依赖的查找关联字段的字段描述 | Object |
| newDataIndexs | 新添加的从对象数据的行ID | Array |
| lookupDatas | 选择去新建从对象数据的关联对象数据 | Array |
基础示例
基础用法
export default class Plugin {
apply() {
return [{
event: 'md.batchAdd.end',
functional: this.mdBatchAddEnd.bind(this)
}]
}
//如果是vcrm项目的中台插件需要交互参数位置
//mdBatchAddEnd(plugin, context)
mdBatchAddEnd(context, plugin) {
// todo what you want
//const { dataGetter, dataUpdater, newDataIndexs, objApiName } = context;
}
}