changeTaskId
Description
更改任务的 ID
changeTaskId: (id: string | number, new_id: string | number) => void
Parameters
id- (required) string | number - 当前任务的 IDnew_id- (required) string | number - 新任务的 ID
Example
gantt.addTask({
id:10,
text:"Task #5",
start_date:"02-09-2013",
duration:28
}, "project_2");
gantt.changeTaskId(10, 15); //将任务的 id 从 '10' 更新为 '15' /*!*/
Details
该方法会触发 onTaskIdChange 事件。
Related API
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.