@dt-frames/ui 2.0.16 → 2.0.18
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/drawer/index.d.ts +3 -4
- package/es/components/drawer/index.js +11 -15
- package/es/components/drawer/index.less +6 -0
- package/es/components/drawer/src/index.d.ts +5 -7
- package/es/components/drawer/src/types/index.type.d.ts +3 -1
- package/es/components/form/index.js +33 -7
- package/es/components/form/src/components/FormButtons.d.ts +3056 -4
- package/es/components/form/src/components/FormItem.d.ts +2 -2
- package/es/components/form/src/components/formIcon.d.ts +0 -1209
- package/es/components/form/src/components/formInputUseDialog.d.ts +0 -894
- package/es/components/form/src/props.d.ts +3 -3
- package/es/components/form/src/types/items.type.d.ts +8 -0
- package/es/components/modal/index.js +19 -7
- package/es/components/modal/index.less +1 -9
- package/es/components/source/index.js +15 -7
- package/es/components/table/index.js +210 -201
- package/es/components/table/index.less +29 -0
- package/es/components/table/src/components/editTable/EditTableCell.d.ts +1 -0
- package/es/components/table/src/index.d.ts +0 -10
- package/es/components/table/src/props.d.ts +0 -4
- package/es/components/table/src/types/table.type.d.ts +8 -0
- package/es/components/tree/index.js +46 -44
- package/es/components/tree/index.less +13 -0
- package/es/components/tree/src/basicProps.d.ts +9 -4
- package/es/components/tree/src/components/ContextMenu.d.ts +6 -0
- package/es/components/tree/src/index.d.ts +11 -11
- package/es/components/tree/src/type/menu.d.ts +3 -0
- package/es/components/tree/src/type/tree.d.ts +0 -5
- package/es/components/tree/src/utils/tree.d.ts +3 -1
- package/es/components/upload/index.js +170 -69
- package/es/components/upload/index.less +7 -0
- package/es/components/upload/src/basicProps.d.ts +5 -1
- package/es/components/upload/src/components/WordView.d.ts +1 -0
- package/es/components/upload/src/hooks/useFile.d.ts +7 -6
- package/es/components/upload/src/index.d.ts +17 -0
- package/es/components/upload/src/type/file.d.ts +9 -2
- package/es/components/upload/src/utils/fileSize.d.ts +1 -0
- package/es/theme/index.js +157 -100
- package/es/theme/index.less +14 -0
- package/es/theme/src/components/sider/index.d.ts +1 -1
- package/es/theme/src/components/sider/mix-sider.d.ts +1 -1
- package/es/theme/src/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,27 @@
|
|
|
27
27
|
|
|
28
28
|
.ant-table-empty {
|
|
29
29
|
border-bottom: 1px solid #f0f0f0;
|
|
30
|
+
.ant-table-cell {
|
|
31
|
+
border: none;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ant-spin-nested-loading, .ant-spin-container {
|
|
36
|
+
height: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.ant-spin-container, .ant-table-container, .ant-table {
|
|
40
|
+
flex: 1;
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ant-table, .ant-table-container {
|
|
46
|
+
height: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ant-table-body {
|
|
50
|
+
flex: 1;
|
|
30
51
|
}
|
|
31
52
|
|
|
32
53
|
.dt-pagination{
|
|
@@ -108,6 +129,14 @@
|
|
|
108
129
|
}
|
|
109
130
|
}
|
|
110
131
|
}
|
|
132
|
+
|
|
133
|
+
.primary-color-link{
|
|
134
|
+
color: @primary-color;
|
|
135
|
+
cursor: pointer;
|
|
136
|
+
&:hover{
|
|
137
|
+
text-decoration: underline;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
111
140
|
}
|
|
112
141
|
|
|
113
142
|
.ant-table{
|
|
@@ -62,6 +62,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
62
62
|
handleChange: (e: any) => Promise<void>;
|
|
63
63
|
handleSubmitRule: () => Promise<boolean>;
|
|
64
64
|
handleOptionsChange: (options: LableValOptions) => void;
|
|
65
|
+
readonly omit: any;
|
|
65
66
|
readonly CellComponent: import("vue").FunctionalComponent<{}, {}>;
|
|
66
67
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
67
68
|
value: {
|
|
@@ -91,10 +91,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
91
91
|
type: BooleanConstructor;
|
|
92
92
|
default: boolean;
|
|
93
93
|
};
|
|
94
|
-
canResize: {
|
|
95
|
-
type: BooleanConstructor;
|
|
96
|
-
default: boolean;
|
|
97
|
-
};
|
|
98
94
|
pagination: {
|
|
99
95
|
type: import("vue").PropType<Boolean | import("./types/table.type").PaginationProps>;
|
|
100
96
|
default: any;
|
|
@@ -313,7 +309,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
313
309
|
showCheckboxColumn: boolean;
|
|
314
310
|
expandActions: boolean;
|
|
315
311
|
ellipsis: boolean;
|
|
316
|
-
canResize: boolean;
|
|
317
312
|
onTableChange: Function;
|
|
318
313
|
onDownload: Function;
|
|
319
314
|
indexColumnProps: import("./types/table.type").BasicColumn[];
|
|
@@ -494,10 +489,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
494
489
|
type: BooleanConstructor;
|
|
495
490
|
default: boolean;
|
|
496
491
|
};
|
|
497
|
-
canResize: {
|
|
498
|
-
type: BooleanConstructor;
|
|
499
|
-
default: boolean;
|
|
500
|
-
};
|
|
501
492
|
pagination: {
|
|
502
493
|
type: import("vue").PropType<Boolean | import("./types/table.type").PaginationProps>;
|
|
503
494
|
default: any;
|
|
@@ -611,7 +602,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
611
602
|
ellipsis: boolean;
|
|
612
603
|
dataSource: import("@dt-frames/core").Recordable<any>[];
|
|
613
604
|
bordered: boolean;
|
|
614
|
-
canResize: boolean;
|
|
615
605
|
pagination: any;
|
|
616
606
|
loading: boolean;
|
|
617
607
|
scroll: {};
|
|
@@ -20,6 +20,14 @@ export declare type CellFormat = ((record: Recordable, index: Number, text: stri
|
|
|
20
20
|
date: string;
|
|
21
21
|
} | {
|
|
22
22
|
percent: string;
|
|
23
|
+
} | {
|
|
24
|
+
tag: (row: Recordable) => {
|
|
25
|
+
color: string;
|
|
26
|
+
text: string | number;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
link: (row: Recordable, index: number) => void;
|
|
30
|
+
text?: any;
|
|
23
31
|
} | {
|
|
24
32
|
[key: string]: Recordable;
|
|
25
33
|
} | VNode | JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { Input, MenuItem, MenuDivider, Menu, Dropdown, Tree, Empty, Spin } from
|
|
|
2
2
|
import "ant-design-vue/es/spin/style";
|
|
3
3
|
import "ant-design-vue/es/empty/style";
|
|
4
4
|
import "ant-design-vue/es/tree/style";
|
|
5
|
-
import { unref, defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, toDisplayString, createCommentVNode, renderSlot, createVNode, createBlock, withModifiers, withCtx, Fragment, renderList, normalizeProps, guardReactiveProps, createTextVNode, createElementVNode, onMounted, onUnmounted, isVNode, getCurrentInstance, render as render$2, useAttrs, reactive, toRaw, watchEffect, normalizeClass, createSlots, withDirectives, mergeProps, vShow } from "vue";
|
|
5
|
+
import { unref, defineComponent, useSlots, ref, computed, watch, openBlock, createElementBlock, toDisplayString, createCommentVNode, renderSlot, createVNode, createBlock, withModifiers, withCtx, Fragment, renderList, normalizeProps, guardReactiveProps, createTextVNode, createElementVNode, onMounted, nextTick, onUnmounted, isVNode, getCurrentInstance, render as render$2, useAttrs, reactive, toRaw, watchEffect, normalizeClass, createSlots, withDirectives, mergeProps, vShow } from "vue";
|
|
6
6
|
import { useI18n, useSlots as useSlots$1, isArray, isFunction, isEmpty, isBoolean } from "@dt-frames/core";
|
|
7
7
|
import { cloneDeep, difference, omit, get } from "lodash-es";
|
|
8
8
|
import "ant-design-vue/es/dropdown/style";
|
|
@@ -18,6 +18,9 @@ const BasicProps = {
|
|
|
18
18
|
defaultExpandAll: {
|
|
19
19
|
type: Boolean
|
|
20
20
|
},
|
|
21
|
+
height: {
|
|
22
|
+
type: [Number, String]
|
|
23
|
+
},
|
|
21
24
|
showIcon: {
|
|
22
25
|
type: Boolean,
|
|
23
26
|
default: false
|
|
@@ -94,9 +97,8 @@ const BasicProps = {
|
|
|
94
97
|
type: [Boolean, String],
|
|
95
98
|
default: false
|
|
96
99
|
},
|
|
97
|
-
|
|
98
|
-
type:
|
|
99
|
-
default: () => []
|
|
100
|
+
action: {
|
|
101
|
+
type: Function
|
|
100
102
|
},
|
|
101
103
|
clickRowToExpand: {
|
|
102
104
|
type: Boolean,
|
|
@@ -189,13 +191,16 @@ const rightMenuProps = {
|
|
|
189
191
|
items: {
|
|
190
192
|
type: Array,
|
|
191
193
|
default: () => []
|
|
194
|
+
},
|
|
195
|
+
node: {
|
|
196
|
+
type: Object
|
|
192
197
|
}
|
|
193
198
|
};
|
|
194
|
-
function eachTree(treeDatas, callBack, parentNode = {}) {
|
|
199
|
+
function eachTree(treeDatas, callBack, parentNode = {}, config = { children: "children" }) {
|
|
195
200
|
treeDatas.forEach((el) => {
|
|
196
201
|
const newNode = callBack(el, parentNode) || el;
|
|
197
|
-
if (el.children) {
|
|
198
|
-
eachTree(el.children, callBack, newNode);
|
|
202
|
+
if (el[config.children]) {
|
|
203
|
+
eachTree(el[config.children], callBack, newNode, config);
|
|
199
204
|
}
|
|
200
205
|
});
|
|
201
206
|
}
|
|
@@ -385,6 +390,7 @@ function useTree(treeDataRef, getFieldNames, emit) {
|
|
|
385
390
|
if (!key && key !== 0)
|
|
386
391
|
return null;
|
|
387
392
|
const treeData = list || unref(treeDataRef);
|
|
393
|
+
const { children: childrenField } = unref(getFieldNames);
|
|
388
394
|
treeData.forEach((item) => {
|
|
389
395
|
if (selectedNode?.key || selectedNode?.key === 0)
|
|
390
396
|
return selectedNode;
|
|
@@ -392,8 +398,8 @@ function useTree(treeDataRef, getFieldNames, emit) {
|
|
|
392
398
|
selectedNode = item;
|
|
393
399
|
return;
|
|
394
400
|
}
|
|
395
|
-
if (item
|
|
396
|
-
selectedNode = getSelectedNode(key, item
|
|
401
|
+
if (item[childrenField] && item[childrenField].length) {
|
|
402
|
+
selectedNode = getSelectedNode(key, item[childrenField], selectedNode);
|
|
397
403
|
}
|
|
398
404
|
});
|
|
399
405
|
return selectedNode || null;
|
|
@@ -403,12 +409,13 @@ function useTree(treeDataRef, getFieldNames, emit) {
|
|
|
403
409
|
const dragKey = info.dragNode.key;
|
|
404
410
|
const dropPos = info.node.pos.split("-");
|
|
405
411
|
const dropPosition = info.dropPosition - Number(dropPos[dropPos.length - 1]);
|
|
412
|
+
const { children: childrenField } = unref(getFieldNames);
|
|
406
413
|
const loop = (data2, key, callback) => {
|
|
407
414
|
data2.forEach((item, index) => {
|
|
408
415
|
if (item.key === key)
|
|
409
416
|
return callback(item, index, data2);
|
|
410
|
-
if (item
|
|
411
|
-
return loop(item
|
|
417
|
+
if (item[childrenField])
|
|
418
|
+
return loop(item[childrenField], key, callback);
|
|
412
419
|
});
|
|
413
420
|
};
|
|
414
421
|
const data = [...treeDataRef.value];
|
|
@@ -419,13 +426,13 @@ function useTree(treeDataRef, getFieldNames, emit) {
|
|
|
419
426
|
});
|
|
420
427
|
if (!info.dropToGap) {
|
|
421
428
|
loop(data, dropKey, (item) => {
|
|
422
|
-
item
|
|
423
|
-
item.
|
|
429
|
+
item[childrenField] = item[childrenField] || [];
|
|
430
|
+
item[childrenField].unshift(dragObj);
|
|
424
431
|
});
|
|
425
432
|
} else if ((info.node.children || []).length > 0 && info.node.expanded && dropPosition === 1) {
|
|
426
433
|
loop(data, dropKey, (item) => {
|
|
427
|
-
item
|
|
428
|
-
item.
|
|
434
|
+
item[childrenField] = item[childrenField] || [];
|
|
435
|
+
item[childrenField].unshift(dragObj);
|
|
429
436
|
});
|
|
430
437
|
} else {
|
|
431
438
|
let ar = [];
|
|
@@ -642,7 +649,7 @@ const _sfc_main$1 = defineComponent({
|
|
|
642
649
|
showRef.value = false;
|
|
643
650
|
e?.stopPropagation();
|
|
644
651
|
e?.preventDefault();
|
|
645
|
-
handler?.();
|
|
652
|
+
handler?.(props.node);
|
|
646
653
|
}
|
|
647
654
|
function renderMenuItem(items) {
|
|
648
655
|
const visibleItems = items.filter((item) => !item.hidden);
|
|
@@ -714,12 +721,12 @@ function useContextMenu() {
|
|
|
714
721
|
}
|
|
715
722
|
};
|
|
716
723
|
function createContextMenu(options) {
|
|
717
|
-
const { event } = options || {};
|
|
724
|
+
const { event, node } = options || {};
|
|
718
725
|
event && event?.preventDefault();
|
|
719
726
|
return new Promise((resolve) => {
|
|
720
727
|
const body = document.body;
|
|
721
728
|
const container = document.createElement("div");
|
|
722
|
-
const propsData = {};
|
|
729
|
+
const propsData = { node };
|
|
723
730
|
if (options.styles) {
|
|
724
731
|
propsData.styles = options.styles;
|
|
725
732
|
}
|
|
@@ -814,8 +821,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
814
821
|
t
|
|
815
822
|
} = useI18n("UI");
|
|
816
823
|
const {
|
|
817
|
-
getSlot
|
|
818
|
-
extendSlots
|
|
824
|
+
getSlot
|
|
819
825
|
} = useSlots$1();
|
|
820
826
|
const {
|
|
821
827
|
getUiSize
|
|
@@ -856,7 +862,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
856
862
|
if (!icon) {
|
|
857
863
|
if (props.renderIcon && isFunction(props.renderIcon)) {
|
|
858
864
|
return props.renderIcon(params);
|
|
859
|
-
} else if (params
|
|
865
|
+
} else if (!params?.isLeaf) {
|
|
860
866
|
return state.expandedKeys.includes(params.key) ? createVNode(ForderOpen, null, null) : createVNode(Forder, null, null);
|
|
861
867
|
}
|
|
862
868
|
}
|
|
@@ -866,16 +872,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
866
872
|
};
|
|
867
873
|
const treeData = computed(() => {
|
|
868
874
|
const data = cloneDeep(getTreeData.value);
|
|
875
|
+
const {
|
|
876
|
+
title: titleField,
|
|
877
|
+
key: keyField,
|
|
878
|
+
children: childrenField
|
|
879
|
+
} = unref(getFieldNames);
|
|
869
880
|
eachTree(data, (item, _parent) => {
|
|
870
881
|
const searchText = searchState.searchText;
|
|
871
882
|
const {
|
|
872
883
|
highlight
|
|
873
884
|
} = unref(props);
|
|
874
|
-
const {
|
|
875
|
-
title: titleField,
|
|
876
|
-
key: keyField,
|
|
877
|
-
children: childrenField
|
|
878
|
-
} = unref(getFieldNames);
|
|
879
885
|
const icon = getIcon(item, item.icon);
|
|
880
886
|
const title = get(item, titleField);
|
|
881
887
|
const searchIdx = searchText ? title.indexOf(searchText) : -1;
|
|
@@ -886,13 +892,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
886
892
|
}, [createVNode("span", null, [title.substr(0, searchIdx)]), createVNode("span", {
|
|
887
893
|
"style": highlightStyle
|
|
888
894
|
}, [searchText]), createVNode("span", null, [title.substr(searchIdx + searchText.length)])]) : title;
|
|
889
|
-
item._title = item
|
|
895
|
+
item._title = item[titleField];
|
|
890
896
|
item[titleField] = createVNode("span", {
|
|
891
|
-
"class": `tree-title ${unref(activeKey) === item[keyField] ? "tree-active-node" : ""}
|
|
897
|
+
"class": `tree-title ${unref(activeKey) === item[keyField] ? "tree-active-node" : ""}`
|
|
898
|
+
}, [slots?.title ? getSlot(slots, "title", item) : createVNode(Fragment, null, [createVNode("span", {
|
|
899
|
+
"class": "flex items-center flex-1",
|
|
892
900
|
"onClick": handleClickNode.bind(null, item[keyField], item[childrenField], item)
|
|
893
|
-
}, [
|
|
901
|
+
}, [unref(getBindValues).showIcon && icon, titleDom]), createVNode("span", {
|
|
894
902
|
"class": "tree-action"
|
|
895
903
|
}, [renderAction(item)])])]);
|
|
904
|
+
}, {}, {
|
|
905
|
+
children: childrenField
|
|
896
906
|
});
|
|
897
907
|
return data;
|
|
898
908
|
});
|
|
@@ -961,21 +971,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
961
971
|
}
|
|
962
972
|
function renderAction(node) {
|
|
963
973
|
const {
|
|
964
|
-
|
|
974
|
+
action
|
|
965
975
|
} = props;
|
|
966
|
-
if (
|
|
967
|
-
return;
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
if (isFunction(item.show)) {
|
|
971
|
-
nodeShow = item.show?.(node);
|
|
972
|
-
} else if (isBoolean(item.show)) {
|
|
973
|
-
nodeShow = item.show;
|
|
974
|
-
}
|
|
975
|
-
if (!nodeShow)
|
|
976
|
-
return null;
|
|
977
|
-
return createVNode(Fragment, null, [item.render(node)]);
|
|
978
|
-
});
|
|
976
|
+
if (action && isFunction(action)) {
|
|
977
|
+
return createVNode(Fragment, null, [action(node)]);
|
|
978
|
+
}
|
|
979
|
+
return null;
|
|
979
980
|
}
|
|
980
981
|
function handleSearch(searchValue) {
|
|
981
982
|
if (searchValue !== searchState.searchText)
|
|
@@ -1022,7 +1023,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1022
1023
|
} = props;
|
|
1023
1024
|
let contextMenuOptions = {
|
|
1024
1025
|
event,
|
|
1025
|
-
items: []
|
|
1026
|
+
items: [],
|
|
1027
|
+
node
|
|
1026
1028
|
};
|
|
1027
1029
|
if (beforeRightClick && isFunction(beforeRightClick)) {
|
|
1028
1030
|
let result = await beforeRightClick(node, event);
|
|
@@ -56,6 +56,13 @@
|
|
|
56
56
|
background-color: @primary-color-hover;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
+
|
|
60
|
+
.anticon-file {
|
|
61
|
+
opacity: 0.6;
|
|
62
|
+
svg{
|
|
63
|
+
width: 12px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
59
66
|
}
|
|
60
67
|
|
|
61
68
|
.toolbar{
|
|
@@ -112,6 +119,12 @@
|
|
|
112
119
|
font-size: 14px;
|
|
113
120
|
line-height: 36px;
|
|
114
121
|
}
|
|
122
|
+
|
|
123
|
+
.anticon-file {
|
|
124
|
+
svg{
|
|
125
|
+
width: 13px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
115
128
|
}
|
|
116
129
|
}
|
|
117
130
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, PropType } from "vue";
|
|
2
2
|
import { Recordable } from "@dt-frames/core";
|
|
3
|
-
import { KeyType, CheckKeys, FieldNames,
|
|
3
|
+
import { KeyType, CheckKeys, FieldNames, TreeItem } from './type/tree';
|
|
4
4
|
import { Axis, ContextMenuItem } from "./type/menu";
|
|
5
5
|
export declare const BasicProps: {
|
|
6
6
|
defaultExpandLevel: {
|
|
@@ -9,6 +9,9 @@ export declare const BasicProps: {
|
|
|
9
9
|
defaultExpandAll: {
|
|
10
10
|
type: BooleanConstructor;
|
|
11
11
|
};
|
|
12
|
+
height: {
|
|
13
|
+
type: PropType<String | Number>;
|
|
14
|
+
};
|
|
12
15
|
showIcon: {
|
|
13
16
|
type: BooleanConstructor;
|
|
14
17
|
default: boolean;
|
|
@@ -85,9 +88,8 @@ export declare const BasicProps: {
|
|
|
85
88
|
type: PropType<String | Boolean>;
|
|
86
89
|
default: boolean;
|
|
87
90
|
};
|
|
88
|
-
|
|
89
|
-
type: PropType<
|
|
90
|
-
default: () => any[];
|
|
91
|
+
action: {
|
|
92
|
+
type: PropType<(record: Recordable) => any>;
|
|
91
93
|
};
|
|
92
94
|
clickRowToExpand: {
|
|
93
95
|
type: BooleanConstructor;
|
|
@@ -182,4 +184,7 @@ export declare const rightMenuProps: {
|
|
|
182
184
|
type: PropType<ContextMenuItem[]>;
|
|
183
185
|
default: () => any[];
|
|
184
186
|
};
|
|
187
|
+
node: {
|
|
188
|
+
type: PropType<Recordable<any>>;
|
|
189
|
+
};
|
|
185
190
|
};
|
|
@@ -27,6 +27,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
27
27
|
type: import("vue").PropType<ContextMenuItem[]>;
|
|
28
28
|
default: () => any[];
|
|
29
29
|
};
|
|
30
|
+
node: {
|
|
31
|
+
type: import("vue").PropType<import("@dt-frames/core").Recordable<any>>;
|
|
32
|
+
};
|
|
30
33
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
31
34
|
width: {
|
|
32
35
|
type: NumberConstructor;
|
|
@@ -54,6 +57,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
54
57
|
type: import("vue").PropType<ContextMenuItem[]>;
|
|
55
58
|
default: () => any[];
|
|
56
59
|
};
|
|
60
|
+
node: {
|
|
61
|
+
type: import("vue").PropType<import("@dt-frames/core").Recordable<any>>;
|
|
62
|
+
};
|
|
57
63
|
}>>, {
|
|
58
64
|
showIcon: boolean;
|
|
59
65
|
width: number;
|
|
@@ -8,6 +8,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
8
8
|
defaultExpandAll: {
|
|
9
9
|
type: BooleanConstructor;
|
|
10
10
|
};
|
|
11
|
+
height: {
|
|
12
|
+
type: import("vue").PropType<String | Number>;
|
|
13
|
+
};
|
|
11
14
|
showIcon: {
|
|
12
15
|
type: BooleanConstructor;
|
|
13
16
|
default: boolean;
|
|
@@ -84,9 +87,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
84
87
|
type: import("vue").PropType<String | Boolean>;
|
|
85
88
|
default: boolean;
|
|
86
89
|
};
|
|
87
|
-
|
|
88
|
-
type: import("vue").PropType<
|
|
89
|
-
default: () => any[];
|
|
90
|
+
action: {
|
|
91
|
+
type: import("vue").PropType<(record: Recordable<any>) => any>;
|
|
90
92
|
};
|
|
91
93
|
clickRowToExpand: {
|
|
92
94
|
type: BooleanConstructor;
|
|
@@ -137,9 +139,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
137
139
|
}>, slot?: string, data?: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
138
140
|
[key: string]: any;
|
|
139
141
|
}>[];
|
|
140
|
-
extendSlots: (slots: Readonly<{
|
|
141
|
-
[name: string]: import("vue").Slot;
|
|
142
|
-
}>, excludeKeys?: string[]) => any;
|
|
143
142
|
getUiSize: import("vue").ComputedRef<import('../../../theme').UiSize>;
|
|
144
143
|
props: any;
|
|
145
144
|
attrs: {
|
|
@@ -6329,7 +6328,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
6329
6328
|
getBindValues: import("vue").ComputedRef<any>;
|
|
6330
6329
|
showTitle: import("vue").ComputedRef<string | true | import("vue").Slot>;
|
|
6331
6330
|
handleClickNode: (key: string, children: TreeItem[], node: TreeItem) => void;
|
|
6332
|
-
renderAction: (node: TreeItem) => JSX.Element
|
|
6331
|
+
renderAction: (node: TreeItem) => JSX.Element;
|
|
6333
6332
|
handleSearch: (searchValue: string) => void;
|
|
6334
6333
|
createContextMenu: ((options: CreateContextOptions) => Promise<unknown>) | (() => void);
|
|
6335
6334
|
handleRightClick: ({ event, node }: Recordable) => Promise<void>;
|
|
@@ -6459,6 +6458,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
6459
6458
|
defaultExpandAll: {
|
|
6460
6459
|
type: BooleanConstructor;
|
|
6461
6460
|
};
|
|
6461
|
+
height: {
|
|
6462
|
+
type: import("vue").PropType<String | Number>;
|
|
6463
|
+
};
|
|
6462
6464
|
showIcon: {
|
|
6463
6465
|
type: BooleanConstructor;
|
|
6464
6466
|
default: boolean;
|
|
@@ -6535,9 +6537,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
6535
6537
|
type: import("vue").PropType<String | Boolean>;
|
|
6536
6538
|
default: boolean;
|
|
6537
6539
|
};
|
|
6538
|
-
|
|
6539
|
-
type: import("vue").PropType<
|
|
6540
|
-
default: () => any[];
|
|
6540
|
+
action: {
|
|
6541
|
+
type: import("vue").PropType<(record: Recordable<any>) => any>;
|
|
6541
6542
|
};
|
|
6542
6543
|
clickRowToExpand: {
|
|
6543
6544
|
type: BooleanConstructor;
|
|
@@ -6606,7 +6607,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
6606
6607
|
checkedKeys: CheckKeys;
|
|
6607
6608
|
beforeRightClick: (...arg: any) => import("./type/menu").ContextMenuItem[];
|
|
6608
6609
|
highlight: String | Boolean;
|
|
6609
|
-
actionList: import("./type/tree").TreeActionItem[];
|
|
6610
6610
|
clickRowToExpand: boolean;
|
|
6611
6611
|
searchValue: string;
|
|
6612
6612
|
filterFn: (searchValue: any, node: TreeItem, fieldNames: FieldNames) => boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Recordable } from "@dt-frames/core";
|
|
1
2
|
export interface Axis {
|
|
2
3
|
x: number;
|
|
3
4
|
y: number;
|
|
@@ -21,6 +22,7 @@ export interface CreateContextOptions {
|
|
|
21
22
|
icon?: string;
|
|
22
23
|
styles?: any;
|
|
23
24
|
items?: ContextMenuItem[];
|
|
25
|
+
node?: Recordable;
|
|
24
26
|
}
|
|
25
27
|
export interface ContextMenuProps {
|
|
26
28
|
event?: MouseEvent;
|
|
@@ -30,4 +32,5 @@ export interface ContextMenuProps {
|
|
|
30
32
|
axis?: Axis;
|
|
31
33
|
width?: number;
|
|
32
34
|
showIcon?: boolean;
|
|
35
|
+
node?: Recordable;
|
|
33
36
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Recordable } from "@dt-frames/core";
|
|
2
1
|
import { TreeDataItem } from "ant-design-vue/lib/tree/Tree";
|
|
3
2
|
export declare type KeyType = string | number;
|
|
4
3
|
export declare type CheckKeys = KeyType[] | {
|
|
@@ -10,10 +9,6 @@ export interface FieldNames {
|
|
|
10
9
|
title?: string;
|
|
11
10
|
key?: string;
|
|
12
11
|
}
|
|
13
|
-
export interface TreeActionItem {
|
|
14
|
-
render: (record: Recordable) => any;
|
|
15
|
-
show?: boolean | ((record: Recordable) => boolean);
|
|
16
|
-
}
|
|
17
12
|
export interface TreeItem extends TreeDataItem {
|
|
18
13
|
icon?: any;
|
|
19
14
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TreeHelperConfig } from "../type/tree";
|
|
2
|
-
export declare function eachTree(treeDatas: any[], callBack: Function, parentNode?: {}
|
|
2
|
+
export declare function eachTree(treeDatas: any[], callBack: Function, parentNode?: {}, config?: {
|
|
3
|
+
children: string;
|
|
4
|
+
}): void;
|
|
3
5
|
export declare function forEach<T = any>(tree: T[], func: (n: T) => any, config?: Partial<TreeHelperConfig>): void;
|
|
4
6
|
export declare function filter<T = any>(tree: T[], func: (n: T) => boolean, config?: Partial<TreeHelperConfig>): T[];
|
|
5
7
|
export declare function treeToList<T = any>(tree: any, config?: Partial<TreeHelperConfig>): T;
|