跳到主要内容

onTaskLoading

Description

当任务从数据源加载时触发。

onTaskLoading: (task: Task) => boolean;

Parameters

  • task - (required) Task - 任务对象

Returns

  • result - (boolean) - 定义事件的默认操作是否将被触发(true)或取消(false

Example

gantt.attachEvent("onTaskLoading", function(task){
// 在这里插入您的自定义逻辑
return true;
});

Details

  • 该事件会对数据源中的每个任务触发。
  • 该事件是可阻塞的。返回 false,该任务将不会被加载到 Gantt 图中。
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.