@das-fed/ui 6.4.0-dev.54.7 → 6.4.0-dev.54.9
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/change-enterprises/i18n/index.d.ts +3 -3
- package/packages/business-components/change-pwd/i18n/index.d.ts +26 -34
- package/packages/business-components/change-pwd/index.js +66 -65
- package/packages/business-components/change-pwd/index.js.gz +0 -0
- package/packages/business-components/device-panel/i18n/index.d.ts +172 -0
- package/packages/business-components/device-panel/index.js +331 -261
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/export-button/i18n/index.d.ts +16 -20
- package/packages/business-components/export-button/index.js +88 -86
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/i18n/index.d.ts +34 -30
- package/packages/business-components/import-button/index.js +148 -144
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/i18n/index.d.ts +6 -6
- package/packages/business-components/model-table-dialog/index.js +82 -83
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/src/ModelTable.vue.d.ts +17 -49
- package/packages/business-components/model-table-dialog/style.css +1 -1
- package/packages/business-components/model-table-dialog/style.css.gz +0 -0
- package/packages/business-components/process-configuration/i18n/index.d.ts +37 -29
- package/packages/business-components/process-configuration/index.js +103 -92
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/i18n/index.d.ts +109 -69
- package/packages/business-components/process-form/index.js +691 -672
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-log/i18n/index.d.ts +4 -0
- package/packages/business-components/process-log/index.js +29 -28
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-search-form/i18n/index.d.ts +9 -9
- package/packages/business-components/process-search-form/index.js +2 -2
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/i18n/index.d.ts +8 -8
- package/packages/business-components/process-table/index.js +36 -36
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/upload-file/i18n/index.d.ts +2 -2
- package/packages/business-components/upload-file/index.js +45 -42
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/i18n/index.d.ts +28 -0
- package/packages/business-components/urgent-panel/index.js +595 -576
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/i18n/index.d.ts +7 -3
- package/packages/business-components/user-org-dialog/index.js +92 -91
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/i18n/index.d.ts +29 -17
- package/packages/business-components/video-dialog/index.js +116 -113
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/button/index.js +54 -56
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/image-upload/i18n/index.d.ts +9 -21
- package/packages/components/image-upload/index.js +92 -92
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/i18n/index.d.ts +1 -30
- package/packages/components/image-viewer/index.js +213 -219
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/input/i18n/index.d.ts +3 -3
- package/packages/components/input/index.js +1 -1
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input-dialog-select/i18n/index.d.ts +1 -6
- package/packages/components/input-dialog-select/index.js +49 -51
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/live-player/i18n/index.d.ts +3 -7
- package/packages/components/live-player/index.js +7 -5
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/live-player/style.css +1 -1
- package/packages/components/loading/i18n/index.d.ts +1 -1
- package/packages/components/loading/index.js +1 -3
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/map/i18n/index.d.ts +7 -11
- package/packages/components/map/index.js +168 -167
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/i18n/index.d.ts +1 -1
- package/packages/components/menu-aside/index.js +1 -3
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/message/i18n/index.d.ts +1 -1
- package/packages/components/message/index.js +1 -3
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/notification/i18n/index.d.ts +1 -1
- package/packages/components/notification/index.js +1 -3
- package/packages/components/notification/index.js.gz +0 -0
- package/packages/components/pagination/i18n/index.d.ts +8 -8
- package/packages/components/pagination/index.js +124 -124
- 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/popover/i18n/index.d.ts +2 -2
- package/packages/components/preview/i18n/index.d.ts +1 -1
- package/packages/components/preview/index.js +1 -3
- package/packages/components/preview/index.js.gz +0 -0
- package/packages/components/search/index.js +26 -36
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search/style.css +1 -1
- package/packages/components/search/style.css.gz +0 -0
- package/packages/components/{search → search-form}/i18n/index.d.ts +6 -10
- package/packages/components/search-form/index.js +426 -418
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/spin/i18n/index.d.ts +1 -1
- package/packages/components/spin/index.js +1 -3
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/table/i18n/index.d.ts +19 -19
- package/packages/components/table/index.js +7 -7
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/tabs/i18n/index.d.ts +3 -3
- package/packages/components/time-line/index.js +36 -40
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tooltip/i18n/index.d.ts +1 -1
- package/packages/components/tooltip/index.js +1 -3
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tree/i18n/index.d.ts +8 -12
- package/packages/components/tree/index.js +137 -135
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree/src/App.vue.d.ts +9 -27
- package/packages/components/upload/i18n/index.d.ts +5 -5
- package/packages/components/upload/index.js +1 -1
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/virtual-tree/i18n/index.d.ts +1 -1
- package/packages/components/virtual-tree/index.js +1 -3
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/i18n-collection/en.js +0 -537
- package/i18n-collection/zh-CN.js +0 -537
- package/packages/components/button/i18n/index.d.ts +0 -2
- package/packages/components/time-line/i18n/index.d.ts +0 -7
|
Binary file
|
|
@@ -1,36 +1,35 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/button/style.css';
|
|
2
2
|
import { withInstall as oe } from "@das-fed/utils/with-install/index";
|
|
3
|
-
import { defineComponent as le, ref as W, computed as se, watchEffect as ue, openBlock as s, createElementBlock as h, createCommentVNode as p, createBlock as y, unref as l, mergeProps as B, createSlots as K, withCtx as f, renderSlot as w, createElementVNode as U, createVNode as I, Fragment as j, renderList as N, createTextVNode as A, toDisplayString as
|
|
3
|
+
import { defineComponent as le, ref as W, computed as se, watchEffect as ue, openBlock as s, createElementBlock as h, createCommentVNode as p, createBlock as y, unref as l, mergeProps as B, createSlots as K, withCtx as f, renderSlot as w, createElementVNode as U, createVNode as I, Fragment as j, renderList as N, createTextVNode as A, toDisplayString as L, isRef as de } from "vue";
|
|
4
4
|
import { DasAutoRegisterIcon as fe, DasIcon as P } from "@das-fed/ui/packages/components/icon/index";
|
|
5
5
|
import { DropdownButton as be, Menu as H, MenuItem as X, Dropdown as ce, Button as q, RadioGroup as me, RadioButton as pe } from "ant-design-vue";
|
|
6
6
|
import "ant-design-vue/es/button/style/css";
|
|
7
7
|
import "ant-design-vue/es/dropdown/style/css";
|
|
8
8
|
import "ant-design-vue/es/radio/style/css";
|
|
9
|
-
import {
|
|
10
|
-
import { setThemeRule as ge } from "@das-fed/web/packages/theme/index";
|
|
9
|
+
import { setThemeRule as ye } from "@das-fed/web/packages/theme/index";
|
|
11
10
|
var E = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
12
|
-
function
|
|
11
|
+
function ge(t) {
|
|
13
12
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
14
13
|
}
|
|
15
|
-
function
|
|
14
|
+
function ve(t) {
|
|
16
15
|
var a = typeof t;
|
|
17
16
|
return t != null && (a == "object" || a == "function");
|
|
18
17
|
}
|
|
19
|
-
var ee =
|
|
20
|
-
return
|
|
21
|
-
},
|
|
22
|
-
function
|
|
23
|
-
for (var a = t.length; a-- &&
|
|
18
|
+
var ee = ve, ke = typeof E == "object" && E && E.Object === Object && E, Te = ke, he = Te, $e = typeof self == "object" && self && self.Object === Object && self, Ce = he || $e || Function("return this")(), te = Ce, je = te, Se = function() {
|
|
19
|
+
return je.Date.now();
|
|
20
|
+
}, Ie = Se, Oe = /\s/;
|
|
21
|
+
function De(t) {
|
|
22
|
+
for (var a = t.length; a-- && Oe.test(t.charAt(a)); )
|
|
24
23
|
;
|
|
25
24
|
return a;
|
|
26
25
|
}
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
return t && t.slice(0,
|
|
26
|
+
var ze = De, Be = ze, we = /^\s+/;
|
|
27
|
+
function Pe(t) {
|
|
28
|
+
return t && t.slice(0, Be(t) + 1).replace(we, "");
|
|
30
29
|
}
|
|
31
|
-
var
|
|
32
|
-
function
|
|
33
|
-
var a =
|
|
30
|
+
var Ee = Pe, Me = te, Ne = Me.Symbol, ne = Ne, J = ne, ae = Object.prototype, Ae = ae.hasOwnProperty, Le = ae.toString, O = J ? J.toStringTag : void 0;
|
|
31
|
+
function Re(t) {
|
|
32
|
+
var a = Ae.call(t, O), n = t[O];
|
|
34
33
|
try {
|
|
35
34
|
t[O] = void 0;
|
|
36
35
|
var o = !0;
|
|
@@ -39,27 +38,27 @@ function Fe(t) {
|
|
|
39
38
|
var u = Le.call(t);
|
|
40
39
|
return o && (a ? t[O] = n : delete t[O]), u;
|
|
41
40
|
}
|
|
42
|
-
var
|
|
43
|
-
function
|
|
44
|
-
return
|
|
41
|
+
var Fe = Re, Ge = Object.prototype, Ve = Ge.toString;
|
|
42
|
+
function We(t) {
|
|
43
|
+
return Ve.call(t);
|
|
45
44
|
}
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return t == null ? t === void 0 ?
|
|
45
|
+
var Ke = We, Q = ne, Ue = Fe, He = Ke, Xe = "[object Null]", qe = "[object Undefined]", Y = Q ? Q.toStringTag : void 0;
|
|
46
|
+
function Je(t) {
|
|
47
|
+
return t == null ? t === void 0 ? qe : Xe : Y && Y in Object(t) ? Ue(t) : He(t);
|
|
49
48
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
49
|
+
var Qe = Je;
|
|
50
|
+
function Ye(t) {
|
|
52
51
|
return t != null && typeof t == "object";
|
|
53
52
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
56
|
-
return typeof t == "symbol" ||
|
|
53
|
+
var Ze = Ye, _e = Qe, xe = Ze, et = "[object Symbol]";
|
|
54
|
+
function tt(t) {
|
|
55
|
+
return typeof t == "symbol" || xe(t) && _e(t) == et;
|
|
57
56
|
}
|
|
58
|
-
var
|
|
59
|
-
function
|
|
57
|
+
var nt = tt, at = Ee, Z = ee, it = nt, _ = NaN, rt = /^[-+]0x[0-9a-f]+$/i, ot = /^0b[01]+$/i, lt = /^0o[0-7]+$/i, st = parseInt;
|
|
58
|
+
function ut(t) {
|
|
60
59
|
if (typeof t == "number")
|
|
61
60
|
return t;
|
|
62
|
-
if (
|
|
61
|
+
if (it(t))
|
|
63
62
|
return _;
|
|
64
63
|
if (Z(t)) {
|
|
65
64
|
var a = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
@@ -67,16 +66,16 @@ function dt(t) {
|
|
|
67
66
|
}
|
|
68
67
|
if (typeof t != "string")
|
|
69
68
|
return t === 0 ? t : +t;
|
|
70
|
-
t =
|
|
71
|
-
var n =
|
|
72
|
-
return n ||
|
|
69
|
+
t = at(t);
|
|
70
|
+
var n = ot.test(t);
|
|
71
|
+
return n || lt.test(t) ? st(t.slice(2), n ? 2 : 8) : rt.test(t) ? _ : +t;
|
|
73
72
|
}
|
|
74
|
-
var
|
|
75
|
-
function
|
|
73
|
+
var dt = ut, ft = ee, R = Ie, x = dt, bt = "Expected a function", ct = Math.max, mt = Math.min;
|
|
74
|
+
function pt(t, a, n) {
|
|
76
75
|
var o, u, b, c, d, m, k = 0, D = !1, T = !1, $ = !0;
|
|
77
76
|
if (typeof t != "function")
|
|
78
|
-
throw new TypeError(
|
|
79
|
-
a = x(a) || 0,
|
|
77
|
+
throw new TypeError(bt);
|
|
78
|
+
a = x(a) || 0, ft(n) && (D = !!n.leading, T = "maxWait" in n, b = T ? ct(x(n.maxWait) || 0, a) : b, $ = "trailing" in n ? !!n.trailing : $);
|
|
80
79
|
function C(r) {
|
|
81
80
|
var v = o, S = u;
|
|
82
81
|
return o = u = void 0, k = r, c = t.apply(S, v), c;
|
|
@@ -86,14 +85,14 @@ function yt(t, a, n) {
|
|
|
86
85
|
}
|
|
87
86
|
function g(r) {
|
|
88
87
|
var v = r - m, S = r - k, V = a - v;
|
|
89
|
-
return T ?
|
|
88
|
+
return T ? mt(V, b - S) : V;
|
|
90
89
|
}
|
|
91
90
|
function i(r) {
|
|
92
91
|
var v = r - m, S = r - k;
|
|
93
92
|
return m === void 0 || v >= a || v < 0 || T && S >= b;
|
|
94
93
|
}
|
|
95
94
|
function z() {
|
|
96
|
-
var r =
|
|
95
|
+
var r = R();
|
|
97
96
|
if (i(r))
|
|
98
97
|
return G(r);
|
|
99
98
|
d = setTimeout(z, g(r));
|
|
@@ -105,10 +104,10 @@ function yt(t, a, n) {
|
|
|
105
104
|
d !== void 0 && clearTimeout(d), k = 0, o = m = u = d = void 0;
|
|
106
105
|
}
|
|
107
106
|
function re() {
|
|
108
|
-
return d === void 0 ? c : G(
|
|
107
|
+
return d === void 0 ? c : G(R());
|
|
109
108
|
}
|
|
110
109
|
function M() {
|
|
111
|
-
var r =
|
|
110
|
+
var r = R(), v = i(r);
|
|
112
111
|
if (o = arguments, u = this, m = r, v) {
|
|
113
112
|
if (d === void 0)
|
|
114
113
|
return e(m);
|
|
@@ -119,12 +118,12 @@ function yt(t, a, n) {
|
|
|
119
118
|
}
|
|
120
119
|
return M.cancel = ie, M.flush = re, M;
|
|
121
120
|
}
|
|
122
|
-
var
|
|
123
|
-
const F = /* @__PURE__ */
|
|
121
|
+
var yt = pt;
|
|
122
|
+
const F = /* @__PURE__ */ ge(yt), gt = { class: "das-ui-button" }, vt = {
|
|
124
123
|
inheritAttrs: !1
|
|
125
124
|
// 不希望组件的根元素继承特性
|
|
126
|
-
},
|
|
127
|
-
...
|
|
125
|
+
}, kt = /* @__PURE__ */ le({
|
|
126
|
+
...vt,
|
|
128
127
|
__name: "Index",
|
|
129
128
|
props: {
|
|
130
129
|
btnType: {},
|
|
@@ -191,7 +190,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
|
|
|
191
190
|
}, C = (e) => {
|
|
192
191
|
e ? b.value = n.activeIcon ? n.activeIcon : n.icon : b.value = n.icon;
|
|
193
192
|
};
|
|
194
|
-
return (e, g) => (s(), h("div",
|
|
193
|
+
return (e, g) => (s(), h("div", gt, [
|
|
195
194
|
p(" 同类集合按钮 "),
|
|
196
195
|
e.btnType === "default-sameset" || e.btnType === "primary-sameset" ? (s(), y(l(be), B({ key: 0 }, e.$attrs, {
|
|
197
196
|
tabindex: "-1",
|
|
@@ -238,7 +237,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
|
|
|
238
237
|
}, {
|
|
239
238
|
default: f(() => [
|
|
240
239
|
A(
|
|
241
|
-
|
|
240
|
+
L(i[e.defaultMenuProps.label]),
|
|
242
241
|
1
|
|
243
242
|
/* TEXT */
|
|
244
243
|
)
|
|
@@ -303,7 +302,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
|
|
|
303
302
|
default: f(() => [
|
|
304
303
|
w(e.$slots, "menu-item", { item: i }, () => [
|
|
305
304
|
A(
|
|
306
|
-
|
|
305
|
+
L(i[e.defaultMenuProps.label]),
|
|
307
306
|
1
|
|
308
307
|
/* TEXT */
|
|
309
308
|
)
|
|
@@ -348,7 +347,7 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
|
|
|
348
347
|
}, {
|
|
349
348
|
default: f(() => [
|
|
350
349
|
A(
|
|
351
|
-
|
|
350
|
+
L(i[e.defaultMenuProps.label]),
|
|
352
351
|
1
|
|
353
352
|
/* TEXT */
|
|
354
353
|
)
|
|
@@ -418,12 +417,12 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
|
|
|
418
417
|
))
|
|
419
418
|
]));
|
|
420
419
|
}
|
|
421
|
-
}),
|
|
420
|
+
}), Tt = (t, a) => {
|
|
422
421
|
const n = t.__vccOpts || t;
|
|
423
422
|
for (const [o, u] of a)
|
|
424
423
|
n[o] = u;
|
|
425
424
|
return n;
|
|
426
|
-
},
|
|
425
|
+
}, ht = /* @__PURE__ */ Tt(kt, [["__scopeId", "data-v-a28d222f"]]), $t = {
|
|
427
426
|
"--demo-alert-bg": {
|
|
428
427
|
light: "#fff",
|
|
429
428
|
dark: "rgba(255,255,255,.2)"
|
|
@@ -443,10 +442,9 @@ const F = /* @__PURE__ */ ve(gt), vt = { class: "das-ui-button" }, kt = {
|
|
|
443
442
|
"--das-ui-button-set-active": "#3B5AA9",
|
|
444
443
|
"--das-ui-button-set-disabled": "#95A4C8"
|
|
445
444
|
};
|
|
446
|
-
ye(
|
|
447
|
-
|
|
448
|
-
const Mt = oe($t);
|
|
445
|
+
ye($t);
|
|
446
|
+
const wt = oe(ht);
|
|
449
447
|
export {
|
|
450
|
-
|
|
451
|
-
|
|
448
|
+
wt as DasButton,
|
|
449
|
+
wt as default
|
|
452
450
|
};
|
|
Binary file
|
|
@@ -1,38 +1,26 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
'das-ui-import-upload-key1': {
|
|
3
|
+
'zh-CN': string;
|
|
4
4
|
en: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
'das-ui-import-upload-key2': {
|
|
7
|
+
'zh-CN': string;
|
|
8
8
|
en: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
en: string;
|
|
13
|
-
};
|
|
14
|
-
上传的图片格式只能是: {
|
|
15
|
-
"zh-CN": string;
|
|
16
|
-
en: string;
|
|
17
|
-
};
|
|
18
|
-
上传的文件格式只能是: {
|
|
19
|
-
"zh-CN": string;
|
|
20
|
-
en: string;
|
|
21
|
-
};
|
|
22
|
-
格式: {
|
|
23
|
-
"zh-CN": string;
|
|
10
|
+
'das-ui-import-upload-key3': {
|
|
11
|
+
'zh-CN': string;
|
|
24
12
|
en: string;
|
|
25
13
|
};
|
|
26
14
|
'das-image-upload-text': {
|
|
27
|
-
|
|
15
|
+
'zh-CN': string;
|
|
28
16
|
en: string;
|
|
29
17
|
};
|
|
30
18
|
'das-image-upload-reupload': {
|
|
31
|
-
|
|
19
|
+
'zh-CN': string;
|
|
32
20
|
en: string;
|
|
33
21
|
};
|
|
34
22
|
'das-image-upload-fail': {
|
|
35
|
-
|
|
23
|
+
'zh-CN': string;
|
|
36
24
|
en: string;
|
|
37
25
|
};
|
|
38
26
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '@das-fed/ui/packages/components/image-upload/style.css';
|
|
2
|
-
import { withInstall as
|
|
3
|
-
import { i18n as
|
|
4
|
-
import { getVar as
|
|
5
|
-
import { computed as
|
|
2
|
+
import { withInstall as M } from "@das-fed/utils/with-install/index";
|
|
3
|
+
import { i18n as _, t as z, setI18nRule as U } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { getVar as N, setThemeRule as B } from "@das-fed/web/packages/theme/index";
|
|
5
|
+
import { computed as T, defineComponent as D, openBlock as j, createElementBlock as E, createCommentVNode as I, withDirectives as k, createVNode as v, unref as a, normalizeClass as F, withCtx as y, createElementVNode as h, toDisplayString as S, vShow as w, createTextVNode as R } from "vue";
|
|
6
6
|
import { UploadDragger as G, Upload as P } from "ant-design-vue";
|
|
7
7
|
import "ant-design-vue/es/upload/style/css";
|
|
8
8
|
import { DasSpin as J } from "@das-fed/ui/packages/components/spin/index";
|
|
@@ -12,74 +12,74 @@ import { DasIconWarning as O } from "@das-fed/ui/packages/icons/warning/index";
|
|
|
12
12
|
import { DasMessage as V } from "@das-fed/ui/packages/components/message/index";
|
|
13
13
|
import { useModelValue as W } from "@das-fed/utils/vue";
|
|
14
14
|
import "@das-fed/ui/packages/global/theme";
|
|
15
|
-
const q = () => ({ size2B: (
|
|
16
|
-
isNaN(Number(
|
|
17
|
-
const
|
|
15
|
+
const q = () => ({ size2B: (o) => {
|
|
16
|
+
isNaN(Number(o)) ? o = o.toString() : o = o + "M";
|
|
17
|
+
const t = Number(o.slice(0, -1)), p = o[o.length - 1].toUpperCase(), l = 1024, g = {
|
|
18
18
|
M: l * l,
|
|
19
19
|
K: l,
|
|
20
20
|
B: 1
|
|
21
21
|
};
|
|
22
|
-
return { finalSize:
|
|
23
|
-
} }), L = (e,
|
|
24
|
-
const
|
|
22
|
+
return { finalSize: t * g[p], sizeText: o };
|
|
23
|
+
} }), L = (e, o) => {
|
|
24
|
+
const t = W(e, "status"), { size2B: p } = q(), l = [".mp4", ".avi", ".mkv", ".mov", ".wmv", ".flv", ".mpeg", ".webm"], g = [".mp3", ".wav", ".aac", ".flac", ".ogg", ".alff", ".wma", ".m4a"], s = T(() => {
|
|
25
25
|
var r;
|
|
26
26
|
if (e.acceptVideo || e.acceptAudio) {
|
|
27
27
|
let n = e.accept ? (r = e.accept) == null ? void 0 : r.split(",") : [];
|
|
28
28
|
return e.acceptVideo && (n = [...n, ...l]), e.acceptAudio && (n = [...n, ...g]), n.join(",");
|
|
29
29
|
} else
|
|
30
30
|
return e.accept;
|
|
31
|
-
}), C =
|
|
32
|
-
return { isAccept:
|
|
33
|
-
var
|
|
31
|
+
}), C = T(() => t.value === "uploading"), A = T(() => t.value === "error");
|
|
32
|
+
return { isAccept: s, uploadStatus: t, loading: C, errored: A, beforeupload: (r) => {
|
|
33
|
+
var b, $;
|
|
34
34
|
if (e.maxSize) {
|
|
35
|
-
const { finalSize:
|
|
36
|
-
if (r.size >
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
const { finalSize: i, sizeText: u } = p(e.maxSize);
|
|
36
|
+
if (r.size > i) {
|
|
37
|
+
const c = !e.acceptAudio && !e.acceptVideo ? _("das-ui-import-upload-key3", u, "JPG、JPEG、PNG、GIF、SVG").value : _(
|
|
38
|
+
"das-ui-import-upload-key3",
|
|
39
|
+
u,
|
|
40
|
+
(b = s.value) == null ? void 0 : b.toUpperCase().replaceAll(".", "").replaceAll(",", "、")
|
|
41
|
+
).value, m = e.errorMessage || c;
|
|
42
|
+
return V.warning(m), o("update:status", "normal"), t.value = "normal", !1;
|
|
41
43
|
}
|
|
42
44
|
}
|
|
43
|
-
const n = () => (
|
|
45
|
+
const n = () => (t.value = "uploading", o("update:status", "uploading"), o("image-upload", r), !1);
|
|
44
46
|
if (e.customCheck) {
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
return new Promise(async (
|
|
47
|
+
const i = e.customCheck(r);
|
|
48
|
+
if (i instanceof Promise)
|
|
49
|
+
return new Promise(async (u, c) => {
|
|
48
50
|
let m;
|
|
49
51
|
try {
|
|
50
|
-
m = await
|
|
52
|
+
m = await i.then();
|
|
51
53
|
} catch {
|
|
52
54
|
m = !1;
|
|
53
55
|
}
|
|
54
|
-
m ? n() :
|
|
56
|
+
m ? n() : c(!1);
|
|
55
57
|
});
|
|
56
|
-
if (!
|
|
57
|
-
return
|
|
58
|
-
} else if (
|
|
58
|
+
if (!i)
|
|
59
|
+
return o("update:status", "normal"), t.value = "normal", !1;
|
|
60
|
+
} else if (s.value)
|
|
59
61
|
if (!e.acceptAudio && !e.acceptVideo) {
|
|
60
|
-
const
|
|
61
|
-
let
|
|
62
|
-
return
|
|
62
|
+
const i = s.value.split(",").map((u) => {
|
|
63
|
+
let c = u.trim().slice(1);
|
|
64
|
+
return c === "svg" && (c = "svg+xml"), `image/${c}`;
|
|
63
65
|
}) ?? [];
|
|
64
|
-
if (
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
).value;
|
|
68
|
-
return V.warning(c), !1;
|
|
66
|
+
if (i.includes("image/jpg") && !i.includes("image/jpeg") && i.push("image/jpeg"), !i.includes(r.type)) {
|
|
67
|
+
const u = e.errorMessage || _("das-ui-import-upload-key1", s.value.toUpperCase().replaceAll(".", "").replaceAll(",", "、")).value;
|
|
68
|
+
return V.warning(u), !1;
|
|
69
69
|
}
|
|
70
70
|
} else {
|
|
71
|
-
const
|
|
71
|
+
const i = s.value.split(",").map((d) => {
|
|
72
72
|
let f = d.trim().slice(1);
|
|
73
73
|
return f === "svg" && (f = "svg+xml"), `image/${f}`;
|
|
74
|
-
}) ?? [],
|
|
75
|
-
if (![...
|
|
76
|
-
const d = e.errorMessage ||
|
|
74
|
+
}) ?? [], u = l.map((d) => `video/${d.split(".")[1]}`) ?? [], c = g.map((d) => `audio/${d.split(".")[1]}`) ?? [], m = l.map((d) => `audio/${d.split(".")[1]}`) ?? [];
|
|
75
|
+
if (![...i, ...u, ...c, ...m].includes(r.type)) {
|
|
76
|
+
const d = e.errorMessage || _("das-ui-import-upload-key2", ($ = s.value) == null ? void 0 : $.toUpperCase()).value;
|
|
77
77
|
return V.warning(d), !1;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
return n();
|
|
81
81
|
} };
|
|
82
|
-
}, Q = { class: "das-ui-image-upload" }, X = { class: "das-ui-image-upload-dragger-context" }, Y = { class: "text" }, Z = { class: "das-ui-image-upload-error-container" }, ee = { class: "tips-container" }, ae = { class: "text" },
|
|
82
|
+
}, Q = { class: "das-ui-image-upload" }, X = { class: "das-ui-image-upload-dragger-context" }, Y = { class: "text" }, Z = { class: "das-ui-image-upload-error-container" }, ee = { class: "tips-container" }, ae = { class: "text" }, oe = /* @__PURE__ */ D({
|
|
83
83
|
__name: "Index",
|
|
84
84
|
props: {
|
|
85
85
|
maxCount: { default: 1 },
|
|
@@ -94,35 +94,35 @@ const q = () => ({ size2B: (t) => {
|
|
|
94
94
|
autoContentType: { type: Boolean }
|
|
95
95
|
},
|
|
96
96
|
emits: ["update:status", "image-upload"],
|
|
97
|
-
setup(e, { emit:
|
|
98
|
-
const
|
|
99
|
-
return (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
class: F([{ "loading-border": a(
|
|
97
|
+
setup(e, { emit: o }) {
|
|
98
|
+
const t = e, p = o, { isAccept: l, uploadStatus: g, loading: s, errored: C, beforeupload: A } = L(t, p);
|
|
99
|
+
return (x, r) => (j(), E("div", Q, [
|
|
100
|
+
I(" 图片上传组件 "),
|
|
101
|
+
k(v(a(J), {
|
|
102
|
+
class: F([{ "loading-border": a(s) }]),
|
|
103
103
|
type: "component",
|
|
104
|
-
spinning: a(
|
|
104
|
+
spinning: a(s)
|
|
105
105
|
}, {
|
|
106
|
-
default:
|
|
106
|
+
default: y(() => [
|
|
107
107
|
v(a(G), {
|
|
108
108
|
class: "das-ui-image-upload-dragger",
|
|
109
109
|
accept: a(l),
|
|
110
|
-
"max-count":
|
|
111
|
-
"before-upload": a(
|
|
110
|
+
"max-count": x.maxCount,
|
|
111
|
+
"before-upload": a(A)
|
|
112
112
|
}, {
|
|
113
|
-
itemRender:
|
|
114
|
-
default:
|
|
115
|
-
|
|
113
|
+
itemRender: y(({ file: n, actions: b }) => r[0] || (r[0] = [])),
|
|
114
|
+
default: y(() => [
|
|
115
|
+
k(h(
|
|
116
116
|
"div",
|
|
117
117
|
X,
|
|
118
118
|
[
|
|
119
119
|
v(a(K), {
|
|
120
|
-
iconColor: a(
|
|
120
|
+
iconColor: a(N)("--das-ui-color-secondary")
|
|
121
121
|
}, null, 8, ["iconColor"]),
|
|
122
|
-
|
|
122
|
+
h(
|
|
123
123
|
"div",
|
|
124
124
|
Y,
|
|
125
|
-
|
|
125
|
+
S(x.message || a(z)("das-image-upload-text")),
|
|
126
126
|
1
|
|
127
127
|
/* TEXT */
|
|
128
128
|
)
|
|
@@ -130,7 +130,7 @@ const q = () => ({ size2B: (t) => {
|
|
|
130
130
|
512
|
|
131
131
|
/* NEED_PATCH */
|
|
132
132
|
), [
|
|
133
|
-
[
|
|
133
|
+
[w, a(g) === "normal"]
|
|
134
134
|
])
|
|
135
135
|
]),
|
|
136
136
|
_: 1
|
|
@@ -140,40 +140,40 @@ const q = () => ({ size2B: (t) => {
|
|
|
140
140
|
_: 1
|
|
141
141
|
/* STABLE */
|
|
142
142
|
}, 8, ["class", "spinning"]), [
|
|
143
|
-
[
|
|
143
|
+
[w, !a(C)]
|
|
144
144
|
]),
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
I(" 错误状态 "),
|
|
146
|
+
k(h(
|
|
147
147
|
"div",
|
|
148
148
|
Z,
|
|
149
149
|
[
|
|
150
|
-
|
|
150
|
+
h("div", ee, [
|
|
151
151
|
v(a(O), {
|
|
152
|
-
iconColor: a(
|
|
152
|
+
iconColor: a(N)("--das-ui-color-danger"),
|
|
153
153
|
size: "small"
|
|
154
154
|
}, null, 8, ["iconColor"]),
|
|
155
|
-
|
|
155
|
+
h(
|
|
156
156
|
"div",
|
|
157
157
|
ae,
|
|
158
|
-
|
|
158
|
+
S(a(z)("das-image-upload-fail")),
|
|
159
159
|
1
|
|
160
160
|
/* TEXT */
|
|
161
161
|
)
|
|
162
162
|
]),
|
|
163
163
|
v(a(P), {
|
|
164
164
|
accept: a(l),
|
|
165
|
-
"before-upload": a(
|
|
166
|
-
"max-count":
|
|
165
|
+
"before-upload": a(A),
|
|
166
|
+
"max-count": x.maxCount
|
|
167
167
|
}, {
|
|
168
|
-
itemRender:
|
|
169
|
-
default:
|
|
168
|
+
itemRender: y(({ file: n, actions: b }) => r[1] || (r[1] = [])),
|
|
169
|
+
default: y(() => [
|
|
170
170
|
v(a(H), {
|
|
171
171
|
"btn-type": "primary-text",
|
|
172
172
|
block: ""
|
|
173
173
|
}, {
|
|
174
|
-
default:
|
|
174
|
+
default: y(() => [
|
|
175
175
|
R(
|
|
176
|
-
|
|
176
|
+
S(a(z)("das-image-upload-reupload")),
|
|
177
177
|
1
|
|
178
178
|
/* TEXT */
|
|
179
179
|
)
|
|
@@ -189,35 +189,35 @@ const q = () => ({ size2B: (t) => {
|
|
|
189
189
|
512
|
|
190
190
|
/* NEED_PATCH */
|
|
191
191
|
), [
|
|
192
|
-
[
|
|
192
|
+
[w, a(C)]
|
|
193
193
|
])
|
|
194
194
|
]));
|
|
195
195
|
}
|
|
196
|
-
}),
|
|
197
|
-
const
|
|
198
|
-
for (const [p, l] of
|
|
199
|
-
|
|
200
|
-
return
|
|
201
|
-
}, re = /* @__PURE__ */ oe
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
196
|
+
}), te = (e, o) => {
|
|
197
|
+
const t = e.__vccOpts || e;
|
|
198
|
+
for (const [p, l] of o)
|
|
199
|
+
t[p] = l;
|
|
200
|
+
return t;
|
|
201
|
+
}, re = /* @__PURE__ */ te(oe, [["__scopeId", "data-v-5821ad3e"]]), le = {
|
|
202
|
+
"das-ui-import-upload-key1": { "zh-CN": "上传的图片格式只能是$0", en: "The uploaded picture format can only be $0" },
|
|
203
|
+
"das-ui-import-upload-key2": { "zh-CN": "上传的文件格式只能是$0", en: "The uploaded file format can only be $0" },
|
|
204
|
+
"das-ui-import-upload-key3": {
|
|
205
|
+
"zh-CN": "上传的图片大小不能超过$0的$1文件",
|
|
206
|
+
en: "The uploaded file format can only be $0"
|
|
207
|
+
},
|
|
208
208
|
"das-image-upload-text": { "zh-CN": "上传图片", en: "Upload Image" },
|
|
209
209
|
"das-image-upload-reupload": { "zh-CN": "重新上传", en: "Re-upload" },
|
|
210
210
|
"das-image-upload-fail": { "zh-CN": "上传失败", en: "Upload Failed" }
|
|
211
|
-
},
|
|
211
|
+
}, ie = {
|
|
212
212
|
"--das-ui-image-upload-bgcolor": { light: "#FAFAFA" },
|
|
213
213
|
"--das-ui-image-upload-border-color": { light: "#E5E5E5" },
|
|
214
|
-
"--das-ui-image-upload-bgcolor-hover": { light:
|
|
214
|
+
"--das-ui-image-upload-bgcolor-hover": { light: N("--das-ui-color-primary-level1") },
|
|
215
215
|
"--das-ui-image-upload-border-color-hover": { light: "#5582F3" },
|
|
216
|
-
"--das-ui-image-upload-border-color-error": { light:
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
"--das-ui-image-upload-border-color-error": { light: N("--das-ui-color-danger-level2") }
|
|
217
|
+
}, xe = M(re);
|
|
218
|
+
U(le);
|
|
219
|
+
B(ie);
|
|
220
220
|
export {
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
xe as DasImageUpload,
|
|
222
|
+
xe as default
|
|
223
223
|
};
|
|
Binary file
|
|
@@ -1,31 +1,2 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
上传的图片大小不能超过: {
|
|
3
|
-
"zh-CN": string;
|
|
4
|
-
en: string;
|
|
5
|
-
};
|
|
6
|
-
的: {
|
|
7
|
-
"zh-CN": string;
|
|
8
|
-
en: string;
|
|
9
|
-
};
|
|
10
|
-
文件: {
|
|
11
|
-
"zh-CN": string;
|
|
12
|
-
en: string;
|
|
13
|
-
};
|
|
14
|
-
上传的文件大小不能超过: {
|
|
15
|
-
"zh-CN": string;
|
|
16
|
-
en: string;
|
|
17
|
-
};
|
|
18
|
-
上传的图片格式只能是: {
|
|
19
|
-
"zh-CN": string;
|
|
20
|
-
en: string;
|
|
21
|
-
};
|
|
22
|
-
上传的文件格式只能是: {
|
|
23
|
-
"zh-CN": string;
|
|
24
|
-
en: string;
|
|
25
|
-
};
|
|
26
|
-
格式: {
|
|
27
|
-
"zh-CN": string;
|
|
28
|
-
en: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
1
|
+
declare const _default: {};
|
|
31
2
|
export default _default;
|