@dt-frames/ui 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/curd/index.js +80 -75
- package/es/components/curd/src/components/Curd.d.ts +0 -8
- package/es/components/curd/src/props.d.ts +0 -4
- package/es/components/form/index.d.ts +20 -53
- package/es/components/form/index.js +17 -27
- package/es/components/form/index.less +8 -3
- package/es/components/form/src/index.d.ts +16 -41
- package/es/components/source/index.js +8 -5
- package/es/components/source/types/source.type.d.ts +1 -0
- package/es/components/table/index.js +145 -95
- package/es/components/table/index.less +26 -5
- package/es/components/table/src/components/TableAction.d.ts +1 -1
- package/es/components/table/src/index.d.ts +10 -0
- package/es/components/table/src/props.d.ts +4 -0
- package/es/components/tree/index.d.ts +2 -0
- package/es/components/tree/index.js +1087 -0
- package/es/components/tree/index.less +119 -0
- package/es/components/tree/src/basicProps.d.ts +146 -0
- package/es/components/tree/src/components/ContextMenu.d.ts +64 -0
- package/es/components/tree/src/components/TreeHeader.d.ts +98 -0
- package/es/components/tree/src/enums/index.d.ts +6 -0
- package/es/components/tree/src/hooks/useContextMenu.d.ts +2 -0
- package/es/components/tree/src/hooks/useTree.d.ts +14 -0
- package/es/components/tree/src/index.d.ts +6526 -0
- package/es/components/tree/src/type/menu.d.ts +33 -0
- package/es/components/tree/src/type/tree.d.ts +55 -0
- package/es/components/tree/src/utils/tree.d.ts +5 -0
- package/es/packages/ui/src/assets/locales/en.d.ts +101 -0
- package/es/packages/ui/src/assets/locales/index.d.ts +2 -0
- package/es/packages/ui/src/assets/locales/zh.d.ts +103 -0
- package/es/packages/ui/src/components/container/index.d.ts +94 -0
- package/es/packages/ui/src/components/container/src/components/bar.d.ts +14 -0
- package/es/packages/ui/src/components/container/src/components/scroll-bar.d.ts +70 -0
- package/es/packages/ui/src/components/container/src/hooks/scroll.d.ts +10 -0
- package/es/packages/ui/src/components/container/src/scroll-container.d.ts +76 -0
- package/es/packages/ui/src/components/container/src/slot-container.d.ts +20 -0
- package/es/packages/ui/src/components/container/src/types/scroll.type.d.ts +22 -0
- package/es/packages/ui/src/components/container/src/utils/scroll.d.ts +5 -0
- package/es/packages/ui/src/global.d.ts +7 -0
- package/es/packages/ui/src/theme/index.d.ts +10 -0
- package/es/packages/ui/src/theme/src/components/content/index.d.ts +27 -0
- package/es/packages/ui/src/theme/src/components/feature/back-top.d.ts +5 -0
- package/es/packages/ui/src/theme/src/components/feature/index.d.ts +7 -0
- package/es/packages/ui/src/theme/src/components/footer/index.d.ts +31 -0
- package/es/packages/ui/src/theme/src/components/header/components/bread-crumb.d.ts +6 -0
- package/es/packages/ui/src/theme/src/components/header/components/fullscreen.d.ts +5 -0
- package/es/packages/ui/src/theme/src/components/header/components/index.d.ts +11 -0
- package/es/packages/ui/src/theme/src/components/header/components/lang-picker.d.ts +23 -0
- package/es/packages/ui/src/theme/src/components/header/components/logo.d.ts +56 -0
- package/es/packages/ui/src/theme/src/components/header/components/menu-filter.d.ts +22 -0
- package/es/packages/ui/src/theme/src/components/header/components/notify.d.ts +24 -0
- package/es/packages/ui/src/theme/src/components/header/components/setting-theme.d.ts +223 -0
- package/es/packages/ui/src/theme/src/components/header/components/size.d.ts +282 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/feature.d.ts +138 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/menu-type.d.ts +16 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/select.d.ts +58 -0
- package/es/packages/ui/src/theme/src/components/header/components/theme-drawer/switch.d.ts +49 -0
- package/es/packages/ui/src/theme/src/components/header/components/trigger.d.ts +10 -0
- package/es/packages/ui/src/theme/src/components/header/components/user-info.d.ts +37 -0
- package/es/packages/ui/src/theme/src/components/header/helper/change-theme.d.ts +13 -0
- package/es/packages/ui/src/theme/src/components/header/helper/menu-tree.d.ts +4 -0
- package/es/packages/ui/src/theme/src/components/header/index.d.ts +720 -0
- package/es/packages/ui/src/theme/src/components/header/multiple-header.d.ts +806 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/basic-menu-item.d.ts +62 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/basic-menu.d.ts +207 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/basic-sub-menu-item.d.ts +127 -0
- package/es/packages/ui/src/theme/src/components/sider/components/basic-menu/menu-item-content.d.ts +26 -0
- package/es/packages/ui/src/theme/src/components/sider/components/drag-bar.d.ts +14 -0
- package/es/packages/ui/src/theme/src/components/sider/components/layout-menu.d.ts +22 -0
- package/es/packages/ui/src/theme/src/components/sider/components/props.d.ts +69 -0
- package/es/packages/ui/src/theme/src/components/sider/components/sider-trigger.d.ts +17 -0
- package/es/packages/ui/src/theme/src/components/sider/helper/sider.d.ts +12 -0
- package/es/packages/ui/src/theme/src/components/sider/helper/split-menu.d.ts +10 -0
- package/es/packages/ui/src/theme/src/components/sider/index.d.ts +235 -0
- package/es/packages/ui/src/theme/src/components/sider/mix-sider.d.ts +167 -0
- package/es/packages/ui/src/theme/src/components/tabs/components/TabContent.d.ts +6 -0
- package/es/packages/ui/src/theme/src/components/tabs/components/TabRedo.d.ts +21 -0
- package/es/packages/ui/src/theme/src/components/tabs/components/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/components/tabs/hooks/useMultifyTabs.d.ts +7 -0
- package/es/packages/ui/src/theme/src/components/tabs/hooks/useTabDropdown.d.ts +6 -0
- package/es/packages/ui/src/theme/src/components/tabs/index.d.ts +63 -0
- package/es/packages/ui/src/theme/src/components/tabs/types/tabs.type.d.ts +7 -0
- package/es/packages/ui/src/theme/src/enums/index.d.ts +1 -0
- package/es/packages/ui/src/theme/src/enums/theme.enum.d.ts +34 -0
- package/es/packages/ui/src/theme/src/hooks/index.d.ts +6 -0
- package/es/packages/ui/src/theme/src/hooks/useDragLine.d.ts +2 -0
- package/es/packages/ui/src/theme/src/hooks/useHeader.d.ts +25 -0
- package/es/packages/ui/src/theme/src/hooks/useMenu.d.ts +29 -0
- package/es/packages/ui/src/theme/src/hooks/useMultifyTab.d.ts +8 -0
- package/es/packages/ui/src/theme/src/hooks/useOpenKeys.d.ts +7 -0
- package/es/packages/ui/src/theme/src/hooks/useTheme.d.ts +9 -0
- package/es/packages/ui/src/theme/src/index.d.ts +1851 -0
- package/es/packages/ui/src/theme/src/setting/theme.setting.d.ts +2 -0
- package/es/packages/ui/src/theme/src/stores/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/stores/routeReuse.store.d.ts +23 -0
- package/es/packages/ui/src/theme/src/stores/theme.store.d.ts +18 -0
- package/es/packages/ui/src/theme/src/types/index.d.ts +3 -0
- package/es/packages/ui/src/theme/src/types/menu.type.d.ts +15 -0
- package/es/packages/ui/src/theme/src/types/theme.type.d.ts +62 -0
- package/es/packages/ui/src/utils/withInstall.d.ts +4 -0
- package/es/theme/index.d.ts +2 -1
- package/es/theme/index.js +658 -665
- package/es/theme/index.less +55 -0
- package/es/theme/src/components/header/components/logo.d.ts +22 -0
- package/es/theme/src/components/header/index.d.ts +87 -0
- package/es/theme/src/components/header/multiple-header.d.ts +88 -0
- package/es/theme/src/components/sider/index.d.ts +22 -0
- package/es/theme/src/components/sider/mix-sider.d.ts +22 -0
- package/es/theme/src/hooks/useMultifyTab.d.ts +1 -0
- package/es/theme/src/index.d.ts +197 -0
- package/es/theme/src/types/theme.type.d.ts +1 -0
- package/index.d.ts +2 -1
- package/index.js +6 -2
- package/package.json +4 -2
- package/tsconfig.json +1 -0
- package/vite.config.ts +1 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
.dt-tree-search{
|
|
2
|
+
padding: 10px;
|
|
3
|
+
|
|
4
|
+
& > i {
|
|
5
|
+
width: 24px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
input.ant-input-sm{
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
height: 28px;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.dt-tree-header{
|
|
15
|
+
border-bottom: 1px solid #e7e7e7;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dt-tree{
|
|
19
|
+
background: #fff;
|
|
20
|
+
.ant-spin-nested-loading{
|
|
21
|
+
flex: 1;
|
|
22
|
+
overflow-y: auto;
|
|
23
|
+
padding: 10px 0;
|
|
24
|
+
|
|
25
|
+
.tree-title{
|
|
26
|
+
font-size: 13px;
|
|
27
|
+
position: relative;
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
width: 100%;
|
|
31
|
+
padding-right: 10px;
|
|
32
|
+
&:hover .tree-action{
|
|
33
|
+
visibility: visible;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tree-action{
|
|
39
|
+
visibility: hidden;
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: 0;
|
|
42
|
+
right: 3px;
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.dt-theme-middle .dt-tree .ant-spin-nested-loading{
|
|
48
|
+
.tree-title{
|
|
49
|
+
font-size: 13px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.dt-theme-large .dt-tree .ant-spin-nested-loading{
|
|
54
|
+
.tree-title{
|
|
55
|
+
font-size: 14px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
.dt-context-menu{
|
|
61
|
+
width: 156px;
|
|
62
|
+
ul{
|
|
63
|
+
margin: 0;
|
|
64
|
+
list-style: none;
|
|
65
|
+
background-color: #fff;
|
|
66
|
+
border: 1px solid rgb(0 0 0 / 8%);
|
|
67
|
+
border-radius: 0.25rem;
|
|
68
|
+
box-shadow: 0 2px 2px 0 rgb(0 0 0 / 14%), 0 3px 1px -2px rgb(0 0 0 / 10%),
|
|
69
|
+
0 1px 5px 0 rgb(0 0 0 / 6%) !important;
|
|
70
|
+
background-clip: padding-box;
|
|
71
|
+
user-select: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
&__item {
|
|
76
|
+
margin: 0 !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
li {
|
|
80
|
+
display: inline-block;
|
|
81
|
+
width: 100%;
|
|
82
|
+
height: 38px;
|
|
83
|
+
margin: 0 !important;
|
|
84
|
+
line-height: 38px;
|
|
85
|
+
|
|
86
|
+
span {
|
|
87
|
+
line-height: 38px;
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
i{
|
|
92
|
+
font-size: 18px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
> div {
|
|
96
|
+
margin: 0 !important;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:not(.ant-menu-item-disabled):hover {
|
|
100
|
+
color: #333;
|
|
101
|
+
background-color: #f5f5f5;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.ant-divider {
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&__popup {
|
|
110
|
+
.ant-divider {
|
|
111
|
+
margin: 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.ant-menu-submenu-title,
|
|
116
|
+
.ant-menu-item {
|
|
117
|
+
padding: 0 !important;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { CSSProperties, PropType } from "vue";
|
|
2
|
+
import { Recordable } from "@dt-frames/core";
|
|
3
|
+
import { KeyType, CheckKeys, FieldNames, TreeActionItem, TreeItem } from './type/tree';
|
|
4
|
+
import { Axis, ContextMenuItem } from "./type/menu";
|
|
5
|
+
export declare const BasicProps: {
|
|
6
|
+
defaultExpandLevel: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
};
|
|
9
|
+
defaultExpandAll: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
showIcon: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
15
|
+
};
|
|
16
|
+
loading: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
checkStrictly: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
default: boolean;
|
|
23
|
+
};
|
|
24
|
+
expandedKeys: {
|
|
25
|
+
type: PropType<KeyType[]>;
|
|
26
|
+
default: () => any[];
|
|
27
|
+
};
|
|
28
|
+
selectedKeys: {
|
|
29
|
+
type: PropType<KeyType[]>;
|
|
30
|
+
default: () => any[];
|
|
31
|
+
};
|
|
32
|
+
checkedKeys: {
|
|
33
|
+
type: PropType<CheckKeys>;
|
|
34
|
+
default: () => any[];
|
|
35
|
+
};
|
|
36
|
+
fieldNames: {
|
|
37
|
+
type: PropType<FieldNames>;
|
|
38
|
+
};
|
|
39
|
+
beforeRightClick: {
|
|
40
|
+
type: PropType<(...arg: any) => ContextMenuItem[]>;
|
|
41
|
+
default: any;
|
|
42
|
+
};
|
|
43
|
+
rightMenuList: {
|
|
44
|
+
type: PropType<ContextMenuItem[]>;
|
|
45
|
+
};
|
|
46
|
+
renderIcon: {
|
|
47
|
+
type: PropType<(params: Recordable) => string>;
|
|
48
|
+
};
|
|
49
|
+
highlight: {
|
|
50
|
+
type: PropType<String | Boolean>;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
actionList: {
|
|
54
|
+
type: PropType<TreeActionItem[]>;
|
|
55
|
+
default: () => any[];
|
|
56
|
+
};
|
|
57
|
+
clickRowToExpand: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
searchValue: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
filterFn: {
|
|
66
|
+
type: PropType<(searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean>;
|
|
67
|
+
default: any;
|
|
68
|
+
};
|
|
69
|
+
checkable: BooleanConstructor;
|
|
70
|
+
expandOnSearch: BooleanConstructor;
|
|
71
|
+
checkOnSearch: BooleanConstructor;
|
|
72
|
+
selectedOnSearch: BooleanConstructor;
|
|
73
|
+
treeData: {
|
|
74
|
+
type: PropType<import("ant-design-vue/lib/tree").DataNode[]>;
|
|
75
|
+
};
|
|
76
|
+
value: {
|
|
77
|
+
type: PropType<KeyType[] | CheckKeys>;
|
|
78
|
+
};
|
|
79
|
+
title: {
|
|
80
|
+
type: StringConstructor;
|
|
81
|
+
default: string;
|
|
82
|
+
};
|
|
83
|
+
toolbar: BooleanConstructor;
|
|
84
|
+
search: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export declare const searchProps: {
|
|
90
|
+
title: {
|
|
91
|
+
type: StringConstructor;
|
|
92
|
+
default: string;
|
|
93
|
+
};
|
|
94
|
+
toolbar: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: boolean;
|
|
97
|
+
};
|
|
98
|
+
checkable: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: boolean;
|
|
101
|
+
};
|
|
102
|
+
search: {
|
|
103
|
+
type: BooleanConstructor;
|
|
104
|
+
default: boolean;
|
|
105
|
+
};
|
|
106
|
+
searchText: {
|
|
107
|
+
type: StringConstructor;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
checkAll: {
|
|
111
|
+
type: FunctionConstructor;
|
|
112
|
+
default: any;
|
|
113
|
+
};
|
|
114
|
+
expandAll: {
|
|
115
|
+
type: FunctionConstructor;
|
|
116
|
+
default: any;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export declare const rightMenuProps: {
|
|
120
|
+
width: {
|
|
121
|
+
type: NumberConstructor;
|
|
122
|
+
default: number;
|
|
123
|
+
};
|
|
124
|
+
customEvent: {
|
|
125
|
+
type: PropType<Event>;
|
|
126
|
+
default: any;
|
|
127
|
+
};
|
|
128
|
+
styles: {
|
|
129
|
+
type: PropType<CSSProperties>;
|
|
130
|
+
};
|
|
131
|
+
showIcon: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: boolean;
|
|
134
|
+
};
|
|
135
|
+
axis: {
|
|
136
|
+
type: PropType<Axis>;
|
|
137
|
+
default: () => {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
items: {
|
|
143
|
+
type: PropType<ContextMenuItem[]>;
|
|
144
|
+
default: () => any[];
|
|
145
|
+
};
|
|
146
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ContextMenuItem } from '../type/menu';
|
|
3
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
4
|
+
width: {
|
|
5
|
+
type: NumberConstructor;
|
|
6
|
+
default: number;
|
|
7
|
+
};
|
|
8
|
+
customEvent: {
|
|
9
|
+
type: import("vue").PropType<Event>;
|
|
10
|
+
default: any;
|
|
11
|
+
};
|
|
12
|
+
styles: {
|
|
13
|
+
type: import("vue").PropType<CSSProperties>;
|
|
14
|
+
};
|
|
15
|
+
showIcon: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
axis: {
|
|
20
|
+
type: import("vue").PropType<import("../type/menu").Axis>;
|
|
21
|
+
default: () => {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
items: {
|
|
27
|
+
type: import("vue").PropType<ContextMenuItem[]>;
|
|
28
|
+
default: () => any[];
|
|
29
|
+
};
|
|
30
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
|
+
width: {
|
|
32
|
+
type: NumberConstructor;
|
|
33
|
+
default: number;
|
|
34
|
+
};
|
|
35
|
+
customEvent: {
|
|
36
|
+
type: import("vue").PropType<Event>;
|
|
37
|
+
default: any;
|
|
38
|
+
};
|
|
39
|
+
styles: {
|
|
40
|
+
type: import("vue").PropType<CSSProperties>;
|
|
41
|
+
};
|
|
42
|
+
showIcon: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
axis: {
|
|
47
|
+
type: import("vue").PropType<import("../type/menu").Axis>;
|
|
48
|
+
default: () => {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
items: {
|
|
54
|
+
type: import("vue").PropType<ContextMenuItem[]>;
|
|
55
|
+
default: () => any[];
|
|
56
|
+
};
|
|
57
|
+
}>>, {
|
|
58
|
+
showIcon: boolean;
|
|
59
|
+
width: number;
|
|
60
|
+
customEvent: Event;
|
|
61
|
+
axis: import("../type/menu").Axis;
|
|
62
|
+
items: ContextMenuItem[];
|
|
63
|
+
}>;
|
|
64
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ToolbarEnum } from '../enums';
|
|
2
|
+
declare const _sfc_main: import("vue").DefineComponent<{
|
|
3
|
+
title: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
toolbar: {
|
|
8
|
+
type: BooleanConstructor;
|
|
9
|
+
default: boolean;
|
|
10
|
+
};
|
|
11
|
+
checkable: {
|
|
12
|
+
type: BooleanConstructor;
|
|
13
|
+
default: boolean;
|
|
14
|
+
};
|
|
15
|
+
search: {
|
|
16
|
+
type: BooleanConstructor;
|
|
17
|
+
default: boolean;
|
|
18
|
+
};
|
|
19
|
+
searchText: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
checkAll: {
|
|
24
|
+
type: FunctionConstructor;
|
|
25
|
+
default: any;
|
|
26
|
+
};
|
|
27
|
+
expandAll: {
|
|
28
|
+
type: FunctionConstructor;
|
|
29
|
+
default: any;
|
|
30
|
+
};
|
|
31
|
+
}, {
|
|
32
|
+
props: any;
|
|
33
|
+
slots: Readonly<{
|
|
34
|
+
[name: string]: import("vue").Slot;
|
|
35
|
+
}>;
|
|
36
|
+
emits: (event: "search", ...args: any[]) => void;
|
|
37
|
+
t: {
|
|
38
|
+
(key: string): string;
|
|
39
|
+
(key: string, locale: string): string;
|
|
40
|
+
(key: string, locale: string, list: unknown[]): string;
|
|
41
|
+
(key: string, locale: string, named: Record<string, unknown>): string;
|
|
42
|
+
(key: string, list: unknown[]): string;
|
|
43
|
+
(key: string, named: Record<string, unknown>): string;
|
|
44
|
+
};
|
|
45
|
+
searchValue: import("vue").Ref<string>;
|
|
46
|
+
emitChange: (value?: string) => void;
|
|
47
|
+
handleMenuClick: (e: any) => void;
|
|
48
|
+
toolbarList: import("vue").ComputedRef<({
|
|
49
|
+
label: string;
|
|
50
|
+
value: ToolbarEnum;
|
|
51
|
+
divider?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
label: string;
|
|
54
|
+
value: ToolbarEnum;
|
|
55
|
+
divider: true;
|
|
56
|
+
})[]>;
|
|
57
|
+
debounceEmitChange: (value?: string) => void;
|
|
58
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "search"[], "search", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
59
|
+
title: {
|
|
60
|
+
type: StringConstructor;
|
|
61
|
+
default: string;
|
|
62
|
+
};
|
|
63
|
+
toolbar: {
|
|
64
|
+
type: BooleanConstructor;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
checkable: {
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
default: boolean;
|
|
70
|
+
};
|
|
71
|
+
search: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
75
|
+
searchText: {
|
|
76
|
+
type: StringConstructor;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
checkAll: {
|
|
80
|
+
type: FunctionConstructor;
|
|
81
|
+
default: any;
|
|
82
|
+
};
|
|
83
|
+
expandAll: {
|
|
84
|
+
type: FunctionConstructor;
|
|
85
|
+
default: any;
|
|
86
|
+
};
|
|
87
|
+
}>> & {
|
|
88
|
+
onSearch?: (...args: any[]) => any;
|
|
89
|
+
}, {
|
|
90
|
+
search: boolean;
|
|
91
|
+
checkable: boolean;
|
|
92
|
+
title: string;
|
|
93
|
+
toolbar: boolean;
|
|
94
|
+
searchText: string;
|
|
95
|
+
checkAll: Function;
|
|
96
|
+
expandAll: Function;
|
|
97
|
+
}>;
|
|
98
|
+
export default _sfc_main;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from "vue";
|
|
2
|
+
import { FieldNames, TreeItem, KeyType, InsertNodeParams } from "../type/tree";
|
|
3
|
+
import { TreeDataItem } from "ant-design-vue/lib/tree/Tree";
|
|
4
|
+
export declare function useTree(treeDataRef: Ref<TreeDataItem[]>, getFieldNames: ComputedRef<FieldNames>): {
|
|
5
|
+
getAllKeys: (list?: TreeDataItem[]) => KeyType[];
|
|
6
|
+
getEnabledKeys: (list?: TreeDataItem[]) => KeyType[];
|
|
7
|
+
getChildrenKeys: (nodeKey: string | number, list?: TreeDataItem[]) => KeyType[];
|
|
8
|
+
updateNodeByKey: (key: string, node: TreeDataItem, list?: TreeDataItem[]) => void;
|
|
9
|
+
filterByLevel: (level?: number, list?: TreeDataItem[], currentLevel?: number) => string[] | number[];
|
|
10
|
+
insertNodeByKey: ({ parentKey, node, push }: InsertNodeParams) => void;
|
|
11
|
+
insertNodesByKey: ({ parentKey, list, push }: InsertNodeParams) => void;
|
|
12
|
+
deleteNodeByKey: (key: string, list?: TreeDataItem[]) => void;
|
|
13
|
+
getSelectedNode: (key: KeyType, list?: TreeItem[], selectedNode?: TreeItem | null) => TreeItem;
|
|
14
|
+
};
|