跳到主要内容

addLink 方法

Description

添加一个新的依赖关系链接

addLink: (link: any) => string | number

Parameters

  • link - (必需) object - 链接对象

Returns

  • id - (string | number) - 该链接的 id

Example

var linkId = gantt.addLink({
id:1,
source:1,
target:2,
type:gantt.config.links.finish_to_start
});

Details

该方法会触发 onBeforeLinkAddonAfterLinkAdd 事件。

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.