getRedoStack
Description
提供存储的重做用户操作堆栈
getRedoStack: () => UndoRedoAction[]
Returns
stack- (UndoRedoAction[]) - 重做用户操作的数组
Example
var stack = gantt.getRedoStack();
Related samples
Details
返回堆栈是 redo 用户操作的数组。每个用户操作包含一组命令。一个命令是具有以下属性的对象:
- type - (string) 命令的类型: "add/remove/update"
- entity - (string) 被更改对象的类型: "task" 或 "link"
- value - (object) 被更改的 task/link 对象
- oldValue - (object) 变更前的 task/link 对象
请看下面的示例:
getRedoStack() 方法返回一个包含 3 个 redo 用户操作的堆栈。前两个操作各包含 1 条命令,第三个操作包含 3 条命令。
Related API
Related Guides
Change log
- 新增于版本 4.0
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.