Gantt
容器属性
所有组件配置的第一层均支持容器属性
组件属性 componentsProps
| Name | Type | Default | 是否支持 Variable Pattern | Description |
|---|---|---|---|---|
| className | string | ✔️ | 组件的 className | |
| style | object | 组件的 style | ||
| columnDefs | array | 表格的列的定义,支持 ag-grid 所有的 columnDefs | ||
| dataSources | { task: object, link: object, calendar: object } | 数据源 | ||
| relation | { colId: string, value: string } | Gantt 数据作为表单子表的关系配置 | ||
| mapping | { text: string, start_date: string, end_date: string, duration: string, progress: string, parent: string, type: string } | 数据映射 | ||
| ganttConfig | object | DHTMLX Gantt 组件的配置,官方文档 | ||
| dateOptions | { noTimeZone: bool, timeZone: string, showTime: bool, endDateIncludeSelf: bool } | 日期配置 | ||
| toolbarFields | array | 使用 json 配置的工具栏的自定义元素 | ||
| toolbarChildren | node | 使用 jsx 的工具栏自定义元素 | ||
| pinnedFilter | Array<string> | 默认显示在 Filter Panel 的 filter 列,无法被删除 | ||
| settingKey | string | 保存设置的 key,默认使用 id 自动生成 | ||
| defaultFilterModel | ConditionalListPropertyPropType(DataFilters) | 表格默认的 filter 条件,可以通过界面进行改变 | ||
| suppressSaveSetting | bool | false | 不保存用户调整的组件设置 | |
| suppressAddButton | bool | false | 禁止默认 "新增" 按钮 | |
| addButtonProps | object | 默认新增按钮的属性 |
JS API
通过 formApi.getFieldApi() 获取的接口如下:
| Name | Type | Description |
|---|---|---|
| node | HTML Element | 组件的根 DOM 元素 |
| gantt | object | DHTMLX Gantt 的 api 接口, 官方文档 |
| refresh | () => void | 刷新数据 |