跳到主要内容

types

Description​

Lightbox 的结构名称(用于不同类型的任务)

types: { task?: string | number; project?: string | number; milestone?: string | number; placeholder?: string | number; [typeName: string]: string | number | undefined; }

Example​

var type1 = gantt.config.types.task;

Default value: types : {task:'task',project:'project',milestone:'milestone', placeholder: "placeholder"}

Details​

注释

此功能仅在 PRO 版本中可用。

types 对象由 "类型程序名称": "类型标识符" 键值对组成:

类型程序名称不会影响任何功能,其唯一作用是让类型相关的操作更易读。 类型标识符存储在数据库中,在 types 对象内必须唯一。如有需要,可以将类型标识符更改为任意所需的值:

{"task":0,"project":1,"milestone":2}

预期的类型如下:

  • task - (string | number) - 任务类型的名称。
  • project - (string | number) - 项目类型的名称。
  • milestone - (string | number) - 里程碑类型的名称。
  • placeholder - (string | number) - 占位符类型的名称。
  • [typeName: string] - (string | number | undefined) - 自定义类型的名称。

Gantt 将根据任务类型使用相应的 lightbox:

types: {
'task':'task', // a lightbox for reqular tasks
'project':'project', // a lightbox for project tasks
'milestone':'milestone' // a lightbox for milestones
}
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.