vft 0.0.317 → 0.0.320
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/dist/index.css +1 -1
- package/es/component.js +157 -155
- package/es/components/avatar-stack/avatar-stack.vue.d.ts +12 -0
- package/es/components/avatar-stack/avatar-stack.vue.js +4 -0
- package/es/components/avatar-stack/avatar-stack.vue2.js +69 -0
- package/es/components/avatar-stack/index.d.ts +43 -0
- package/es/components/avatar-stack/index.js +12 -0
- package/es/components/avatar-stack/style/css.d.ts +4 -0
- package/es/components/avatar-stack/style/css.js +6 -0
- package/es/components/avatar-stack/style/index.d.ts +4 -0
- package/es/components/avatar-stack/style/index.js +6 -0
- package/es/components/avatar-stack/types.d.ts +14 -0
- package/es/components/avatar-stack/types.js +1 -0
- package/es/components/button/index.d.ts +9 -9
- package/es/components/color-picker/color-picker.vue2.js +1 -1
- package/es/components/form/form-item.vue.d.ts +1 -1
- package/es/components/form/index.d.ts +30 -30
- package/es/components/index.d.ts +13 -12
- package/es/components/index.js +421 -419
- package/es/components/list-cell/list-cell.vue2.js +36 -36
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/super-form/component-map.d.ts +6 -0
- package/es/components/super-form/component-map.js +42 -30
- package/es/components/super-form/style/css.d.ts +6 -0
- package/es/components/super-form/style/css.js +15 -6
- package/es/components/super-form/style/index.d.ts +6 -0
- package/es/components/super-form/style/index.js +16 -7
- package/es/components/super-form/super-form-item.vue2.js +217 -199
- package/es/components/super-form/use/helper.js +137 -23
- package/es/components/table/style/css.js +15 -6
- package/es/components/table/style/index.js +16 -7
- package/es/components/tree/index.d.ts +5 -5
- package/es/components/tree/tree.vue.d.ts +2 -2
- package/es/components/upload/index.d.ts +15 -15
- package/es/components/upload/upload-content.vue.d.ts +1 -1
- package/es/components/upload/upload-content.vue2.js +51 -47
- package/es/components/upload/upload-list.vue2.js +70 -66
- package/es/components/upload/upload.vue.d.ts +1 -1
- package/es/components/upload/upload.vue2.js +30 -30
- package/es/index.js +562 -560
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue.cjs +1 -0
- package/lib/components/avatar-stack/avatar-stack.vue.d.ts +12 -0
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -0
- package/lib/components/avatar-stack/index.cjs +1 -0
- package/lib/components/avatar-stack/index.d.ts +43 -0
- package/lib/components/avatar-stack/style/css.cjs +1 -0
- package/lib/components/avatar-stack/style/css.d.ts +4 -0
- package/lib/components/avatar-stack/style/index.cjs +1 -0
- package/lib/components/avatar-stack/style/index.d.ts +4 -0
- package/lib/components/avatar-stack/types.cjs +1 -0
- package/lib/components/avatar-stack/types.d.ts +14 -0
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue.d.ts +1 -1
- package/lib/components/form/index.d.ts +30 -30
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +13 -12
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/component-map.d.ts +6 -0
- package/lib/components/super-form/style/css.cjs +1 -1
- package/lib/components/super-form/style/css.d.ts +6 -0
- package/lib/components/super-form/style/index.cjs +1 -1
- package/lib/components/super-form/style/index.d.ts +6 -0
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/table/style/css.cjs +1 -1
- package/lib/components/table/style/index.cjs +1 -1
- package/lib/components/tree/index.d.ts +5 -5
- package/lib/components/tree/tree.vue.d.ts +2 -2
- package/lib/components/upload/index.d.ts +15 -15
- package/lib/components/upload/upload-content.vue.d.ts +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue.d.ts +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/theme-style/index.css +1 -1
- package/theme-style/src/avatar-stack.scss +38 -0
- package/theme-style/src/common/var.scss +16 -2
- package/theme-style/src/index.scss +1 -0
- package/theme-style/src/super-form.scss +6 -1
- package/theme-style/vft-avatar-stack.css +1 -0
- package/theme-style/vft-super-form.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,27 +1,141 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import "../../alert/index.js";
|
|
2
|
+
import "../../avatar/index.js";
|
|
3
|
+
import "../../avatar-stack/index.js";
|
|
4
|
+
import "../../backtop/index.js";
|
|
5
|
+
import "../../button/index.js";
|
|
6
|
+
import "../../card/index.js";
|
|
7
|
+
import "../../cascader/index.js";
|
|
8
|
+
import "../../cascader-panel/index.js";
|
|
9
|
+
import "../../check-tag/index.js";
|
|
10
|
+
import "../../checkbox/index.js";
|
|
11
|
+
import "../../clamp/index.js";
|
|
12
|
+
import "../../clamp-toggle/index.js";
|
|
13
|
+
import "../../clamp-tooltip/index.js";
|
|
14
|
+
import "../../col/index.js";
|
|
15
|
+
import "../../collapse-transition/index.js";
|
|
16
|
+
import "../../color-picker/index.js";
|
|
17
|
+
import "../../config-provider/index.js";
|
|
18
|
+
import "../../container/index.js";
|
|
19
|
+
import { isNumber as t } from "@vft/utils";
|
|
20
|
+
import "vue";
|
|
21
|
+
import "../../context-menu/context-menu.vue2.js";
|
|
22
|
+
import "../../icon/index.js";
|
|
23
|
+
import "../../date-picker/index.js";
|
|
24
|
+
import "../../date-time-select/index.js";
|
|
25
|
+
import "../../descriptions/index.js";
|
|
26
|
+
import "../../dialog/index.js";
|
|
27
|
+
import "../../divider/index.js";
|
|
28
|
+
import "../../drawer/index.js";
|
|
29
|
+
import "../../dropdown/index.js";
|
|
30
|
+
import "../../empty/index.js";
|
|
31
|
+
import "../../footer-layout/index.js";
|
|
32
|
+
import "../../form/index.js";
|
|
33
|
+
import "../../full-screen/index.js";
|
|
34
|
+
import "../../header-layout/index.js";
|
|
35
|
+
import "../../horizontal-menu/index.js";
|
|
36
|
+
import "../../icon-text/index.js";
|
|
37
|
+
import "../../iframe-layout/index.js";
|
|
38
|
+
import "../../image/index.js";
|
|
39
|
+
import "../../image-viewer/index.js";
|
|
40
|
+
import "../../input/index.js";
|
|
41
|
+
import "../../input-number/index.js";
|
|
42
|
+
import "../../link/index.js";
|
|
43
|
+
import "../../list-cell/index.js";
|
|
44
|
+
import "../../logo/index.js";
|
|
45
|
+
import "../../menu/index.js";
|
|
46
|
+
import "../../multiple-tabs/index.js";
|
|
47
|
+
import "../../notification/index.js";
|
|
48
|
+
import "../../overlay/index.js";
|
|
49
|
+
import "../../page-wrapper/index.js";
|
|
50
|
+
import "../../pagination/index.js";
|
|
51
|
+
import "../../popconfirm/index.js";
|
|
52
|
+
import "../../popover/index.js";
|
|
53
|
+
import "../../popper/index.js";
|
|
54
|
+
import "../../qrcode/index.js";
|
|
55
|
+
import "../../radio/index.js";
|
|
56
|
+
import "../../result/index.js";
|
|
57
|
+
import "../../router-view-content/index.js";
|
|
58
|
+
import "../../row/index.js";
|
|
59
|
+
import "../../scrollbar/index.js";
|
|
60
|
+
import "../../search/index.js";
|
|
61
|
+
import "../../select/index.js";
|
|
62
|
+
import "../../side-menu/index.js";
|
|
63
|
+
import "../../skeleton/index.js";
|
|
64
|
+
import "../../slider/index.js";
|
|
65
|
+
import "../../space/index.js";
|
|
66
|
+
import "../../steps/index.js";
|
|
67
|
+
import "../../switch/index.js";
|
|
68
|
+
import "../../table/index.js";
|
|
69
|
+
import "../../tabs/index.js";
|
|
70
|
+
import "../../tag/index.js";
|
|
71
|
+
import "../../time-picker/index.js";
|
|
72
|
+
import "../../tooltip/index.js";
|
|
73
|
+
import "../../tree/index.js";
|
|
74
|
+
import "../../verify-code/index.js";
|
|
75
|
+
import "../../virtual-list/components/fixed-size-list.js";
|
|
76
|
+
import "../../virtual-list/components/dynamic-size-list.js";
|
|
77
|
+
import "../../virtual-list/components/fixed-size-grid.js";
|
|
78
|
+
import "../../virtual-list/components/dynamic-size-grid.js";
|
|
79
|
+
import "../../virtual-list/props.js";
|
|
80
|
+
import "../../autocomplete/index.js";
|
|
81
|
+
import "../../breadcrumb/index.js";
|
|
82
|
+
import "../../carousel/index.js";
|
|
83
|
+
import "../../collapse/index.js";
|
|
84
|
+
import "../../countdown/index.js";
|
|
85
|
+
import "../../input-tag/index.js";
|
|
86
|
+
import "../../modal/index.js";
|
|
87
|
+
import "../../progress/index.js";
|
|
88
|
+
import "../../segmented/index.js";
|
|
89
|
+
import "../../statistic/index.js";
|
|
90
|
+
import "../index.js";
|
|
91
|
+
import "../../timeline/index.js";
|
|
92
|
+
import "../../transfer/index.js";
|
|
93
|
+
import "../../upload/index.js";
|
|
94
|
+
import "../../watermark/index.js";
|
|
95
|
+
import "../../md-code-demo/index.js";
|
|
96
|
+
import "../../md-code-tabs/index.js";
|
|
97
|
+
import "../../md-comment/index.js";
|
|
98
|
+
import "../../md-container/index.js";
|
|
99
|
+
import "../../md-tabs/index.js";
|
|
100
|
+
import "../../md-vue-playground/index.js";
|
|
101
|
+
import "../../infinite-scroll/index.js";
|
|
102
|
+
import "@vueuse/core";
|
|
103
|
+
import "../../config-provider/hooks/use-global-config.js";
|
|
104
|
+
import "lodash-es";
|
|
105
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
106
|
+
import "@popperjs/core";
|
|
107
|
+
import "../../../hooks/use-z-index/index.js";
|
|
108
|
+
import "../../message/index.js";
|
|
109
|
+
import "../../progress-i/index.js";
|
|
110
|
+
import { isInput as m, FormCompEnum as r } from "../component-map.js";
|
|
111
|
+
function Ei(i, o = "") {
|
|
112
|
+
return o = (o || "").replace(":", ""), [
|
|
113
|
+
r.INPUT,
|
|
114
|
+
r.INPUT_NUMBER,
|
|
115
|
+
r.TEXTAREA,
|
|
116
|
+
r.AUTOCOMPLETE
|
|
117
|
+
].includes(i) ? "请输入" + o : [r.PASSWORD].includes(i) ? "请输入密码" : [
|
|
118
|
+
r.SELECT,
|
|
119
|
+
r.RADIO,
|
|
120
|
+
r.Cascader,
|
|
121
|
+
r.ColorPicker
|
|
122
|
+
].includes(i) ? "请选择" + o : [r.SEARCH].includes(i) ? "请输入要搜索的内容" : [r.INPUT_TAG].includes(i) ? "请输入标签内容" : [r.Upload].includes(i) ? "请选择上传文件" : [r.Slider].includes(i) ? "请拖动滑块" : [
|
|
123
|
+
r.TIME_PICKER,
|
|
124
|
+
r.YEAR_PICKER,
|
|
125
|
+
r.MONTH_PICKER,
|
|
126
|
+
r.DATE_PICKER,
|
|
127
|
+
r.DATES_PICKER,
|
|
128
|
+
r.DATETIME_PICKER,
|
|
129
|
+
r.WEEK_PICKER,
|
|
130
|
+
r.DATETIMERANGE_PICKER,
|
|
131
|
+
r.DATERANGE_PICKER,
|
|
132
|
+
r.MONTHRANGE_PICKER
|
|
133
|
+
].includes(i) ? "请选择时间" : "";
|
|
20
134
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
135
|
+
function ni(i, o) {
|
|
136
|
+
return i && m(i) && o && t(o) ? `${o}` : o;
|
|
23
137
|
}
|
|
24
138
|
export {
|
|
25
|
-
|
|
26
|
-
|
|
139
|
+
Ei as createPlaceholderMessage,
|
|
140
|
+
ni as handleInputNumberValue
|
|
27
141
|
};
|
|
@@ -2,22 +2,31 @@ import "vft/theme-style/base.css";
|
|
|
2
2
|
import "vft/theme-style/vft-clamp-toggle.css";
|
|
3
3
|
import "vft/theme-style/vft-empty.css";
|
|
4
4
|
import "vft/theme-style/vft-pagination.css";
|
|
5
|
+
import "vft/theme-style/vft-autocomplete.css";
|
|
5
6
|
import "vft/theme-style/vft-input.css";
|
|
7
|
+
import "vft/theme-style/vft-scrollbar.css";
|
|
8
|
+
import "vft/theme-style/vft-popper.css";
|
|
9
|
+
import "vft/theme-style/vft-slider.css";
|
|
6
10
|
import "vft/theme-style/vft-input-number.css";
|
|
11
|
+
import "vft/theme-style/vft-tooltip.css";
|
|
12
|
+
import "vft/theme-style/vft-tag.css";
|
|
7
13
|
import "vft/theme-style/vft-checkbox.css";
|
|
14
|
+
import "vft/theme-style/vft-radio.css";
|
|
15
|
+
import "vft/theme-style/vft-cascader-panel.css";
|
|
16
|
+
import "vft/theme-style/vft-cascader.css";
|
|
17
|
+
import "vft/theme-style/vft-color-picker.css";
|
|
18
|
+
import "vft/theme-style/vft-icon.css";
|
|
19
|
+
import "vft/theme-style/vft-button.css";
|
|
20
|
+
import "vft/theme-style/vft-progress.css";
|
|
21
|
+
import "vft/theme-style/vft-upload.css";
|
|
22
|
+
import "vft/theme-style/vft-input-tag.css";
|
|
8
23
|
import "vft/theme-style/vft-check-tag.css";
|
|
9
24
|
import "vft/theme-style/vft-checkbox-button.css";
|
|
10
25
|
import "vft/theme-style/vft-checkbox-group.css";
|
|
11
|
-
import "vft/theme-style/vft-radio.css";
|
|
12
26
|
import "vft/theme-style/vft-radio-group.css";
|
|
13
27
|
import "vft/theme-style/vft-radio-button.css";
|
|
14
28
|
import "vft/theme-style/vft-date-picker.css";
|
|
15
|
-
import "vft/theme-style/vft-scrollbar.css";
|
|
16
|
-
import "vft/theme-style/vft-popper.css";
|
|
17
|
-
import "vft/theme-style/vft-icon.css";
|
|
18
|
-
import "vft/theme-style/vft-button.css";
|
|
19
29
|
import "vft/theme-style/vft-time-picker.css";
|
|
20
|
-
import "vft/theme-style/vft-tag.css";
|
|
21
30
|
import "vft/theme-style/vft-virtual-list.css";
|
|
22
31
|
import "vft/theme-style/vft-select.css";
|
|
23
32
|
import "vft/theme-style/vft-switch.css";
|
|
@@ -2,22 +2,31 @@ import "vft/theme-style/src/base.scss";
|
|
|
2
2
|
import "vft/theme-style/src/clamp-toggle.scss";
|
|
3
3
|
import "vft/theme-style/src/empty.scss";
|
|
4
4
|
import "vft/theme-style/src/pagination.scss";
|
|
5
|
+
import "vft/theme-style/src/autocomplete.scss";
|
|
5
6
|
import "vft/theme-style/src/input.scss";
|
|
6
|
-
import "vft/theme-style/src/
|
|
7
|
+
import "vft/theme-style/src/scrollbar.scss";
|
|
8
|
+
import "vft/theme-style/src/popper.scss";
|
|
9
|
+
import "vft/theme-style/src/tag.scss";
|
|
7
10
|
import "vft/theme-style/src/checkbox.scss";
|
|
11
|
+
import "vft/theme-style/src/radio.scss";
|
|
12
|
+
import "vft/theme-style/src/cascader-panel.scss";
|
|
13
|
+
import "vft/theme-style/src/cascader.scss";
|
|
14
|
+
import "vft/theme-style/src/slider.scss";
|
|
15
|
+
import "vft/theme-style/src/input-number.scss";
|
|
16
|
+
import "vft/theme-style/src/tooltip.scss";
|
|
17
|
+
import "vft/theme-style/src/color-picker.scss";
|
|
18
|
+
import "vft/theme-style/src/icon.scss";
|
|
19
|
+
import "vft/theme-style/src/button.scss";
|
|
20
|
+
import "vft/theme-style/src/progress.scss";
|
|
21
|
+
import "vft/theme-style/src/upload.scss";
|
|
22
|
+
import "vft/theme-style/src/input-tag.scss";
|
|
8
23
|
import "vft/theme-style/src/check-tag.scss";
|
|
9
24
|
import "vft/theme-style/src/checkbox-button.scss";
|
|
10
25
|
import "vft/theme-style/src/checkbox-group.scss";
|
|
11
|
-
import "vft/theme-style/src/radio.scss";
|
|
12
26
|
import "vft/theme-style/src/radio-group.scss";
|
|
13
27
|
import "vft/theme-style/src/radio-button.scss";
|
|
14
|
-
import "vft/theme-style/src/scrollbar.scss";
|
|
15
|
-
import "vft/theme-style/src/popper.scss";
|
|
16
|
-
import "vft/theme-style/src/icon.scss";
|
|
17
|
-
import "vft/theme-style/src/button.scss";
|
|
18
28
|
import "vft/theme-style/src/date-picker.scss";
|
|
19
29
|
import "vft/theme-style/src/time-picker.scss";
|
|
20
|
-
import "vft/theme-style/src/tag.scss";
|
|
21
30
|
import "vft/theme-style/src/virtual-list.scss";
|
|
22
31
|
import "vft/theme-style/src/select.scss";
|
|
23
32
|
import "vft/theme-style/src/switch.scss";
|
|
@@ -97,6 +97,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
97
97
|
};
|
|
98
98
|
}>> & Readonly<{
|
|
99
99
|
"onCurrent-change"?: (() => any) | undefined;
|
|
100
|
+
onCheck?: (() => any) | undefined;
|
|
100
101
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
101
102
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
102
103
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -108,7 +109,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
108
109
|
"onNode-click"?: (() => any) | undefined;
|
|
109
110
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
110
111
|
"onNode-collapse"?: (() => any) | undefined;
|
|
111
|
-
onCheck?: (() => any) | undefined;
|
|
112
112
|
}>, {
|
|
113
113
|
filter: (value: any) => void;
|
|
114
114
|
getNodeKey: (node: import("./model/node").default) => any;
|
|
@@ -134,6 +134,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
134
134
|
updateNode: (data: import("./tree.type").TreeData, refNode: import("./tree.type").TreeKey | import("./tree.type").TreeNodeData | import("./model/node").default) => void;
|
|
135
135
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
136
136
|
"current-change": () => void;
|
|
137
|
+
check: () => void;
|
|
137
138
|
"node-drag-start": () => void;
|
|
138
139
|
"node-drag-leave": () => void;
|
|
139
140
|
"node-drag-enter": () => void;
|
|
@@ -145,7 +146,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
145
146
|
"node-click": () => void;
|
|
146
147
|
"node-contextmenu": () => void;
|
|
147
148
|
"node-collapse": () => void;
|
|
148
|
-
check: () => void;
|
|
149
149
|
}, import("vue").PublicProps, {
|
|
150
150
|
data: Array<any>;
|
|
151
151
|
props: import("./tree.type").TreeComponentProps["props"];
|
|
@@ -251,6 +251,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
251
251
|
};
|
|
252
252
|
}>> & Readonly<{
|
|
253
253
|
"onCurrent-change"?: (() => any) | undefined;
|
|
254
|
+
onCheck?: (() => any) | undefined;
|
|
254
255
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
255
256
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
256
257
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -262,7 +263,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
262
263
|
"onNode-click"?: (() => any) | undefined;
|
|
263
264
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
264
265
|
"onNode-collapse"?: (() => any) | undefined;
|
|
265
|
-
onCheck?: (() => any) | undefined;
|
|
266
266
|
}>, {
|
|
267
267
|
filter: (value: any) => void;
|
|
268
268
|
getNodeKey: (node: import("./model/node").default) => any;
|
|
@@ -388,6 +388,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
388
388
|
};
|
|
389
389
|
}>> & Readonly<{
|
|
390
390
|
"onCurrent-change"?: (() => any) | undefined;
|
|
391
|
+
onCheck?: (() => any) | undefined;
|
|
391
392
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
392
393
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
393
394
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -399,7 +400,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
399
400
|
"onNode-click"?: (() => any) | undefined;
|
|
400
401
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
401
402
|
"onNode-collapse"?: (() => any) | undefined;
|
|
402
|
-
onCheck?: (() => any) | undefined;
|
|
403
403
|
}>, {
|
|
404
404
|
filter: (value: any) => void;
|
|
405
405
|
getNodeKey: (node: import("./model/node").default) => any;
|
|
@@ -425,6 +425,7 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
425
425
|
updateNode: (data: import("./tree.type").TreeData, refNode: import("./tree.type").TreeKey | import("./tree.type").TreeNodeData | import("./model/node").default) => void;
|
|
426
426
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
427
427
|
"current-change": () => void;
|
|
428
|
+
check: () => void;
|
|
428
429
|
"node-drag-start": () => void;
|
|
429
430
|
"node-drag-leave": () => void;
|
|
430
431
|
"node-drag-enter": () => void;
|
|
@@ -436,7 +437,6 @@ export declare const VftTree: SFCWithInstall<{
|
|
|
436
437
|
"node-click": () => void;
|
|
437
438
|
"node-contextmenu": () => void;
|
|
438
439
|
"node-collapse": () => void;
|
|
439
|
-
check: () => void;
|
|
440
440
|
}, string, {
|
|
441
441
|
data: Array<any>;
|
|
442
442
|
props: import("./tree.type").TreeComponentProps["props"];
|
|
@@ -69,6 +69,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
69
69
|
updateNode: (data: TreeData, refNode: TreeKey | TreeNodeData | Node) => void;
|
|
70
70
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
71
71
|
"current-change": () => void;
|
|
72
|
+
check: () => void;
|
|
72
73
|
"node-drag-start": () => void;
|
|
73
74
|
"node-drag-leave": () => void;
|
|
74
75
|
"node-drag-enter": () => void;
|
|
@@ -80,7 +81,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
80
81
|
"node-click": () => void;
|
|
81
82
|
"node-contextmenu": () => void;
|
|
82
83
|
"node-collapse": () => void;
|
|
83
|
-
check: () => void;
|
|
84
84
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<TreeProps>, {
|
|
85
85
|
renderAfterExpand: boolean;
|
|
86
86
|
expandOnClickNode: boolean;
|
|
@@ -94,6 +94,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
94
94
|
indent: number;
|
|
95
95
|
}>>> & Readonly<{
|
|
96
96
|
"onCurrent-change"?: (() => any) | undefined;
|
|
97
|
+
onCheck?: (() => any) | undefined;
|
|
97
98
|
"onNode-drag-start"?: (() => any) | undefined;
|
|
98
99
|
"onNode-drag-leave"?: (() => any) | undefined;
|
|
99
100
|
"onNode-drag-enter"?: (() => any) | undefined;
|
|
@@ -105,7 +106,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
105
106
|
"onNode-click"?: (() => any) | undefined;
|
|
106
107
|
"onNode-contextmenu"?: (() => any) | undefined;
|
|
107
108
|
"onNode-collapse"?: (() => any) | undefined;
|
|
108
|
-
onCheck?: (() => any) | undefined;
|
|
109
109
|
}>, {
|
|
110
110
|
data: Array<any>;
|
|
111
111
|
props: TreeComponentProps["props"];
|
|
@@ -42,10 +42,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
42
42
|
type: import("vue").PropType<string>;
|
|
43
43
|
default: string;
|
|
44
44
|
};
|
|
45
|
-
accept: {
|
|
46
|
-
type: import("vue").PropType<string>;
|
|
47
|
-
default: string;
|
|
48
|
-
};
|
|
49
45
|
withCredentials: {
|
|
50
46
|
type: import("vue").PropType<boolean>;
|
|
51
47
|
};
|
|
@@ -53,6 +49,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
53
49
|
type: import("vue").PropType<boolean>;
|
|
54
50
|
default: boolean;
|
|
55
51
|
};
|
|
52
|
+
accept: {
|
|
53
|
+
type: import("vue").PropType<string>;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
56
|
fileList: {
|
|
57
57
|
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
58
58
|
default: never[];
|
|
@@ -146,8 +146,8 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
146
146
|
method: string;
|
|
147
147
|
multiple: boolean;
|
|
148
148
|
action: string;
|
|
149
|
-
accept: string;
|
|
150
149
|
showFileList: boolean;
|
|
150
|
+
accept: string;
|
|
151
151
|
fileList: import("./types").UploadUserFile[];
|
|
152
152
|
autoUpload: boolean;
|
|
153
153
|
listType: import("./types").ListType;
|
|
@@ -202,10 +202,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
202
202
|
type: import("vue").PropType<string>;
|
|
203
203
|
default: string;
|
|
204
204
|
};
|
|
205
|
-
accept: {
|
|
206
|
-
type: import("vue").PropType<string>;
|
|
207
|
-
default: string;
|
|
208
|
-
};
|
|
209
205
|
withCredentials: {
|
|
210
206
|
type: import("vue").PropType<boolean>;
|
|
211
207
|
};
|
|
@@ -213,6 +209,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
213
209
|
type: import("vue").PropType<boolean>;
|
|
214
210
|
default: boolean;
|
|
215
211
|
};
|
|
212
|
+
accept: {
|
|
213
|
+
type: import("vue").PropType<string>;
|
|
214
|
+
default: string;
|
|
215
|
+
};
|
|
216
216
|
fileList: {
|
|
217
217
|
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
218
218
|
default: never[];
|
|
@@ -306,8 +306,8 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
306
306
|
method: string;
|
|
307
307
|
multiple: boolean;
|
|
308
308
|
action: string;
|
|
309
|
-
accept: string;
|
|
310
309
|
showFileList: boolean;
|
|
310
|
+
accept: string;
|
|
311
311
|
fileList: import("./types").UploadUserFile[];
|
|
312
312
|
autoUpload: boolean;
|
|
313
313
|
listType: import("./types").ListType;
|
|
@@ -359,10 +359,6 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
359
359
|
type: import("vue").PropType<string>;
|
|
360
360
|
default: string;
|
|
361
361
|
};
|
|
362
|
-
accept: {
|
|
363
|
-
type: import("vue").PropType<string>;
|
|
364
|
-
default: string;
|
|
365
|
-
};
|
|
366
362
|
withCredentials: {
|
|
367
363
|
type: import("vue").PropType<boolean>;
|
|
368
364
|
};
|
|
@@ -370,6 +366,10 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
370
366
|
type: import("vue").PropType<boolean>;
|
|
371
367
|
default: boolean;
|
|
372
368
|
};
|
|
369
|
+
accept: {
|
|
370
|
+
type: import("vue").PropType<string>;
|
|
371
|
+
default: string;
|
|
372
|
+
};
|
|
373
373
|
fileList: {
|
|
374
374
|
type: import("vue").PropType<import("./types").UploadUserFile[]>;
|
|
375
375
|
default: never[];
|
|
@@ -463,8 +463,8 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
|
|
|
463
463
|
method: string;
|
|
464
464
|
multiple: boolean;
|
|
465
465
|
action: string;
|
|
466
|
-
accept: string;
|
|
467
466
|
showFileList: boolean;
|
|
467
|
+
accept: string;
|
|
468
468
|
fileList: import("./types").UploadUserFile[];
|
|
469
469
|
autoUpload: boolean;
|
|
470
470
|
listType: import("./types").ListType;
|
|
@@ -38,8 +38,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
38
38
|
method: string;
|
|
39
39
|
multiple: boolean;
|
|
40
40
|
action: string;
|
|
41
|
-
accept: string;
|
|
42
41
|
showFileList: boolean;
|
|
42
|
+
accept: string;
|
|
43
43
|
fileList: import("./types").UploadUserFile[];
|
|
44
44
|
autoUpload: boolean;
|
|
45
45
|
listType: import("./types").ListType;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import { defineComponent as D, shallowRef as E, createElementBlock as
|
|
2
|
-
import { isObject as q, entriesOf as z } from "@vft/utils";
|
|
3
|
-
import "../form/index.js";
|
|
1
|
+
import { defineComponent as D, shallowRef as E, createElementBlock as x, openBlock as R, withKeys as A, normalizeClass as U, withModifiers as S, unref as f, createBlock as M, renderSlot as _, createElementVNode as N, withCtx as V, nextTick as z } from "vue";
|
|
4
2
|
import "@vueuse/core";
|
|
3
|
+
import { isObject as q, entriesOf as H } from "@vft/utils";
|
|
4
|
+
import { debugWarn as W } from "../../utils/error.js";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
6
|
-
import { cloneDeep as P, isEqual as
|
|
7
|
-
import
|
|
6
|
+
import { cloneDeep as P, isEqual as X } from "lodash-es";
|
|
7
|
+
import "../form/index.js";
|
|
8
|
+
import { useNamespace as F } from "../../hooks/use-namespace/index.js";
|
|
8
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
10
|
import "@popperjs/core";
|
|
10
11
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { ajaxUpload as
|
|
12
|
-
import { genFileId as
|
|
13
|
-
import
|
|
14
|
-
import { useFormDisabled as
|
|
15
|
-
|
|
12
|
+
import { ajaxUpload as G } from "./ajax.js";
|
|
13
|
+
import { genFileId as J } from "./constants.js";
|
|
14
|
+
import Q from "./upload-dragger.vue2.js";
|
|
15
|
+
import { useFormDisabled as Y } from "../form/hooks/use-form-common-props.js";
|
|
16
|
+
import { useFormItem as Z } from "../form/hooks/use-form-item.js";
|
|
17
|
+
const ee = ["onKeydown"], te = ["name", "multiple", "accept"], oe = D({
|
|
16
18
|
name: "VftUploadContent",
|
|
17
19
|
inheritAttrs: !1
|
|
18
|
-
}),
|
|
19
|
-
...
|
|
20
|
+
}), ke = /* @__PURE__ */ D({
|
|
21
|
+
...oe,
|
|
20
22
|
props: {
|
|
21
23
|
action: { default: "#" },
|
|
22
24
|
headers: {},
|
|
@@ -32,7 +34,7 @@ const W = ["onKeydown"], Y = ["name", "multiple", "accept"], Z = D({
|
|
|
32
34
|
fileList: { default: [] },
|
|
33
35
|
autoUpload: { type: Boolean, default: !1 },
|
|
34
36
|
listType: { default: "text" },
|
|
35
|
-
httpRequest: { type: Function, default:
|
|
37
|
+
httpRequest: { type: Function, default: G },
|
|
36
38
|
disabled: { type: Boolean },
|
|
37
39
|
limit: {},
|
|
38
40
|
beforeUpload: {},
|
|
@@ -44,27 +46,27 @@ const W = ["onKeydown"], Y = ["name", "multiple", "accept"], Z = D({
|
|
|
44
46
|
onExceed: {}
|
|
45
47
|
},
|
|
46
48
|
setup(K, { expose: L }) {
|
|
47
|
-
const a = K, u =
|
|
49
|
+
const a = K, u = F("upload"), g = Y(), { formItem: j } = Z(), s = E(
|
|
48
50
|
{}
|
|
49
|
-
),
|
|
51
|
+
), c = E(), v = (e) => {
|
|
50
52
|
if (e.length === 0) return;
|
|
51
|
-
const { autoUpload: t, limit: o, fileList: n, multiple: l, onStart:
|
|
53
|
+
const { autoUpload: t, limit: o, fileList: n, multiple: l, onStart: r, onExceed: p } = a;
|
|
52
54
|
if (o && n.length + e.length > o) {
|
|
53
|
-
|
|
55
|
+
p(e, n);
|
|
54
56
|
return;
|
|
55
57
|
}
|
|
56
58
|
l || (e = e.slice(0, 1));
|
|
57
59
|
for (const m of e) {
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
+
const i = m;
|
|
61
|
+
i.uid = J(), r(i), t && k(i);
|
|
60
62
|
}
|
|
61
63
|
}, k = async (e) => {
|
|
62
|
-
if (
|
|
64
|
+
if (c.value.value = "", !a.beforeUpload)
|
|
63
65
|
return C(e);
|
|
64
66
|
let t, o = {};
|
|
65
67
|
try {
|
|
66
|
-
const l = a.data,
|
|
67
|
-
o = q(a.data) ? P(a.data) : a.data, t = await
|
|
68
|
+
const l = a.data, r = a.beforeUpload(e);
|
|
69
|
+
o = q(a.data) ? P(a.data) : a.data, t = await r, q(a.data) && X(l, o) && (o = P(a.data));
|
|
68
70
|
} catch {
|
|
69
71
|
t = !1;
|
|
70
72
|
}
|
|
@@ -81,80 +83,82 @@ const W = ["onKeydown"], Y = ["name", "multiple", "accept"], Z = D({
|
|
|
81
83
|
headers: o,
|
|
82
84
|
data: n,
|
|
83
85
|
method: l,
|
|
84
|
-
withCredentials:
|
|
85
|
-
name:
|
|
86
|
+
withCredentials: r,
|
|
87
|
+
name: p,
|
|
86
88
|
action: m,
|
|
87
|
-
onProgress:
|
|
89
|
+
onProgress: i,
|
|
88
90
|
onSuccess: O,
|
|
89
|
-
onError:
|
|
90
|
-
httpRequest:
|
|
91
|
+
onError: T,
|
|
92
|
+
httpRequest: $
|
|
91
93
|
} = a, { uid: h } = e, y = {
|
|
92
94
|
headers: o || {},
|
|
93
|
-
withCredentials:
|
|
95
|
+
withCredentials: r,
|
|
94
96
|
file: e,
|
|
95
97
|
data: t ?? n,
|
|
96
98
|
method: l,
|
|
97
|
-
filename:
|
|
99
|
+
filename: p,
|
|
98
100
|
action: m,
|
|
99
101
|
onProgress: (d) => {
|
|
100
|
-
|
|
102
|
+
i(d, e);
|
|
101
103
|
},
|
|
102
104
|
onSuccess: (d) => {
|
|
103
105
|
O(d, e), delete s.value[h];
|
|
104
106
|
},
|
|
105
107
|
onError: (d) => {
|
|
106
|
-
|
|
108
|
+
T(d, e), delete s.value[h];
|
|
107
109
|
}
|
|
108
|
-
}, b =
|
|
110
|
+
}, b = $(y);
|
|
109
111
|
s.value[h] = b, b instanceof Promise && b.then(y.onSuccess, y.onError);
|
|
110
|
-
},
|
|
112
|
+
}, w = (e) => {
|
|
111
113
|
const t = e.target.files;
|
|
112
|
-
t && v(Array.from(t))
|
|
114
|
+
t && (v(Array.from(t)), z(() => {
|
|
115
|
+
j?.validate("change").catch((o) => W(o));
|
|
116
|
+
}));
|
|
113
117
|
}, B = () => {
|
|
114
|
-
g.value || (
|
|
115
|
-
},
|
|
118
|
+
g.value || (c.value.value = "", c.value.click());
|
|
119
|
+
}, I = () => {
|
|
116
120
|
B();
|
|
117
121
|
};
|
|
118
122
|
return L({
|
|
119
123
|
abort: (e) => {
|
|
120
|
-
|
|
124
|
+
H(s.value).filter(
|
|
121
125
|
e ? ([o]) => String(e.uid) === o : () => !0
|
|
122
126
|
).forEach(([o, n]) => {
|
|
123
127
|
n instanceof XMLHttpRequest && n.abort(), delete s.value[o];
|
|
124
128
|
});
|
|
125
129
|
},
|
|
126
130
|
upload: k
|
|
127
|
-
}), (e, t) => (R(),
|
|
131
|
+
}), (e, t) => (R(), x("div", {
|
|
128
132
|
class: U([f(u).b(), f(u).m(e.listType), f(u).is("drag", e.drag)]),
|
|
129
133
|
tabindex: "0",
|
|
130
134
|
onClick: B,
|
|
131
|
-
onKeydown:
|
|
135
|
+
onKeydown: A(S(I, ["self"]), ["enter", "space"])
|
|
132
136
|
}, [
|
|
133
|
-
e.drag ? (R(),
|
|
137
|
+
e.drag ? (R(), M(Q, {
|
|
134
138
|
key: 0,
|
|
135
139
|
disabled: f(g),
|
|
136
140
|
onFile: v
|
|
137
141
|
}, {
|
|
138
|
-
default:
|
|
142
|
+
default: V(() => [
|
|
139
143
|
_(e.$slots, "default")
|
|
140
144
|
]),
|
|
141
145
|
_: 3
|
|
142
146
|
}, 8, ["disabled"])) : _(e.$slots, "default", { key: 1 }),
|
|
143
|
-
|
|
147
|
+
N("input", {
|
|
144
148
|
ref_key: "inputRef",
|
|
145
|
-
ref:
|
|
149
|
+
ref: c,
|
|
146
150
|
class: U(f(u).e("input")),
|
|
147
151
|
name: e.name,
|
|
148
152
|
multiple: e.multiple,
|
|
149
153
|
accept: e.accept,
|
|
150
154
|
type: "file",
|
|
151
|
-
onChange:
|
|
155
|
+
onChange: w,
|
|
152
156
|
onClick: t[0] || (t[0] = S(() => {
|
|
153
157
|
}, ["stop"]))
|
|
154
|
-
}, null, 42,
|
|
155
|
-
], 42,
|
|
158
|
+
}, null, 42, te)
|
|
159
|
+
], 42, ee));
|
|
156
160
|
}
|
|
157
161
|
});
|
|
158
162
|
export {
|
|
159
|
-
|
|
163
|
+
ke as default
|
|
160
164
|
};
|