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