xyvcard-goods 0.0.3 → 0.0.4
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/{approveFailIndex-C2BhoVKC.mjs → approveFailIndex-F3GtuNeX.mjs} +1 -1
- package/dist/{approveFailIndex.vue_vue_type_script_setup_true_lang-CSBlBFQo.mjs → approveFailIndex.vue_vue_type_script_setup_true_lang-8ykH4NF1.mjs} +1 -1
- package/dist/{auditIndex-BjjiwYrm.mjs → auditIndex-BXUxPTBo.mjs} +1 -1
- package/dist/{auditIndex.vue_vue_type_script_setup_true_lang-UrMEjXo-.mjs → auditIndex.vue_vue_type_script_setup_true_lang-2LQeWrbt.mjs} +9 -9
- package/dist/edit-B_KK1orD.mjs +2976 -0
- package/dist/{el-message-BBB-S2MS.mjs → el-message-D15RmjW3.mjs} +454 -472
- package/dist/index-D5_GsXR7.mjs +142 -0
- package/dist/{index-vE-TE0cx.mjs → index-PA3Mh5x6.mjs} +14 -14
- package/dist/index.mjs +2 -2
- package/dist/{info-Bm6Ifv7W.mjs → info-8-HEtfzY.mjs} +2 -2
- package/dist/{saleIndex-C9AD4DIj.mjs → saleIndex-vZV2Dq0y.mjs} +1 -1
- package/dist/{saleIndex.vue_vue_type_script_setup_true_lang-qDsRE8JX.mjs → saleIndex.vue_vue_type_script_setup_true_lang-BpHE0pi0.mjs} +9 -9
- package/dist/{shelfIndex-CyAp6rf5.mjs → shelfIndex-Ciis-I11.mjs} +1 -1
- package/dist/{shelfIndex.vue_vue_type_script_setup_true_lang-D3xUiFR2.mjs → shelfIndex.vue_vue_type_script_setup_true_lang-GCWPCxCX.mjs} +9 -9
- package/dist/{skuForm-Ctu0Vbym.mjs → skuForm-DaxgHBOV.mjs} +40 -37
- package/dist/{skuTable-BbTTCq2m.mjs → skuTable-C4mHW-e9.mjs} +138 -129
- package/dist/style.css +1 -1
- package/dts/main.d.ts +2 -0
- package/dts/views/goods/goods-spu/approvedIndex.vue.d.ts +2 -0
- package/dts/views/goods/goods-spu/sku-form.vue.d.ts +31 -0
- package/dts/views/goods/goods-spu/sku-table.vue.d.ts +14 -0
- package/package.json +4 -2
- package/dist/edit-B1_IbaHc.mjs +0 -13974
- package/dist/index-CZD7OAWo.mjs +0 -213
|
@@ -0,0 +1,2976 @@
|
|
|
1
|
+
import { computed as w, getCurrentInstance as Xe, watch as K, unref as u, onMounted as de, watchEffect as pn, onBeforeUnmount as xe, isRef as Yn, onScopeDispose as Wn, inject as he, shallowRef as Ue, ref as M, nextTick as D, toRef as Ke, onUnmounted as jn, defineComponent as J, useAttrs as Xn, useSlots as vn, openBlock as S, createElementBlock as F, mergeProps as ze, createCommentVNode as A, Fragment as Ee, normalizeClass as I, renderSlot as X, createElementVNode as V, createBlock as R, withCtx as h, resolveDynamicComponent as te, withModifiers as Re, createVNode as m, toDisplayString as ne, normalizeStyle as pt, provide as mn, Text as Jn, reactive as Ge, h as Zn, markRaw as Pt, toRefs as Qn, resolveComponent as x, Transition as eo, withDirectives as ot, withKeys as Ne, createTextVNode as _e, vShow as at, isVNode as hn, render as gn, mergeModels as to, useModel as no, renderList as oo } from "vue";
|
|
2
|
+
import { fileApi as st, routerUtil as Ht } from "jmash-core";
|
|
3
|
+
import { ElMessage as rt } from "element-plus";
|
|
4
|
+
import { useI18n as bn } from "vue-i18n";
|
|
5
|
+
import { i as ue, g as ao, e as so, a as yn, b as ro, S as Ut, c as Sn, d as Ct, t as En, f as zt, h as io, j as lo, k as me, l as uo, m as Dt, n as co, u as ge, o as qt, p as fo, q as po, r as vo, N as De, s as mo, E as Tt, v as Ae, w as vt, x as Ye, y as Je, z as ho, A as Kt, B as wn, C as we, D as We, F as go, G as Ce, V as bo, H as yo, I as So, J as Eo, K as ie, L as wo, _ as Ve, M as mt, O as Cn, P as Co, Q as ht, R as To, T as Io, U as ko, W as Gt, X as Mo, Y as Yt } from "./el-message-D15RmjW3.mjs";
|
|
6
|
+
import { _ as Ao } from "./skuTable-C4mHW-e9.mjs";
|
|
7
|
+
import { useRouter as Ro, useRoute as _o } from "vue-router";
|
|
8
|
+
import { D as fe, C as Bo } from "./index-D5_GsXR7.mjs";
|
|
9
|
+
import { goodsSpuApi as it } from "./index.mjs";
|
|
10
|
+
import { g as xo } from "./index-BHmGYIuc.mjs";
|
|
11
|
+
import { Editor as Vo } from "xyvcard-cms";
|
|
12
|
+
import No from "./skuForm-DaxgHBOV.mjs";
|
|
13
|
+
const Lo = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', $o = (e) => process.env.NODE_ENV === "test" ? !0 : getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, Wt = (e) => Array.from(e.querySelectorAll(Lo)).filter((t) => Fo(t) && $o(t)), Fo = (e) => {
|
|
14
|
+
if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
|
|
15
|
+
return !0;
|
|
16
|
+
if (e.disabled)
|
|
17
|
+
return !1;
|
|
18
|
+
switch (e.nodeName) {
|
|
19
|
+
case "A":
|
|
20
|
+
return !!e.href && e.rel !== "ignore";
|
|
21
|
+
case "INPUT":
|
|
22
|
+
return !(e.type === "hidden" || e.type === "file");
|
|
23
|
+
case "BUTTON":
|
|
24
|
+
case "SELECT":
|
|
25
|
+
case "TEXTAREA":
|
|
26
|
+
return !0;
|
|
27
|
+
default:
|
|
28
|
+
return !1;
|
|
29
|
+
}
|
|
30
|
+
}, Oo = () => ue && /firefox/i.test(window.navigator.userAgent);
|
|
31
|
+
function Po(e) {
|
|
32
|
+
return e;
|
|
33
|
+
}
|
|
34
|
+
function Ho(e, t, n) {
|
|
35
|
+
switch (n.length) {
|
|
36
|
+
case 0:
|
|
37
|
+
return e.call(t);
|
|
38
|
+
case 1:
|
|
39
|
+
return e.call(t, n[0]);
|
|
40
|
+
case 2:
|
|
41
|
+
return e.call(t, n[0], n[1]);
|
|
42
|
+
case 3:
|
|
43
|
+
return e.call(t, n[0], n[1], n[2]);
|
|
44
|
+
}
|
|
45
|
+
return e.apply(t, n);
|
|
46
|
+
}
|
|
47
|
+
var Uo = 800, zo = 16, Do = Date.now;
|
|
48
|
+
function qo(e) {
|
|
49
|
+
var t = 0, n = 0;
|
|
50
|
+
return function() {
|
|
51
|
+
var o = Do(), s = zo - (o - n);
|
|
52
|
+
if (n = o, s > 0) {
|
|
53
|
+
if (++t >= Uo)
|
|
54
|
+
return arguments[0];
|
|
55
|
+
} else
|
|
56
|
+
t = 0;
|
|
57
|
+
return e.apply(void 0, arguments);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function Ko(e) {
|
|
61
|
+
return function() {
|
|
62
|
+
return e;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
var je = function() {
|
|
66
|
+
try {
|
|
67
|
+
var e = ao(Object, "defineProperty");
|
|
68
|
+
return e({}, "", {}), e;
|
|
69
|
+
} catch {
|
|
70
|
+
}
|
|
71
|
+
}(), Go = je ? function(e, t) {
|
|
72
|
+
return je(e, "toString", {
|
|
73
|
+
configurable: !0,
|
|
74
|
+
enumerable: !1,
|
|
75
|
+
value: Ko(t),
|
|
76
|
+
writable: !0
|
|
77
|
+
});
|
|
78
|
+
} : Po, Yo = qo(Go), Wo = 9007199254740991, jo = /^(?:0|[1-9]\d*)$/;
|
|
79
|
+
function Tn(e, t) {
|
|
80
|
+
var n = typeof e;
|
|
81
|
+
return t = t ?? Wo, !!t && (n == "number" || n != "symbol" && jo.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
82
|
+
}
|
|
83
|
+
function Xo(e, t, n) {
|
|
84
|
+
t == "__proto__" && je ? je(e, t, {
|
|
85
|
+
configurable: !0,
|
|
86
|
+
enumerable: !0,
|
|
87
|
+
value: n,
|
|
88
|
+
writable: !0
|
|
89
|
+
}) : e[t] = n;
|
|
90
|
+
}
|
|
91
|
+
var Jo = Object.prototype, Zo = Jo.hasOwnProperty;
|
|
92
|
+
function Qo(e, t, n) {
|
|
93
|
+
var o = e[t];
|
|
94
|
+
(!(Zo.call(e, t) && so(o, n)) || n === void 0 && !(t in e)) && Xo(e, t, n);
|
|
95
|
+
}
|
|
96
|
+
var jt = Math.max;
|
|
97
|
+
function ea(e, t, n) {
|
|
98
|
+
return t = jt(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
99
|
+
for (var o = arguments, s = -1, a = jt(o.length - t, 0), r = Array(a); ++s < a; )
|
|
100
|
+
r[s] = o[t + s];
|
|
101
|
+
s = -1;
|
|
102
|
+
for (var l = Array(t + 1); ++s < t; )
|
|
103
|
+
l[s] = o[s];
|
|
104
|
+
return l[t] = n(r), Ho(e, this, l);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
var ta = 9007199254740991;
|
|
108
|
+
function na(e) {
|
|
109
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ta;
|
|
110
|
+
}
|
|
111
|
+
var oa = "[object Arguments]";
|
|
112
|
+
function Xt(e) {
|
|
113
|
+
return yn(e) && ro(e) == oa;
|
|
114
|
+
}
|
|
115
|
+
var In = Object.prototype, aa = In.hasOwnProperty, sa = In.propertyIsEnumerable, kn = Xt(/* @__PURE__ */ function() {
|
|
116
|
+
return arguments;
|
|
117
|
+
}()) ? Xt : function(e) {
|
|
118
|
+
return yn(e) && aa.call(e, "callee") && !sa.call(e, "callee");
|
|
119
|
+
};
|
|
120
|
+
function ra(e, t) {
|
|
121
|
+
for (var n = -1, o = t.length, s = e.length; ++n < o; )
|
|
122
|
+
e[s + n] = t[n];
|
|
123
|
+
return e;
|
|
124
|
+
}
|
|
125
|
+
var Jt = Ut ? Ut.isConcatSpreadable : void 0;
|
|
126
|
+
function ia(e) {
|
|
127
|
+
return Sn(e) || kn(e) || !!(Jt && e && e[Jt]);
|
|
128
|
+
}
|
|
129
|
+
function la(e, t, n, o, s) {
|
|
130
|
+
var a = -1, r = e.length;
|
|
131
|
+
for (n || (n = ia), s || (s = []); ++a < r; ) {
|
|
132
|
+
var l = e[a];
|
|
133
|
+
n(l) ? ra(s, l) : s[s.length] = l;
|
|
134
|
+
}
|
|
135
|
+
return s;
|
|
136
|
+
}
|
|
137
|
+
function ua(e) {
|
|
138
|
+
var t = e == null ? 0 : e.length;
|
|
139
|
+
return t ? la(e) : [];
|
|
140
|
+
}
|
|
141
|
+
function da(e) {
|
|
142
|
+
return Yo(ea(e, void 0, ua), e + "");
|
|
143
|
+
}
|
|
144
|
+
function ca(e, t) {
|
|
145
|
+
return e != null && t in Object(e);
|
|
146
|
+
}
|
|
147
|
+
function fa(e, t, n) {
|
|
148
|
+
t = Ct(t, e);
|
|
149
|
+
for (var o = -1, s = t.length, a = !1; ++o < s; ) {
|
|
150
|
+
var r = En(t[o]);
|
|
151
|
+
if (!(a = e != null && n(e, r)))
|
|
152
|
+
break;
|
|
153
|
+
e = e[r];
|
|
154
|
+
}
|
|
155
|
+
return a || ++o != s ? a : (s = e == null ? 0 : e.length, !!s && na(s) && Tn(r, s) && (Sn(e) || kn(e)));
|
|
156
|
+
}
|
|
157
|
+
function pa(e, t) {
|
|
158
|
+
return e != null && fa(e, t, ca);
|
|
159
|
+
}
|
|
160
|
+
function Mn(e) {
|
|
161
|
+
return e == null;
|
|
162
|
+
}
|
|
163
|
+
function va(e, t, n, o) {
|
|
164
|
+
if (!zt(e))
|
|
165
|
+
return e;
|
|
166
|
+
t = Ct(t, e);
|
|
167
|
+
for (var s = -1, a = t.length, r = a - 1, l = e; l != null && ++s < a; ) {
|
|
168
|
+
var c = En(t[s]), f = n;
|
|
169
|
+
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
170
|
+
return e;
|
|
171
|
+
if (s != r) {
|
|
172
|
+
var E = l[c];
|
|
173
|
+
f = void 0, f === void 0 && (f = zt(E) ? E : Tn(t[s + 1]) ? [] : {});
|
|
174
|
+
}
|
|
175
|
+
Qo(l, c, f), l = l[c];
|
|
176
|
+
}
|
|
177
|
+
return e;
|
|
178
|
+
}
|
|
179
|
+
function ma(e, t, n) {
|
|
180
|
+
for (var o = -1, s = t.length, a = {}; ++o < s; ) {
|
|
181
|
+
var r = t[o], l = io(e, r);
|
|
182
|
+
n(l, r) && va(a, Ct(r, e), l);
|
|
183
|
+
}
|
|
184
|
+
return a;
|
|
185
|
+
}
|
|
186
|
+
function ha(e, t) {
|
|
187
|
+
return ma(e, t, function(n, o) {
|
|
188
|
+
return pa(e, o);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
var ga = da(function(e, t) {
|
|
192
|
+
return e == null ? {} : ha(e, t);
|
|
193
|
+
});
|
|
194
|
+
let Le;
|
|
195
|
+
const ba = (e) => {
|
|
196
|
+
var t;
|
|
197
|
+
if (!ue)
|
|
198
|
+
return 0;
|
|
199
|
+
if (Le !== void 0)
|
|
200
|
+
return Le;
|
|
201
|
+
const n = document.createElement("div");
|
|
202
|
+
n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
|
|
203
|
+
const o = n.offsetWidth;
|
|
204
|
+
n.style.overflow = "scroll";
|
|
205
|
+
const s = document.createElement("div");
|
|
206
|
+
s.style.width = "100%", n.appendChild(s);
|
|
207
|
+
const a = s.offsetWidth;
|
|
208
|
+
return (t = n.parentNode) == null || t.removeChild(n), Le = o - a, Le;
|
|
209
|
+
}, gt = "update:modelValue", ya = (e) => ["", ...lo].includes(e);
|
|
210
|
+
var qe = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(qe || {});
|
|
211
|
+
const Sa = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e), Ea = ["class", "style"], wa = /^on[A-Z]/, Ca = (e = {}) => {
|
|
212
|
+
const { excludeListeners: t = !1, excludeKeys: n } = e, o = w(() => ((n == null ? void 0 : n.value) || []).concat(Ea)), s = Xe();
|
|
213
|
+
return s ? w(() => {
|
|
214
|
+
var a;
|
|
215
|
+
return uo(Object.entries((a = s.proxy) == null ? void 0 : a.$attrs).filter(([r]) => !o.value.includes(r) && !(t && wa.test(r))));
|
|
216
|
+
}) : (me("use-attrs", "getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"), w(() => ({})));
|
|
217
|
+
}, Ta = ({ from: e, replacement: t, scope: n, version: o, ref: s, type: a = "API" }, r) => {
|
|
218
|
+
K(() => u(r), (l) => {
|
|
219
|
+
l && me(n, `[${a}] ${e} is about to be deprecated in version ${o}, please use ${t} instead.
|
|
220
|
+
For more detail, please visit: ${s}
|
|
221
|
+
`);
|
|
222
|
+
}, {
|
|
223
|
+
immediate: !0
|
|
224
|
+
});
|
|
225
|
+
}, Ia = (e, t, n, o) => {
|
|
226
|
+
let s = {
|
|
227
|
+
offsetX: 0,
|
|
228
|
+
offsetY: 0
|
|
229
|
+
};
|
|
230
|
+
const a = (f) => {
|
|
231
|
+
const E = f.clientX, C = f.clientY, { offsetX: y, offsetY: v } = s, i = e.value.getBoundingClientRect(), d = i.left, g = i.top, b = i.width, T = i.height, P = document.documentElement.clientWidth, L = document.documentElement.clientHeight, G = -d + y, Y = -g + v, N = P - d - b + y, z = L - g - T + v, H = (k) => {
|
|
232
|
+
let $ = y + k.clientX - E, j = v + k.clientY - C;
|
|
233
|
+
o != null && o.value || ($ = Math.min(Math.max($, G), N), j = Math.min(Math.max(j, Y), z)), s = {
|
|
234
|
+
offsetX: $,
|
|
235
|
+
offsetY: j
|
|
236
|
+
}, e.value && (e.value.style.transform = `translate(${Dt($)}, ${Dt(j)})`);
|
|
237
|
+
}, W = () => {
|
|
238
|
+
document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", W);
|
|
239
|
+
};
|
|
240
|
+
document.addEventListener("mousemove", H), document.addEventListener("mouseup", W);
|
|
241
|
+
}, r = () => {
|
|
242
|
+
t.value && e.value && t.value.addEventListener("mousedown", a);
|
|
243
|
+
}, l = () => {
|
|
244
|
+
t.value && e.value && t.value.removeEventListener("mousedown", a);
|
|
245
|
+
}, c = () => {
|
|
246
|
+
s = {
|
|
247
|
+
offsetX: 0,
|
|
248
|
+
offsetY: 0
|
|
249
|
+
}, e.value && (e.value.style.transform = "none");
|
|
250
|
+
};
|
|
251
|
+
return de(() => {
|
|
252
|
+
pn(() => {
|
|
253
|
+
n.value ? r() : l();
|
|
254
|
+
});
|
|
255
|
+
}), xe(() => {
|
|
256
|
+
l();
|
|
257
|
+
}), {
|
|
258
|
+
resetPosition: c
|
|
259
|
+
};
|
|
260
|
+
}, ka = (e, t = {}) => {
|
|
261
|
+
Yn(e) || co("[useLockscreen]", "You need to pass a ref param to this function");
|
|
262
|
+
const n = t.ns || ge("popup"), o = w(() => n.bm("parent", "hidden"));
|
|
263
|
+
if (!ue || qt(document.body, o.value))
|
|
264
|
+
return;
|
|
265
|
+
let s = 0, a = !1, r = "0";
|
|
266
|
+
const l = () => {
|
|
267
|
+
setTimeout(() => {
|
|
268
|
+
typeof document > "u" || (vo(document == null ? void 0 : document.body, o.value), a && document && (document.body.style.width = r));
|
|
269
|
+
}, 200);
|
|
270
|
+
};
|
|
271
|
+
K(e, (c) => {
|
|
272
|
+
if (!c) {
|
|
273
|
+
l();
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
a = !qt(document.body, o.value), a && (r = document.body.style.width), s = ba(n.namespace.value);
|
|
277
|
+
const f = document.documentElement.clientHeight < document.body.scrollHeight, E = fo(document.body, "overflowY");
|
|
278
|
+
s > 0 && (f || E === "scroll") && a && (document.body.style.width = `calc(100% - ${s}px)`), po(document.body, o.value);
|
|
279
|
+
}), Wn(() => l());
|
|
280
|
+
}, An = (e) => {
|
|
281
|
+
const t = Xe();
|
|
282
|
+
return w(() => {
|
|
283
|
+
var n, o;
|
|
284
|
+
return (o = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : o[e];
|
|
285
|
+
});
|
|
286
|
+
}, Rn = (e) => {
|
|
287
|
+
if (!e)
|
|
288
|
+
return { onClick: De, onMousedown: De, onMouseup: De };
|
|
289
|
+
let t = !1, n = !1;
|
|
290
|
+
return { onClick: (r) => {
|
|
291
|
+
t && n && e(r), t = n = !1;
|
|
292
|
+
}, onMousedown: (r) => {
|
|
293
|
+
t = r.target === r.currentTarget;
|
|
294
|
+
}, onMouseup: (r) => {
|
|
295
|
+
n = r.target === r.currentTarget;
|
|
296
|
+
} };
|
|
297
|
+
}, bt = {
|
|
298
|
+
prefix: Math.floor(Math.random() * 1e4),
|
|
299
|
+
current: 0
|
|
300
|
+
}, Ma = Symbol("elIdInjection"), Aa = () => Xe() ? he(Ma, bt) : bt, yt = (e) => {
|
|
301
|
+
const t = Aa();
|
|
302
|
+
!ue && t === bt && me("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
|
303
|
+
usage: app.provide(ID_INJECTION_KEY, {
|
|
304
|
+
prefix: number,
|
|
305
|
+
current: number,
|
|
306
|
+
})`);
|
|
307
|
+
const n = mo();
|
|
308
|
+
return w(() => u(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
|
|
309
|
+
};
|
|
310
|
+
let Se = [];
|
|
311
|
+
const Zt = (e) => {
|
|
312
|
+
const t = e;
|
|
313
|
+
t.key === Tt.esc && Se.forEach((n) => n(t));
|
|
314
|
+
}, Ra = (e) => {
|
|
315
|
+
de(() => {
|
|
316
|
+
Se.length === 0 && document.addEventListener("keydown", Zt), ue && Se.push(e);
|
|
317
|
+
}), xe(() => {
|
|
318
|
+
Se = Se.filter((t) => t !== e), Se.length === 0 && ue && document.removeEventListener("keydown", Zt);
|
|
319
|
+
});
|
|
320
|
+
};
|
|
321
|
+
function _a(e) {
|
|
322
|
+
let t;
|
|
323
|
+
function n() {
|
|
324
|
+
if (e.value == null)
|
|
325
|
+
return;
|
|
326
|
+
const { selectionStart: s, selectionEnd: a, value: r } = e.value;
|
|
327
|
+
if (s == null || a == null)
|
|
328
|
+
return;
|
|
329
|
+
const l = r.slice(0, Math.max(0, s)), c = r.slice(Math.max(0, a));
|
|
330
|
+
t = {
|
|
331
|
+
selectionStart: s,
|
|
332
|
+
selectionEnd: a,
|
|
333
|
+
value: r,
|
|
334
|
+
beforeTxt: l,
|
|
335
|
+
afterTxt: c
|
|
336
|
+
};
|
|
337
|
+
}
|
|
338
|
+
function o() {
|
|
339
|
+
if (e.value == null || t == null)
|
|
340
|
+
return;
|
|
341
|
+
const { value: s } = e.value, { beforeTxt: a, afterTxt: r, selectionStart: l } = t;
|
|
342
|
+
if (a == null || r == null || l == null)
|
|
343
|
+
return;
|
|
344
|
+
let c = s.length;
|
|
345
|
+
if (s.endsWith(r))
|
|
346
|
+
c = s.length - r.length;
|
|
347
|
+
else if (s.startsWith(a))
|
|
348
|
+
c = a.length;
|
|
349
|
+
else {
|
|
350
|
+
const f = a[l - 1], E = s.indexOf(f, l - 1);
|
|
351
|
+
E !== -1 && (c = E + 1);
|
|
352
|
+
}
|
|
353
|
+
e.value.setSelectionRange(c, c);
|
|
354
|
+
}
|
|
355
|
+
return [n, o];
|
|
356
|
+
}
|
|
357
|
+
function Ba(e, {
|
|
358
|
+
beforeFocus: t,
|
|
359
|
+
afterFocus: n,
|
|
360
|
+
beforeBlur: o,
|
|
361
|
+
afterBlur: s
|
|
362
|
+
} = {}) {
|
|
363
|
+
const a = Xe(), { emit: r } = a, l = Ue(), c = M(!1), f = (y) => {
|
|
364
|
+
Ye(t) && t(y) || c.value || (c.value = !0, r("focus", y), n == null || n());
|
|
365
|
+
}, E = (y) => {
|
|
366
|
+
var v;
|
|
367
|
+
Ye(o) && o(y) || y.relatedTarget && ((v = l.value) != null && v.contains(y.relatedTarget)) || (c.value = !1, r("blur", y), s == null || s());
|
|
368
|
+
}, C = () => {
|
|
369
|
+
var y, v;
|
|
370
|
+
(y = l.value) != null && y.contains(document.activeElement) && l.value !== document.activeElement || (v = e.value) == null || v.focus();
|
|
371
|
+
};
|
|
372
|
+
return K(l, (y) => {
|
|
373
|
+
y && y.setAttribute("tabindex", "-1");
|
|
374
|
+
}), Ae(l, "focus", f, !0), Ae(l, "blur", E, !0), Ae(l, "click", C, !0), process.env.NODE_ENV === "test" && de(() => {
|
|
375
|
+
const y = vt(e.value) ? e.value : document.querySelector("input,textarea");
|
|
376
|
+
y && (Ae(y, "focus", f, !0), Ae(y, "blur", E, !0));
|
|
377
|
+
}), {
|
|
378
|
+
isFocused: c,
|
|
379
|
+
wrapperRef: l,
|
|
380
|
+
handleFocus: f,
|
|
381
|
+
handleBlur: E
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
function xa({
|
|
385
|
+
afterComposition: e,
|
|
386
|
+
emit: t
|
|
387
|
+
}) {
|
|
388
|
+
const n = M(!1), o = (l) => {
|
|
389
|
+
t == null || t("compositionstart", l), n.value = !0;
|
|
390
|
+
}, s = (l) => {
|
|
391
|
+
var c;
|
|
392
|
+
t == null || t("compositionupdate", l);
|
|
393
|
+
const f = (c = l.target) == null ? void 0 : c.value, E = f[f.length - 1] || "";
|
|
394
|
+
n.value = !Sa(E);
|
|
395
|
+
}, a = (l) => {
|
|
396
|
+
t == null || t("compositionend", l), n.value && (n.value = !1, D(() => e(l)));
|
|
397
|
+
};
|
|
398
|
+
return {
|
|
399
|
+
isComposing: n,
|
|
400
|
+
handleComposition: (l) => {
|
|
401
|
+
l.type === "compositionend" ? a(l) : s(l);
|
|
402
|
+
},
|
|
403
|
+
handleCompositionStart: o,
|
|
404
|
+
handleCompositionUpdate: s,
|
|
405
|
+
handleCompositionEnd: a
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
const Va = Je({
|
|
409
|
+
ariaLabel: String,
|
|
410
|
+
ariaOrientation: {
|
|
411
|
+
type: String,
|
|
412
|
+
values: ["horizontal", "vertical", "undefined"]
|
|
413
|
+
},
|
|
414
|
+
ariaControls: String
|
|
415
|
+
}), Na = (e) => ga(Va, e), It = Symbol("formContextKey"), _n = Symbol("formItemContextKey"), Bn = (e, t = {}) => {
|
|
416
|
+
const n = M(void 0), o = t.prop ? n : An("size"), s = t.global ? n : ho(), a = t.form ? { size: void 0 } : he(It, void 0), r = t.formItem ? { size: void 0 } : he(_n, void 0);
|
|
417
|
+
return w(() => o.value || u(e) || (r == null ? void 0 : r.size) || (a == null ? void 0 : a.size) || s.value || "");
|
|
418
|
+
}, kt = (e) => {
|
|
419
|
+
const t = An("disabled"), n = he(It, void 0);
|
|
420
|
+
return w(() => t.value || u(e) || (n == null ? void 0 : n.disabled) || !1);
|
|
421
|
+
}, xn = () => {
|
|
422
|
+
const e = he(It, void 0), t = he(_n, void 0);
|
|
423
|
+
return {
|
|
424
|
+
form: e,
|
|
425
|
+
formItem: t
|
|
426
|
+
};
|
|
427
|
+
}, La = (e, {
|
|
428
|
+
formItemContext: t,
|
|
429
|
+
disableIdGeneration: n,
|
|
430
|
+
disableIdManagement: o
|
|
431
|
+
}) => {
|
|
432
|
+
n || (n = M(!1)), o || (o = M(!1));
|
|
433
|
+
const s = M();
|
|
434
|
+
let a;
|
|
435
|
+
const r = w(() => {
|
|
436
|
+
var l;
|
|
437
|
+
return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((l = t.inputIds) == null ? void 0 : l.length) <= 1);
|
|
438
|
+
});
|
|
439
|
+
return de(() => {
|
|
440
|
+
a = K([Ke(e, "id"), n], ([l, c]) => {
|
|
441
|
+
const f = l ?? (c ? void 0 : yt().value);
|
|
442
|
+
f !== s.value && (t != null && t.removeInputId && (s.value && t.removeInputId(s.value), !(o != null && o.value) && !c && f && t.addInputId(f)), s.value = f);
|
|
443
|
+
}, { immediate: !0 });
|
|
444
|
+
}), jn(() => {
|
|
445
|
+
a && a(), t != null && t.removeInputId && s.value && t.removeInputId(s.value);
|
|
446
|
+
}), {
|
|
447
|
+
isLabeledByFormItem: r,
|
|
448
|
+
inputId: s
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
let Q;
|
|
452
|
+
const $a = `
|
|
453
|
+
height:0 !important;
|
|
454
|
+
visibility:hidden !important;
|
|
455
|
+
${Oo() ? "" : "overflow:hidden !important;"}
|
|
456
|
+
position:absolute !important;
|
|
457
|
+
z-index:-1000 !important;
|
|
458
|
+
top:0 !important;
|
|
459
|
+
right:0 !important;
|
|
460
|
+
`, Fa = [
|
|
461
|
+
"letter-spacing",
|
|
462
|
+
"line-height",
|
|
463
|
+
"padding-top",
|
|
464
|
+
"padding-bottom",
|
|
465
|
+
"font-family",
|
|
466
|
+
"font-weight",
|
|
467
|
+
"font-size",
|
|
468
|
+
"text-rendering",
|
|
469
|
+
"text-transform",
|
|
470
|
+
"width",
|
|
471
|
+
"text-indent",
|
|
472
|
+
"padding-left",
|
|
473
|
+
"padding-right",
|
|
474
|
+
"border-width",
|
|
475
|
+
"box-sizing"
|
|
476
|
+
];
|
|
477
|
+
function Oa(e) {
|
|
478
|
+
const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), o = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), s = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width"));
|
|
479
|
+
return { contextStyle: Fa.map((r) => `${r}:${t.getPropertyValue(r)}`).join(";"), paddingSize: o, borderSize: s, boxSizing: n };
|
|
480
|
+
}
|
|
481
|
+
function Qt(e, t = 1, n) {
|
|
482
|
+
var o;
|
|
483
|
+
Q || (Q = document.createElement("textarea"), document.body.appendChild(Q));
|
|
484
|
+
const { paddingSize: s, borderSize: a, boxSizing: r, contextStyle: l } = Oa(e);
|
|
485
|
+
Q.setAttribute("style", `${l};${$a}`), Q.value = e.value || e.placeholder || "";
|
|
486
|
+
let c = Q.scrollHeight;
|
|
487
|
+
const f = {};
|
|
488
|
+
r === "border-box" ? c = c + a : r === "content-box" && (c = c - s), Q.value = "";
|
|
489
|
+
const E = Q.scrollHeight - s;
|
|
490
|
+
if (Kt(t)) {
|
|
491
|
+
let C = E * t;
|
|
492
|
+
r === "border-box" && (C = C + s + a), c = Math.max(C, c), f.minHeight = `${C}px`;
|
|
493
|
+
}
|
|
494
|
+
if (Kt(n)) {
|
|
495
|
+
let C = E * n;
|
|
496
|
+
r === "border-box" && (C = C + s + a), c = Math.min(C, c);
|
|
497
|
+
}
|
|
498
|
+
return f.height = `${c}px`, (o = Q.parentNode) == null || o.removeChild(Q), Q = void 0, f;
|
|
499
|
+
}
|
|
500
|
+
const Pa = Je({
|
|
501
|
+
id: {
|
|
502
|
+
type: String,
|
|
503
|
+
default: void 0
|
|
504
|
+
},
|
|
505
|
+
size: wn,
|
|
506
|
+
disabled: Boolean,
|
|
507
|
+
modelValue: {
|
|
508
|
+
type: we([
|
|
509
|
+
String,
|
|
510
|
+
Number,
|
|
511
|
+
Object
|
|
512
|
+
]),
|
|
513
|
+
default: ""
|
|
514
|
+
},
|
|
515
|
+
maxlength: {
|
|
516
|
+
type: [String, Number]
|
|
517
|
+
},
|
|
518
|
+
minlength: {
|
|
519
|
+
type: [String, Number]
|
|
520
|
+
},
|
|
521
|
+
type: {
|
|
522
|
+
type: String,
|
|
523
|
+
default: "text"
|
|
524
|
+
},
|
|
525
|
+
resize: {
|
|
526
|
+
type: String,
|
|
527
|
+
values: ["none", "both", "horizontal", "vertical"]
|
|
528
|
+
},
|
|
529
|
+
autosize: {
|
|
530
|
+
type: we([Boolean, Object]),
|
|
531
|
+
default: !1
|
|
532
|
+
},
|
|
533
|
+
autocomplete: {
|
|
534
|
+
type: String,
|
|
535
|
+
default: "off"
|
|
536
|
+
},
|
|
537
|
+
formatter: {
|
|
538
|
+
type: Function
|
|
539
|
+
},
|
|
540
|
+
parser: {
|
|
541
|
+
type: Function
|
|
542
|
+
},
|
|
543
|
+
placeholder: {
|
|
544
|
+
type: String
|
|
545
|
+
},
|
|
546
|
+
form: {
|
|
547
|
+
type: String
|
|
548
|
+
},
|
|
549
|
+
readonly: Boolean,
|
|
550
|
+
clearable: Boolean,
|
|
551
|
+
showPassword: Boolean,
|
|
552
|
+
showWordLimit: Boolean,
|
|
553
|
+
suffixIcon: {
|
|
554
|
+
type: We
|
|
555
|
+
},
|
|
556
|
+
prefixIcon: {
|
|
557
|
+
type: We
|
|
558
|
+
},
|
|
559
|
+
containerRole: {
|
|
560
|
+
type: String,
|
|
561
|
+
default: void 0
|
|
562
|
+
},
|
|
563
|
+
tabindex: {
|
|
564
|
+
type: [String, Number],
|
|
565
|
+
default: 0
|
|
566
|
+
},
|
|
567
|
+
validateEvent: {
|
|
568
|
+
type: Boolean,
|
|
569
|
+
default: !0
|
|
570
|
+
},
|
|
571
|
+
inputStyle: {
|
|
572
|
+
type: we([Object, Array, String]),
|
|
573
|
+
default: () => go({})
|
|
574
|
+
},
|
|
575
|
+
autofocus: Boolean,
|
|
576
|
+
rows: {
|
|
577
|
+
type: Number,
|
|
578
|
+
default: 2
|
|
579
|
+
},
|
|
580
|
+
...Na(["ariaLabel"])
|
|
581
|
+
}), Ha = {
|
|
582
|
+
[gt]: (e) => Ce(e),
|
|
583
|
+
input: (e) => Ce(e),
|
|
584
|
+
change: (e) => Ce(e),
|
|
585
|
+
focus: (e) => e instanceof FocusEvent,
|
|
586
|
+
blur: (e) => e instanceof FocusEvent,
|
|
587
|
+
clear: () => !0,
|
|
588
|
+
mouseleave: (e) => e instanceof MouseEvent,
|
|
589
|
+
mouseenter: (e) => e instanceof MouseEvent,
|
|
590
|
+
keydown: (e) => e instanceof Event,
|
|
591
|
+
compositionstart: (e) => e instanceof CompositionEvent,
|
|
592
|
+
compositionupdate: (e) => e instanceof CompositionEvent,
|
|
593
|
+
compositionend: (e) => e instanceof CompositionEvent
|
|
594
|
+
}, Ua = J({
|
|
595
|
+
name: "ElInput",
|
|
596
|
+
inheritAttrs: !1
|
|
597
|
+
}), za = /* @__PURE__ */ J({
|
|
598
|
+
...Ua,
|
|
599
|
+
props: Pa,
|
|
600
|
+
emits: Ha,
|
|
601
|
+
setup(e, { expose: t, emit: n }) {
|
|
602
|
+
const o = e, s = Xn(), a = vn(), r = w(() => {
|
|
603
|
+
const p = {};
|
|
604
|
+
return o.containerRole === "combobox" && (p["aria-haspopup"] = s["aria-haspopup"], p["aria-owns"] = s["aria-owns"], p["aria-expanded"] = s["aria-expanded"]), p;
|
|
605
|
+
}), l = w(() => [
|
|
606
|
+
o.type === "textarea" ? g.b() : d.b(),
|
|
607
|
+
d.m(v.value),
|
|
608
|
+
d.is("disabled", i.value),
|
|
609
|
+
d.is("exceed", Fn.value),
|
|
610
|
+
{
|
|
611
|
+
[d.b("group")]: a.prepend || a.append,
|
|
612
|
+
[d.m("prefix")]: a.prefix || o.prefixIcon,
|
|
613
|
+
[d.m("suffix")]: a.suffix || o.suffixIcon || o.clearable || o.showPassword,
|
|
614
|
+
[d.bm("suffix", "password-clear")]: ce.value && et.value,
|
|
615
|
+
[d.b("hidden")]: o.type === "hidden"
|
|
616
|
+
},
|
|
617
|
+
s.class
|
|
618
|
+
]), c = w(() => [
|
|
619
|
+
d.e("wrapper"),
|
|
620
|
+
d.is("focus", H.value)
|
|
621
|
+
]), f = Ca({
|
|
622
|
+
excludeKeys: w(() => Object.keys(r.value))
|
|
623
|
+
}), { form: E, formItem: C } = xn(), { inputId: y } = La(o, {
|
|
624
|
+
formItemContext: C
|
|
625
|
+
}), v = Bn(), i = kt(), d = ge("input"), g = ge("textarea"), b = Ue(), T = Ue(), P = M(!1), L = M(!1), G = M(), Y = Ue(o.inputStyle), N = w(() => b.value || T.value), { wrapperRef: z, isFocused: H, handleFocus: W, handleBlur: k } = Ba(N, {
|
|
626
|
+
beforeFocus() {
|
|
627
|
+
return i.value;
|
|
628
|
+
},
|
|
629
|
+
afterBlur() {
|
|
630
|
+
var p;
|
|
631
|
+
o.validateEvent && ((p = C == null ? void 0 : C.validate) == null || p.call(C, "blur").catch((_) => me(_)));
|
|
632
|
+
}
|
|
633
|
+
}), $ = w(() => {
|
|
634
|
+
var p;
|
|
635
|
+
return (p = E == null ? void 0 : E.statusIcon) != null ? p : !1;
|
|
636
|
+
}), j = w(() => (C == null ? void 0 : C.validateState) || ""), Ie = w(() => j.value && bo[j.value]), Qe = w(() => L.value ? yo : So), B = w(() => [
|
|
637
|
+
s.style
|
|
638
|
+
]), Z = w(() => [
|
|
639
|
+
o.inputStyle,
|
|
640
|
+
Y.value,
|
|
641
|
+
{ resize: o.resize }
|
|
642
|
+
]), U = w(() => Mn(o.modelValue) ? "" : String(o.modelValue)), ce = w(() => o.clearable && !i.value && !o.readonly && !!U.value && (H.value || P.value)), et = w(() => o.showPassword && !i.value && !!U.value && (!!U.value || H.value)), be = w(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !i.value && !o.readonly && !o.showPassword), tt = w(() => U.value.length), Fn = w(() => !!be.value && tt.value > Number(o.maxlength)), On = w(() => !!a.suffix || !!o.suffixIcon || ce.value || o.showPassword || be.value || !!j.value && $.value), [Pn, Hn] = _a(b);
|
|
643
|
+
Eo(T, (p) => {
|
|
644
|
+
if (Un(), !be.value || o.resize !== "both")
|
|
645
|
+
return;
|
|
646
|
+
const _ = p[0], { width: ye } = _.contentRect;
|
|
647
|
+
G.value = {
|
|
648
|
+
right: `calc(100% - ${ye + 15 + 6}px)`
|
|
649
|
+
};
|
|
650
|
+
});
|
|
651
|
+
const ke = () => {
|
|
652
|
+
const { type: p, autosize: _ } = o;
|
|
653
|
+
if (!(!ue || p !== "textarea" || !T.value))
|
|
654
|
+
if (_) {
|
|
655
|
+
const ye = mt(_) ? _.minRows : void 0, Ft = mt(_) ? _.maxRows : void 0, Ot = Qt(T.value, ye, Ft);
|
|
656
|
+
Y.value = {
|
|
657
|
+
overflowY: "hidden",
|
|
658
|
+
...Ot
|
|
659
|
+
}, D(() => {
|
|
660
|
+
T.value.offsetHeight, Y.value = Ot;
|
|
661
|
+
});
|
|
662
|
+
} else
|
|
663
|
+
Y.value = {
|
|
664
|
+
minHeight: Qt(T.value).minHeight
|
|
665
|
+
};
|
|
666
|
+
}, Un = ((p) => {
|
|
667
|
+
let _ = !1;
|
|
668
|
+
return () => {
|
|
669
|
+
var ye;
|
|
670
|
+
if (_ || !o.autosize)
|
|
671
|
+
return;
|
|
672
|
+
((ye = T.value) == null ? void 0 : ye.offsetParent) === null || (p(), _ = !0);
|
|
673
|
+
};
|
|
674
|
+
})(ke), Me = () => {
|
|
675
|
+
const p = N.value, _ = o.formatter ? o.formatter(U.value) : U.value;
|
|
676
|
+
!p || p.value === _ || (p.value = _);
|
|
677
|
+
}, nt = async (p) => {
|
|
678
|
+
Pn();
|
|
679
|
+
let { value: _ } = p.target;
|
|
680
|
+
if (o.formatter && (_ = o.parser ? o.parser(_) : _), !_t.value) {
|
|
681
|
+
if (_ === U.value) {
|
|
682
|
+
Me();
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
n(gt, _), n("input", _), await D(), Me(), Hn();
|
|
686
|
+
}
|
|
687
|
+
}, Rt = (p) => {
|
|
688
|
+
n("change", p.target.value);
|
|
689
|
+
}, {
|
|
690
|
+
isComposing: _t,
|
|
691
|
+
handleCompositionStart: Bt,
|
|
692
|
+
handleCompositionUpdate: xt,
|
|
693
|
+
handleCompositionEnd: Vt
|
|
694
|
+
} = xa({ emit: n, afterComposition: nt }), zn = () => {
|
|
695
|
+
L.value = !L.value, Nt();
|
|
696
|
+
}, Nt = async () => {
|
|
697
|
+
var p;
|
|
698
|
+
await D(), (p = N.value) == null || p.focus();
|
|
699
|
+
}, Dn = () => {
|
|
700
|
+
var p;
|
|
701
|
+
return (p = N.value) == null ? void 0 : p.blur();
|
|
702
|
+
}, qn = (p) => {
|
|
703
|
+
P.value = !1, n("mouseleave", p);
|
|
704
|
+
}, Kn = (p) => {
|
|
705
|
+
P.value = !0, n("mouseenter", p);
|
|
706
|
+
}, Lt = (p) => {
|
|
707
|
+
n("keydown", p);
|
|
708
|
+
}, Gn = () => {
|
|
709
|
+
var p;
|
|
710
|
+
(p = N.value) == null || p.select();
|
|
711
|
+
}, $t = () => {
|
|
712
|
+
n(gt, ""), n("change", ""), n("clear"), n("input", "");
|
|
713
|
+
};
|
|
714
|
+
return K(() => o.modelValue, () => {
|
|
715
|
+
var p;
|
|
716
|
+
D(() => ke()), o.validateEvent && ((p = C == null ? void 0 : C.validate) == null || p.call(C, "change").catch((_) => me(_)));
|
|
717
|
+
}), K(U, () => Me()), K(() => o.type, async () => {
|
|
718
|
+
await D(), Me(), ke();
|
|
719
|
+
}), de(() => {
|
|
720
|
+
!o.formatter && o.parser && me("ElInput", "If you set the parser, you also need to set the formatter."), Me(), D(ke);
|
|
721
|
+
}), t({
|
|
722
|
+
input: b,
|
|
723
|
+
textarea: T,
|
|
724
|
+
ref: N,
|
|
725
|
+
textareaStyle: Z,
|
|
726
|
+
autosize: Ke(o, "autosize"),
|
|
727
|
+
isComposing: _t,
|
|
728
|
+
focus: Nt,
|
|
729
|
+
blur: Dn,
|
|
730
|
+
select: Gn,
|
|
731
|
+
clear: $t,
|
|
732
|
+
resizeTextarea: ke
|
|
733
|
+
}), (p, _) => (S(), F("div", ze(u(r), {
|
|
734
|
+
class: [
|
|
735
|
+
u(l),
|
|
736
|
+
{
|
|
737
|
+
[u(d).bm("group", "append")]: p.$slots.append,
|
|
738
|
+
[u(d).bm("group", "prepend")]: p.$slots.prepend
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
style: u(B),
|
|
742
|
+
role: p.containerRole,
|
|
743
|
+
onMouseenter: Kn,
|
|
744
|
+
onMouseleave: qn
|
|
745
|
+
}), [
|
|
746
|
+
A(" input "),
|
|
747
|
+
p.type !== "textarea" ? (S(), F(Ee, { key: 0 }, [
|
|
748
|
+
A(" prepend slot "),
|
|
749
|
+
p.$slots.prepend ? (S(), F("div", {
|
|
750
|
+
key: 0,
|
|
751
|
+
class: I(u(d).be("group", "prepend"))
|
|
752
|
+
}, [
|
|
753
|
+
X(p.$slots, "prepend")
|
|
754
|
+
], 2)) : A("v-if", !0),
|
|
755
|
+
V("div", {
|
|
756
|
+
ref_key: "wrapperRef",
|
|
757
|
+
ref: z,
|
|
758
|
+
class: I(u(c))
|
|
759
|
+
}, [
|
|
760
|
+
A(" prefix slot "),
|
|
761
|
+
p.$slots.prefix || p.prefixIcon ? (S(), F("span", {
|
|
762
|
+
key: 0,
|
|
763
|
+
class: I(u(d).e("prefix"))
|
|
764
|
+
}, [
|
|
765
|
+
V("span", {
|
|
766
|
+
class: I(u(d).e("prefix-inner"))
|
|
767
|
+
}, [
|
|
768
|
+
X(p.$slots, "prefix"),
|
|
769
|
+
p.prefixIcon ? (S(), R(u(ie), {
|
|
770
|
+
key: 0,
|
|
771
|
+
class: I(u(d).e("icon"))
|
|
772
|
+
}, {
|
|
773
|
+
default: h(() => [
|
|
774
|
+
(S(), R(te(p.prefixIcon)))
|
|
775
|
+
]),
|
|
776
|
+
_: 1
|
|
777
|
+
}, 8, ["class"])) : A("v-if", !0)
|
|
778
|
+
], 2)
|
|
779
|
+
], 2)) : A("v-if", !0),
|
|
780
|
+
V("input", ze({
|
|
781
|
+
id: u(y),
|
|
782
|
+
ref_key: "input",
|
|
783
|
+
ref: b,
|
|
784
|
+
class: u(d).e("inner")
|
|
785
|
+
}, u(f), {
|
|
786
|
+
minlength: p.minlength,
|
|
787
|
+
maxlength: p.maxlength,
|
|
788
|
+
type: p.showPassword ? L.value ? "text" : "password" : p.type,
|
|
789
|
+
disabled: u(i),
|
|
790
|
+
readonly: p.readonly,
|
|
791
|
+
autocomplete: p.autocomplete,
|
|
792
|
+
tabindex: p.tabindex,
|
|
793
|
+
"aria-label": p.ariaLabel,
|
|
794
|
+
placeholder: p.placeholder,
|
|
795
|
+
style: p.inputStyle,
|
|
796
|
+
form: p.form,
|
|
797
|
+
autofocus: p.autofocus,
|
|
798
|
+
onCompositionstart: u(Bt),
|
|
799
|
+
onCompositionupdate: u(xt),
|
|
800
|
+
onCompositionend: u(Vt),
|
|
801
|
+
onInput: nt,
|
|
802
|
+
onChange: Rt,
|
|
803
|
+
onKeydown: Lt
|
|
804
|
+
}), null, 16, ["id", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
|
805
|
+
A(" suffix slot "),
|
|
806
|
+
u(On) ? (S(), F("span", {
|
|
807
|
+
key: 1,
|
|
808
|
+
class: I(u(d).e("suffix"))
|
|
809
|
+
}, [
|
|
810
|
+
V("span", {
|
|
811
|
+
class: I(u(d).e("suffix-inner"))
|
|
812
|
+
}, [
|
|
813
|
+
!u(ce) || !u(et) || !u(be) ? (S(), F(Ee, { key: 0 }, [
|
|
814
|
+
X(p.$slots, "suffix"),
|
|
815
|
+
p.suffixIcon ? (S(), R(u(ie), {
|
|
816
|
+
key: 0,
|
|
817
|
+
class: I(u(d).e("icon"))
|
|
818
|
+
}, {
|
|
819
|
+
default: h(() => [
|
|
820
|
+
(S(), R(te(p.suffixIcon)))
|
|
821
|
+
]),
|
|
822
|
+
_: 1
|
|
823
|
+
}, 8, ["class"])) : A("v-if", !0)
|
|
824
|
+
], 64)) : A("v-if", !0),
|
|
825
|
+
u(ce) ? (S(), R(u(ie), {
|
|
826
|
+
key: 1,
|
|
827
|
+
class: I([u(d).e("icon"), u(d).e("clear")]),
|
|
828
|
+
onMousedown: Re(u(De), ["prevent"]),
|
|
829
|
+
onClick: $t
|
|
830
|
+
}, {
|
|
831
|
+
default: h(() => [
|
|
832
|
+
m(u(wo))
|
|
833
|
+
]),
|
|
834
|
+
_: 1
|
|
835
|
+
}, 8, ["class", "onMousedown"])) : A("v-if", !0),
|
|
836
|
+
u(et) ? (S(), R(u(ie), {
|
|
837
|
+
key: 2,
|
|
838
|
+
class: I([u(d).e("icon"), u(d).e("password")]),
|
|
839
|
+
onClick: zn
|
|
840
|
+
}, {
|
|
841
|
+
default: h(() => [
|
|
842
|
+
(S(), R(te(u(Qe))))
|
|
843
|
+
]),
|
|
844
|
+
_: 1
|
|
845
|
+
}, 8, ["class"])) : A("v-if", !0),
|
|
846
|
+
u(be) ? (S(), F("span", {
|
|
847
|
+
key: 3,
|
|
848
|
+
class: I(u(d).e("count"))
|
|
849
|
+
}, [
|
|
850
|
+
V("span", {
|
|
851
|
+
class: I(u(d).e("count-inner"))
|
|
852
|
+
}, ne(u(tt)) + " / " + ne(p.maxlength), 3)
|
|
853
|
+
], 2)) : A("v-if", !0),
|
|
854
|
+
u(j) && u(Ie) && u($) ? (S(), R(u(ie), {
|
|
855
|
+
key: 4,
|
|
856
|
+
class: I([
|
|
857
|
+
u(d).e("icon"),
|
|
858
|
+
u(d).e("validateIcon"),
|
|
859
|
+
u(d).is("loading", u(j) === "validating")
|
|
860
|
+
])
|
|
861
|
+
}, {
|
|
862
|
+
default: h(() => [
|
|
863
|
+
(S(), R(te(u(Ie))))
|
|
864
|
+
]),
|
|
865
|
+
_: 1
|
|
866
|
+
}, 8, ["class"])) : A("v-if", !0)
|
|
867
|
+
], 2)
|
|
868
|
+
], 2)) : A("v-if", !0)
|
|
869
|
+
], 2),
|
|
870
|
+
A(" append slot "),
|
|
871
|
+
p.$slots.append ? (S(), F("div", {
|
|
872
|
+
key: 1,
|
|
873
|
+
class: I(u(d).be("group", "append"))
|
|
874
|
+
}, [
|
|
875
|
+
X(p.$slots, "append")
|
|
876
|
+
], 2)) : A("v-if", !0)
|
|
877
|
+
], 64)) : (S(), F(Ee, { key: 1 }, [
|
|
878
|
+
A(" textarea "),
|
|
879
|
+
V("textarea", ze({
|
|
880
|
+
id: u(y),
|
|
881
|
+
ref_key: "textarea",
|
|
882
|
+
ref: T,
|
|
883
|
+
class: [u(g).e("inner"), u(d).is("focus", u(H))]
|
|
884
|
+
}, u(f), {
|
|
885
|
+
minlength: p.minlength,
|
|
886
|
+
maxlength: p.maxlength,
|
|
887
|
+
tabindex: p.tabindex,
|
|
888
|
+
disabled: u(i),
|
|
889
|
+
readonly: p.readonly,
|
|
890
|
+
autocomplete: p.autocomplete,
|
|
891
|
+
style: u(Z),
|
|
892
|
+
"aria-label": p.ariaLabel,
|
|
893
|
+
placeholder: p.placeholder,
|
|
894
|
+
form: p.form,
|
|
895
|
+
autofocus: p.autofocus,
|
|
896
|
+
rows: p.rows,
|
|
897
|
+
onCompositionstart: u(Bt),
|
|
898
|
+
onCompositionupdate: u(xt),
|
|
899
|
+
onCompositionend: u(Vt),
|
|
900
|
+
onInput: nt,
|
|
901
|
+
onFocus: u(W),
|
|
902
|
+
onBlur: u(k),
|
|
903
|
+
onChange: Rt,
|
|
904
|
+
onKeydown: Lt
|
|
905
|
+
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
|
|
906
|
+
u(be) ? (S(), F("span", {
|
|
907
|
+
key: 0,
|
|
908
|
+
style: pt(G.value),
|
|
909
|
+
class: I(u(d).e("count"))
|
|
910
|
+
}, ne(u(tt)) + " / " + ne(p.maxlength), 7)) : A("v-if", !0)
|
|
911
|
+
], 64))
|
|
912
|
+
], 16, ["role"]));
|
|
913
|
+
}
|
|
914
|
+
});
|
|
915
|
+
var Da = /* @__PURE__ */ Ve(za, [["__file", "input.vue"]]);
|
|
916
|
+
const qa = Cn(Da), lt = "focus-trap.focus-after-trapped", ut = "focus-trap.focus-after-released", Ka = "focus-trap.focusout-prevented", en = {
|
|
917
|
+
cancelable: !0,
|
|
918
|
+
bubbles: !1
|
|
919
|
+
}, Ga = {
|
|
920
|
+
cancelable: !0,
|
|
921
|
+
bubbles: !1
|
|
922
|
+
}, tn = "focusAfterTrapped", nn = "focusAfterReleased", Ya = Symbol("elFocusTrap"), Mt = M(), Ze = M(0), At = M(0);
|
|
923
|
+
let $e = 0;
|
|
924
|
+
const Vn = (e) => {
|
|
925
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
926
|
+
acceptNode: (o) => {
|
|
927
|
+
const s = o.tagName === "INPUT" && o.type === "hidden";
|
|
928
|
+
return o.disabled || o.hidden || s ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
for (; n.nextNode(); )
|
|
932
|
+
t.push(n.currentNode);
|
|
933
|
+
return t;
|
|
934
|
+
}, on = (e, t) => {
|
|
935
|
+
for (const n of e)
|
|
936
|
+
if (!Wa(n, t))
|
|
937
|
+
return n;
|
|
938
|
+
}, Wa = (e, t) => {
|
|
939
|
+
if (process.env.NODE_ENV === "test")
|
|
940
|
+
return !1;
|
|
941
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
942
|
+
return !0;
|
|
943
|
+
for (; e; ) {
|
|
944
|
+
if (t && e === t)
|
|
945
|
+
return !1;
|
|
946
|
+
if (getComputedStyle(e).display === "none")
|
|
947
|
+
return !0;
|
|
948
|
+
e = e.parentElement;
|
|
949
|
+
}
|
|
950
|
+
return !1;
|
|
951
|
+
}, ja = (e) => {
|
|
952
|
+
const t = Vn(e), n = on(t, e), o = on(t.reverse(), e);
|
|
953
|
+
return [n, o];
|
|
954
|
+
}, Xa = (e) => e instanceof HTMLInputElement && "select" in e, se = (e, t) => {
|
|
955
|
+
if (e && e.focus) {
|
|
956
|
+
const n = document.activeElement;
|
|
957
|
+
e.focus({ preventScroll: !0 }), At.value = window.performance.now(), e !== n && Xa(e) && t && e.select();
|
|
958
|
+
}
|
|
959
|
+
};
|
|
960
|
+
function an(e, t) {
|
|
961
|
+
const n = [...e], o = e.indexOf(t);
|
|
962
|
+
return o !== -1 && n.splice(o, 1), n;
|
|
963
|
+
}
|
|
964
|
+
const Ja = () => {
|
|
965
|
+
let e = [];
|
|
966
|
+
return {
|
|
967
|
+
push: (o) => {
|
|
968
|
+
const s = e[0];
|
|
969
|
+
s && o !== s && s.pause(), e = an(e, o), e.unshift(o);
|
|
970
|
+
},
|
|
971
|
+
remove: (o) => {
|
|
972
|
+
var s, a;
|
|
973
|
+
e = an(e, o), (a = (s = e[0]) == null ? void 0 : s.resume) == null || a.call(s);
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
}, Za = (e, t = !1) => {
|
|
977
|
+
const n = document.activeElement;
|
|
978
|
+
for (const o of e)
|
|
979
|
+
if (se(o, t), document.activeElement !== n)
|
|
980
|
+
return;
|
|
981
|
+
}, sn = Ja(), Qa = () => Ze.value > At.value, Fe = () => {
|
|
982
|
+
Mt.value = "pointer", Ze.value = window.performance.now();
|
|
983
|
+
}, rn = () => {
|
|
984
|
+
Mt.value = "keyboard", Ze.value = window.performance.now();
|
|
985
|
+
}, es = () => (de(() => {
|
|
986
|
+
$e === 0 && (document.addEventListener("mousedown", Fe), document.addEventListener("touchstart", Fe), document.addEventListener("keydown", rn)), $e++;
|
|
987
|
+
}), xe(() => {
|
|
988
|
+
$e--, $e <= 0 && (document.removeEventListener("mousedown", Fe), document.removeEventListener("touchstart", Fe), document.removeEventListener("keydown", rn));
|
|
989
|
+
}), {
|
|
990
|
+
focusReason: Mt,
|
|
991
|
+
lastUserFocusTimestamp: Ze,
|
|
992
|
+
lastAutomatedFocusTimestamp: At
|
|
993
|
+
}), Oe = (e) => new CustomEvent(Ka, {
|
|
994
|
+
...Ga,
|
|
995
|
+
detail: e
|
|
996
|
+
}), ts = J({
|
|
997
|
+
name: "ElFocusTrap",
|
|
998
|
+
inheritAttrs: !1,
|
|
999
|
+
props: {
|
|
1000
|
+
loop: Boolean,
|
|
1001
|
+
trapped: Boolean,
|
|
1002
|
+
focusTrapEl: Object,
|
|
1003
|
+
focusStartEl: {
|
|
1004
|
+
type: [Object, String],
|
|
1005
|
+
default: "first"
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
emits: [
|
|
1009
|
+
tn,
|
|
1010
|
+
nn,
|
|
1011
|
+
"focusin",
|
|
1012
|
+
"focusout",
|
|
1013
|
+
"focusout-prevented",
|
|
1014
|
+
"release-requested"
|
|
1015
|
+
],
|
|
1016
|
+
setup(e, { emit: t }) {
|
|
1017
|
+
const n = M();
|
|
1018
|
+
let o, s;
|
|
1019
|
+
const { focusReason: a } = es();
|
|
1020
|
+
Ra((i) => {
|
|
1021
|
+
e.trapped && !r.paused && t("release-requested", i);
|
|
1022
|
+
});
|
|
1023
|
+
const r = {
|
|
1024
|
+
paused: !1,
|
|
1025
|
+
pause() {
|
|
1026
|
+
this.paused = !0;
|
|
1027
|
+
},
|
|
1028
|
+
resume() {
|
|
1029
|
+
this.paused = !1;
|
|
1030
|
+
}
|
|
1031
|
+
}, l = (i) => {
|
|
1032
|
+
if (!e.loop && !e.trapped || r.paused)
|
|
1033
|
+
return;
|
|
1034
|
+
const { key: d, altKey: g, ctrlKey: b, metaKey: T, currentTarget: P, shiftKey: L } = i, { loop: G } = e, Y = d === Tt.tab && !g && !b && !T, N = document.activeElement;
|
|
1035
|
+
if (Y && N) {
|
|
1036
|
+
const z = P, [H, W] = ja(z);
|
|
1037
|
+
if (H && W) {
|
|
1038
|
+
if (!L && N === W) {
|
|
1039
|
+
const $ = Oe({
|
|
1040
|
+
focusReason: a.value
|
|
1041
|
+
});
|
|
1042
|
+
t("focusout-prevented", $), $.defaultPrevented || (i.preventDefault(), G && se(H, !0));
|
|
1043
|
+
} else if (L && [H, z].includes(N)) {
|
|
1044
|
+
const $ = Oe({
|
|
1045
|
+
focusReason: a.value
|
|
1046
|
+
});
|
|
1047
|
+
t("focusout-prevented", $), $.defaultPrevented || (i.preventDefault(), G && se(W, !0));
|
|
1048
|
+
}
|
|
1049
|
+
} else if (N === z) {
|
|
1050
|
+
const $ = Oe({
|
|
1051
|
+
focusReason: a.value
|
|
1052
|
+
});
|
|
1053
|
+
t("focusout-prevented", $), $.defaultPrevented || i.preventDefault();
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
mn(Ya, {
|
|
1058
|
+
focusTrapRef: n,
|
|
1059
|
+
onKeydown: l
|
|
1060
|
+
}), K(() => e.focusTrapEl, (i) => {
|
|
1061
|
+
i && (n.value = i);
|
|
1062
|
+
}, { immediate: !0 }), K([n], ([i], [d]) => {
|
|
1063
|
+
i && (i.addEventListener("keydown", l), i.addEventListener("focusin", E), i.addEventListener("focusout", C)), d && (d.removeEventListener("keydown", l), d.removeEventListener("focusin", E), d.removeEventListener("focusout", C));
|
|
1064
|
+
});
|
|
1065
|
+
const c = (i) => {
|
|
1066
|
+
t(tn, i);
|
|
1067
|
+
}, f = (i) => t(nn, i), E = (i) => {
|
|
1068
|
+
const d = u(n);
|
|
1069
|
+
if (!d)
|
|
1070
|
+
return;
|
|
1071
|
+
const g = i.target, b = i.relatedTarget, T = g && d.contains(g);
|
|
1072
|
+
e.trapped || b && d.contains(b) || (o = b), T && t("focusin", i), !r.paused && e.trapped && (T ? s = g : se(s, !0));
|
|
1073
|
+
}, C = (i) => {
|
|
1074
|
+
const d = u(n);
|
|
1075
|
+
if (!(r.paused || !d))
|
|
1076
|
+
if (e.trapped) {
|
|
1077
|
+
const g = i.relatedTarget;
|
|
1078
|
+
!Mn(g) && !d.contains(g) && setTimeout(() => {
|
|
1079
|
+
if (!r.paused && e.trapped) {
|
|
1080
|
+
const b = Oe({
|
|
1081
|
+
focusReason: a.value
|
|
1082
|
+
});
|
|
1083
|
+
t("focusout-prevented", b), b.defaultPrevented || se(s, !0);
|
|
1084
|
+
}
|
|
1085
|
+
}, 0);
|
|
1086
|
+
} else {
|
|
1087
|
+
const g = i.target;
|
|
1088
|
+
g && d.contains(g) || t("focusout", i);
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
async function y() {
|
|
1092
|
+
await D();
|
|
1093
|
+
const i = u(n);
|
|
1094
|
+
if (i) {
|
|
1095
|
+
sn.push(r);
|
|
1096
|
+
const d = i.contains(document.activeElement) ? o : document.activeElement;
|
|
1097
|
+
if (o = d, !i.contains(d)) {
|
|
1098
|
+
const b = new Event(lt, en);
|
|
1099
|
+
i.addEventListener(lt, c), i.dispatchEvent(b), b.defaultPrevented || D(() => {
|
|
1100
|
+
let T = e.focusStartEl;
|
|
1101
|
+
Ce(T) || (se(T), document.activeElement !== T && (T = "first")), T === "first" && Za(Vn(i), !0), (document.activeElement === d || T === "container") && se(i);
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
function v() {
|
|
1107
|
+
const i = u(n);
|
|
1108
|
+
if (i) {
|
|
1109
|
+
i.removeEventListener(lt, c);
|
|
1110
|
+
const d = new CustomEvent(ut, {
|
|
1111
|
+
...en,
|
|
1112
|
+
detail: {
|
|
1113
|
+
focusReason: a.value
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
i.addEventListener(ut, f), i.dispatchEvent(d), !d.defaultPrevented && (a.value == "keyboard" || !Qa() || i.contains(document.activeElement)) && se(o ?? document.body), i.removeEventListener(ut, f), sn.remove(r);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
return de(() => {
|
|
1120
|
+
e.trapped && y(), K(() => e.trapped, (i) => {
|
|
1121
|
+
i ? y() : v();
|
|
1122
|
+
});
|
|
1123
|
+
}), xe(() => {
|
|
1124
|
+
e.trapped && v(), n.value && (n.value.removeEventListener("keydown", l), n.value.removeEventListener("focusin", E), n.value.removeEventListener("focusout", C), n.value = void 0);
|
|
1125
|
+
}), {
|
|
1126
|
+
onKeydown: l
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
});
|
|
1130
|
+
function ns(e, t, n, o, s, a) {
|
|
1131
|
+
return X(e.$slots, "default", { handleKeydown: e.onKeydown });
|
|
1132
|
+
}
|
|
1133
|
+
var os = /* @__PURE__ */ Ve(ts, [["render", ns], ["__file", "focus-trap.vue"]]);
|
|
1134
|
+
const Nn = Symbol("buttonGroupContextKey"), as = (e, t) => {
|
|
1135
|
+
Ta({
|
|
1136
|
+
from: "type.text",
|
|
1137
|
+
replacement: "link",
|
|
1138
|
+
version: "3.0.0",
|
|
1139
|
+
scope: "props",
|
|
1140
|
+
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
1141
|
+
}, w(() => e.type === "text"));
|
|
1142
|
+
const n = he(Nn, void 0), o = Co("button"), { form: s } = xn(), a = Bn(w(() => n == null ? void 0 : n.size)), r = kt(), l = M(), c = vn(), f = w(() => e.type || (n == null ? void 0 : n.type) || ""), E = w(() => {
|
|
1143
|
+
var i, d, g;
|
|
1144
|
+
return (g = (d = e.autoInsertSpace) != null ? d : (i = o.value) == null ? void 0 : i.autoInsertSpace) != null ? g : !1;
|
|
1145
|
+
}), C = w(() => e.tag === "button" ? {
|
|
1146
|
+
ariaDisabled: r.value || e.loading,
|
|
1147
|
+
disabled: r.value || e.loading,
|
|
1148
|
+
autofocus: e.autofocus,
|
|
1149
|
+
type: e.nativeType
|
|
1150
|
+
} : {}), y = w(() => {
|
|
1151
|
+
var i;
|
|
1152
|
+
const d = (i = c.default) == null ? void 0 : i.call(c);
|
|
1153
|
+
if (E.value && (d == null ? void 0 : d.length) === 1) {
|
|
1154
|
+
const g = d[0];
|
|
1155
|
+
if ((g == null ? void 0 : g.type) === Jn) {
|
|
1156
|
+
const b = g.children;
|
|
1157
|
+
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(b.trim());
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
return !1;
|
|
1161
|
+
});
|
|
1162
|
+
return {
|
|
1163
|
+
_disabled: r,
|
|
1164
|
+
_size: a,
|
|
1165
|
+
_type: f,
|
|
1166
|
+
_ref: l,
|
|
1167
|
+
_props: C,
|
|
1168
|
+
shouldAddSpace: y,
|
|
1169
|
+
handleClick: (i) => {
|
|
1170
|
+
if (r.value || e.loading) {
|
|
1171
|
+
i.stopPropagation();
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1174
|
+
e.nativeType === "reset" && (s == null || s.resetFields()), t("click", i);
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
}, ss = [
|
|
1178
|
+
"default",
|
|
1179
|
+
"primary",
|
|
1180
|
+
"success",
|
|
1181
|
+
"warning",
|
|
1182
|
+
"info",
|
|
1183
|
+
"danger",
|
|
1184
|
+
"text",
|
|
1185
|
+
""
|
|
1186
|
+
], rs = ["button", "submit", "reset"], St = Je({
|
|
1187
|
+
size: wn,
|
|
1188
|
+
disabled: Boolean,
|
|
1189
|
+
type: {
|
|
1190
|
+
type: String,
|
|
1191
|
+
values: ss,
|
|
1192
|
+
default: ""
|
|
1193
|
+
},
|
|
1194
|
+
icon: {
|
|
1195
|
+
type: We
|
|
1196
|
+
},
|
|
1197
|
+
nativeType: {
|
|
1198
|
+
type: String,
|
|
1199
|
+
values: rs,
|
|
1200
|
+
default: "button"
|
|
1201
|
+
},
|
|
1202
|
+
loading: Boolean,
|
|
1203
|
+
loadingIcon: {
|
|
1204
|
+
type: We,
|
|
1205
|
+
default: () => ht
|
|
1206
|
+
},
|
|
1207
|
+
plain: Boolean,
|
|
1208
|
+
text: Boolean,
|
|
1209
|
+
link: Boolean,
|
|
1210
|
+
bg: Boolean,
|
|
1211
|
+
autofocus: Boolean,
|
|
1212
|
+
round: Boolean,
|
|
1213
|
+
circle: Boolean,
|
|
1214
|
+
color: String,
|
|
1215
|
+
dark: Boolean,
|
|
1216
|
+
autoInsertSpace: {
|
|
1217
|
+
type: Boolean,
|
|
1218
|
+
default: void 0
|
|
1219
|
+
},
|
|
1220
|
+
tag: {
|
|
1221
|
+
type: we([String, Object]),
|
|
1222
|
+
default: "button"
|
|
1223
|
+
}
|
|
1224
|
+
}), is = {
|
|
1225
|
+
click: (e) => e instanceof MouseEvent
|
|
1226
|
+
};
|
|
1227
|
+
function O(e, t) {
|
|
1228
|
+
ls(e) && (e = "100%");
|
|
1229
|
+
var n = us(e);
|
|
1230
|
+
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
1231
|
+
}
|
|
1232
|
+
function Pe(e) {
|
|
1233
|
+
return Math.min(1, Math.max(0, e));
|
|
1234
|
+
}
|
|
1235
|
+
function ls(e) {
|
|
1236
|
+
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
1237
|
+
}
|
|
1238
|
+
function us(e) {
|
|
1239
|
+
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
1240
|
+
}
|
|
1241
|
+
function Ln(e) {
|
|
1242
|
+
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1243
|
+
}
|
|
1244
|
+
function He(e) {
|
|
1245
|
+
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
1246
|
+
}
|
|
1247
|
+
function pe(e) {
|
|
1248
|
+
return e.length === 1 ? "0" + e : String(e);
|
|
1249
|
+
}
|
|
1250
|
+
function ds(e, t, n) {
|
|
1251
|
+
return {
|
|
1252
|
+
r: O(e, 255) * 255,
|
|
1253
|
+
g: O(t, 255) * 255,
|
|
1254
|
+
b: O(n, 255) * 255
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
function ln(e, t, n) {
|
|
1258
|
+
e = O(e, 255), t = O(t, 255), n = O(n, 255);
|
|
1259
|
+
var o = Math.max(e, t, n), s = Math.min(e, t, n), a = 0, r = 0, l = (o + s) / 2;
|
|
1260
|
+
if (o === s)
|
|
1261
|
+
r = 0, a = 0;
|
|
1262
|
+
else {
|
|
1263
|
+
var c = o - s;
|
|
1264
|
+
switch (r = l > 0.5 ? c / (2 - o - s) : c / (o + s), o) {
|
|
1265
|
+
case e:
|
|
1266
|
+
a = (t - n) / c + (t < n ? 6 : 0);
|
|
1267
|
+
break;
|
|
1268
|
+
case t:
|
|
1269
|
+
a = (n - e) / c + 2;
|
|
1270
|
+
break;
|
|
1271
|
+
case n:
|
|
1272
|
+
a = (e - t) / c + 4;
|
|
1273
|
+
break;
|
|
1274
|
+
}
|
|
1275
|
+
a /= 6;
|
|
1276
|
+
}
|
|
1277
|
+
return { h: a, s: r, l };
|
|
1278
|
+
}
|
|
1279
|
+
function dt(e, t, n) {
|
|
1280
|
+
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
1281
|
+
}
|
|
1282
|
+
function cs(e, t, n) {
|
|
1283
|
+
var o, s, a;
|
|
1284
|
+
if (e = O(e, 360), t = O(t, 100), n = O(n, 100), t === 0)
|
|
1285
|
+
s = n, a = n, o = n;
|
|
1286
|
+
else {
|
|
1287
|
+
var r = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - r;
|
|
1288
|
+
o = dt(l, r, e + 1 / 3), s = dt(l, r, e), a = dt(l, r, e - 1 / 3);
|
|
1289
|
+
}
|
|
1290
|
+
return { r: o * 255, g: s * 255, b: a * 255 };
|
|
1291
|
+
}
|
|
1292
|
+
function un(e, t, n) {
|
|
1293
|
+
e = O(e, 255), t = O(t, 255), n = O(n, 255);
|
|
1294
|
+
var o = Math.max(e, t, n), s = Math.min(e, t, n), a = 0, r = o, l = o - s, c = o === 0 ? 0 : l / o;
|
|
1295
|
+
if (o === s)
|
|
1296
|
+
a = 0;
|
|
1297
|
+
else {
|
|
1298
|
+
switch (o) {
|
|
1299
|
+
case e:
|
|
1300
|
+
a = (t - n) / l + (t < n ? 6 : 0);
|
|
1301
|
+
break;
|
|
1302
|
+
case t:
|
|
1303
|
+
a = (n - e) / l + 2;
|
|
1304
|
+
break;
|
|
1305
|
+
case n:
|
|
1306
|
+
a = (e - t) / l + 4;
|
|
1307
|
+
break;
|
|
1308
|
+
}
|
|
1309
|
+
a /= 6;
|
|
1310
|
+
}
|
|
1311
|
+
return { h: a, s: c, v: r };
|
|
1312
|
+
}
|
|
1313
|
+
function fs(e, t, n) {
|
|
1314
|
+
e = O(e, 360) * 6, t = O(t, 100), n = O(n, 100);
|
|
1315
|
+
var o = Math.floor(e), s = e - o, a = n * (1 - t), r = n * (1 - s * t), l = n * (1 - (1 - s) * t), c = o % 6, f = [n, r, a, a, l, n][c], E = [l, n, n, r, a, a][c], C = [a, a, l, n, n, r][c];
|
|
1316
|
+
return { r: f * 255, g: E * 255, b: C * 255 };
|
|
1317
|
+
}
|
|
1318
|
+
function dn(e, t, n, o) {
|
|
1319
|
+
var s = [
|
|
1320
|
+
pe(Math.round(e).toString(16)),
|
|
1321
|
+
pe(Math.round(t).toString(16)),
|
|
1322
|
+
pe(Math.round(n).toString(16))
|
|
1323
|
+
];
|
|
1324
|
+
return o && s[0].startsWith(s[0].charAt(1)) && s[1].startsWith(s[1].charAt(1)) && s[2].startsWith(s[2].charAt(1)) ? s[0].charAt(0) + s[1].charAt(0) + s[2].charAt(0) : s.join("");
|
|
1325
|
+
}
|
|
1326
|
+
function ps(e, t, n, o, s) {
|
|
1327
|
+
var a = [
|
|
1328
|
+
pe(Math.round(e).toString(16)),
|
|
1329
|
+
pe(Math.round(t).toString(16)),
|
|
1330
|
+
pe(Math.round(n).toString(16)),
|
|
1331
|
+
pe(vs(o))
|
|
1332
|
+
];
|
|
1333
|
+
return s && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
|
|
1334
|
+
}
|
|
1335
|
+
function vs(e) {
|
|
1336
|
+
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1337
|
+
}
|
|
1338
|
+
function cn(e) {
|
|
1339
|
+
return q(e) / 255;
|
|
1340
|
+
}
|
|
1341
|
+
function q(e) {
|
|
1342
|
+
return parseInt(e, 16);
|
|
1343
|
+
}
|
|
1344
|
+
function ms(e) {
|
|
1345
|
+
return {
|
|
1346
|
+
r: e >> 16,
|
|
1347
|
+
g: (e & 65280) >> 8,
|
|
1348
|
+
b: e & 255
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
var Et = {
|
|
1352
|
+
aliceblue: "#f0f8ff",
|
|
1353
|
+
antiquewhite: "#faebd7",
|
|
1354
|
+
aqua: "#00ffff",
|
|
1355
|
+
aquamarine: "#7fffd4",
|
|
1356
|
+
azure: "#f0ffff",
|
|
1357
|
+
beige: "#f5f5dc",
|
|
1358
|
+
bisque: "#ffe4c4",
|
|
1359
|
+
black: "#000000",
|
|
1360
|
+
blanchedalmond: "#ffebcd",
|
|
1361
|
+
blue: "#0000ff",
|
|
1362
|
+
blueviolet: "#8a2be2",
|
|
1363
|
+
brown: "#a52a2a",
|
|
1364
|
+
burlywood: "#deb887",
|
|
1365
|
+
cadetblue: "#5f9ea0",
|
|
1366
|
+
chartreuse: "#7fff00",
|
|
1367
|
+
chocolate: "#d2691e",
|
|
1368
|
+
coral: "#ff7f50",
|
|
1369
|
+
cornflowerblue: "#6495ed",
|
|
1370
|
+
cornsilk: "#fff8dc",
|
|
1371
|
+
crimson: "#dc143c",
|
|
1372
|
+
cyan: "#00ffff",
|
|
1373
|
+
darkblue: "#00008b",
|
|
1374
|
+
darkcyan: "#008b8b",
|
|
1375
|
+
darkgoldenrod: "#b8860b",
|
|
1376
|
+
darkgray: "#a9a9a9",
|
|
1377
|
+
darkgreen: "#006400",
|
|
1378
|
+
darkgrey: "#a9a9a9",
|
|
1379
|
+
darkkhaki: "#bdb76b",
|
|
1380
|
+
darkmagenta: "#8b008b",
|
|
1381
|
+
darkolivegreen: "#556b2f",
|
|
1382
|
+
darkorange: "#ff8c00",
|
|
1383
|
+
darkorchid: "#9932cc",
|
|
1384
|
+
darkred: "#8b0000",
|
|
1385
|
+
darksalmon: "#e9967a",
|
|
1386
|
+
darkseagreen: "#8fbc8f",
|
|
1387
|
+
darkslateblue: "#483d8b",
|
|
1388
|
+
darkslategray: "#2f4f4f",
|
|
1389
|
+
darkslategrey: "#2f4f4f",
|
|
1390
|
+
darkturquoise: "#00ced1",
|
|
1391
|
+
darkviolet: "#9400d3",
|
|
1392
|
+
deeppink: "#ff1493",
|
|
1393
|
+
deepskyblue: "#00bfff",
|
|
1394
|
+
dimgray: "#696969",
|
|
1395
|
+
dimgrey: "#696969",
|
|
1396
|
+
dodgerblue: "#1e90ff",
|
|
1397
|
+
firebrick: "#b22222",
|
|
1398
|
+
floralwhite: "#fffaf0",
|
|
1399
|
+
forestgreen: "#228b22",
|
|
1400
|
+
fuchsia: "#ff00ff",
|
|
1401
|
+
gainsboro: "#dcdcdc",
|
|
1402
|
+
ghostwhite: "#f8f8ff",
|
|
1403
|
+
goldenrod: "#daa520",
|
|
1404
|
+
gold: "#ffd700",
|
|
1405
|
+
gray: "#808080",
|
|
1406
|
+
green: "#008000",
|
|
1407
|
+
greenyellow: "#adff2f",
|
|
1408
|
+
grey: "#808080",
|
|
1409
|
+
honeydew: "#f0fff0",
|
|
1410
|
+
hotpink: "#ff69b4",
|
|
1411
|
+
indianred: "#cd5c5c",
|
|
1412
|
+
indigo: "#4b0082",
|
|
1413
|
+
ivory: "#fffff0",
|
|
1414
|
+
khaki: "#f0e68c",
|
|
1415
|
+
lavenderblush: "#fff0f5",
|
|
1416
|
+
lavender: "#e6e6fa",
|
|
1417
|
+
lawngreen: "#7cfc00",
|
|
1418
|
+
lemonchiffon: "#fffacd",
|
|
1419
|
+
lightblue: "#add8e6",
|
|
1420
|
+
lightcoral: "#f08080",
|
|
1421
|
+
lightcyan: "#e0ffff",
|
|
1422
|
+
lightgoldenrodyellow: "#fafad2",
|
|
1423
|
+
lightgray: "#d3d3d3",
|
|
1424
|
+
lightgreen: "#90ee90",
|
|
1425
|
+
lightgrey: "#d3d3d3",
|
|
1426
|
+
lightpink: "#ffb6c1",
|
|
1427
|
+
lightsalmon: "#ffa07a",
|
|
1428
|
+
lightseagreen: "#20b2aa",
|
|
1429
|
+
lightskyblue: "#87cefa",
|
|
1430
|
+
lightslategray: "#778899",
|
|
1431
|
+
lightslategrey: "#778899",
|
|
1432
|
+
lightsteelblue: "#b0c4de",
|
|
1433
|
+
lightyellow: "#ffffe0",
|
|
1434
|
+
lime: "#00ff00",
|
|
1435
|
+
limegreen: "#32cd32",
|
|
1436
|
+
linen: "#faf0e6",
|
|
1437
|
+
magenta: "#ff00ff",
|
|
1438
|
+
maroon: "#800000",
|
|
1439
|
+
mediumaquamarine: "#66cdaa",
|
|
1440
|
+
mediumblue: "#0000cd",
|
|
1441
|
+
mediumorchid: "#ba55d3",
|
|
1442
|
+
mediumpurple: "#9370db",
|
|
1443
|
+
mediumseagreen: "#3cb371",
|
|
1444
|
+
mediumslateblue: "#7b68ee",
|
|
1445
|
+
mediumspringgreen: "#00fa9a",
|
|
1446
|
+
mediumturquoise: "#48d1cc",
|
|
1447
|
+
mediumvioletred: "#c71585",
|
|
1448
|
+
midnightblue: "#191970",
|
|
1449
|
+
mintcream: "#f5fffa",
|
|
1450
|
+
mistyrose: "#ffe4e1",
|
|
1451
|
+
moccasin: "#ffe4b5",
|
|
1452
|
+
navajowhite: "#ffdead",
|
|
1453
|
+
navy: "#000080",
|
|
1454
|
+
oldlace: "#fdf5e6",
|
|
1455
|
+
olive: "#808000",
|
|
1456
|
+
olivedrab: "#6b8e23",
|
|
1457
|
+
orange: "#ffa500",
|
|
1458
|
+
orangered: "#ff4500",
|
|
1459
|
+
orchid: "#da70d6",
|
|
1460
|
+
palegoldenrod: "#eee8aa",
|
|
1461
|
+
palegreen: "#98fb98",
|
|
1462
|
+
paleturquoise: "#afeeee",
|
|
1463
|
+
palevioletred: "#db7093",
|
|
1464
|
+
papayawhip: "#ffefd5",
|
|
1465
|
+
peachpuff: "#ffdab9",
|
|
1466
|
+
peru: "#cd853f",
|
|
1467
|
+
pink: "#ffc0cb",
|
|
1468
|
+
plum: "#dda0dd",
|
|
1469
|
+
powderblue: "#b0e0e6",
|
|
1470
|
+
purple: "#800080",
|
|
1471
|
+
rebeccapurple: "#663399",
|
|
1472
|
+
red: "#ff0000",
|
|
1473
|
+
rosybrown: "#bc8f8f",
|
|
1474
|
+
royalblue: "#4169e1",
|
|
1475
|
+
saddlebrown: "#8b4513",
|
|
1476
|
+
salmon: "#fa8072",
|
|
1477
|
+
sandybrown: "#f4a460",
|
|
1478
|
+
seagreen: "#2e8b57",
|
|
1479
|
+
seashell: "#fff5ee",
|
|
1480
|
+
sienna: "#a0522d",
|
|
1481
|
+
silver: "#c0c0c0",
|
|
1482
|
+
skyblue: "#87ceeb",
|
|
1483
|
+
slateblue: "#6a5acd",
|
|
1484
|
+
slategray: "#708090",
|
|
1485
|
+
slategrey: "#708090",
|
|
1486
|
+
snow: "#fffafa",
|
|
1487
|
+
springgreen: "#00ff7f",
|
|
1488
|
+
steelblue: "#4682b4",
|
|
1489
|
+
tan: "#d2b48c",
|
|
1490
|
+
teal: "#008080",
|
|
1491
|
+
thistle: "#d8bfd8",
|
|
1492
|
+
tomato: "#ff6347",
|
|
1493
|
+
turquoise: "#40e0d0",
|
|
1494
|
+
violet: "#ee82ee",
|
|
1495
|
+
wheat: "#f5deb3",
|
|
1496
|
+
white: "#ffffff",
|
|
1497
|
+
whitesmoke: "#f5f5f5",
|
|
1498
|
+
yellow: "#ffff00",
|
|
1499
|
+
yellowgreen: "#9acd32"
|
|
1500
|
+
};
|
|
1501
|
+
function hs(e) {
|
|
1502
|
+
var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, s = null, a = null, r = !1, l = !1;
|
|
1503
|
+
return typeof e == "string" && (e = ys(e)), typeof e == "object" && (oe(e.r) && oe(e.g) && oe(e.b) ? (t = ds(e.r, e.g, e.b), r = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : oe(e.h) && oe(e.s) && oe(e.v) ? (o = He(e.s), s = He(e.v), t = fs(e.h, o, s), r = !0, l = "hsv") : oe(e.h) && oe(e.s) && oe(e.l) && (o = He(e.s), a = He(e.l), t = cs(e.h, o, a), r = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ln(n), {
|
|
1504
|
+
ok: r,
|
|
1505
|
+
format: e.format || l,
|
|
1506
|
+
r: Math.min(255, Math.max(t.r, 0)),
|
|
1507
|
+
g: Math.min(255, Math.max(t.g, 0)),
|
|
1508
|
+
b: Math.min(255, Math.max(t.b, 0)),
|
|
1509
|
+
a: n
|
|
1510
|
+
};
|
|
1511
|
+
}
|
|
1512
|
+
var gs = "[-\\+]?\\d+%?", bs = "[-\\+]?\\d*\\.\\d+%?", le = "(?:".concat(bs, ")|(?:").concat(gs, ")"), ct = "[\\s|\\(]+(".concat(le, ")[,|\\s]+(").concat(le, ")[,|\\s]+(").concat(le, ")\\s*\\)?"), ft = "[\\s|\\(]+(".concat(le, ")[,|\\s]+(").concat(le, ")[,|\\s]+(").concat(le, ")[,|\\s]+(").concat(le, ")\\s*\\)?"), ee = {
|
|
1513
|
+
CSS_UNIT: new RegExp(le),
|
|
1514
|
+
rgb: new RegExp("rgb" + ct),
|
|
1515
|
+
rgba: new RegExp("rgba" + ft),
|
|
1516
|
+
hsl: new RegExp("hsl" + ct),
|
|
1517
|
+
hsla: new RegExp("hsla" + ft),
|
|
1518
|
+
hsv: new RegExp("hsv" + ct),
|
|
1519
|
+
hsva: new RegExp("hsva" + ft),
|
|
1520
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1521
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1522
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1523
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1524
|
+
};
|
|
1525
|
+
function ys(e) {
|
|
1526
|
+
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
1527
|
+
return !1;
|
|
1528
|
+
var t = !1;
|
|
1529
|
+
if (Et[e])
|
|
1530
|
+
e = Et[e], t = !0;
|
|
1531
|
+
else if (e === "transparent")
|
|
1532
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1533
|
+
var n = ee.rgb.exec(e);
|
|
1534
|
+
return n ? { r: n[1], g: n[2], b: n[3] } : (n = ee.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = ee.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = ee.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = ee.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = ee.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = ee.hex8.exec(e), n ? {
|
|
1535
|
+
r: q(n[1]),
|
|
1536
|
+
g: q(n[2]),
|
|
1537
|
+
b: q(n[3]),
|
|
1538
|
+
a: cn(n[4]),
|
|
1539
|
+
format: t ? "name" : "hex8"
|
|
1540
|
+
} : (n = ee.hex6.exec(e), n ? {
|
|
1541
|
+
r: q(n[1]),
|
|
1542
|
+
g: q(n[2]),
|
|
1543
|
+
b: q(n[3]),
|
|
1544
|
+
format: t ? "name" : "hex"
|
|
1545
|
+
} : (n = ee.hex4.exec(e), n ? {
|
|
1546
|
+
r: q(n[1] + n[1]),
|
|
1547
|
+
g: q(n[2] + n[2]),
|
|
1548
|
+
b: q(n[3] + n[3]),
|
|
1549
|
+
a: cn(n[4] + n[4]),
|
|
1550
|
+
format: t ? "name" : "hex8"
|
|
1551
|
+
} : (n = ee.hex3.exec(e), n ? {
|
|
1552
|
+
r: q(n[1] + n[1]),
|
|
1553
|
+
g: q(n[2] + n[2]),
|
|
1554
|
+
b: q(n[3] + n[3]),
|
|
1555
|
+
format: t ? "name" : "hex"
|
|
1556
|
+
} : !1)))))))));
|
|
1557
|
+
}
|
|
1558
|
+
function oe(e) {
|
|
1559
|
+
return !!ee.CSS_UNIT.exec(String(e));
|
|
1560
|
+
}
|
|
1561
|
+
var Ss = (
|
|
1562
|
+
/** @class */
|
|
1563
|
+
function() {
|
|
1564
|
+
function e(t, n) {
|
|
1565
|
+
t === void 0 && (t = ""), n === void 0 && (n = {});
|
|
1566
|
+
var o;
|
|
1567
|
+
if (t instanceof e)
|
|
1568
|
+
return t;
|
|
1569
|
+
typeof t == "number" && (t = ms(t)), this.originalInput = t;
|
|
1570
|
+
var s = hs(t);
|
|
1571
|
+
this.originalInput = t, this.r = s.r, this.g = s.g, this.b = s.b, this.a = s.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : s.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = s.ok;
|
|
1572
|
+
}
|
|
1573
|
+
return e.prototype.isDark = function() {
|
|
1574
|
+
return this.getBrightness() < 128;
|
|
1575
|
+
}, e.prototype.isLight = function() {
|
|
1576
|
+
return !this.isDark();
|
|
1577
|
+
}, e.prototype.getBrightness = function() {
|
|
1578
|
+
var t = this.toRgb();
|
|
1579
|
+
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
1580
|
+
}, e.prototype.getLuminance = function() {
|
|
1581
|
+
var t = this.toRgb(), n, o, s, a = t.r / 255, r = t.g / 255, l = t.b / 255;
|
|
1582
|
+
return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), r <= 0.03928 ? o = r / 12.92 : o = Math.pow((r + 0.055) / 1.055, 2.4), l <= 0.03928 ? s = l / 12.92 : s = Math.pow((l + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * s;
|
|
1583
|
+
}, e.prototype.getAlpha = function() {
|
|
1584
|
+
return this.a;
|
|
1585
|
+
}, e.prototype.setAlpha = function(t) {
|
|
1586
|
+
return this.a = Ln(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
1587
|
+
}, e.prototype.isMonochrome = function() {
|
|
1588
|
+
var t = this.toHsl().s;
|
|
1589
|
+
return t === 0;
|
|
1590
|
+
}, e.prototype.toHsv = function() {
|
|
1591
|
+
var t = un(this.r, this.g, this.b);
|
|
1592
|
+
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
|
|
1593
|
+
}, e.prototype.toHsvString = function() {
|
|
1594
|
+
var t = un(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), s = Math.round(t.v * 100);
|
|
1595
|
+
return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(s, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(s, "%, ").concat(this.roundA, ")");
|
|
1596
|
+
}, e.prototype.toHsl = function() {
|
|
1597
|
+
var t = ln(this.r, this.g, this.b);
|
|
1598
|
+
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
|
|
1599
|
+
}, e.prototype.toHslString = function() {
|
|
1600
|
+
var t = ln(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), s = Math.round(t.l * 100);
|
|
1601
|
+
return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(s, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(s, "%, ").concat(this.roundA, ")");
|
|
1602
|
+
}, e.prototype.toHex = function(t) {
|
|
1603
|
+
return t === void 0 && (t = !1), dn(this.r, this.g, this.b, t);
|
|
1604
|
+
}, e.prototype.toHexString = function(t) {
|
|
1605
|
+
return t === void 0 && (t = !1), "#" + this.toHex(t);
|
|
1606
|
+
}, e.prototype.toHex8 = function(t) {
|
|
1607
|
+
return t === void 0 && (t = !1), ps(this.r, this.g, this.b, this.a, t);
|
|
1608
|
+
}, e.prototype.toHex8String = function(t) {
|
|
1609
|
+
return t === void 0 && (t = !1), "#" + this.toHex8(t);
|
|
1610
|
+
}, e.prototype.toHexShortString = function(t) {
|
|
1611
|
+
return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
|
|
1612
|
+
}, e.prototype.toRgb = function() {
|
|
1613
|
+
return {
|
|
1614
|
+
r: Math.round(this.r),
|
|
1615
|
+
g: Math.round(this.g),
|
|
1616
|
+
b: Math.round(this.b),
|
|
1617
|
+
a: this.a
|
|
1618
|
+
};
|
|
1619
|
+
}, e.prototype.toRgbString = function() {
|
|
1620
|
+
var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
|
|
1621
|
+
return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
|
|
1622
|
+
}, e.prototype.toPercentageRgb = function() {
|
|
1623
|
+
var t = function(n) {
|
|
1624
|
+
return "".concat(Math.round(O(n, 255) * 100), "%");
|
|
1625
|
+
};
|
|
1626
|
+
return {
|
|
1627
|
+
r: t(this.r),
|
|
1628
|
+
g: t(this.g),
|
|
1629
|
+
b: t(this.b),
|
|
1630
|
+
a: this.a
|
|
1631
|
+
};
|
|
1632
|
+
}, e.prototype.toPercentageRgbString = function() {
|
|
1633
|
+
var t = function(n) {
|
|
1634
|
+
return Math.round(O(n, 255) * 100);
|
|
1635
|
+
};
|
|
1636
|
+
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
|
|
1637
|
+
}, e.prototype.toName = function() {
|
|
1638
|
+
if (this.a === 0)
|
|
1639
|
+
return "transparent";
|
|
1640
|
+
if (this.a < 1)
|
|
1641
|
+
return !1;
|
|
1642
|
+
for (var t = "#" + dn(this.r, this.g, this.b, !1), n = 0, o = Object.entries(Et); n < o.length; n++) {
|
|
1643
|
+
var s = o[n], a = s[0], r = s[1];
|
|
1644
|
+
if (t === r)
|
|
1645
|
+
return a;
|
|
1646
|
+
}
|
|
1647
|
+
return !1;
|
|
1648
|
+
}, e.prototype.toString = function(t) {
|
|
1649
|
+
var n = !!t;
|
|
1650
|
+
t = t ?? this.format;
|
|
1651
|
+
var o = !1, s = this.a < 1 && this.a >= 0, a = !n && s && (t.startsWith("hex") || t === "name");
|
|
1652
|
+
return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
|
|
1653
|
+
}, e.prototype.toNumber = function() {
|
|
1654
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
1655
|
+
}, e.prototype.clone = function() {
|
|
1656
|
+
return new e(this.toString());
|
|
1657
|
+
}, e.prototype.lighten = function(t) {
|
|
1658
|
+
t === void 0 && (t = 10);
|
|
1659
|
+
var n = this.toHsl();
|
|
1660
|
+
return n.l += t / 100, n.l = Pe(n.l), new e(n);
|
|
1661
|
+
}, e.prototype.brighten = function(t) {
|
|
1662
|
+
t === void 0 && (t = 10);
|
|
1663
|
+
var n = this.toRgb();
|
|
1664
|
+
return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
|
|
1665
|
+
}, e.prototype.darken = function(t) {
|
|
1666
|
+
t === void 0 && (t = 10);
|
|
1667
|
+
var n = this.toHsl();
|
|
1668
|
+
return n.l -= t / 100, n.l = Pe(n.l), new e(n);
|
|
1669
|
+
}, e.prototype.tint = function(t) {
|
|
1670
|
+
return t === void 0 && (t = 10), this.mix("white", t);
|
|
1671
|
+
}, e.prototype.shade = function(t) {
|
|
1672
|
+
return t === void 0 && (t = 10), this.mix("black", t);
|
|
1673
|
+
}, e.prototype.desaturate = function(t) {
|
|
1674
|
+
t === void 0 && (t = 10);
|
|
1675
|
+
var n = this.toHsl();
|
|
1676
|
+
return n.s -= t / 100, n.s = Pe(n.s), new e(n);
|
|
1677
|
+
}, e.prototype.saturate = function(t) {
|
|
1678
|
+
t === void 0 && (t = 10);
|
|
1679
|
+
var n = this.toHsl();
|
|
1680
|
+
return n.s += t / 100, n.s = Pe(n.s), new e(n);
|
|
1681
|
+
}, e.prototype.greyscale = function() {
|
|
1682
|
+
return this.desaturate(100);
|
|
1683
|
+
}, e.prototype.spin = function(t) {
|
|
1684
|
+
var n = this.toHsl(), o = (n.h + t) % 360;
|
|
1685
|
+
return n.h = o < 0 ? 360 + o : o, new e(n);
|
|
1686
|
+
}, e.prototype.mix = function(t, n) {
|
|
1687
|
+
n === void 0 && (n = 50);
|
|
1688
|
+
var o = this.toRgb(), s = new e(t).toRgb(), a = n / 100, r = {
|
|
1689
|
+
r: (s.r - o.r) * a + o.r,
|
|
1690
|
+
g: (s.g - o.g) * a + o.g,
|
|
1691
|
+
b: (s.b - o.b) * a + o.b,
|
|
1692
|
+
a: (s.a - o.a) * a + o.a
|
|
1693
|
+
};
|
|
1694
|
+
return new e(r);
|
|
1695
|
+
}, e.prototype.analogous = function(t, n) {
|
|
1696
|
+
t === void 0 && (t = 6), n === void 0 && (n = 30);
|
|
1697
|
+
var o = this.toHsl(), s = 360 / n, a = [this];
|
|
1698
|
+
for (o.h = (o.h - (s * t >> 1) + 720) % 360; --t; )
|
|
1699
|
+
o.h = (o.h + s) % 360, a.push(new e(o));
|
|
1700
|
+
return a;
|
|
1701
|
+
}, e.prototype.complement = function() {
|
|
1702
|
+
var t = this.toHsl();
|
|
1703
|
+
return t.h = (t.h + 180) % 360, new e(t);
|
|
1704
|
+
}, e.prototype.monochromatic = function(t) {
|
|
1705
|
+
t === void 0 && (t = 6);
|
|
1706
|
+
for (var n = this.toHsv(), o = n.h, s = n.s, a = n.v, r = [], l = 1 / t; t--; )
|
|
1707
|
+
r.push(new e({ h: o, s, v: a })), a = (a + l) % 1;
|
|
1708
|
+
return r;
|
|
1709
|
+
}, e.prototype.splitcomplement = function() {
|
|
1710
|
+
var t = this.toHsl(), n = t.h;
|
|
1711
|
+
return [
|
|
1712
|
+
this,
|
|
1713
|
+
new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
|
|
1714
|
+
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
|
|
1715
|
+
];
|
|
1716
|
+
}, e.prototype.onBackground = function(t) {
|
|
1717
|
+
var n = this.toRgb(), o = new e(t).toRgb(), s = n.a + o.a * (1 - n.a);
|
|
1718
|
+
return new e({
|
|
1719
|
+
r: (n.r * n.a + o.r * o.a * (1 - n.a)) / s,
|
|
1720
|
+
g: (n.g * n.a + o.g * o.a * (1 - n.a)) / s,
|
|
1721
|
+
b: (n.b * n.a + o.b * o.a * (1 - n.a)) / s,
|
|
1722
|
+
a: s
|
|
1723
|
+
});
|
|
1724
|
+
}, e.prototype.triad = function() {
|
|
1725
|
+
return this.polyad(3);
|
|
1726
|
+
}, e.prototype.tetrad = function() {
|
|
1727
|
+
return this.polyad(4);
|
|
1728
|
+
}, e.prototype.polyad = function(t) {
|
|
1729
|
+
for (var n = this.toHsl(), o = n.h, s = [this], a = 360 / t, r = 1; r < t; r++)
|
|
1730
|
+
s.push(new e({ h: (o + r * a) % 360, s: n.s, l: n.l }));
|
|
1731
|
+
return s;
|
|
1732
|
+
}, e.prototype.equals = function(t) {
|
|
1733
|
+
return this.toRgbString() === new e(t).toRgbString();
|
|
1734
|
+
}, e;
|
|
1735
|
+
}()
|
|
1736
|
+
);
|
|
1737
|
+
function ae(e, t = 20) {
|
|
1738
|
+
return e.mix("#141414", t).toString();
|
|
1739
|
+
}
|
|
1740
|
+
function Es(e) {
|
|
1741
|
+
const t = kt(), n = ge("button");
|
|
1742
|
+
return w(() => {
|
|
1743
|
+
let o = {}, s = e.color;
|
|
1744
|
+
if (s) {
|
|
1745
|
+
const a = s.match(/var\((.*?)\)/);
|
|
1746
|
+
a && (s = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
|
|
1747
|
+
const r = new Ss(s), l = e.dark ? r.tint(20).toString() : ae(r, 20);
|
|
1748
|
+
if (e.plain)
|
|
1749
|
+
o = n.cssVarBlock({
|
|
1750
|
+
"bg-color": e.dark ? ae(r, 90) : r.tint(90).toString(),
|
|
1751
|
+
"text-color": s,
|
|
1752
|
+
"border-color": e.dark ? ae(r, 50) : r.tint(50).toString(),
|
|
1753
|
+
"hover-text-color": `var(${n.cssVarName("color-white")})`,
|
|
1754
|
+
"hover-bg-color": s,
|
|
1755
|
+
"hover-border-color": s,
|
|
1756
|
+
"active-bg-color": l,
|
|
1757
|
+
"active-text-color": `var(${n.cssVarName("color-white")})`,
|
|
1758
|
+
"active-border-color": l
|
|
1759
|
+
}), t.value && (o[n.cssVarBlockName("disabled-bg-color")] = e.dark ? ae(r, 90) : r.tint(90).toString(), o[n.cssVarBlockName("disabled-text-color")] = e.dark ? ae(r, 50) : r.tint(50).toString(), o[n.cssVarBlockName("disabled-border-color")] = e.dark ? ae(r, 80) : r.tint(80).toString());
|
|
1760
|
+
else {
|
|
1761
|
+
const c = e.dark ? ae(r, 30) : r.tint(30).toString(), f = r.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
|
|
1762
|
+
if (o = n.cssVarBlock({
|
|
1763
|
+
"bg-color": s,
|
|
1764
|
+
"text-color": f,
|
|
1765
|
+
"border-color": s,
|
|
1766
|
+
"hover-bg-color": c,
|
|
1767
|
+
"hover-text-color": f,
|
|
1768
|
+
"hover-border-color": c,
|
|
1769
|
+
"active-bg-color": l,
|
|
1770
|
+
"active-border-color": l
|
|
1771
|
+
}), t.value) {
|
|
1772
|
+
const E = e.dark ? ae(r, 50) : r.tint(50).toString();
|
|
1773
|
+
o[n.cssVarBlockName("disabled-bg-color")] = E, o[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, o[n.cssVarBlockName("disabled-border-color")] = E;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
return o;
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
const ws = J({
|
|
1781
|
+
name: "ElButton"
|
|
1782
|
+
}), Cs = /* @__PURE__ */ J({
|
|
1783
|
+
...ws,
|
|
1784
|
+
props: St,
|
|
1785
|
+
emits: is,
|
|
1786
|
+
setup(e, { expose: t, emit: n }) {
|
|
1787
|
+
const o = e, s = Es(o), a = ge("button"), { _ref: r, _size: l, _type: c, _disabled: f, _props: E, shouldAddSpace: C, handleClick: y } = as(o, n), v = w(() => [
|
|
1788
|
+
a.b(),
|
|
1789
|
+
a.m(c.value),
|
|
1790
|
+
a.m(l.value),
|
|
1791
|
+
a.is("disabled", f.value),
|
|
1792
|
+
a.is("loading", o.loading),
|
|
1793
|
+
a.is("plain", o.plain),
|
|
1794
|
+
a.is("round", o.round),
|
|
1795
|
+
a.is("circle", o.circle),
|
|
1796
|
+
a.is("text", o.text),
|
|
1797
|
+
a.is("link", o.link),
|
|
1798
|
+
a.is("has-bg", o.bg)
|
|
1799
|
+
]);
|
|
1800
|
+
return t({
|
|
1801
|
+
ref: r,
|
|
1802
|
+
size: l,
|
|
1803
|
+
type: c,
|
|
1804
|
+
disabled: f,
|
|
1805
|
+
shouldAddSpace: C
|
|
1806
|
+
}), (i, d) => (S(), R(te(i.tag), ze({
|
|
1807
|
+
ref_key: "_ref",
|
|
1808
|
+
ref: r
|
|
1809
|
+
}, u(E), {
|
|
1810
|
+
class: u(v),
|
|
1811
|
+
style: u(s),
|
|
1812
|
+
onClick: u(y)
|
|
1813
|
+
}), {
|
|
1814
|
+
default: h(() => [
|
|
1815
|
+
i.loading ? (S(), F(Ee, { key: 0 }, [
|
|
1816
|
+
i.$slots.loading ? X(i.$slots, "loading", { key: 0 }) : (S(), R(u(ie), {
|
|
1817
|
+
key: 1,
|
|
1818
|
+
class: I(u(a).is("loading"))
|
|
1819
|
+
}, {
|
|
1820
|
+
default: h(() => [
|
|
1821
|
+
(S(), R(te(i.loadingIcon)))
|
|
1822
|
+
]),
|
|
1823
|
+
_: 1
|
|
1824
|
+
}, 8, ["class"]))
|
|
1825
|
+
], 64)) : i.icon || i.$slots.icon ? (S(), R(u(ie), { key: 1 }, {
|
|
1826
|
+
default: h(() => [
|
|
1827
|
+
i.icon ? (S(), R(te(i.icon), { key: 0 })) : X(i.$slots, "icon", { key: 1 })
|
|
1828
|
+
]),
|
|
1829
|
+
_: 3
|
|
1830
|
+
})) : A("v-if", !0),
|
|
1831
|
+
i.$slots.default ? (S(), F("span", {
|
|
1832
|
+
key: 2,
|
|
1833
|
+
class: I({ [u(a).em("text", "expand")]: u(C) })
|
|
1834
|
+
}, [
|
|
1835
|
+
X(i.$slots, "default")
|
|
1836
|
+
], 2)) : A("v-if", !0)
|
|
1837
|
+
]),
|
|
1838
|
+
_: 3
|
|
1839
|
+
}, 16, ["class", "style", "onClick"]));
|
|
1840
|
+
}
|
|
1841
|
+
});
|
|
1842
|
+
var Ts = /* @__PURE__ */ Ve(Cs, [["__file", "button.vue"]]);
|
|
1843
|
+
const Is = {
|
|
1844
|
+
size: St.size,
|
|
1845
|
+
type: St.type
|
|
1846
|
+
}, ks = J({
|
|
1847
|
+
name: "ElButtonGroup"
|
|
1848
|
+
}), Ms = /* @__PURE__ */ J({
|
|
1849
|
+
...ks,
|
|
1850
|
+
props: Is,
|
|
1851
|
+
setup(e) {
|
|
1852
|
+
const t = e;
|
|
1853
|
+
mn(Nn, Ge({
|
|
1854
|
+
size: Ke(t, "size"),
|
|
1855
|
+
type: Ke(t, "type")
|
|
1856
|
+
}));
|
|
1857
|
+
const n = ge("button");
|
|
1858
|
+
return (o, s) => (S(), F("div", {
|
|
1859
|
+
class: I(u(n).b("group"))
|
|
1860
|
+
}, [
|
|
1861
|
+
X(o.$slots, "default")
|
|
1862
|
+
], 2));
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
var $n = /* @__PURE__ */ Ve(Ms, [["__file", "button-group.vue"]]);
|
|
1866
|
+
const As = Cn(Ts, {
|
|
1867
|
+
ButtonGroup: $n
|
|
1868
|
+
});
|
|
1869
|
+
To($n);
|
|
1870
|
+
const wt = "_trap-focus-children", ve = [], fn = (e) => {
|
|
1871
|
+
var t;
|
|
1872
|
+
if (ve.length === 0)
|
|
1873
|
+
return;
|
|
1874
|
+
const n = ve[ve.length - 1][wt];
|
|
1875
|
+
if (n.length > 0 && e.code === Tt.tab) {
|
|
1876
|
+
if (n.length === 1) {
|
|
1877
|
+
e.preventDefault(), document.activeElement !== n[0] && n[0].focus();
|
|
1878
|
+
return;
|
|
1879
|
+
}
|
|
1880
|
+
const o = e.shiftKey, s = e.target === n[0], a = e.target === n[n.length - 1];
|
|
1881
|
+
if (s && o && (e.preventDefault(), n[n.length - 1].focus()), a && !o && (e.preventDefault(), n[0].focus()), process.env.NODE_ENV === "test") {
|
|
1882
|
+
const r = n.indexOf(e.target);
|
|
1883
|
+
r !== -1 && ((t = n[o ? r - 1 : r + 1]) == null || t.focus());
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
}, Rs = {
|
|
1887
|
+
beforeMount(e) {
|
|
1888
|
+
e[wt] = Wt(e), ve.push(e), ve.length <= 1 && document.addEventListener("keydown", fn);
|
|
1889
|
+
},
|
|
1890
|
+
updated(e) {
|
|
1891
|
+
D(() => {
|
|
1892
|
+
e[wt] = Wt(e);
|
|
1893
|
+
});
|
|
1894
|
+
},
|
|
1895
|
+
unmounted() {
|
|
1896
|
+
ve.shift(), ve.length === 0 && document.removeEventListener("keydown", fn);
|
|
1897
|
+
}
|
|
1898
|
+
}, _s = Je({
|
|
1899
|
+
mask: {
|
|
1900
|
+
type: Boolean,
|
|
1901
|
+
default: !0
|
|
1902
|
+
},
|
|
1903
|
+
customMaskEvent: Boolean,
|
|
1904
|
+
overlayClass: {
|
|
1905
|
+
type: we([
|
|
1906
|
+
String,
|
|
1907
|
+
Array,
|
|
1908
|
+
Object
|
|
1909
|
+
])
|
|
1910
|
+
},
|
|
1911
|
+
zIndex: {
|
|
1912
|
+
type: we([String, Number])
|
|
1913
|
+
}
|
|
1914
|
+
}), Bs = {
|
|
1915
|
+
click: (e) => e instanceof MouseEvent
|
|
1916
|
+
}, xs = "overlay";
|
|
1917
|
+
var Vs = J({
|
|
1918
|
+
name: "ElOverlay",
|
|
1919
|
+
props: _s,
|
|
1920
|
+
emits: Bs,
|
|
1921
|
+
setup(e, { slots: t, emit: n }) {
|
|
1922
|
+
const o = ge(xs), s = (c) => {
|
|
1923
|
+
n("click", c);
|
|
1924
|
+
}, { onClick: a, onMousedown: r, onMouseup: l } = Rn(e.customMaskEvent ? void 0 : s);
|
|
1925
|
+
return () => e.mask ? m("div", {
|
|
1926
|
+
class: [o.b(), e.overlayClass],
|
|
1927
|
+
style: {
|
|
1928
|
+
zIndex: e.zIndex
|
|
1929
|
+
},
|
|
1930
|
+
onClick: a,
|
|
1931
|
+
onMousedown: r,
|
|
1932
|
+
onMouseup: l
|
|
1933
|
+
}, [X(t, "default")], qe.STYLE | qe.CLASS | qe.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Zn("div", {
|
|
1934
|
+
class: e.overlayClass,
|
|
1935
|
+
style: {
|
|
1936
|
+
zIndex: e.zIndex,
|
|
1937
|
+
position: "fixed",
|
|
1938
|
+
top: "0px",
|
|
1939
|
+
right: "0px",
|
|
1940
|
+
bottom: "0px",
|
|
1941
|
+
left: "0px"
|
|
1942
|
+
}
|
|
1943
|
+
}, [X(t, "default")]);
|
|
1944
|
+
}
|
|
1945
|
+
});
|
|
1946
|
+
const Ns = Vs, Ls = J({
|
|
1947
|
+
name: "ElMessageBox",
|
|
1948
|
+
directives: {
|
|
1949
|
+
TrapFocus: Rs
|
|
1950
|
+
},
|
|
1951
|
+
components: {
|
|
1952
|
+
ElButton: As,
|
|
1953
|
+
ElFocusTrap: os,
|
|
1954
|
+
ElInput: qa,
|
|
1955
|
+
ElOverlay: Ns,
|
|
1956
|
+
ElIcon: ie,
|
|
1957
|
+
...Io
|
|
1958
|
+
},
|
|
1959
|
+
inheritAttrs: !1,
|
|
1960
|
+
props: {
|
|
1961
|
+
buttonSize: {
|
|
1962
|
+
type: String,
|
|
1963
|
+
validator: ya
|
|
1964
|
+
},
|
|
1965
|
+
modal: {
|
|
1966
|
+
type: Boolean,
|
|
1967
|
+
default: !0
|
|
1968
|
+
},
|
|
1969
|
+
lockScroll: {
|
|
1970
|
+
type: Boolean,
|
|
1971
|
+
default: !0
|
|
1972
|
+
},
|
|
1973
|
+
showClose: {
|
|
1974
|
+
type: Boolean,
|
|
1975
|
+
default: !0
|
|
1976
|
+
},
|
|
1977
|
+
closeOnClickModal: {
|
|
1978
|
+
type: Boolean,
|
|
1979
|
+
default: !0
|
|
1980
|
+
},
|
|
1981
|
+
closeOnPressEscape: {
|
|
1982
|
+
type: Boolean,
|
|
1983
|
+
default: !0
|
|
1984
|
+
},
|
|
1985
|
+
closeOnHashChange: {
|
|
1986
|
+
type: Boolean,
|
|
1987
|
+
default: !0
|
|
1988
|
+
},
|
|
1989
|
+
center: Boolean,
|
|
1990
|
+
draggable: Boolean,
|
|
1991
|
+
overflow: Boolean,
|
|
1992
|
+
roundButton: {
|
|
1993
|
+
default: !1,
|
|
1994
|
+
type: Boolean
|
|
1995
|
+
},
|
|
1996
|
+
container: {
|
|
1997
|
+
type: String,
|
|
1998
|
+
default: "body"
|
|
1999
|
+
},
|
|
2000
|
+
boxType: {
|
|
2001
|
+
type: String,
|
|
2002
|
+
default: ""
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
emits: ["vanish", "action"],
|
|
2006
|
+
setup(e, { emit: t }) {
|
|
2007
|
+
const {
|
|
2008
|
+
locale: n,
|
|
2009
|
+
zIndex: o,
|
|
2010
|
+
ns: s,
|
|
2011
|
+
size: a
|
|
2012
|
+
} = ko("message-box", w(() => e.buttonSize)), { t: r } = n, { nextZIndex: l } = o, c = M(!1), f = Ge({
|
|
2013
|
+
autofocus: !0,
|
|
2014
|
+
beforeClose: null,
|
|
2015
|
+
callback: null,
|
|
2016
|
+
cancelButtonText: "",
|
|
2017
|
+
cancelButtonClass: "",
|
|
2018
|
+
confirmButtonText: "",
|
|
2019
|
+
confirmButtonClass: "",
|
|
2020
|
+
customClass: "",
|
|
2021
|
+
customStyle: {},
|
|
2022
|
+
dangerouslyUseHTMLString: !1,
|
|
2023
|
+
distinguishCancelAndClose: !1,
|
|
2024
|
+
icon: "",
|
|
2025
|
+
inputPattern: null,
|
|
2026
|
+
inputPlaceholder: "",
|
|
2027
|
+
inputType: "text",
|
|
2028
|
+
inputValue: null,
|
|
2029
|
+
inputValidator: null,
|
|
2030
|
+
inputErrorMessage: "",
|
|
2031
|
+
message: null,
|
|
2032
|
+
modalFade: !0,
|
|
2033
|
+
modalClass: "",
|
|
2034
|
+
showCancelButton: !1,
|
|
2035
|
+
showConfirmButton: !0,
|
|
2036
|
+
type: "",
|
|
2037
|
+
title: void 0,
|
|
2038
|
+
showInput: !1,
|
|
2039
|
+
action: "",
|
|
2040
|
+
confirmButtonLoading: !1,
|
|
2041
|
+
cancelButtonLoading: !1,
|
|
2042
|
+
confirmButtonLoadingIcon: Pt(ht),
|
|
2043
|
+
cancelButtonLoadingIcon: Pt(ht),
|
|
2044
|
+
confirmButtonDisabled: !1,
|
|
2045
|
+
editorErrorMessage: "",
|
|
2046
|
+
validateError: !1,
|
|
2047
|
+
zIndex: l()
|
|
2048
|
+
}), E = w(() => {
|
|
2049
|
+
const B = f.type;
|
|
2050
|
+
return { [s.bm("icon", B)]: B && Gt[B] };
|
|
2051
|
+
}), C = yt(), y = yt(), v = w(() => f.icon || Gt[f.type] || ""), i = w(() => !!f.message), d = M(), g = M(), b = M(), T = M(), P = M(), L = w(() => f.confirmButtonClass);
|
|
2052
|
+
K(() => f.inputValue, async (B) => {
|
|
2053
|
+
await D(), e.boxType === "prompt" && B !== null && $();
|
|
2054
|
+
}, { immediate: !0 }), K(() => c.value, (B) => {
|
|
2055
|
+
var Z, U;
|
|
2056
|
+
B && (e.boxType !== "prompt" && (f.autofocus ? b.value = (U = (Z = P.value) == null ? void 0 : Z.$el) != null ? U : d.value : b.value = d.value), f.zIndex = l()), e.boxType === "prompt" && (B ? D().then(() => {
|
|
2057
|
+
var ce;
|
|
2058
|
+
T.value && T.value.$el && (f.autofocus ? b.value = (ce = j()) != null ? ce : d.value : b.value = d.value);
|
|
2059
|
+
}) : (f.editorErrorMessage = "", f.validateError = !1));
|
|
2060
|
+
});
|
|
2061
|
+
const G = w(() => e.draggable), Y = w(() => e.overflow);
|
|
2062
|
+
Ia(d, g, G, Y), de(async () => {
|
|
2063
|
+
await D(), e.closeOnHashChange && window.addEventListener("hashchange", N);
|
|
2064
|
+
}), xe(() => {
|
|
2065
|
+
e.closeOnHashChange && window.removeEventListener("hashchange", N);
|
|
2066
|
+
});
|
|
2067
|
+
function N() {
|
|
2068
|
+
c.value && (c.value = !1, D(() => {
|
|
2069
|
+
f.action && t("action", f.action);
|
|
2070
|
+
}));
|
|
2071
|
+
}
|
|
2072
|
+
const z = () => {
|
|
2073
|
+
e.closeOnClickModal && k(f.distinguishCancelAndClose ? "close" : "cancel");
|
|
2074
|
+
}, H = Rn(z), W = (B) => {
|
|
2075
|
+
if (f.inputType !== "textarea")
|
|
2076
|
+
return B.preventDefault(), k("confirm");
|
|
2077
|
+
}, k = (B) => {
|
|
2078
|
+
var Z;
|
|
2079
|
+
e.boxType === "prompt" && B === "confirm" && !$() || (f.action = B, f.beforeClose ? (Z = f.beforeClose) == null || Z.call(f, B, f, N) : N());
|
|
2080
|
+
}, $ = () => {
|
|
2081
|
+
if (e.boxType === "prompt") {
|
|
2082
|
+
const B = f.inputPattern;
|
|
2083
|
+
if (B && !B.test(f.inputValue || ""))
|
|
2084
|
+
return f.editorErrorMessage = f.inputErrorMessage || r("el.messagebox.error"), f.validateError = !0, !1;
|
|
2085
|
+
const Z = f.inputValidator;
|
|
2086
|
+
if (typeof Z == "function") {
|
|
2087
|
+
const U = Z(f.inputValue);
|
|
2088
|
+
if (U === !1)
|
|
2089
|
+
return f.editorErrorMessage = f.inputErrorMessage || r("el.messagebox.error"), f.validateError = !0, !1;
|
|
2090
|
+
if (typeof U == "string")
|
|
2091
|
+
return f.editorErrorMessage = U, f.validateError = !0, !1;
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
return f.editorErrorMessage = "", f.validateError = !1, !0;
|
|
2095
|
+
}, j = () => {
|
|
2096
|
+
const B = T.value.$refs;
|
|
2097
|
+
return B.input || B.textarea;
|
|
2098
|
+
}, Ie = () => {
|
|
2099
|
+
k("close");
|
|
2100
|
+
}, Qe = () => {
|
|
2101
|
+
e.closeOnPressEscape && Ie();
|
|
2102
|
+
};
|
|
2103
|
+
return e.lockScroll && ka(c), {
|
|
2104
|
+
...Qn(f),
|
|
2105
|
+
ns: s,
|
|
2106
|
+
overlayEvent: H,
|
|
2107
|
+
visible: c,
|
|
2108
|
+
hasMessage: i,
|
|
2109
|
+
typeClass: E,
|
|
2110
|
+
contentId: C,
|
|
2111
|
+
inputId: y,
|
|
2112
|
+
btnSize: a,
|
|
2113
|
+
iconComponent: v,
|
|
2114
|
+
confirmButtonClasses: L,
|
|
2115
|
+
rootRef: d,
|
|
2116
|
+
focusStartRef: b,
|
|
2117
|
+
headerRef: g,
|
|
2118
|
+
inputRef: T,
|
|
2119
|
+
confirmRef: P,
|
|
2120
|
+
doClose: N,
|
|
2121
|
+
handleClose: Ie,
|
|
2122
|
+
onCloseRequested: Qe,
|
|
2123
|
+
handleWrapperClick: z,
|
|
2124
|
+
handleInputEnter: W,
|
|
2125
|
+
handleAction: k,
|
|
2126
|
+
t: r
|
|
2127
|
+
};
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
function $s(e, t, n, o, s, a) {
|
|
2131
|
+
const r = x("el-icon"), l = x("close"), c = x("el-input"), f = x("el-button"), E = x("el-focus-trap"), C = x("el-overlay");
|
|
2132
|
+
return S(), R(eo, {
|
|
2133
|
+
name: "fade-in-linear",
|
|
2134
|
+
onAfterLeave: (y) => e.$emit("vanish"),
|
|
2135
|
+
persisted: ""
|
|
2136
|
+
}, {
|
|
2137
|
+
default: h(() => [
|
|
2138
|
+
ot(m(C, {
|
|
2139
|
+
"z-index": e.zIndex,
|
|
2140
|
+
"overlay-class": [e.ns.is("message-box"), e.modalClass],
|
|
2141
|
+
mask: e.modal
|
|
2142
|
+
}, {
|
|
2143
|
+
default: h(() => [
|
|
2144
|
+
V("div", {
|
|
2145
|
+
role: "dialog",
|
|
2146
|
+
"aria-label": e.title,
|
|
2147
|
+
"aria-modal": "true",
|
|
2148
|
+
"aria-describedby": e.showInput ? void 0 : e.contentId,
|
|
2149
|
+
class: I(`${e.ns.namespace.value}-overlay-message-box`),
|
|
2150
|
+
onClick: e.overlayEvent.onClick,
|
|
2151
|
+
onMousedown: e.overlayEvent.onMousedown,
|
|
2152
|
+
onMouseup: e.overlayEvent.onMouseup
|
|
2153
|
+
}, [
|
|
2154
|
+
m(E, {
|
|
2155
|
+
loop: "",
|
|
2156
|
+
trapped: e.visible,
|
|
2157
|
+
"focus-trap-el": e.rootRef,
|
|
2158
|
+
"focus-start-el": e.focusStartRef,
|
|
2159
|
+
onReleaseRequested: e.onCloseRequested
|
|
2160
|
+
}, {
|
|
2161
|
+
default: h(() => [
|
|
2162
|
+
V("div", {
|
|
2163
|
+
ref: "rootRef",
|
|
2164
|
+
class: I([
|
|
2165
|
+
e.ns.b(),
|
|
2166
|
+
e.customClass,
|
|
2167
|
+
e.ns.is("draggable", e.draggable),
|
|
2168
|
+
{ [e.ns.m("center")]: e.center }
|
|
2169
|
+
]),
|
|
2170
|
+
style: pt(e.customStyle),
|
|
2171
|
+
tabindex: "-1",
|
|
2172
|
+
onClick: Re(() => {
|
|
2173
|
+
}, ["stop"])
|
|
2174
|
+
}, [
|
|
2175
|
+
e.title !== null && e.title !== void 0 ? (S(), F("div", {
|
|
2176
|
+
key: 0,
|
|
2177
|
+
ref: "headerRef",
|
|
2178
|
+
class: I([e.ns.e("header"), { "show-close": e.showClose }])
|
|
2179
|
+
}, [
|
|
2180
|
+
V("div", {
|
|
2181
|
+
class: I(e.ns.e("title"))
|
|
2182
|
+
}, [
|
|
2183
|
+
e.iconComponent && e.center ? (S(), R(r, {
|
|
2184
|
+
key: 0,
|
|
2185
|
+
class: I([e.ns.e("status"), e.typeClass])
|
|
2186
|
+
}, {
|
|
2187
|
+
default: h(() => [
|
|
2188
|
+
(S(), R(te(e.iconComponent)))
|
|
2189
|
+
]),
|
|
2190
|
+
_: 1
|
|
2191
|
+
}, 8, ["class"])) : A("v-if", !0),
|
|
2192
|
+
V("span", null, ne(e.title), 1)
|
|
2193
|
+
], 2),
|
|
2194
|
+
e.showClose ? (S(), F("button", {
|
|
2195
|
+
key: 0,
|
|
2196
|
+
type: "button",
|
|
2197
|
+
class: I(e.ns.e("headerbtn")),
|
|
2198
|
+
"aria-label": e.t("el.messagebox.close"),
|
|
2199
|
+
onClick: (y) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"),
|
|
2200
|
+
onKeydown: Ne(Re((y) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])
|
|
2201
|
+
}, [
|
|
2202
|
+
m(r, {
|
|
2203
|
+
class: I(e.ns.e("close"))
|
|
2204
|
+
}, {
|
|
2205
|
+
default: h(() => [
|
|
2206
|
+
m(l)
|
|
2207
|
+
]),
|
|
2208
|
+
_: 1
|
|
2209
|
+
}, 8, ["class"])
|
|
2210
|
+
], 42, ["aria-label", "onClick", "onKeydown"])) : A("v-if", !0)
|
|
2211
|
+
], 2)) : A("v-if", !0),
|
|
2212
|
+
V("div", {
|
|
2213
|
+
id: e.contentId,
|
|
2214
|
+
class: I(e.ns.e("content"))
|
|
2215
|
+
}, [
|
|
2216
|
+
V("div", {
|
|
2217
|
+
class: I(e.ns.e("container"))
|
|
2218
|
+
}, [
|
|
2219
|
+
e.iconComponent && !e.center && e.hasMessage ? (S(), R(r, {
|
|
2220
|
+
key: 0,
|
|
2221
|
+
class: I([e.ns.e("status"), e.typeClass])
|
|
2222
|
+
}, {
|
|
2223
|
+
default: h(() => [
|
|
2224
|
+
(S(), R(te(e.iconComponent)))
|
|
2225
|
+
]),
|
|
2226
|
+
_: 1
|
|
2227
|
+
}, 8, ["class"])) : A("v-if", !0),
|
|
2228
|
+
e.hasMessage ? (S(), F("div", {
|
|
2229
|
+
key: 1,
|
|
2230
|
+
class: I(e.ns.e("message"))
|
|
2231
|
+
}, [
|
|
2232
|
+
X(e.$slots, "default", {}, () => [
|
|
2233
|
+
e.dangerouslyUseHTMLString ? (S(), R(te(e.showInput ? "label" : "p"), {
|
|
2234
|
+
key: 1,
|
|
2235
|
+
for: e.showInput ? e.inputId : void 0,
|
|
2236
|
+
innerHTML: e.message
|
|
2237
|
+
}, null, 8, ["for", "innerHTML"])) : (S(), R(te(e.showInput ? "label" : "p"), {
|
|
2238
|
+
key: 0,
|
|
2239
|
+
for: e.showInput ? e.inputId : void 0
|
|
2240
|
+
}, {
|
|
2241
|
+
default: h(() => [
|
|
2242
|
+
_e(ne(e.dangerouslyUseHTMLString ? "" : e.message), 1)
|
|
2243
|
+
]),
|
|
2244
|
+
_: 1
|
|
2245
|
+
}, 8, ["for"]))
|
|
2246
|
+
])
|
|
2247
|
+
], 2)) : A("v-if", !0)
|
|
2248
|
+
], 2),
|
|
2249
|
+
ot(V("div", {
|
|
2250
|
+
class: I(e.ns.e("input"))
|
|
2251
|
+
}, [
|
|
2252
|
+
m(c, {
|
|
2253
|
+
id: e.inputId,
|
|
2254
|
+
ref: "inputRef",
|
|
2255
|
+
modelValue: e.inputValue,
|
|
2256
|
+
"onUpdate:modelValue": (y) => e.inputValue = y,
|
|
2257
|
+
type: e.inputType,
|
|
2258
|
+
placeholder: e.inputPlaceholder,
|
|
2259
|
+
"aria-invalid": e.validateError,
|
|
2260
|
+
class: I({ invalid: e.validateError }),
|
|
2261
|
+
onKeydown: Ne(e.handleInputEnter, ["enter"])
|
|
2262
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
|
|
2263
|
+
V("div", {
|
|
2264
|
+
class: I(e.ns.e("errormsg")),
|
|
2265
|
+
style: pt({
|
|
2266
|
+
visibility: e.editorErrorMessage ? "visible" : "hidden"
|
|
2267
|
+
})
|
|
2268
|
+
}, ne(e.editorErrorMessage), 7)
|
|
2269
|
+
], 2), [
|
|
2270
|
+
[at, e.showInput]
|
|
2271
|
+
])
|
|
2272
|
+
], 10, ["id"]),
|
|
2273
|
+
V("div", {
|
|
2274
|
+
class: I(e.ns.e("btns"))
|
|
2275
|
+
}, [
|
|
2276
|
+
e.showCancelButton ? (S(), R(f, {
|
|
2277
|
+
key: 0,
|
|
2278
|
+
loading: e.cancelButtonLoading,
|
|
2279
|
+
"loading-icon": e.cancelButtonLoadingIcon,
|
|
2280
|
+
class: I([e.cancelButtonClass]),
|
|
2281
|
+
round: e.roundButton,
|
|
2282
|
+
size: e.btnSize,
|
|
2283
|
+
onClick: (y) => e.handleAction("cancel"),
|
|
2284
|
+
onKeydown: Ne(Re((y) => e.handleAction("cancel"), ["prevent"]), ["enter"])
|
|
2285
|
+
}, {
|
|
2286
|
+
default: h(() => [
|
|
2287
|
+
_e(ne(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
|
|
2288
|
+
]),
|
|
2289
|
+
_: 1
|
|
2290
|
+
}, 8, ["loading", "loading-icon", "class", "round", "size", "onClick", "onKeydown"])) : A("v-if", !0),
|
|
2291
|
+
ot(m(f, {
|
|
2292
|
+
ref: "confirmRef",
|
|
2293
|
+
type: "primary",
|
|
2294
|
+
loading: e.confirmButtonLoading,
|
|
2295
|
+
"loading-icon": e.confirmButtonLoadingIcon,
|
|
2296
|
+
class: I([e.confirmButtonClasses]),
|
|
2297
|
+
round: e.roundButton,
|
|
2298
|
+
disabled: e.confirmButtonDisabled,
|
|
2299
|
+
size: e.btnSize,
|
|
2300
|
+
onClick: (y) => e.handleAction("confirm"),
|
|
2301
|
+
onKeydown: Ne(Re((y) => e.handleAction("confirm"), ["prevent"]), ["enter"])
|
|
2302
|
+
}, {
|
|
2303
|
+
default: h(() => [
|
|
2304
|
+
_e(ne(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
|
|
2305
|
+
]),
|
|
2306
|
+
_: 1
|
|
2307
|
+
}, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
|
|
2308
|
+
[at, e.showConfirmButton]
|
|
2309
|
+
])
|
|
2310
|
+
], 2)
|
|
2311
|
+
], 14, ["onClick"])
|
|
2312
|
+
]),
|
|
2313
|
+
_: 3
|
|
2314
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
2315
|
+
], 42, ["aria-label", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
|
|
2316
|
+
]),
|
|
2317
|
+
_: 3
|
|
2318
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
2319
|
+
[at, e.visible]
|
|
2320
|
+
])
|
|
2321
|
+
]),
|
|
2322
|
+
_: 3
|
|
2323
|
+
}, 8, ["onAfterLeave"]);
|
|
2324
|
+
}
|
|
2325
|
+
var Fs = /* @__PURE__ */ Ve(Ls, [["render", $s], ["__file", "index.vue"]]);
|
|
2326
|
+
const Be = /* @__PURE__ */ new Map(), Os = (e) => {
|
|
2327
|
+
let t = document.body;
|
|
2328
|
+
return e.appendTo && (Ce(e.appendTo) && (t = document.querySelector(e.appendTo)), vt(e.appendTo) && (t = e.appendTo), vt(t) || (me("ElMessageBox", "the appendTo option is not an HTMLElement. Falling back to document.body."), t = document.body)), t;
|
|
2329
|
+
}, Ps = (e, t, n = null) => {
|
|
2330
|
+
const o = m(Fs, e, Ye(e.message) || hn(e.message) ? {
|
|
2331
|
+
default: Ye(e.message) ? e.message : () => e.message
|
|
2332
|
+
} : null);
|
|
2333
|
+
return o.appContext = n, gn(o, t), Os(e).appendChild(t.firstElementChild), o.component;
|
|
2334
|
+
}, Hs = () => document.createElement("div"), Us = (e, t) => {
|
|
2335
|
+
const n = Hs();
|
|
2336
|
+
e.onVanish = () => {
|
|
2337
|
+
gn(null, n), Be.delete(s);
|
|
2338
|
+
}, e.onAction = (a) => {
|
|
2339
|
+
const r = Be.get(s);
|
|
2340
|
+
let l;
|
|
2341
|
+
e.showInput ? l = { value: s.inputValue, action: a } : l = a, e.callback ? e.callback(l, o.proxy) : a === "cancel" || a === "close" ? e.distinguishCancelAndClose && a !== "cancel" ? r.reject("close") : r.reject("cancel") : r.resolve(l);
|
|
2342
|
+
};
|
|
2343
|
+
const o = Ps(e, n, t), s = o.proxy;
|
|
2344
|
+
for (const a in e)
|
|
2345
|
+
Yt(e, a) && !Yt(s.$props, a) && (s[a] = e[a]);
|
|
2346
|
+
return s.visible = !0, s;
|
|
2347
|
+
};
|
|
2348
|
+
function Te(e, t = null) {
|
|
2349
|
+
if (!ue)
|
|
2350
|
+
return Promise.reject();
|
|
2351
|
+
let n;
|
|
2352
|
+
return Ce(e) || hn(e) ? e = {
|
|
2353
|
+
message: e
|
|
2354
|
+
} : n = e.callback, new Promise((o, s) => {
|
|
2355
|
+
const a = Us(e, t ?? Te._context);
|
|
2356
|
+
Be.set(a, {
|
|
2357
|
+
options: e,
|
|
2358
|
+
callback: n,
|
|
2359
|
+
resolve: o,
|
|
2360
|
+
reject: s
|
|
2361
|
+
});
|
|
2362
|
+
});
|
|
2363
|
+
}
|
|
2364
|
+
const zs = ["alert", "confirm", "prompt"], Ds = {
|
|
2365
|
+
alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
|
|
2366
|
+
confirm: { showCancelButton: !0 },
|
|
2367
|
+
prompt: { showCancelButton: !0, showInput: !0 }
|
|
2368
|
+
};
|
|
2369
|
+
zs.forEach((e) => {
|
|
2370
|
+
Te[e] = qs(e);
|
|
2371
|
+
});
|
|
2372
|
+
function qs(e) {
|
|
2373
|
+
return (t, n, o, s) => {
|
|
2374
|
+
let a = "";
|
|
2375
|
+
return mt(n) ? (o = n, a = "") : Mo(n) ? a = "" : a = n, Te(Object.assign({
|
|
2376
|
+
title: a,
|
|
2377
|
+
message: t,
|
|
2378
|
+
type: "",
|
|
2379
|
+
...Ds[e]
|
|
2380
|
+
}, o, {
|
|
2381
|
+
boxType: e
|
|
2382
|
+
}), s);
|
|
2383
|
+
};
|
|
2384
|
+
}
|
|
2385
|
+
Te.close = () => {
|
|
2386
|
+
Be.forEach((e, t) => {
|
|
2387
|
+
t.doClose();
|
|
2388
|
+
}), Be.clear();
|
|
2389
|
+
};
|
|
2390
|
+
Te._context = null;
|
|
2391
|
+
const re = Te;
|
|
2392
|
+
re.install = (e) => {
|
|
2393
|
+
re._context = e._context, e.config.globalProperties.$msgbox = re, e.config.globalProperties.$messageBox = re, e.config.globalProperties.$alert = re.alert, e.config.globalProperties.$confirm = re.confirm, e.config.globalProperties.$prompt = re.prompt;
|
|
2394
|
+
};
|
|
2395
|
+
const Ks = re, Gs = ["src"], Ys = /* @__PURE__ */ J({
|
|
2396
|
+
__name: "ImageUpload",
|
|
2397
|
+
props: {
|
|
2398
|
+
listType: {
|
|
2399
|
+
type: String,
|
|
2400
|
+
default: "picture"
|
|
2401
|
+
},
|
|
2402
|
+
limit: {
|
|
2403
|
+
type: Number,
|
|
2404
|
+
default: 1e3
|
|
2405
|
+
},
|
|
2406
|
+
pictureUrl: {
|
|
2407
|
+
type: Array,
|
|
2408
|
+
default: () => []
|
|
2409
|
+
}
|
|
2410
|
+
},
|
|
2411
|
+
emits: ["filesResponse", "uploadFileList"],
|
|
2412
|
+
setup(e, { emit: t }) {
|
|
2413
|
+
const { t: n } = bn(), o = M(st.uploadUrl()), s = M(st.authHeader()), a = M([]), r = M(), l = M(!1), c = M(""), f = e;
|
|
2414
|
+
a.value = f.pictureUrl;
|
|
2415
|
+
const E = t, C = (i) => {
|
|
2416
|
+
c.value = i.url, l.value = !0;
|
|
2417
|
+
}, y = (i) => {
|
|
2418
|
+
const d = i.size / 1024 / 1024 < 2;
|
|
2419
|
+
["image/jpeg", "image/png", "image/gif", "image/jpg"].includes(i.type) && !d && Ks.confirm(
|
|
2420
|
+
n("unionFiles.imageLtRequired"),
|
|
2421
|
+
n("unionFiles.warning"),
|
|
2422
|
+
{
|
|
2423
|
+
confirmButtonText: n("common.confirm"),
|
|
2424
|
+
cancelButtonText: n("common.cancel"),
|
|
2425
|
+
type: "warning"
|
|
2426
|
+
}
|
|
2427
|
+
).then(async () => {
|
|
2428
|
+
}).catch(() => (a.value.splice(-1, 1), !1));
|
|
2429
|
+
}, v = (i, d) => {
|
|
2430
|
+
E("uploadFileList", d.response);
|
|
2431
|
+
};
|
|
2432
|
+
return pn(() => {
|
|
2433
|
+
var i;
|
|
2434
|
+
a.value = f.pictureUrl, a.value.length > 0 && ((i = a.value) == null || i.forEach((d) => {
|
|
2435
|
+
d.url = st.imageUrl(d.fileSrc);
|
|
2436
|
+
}));
|
|
2437
|
+
}), (i, d) => {
|
|
2438
|
+
const g = x("Plus"), b = x("el-icon"), T = x("el-upload"), P = x("el-dialog");
|
|
2439
|
+
return S(), F(Ee, null, [
|
|
2440
|
+
m(T, {
|
|
2441
|
+
ref_key: "uploadImageRef",
|
|
2442
|
+
ref: r,
|
|
2443
|
+
"file-list": a.value,
|
|
2444
|
+
"onUpdate:fileList": d[0] || (d[0] = (L) => a.value = L),
|
|
2445
|
+
action: o.value,
|
|
2446
|
+
headers: s.value,
|
|
2447
|
+
limit: e.limit,
|
|
2448
|
+
"list-type": e.listType,
|
|
2449
|
+
"on-preview": C,
|
|
2450
|
+
"before-upload": y,
|
|
2451
|
+
"on-success": v
|
|
2452
|
+
}, {
|
|
2453
|
+
default: h(() => [
|
|
2454
|
+
m(b, null, {
|
|
2455
|
+
default: h(() => [
|
|
2456
|
+
m(g)
|
|
2457
|
+
]),
|
|
2458
|
+
_: 1
|
|
2459
|
+
})
|
|
2460
|
+
]),
|
|
2461
|
+
_: 1
|
|
2462
|
+
}, 8, ["file-list", "action", "headers", "limit", "list-type"]),
|
|
2463
|
+
m(P, {
|
|
2464
|
+
modelValue: l.value,
|
|
2465
|
+
"onUpdate:modelValue": d[1] || (d[1] = (L) => l.value = L),
|
|
2466
|
+
fullscreen: !0
|
|
2467
|
+
}, {
|
|
2468
|
+
default: h(() => [
|
|
2469
|
+
V("img", {
|
|
2470
|
+
src: c.value,
|
|
2471
|
+
alt: ""
|
|
2472
|
+
}, null, 8, Gs)
|
|
2473
|
+
]),
|
|
2474
|
+
_: 1
|
|
2475
|
+
}, 8, ["modelValue"])
|
|
2476
|
+
], 64);
|
|
2477
|
+
};
|
|
2478
|
+
}
|
|
2479
|
+
}), Ws = /* @__PURE__ */ Ao(Ys, [["__scopeId", "data-v-531e9665"]]), js = /* @__PURE__ */ J({
|
|
2480
|
+
__name: "index",
|
|
2481
|
+
props: /* @__PURE__ */ to({
|
|
2482
|
+
data: {
|
|
2483
|
+
type: Object,
|
|
2484
|
+
default: function() {
|
|
2485
|
+
}
|
|
2486
|
+
}
|
|
2487
|
+
}, {
|
|
2488
|
+
modelValue: { type: [String, Boolean] },
|
|
2489
|
+
modelModifiers: {}
|
|
2490
|
+
}),
|
|
2491
|
+
emits: ["update:modelValue"],
|
|
2492
|
+
setup(e) {
|
|
2493
|
+
const t = no(e, "modelValue"), o = e.data;
|
|
2494
|
+
return (s, a) => {
|
|
2495
|
+
const r = x("el-radio"), l = x("el-radio-group");
|
|
2496
|
+
return S(), R(l, {
|
|
2497
|
+
modelValue: t.value,
|
|
2498
|
+
"onUpdate:modelValue": a[0] || (a[0] = (c) => t.value = c)
|
|
2499
|
+
}, {
|
|
2500
|
+
default: h(() => [
|
|
2501
|
+
(S(!0), F(Ee, null, oo(u(o), (c) => (S(), R(r, {
|
|
2502
|
+
key: c.key,
|
|
2503
|
+
value: c.key
|
|
2504
|
+
}, {
|
|
2505
|
+
default: h(() => [
|
|
2506
|
+
_e(ne(c.value), 1)
|
|
2507
|
+
]),
|
|
2508
|
+
_: 2
|
|
2509
|
+
}, 1032, ["value"]))), 128))
|
|
2510
|
+
]),
|
|
2511
|
+
_: 1
|
|
2512
|
+
}, 8, ["modelValue"]);
|
|
2513
|
+
};
|
|
2514
|
+
}
|
|
2515
|
+
}), Xs = { class: "app-container" }, Js = { class: "search-container" }, Zs = { class: "image-card" }, fr = /* @__PURE__ */ J({
|
|
2516
|
+
__name: "edit",
|
|
2517
|
+
setup(e) {
|
|
2518
|
+
const { t } = bn(), n = Ro(), o = _o(), s = M();
|
|
2519
|
+
let a = Ge({
|
|
2520
|
+
requestId: Math.random() * 10 + "",
|
|
2521
|
+
updateMask: "shopId,spuName,categoryId,spuCode,freightType,freightAmount,picUrls,shelf,saleNum,sellPoint,specType,description",
|
|
2522
|
+
skuSpecValues: []
|
|
2523
|
+
});
|
|
2524
|
+
const r = Ge({
|
|
2525
|
+
shopId: [
|
|
2526
|
+
{
|
|
2527
|
+
required: !0,
|
|
2528
|
+
message: t("goodsSpu.shopIdRequired"),
|
|
2529
|
+
trigger: "change"
|
|
2530
|
+
}
|
|
2531
|
+
],
|
|
2532
|
+
spuName: [
|
|
2533
|
+
{
|
|
2534
|
+
required: !0,
|
|
2535
|
+
message: t("goodsSpu.spuNameRequired"),
|
|
2536
|
+
trigger: "blur"
|
|
2537
|
+
}
|
|
2538
|
+
],
|
|
2539
|
+
categoryId: [
|
|
2540
|
+
{
|
|
2541
|
+
required: !0,
|
|
2542
|
+
message: t("goodsSpu.categoryIdRequired"),
|
|
2543
|
+
trigger: "change"
|
|
2544
|
+
}
|
|
2545
|
+
],
|
|
2546
|
+
spuCode: [
|
|
2547
|
+
{
|
|
2548
|
+
required: !0,
|
|
2549
|
+
message: t("goodsSpu.spuCodeRequired"),
|
|
2550
|
+
trigger: "change"
|
|
2551
|
+
}
|
|
2552
|
+
],
|
|
2553
|
+
freightType: [
|
|
2554
|
+
{
|
|
2555
|
+
required: !0,
|
|
2556
|
+
message: t("goodsSpu.freightTypeRequired"),
|
|
2557
|
+
trigger: "change"
|
|
2558
|
+
}
|
|
2559
|
+
],
|
|
2560
|
+
freightAmount: [
|
|
2561
|
+
{
|
|
2562
|
+
required: !0,
|
|
2563
|
+
message: t("goodsSpu.freightAmountRequired"),
|
|
2564
|
+
trigger: "blur"
|
|
2565
|
+
}
|
|
2566
|
+
],
|
|
2567
|
+
picUrls: [
|
|
2568
|
+
{
|
|
2569
|
+
required: !0,
|
|
2570
|
+
message: t("goodsSpu.picUrlsRequired"),
|
|
2571
|
+
trigger: "change"
|
|
2572
|
+
}
|
|
2573
|
+
],
|
|
2574
|
+
shelf: [
|
|
2575
|
+
{
|
|
2576
|
+
required: !0,
|
|
2577
|
+
message: t("goodsSpu.shelfRequired"),
|
|
2578
|
+
trigger: "change"
|
|
2579
|
+
}
|
|
2580
|
+
],
|
|
2581
|
+
specType: [
|
|
2582
|
+
{
|
|
2583
|
+
required: !0,
|
|
2584
|
+
message: t("goodsSpu.specTypeRequired"),
|
|
2585
|
+
trigger: "change"
|
|
2586
|
+
}
|
|
2587
|
+
]
|
|
2588
|
+
});
|
|
2589
|
+
fe.shopInfoBizDict.useValues(), fe.goodsCategoryDict.useValues();
|
|
2590
|
+
const l = M([]), c = M(!1);
|
|
2591
|
+
K(
|
|
2592
|
+
() => a.shopId,
|
|
2593
|
+
(v) => v,
|
|
2594
|
+
{
|
|
2595
|
+
deep: !0,
|
|
2596
|
+
immediate: !0
|
|
2597
|
+
}
|
|
2598
|
+
);
|
|
2599
|
+
function f(v) {
|
|
2600
|
+
console.log(v), a.skuSpecValues.push(v), a.skuSpecValues = a.skuSpecValues.slice(-1);
|
|
2601
|
+
}
|
|
2602
|
+
function E(v) {
|
|
2603
|
+
v.forEach((i) => {
|
|
2604
|
+
var d;
|
|
2605
|
+
a.specId = (d = i.specValues) == null ? void 0 : d.map((g) => g.specId), a.skuSpecValues.push(i);
|
|
2606
|
+
}), a.skuSpecValues = a.skuSpecValues.slice(-v.length);
|
|
2607
|
+
}
|
|
2608
|
+
function C(v) {
|
|
2609
|
+
l.value.push(v), l.value = [...new Set(l.value)], a.picUrls = l.value.map((i) => i.fileSrc).join(",");
|
|
2610
|
+
}
|
|
2611
|
+
o.query.spuId && it.findById({ spuId: o.query.spuId }).then(({ data: v }) => {
|
|
2612
|
+
var d, g;
|
|
2613
|
+
Object.assign(a, v);
|
|
2614
|
+
let i = (d = v.picUrls) == null ? void 0 : d.split(",");
|
|
2615
|
+
i == null || i.forEach((b) => {
|
|
2616
|
+
let T = {
|
|
2617
|
+
fileSrc: b
|
|
2618
|
+
};
|
|
2619
|
+
l.value.push(T);
|
|
2620
|
+
}), a.picUrls = l.value.map((b) => b.fileSrc).join(","), a.shelf = (g = v.shelf) == null ? void 0 : g.toString(), c.value = !0, xo.findById({ spuId: o.query.spuId }).then(({ data: b }) => {
|
|
2621
|
+
a.ensureIds = b.ensures;
|
|
2622
|
+
});
|
|
2623
|
+
});
|
|
2624
|
+
const y = async () => {
|
|
2625
|
+
var v;
|
|
2626
|
+
await ((v = s.value) == null ? void 0 : v.validate((i) => {
|
|
2627
|
+
if (i) {
|
|
2628
|
+
if (l.value.length < 3) {
|
|
2629
|
+
rt({
|
|
2630
|
+
message: t("goodsSpu.imageListsError"),
|
|
2631
|
+
type: "error"
|
|
2632
|
+
});
|
|
2633
|
+
return;
|
|
2634
|
+
}
|
|
2635
|
+
a.shelf = JSON.parse(a.shelf), o.query.spuId ? (console.log(a.skuSpecValues), it.update(a).then((d) => {
|
|
2636
|
+
console.log(d), d.status === 200 && (rt({
|
|
2637
|
+
message: t("common.submitSuccess"),
|
|
2638
|
+
type: "success"
|
|
2639
|
+
}), Ht.closeTagView(o.fullPath, n, !1));
|
|
2640
|
+
})) : it.create(a).then((d) => {
|
|
2641
|
+
console.log(d), d.status === 200 && (rt({
|
|
2642
|
+
message: t("common.submitSuccess"),
|
|
2643
|
+
type: "success"
|
|
2644
|
+
}), Ht.closeTagView(o.fullPath, n, !1));
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
}));
|
|
2648
|
+
};
|
|
2649
|
+
return (v, i) => {
|
|
2650
|
+
const d = x("jmash-select"), g = x("el-form-item"), b = x("el-col"), T = x("el-input"), P = x("el-tree-select"), L = js, G = x("el-input-number"), Y = Ws, N = x("jmash-dict-checkbox"), z = x("el-row"), H = x("el-button"), W = x("el-form");
|
|
2651
|
+
return S(), F("div", Xs, [
|
|
2652
|
+
V("div", Js, [
|
|
2653
|
+
m(W, {
|
|
2654
|
+
ref_key: "goodsSpuFormRef",
|
|
2655
|
+
ref: s,
|
|
2656
|
+
model: u(a),
|
|
2657
|
+
"label-width": "120px",
|
|
2658
|
+
rules: r
|
|
2659
|
+
}, {
|
|
2660
|
+
default: h(() => [
|
|
2661
|
+
i[14] || (i[14] = V("div", { class: "title-content" }, "基本信息", -1)),
|
|
2662
|
+
m(z, null, {
|
|
2663
|
+
default: h(() => [
|
|
2664
|
+
m(b, { span: 12 }, {
|
|
2665
|
+
default: h(() => [
|
|
2666
|
+
m(g, {
|
|
2667
|
+
label: v.$t("goodsSpu.shopId"),
|
|
2668
|
+
prop: "shopId"
|
|
2669
|
+
}, {
|
|
2670
|
+
default: h(() => [
|
|
2671
|
+
m(d, {
|
|
2672
|
+
modelValue: u(a).shopId,
|
|
2673
|
+
"onUpdate:modelValue": i[0] || (i[0] = (k) => u(a).shopId = k),
|
|
2674
|
+
placeholder: v.$t("goodsSpu.shopIdRequired"),
|
|
2675
|
+
data: u(fe).shopInfoBizDict.values,
|
|
2676
|
+
filterable: "",
|
|
2677
|
+
class: "w-full"
|
|
2678
|
+
}, null, 8, ["modelValue", "placeholder", "data"])
|
|
2679
|
+
]),
|
|
2680
|
+
_: 1
|
|
2681
|
+
}, 8, ["label"])
|
|
2682
|
+
]),
|
|
2683
|
+
_: 1
|
|
2684
|
+
}),
|
|
2685
|
+
m(b, { span: 12 }, {
|
|
2686
|
+
default: h(() => [
|
|
2687
|
+
m(g, {
|
|
2688
|
+
label: v.$t("goodsSpu.spuName"),
|
|
2689
|
+
prop: "spuName"
|
|
2690
|
+
}, {
|
|
2691
|
+
default: h(() => [
|
|
2692
|
+
m(T, {
|
|
2693
|
+
modelValue: u(a).spuName,
|
|
2694
|
+
"onUpdate:modelValue": i[1] || (i[1] = (k) => u(a).spuName = k),
|
|
2695
|
+
placeholder: v.$t("goodsSpu.spuNameRequired"),
|
|
2696
|
+
maxlength: "60",
|
|
2697
|
+
"show-word-limit": "",
|
|
2698
|
+
clearable: ""
|
|
2699
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
2700
|
+
]),
|
|
2701
|
+
_: 1
|
|
2702
|
+
}, 8, ["label"])
|
|
2703
|
+
]),
|
|
2704
|
+
_: 1
|
|
2705
|
+
}),
|
|
2706
|
+
m(b, { span: 12 }, {
|
|
2707
|
+
default: h(() => [
|
|
2708
|
+
m(g, {
|
|
2709
|
+
label: v.$t("goodsSpu.categoryId"),
|
|
2710
|
+
prop: "categoryId"
|
|
2711
|
+
}, {
|
|
2712
|
+
default: h(() => [
|
|
2713
|
+
m(P, {
|
|
2714
|
+
modelValue: u(a).categoryId,
|
|
2715
|
+
"onUpdate:modelValue": i[2] || (i[2] = (k) => u(a).categoryId = k),
|
|
2716
|
+
data: u(fe).goodsCategoryDict.values,
|
|
2717
|
+
filterable: "",
|
|
2718
|
+
clearable: "",
|
|
2719
|
+
"check-strictly": "",
|
|
2720
|
+
"render-after-expand": !1,
|
|
2721
|
+
placeholder: v.$t("goodsSpu.categoryIdRequired"),
|
|
2722
|
+
class: "w-full"
|
|
2723
|
+
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
2724
|
+
]),
|
|
2725
|
+
_: 1
|
|
2726
|
+
}, 8, ["label"])
|
|
2727
|
+
]),
|
|
2728
|
+
_: 1
|
|
2729
|
+
}),
|
|
2730
|
+
m(b, { span: 12 }, {
|
|
2731
|
+
default: h(() => [
|
|
2732
|
+
m(g, {
|
|
2733
|
+
label: v.$t("goodsSpu.spuCode"),
|
|
2734
|
+
prop: "spuCode"
|
|
2735
|
+
}, {
|
|
2736
|
+
default: h(() => [
|
|
2737
|
+
m(T, {
|
|
2738
|
+
modelValue: u(a).spuCode,
|
|
2739
|
+
"onUpdate:modelValue": i[3] || (i[3] = (k) => u(a).spuCode = k),
|
|
2740
|
+
placeholder: v.$t("goodsSpu.spuCodeRequired"),
|
|
2741
|
+
maxlength: "15",
|
|
2742
|
+
"show-word-limit": "",
|
|
2743
|
+
clearable: ""
|
|
2744
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
2745
|
+
]),
|
|
2746
|
+
_: 1
|
|
2747
|
+
}, 8, ["label"])
|
|
2748
|
+
]),
|
|
2749
|
+
_: 1
|
|
2750
|
+
}),
|
|
2751
|
+
m(b, { span: 12 }, {
|
|
2752
|
+
default: h(() => [
|
|
2753
|
+
m(g, {
|
|
2754
|
+
label: v.$t("goodsSpu.freightType"),
|
|
2755
|
+
prop: "freightType"
|
|
2756
|
+
}, {
|
|
2757
|
+
default: h(() => [
|
|
2758
|
+
m(L, {
|
|
2759
|
+
modelValue: u(a).freightType,
|
|
2760
|
+
"onUpdate:modelValue": i[4] || (i[4] = (k) => u(a).freightType = k),
|
|
2761
|
+
data: u(fe).freightTypeEnum.values
|
|
2762
|
+
}, null, 8, ["modelValue", "data"])
|
|
2763
|
+
]),
|
|
2764
|
+
_: 1
|
|
2765
|
+
}, 8, ["label"])
|
|
2766
|
+
]),
|
|
2767
|
+
_: 1
|
|
2768
|
+
}),
|
|
2769
|
+
m(b, { span: 12 }, {
|
|
2770
|
+
default: h(() => [
|
|
2771
|
+
m(g, {
|
|
2772
|
+
label: v.$t("goodsSpu.freightAmount"),
|
|
2773
|
+
prop: "freightAmount"
|
|
2774
|
+
}, {
|
|
2775
|
+
default: h(() => [
|
|
2776
|
+
m(G, {
|
|
2777
|
+
modelValue: u(a).freightAmount,
|
|
2778
|
+
"onUpdate:modelValue": i[5] || (i[5] = (k) => u(a).freightAmount = k),
|
|
2779
|
+
precision: 2,
|
|
2780
|
+
step: 0.1,
|
|
2781
|
+
controls: !1,
|
|
2782
|
+
placeholder: v.$t("goodsSpu.freightAmountRequired"),
|
|
2783
|
+
class: "w-full"
|
|
2784
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
2785
|
+
]),
|
|
2786
|
+
_: 1
|
|
2787
|
+
}, 8, ["label"])
|
|
2788
|
+
]),
|
|
2789
|
+
_: 1
|
|
2790
|
+
}),
|
|
2791
|
+
m(b, { span: 24 }, {
|
|
2792
|
+
default: h(() => [
|
|
2793
|
+
m(g, {
|
|
2794
|
+
label: v.$t("goodsSpu.picUrls"),
|
|
2795
|
+
prop: "picUrls"
|
|
2796
|
+
}, {
|
|
2797
|
+
default: h(() => [
|
|
2798
|
+
V("div", Zs, [
|
|
2799
|
+
m(Y, {
|
|
2800
|
+
limit: 6,
|
|
2801
|
+
"list-type": "picture-card",
|
|
2802
|
+
"picture-url": l.value,
|
|
2803
|
+
onUploadFileList: C
|
|
2804
|
+
}, null, 8, ["picture-url"]),
|
|
2805
|
+
i[12] || (i[12] = V("div", { class: "red-color" }, " 推荐尺寸:100*100或同比例图片,最少可上传3张 ", -1))
|
|
2806
|
+
])
|
|
2807
|
+
]),
|
|
2808
|
+
_: 1
|
|
2809
|
+
}, 8, ["label"])
|
|
2810
|
+
]),
|
|
2811
|
+
_: 1
|
|
2812
|
+
}),
|
|
2813
|
+
m(b, { span: 12 }, {
|
|
2814
|
+
default: h(() => [
|
|
2815
|
+
m(g, {
|
|
2816
|
+
label: v.$t("goodsSpu.shelf"),
|
|
2817
|
+
prop: "shelf"
|
|
2818
|
+
}, {
|
|
2819
|
+
default: h(() => [
|
|
2820
|
+
m(L, {
|
|
2821
|
+
modelValue: u(a).shelf,
|
|
2822
|
+
"onUpdate:modelValue": i[6] || (i[6] = (k) => u(a).shelf = k),
|
|
2823
|
+
data: u(fe).shelfDict.values
|
|
2824
|
+
}, null, 8, ["modelValue", "data"])
|
|
2825
|
+
]),
|
|
2826
|
+
_: 1
|
|
2827
|
+
}, 8, ["label"])
|
|
2828
|
+
]),
|
|
2829
|
+
_: 1
|
|
2830
|
+
}),
|
|
2831
|
+
m(b, { span: 12 }, {
|
|
2832
|
+
default: h(() => [
|
|
2833
|
+
m(g, {
|
|
2834
|
+
label: v.$t("goodsSpu.saleNum"),
|
|
2835
|
+
prop: "saleNum"
|
|
2836
|
+
}, {
|
|
2837
|
+
default: h(() => [
|
|
2838
|
+
m(G, {
|
|
2839
|
+
modelValue: u(a).saleNum,
|
|
2840
|
+
"onUpdate:modelValue": i[7] || (i[7] = (k) => u(a).saleNum = k),
|
|
2841
|
+
placeholder: v.$t("goodsSpu.saleNumRequired"),
|
|
2842
|
+
class: "w-full",
|
|
2843
|
+
min: 0,
|
|
2844
|
+
controls: !1,
|
|
2845
|
+
precision: 0
|
|
2846
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
2847
|
+
]),
|
|
2848
|
+
_: 1
|
|
2849
|
+
}, 8, ["label"])
|
|
2850
|
+
]),
|
|
2851
|
+
_: 1
|
|
2852
|
+
}),
|
|
2853
|
+
m(b, { span: 24 }, {
|
|
2854
|
+
default: h(() => [
|
|
2855
|
+
m(g, {
|
|
2856
|
+
label: v.$t("goodsSpu.sellPoint"),
|
|
2857
|
+
prop: "sellPoint"
|
|
2858
|
+
}, {
|
|
2859
|
+
default: h(() => [
|
|
2860
|
+
m(T, {
|
|
2861
|
+
modelValue: u(a).sellPoint,
|
|
2862
|
+
"onUpdate:modelValue": i[8] || (i[8] = (k) => u(a).sellPoint = k),
|
|
2863
|
+
placeholder: v.$t("goodsSpu.sellPointRequired"),
|
|
2864
|
+
maxlength: "250",
|
|
2865
|
+
"show-word-limit": "",
|
|
2866
|
+
clearable: "",
|
|
2867
|
+
rows: 4,
|
|
2868
|
+
type: "textarea"
|
|
2869
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
2870
|
+
]),
|
|
2871
|
+
_: 1
|
|
2872
|
+
}, 8, ["label"])
|
|
2873
|
+
]),
|
|
2874
|
+
_: 1
|
|
2875
|
+
}),
|
|
2876
|
+
m(b, { span: 12 }, {
|
|
2877
|
+
default: h(() => [
|
|
2878
|
+
m(g, {
|
|
2879
|
+
label: v.$t("goodsSpu.ensureIds"),
|
|
2880
|
+
prop: "ensureIds"
|
|
2881
|
+
}, {
|
|
2882
|
+
default: h(() => [
|
|
2883
|
+
m(N, {
|
|
2884
|
+
modelValue: u(a).ensureIds,
|
|
2885
|
+
"onUpdate:modelValue": i[9] || (i[9] = (k) => u(a).ensureIds = k),
|
|
2886
|
+
"type-code": u(Bo).DICT_GOODS_ENSURE
|
|
2887
|
+
}, null, 8, ["modelValue", "type-code"])
|
|
2888
|
+
]),
|
|
2889
|
+
_: 1
|
|
2890
|
+
}, 8, ["label"])
|
|
2891
|
+
]),
|
|
2892
|
+
_: 1
|
|
2893
|
+
})
|
|
2894
|
+
]),
|
|
2895
|
+
_: 1
|
|
2896
|
+
}),
|
|
2897
|
+
i[15] || (i[15] = V("div", { class: "title-content" }, "商品规格", -1)),
|
|
2898
|
+
m(z, null, {
|
|
2899
|
+
default: h(() => [
|
|
2900
|
+
m(b, { span: 24 }, {
|
|
2901
|
+
default: h(() => [
|
|
2902
|
+
m(g, {
|
|
2903
|
+
label: v.$t("goodsSpu.specType"),
|
|
2904
|
+
prop: "specType"
|
|
2905
|
+
}, {
|
|
2906
|
+
default: h(() => [
|
|
2907
|
+
m(L, {
|
|
2908
|
+
modelValue: u(a).specType,
|
|
2909
|
+
"onUpdate:modelValue": i[10] || (i[10] = (k) => u(a).specType = k),
|
|
2910
|
+
data: u(fe).specTypeEnum.values
|
|
2911
|
+
}, null, 8, ["modelValue", "data"])
|
|
2912
|
+
]),
|
|
2913
|
+
_: 1
|
|
2914
|
+
}, 8, ["label"])
|
|
2915
|
+
]),
|
|
2916
|
+
_: 1
|
|
2917
|
+
}),
|
|
2918
|
+
!u(o).query.spuId || c.value ? (S(), R(No, {
|
|
2919
|
+
key: 0,
|
|
2920
|
+
"spec-type": u(a).specType,
|
|
2921
|
+
form: u(a),
|
|
2922
|
+
onGetGoodsSku: f,
|
|
2923
|
+
onGetFormData: E
|
|
2924
|
+
}, null, 8, ["spec-type", "form"])) : A("", !0)
|
|
2925
|
+
]),
|
|
2926
|
+
_: 1
|
|
2927
|
+
}),
|
|
2928
|
+
i[16] || (i[16] = V("div", { class: "title-content" }, "商品详情", -1)),
|
|
2929
|
+
m(z, null, {
|
|
2930
|
+
default: h(() => [
|
|
2931
|
+
m(b, { span: 24 }, {
|
|
2932
|
+
default: h(() => [
|
|
2933
|
+
m(g, {
|
|
2934
|
+
label: v.$t("goodsSpu.description"),
|
|
2935
|
+
prop: "description"
|
|
2936
|
+
}, {
|
|
2937
|
+
default: h(() => [
|
|
2938
|
+
!u(o).query.spuId || c.value ? (S(), R(u(Vo), {
|
|
2939
|
+
key: 0,
|
|
2940
|
+
modelValue: u(a).description,
|
|
2941
|
+
"onUpdate:modelValue": i[11] || (i[11] = (k) => u(a).description = k)
|
|
2942
|
+
}, null, 8, ["modelValue"])) : A("", !0)
|
|
2943
|
+
]),
|
|
2944
|
+
_: 1
|
|
2945
|
+
}, 8, ["label"])
|
|
2946
|
+
]),
|
|
2947
|
+
_: 1
|
|
2948
|
+
}),
|
|
2949
|
+
m(g, null, {
|
|
2950
|
+
default: h(() => [
|
|
2951
|
+
m(H, {
|
|
2952
|
+
type: "primary",
|
|
2953
|
+
onClick: y
|
|
2954
|
+
}, {
|
|
2955
|
+
default: h(() => i[13] || (i[13] = [
|
|
2956
|
+
_e("保存")
|
|
2957
|
+
])),
|
|
2958
|
+
_: 1
|
|
2959
|
+
})
|
|
2960
|
+
]),
|
|
2961
|
+
_: 1
|
|
2962
|
+
})
|
|
2963
|
+
]),
|
|
2964
|
+
_: 1
|
|
2965
|
+
})
|
|
2966
|
+
]),
|
|
2967
|
+
_: 1
|
|
2968
|
+
}, 8, ["model", "rules"])
|
|
2969
|
+
])
|
|
2970
|
+
]);
|
|
2971
|
+
};
|
|
2972
|
+
}
|
|
2973
|
+
});
|
|
2974
|
+
export {
|
|
2975
|
+
fr as default
|
|
2976
|
+
};
|