config.ts
1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import cloneDeep from 'lodash/cloneDeep'
import { PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { chartInitConfig } from '@/settings/designSetting'
import { COMPONENT_INTERACT_EVENT_KET } from '@/enums/eventEnum'
import { interactActions, ComponentInteractEventEnum } from './interact'
import { TreeConfig } from './index'
export const option = {
// 时间组件展示类型,必须和 interactActions 中定义的数据一致
[COMPONENT_INTERACT_EVENT_KET]: ComponentInteractEventEnum.DATA,
// 暴露配置内容给用户
dataset: [
{
id: '1',
name: '根组织',
children: [
{
id: '11',
name: '第一级'
},
{
id: '12',
name: '第二级'
},
{
id: '13',
name: '第三级'
}
]
}
],
treeConfig: {
accordion: false,
checkable: false,
defaultExpandAll: false
}
}
export default class Config extends PublicConfigClass implements CreateComponentType {
public key = TreeConfig.key
public attr = { ...chartInitConfig, w: 300, h: 40, zIndex: -1 }
public chartConfig = cloneDeep(TreeConfig)
public interactActions = interactActions
public option = cloneDeep(option)
}