addLink 方法
Description
添加一个新的依赖关系链接
addLink: (link: any) => string | number
Parameters
link- (必需) object - 链接对象
Returns
id- (string | number) - 该链接的 id
Example
const linkId = gantt.addLink({
id: 1,
source: 1,
target: 2,
type: gantt.config.links.finish_to_start
});
Details
该方法会触发 onBeforeLinkAdd 和 onAfterLinkAdd 事件。
Related API
Related Guides
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.