getFreeSlack
信息
该功能仅在 PRO 版本中可用。
Description
返回任务的自由松弛时间
getFreeSlack: (task: Task) => number
Parameters
task- (必填) Task - 任务对象
Returns
free_slack- (number) - 任务的自由松弛时间
Example
const task = gantt.getTask(7);
gantt.getFreeSlack(task);
Related samples
Details
注释
此方法在 critical_path 扩展中定义,因此您需要通过 gantt.plugins 方法激活 critical_path 插件。请阅读 Critical Path 文章中的详细信息。
自由松弛时间是在不影响其后继任务的情况下,可用于增加任务持续时间或在时间线中移动任务的一段时间。
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.