@das-fed/ui 6.4.0-dev.80 → 6.4.0-dev.82
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/package.json +5 -5
- package/packages/business-components/app-container/index.js +137 -133
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/index.js +14 -10
- package/packages/business-components/area-phone-select/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/style.css +1 -1
- package/packages/business-components/area-phone-select/style.css.gz +0 -0
- package/packages/business-components/device-panel/i18n/index.d.ts +1 -1
- package/packages/business-components/device-panel/index.js +10236 -10183
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/dataTrends/components/barChart.vue.d.ts +1 -1
- package/packages/business-components/device-panel/src/components/alarmDevicePanel/dataTrends/index.vue.d.ts +8 -2
- package/packages/business-components/device-panel/src/components/devicePanelModal/dataTrends/components/barChart.vue.d.ts +6 -2
- package/packages/business-components/device-panel/src/components/devicePanelModal/dataTrends/index.vue.d.ts +8 -2
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/import-button/index.js +30 -30
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/import-button/style.css +1 -1
- package/packages/business-components/payment/index.js +61 -59
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/payment/style.css +1 -1
- package/packages/business-components/process-form/index.js +763 -793
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/style.css +1 -1
- package/packages/business-components/upload-file/index.d.ts +8 -0
- package/packages/business-components/upload-file/index.js +48 -49
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/upload-file/src/App.vue.d.ts +2 -0
- package/packages/business-components/upload-file/src/type.d.ts +3 -0
- package/packages/business-components/upload-file/style.css +1 -1
- package/packages/components/color-picker/index.js +62 -63
- package/packages/components/color-picker/index.js.gz +0 -0
- package/packages/components/color-picker/style.css +1 -1
- package/packages/components/color-picker/style.css.gz +0 -0
- package/packages/components/edit-table/index.js +580 -567
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/image-upload/index.js +109 -124
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-upload/src/hooks/use-imageUpload.d.ts +1 -1
- package/packages/components/image-viewer/index.js +339 -354
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/image-viewer/src/hooks/use-imageViewer.d.ts +2 -2
- package/packages/components/image-viewer/style.css +1 -1
- package/packages/components/image-viewer/style.css.gz +0 -0
- package/packages/components/pagination/index.js +1 -1
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/search-form/index.js +734 -708
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/src/hooks/common.d.ts +1 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/text-tooltip/index.js +616 -616
- package/packages/components/text-tooltip/index.js.gz +0 -0
- package/packages/components/tree-table/index.js +68 -72
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-table/style.css +1 -1
- package/packages/components/tree-table/style.css.gz +0 -0
- package/packages/components/upload/i18n/index.d.ts +5 -0
- package/packages/components/upload/index.d.ts +3 -0
- package/packages/components/upload/index.js +143 -124
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/upload/src/Index.vue.d.ts +1 -0
- package/packages/components/upload/src/type.d.ts +3 -0
- package/packages/components/upload/style.css +1 -1
- package/packages/components/upload/style.css.gz +0 -0
- package/packages/components/virtual-tree/index.js +40 -35
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +1 -0
|
@@ -1,46 +1,57 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/upload/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { t as
|
|
4
|
-
import { getVar as
|
|
5
|
-
import { useAttrs as
|
|
6
|
-
import { UploadDragger as
|
|
2
|
+
import { withInstall as W } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { t as g, setI18nRule as G } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { getVar as _, setThemeRule as K } from "@das-fed/web/packages/theme/index";
|
|
5
|
+
import { useAttrs as P, computed as $, defineComponent as q, openBlock as u, createElementBlock as v, Fragment as H, createVNode as h, unref as o, mergeProps as x, isRef as B, withCtx as p, renderSlot as A, createElementVNode as m, withDirectives as w, createTextVNode as C, toDisplayString as s, createCommentVNode as k, createBlock as D, vShow as M } from "vue";
|
|
6
|
+
import { UploadDragger as J, Upload as Q } from "ant-design-vue";
|
|
7
7
|
import "ant-design-vue/es/upload/style/css";
|
|
8
|
-
import { DasButton as
|
|
9
|
-
import { vDasTooltip as
|
|
10
|
-
import { DasIconLink as
|
|
11
|
-
import { DasIconAddto as
|
|
12
|
-
import { DasAutoRegisterIcon as
|
|
13
|
-
import {
|
|
8
|
+
import { DasButton as E } from "@das-fed/ui/packages/components/button/index";
|
|
9
|
+
import { vDasTooltip as T } from "@das-fed/ui/packages/components/text-tooltip/index";
|
|
10
|
+
import { DasIconLink as R } from "@das-fed/ui/packages/icons/link/index";
|
|
11
|
+
import { DasIconAddto as X } from "@das-fed/ui/packages/icons/addto/index";
|
|
12
|
+
import { DasAutoRegisterIcon as Y } from "@das-fed/ui/packages/components/icon/index";
|
|
13
|
+
import { DasMessage as ee } from "@das-fed/ui/packages/components/message/index";
|
|
14
|
+
import { useModelValue as F } from "@das-fed/utils/vue";
|
|
14
15
|
import "@das-fed/ui/packages/global/theme";
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
for (;
|
|
19
|
-
|
|
20
|
-
return
|
|
21
|
-
},
|
|
22
|
-
const
|
|
16
|
+
const oe = (t) => {
|
|
17
|
+
const a = ["B", "KB", "M", "G"];
|
|
18
|
+
let c = 0;
|
|
19
|
+
for (; t > 1024; )
|
|
20
|
+
c++, t /= 1024;
|
|
21
|
+
return t = Number(Number(t).toFixed(1)), `${t}${a[c]}`;
|
|
22
|
+
}, te = (t, d) => {
|
|
23
|
+
const a = F(t, "modelValue"), c = F(t, "error"), i = F(t, "errorMessage"), z = F(t, "errorFileName"), b = P(), y = $(() => !b.multiple && t.maxCount === 1), N = $(() => y.value && a.value.length ? "none" : "block");
|
|
23
24
|
return {
|
|
24
|
-
fileList:
|
|
25
|
-
error:
|
|
25
|
+
fileList: a,
|
|
26
|
+
error: c,
|
|
26
27
|
errorMessage: i,
|
|
27
|
-
errorFileName:
|
|
28
|
-
uploadDiaplay:
|
|
29
|
-
beforeupload: (
|
|
28
|
+
errorFileName: z,
|
|
29
|
+
uploadDiaplay: N,
|
|
30
|
+
beforeupload: (e) => {
|
|
31
|
+
if (t.accept) {
|
|
32
|
+
const r = t.accept.split(",").filter((n) => n.trim().startsWith(".")).map((n) => n.trim()), l = t.accept.split(",").filter((n) => !n.trim().startsWith(".")).map((n) => n.trim()), f = e.name.match(/\.(.+)$/), U = r.includes(f[0]);
|
|
33
|
+
let L = l.includes("image/*") && e.type.split("/")[0].trim() === "image", O = l.includes("video/*") && e.type.split("/")[0].trim() === "video", j = l.includes("audio/*") && e.type.split("/")[0].trim() === "audio", Z = l.includes(e.type) || L || O || j;
|
|
34
|
+
if (!U && !Z) {
|
|
35
|
+
const n = t.errorMessage || g("das-ui-upload-accpet", t.accept.toUpperCase().replaceAll(".", "").replaceAll(",", "、"));
|
|
36
|
+
return ee.warning(n), !1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return e.sizeText = oe(e.size), b.multiple ? (a.value = a.value.map((r) => r.originFileObj ? r.originFileObj : r), t.maxCount > a.value.length && a.value.push(e)) : a.value = [e], d("update:modelValue", a.value), d("file-upload", e), !1;
|
|
40
|
+
},
|
|
30
41
|
errorFiledownload: () => {
|
|
31
42
|
d("errorFile-download");
|
|
32
43
|
},
|
|
33
|
-
removeFileEvent: (
|
|
34
|
-
|
|
44
|
+
removeFileEvent: (e, r) => {
|
|
45
|
+
a.value = a.value.filter((l) => l.uid != r.uid), a.value.length > 0 && (a.value = a.value.map((l) => l.originFileObj ? l.originFileObj : l)), d("update:modelValue", a.value), e.remove();
|
|
35
46
|
}
|
|
36
47
|
};
|
|
37
|
-
},
|
|
48
|
+
}, ae = { class: "das-ui-upload" }, le = { class: "das-ui-upload-dragger-context" }, re = { class: "text" }, ie = { class: "file-list" }, se = { class: "filename" }, de = {
|
|
38
49
|
key: 0,
|
|
39
50
|
class: "file-size"
|
|
40
|
-
},
|
|
51
|
+
}, ne = { class: "error-container" }, ue = { class: "file-list" }, ce = { class: "filename error-file-name" }, pe = {
|
|
41
52
|
key: 0,
|
|
42
53
|
class: "file-size"
|
|
43
|
-
},
|
|
54
|
+
}, me = { class: "error-message" }, fe = /* @__PURE__ */ q({
|
|
44
55
|
__name: "Index",
|
|
45
56
|
props: {
|
|
46
57
|
draggle: { type: Boolean, default: !0 },
|
|
@@ -48,6 +59,7 @@ const H = (r) => {
|
|
|
48
59
|
maxCount: { default: 1 },
|
|
49
60
|
width: { default: "100%" },
|
|
50
61
|
error: { type: Boolean, default: !1 },
|
|
62
|
+
accept: { default: "" },
|
|
51
63
|
errorMessage: {},
|
|
52
64
|
errorFileSize: {},
|
|
53
65
|
errorFileName: {},
|
|
@@ -56,70 +68,71 @@ const H = (r) => {
|
|
|
56
68
|
btnName: { default: "" }
|
|
57
69
|
},
|
|
58
70
|
emits: ["file-upload", "errorFile-download", "update:modelValue"],
|
|
59
|
-
setup(
|
|
60
|
-
|
|
71
|
+
setup(t, { emit: d }) {
|
|
72
|
+
Y({
|
|
61
73
|
shangchuan: import("@das-fed/ui/packages/icons/shangchuan")
|
|
62
74
|
});
|
|
63
|
-
const
|
|
75
|
+
const a = t, c = d, {
|
|
64
76
|
fileList: i,
|
|
65
|
-
error:
|
|
66
|
-
errorMessage:
|
|
67
|
-
errorFileName:
|
|
68
|
-
uploadDiaplay:
|
|
69
|
-
beforeupload:
|
|
70
|
-
errorFiledownload:
|
|
77
|
+
error: z,
|
|
78
|
+
errorMessage: b,
|
|
79
|
+
errorFileName: y,
|
|
80
|
+
uploadDiaplay: N,
|
|
81
|
+
beforeupload: V,
|
|
82
|
+
errorFiledownload: S,
|
|
71
83
|
removeFileEvent: I
|
|
72
|
-
} =
|
|
73
|
-
return (
|
|
74
|
-
|
|
75
|
-
|
|
84
|
+
} = te(a, c);
|
|
85
|
+
return (e, r) => (u(), v("div", ae, [
|
|
86
|
+
e.draggle ? (u(), v(
|
|
87
|
+
H,
|
|
76
88
|
{ key: 0 },
|
|
77
89
|
[
|
|
78
|
-
|
|
90
|
+
h(o(J), x({
|
|
79
91
|
class: "das-ui-upload-dragger",
|
|
80
|
-
fileList:
|
|
81
|
-
"onUpdate:fileList":
|
|
82
|
-
"max-count":
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
92
|
+
fileList: o(i),
|
|
93
|
+
"onUpdate:fileList": r[0] || (r[0] = (l) => B(i) ? i.value = l : null),
|
|
94
|
+
"max-count": e.maxCount,
|
|
95
|
+
accept: e.accept,
|
|
96
|
+
style: { width: e.width, display: o(N) },
|
|
97
|
+
"before-upload": o(V),
|
|
98
|
+
disabled: e.isView
|
|
99
|
+
}, e.$attrs), {
|
|
100
|
+
itemRender: p(({ file: l, actions: f }) => [
|
|
101
|
+
A(e.$slots, "itemRender", {
|
|
102
|
+
file: l,
|
|
103
|
+
actions: f
|
|
91
104
|
}, () => [
|
|
92
|
-
m("div",
|
|
93
|
-
|
|
94
|
-
iconColor:
|
|
105
|
+
m("div", ie, [
|
|
106
|
+
h(o(R), {
|
|
107
|
+
iconColor: o(_)("--das-ui-color-secondary"),
|
|
95
108
|
size: "medium"
|
|
96
109
|
}, null, 8, ["iconColor"]),
|
|
97
|
-
w((
|
|
98
|
-
|
|
99
|
-
s(
|
|
110
|
+
w((u(), v("div", se, [
|
|
111
|
+
C(
|
|
112
|
+
s(l.name),
|
|
100
113
|
1
|
|
101
114
|
/* TEXT */
|
|
102
115
|
)
|
|
103
116
|
])), [
|
|
104
|
-
[
|
|
117
|
+
[o(T)]
|
|
105
118
|
]),
|
|
106
|
-
|
|
119
|
+
e.showSize ? (u(), v(
|
|
107
120
|
"div",
|
|
108
|
-
|
|
109
|
-
"(" + s(
|
|
121
|
+
de,
|
|
122
|
+
"(" + s(l.sizeText) + ")",
|
|
110
123
|
1
|
|
111
124
|
/* TEXT */
|
|
112
125
|
)) : k("v-if", !0),
|
|
113
|
-
|
|
126
|
+
e.isView ? k("v-if", !0) : (u(), D(o(E), {
|
|
114
127
|
key: 1,
|
|
115
128
|
"btn-type": "primary-text",
|
|
116
129
|
size: "large",
|
|
117
|
-
onClick: (
|
|
130
|
+
onClick: (U) => o(I)(f, l),
|
|
118
131
|
block: ""
|
|
119
132
|
}, {
|
|
120
133
|
default: p(() => [
|
|
121
|
-
|
|
122
|
-
s(
|
|
134
|
+
C(
|
|
135
|
+
s(o(g)("das-upload-delete")),
|
|
123
136
|
1
|
|
124
137
|
/* TEXT */
|
|
125
138
|
)
|
|
@@ -131,14 +144,14 @@ const H = (r) => {
|
|
|
131
144
|
], !0)
|
|
132
145
|
]),
|
|
133
146
|
default: p(() => [
|
|
134
|
-
m("div",
|
|
135
|
-
|
|
136
|
-
iconColor:
|
|
147
|
+
m("div", le, [
|
|
148
|
+
h(o(X), {
|
|
149
|
+
iconColor: o(_)("--das-ui-color-secondary")
|
|
137
150
|
}, null, 8, ["iconColor"]),
|
|
138
151
|
m(
|
|
139
152
|
"div",
|
|
140
|
-
|
|
141
|
-
s(
|
|
153
|
+
re,
|
|
154
|
+
s(o(g)("das-upload-text")),
|
|
142
155
|
1
|
|
143
156
|
/* TEXT */
|
|
144
157
|
)
|
|
@@ -146,44 +159,44 @@ const H = (r) => {
|
|
|
146
159
|
]),
|
|
147
160
|
_: 3
|
|
148
161
|
/* FORWARDED */
|
|
149
|
-
}, 16, ["fileList", "max-count", "style", "before-upload", "disabled"]),
|
|
162
|
+
}, 16, ["fileList", "max-count", "accept", "style", "before-upload", "disabled"]),
|
|
150
163
|
w(m(
|
|
151
164
|
"div",
|
|
152
|
-
|
|
165
|
+
ne,
|
|
153
166
|
[
|
|
154
167
|
w(m(
|
|
155
168
|
"div",
|
|
156
|
-
|
|
169
|
+
ue,
|
|
157
170
|
[
|
|
158
|
-
|
|
159
|
-
iconColor:
|
|
171
|
+
h(o(R), {
|
|
172
|
+
iconColor: o(_)("--das-ui-color-secondary"),
|
|
160
173
|
size: "medium"
|
|
161
174
|
}, null, 8, ["iconColor"]),
|
|
162
|
-
w((
|
|
163
|
-
|
|
164
|
-
s(
|
|
175
|
+
w((u(), v("div", ce, [
|
|
176
|
+
C(
|
|
177
|
+
s(o(y)),
|
|
165
178
|
1
|
|
166
179
|
/* TEXT */
|
|
167
180
|
)
|
|
168
181
|
])), [
|
|
169
|
-
[
|
|
182
|
+
[o(T)]
|
|
170
183
|
]),
|
|
171
|
-
|
|
184
|
+
e.showSize ? (u(), v(
|
|
172
185
|
"div",
|
|
173
|
-
|
|
174
|
-
"(" + s(
|
|
186
|
+
pe,
|
|
187
|
+
"(" + s(e.errorFileSize) + ")",
|
|
175
188
|
1
|
|
176
189
|
/* TEXT */
|
|
177
190
|
)) : k("v-if", !0),
|
|
178
|
-
|
|
191
|
+
h(o(E), {
|
|
179
192
|
"btn-type": "primary-text",
|
|
180
193
|
block: "",
|
|
181
194
|
size: "large",
|
|
182
|
-
onClick:
|
|
195
|
+
onClick: o(S)
|
|
183
196
|
}, {
|
|
184
197
|
default: p(() => [
|
|
185
|
-
|
|
186
|
-
s(
|
|
198
|
+
C(
|
|
199
|
+
s(o(g)("das-upload-download")),
|
|
187
200
|
1
|
|
188
201
|
/* TEXT */
|
|
189
202
|
)
|
|
@@ -195,12 +208,12 @@ const H = (r) => {
|
|
|
195
208
|
512
|
|
196
209
|
/* NEED_PATCH */
|
|
197
210
|
), [
|
|
198
|
-
[
|
|
211
|
+
[M, o(y)]
|
|
199
212
|
]),
|
|
200
213
|
m(
|
|
201
214
|
"div",
|
|
202
|
-
|
|
203
|
-
s(
|
|
215
|
+
me,
|
|
216
|
+
s(o(g)("das-upload-tips")) + s(o(b)),
|
|
204
217
|
1
|
|
205
218
|
/* TEXT */
|
|
206
219
|
)
|
|
@@ -208,25 +221,26 @@ const H = (r) => {
|
|
|
208
221
|
512
|
|
209
222
|
/* NEED_PATCH */
|
|
210
223
|
), [
|
|
211
|
-
[
|
|
224
|
+
[M, o(z)]
|
|
212
225
|
])
|
|
213
226
|
],
|
|
214
227
|
64
|
|
215
228
|
/* STABLE_FRAGMENT */
|
|
216
|
-
)) : (
|
|
229
|
+
)) : (u(), D(o(Q), x({
|
|
217
230
|
key: 1,
|
|
218
|
-
"file-list":
|
|
219
|
-
"onUpdate:fileList":
|
|
220
|
-
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
231
|
+
"file-list": o(i),
|
|
232
|
+
"onUpdate:fileList": r[1] || (r[1] = (l) => B(i) ? i.value = l : null),
|
|
233
|
+
accept: e.accept,
|
|
234
|
+
"before-upload": o(V),
|
|
235
|
+
"max-count": e.maxCount,
|
|
236
|
+
disabled: e.isView
|
|
237
|
+
}, e.$attrs), {
|
|
238
|
+
itemRender: p(({ file: l, actions: f }) => [
|
|
239
|
+
A(e.$slots, "itemRender", {
|
|
240
|
+
file: l,
|
|
241
|
+
actions: f
|
|
228
242
|
}, () => [
|
|
229
|
-
|
|
243
|
+
r[2] || (r[2] = m(
|
|
230
244
|
"div",
|
|
231
245
|
null,
|
|
232
246
|
null,
|
|
@@ -236,15 +250,15 @@ const H = (r) => {
|
|
|
236
250
|
], !0)
|
|
237
251
|
]),
|
|
238
252
|
default: p(() => [
|
|
239
|
-
|
|
240
|
-
|
|
253
|
+
A(e.$slots, "customUpload", {}, () => [
|
|
254
|
+
e.isView ? k("v-if", !0) : (u(), D(o(E), {
|
|
241
255
|
key: 0,
|
|
242
256
|
icon: "shangchuan",
|
|
243
257
|
block: ""
|
|
244
258
|
}, {
|
|
245
259
|
default: p(() => [
|
|
246
|
-
|
|
247
|
-
s(
|
|
260
|
+
C(
|
|
261
|
+
s(e.btnName || o(g)("das-upload-btn-text")),
|
|
248
262
|
1
|
|
249
263
|
/* TEXT */
|
|
250
264
|
)
|
|
@@ -256,29 +270,34 @@ const H = (r) => {
|
|
|
256
270
|
]),
|
|
257
271
|
_: 3
|
|
258
272
|
/* FORWARDED */
|
|
259
|
-
}, 16, ["file-list", "before-upload", "max-count", "disabled"]))
|
|
273
|
+
}, 16, ["file-list", "accept", "before-upload", "max-count", "disabled"]))
|
|
260
274
|
]));
|
|
261
275
|
}
|
|
262
|
-
}),
|
|
263
|
-
const
|
|
264
|
-
for (const [
|
|
265
|
-
|
|
266
|
-
return
|
|
267
|
-
},
|
|
276
|
+
}), ve = (t, d) => {
|
|
277
|
+
const a = t.__vccOpts || t;
|
|
278
|
+
for (const [c, i] of d)
|
|
279
|
+
a[c] = i;
|
|
280
|
+
return a;
|
|
281
|
+
}, ge = /* @__PURE__ */ ve(fe, [["__scopeId", "data-v-11f92fa2"]]), he = {
|
|
268
282
|
"das-upload-text": { "zh-CN": "点击或拖拽上传", en: "Click or drag to upload", _appCode: "framework" },
|
|
269
283
|
"das-upload-btn-text": { "zh-CN": "上传文件", en: "Upload File", _appCode: "framework" },
|
|
270
284
|
"das-upload-download": { "zh-CN": "下载", en: "Download", _appCode: "framework" },
|
|
271
285
|
"das-upload-delete": { "zh-CN": "删除", en: "Delete", _appCode: "framework" },
|
|
272
|
-
"das-upload-tips": { "zh-CN": "提示: ", en: "Tip: ", _appCode: "framework" }
|
|
273
|
-
|
|
286
|
+
"das-upload-tips": { "zh-CN": "提示: ", en: "Tip: ", _appCode: "framework" },
|
|
287
|
+
"das-ui-upload-accpet": {
|
|
288
|
+
"zh-CN": "上传的文件格式只能是$0",
|
|
289
|
+
en: "The uploaded file format can only be $0",
|
|
290
|
+
_appCode: "framework"
|
|
291
|
+
}
|
|
292
|
+
}, Ce = {
|
|
274
293
|
"--das-ui-upload-bgcolor": { light: "#FAFAFA" },
|
|
275
294
|
"--das-ui-upload-border-color": { light: "#E5E5E5" },
|
|
276
|
-
"--das-ui-upload-bgcolor-hover":
|
|
295
|
+
"--das-ui-upload-bgcolor-hover": _("--das-ui-color-primary-level1"),
|
|
277
296
|
"--das-ui-upload-border-color-hover": { light: "#5582F3" }
|
|
278
|
-
},
|
|
279
|
-
|
|
280
|
-
|
|
297
|
+
}, Ue = W(ge);
|
|
298
|
+
G(he);
|
|
299
|
+
K(Ce);
|
|
281
300
|
export {
|
|
282
|
-
|
|
283
|
-
|
|
301
|
+
Ue as DasUpload,
|
|
302
|
+
Ue as default
|
|
284
303
|
};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.das-ui-upload[data-v-
|
|
1
|
+
.das-ui-upload[data-v-11f92fa2] .das-ui-upload-dragger.ant-upload-drag{height:80px;background:var(--das-ui-upload-bgcolor);border-color:var(--das-ui-upload-border-color)}.das-ui-upload[data-v-11f92fa2] .das-ui-upload-dragger.ant-upload-drag:hover{background:var(--das-ui-upload-bgcolor-hover);border-color:var(--das-ui-upload-border-color-hover)}.das-ui-upload[data-v-11f92fa2] .das-ui-upload-dragger.ant-upload-drag .das-ui-upload-dragger-context{display:flex;flex-direction:column;align-items:center}.das-ui-upload[data-v-11f92fa2] .das-ui-upload-dragger.ant-upload-drag .das-ui-upload-dragger-context .text{font-size:14px;color:var(--das-ui-color-help);letter-spacing:0;text-align:center;line-height:21px;font-weight:400;margin-top:4px}.das-ui-upload .file-list[data-v-11f92fa2]{display:flex;align-items:center;padding-left:20px;height:44px}.das-ui-upload .file-list .filename[data-v-11f92fa2]{margin-left:4px;margin-right:8px;letter-spacing:0;line-height:21px;font-weight:400;font-size:14px;color:var(--das-ui-color-normal)}.das-ui-upload .file-list .filename.error-file-name[data-v-11f92fa2]{color:var(--das-ui-color-help)}.das-ui-upload .file-list .file-size[data-v-11f92fa2]{color:var(--das-ui-color-help);font-size:14px;letter-spacing:0;line-height:21px;font-weight:400;margin-right:20px;white-space:nowrap}.das-ui-upload .error-container .error-file[data-v-11f92fa2]{display:flex;align-items:center;height:21px}.das-ui-upload .error-container .error-message[data-v-11f92fa2]{padding-left:20px;margin-top:2px;color:var(--das-ui-color-danger)}
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/virtual-tree/style.css';
|
|
2
|
-
import { defineComponent as
|
|
2
|
+
import { defineComponent as I, openBlock as r, createBlock as k, unref as h, ref as i, computed as c, watch as g, onMounted as O, onBeforeUnmount as F, createElementBlock as v, normalizeStyle as M, mergeProps as V, withCtx as x, renderSlot as T, createElementVNode as D, toDisplayString as $, Fragment as b, createCommentVNode as B, createSlots as H, createVNode as L, nextTick as J } from "vue";
|
|
3
3
|
import { withInstall as P } from "@das-fed/utils/with-install/index";
|
|
4
4
|
import { ElTreeV2 as W } from "element-plus";
|
|
5
5
|
import "element-plus/es/components/tree-v2/style/css";
|
|
@@ -8,11 +8,11 @@ import { DasTreeEmpty as q } from "@das-fed/ui/packages/components/tree/index";
|
|
|
8
8
|
import { DasSpin as G } from "@das-fed/ui/packages/components/spin/index";
|
|
9
9
|
import { DasIconCaretRight as Q } from "@das-fed/ui/packages/icons/caret-right/index";
|
|
10
10
|
import { SizeWatcher as X } from "@das-fed/utils/size-watcher";
|
|
11
|
-
import { flatTree as
|
|
12
|
-
const Y = /* @__PURE__ */
|
|
11
|
+
import { flatTree as _ } from "@das-fed/utils/common-tools";
|
|
12
|
+
const Y = /* @__PURE__ */ I({
|
|
13
13
|
__name: "expand-icon",
|
|
14
14
|
setup(s) {
|
|
15
|
-
return (f, o) => (r(),
|
|
15
|
+
return (f, o) => (r(), k(h(Q), {
|
|
16
16
|
class: "das-tree__expand-icon",
|
|
17
17
|
size: "medium"
|
|
18
18
|
}));
|
|
@@ -25,7 +25,7 @@ const Y = /* @__PURE__ */ B({
|
|
|
25
25
|
}, ee = /* @__PURE__ */ Z(Y, [["__scopeId", "data-v-d51f7d20"]]), te = { class: "tree-normal-node" }, ae = {
|
|
26
26
|
name: "DasVirtualTree",
|
|
27
27
|
inheritAttrs: !1
|
|
28
|
-
}, ne = /* @__PURE__ */
|
|
28
|
+
}, ne = /* @__PURE__ */ I({
|
|
29
29
|
...ae,
|
|
30
30
|
props: {
|
|
31
31
|
data: { default: () => [] },
|
|
@@ -34,33 +34,38 @@ const Y = /* @__PURE__ */ B({
|
|
|
34
34
|
showCheckbox: { type: Boolean },
|
|
35
35
|
height: {},
|
|
36
36
|
currentNodeKey: {},
|
|
37
|
-
defaultExpandAll: { type: Boolean },
|
|
37
|
+
defaultExpandAll: { type: Boolean, default: !1 },
|
|
38
38
|
expandOnClickNode: { type: Boolean, default: !1 },
|
|
39
39
|
props: {},
|
|
40
40
|
emptyText: { default: "" },
|
|
41
41
|
filterMethod: {}
|
|
42
42
|
},
|
|
43
43
|
setup(s, { expose: f }) {
|
|
44
|
-
const o = i(), d = i(), p = i(0), t = s,
|
|
44
|
+
const o = i(), d = i(), p = i(0), t = s, C = c(() => t.emptyText || U("暂无数据")), l = c(() => ({ value: t.nodeKey, label: "name", children: "children", disabled: "disabled", ...t.props })), S = c(() => t != null && t.height ? t.height + "px" : "100%"), w = c(() => t != null && t.height ? t.height : p.value), z = (e, n) => n[l.value.label].toLowerCase().includes(e.toLowerCase()), K = c(() => (t == null ? void 0 : t.filterMethod) ?? z), N = () => {
|
|
45
45
|
if (t.data && t.data.length) {
|
|
46
|
-
const n =
|
|
46
|
+
const n = _(t.data, l.value.children, !1).filter((a) => a[l.value.children] && a[l.value.children].length).map((a) => a[t.nodeKey]);
|
|
47
47
|
J(() => {
|
|
48
48
|
var a;
|
|
49
49
|
(a = d.value) == null || a.setExpandedKeys(n);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
|
|
53
|
+
g(
|
|
54
|
+
() => t.defaultExpandAll,
|
|
55
|
+
(e) => {
|
|
56
|
+
e && N();
|
|
57
|
+
},
|
|
58
|
+
{ immediate: !0 }
|
|
59
|
+
), g(
|
|
54
60
|
() => t.data,
|
|
55
61
|
(e, n) => {
|
|
56
62
|
if (!t.defaultExpandAll) return;
|
|
57
|
-
const a = e && e.length ? e : [], u = n && n.length ? n : [], R =
|
|
58
|
-
u.length && JSON.stringify(R) === JSON.stringify(
|
|
59
|
-
}
|
|
60
|
-
{ immediate: !0 }
|
|
63
|
+
const a = e && e.length ? e : [], u = n && n.length ? n : [], R = _(a).map((y) => y[t.nodeKey]), A = _(u).map((y) => y[t.nodeKey]);
|
|
64
|
+
u.length && JSON.stringify(R) === JSON.stringify(A) || N();
|
|
65
|
+
}
|
|
61
66
|
);
|
|
62
67
|
const m = i(!1);
|
|
63
|
-
|
|
68
|
+
g(
|
|
64
69
|
() => t.data,
|
|
65
70
|
(e) => {
|
|
66
71
|
if (e && e.length) {
|
|
@@ -73,28 +78,28 @@ const Y = /* @__PURE__ */ B({
|
|
|
73
78
|
},
|
|
74
79
|
{ immediate: !0, deep: !0 }
|
|
75
80
|
);
|
|
76
|
-
const
|
|
77
|
-
return
|
|
78
|
-
|
|
81
|
+
const E = i();
|
|
82
|
+
return O(() => {
|
|
83
|
+
E.value = X(
|
|
79
84
|
(e) => {
|
|
80
85
|
p.value = e.height;
|
|
81
86
|
},
|
|
82
87
|
o.value.parentElement
|
|
83
88
|
);
|
|
84
89
|
}), F(() => {
|
|
85
|
-
|
|
90
|
+
E.value.disconnect();
|
|
86
91
|
}), f({
|
|
87
92
|
treeRef: d
|
|
88
|
-
}), (e, n) => (r(),
|
|
93
|
+
}), (e, n) => (r(), v(
|
|
89
94
|
"div",
|
|
90
95
|
{
|
|
91
96
|
ref_key: "cotainerRef",
|
|
92
97
|
ref: o,
|
|
93
98
|
class: "das-ui-tree das-ui-virtual-tree",
|
|
94
|
-
style: M({ height:
|
|
99
|
+
style: M({ height: S.value })
|
|
95
100
|
},
|
|
96
101
|
[
|
|
97
|
-
e.data && e.data.length ? (r(),
|
|
102
|
+
e.data && e.data.length ? (r(), k(h(W), V({
|
|
98
103
|
key: 0,
|
|
99
104
|
ref_key: "treeRef",
|
|
100
105
|
ref: d,
|
|
@@ -104,13 +109,13 @@ const Y = /* @__PURE__ */ B({
|
|
|
104
109
|
props: l.value,
|
|
105
110
|
"show-checkbox": !1,
|
|
106
111
|
"expand-on-click-node": e.expandOnClickNode,
|
|
107
|
-
height:
|
|
112
|
+
height: w.value,
|
|
108
113
|
"item-size": 32,
|
|
109
114
|
"default-expand-all": "",
|
|
110
|
-
"filter-method":
|
|
111
|
-
"empty-text":
|
|
115
|
+
"filter-method": K.value,
|
|
116
|
+
"empty-text": C.value
|
|
112
117
|
}, e.$attrs), {
|
|
113
|
-
default:
|
|
118
|
+
default: x(({ node: a, data: u }) => [
|
|
114
119
|
T(e.$slots, "default", {
|
|
115
120
|
node: a,
|
|
116
121
|
data: u
|
|
@@ -126,21 +131,21 @@ const Y = /* @__PURE__ */ B({
|
|
|
126
131
|
]),
|
|
127
132
|
_: 3
|
|
128
133
|
/* FORWARDED */
|
|
129
|
-
}, 16, ["data", "class", "props", "expand-on-click-node", "height", "filter-method", "empty-text"])) : (r(),
|
|
130
|
-
|
|
134
|
+
}, 16, ["data", "class", "props", "expand-on-click-node", "height", "filter-method", "empty-text"])) : (r(), v(
|
|
135
|
+
b,
|
|
131
136
|
{ key: 1 },
|
|
132
137
|
[
|
|
133
|
-
|
|
134
|
-
e.loading ? (r(),
|
|
135
|
-
|
|
138
|
+
B(" 空状态 "),
|
|
139
|
+
e.loading ? (r(), v(
|
|
140
|
+
b,
|
|
136
141
|
{ key: 1 },
|
|
137
142
|
[
|
|
138
|
-
|
|
143
|
+
B(" 加载状态 "),
|
|
139
144
|
L(h(G), {
|
|
140
145
|
size: "small",
|
|
141
146
|
spinning: e.loading
|
|
142
147
|
}, {
|
|
143
|
-
default:
|
|
148
|
+
default: x(() => n[0] || (n[0] = [
|
|
144
149
|
D(
|
|
145
150
|
"div",
|
|
146
151
|
{ style: { width: "100%", height: "100%" } },
|
|
@@ -155,16 +160,16 @@ const Y = /* @__PURE__ */ B({
|
|
|
155
160
|
],
|
|
156
161
|
2112
|
|
157
162
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
158
|
-
)) : (r(),
|
|
163
|
+
)) : (r(), k(h(q), {
|
|
159
164
|
key: 0,
|
|
160
|
-
"empty-text":
|
|
165
|
+
"empty-text": C.value
|
|
161
166
|
}, H({
|
|
162
167
|
_: 2
|
|
163
168
|
/* DYNAMIC */
|
|
164
169
|
}, [
|
|
165
170
|
e.$slots["empty-text"] ? {
|
|
166
171
|
name: "default",
|
|
167
|
-
fn:
|
|
172
|
+
fn: x(() => [
|
|
168
173
|
T(e.$slots, "empty-text")
|
|
169
174
|
]),
|
|
170
175
|
key: "0"
|
|
Binary file
|
|
@@ -3957,6 +3957,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<Pr
|
|
|
3957
3957
|
nodeKey: string;
|
|
3958
3958
|
expandOnClickNode: boolean;
|
|
3959
3959
|
emptyText: string;
|
|
3960
|
+
defaultExpandAll: boolean;
|
|
3960
3961
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
3961
3962
|
default?(_: {
|
|
3962
3963
|
node: any;
|