跳到主要内容

onBeforeLinkDelete

Description

在用户删除链接之前触发

onBeforeLinkDelete: (id: string | number, link: Link) => boolean;

Parameters

  • id - (required) string | number - 链接 ID
  • link - (required) Link - 链接对象

Returns

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

Example

gantt.attachEvent("onBeforeLinkDelete", function(id,link){
// 在这里插入您的自定义逻辑
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.