跳到主要内容

onBeforeTaskSelected

Description

在用户选择任务之前触发

onBeforeTaskSelected: (id: string | number) => boolean;

Parameters

  • id - (required) string | number - 任务 ID

Returns

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

Example

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

Details

该事件是可阻止的。返回 false 以取消默认处理。

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.