跳到主要内容

eachSelectedTask

Description

遍历甘特图中所有被选中的任务

eachSelectedTask: (code: GanttCallback) => void

Parameters

  • code - (required) function - 一个将遍历任务的函数。该函数接收一个任务 ID 作为参数

Example

gantt.batchUpdate(function () {
gantt.eachSelectedTask(function(task_id){
if(gantt.isTaskExists(task_id))
gantt.deleteTask(task_id);
});
});

Details

注释

此方法在 multiselect 扩展中定义,因此你需要启用 multiselect 插件。请在 Multi-Task Selection 文章中了解详细信息。

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.