跳到主要内容

eachParent

Description

遍历 Gantt 图中指定任务的所有父任务

eachParent: (code: GanttCallback, startTask: string | number, master?: any) => void

Parameters

  • code - (required) function - 将遍历任务的函数。接收一个任务对象作为参数
  • startTask - (required) string | number - 要遍历其父级任务的目标项的 id

Example

gantt.eachParent(function(task){
alert(task.text);
}, taskId);
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.