Available only in PRO Edition

约束控件

此功能仅包含在 PRO 版本中。

这是一种专门用于为Gantt 任务指定时间约束的控件。

Constraint control

gantt.config.lightbox.sections = [
    { name:"description", height:38, map_to:"text", type:"textarea", focus:true},
    { name:"constraint", type:"constraint" },      { name:"time", type:"duration", map_to:"auto" }
];

Related sample:  Auto-Schedule From Project Start & Constraints

初始化

要在 lightbox 中集成 constraint 控件,请按照以下步骤操作:

1. 在 lightbox 配置中添加一个 section:

gantt.config.lightbox.sections = [
    { name:"description", height:38, map_to:"text", type:"textarea", focus:true},
    { name:"constraint", type:"constraint" },      { name:"time", type:"duration", map_to:"auto" }
];

2. 为该 section 定义标签:

gantt.locale.labels.section_constraint = "Constraint";

Related sample:  Auto-Schedule From Project Start & Constraints

属性

以下是 constraint 控件常用的主要属性(完整列表请参见此处):

  • name - (string) 标识 section 名称
  • type - (string) 指定section 控件的类型
Back to top