提交 | 用户 | age
|
72b42d
|
1 |
import type { PropType } from 'vue'; |
V |
2 |
import type { ReplaceFields, ActionItem, Keys, CheckKeys } from './types'; |
2f6253
|
3 |
import type { ContextMenuItem } from '/@/hooks/web/useContextMenu'; |
72b42d
|
4 |
import type { TreeDataItem } from 'ant-design-vue/es/tree/Tree'; |
cd8e92
|
5 |
import { propTypes } from '/@/utils/propTypes'; |
2f6253
|
6 |
|
陈 |
7 |
export const basicProps = { |
cd8e92
|
8 |
value: { |
V |
9 |
type: Array as PropType<Keys>, |
|
10 |
}, |
72b42d
|
11 |
renderIcon: { |
V |
12 |
type: Function as PropType<(params: Recordable) => string>, |
|
13 |
}, |
cd8e92
|
14 |
|
V |
15 |
helpMessage: { |
|
16 |
type: [String, Array] as PropType<string | string[]>, |
|
17 |
default: '', |
|
18 |
}, |
|
19 |
|
|
20 |
title: propTypes.string, |
|
21 |
toolbar: propTypes.bool, |
|
22 |
search: propTypes.bool, |
|
23 |
checkStrictly: propTypes.bool, |
e69608
|
24 |
clickRowToExpand: propTypes.bool.def(true), |
cd8e92
|
25 |
|
2f6253
|
26 |
replaceFields: { |
陈 |
27 |
type: Object as PropType<ReplaceFields>, |
|
28 |
}, |
|
29 |
|
|
30 |
treeData: { |
72b42d
|
31 |
type: Array as PropType<TreeDataItem[]>, |
2f6253
|
32 |
}, |
陈 |
33 |
|
|
34 |
actionList: { |
|
35 |
type: Array as PropType<ActionItem[]>, |
|
36 |
default: () => [], |
|
37 |
}, |
|
38 |
|
|
39 |
expandedKeys: { |
|
40 |
type: Array as PropType<Keys>, |
|
41 |
default: () => [], |
|
42 |
}, |
|
43 |
|
|
44 |
selectedKeys: { |
|
45 |
type: Array as PropType<Keys>, |
|
46 |
default: () => [], |
|
47 |
}, |
|
48 |
|
|
49 |
checkedKeys: { |
|
50 |
type: Array as PropType<CheckKeys>, |
|
51 |
default: () => [], |
|
52 |
}, |
|
53 |
|
|
54 |
beforeRightClick: { |
|
55 |
type: Function as PropType<(...arg: any) => ContextMenuItem[]>, |
|
56 |
default: null, |
|
57 |
}, |
|
58 |
|
|
59 |
rightMenuList: { |
|
60 |
type: Array as PropType<ContextMenuItem[]>, |
|
61 |
}, |
|
62 |
}; |
|
63 |
|
|
64 |
export const treeNodeProps = { |
|
65 |
actionList: { |
|
66 |
type: Array as PropType<ActionItem[]>, |
|
67 |
default: () => [], |
|
68 |
}, |
|
69 |
replaceFields: { |
|
70 |
type: Object as PropType<ReplaceFields>, |
|
71 |
}, |
|
72 |
treeData: { |
72b42d
|
73 |
type: Array as PropType<TreeDataItem[]>, |
2f6253
|
74 |
default: () => [], |
陈 |
75 |
}, |
|
76 |
}; |