onAfterUndo
Description
在调用 undo() 方法之后触发
onAfterUndo: (action: any[]) => void;
Parameters
action- (required) 数组 - 一个命令对象数组
Example
gantt.attachEvent("onAfterUndo",function(action){
// 在这里插入您的自定义逻辑
});
Related samples
Details
action 参数是一个命令对象数组,每个对象包含以下属性:
- type - (string) 描述命令类型:"add"、"remove" 或 "update"
- entity - (string) 指示被修改的对象类型:"task" 或 "link"
- value - (object) 变更后的任务或链接对象
- oldValue - (object) 变更前的任务或链接对象
如果没有应用任何变更,action 参数将等于 null。可能发生在调用 gantt.undo() 时,但变更被 onBeforeUndo 取消或栈为空。
Related API
Change log
- 在版本 4.0 中新增
- 在版本 5.2 中新增了 action 参数
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.