onBeforeRedoStack
Description
在将动作加入到重做栈之前触发
onBeforeRedoStack: (action: UndoRedoAction) => boolean;
Parameters
action- (required) UndoRedoAction - 一个用户操作,作为命令对象数组
Returns
result- (boolean) - 定义事件的默认操作是触发(true)还是取消(false)
Example
gantt.attachEvent("onBeforeRedoStack", function(action){
// 在这里插入您的自定义逻辑
return true;
});
Details
注释
此事件在 undo 扩展中定义,因此你需要启用 undo 插件。请在 Undo/Redo Functionality 文章中阅读详细信息。
- 事件是可阻止的,返回 false 将取消后续处理。
- 如果事件被阻塞,重做将不会从事件参数中捕获动作。
- 事件动作可以被修改。
Related API
Related Guides
Change log
- 已在版本 5.2 中新增
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.