@witlink/components 1.0.27 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.js +406 -405
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InputNumber as
|
|
2
|
-
import { markRaw as
|
|
3
|
-
import { isNullOrUndef as
|
|
4
|
-
import { UserCenterKey as gn, buildTree as hn, exportFile as yn, forEachTree as _n, getButtonPermissions as bn, getLocale as xn, getMenuInfo as Cn, getToken as Sn, getUserCenterParams as kn, getUserCenterParamsByUrl as wn, getUserInfo as $n, is as En, isArray as Mn, isAsyncFunction as Nn, isBoolean as Pn, isClient as An, isDate as Tn, isDef as Dn, isElement as Ln, isFunction as Bn, isImageDom as Rn, isNull as
|
|
1
|
+
import { InputNumber as re, RangePicker as Oe, Select as je, Divider as Ie, Space as Ue, Input as ke, Button as we, Table as Fe, Popover as We, Row as ze, Col as qe, Slider as Ke } from "ant-design-vue/es";
|
|
2
|
+
import { markRaw as le, createElementBlock as T, openBlock as $, createElementVNode as N, defineComponent as F, mergeModels as I, useModel as Q, useSlots as $e, useAttrs as Ee, createBlock as j, mergeProps as U, createSlots as ie, renderList as K, withCtx as M, unref as k, renderSlot as V, normalizeProps as ue, guardReactiveProps as Me, createVNode as E, ref as S, watch as J, resolveDynamicComponent as Ve, isRef as Z, withModifiers as ae, getCurrentInstance as ee, render as G, h as z, computed as L, onMounted as Ne, onUnmounted as Xe, normalizeClass as He, normalizeStyle as pe, resolveDirective as Ye, withKeys as Ze, Fragment as H, createTextVNode as te, toDisplayString as se, withDirectives as Ge, nextTick as fe, useCssVars as Qe, createCommentVNode as me, shallowRef as X, shallowReadonly as Je, toValue as q, getCurrentScope as et, onScopeDispose as tt, toRaw as nt } from "vue";
|
|
3
|
+
import { isNullOrUndef as R, hasPermission as ot } from "./utils.js";
|
|
4
|
+
import { UserCenterKey as gn, buildTree as hn, exportFile as yn, forEachTree as _n, getButtonPermissions as bn, getLocale as xn, getMenuInfo as Cn, getToken as Sn, getUserCenterParams as kn, getUserCenterParamsByUrl as wn, getUserInfo as $n, is as En, isArray as Mn, isAsyncFunction as Nn, isBoolean as Pn, isClient as An, isDate as Tn, isDef as Dn, isElement as Ln, isFunction as Bn, isImageDom as Rn, isNull as On, isNumber as jn, isObject as In, isPromise as Un, isServer as Fn, isString as Wn, isUndef as zn, isWindow as qn, logoutToUserCenter as Kn, removeAll as Vn, removeLocale as Xn, removeToken as Hn, setLocale as Yn, setMenuInfo as Zn, setToken as Gn, setUserCenterParams as Qn, setUserInfo as Jn, toUserCenterConsole as eo } from "./utils.js";
|
|
5
5
|
import ve from "dayjs";
|
|
6
|
-
import { Drawer as
|
|
6
|
+
import { Drawer as D, App as at, Modal as st, Button as rt, ConfigProvider as lt, Textarea as it, Form as Pe, message as ut } from "ant-design-vue";
|
|
7
7
|
import { ElScrollbar as ct, ElTooltip as dt } from "element-plus";
|
|
8
8
|
const pt = {
|
|
9
9
|
class: "icon",
|
|
@@ -12,7 +12,7 @@ const pt = {
|
|
|
12
12
|
height: "1.2em"
|
|
13
13
|
};
|
|
14
14
|
function ft(e, n) {
|
|
15
|
-
return
|
|
15
|
+
return $(), T("svg", pt, n[0] || (n[0] = [
|
|
16
16
|
N("path", {
|
|
17
17
|
fill: "currentColor",
|
|
18
18
|
d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"
|
|
@@ -23,21 +23,21 @@ function ft(e, n) {
|
|
|
23
23
|
}, null, -1)
|
|
24
24
|
]));
|
|
25
25
|
}
|
|
26
|
-
const
|
|
26
|
+
const Ae = le({ name: "ant-design-plus", render: ft }), mt = {
|
|
27
27
|
class: "icon",
|
|
28
28
|
viewBox: "0 0 1024 1024",
|
|
29
29
|
width: "1.2em",
|
|
30
30
|
height: "1.2em"
|
|
31
31
|
};
|
|
32
32
|
function vt(e, n) {
|
|
33
|
-
return
|
|
33
|
+
return $(), T("svg", mt, n[0] || (n[0] = [
|
|
34
34
|
N("path", {
|
|
35
35
|
fill: "currentColor",
|
|
36
36
|
d: "M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"
|
|
37
37
|
}, null, -1)
|
|
38
38
|
]));
|
|
39
39
|
}
|
|
40
|
-
const gt =
|
|
40
|
+
const gt = le({ name: "ant-design-minus", render: vt }), ht = /* @__PURE__ */ F({
|
|
41
41
|
inheritAttrs: !1,
|
|
42
42
|
__name: "index",
|
|
43
43
|
props: /* @__PURE__ */ I({
|
|
@@ -58,45 +58,45 @@ const gt = re({ name: "ant-design-minus", render: vt }), ht = /* @__PURE__ */ U(
|
|
|
58
58
|
}),
|
|
59
59
|
emits: /* @__PURE__ */ I(["change"], ["update:value"]),
|
|
60
60
|
setup(e, { emit: n }) {
|
|
61
|
-
const t = Q(e, "value"), s = e,
|
|
61
|
+
const t = Q(e, "value"), s = e, u = n, r = $e(), l = Ee();
|
|
62
62
|
function o(a) {
|
|
63
|
-
if (
|
|
64
|
-
t.value = null,
|
|
63
|
+
if (R(a))
|
|
64
|
+
t.value = null, u("change", null);
|
|
65
65
|
else {
|
|
66
66
|
let d = a;
|
|
67
|
-
s.stringMode && (d = Number(d).toFixed(s.precision)), t.value !== d && (t.value = d,
|
|
67
|
+
s.stringMode && (d = Number(d).toFixed(s.precision)), t.value !== d && (t.value = d, u("change", d));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
if (
|
|
70
|
+
function i() {
|
|
71
|
+
if (R(t.value))
|
|
72
72
|
return;
|
|
73
73
|
let a = t.value;
|
|
74
74
|
s.stringMode && (a = Number(a).toFixed(s.precision)), t.value = a;
|
|
75
75
|
}
|
|
76
76
|
function p() {
|
|
77
|
-
if (
|
|
77
|
+
if (l.disabled) return;
|
|
78
78
|
const a = Number(t.value);
|
|
79
|
-
!
|
|
79
|
+
!R(l.min) && a <= Number(l.min) || o(a - 1);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
81
|
+
function c() {
|
|
82
|
+
if (l.disabled) return;
|
|
83
83
|
const a = Number(t.value);
|
|
84
|
-
!
|
|
84
|
+
!R(l.max) && a >= Number(l.max) || o(a + 1);
|
|
85
85
|
}
|
|
86
86
|
return (a, d) => {
|
|
87
|
-
const y = gt,
|
|
88
|
-
return
|
|
87
|
+
const y = gt, g = Ae, v = re;
|
|
88
|
+
return $(), j(v, U({
|
|
89
89
|
value: t.value,
|
|
90
90
|
precision: e.precision,
|
|
91
91
|
stringMode: e.stringMode,
|
|
92
92
|
controls: !e.customControls,
|
|
93
93
|
onChange: o,
|
|
94
|
-
onBlur:
|
|
94
|
+
onBlur: i
|
|
95
95
|
}, a.$attrs), ie({ _: 2 }, [
|
|
96
|
-
K(Object.keys(k(r)), (
|
|
97
|
-
name:
|
|
96
|
+
K(Object.keys(k(r)), (x) => ({
|
|
97
|
+
name: x,
|
|
98
98
|
fn: M((f) => [
|
|
99
|
-
V(a.$slots,
|
|
99
|
+
V(a.$slots, x, ue(Me(f)))
|
|
100
100
|
])
|
|
101
101
|
})),
|
|
102
102
|
e.customControls ? {
|
|
@@ -116,9 +116,9 @@ const gt = re({ name: "ant-design-minus", render: vt }), ht = /* @__PURE__ */ U(
|
|
|
116
116
|
fn: M(() => [
|
|
117
117
|
N("div", {
|
|
118
118
|
class: "btn-control",
|
|
119
|
-
onClick:
|
|
119
|
+
onClick: c
|
|
120
120
|
}, [
|
|
121
|
-
E(
|
|
121
|
+
E(g, { class: "btn-icon" })
|
|
122
122
|
])
|
|
123
123
|
]),
|
|
124
124
|
key: "1"
|
|
@@ -126,7 +126,7 @@ const gt = re({ name: "ant-design-minus", render: vt }), ht = /* @__PURE__ */ U(
|
|
|
126
126
|
]), 1040, ["value", "precision", "stringMode", "controls"]);
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
}), yt = /* @__PURE__ */
|
|
129
|
+
}), yt = /* @__PURE__ */ F({
|
|
130
130
|
__name: "index",
|
|
131
131
|
props: {
|
|
132
132
|
value: {},
|
|
@@ -161,38 +161,39 @@ const gt = re({ name: "ant-design-minus", render: vt }), ht = /* @__PURE__ */ U(
|
|
|
161
161
|
},
|
|
162
162
|
emits: ["update:value", "change"],
|
|
163
163
|
setup(e, { emit: n }) {
|
|
164
|
-
const t = e, s = n,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
164
|
+
const t = e, s = n, u = Ee(), r = S(), l = S(), o = (a) => {
|
|
165
|
+
var w, P, B;
|
|
166
|
+
const d = t.maxUnit || t.unit, y = t.minUnit || t.unit, g = ve().add(t.max, d), v = ve().subtract(t.min, y), x = t.interval;
|
|
167
|
+
if (!((w = r.value) != null && w.length))
|
|
168
|
+
return a.isAfter(g) || a.isBefore(v);
|
|
169
|
+
const f = t.intervalUnit || t.unit, m = u.picker || "date", h = (P = r.value[0]) == null ? void 0 : P.startOf(m), _ = (B = r.value[1]) == null ? void 0 : B.endOf(m), b = h && (a.diff(h, f) > x || a.isAfter(g));
|
|
170
|
+
return _ && (_.diff(a, f) > x || a.isBefore(v)) || b;
|
|
171
|
+
}, i = (a) => {
|
|
172
|
+
a ? (r.value = [], l.value = []) : l.value = void 0;
|
|
173
|
+
}, p = (a) => {
|
|
174
|
+
s("update:value", a), s("change", a);
|
|
175
|
+
}, c = (a) => {
|
|
176
|
+
r.value = a;
|
|
176
177
|
};
|
|
177
|
-
return (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
180
|
-
value: k(
|
|
181
|
-
"disabled-date":
|
|
182
|
-
onChange:
|
|
183
|
-
onOpenChange:
|
|
184
|
-
onCalendarChange:
|
|
185
|
-
},
|
|
186
|
-
K(Object.keys(
|
|
187
|
-
name:
|
|
178
|
+
return (a, d) => {
|
|
179
|
+
const y = Oe;
|
|
180
|
+
return $(), j(y, U({
|
|
181
|
+
value: k(l) || e.value,
|
|
182
|
+
"disabled-date": o,
|
|
183
|
+
onChange: p,
|
|
184
|
+
onOpenChange: i,
|
|
185
|
+
onCalendarChange: c
|
|
186
|
+
}, a.$attrs), ie({ _: 2 }, [
|
|
187
|
+
K(Object.keys(a.$slots), (g) => ({
|
|
188
|
+
name: g,
|
|
188
189
|
fn: M((v) => [
|
|
189
|
-
V(
|
|
190
|
+
V(a.$slots, g, ue(Me(v)))
|
|
190
191
|
])
|
|
191
192
|
}))
|
|
192
193
|
]), 1040, ["value"]);
|
|
193
194
|
};
|
|
194
195
|
}
|
|
195
|
-
}), _t = /* @__PURE__ */
|
|
196
|
+
}), _t = /* @__PURE__ */ F({
|
|
196
197
|
inheritAttrs: !1,
|
|
197
198
|
__name: "index",
|
|
198
199
|
props: {
|
|
@@ -205,33 +206,33 @@ const gt = re({ name: "ant-design-minus", render: vt }), ht = /* @__PURE__ */ U(
|
|
|
205
206
|
},
|
|
206
207
|
setup(e) {
|
|
207
208
|
const n = e, t = S([]), s = S();
|
|
208
|
-
function
|
|
209
|
+
function u() {
|
|
209
210
|
const r = s.value;
|
|
210
|
-
r && t.value.every((
|
|
211
|
+
r && t.value.every((l) => l.value !== r) && (t.value.push({ value: r }), s.value = "");
|
|
211
212
|
}
|
|
212
213
|
return J(
|
|
213
214
|
() => n.options,
|
|
214
|
-
(r,
|
|
215
|
+
(r, l) => {
|
|
215
216
|
var o;
|
|
216
|
-
r &&
|
|
217
|
+
r && l && r.length === l.length && r.every((i) => l.includes(i)) || (t.value = ((o = n.options) == null ? void 0 : o.map((i) => ({ value: i }))) || []);
|
|
217
218
|
},
|
|
218
219
|
{ immediate: !0 }
|
|
219
|
-
), (r,
|
|
220
|
-
const o = Ie,
|
|
221
|
-
return
|
|
220
|
+
), (r, l) => {
|
|
221
|
+
const o = Ie, i = ke, p = Ae, c = we, a = Ue, d = je;
|
|
222
|
+
return $(), j(d, U({ options: k(t) }, r.$attrs), {
|
|
222
223
|
dropdownRender: M(({ menuNode: y }) => [
|
|
223
|
-
(
|
|
224
|
+
($(), j(Ve(y))),
|
|
224
225
|
E(o, { style: { margin: "4px 0" } }),
|
|
225
226
|
E(a, null, {
|
|
226
227
|
default: M(() => [
|
|
227
|
-
E(
|
|
228
|
+
E(i, {
|
|
228
229
|
value: k(s),
|
|
229
|
-
"onUpdate:value":
|
|
230
|
+
"onUpdate:value": l[0] || (l[0] = (g) => Z(s) ? s.value = g : null),
|
|
230
231
|
placeholder: e.inputPlaceholder
|
|
231
232
|
}, null, 8, ["value", "placeholder"]),
|
|
232
|
-
E(
|
|
233
|
+
E(c, {
|
|
233
234
|
type: "text",
|
|
234
|
-
onClick: ae(
|
|
235
|
+
onClick: ae(u, ["prevent"])
|
|
235
236
|
}, {
|
|
236
237
|
default: M(() => [
|
|
237
238
|
E(p)
|
|
@@ -251,7 +252,7 @@ function ce(e) {
|
|
|
251
252
|
e || (e = ee());
|
|
252
253
|
const n = (e == null ? void 0 : e.provides) || {}, t = bt(n, "configProvider"), s = n[t];
|
|
253
254
|
return Object.fromEntries(
|
|
254
|
-
Object.entries(s).map(([r,
|
|
255
|
+
Object.entries(s).map(([r, l]) => [r, k(l)])
|
|
255
256
|
);
|
|
256
257
|
}
|
|
257
258
|
function bt(e, n) {
|
|
@@ -275,9 +276,9 @@ function dn(e) {
|
|
|
275
276
|
}
|
|
276
277
|
return null;
|
|
277
278
|
}
|
|
278
|
-
let
|
|
279
|
-
|
|
280
|
-
const e =
|
|
279
|
+
let W, ge, O, he;
|
|
280
|
+
D.destroy = function() {
|
|
281
|
+
const e = D.instanceArr || [], n = e.pop();
|
|
281
282
|
if (n && G(null, n.container), e.length > 0) {
|
|
282
283
|
const t = e[e.length - 1].instance;
|
|
283
284
|
Object.assign(t.component.props, {
|
|
@@ -285,19 +286,19 @@ T.destroy = function() {
|
|
|
285
286
|
}), t.component.update();
|
|
286
287
|
}
|
|
287
288
|
};
|
|
288
|
-
|
|
289
|
-
(
|
|
289
|
+
D.destroyAll = function() {
|
|
290
|
+
(D.instanceArr || []).forEach((n) => {
|
|
290
291
|
G(null, n.container);
|
|
291
|
-
}),
|
|
292
|
+
}), D.instanceArr = [];
|
|
292
293
|
};
|
|
293
294
|
function pn() {
|
|
294
|
-
var
|
|
295
|
+
var c, a;
|
|
295
296
|
const e = ee();
|
|
296
|
-
if (!
|
|
297
|
+
if (!O) {
|
|
297
298
|
const d = at.useApp();
|
|
298
|
-
|
|
299
|
+
O = d.modal, ge = d.message, he = d.notification;
|
|
299
300
|
}
|
|
300
|
-
|
|
301
|
+
O.info || (O = st);
|
|
301
302
|
const n = {
|
|
302
303
|
zh: "关闭",
|
|
303
304
|
en: "Close",
|
|
@@ -306,76 +307,76 @@ function pn() {
|
|
|
306
307
|
zh: "请输入",
|
|
307
308
|
en: "Please Enter",
|
|
308
309
|
fr: "Veuillez entrer"
|
|
309
|
-
}, s = ce(),
|
|
310
|
+
}, s = ce(), u = ((a = (c = s == null ? void 0 : s.locale) == null ? void 0 : c.locale) == null ? void 0 : a.slice(0, 2)) || "en";
|
|
310
311
|
function r({ title: d, ...y }) {
|
|
311
|
-
const
|
|
312
|
-
return
|
|
312
|
+
const g = S();
|
|
313
|
+
return l({
|
|
313
314
|
title: d,
|
|
314
315
|
...y,
|
|
315
316
|
comp: it,
|
|
316
317
|
props: {
|
|
317
|
-
placeholder: t[
|
|
318
|
+
placeholder: t[u],
|
|
318
319
|
autoSize: { minRows: 6 },
|
|
319
|
-
value:
|
|
320
|
-
"onUpdate:value": (
|
|
321
|
-
|
|
320
|
+
value: g,
|
|
321
|
+
"onUpdate:value": (v) => {
|
|
322
|
+
g.value = v;
|
|
322
323
|
},
|
|
323
324
|
...y.props
|
|
324
325
|
},
|
|
325
326
|
class: "modal-comp modal-comp-input",
|
|
326
327
|
type: "confirm",
|
|
327
|
-
onOk: () => new Promise((
|
|
328
|
-
y.onOk && (y.onOk(
|
|
328
|
+
onOk: () => new Promise((v, x) => {
|
|
329
|
+
y.onOk && (y.onOk(g.value) ? v(1) : x()), v(1);
|
|
329
330
|
})
|
|
330
331
|
});
|
|
331
332
|
}
|
|
332
|
-
function
|
|
333
|
-
const
|
|
333
|
+
function l({ title: d, comp: y, props: g, ...v }) {
|
|
334
|
+
const x = z(y, g), f = (v == null ? void 0 : v.type) ?? "info", m = {
|
|
334
335
|
title: d,
|
|
335
|
-
content:
|
|
336
|
+
content: x,
|
|
336
337
|
width: "auto",
|
|
337
338
|
icon: null,
|
|
338
339
|
closable: !0,
|
|
339
340
|
maskClosable: !0,
|
|
340
341
|
centered: !0,
|
|
341
342
|
class: "modal-comp",
|
|
342
|
-
...
|
|
343
|
+
...v
|
|
343
344
|
};
|
|
344
345
|
switch (f) {
|
|
345
346
|
case "info":
|
|
346
|
-
|
|
347
|
+
W = O.info(m);
|
|
347
348
|
break;
|
|
348
349
|
case "warning":
|
|
349
|
-
|
|
350
|
+
W = O.warning(m);
|
|
350
351
|
break;
|
|
351
352
|
case "success":
|
|
352
|
-
|
|
353
|
+
W = O.success(m);
|
|
353
354
|
break;
|
|
354
355
|
case "confirm":
|
|
355
|
-
|
|
356
|
+
W = O.confirm(m);
|
|
356
357
|
break;
|
|
357
358
|
}
|
|
358
|
-
return
|
|
359
|
+
return W;
|
|
359
360
|
}
|
|
360
361
|
function o() {
|
|
361
|
-
|
|
362
|
+
W == null || W.destroy();
|
|
362
363
|
}
|
|
363
|
-
function
|
|
364
|
-
const
|
|
365
|
-
|
|
366
|
-
const f =
|
|
364
|
+
function i({ title: d, comp: y, props: g, ...v }) {
|
|
365
|
+
const x = v.getContainer || document.createDocumentFragment();
|
|
366
|
+
D.instanceArr || (D.instanceArr = []);
|
|
367
|
+
const f = D.instanceArr, m = f[f.length - 1];
|
|
367
368
|
let h;
|
|
368
369
|
if ((m == null ? void 0 : m.comp) === y) {
|
|
369
370
|
const _ = m.instance;
|
|
370
|
-
Object.assign(_.component.props, { title: d, ...
|
|
371
|
+
Object.assign(_.component.props, { title: d, ...v }), _.component.update(), h = m.compInstance, Object.assign(h.component.props, { ...g }), h.component.update();
|
|
371
372
|
} else {
|
|
372
373
|
if (m) {
|
|
373
|
-
const
|
|
374
|
-
Object.assign(
|
|
374
|
+
const B = m.instance;
|
|
375
|
+
Object.assign(B.component.props, {
|
|
375
376
|
contentWrapperStyle: { transform: "translateX(-180px)" }
|
|
376
|
-
}),
|
|
377
|
+
}), B.component.update();
|
|
377
378
|
}
|
|
378
|
-
h = z(y,
|
|
379
|
+
h = z(y, g);
|
|
379
380
|
const _ = {
|
|
380
381
|
default: () => z(
|
|
381
382
|
ct,
|
|
@@ -383,41 +384,41 @@ function pn() {
|
|
|
383
384
|
h
|
|
384
385
|
)
|
|
385
386
|
};
|
|
386
|
-
|
|
387
|
+
v.footer === void 0 && Object.assign(_, {
|
|
387
388
|
footer: () => z(
|
|
388
|
-
|
|
389
|
+
rt,
|
|
389
390
|
{
|
|
390
391
|
onClick: () => {
|
|
391
|
-
|
|
392
|
+
D.destroy();
|
|
392
393
|
}
|
|
393
394
|
},
|
|
394
|
-
n[
|
|
395
|
+
n[u]
|
|
395
396
|
)
|
|
396
397
|
});
|
|
397
|
-
const
|
|
398
|
-
delete
|
|
398
|
+
const b = v.width || 992;
|
|
399
|
+
delete v.width;
|
|
399
400
|
const C = z(
|
|
400
|
-
|
|
401
|
+
D,
|
|
401
402
|
{
|
|
402
403
|
title: d,
|
|
403
|
-
width:
|
|
404
|
+
width: b,
|
|
404
405
|
open: !0,
|
|
405
406
|
class: "drawer-comp",
|
|
406
407
|
footerStyle: {
|
|
407
408
|
textAlign: "right"
|
|
408
409
|
},
|
|
409
410
|
onClose: () => {
|
|
410
|
-
|
|
411
|
+
v != null && v.afterClose && v.afterClose(), D.destroy();
|
|
411
412
|
},
|
|
412
|
-
...
|
|
413
|
+
...v
|
|
413
414
|
},
|
|
414
415
|
_
|
|
415
|
-
),
|
|
416
|
-
|
|
417
|
-
{ ...s, prefixCls:
|
|
416
|
+
), w = s.getPrefixCls(), P = z(
|
|
417
|
+
lt,
|
|
418
|
+
{ ...s, prefixCls: w },
|
|
418
419
|
{ default: () => C }
|
|
419
420
|
);
|
|
420
|
-
|
|
421
|
+
P.appContext = e.appContext, G(P, x), f.push({ instance: C, comp: y, compInstance: h, container: x });
|
|
421
422
|
}
|
|
422
423
|
return {
|
|
423
424
|
updateProps: (_) => {
|
|
@@ -426,20 +427,20 @@ function pn() {
|
|
|
426
427
|
};
|
|
427
428
|
}
|
|
428
429
|
function p() {
|
|
429
|
-
|
|
430
|
+
D.destroy();
|
|
430
431
|
}
|
|
431
432
|
return {
|
|
432
433
|
message: ge,
|
|
433
|
-
modal:
|
|
434
|
+
modal: O,
|
|
434
435
|
notification: he,
|
|
435
436
|
modalInput: r,
|
|
436
|
-
modalComp:
|
|
437
|
+
modalComp: l,
|
|
437
438
|
modalDestroy: o,
|
|
438
|
-
drawerComp:
|
|
439
|
+
drawerComp: i,
|
|
439
440
|
drawerDestroy: p
|
|
440
441
|
};
|
|
441
442
|
}
|
|
442
|
-
const xt = /* @__PURE__ */
|
|
443
|
+
const xt = /* @__PURE__ */ F({
|
|
443
444
|
inheritAttrs: !1,
|
|
444
445
|
__name: "index",
|
|
445
446
|
props: {
|
|
@@ -457,77 +458,77 @@ const xt = /* @__PURE__ */ U({
|
|
|
457
458
|
}
|
|
458
459
|
},
|
|
459
460
|
setup(e, { expose: n }) {
|
|
460
|
-
const t = e, s = $e(),
|
|
461
|
+
const t = e, s = $e(), u = S([]), r = S(!1), l = S(0), o = S(1), i = S(10), p = S(), c = S(), a = {
|
|
461
462
|
zh: "共 {num} 条",
|
|
462
463
|
en: "Total {num} items",
|
|
463
464
|
fr: "Total de {num}"
|
|
464
|
-
}, d = ce(), y =
|
|
465
|
-
var
|
|
466
|
-
return ((C = (
|
|
467
|
-
}),
|
|
468
|
-
total:
|
|
465
|
+
}, d = ce(), y = L(() => {
|
|
466
|
+
var b, C;
|
|
467
|
+
return ((C = (b = d == null ? void 0 : d.locale) == null ? void 0 : b.locale) == null ? void 0 : C.slice(0, 2)) || "en";
|
|
468
|
+
}), g = L(() => ({
|
|
469
|
+
total: l.value,
|
|
469
470
|
current: o.value,
|
|
470
|
-
pageSize:
|
|
471
|
+
pageSize: i.value,
|
|
471
472
|
showSizeChanger: !0,
|
|
472
473
|
size: "small",
|
|
473
474
|
showTotal: (_) => a[y.value].replace("{num}", _)
|
|
474
475
|
}));
|
|
475
|
-
function
|
|
476
|
+
function v() {
|
|
476
477
|
var _;
|
|
477
478
|
if (typeof t.loadData == "function") {
|
|
478
479
|
r.value = !0;
|
|
479
|
-
let
|
|
480
|
-
t.newFieldName ?
|
|
480
|
+
let b;
|
|
481
|
+
t.newFieldName ? b = { current: o.value, size: i.value } : b = { pageNo: o.value, pageSize: i.value }, t.formatSortParams && ((_ = c.value) != null && _.orderMap) && (b[c.value.field + "SortField"] = c.value.orderMap), t.loadData(b, p.value, c.value).then((C) => {
|
|
481
482
|
if (r.value = !1, (C == null ? void 0 : C.code) === 0) {
|
|
482
|
-
const
|
|
483
|
-
t.newFieldName ? (
|
|
483
|
+
const w = C.result || {};
|
|
484
|
+
t.newFieldName ? (l.value = w.total, u.value = w.records) : (l.value = w.totalCount, u.value = w.data);
|
|
484
485
|
}
|
|
485
486
|
});
|
|
486
487
|
}
|
|
487
488
|
}
|
|
488
|
-
function
|
|
489
|
-
if (o.value = _.current,
|
|
490
|
-
const
|
|
489
|
+
function x(_, b, C) {
|
|
490
|
+
if (o.value = _.current, i.value = _.pageSize, p.value = b, C) {
|
|
491
|
+
const w = {
|
|
491
492
|
ascend: "asc",
|
|
492
493
|
descend: "desc"
|
|
493
494
|
};
|
|
494
|
-
C.orderMap =
|
|
495
|
+
C.orderMap = w[C.order] || "";
|
|
495
496
|
}
|
|
496
|
-
|
|
497
|
+
c.value = C, v();
|
|
497
498
|
}
|
|
498
|
-
function f(_,
|
|
499
|
-
|
|
499
|
+
function f(_, b) {
|
|
500
|
+
b.width = _;
|
|
500
501
|
}
|
|
501
502
|
function m() {
|
|
502
|
-
o.value = 1,
|
|
503
|
+
o.value = 1, v();
|
|
503
504
|
}
|
|
504
505
|
function h() {
|
|
505
|
-
o.value = 1,
|
|
506
|
+
o.value = 1, l.value = 0, u.value = [];
|
|
506
507
|
}
|
|
507
508
|
return n({
|
|
508
|
-
loadData:
|
|
509
|
+
loadData: v,
|
|
509
510
|
refresh: m,
|
|
510
511
|
reset: h
|
|
511
|
-
}), (_,
|
|
512
|
-
const C =
|
|
513
|
-
return
|
|
512
|
+
}), (_, b) => {
|
|
513
|
+
const C = Fe;
|
|
514
|
+
return $(), j(C, U({
|
|
514
515
|
class: "table-ex",
|
|
515
516
|
loading: k(r),
|
|
516
|
-
pagination: k(
|
|
517
|
-
dataSource: k(
|
|
518
|
-
onChange:
|
|
517
|
+
pagination: k(g),
|
|
518
|
+
dataSource: k(u),
|
|
519
|
+
onChange: x,
|
|
519
520
|
onResizeColumn: f
|
|
520
521
|
}, _.$attrs), ie({ _: 2 }, [
|
|
521
|
-
K(Object.keys(k(s)), (
|
|
522
|
-
name:
|
|
523
|
-
fn: M((
|
|
524
|
-
|
|
522
|
+
K(Object.keys(k(s)), (w) => ({
|
|
523
|
+
name: w,
|
|
524
|
+
fn: M((P) => [
|
|
525
|
+
w !== "emptyText" ? V(_.$slots, w, ue(U({ key: 0 }, P))) : V(_.$slots, w, { key: 1 })
|
|
525
526
|
])
|
|
526
527
|
}))
|
|
527
528
|
]), 1040, ["loading", "pagination", "dataSource"]);
|
|
528
529
|
};
|
|
529
530
|
}
|
|
530
|
-
}), Ct = /* @__PURE__ */
|
|
531
|
+
}), Ct = /* @__PURE__ */ F({
|
|
531
532
|
__name: "index",
|
|
532
533
|
props: {
|
|
533
534
|
leftMin: {
|
|
@@ -544,37 +545,37 @@ const xt = /* @__PURE__ */ U({
|
|
|
544
545
|
}
|
|
545
546
|
},
|
|
546
547
|
setup(e) {
|
|
547
|
-
const n = e, t = S(), s = S(),
|
|
548
|
+
const n = e, t = S(), s = S(), u = S({}), r = S({}), l = S(0.2);
|
|
548
549
|
function o(p) {
|
|
549
|
-
|
|
550
|
+
u.value = { width: `calc(${p * 100}% - 5px)` }, r.value = { width: `calc(${(1 - p) * 100}% - 5px)` };
|
|
550
551
|
}
|
|
551
|
-
function
|
|
552
|
+
function i() {
|
|
552
553
|
const p = t.value;
|
|
553
554
|
if (!p)
|
|
554
555
|
return;
|
|
555
|
-
const
|
|
556
|
-
function y(
|
|
557
|
-
|
|
558
|
-
const f = (
|
|
559
|
-
f > n.leftMin && f < n.leftMax && (
|
|
556
|
+
const c = p.clientWidth, a = p.getBoundingClientRect(), d = a.left;
|
|
557
|
+
function y(v) {
|
|
558
|
+
v.preventDefault(), (v.clientX < a.left || v.clientX > a.right || v.clientY < a.top || v.clientY > a.bottom) && g();
|
|
559
|
+
const f = (v.clientX - d) / c;
|
|
560
|
+
f > n.leftMin && f < n.leftMax && (l.value = f, o(f));
|
|
560
561
|
}
|
|
561
|
-
function
|
|
562
|
-
document.removeEventListener("mousemove", y), document.removeEventListener("mouseup",
|
|
562
|
+
function g() {
|
|
563
|
+
document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", g);
|
|
563
564
|
}
|
|
564
|
-
document.addEventListener("mousemove", y), document.addEventListener("mouseup",
|
|
565
|
+
document.addEventListener("mousemove", y), document.addEventListener("mouseup", g);
|
|
565
566
|
}
|
|
566
|
-
return
|
|
567
|
-
o(
|
|
567
|
+
return Ne(() => {
|
|
568
|
+
o(l.value), s.value && s.value.addEventListener("mousedown", i, !1);
|
|
568
569
|
}), Xe(() => {
|
|
569
|
-
s.value && s.value.removeEventListener("mousedown",
|
|
570
|
-
}), (p,
|
|
570
|
+
s.value && s.value.removeEventListener("mousedown", i);
|
|
571
|
+
}), (p, c) => ($(), T("div", {
|
|
571
572
|
ref_key: "container",
|
|
572
573
|
ref: t,
|
|
573
574
|
class: He(["wl-splitter", { bordered: e.bordered }])
|
|
574
575
|
}, [
|
|
575
576
|
N("div", {
|
|
576
577
|
class: "my-left",
|
|
577
|
-
style: pe(k(
|
|
578
|
+
style: pe(k(u))
|
|
578
579
|
}, [
|
|
579
580
|
V(p.$slots, "left")
|
|
580
581
|
], 4),
|
|
@@ -601,7 +602,7 @@ const xt = /* @__PURE__ */ U({
|
|
|
601
602
|
xmlns: "http://www.w3.org/2000/svg"
|
|
602
603
|
};
|
|
603
604
|
function kt(e, n) {
|
|
604
|
-
return
|
|
605
|
+
return $(), T("svg", St, n[0] || (n[0] = [
|
|
605
606
|
N("path", {
|
|
606
607
|
d: "M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",
|
|
607
608
|
stroke: "#272E3B",
|
|
@@ -622,7 +623,7 @@ function kt(e, n) {
|
|
|
622
623
|
}, null, -1)
|
|
623
624
|
]));
|
|
624
625
|
}
|
|
625
|
-
const wt =
|
|
626
|
+
const wt = le({ name: "local-clear", render: kt }), $t = { class: "nums-box" }, Et = { class: "btn-box" }, Mt = /* @__PURE__ */ F({
|
|
626
627
|
inheritAttrs: !1,
|
|
627
628
|
__name: "index",
|
|
628
629
|
props: /* @__PURE__ */ I({
|
|
@@ -648,24 +649,24 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
648
649
|
}),
|
|
649
650
|
emits: /* @__PURE__ */ I(["enter"], ["update:value"]),
|
|
650
651
|
setup(e, { emit: n }) {
|
|
651
|
-
const t = e, s = n,
|
|
652
|
+
const t = e, s = n, u = S(), r = S(), l = S(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), o = Q(e, "value"), i = S(!1);
|
|
652
653
|
function p() {
|
|
653
|
-
|
|
654
|
+
i.value = !0;
|
|
654
655
|
}
|
|
655
|
-
function
|
|
656
|
-
|
|
656
|
+
function c() {
|
|
657
|
+
x();
|
|
657
658
|
}
|
|
658
659
|
function a(f) {
|
|
659
660
|
r.value.focus(), o.value = Number(f).toFixed(t.precision);
|
|
660
661
|
}
|
|
661
662
|
function d(f) {
|
|
662
|
-
if (r.value.focus(),
|
|
663
|
+
if (r.value.focus(), R(o.value) || o.value === "") {
|
|
663
664
|
if (["00", "."].includes(f))
|
|
664
665
|
return;
|
|
665
666
|
o.value = f;
|
|
666
667
|
} else {
|
|
667
|
-
const m = String(o.value), h =
|
|
668
|
-
o.value = `${m.slice(0, _)}${f}${m.slice(
|
|
668
|
+
const m = String(o.value), h = u.value.getElementsByTagName("input")[0], _ = h.selectionStart || 0, b = h.selectionEnd || 0;
|
|
669
|
+
o.value = `${m.slice(0, _)}${f}${m.slice(b)}`;
|
|
669
670
|
const C = _ + f.length;
|
|
670
671
|
fe(() => {
|
|
671
672
|
r.value.setSelectionRange(C, C);
|
|
@@ -673,41 +674,41 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
673
674
|
}
|
|
674
675
|
}
|
|
675
676
|
function y() {
|
|
676
|
-
if (r.value.focus(),
|
|
677
|
+
if (r.value.focus(), R(o.value))
|
|
677
678
|
return;
|
|
678
679
|
const f = String(o.value);
|
|
679
680
|
if (f != null && f.length) {
|
|
680
|
-
const m =
|
|
681
|
-
h === _ ? o.value = f.slice(0,
|
|
682
|
-
r.value.setSelectionRange(
|
|
681
|
+
const m = u.value.getElementsByTagName("input")[0], h = m.selectionStart || 0, _ = m.selectionEnd || 0, b = h > 0 ? h - 1 : 0;
|
|
682
|
+
h === _ ? o.value = f.slice(0, b) + f.slice(_) : o.value = f.slice(0, h) + f.slice(_), fe(() => {
|
|
683
|
+
r.value.setSelectionRange(b, b);
|
|
683
684
|
});
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
|
-
function
|
|
687
|
+
function g() {
|
|
687
688
|
r.value.focus(), o.value = "";
|
|
688
689
|
}
|
|
689
|
-
function
|
|
690
|
+
function v() {
|
|
690
691
|
r.value.blur();
|
|
691
692
|
}
|
|
692
|
-
function
|
|
693
|
+
function x() {
|
|
693
694
|
const f = t.min, m = t.max;
|
|
694
695
|
let h = parseFloat(o.value || "0");
|
|
695
|
-
|
|
696
|
+
R(f) || (h = h > f ? h : f), R(m) || (h = h > m ? m : h), o.value = Number(h).toFixed(t.precision), i.value = !1, s("enter");
|
|
696
697
|
}
|
|
697
698
|
return (f, m) => {
|
|
698
|
-
const h = we, _ =
|
|
699
|
-
return
|
|
699
|
+
const h = we, _ = qe, b = wt, C = ze, w = ke, P = We, B = Ye("longpress");
|
|
700
|
+
return $(), T("div", {
|
|
700
701
|
class: "number-keyboard",
|
|
701
702
|
ref_key: "numberKeyboard",
|
|
702
|
-
ref:
|
|
703
|
+
ref: u
|
|
703
704
|
}, [
|
|
704
|
-
E(
|
|
705
|
+
E(P, {
|
|
705
706
|
overlayClassName: "popover-keyboard",
|
|
706
707
|
trigger: "manual",
|
|
707
708
|
placement: "bottomLeft",
|
|
708
709
|
align: { offset: [0, -9] },
|
|
709
|
-
open: k(
|
|
710
|
-
"onUpdate:open": m[2] || (m[2] = (
|
|
710
|
+
open: k(i),
|
|
711
|
+
"onUpdate:open": m[2] || (m[2] = (A) => Z(i) ? i.value = A : null)
|
|
711
712
|
}, {
|
|
712
713
|
content: M(() => [
|
|
713
714
|
N("div", {
|
|
@@ -720,23 +721,23 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
720
721
|
E(_, { span: 18 }, {
|
|
721
722
|
default: M(() => [
|
|
722
723
|
N("div", $t, [
|
|
723
|
-
(
|
|
724
|
+
($(!0), T(H, null, K(e.quickNums, (A) => ($(), j(h, {
|
|
724
725
|
class: "btn-num",
|
|
725
|
-
key:
|
|
726
|
-
onClick: (
|
|
726
|
+
key: A,
|
|
727
|
+
onClick: (Re) => a(A)
|
|
727
728
|
}, {
|
|
728
729
|
default: M(() => [
|
|
729
|
-
te(se(
|
|
730
|
+
te(se(A), 1)
|
|
730
731
|
]),
|
|
731
732
|
_: 2
|
|
732
733
|
}, 1032, ["onClick"]))), 128)),
|
|
733
|
-
(
|
|
734
|
+
($(!0), T(H, null, K(k(l), (A) => ($(), j(h, {
|
|
734
735
|
class: "btn-num",
|
|
735
|
-
key:
|
|
736
|
-
onClick: (
|
|
736
|
+
key: A,
|
|
737
|
+
onClick: (Re) => d(A)
|
|
737
738
|
}, {
|
|
738
739
|
default: M(() => [
|
|
739
|
-
te(se(
|
|
740
|
+
te(se(A), 1)
|
|
740
741
|
]),
|
|
741
742
|
_: 2
|
|
742
743
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -747,21 +748,21 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
747
748
|
E(_, { span: 6 }, {
|
|
748
749
|
default: M(() => [
|
|
749
750
|
N("div", Et, [
|
|
750
|
-
Ge((
|
|
751
|
+
Ge(($(), j(h, {
|
|
751
752
|
class: "btn-clear",
|
|
752
753
|
onClick: y
|
|
753
754
|
}, {
|
|
754
755
|
default: M(() => [
|
|
755
|
-
E(
|
|
756
|
+
E(b, { style: { width: "24px", height: "24px" } })
|
|
756
757
|
]),
|
|
757
758
|
_: 1
|
|
758
759
|
})), [
|
|
759
|
-
[
|
|
760
|
+
[B, g]
|
|
760
761
|
]),
|
|
761
762
|
E(h, {
|
|
762
763
|
class: "btn-enter",
|
|
763
764
|
type: "primary",
|
|
764
|
-
onClick: ae(
|
|
765
|
+
onClick: ae(v, ["stop"])
|
|
765
766
|
}, {
|
|
766
767
|
default: M(() => m[3] || (m[3] = [
|
|
767
768
|
te("Enter ")
|
|
@@ -778,15 +779,15 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
778
779
|
], 32)
|
|
779
780
|
]),
|
|
780
781
|
default: M(() => [
|
|
781
|
-
E(
|
|
782
|
+
E(w, U({
|
|
782
783
|
ref_key: "inputRef",
|
|
783
784
|
ref: r,
|
|
784
785
|
value: o.value,
|
|
785
|
-
"onUpdate:value": m[1] || (m[1] = (
|
|
786
|
+
"onUpdate:value": m[1] || (m[1] = (A) => o.value = A)
|
|
786
787
|
}, f.$attrs, {
|
|
787
788
|
onFocus: p,
|
|
788
|
-
onBlur:
|
|
789
|
-
onKeyup: Ze(
|
|
789
|
+
onBlur: c,
|
|
790
|
+
onKeyup: Ze(v, ["enter"])
|
|
790
791
|
}), null, 16, ["value"])
|
|
791
792
|
]),
|
|
792
793
|
_: 1
|
|
@@ -794,7 +795,7 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
794
795
|
], 512);
|
|
795
796
|
};
|
|
796
797
|
}
|
|
797
|
-
}), Nt = /* @__PURE__ */
|
|
798
|
+
}), Nt = /* @__PURE__ */ F({
|
|
798
799
|
inheritAttrs: !1,
|
|
799
800
|
__name: "index",
|
|
800
801
|
props: /* @__PURE__ */ I({
|
|
@@ -823,32 +824,32 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
823
824
|
}),
|
|
824
825
|
emits: /* @__PURE__ */ I(["change"], ["update:value"]),
|
|
825
826
|
setup(e, { emit: n }) {
|
|
826
|
-
Qe((
|
|
827
|
-
"6ffd511e": k(
|
|
827
|
+
Qe((c) => ({
|
|
828
|
+
"6ffd511e": k(l),
|
|
828
829
|
"1201d0a5": k(o),
|
|
829
|
-
"1201d466": k(
|
|
830
|
+
"1201d466": k(i)
|
|
830
831
|
}));
|
|
831
|
-
const t = e, s = Q(e, "value"),
|
|
832
|
-
const
|
|
833
|
-
for (let
|
|
834
|
-
const
|
|
835
|
-
if (
|
|
836
|
-
const f = a.shift(), m = v
|
|
837
|
-
|
|
832
|
+
const t = e, s = Q(e, "value"), u = n, r = L(() => {
|
|
833
|
+
const c = {}, a = Array.from(t.flagStops), d = t.min || 0, y = t.max || 100, g = [d, ...s.value, y];
|
|
834
|
+
for (let v = 0; v < g.length; v++) {
|
|
835
|
+
const x = g[v];
|
|
836
|
+
if (c[x] = x, v > 0) {
|
|
837
|
+
const f = a.shift(), m = g[v - 1], h = m + (x - m) / 2;
|
|
838
|
+
c[h] = { style: { top: "-28px" }, label: f };
|
|
838
839
|
}
|
|
839
840
|
}
|
|
840
|
-
return
|
|
841
|
-
}),
|
|
842
|
-
const
|
|
843
|
-
return `linear-gradient(90deg, ${
|
|
844
|
-
}), o =
|
|
845
|
-
function p(
|
|
841
|
+
return c;
|
|
842
|
+
}), l = L(() => {
|
|
843
|
+
const c = s.value, a = t.min || 0, d = t.max || 100, y = Math.floor((c[0] - a) / (d - a) * 100), g = t.colorStops, v = g[0], x = g[g.length - 1];
|
|
844
|
+
return `linear-gradient(90deg, ${v} 0%, ${v} ${y}%, ${x} ${y}%, ${x} 100%)`;
|
|
845
|
+
}), o = L(() => t.colorStops[1]), i = L(() => t.colorStops[2]);
|
|
846
|
+
function p(c) {
|
|
846
847
|
const a = t.min || 0, d = t.max || 100;
|
|
847
|
-
|
|
848
|
+
c[0] <= a ? c[0] = a + 1 : c.at(-1) >= d && (c[c.length - 1] = d - 1), c.length === new Set(c).size && (s.value = c, u("change", c));
|
|
848
849
|
}
|
|
849
|
-
return (
|
|
850
|
-
const d =
|
|
851
|
-
return
|
|
850
|
+
return (c, a) => {
|
|
851
|
+
const d = Ke;
|
|
852
|
+
return $(), j(d, U({
|
|
852
853
|
class: "rate-slider",
|
|
853
854
|
value: s.value,
|
|
854
855
|
min: e.min,
|
|
@@ -856,13 +857,13 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
856
857
|
range: "",
|
|
857
858
|
marks: k(r),
|
|
858
859
|
onChange: p
|
|
859
|
-
},
|
|
860
|
+
}, c.$attrs), null, 16, ["value", "min", "max", "marks"]);
|
|
860
861
|
};
|
|
861
862
|
}
|
|
862
863
|
}), Pt = { class: "ip-input" }, At = { class: "ip-wrapper" }, Tt = {
|
|
863
864
|
key: 0,
|
|
864
865
|
class: "ip-separator"
|
|
865
|
-
}, Dt = /* @__PURE__ */
|
|
866
|
+
}, Dt = /* @__PURE__ */ F({
|
|
866
867
|
__name: "index",
|
|
867
868
|
props: /* @__PURE__ */ I({
|
|
868
869
|
hasPort: {
|
|
@@ -875,20 +876,20 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
875
876
|
}),
|
|
876
877
|
emits: ["update:value"],
|
|
877
878
|
setup(e) {
|
|
878
|
-
const n =
|
|
879
|
-
var y,
|
|
880
|
-
const d =
|
|
879
|
+
const n = Pe.useInjectFormItemContext(), t = e, s = Q(e, "value"), u = S(["", "", "", ""]), r = S(), l = S(""), o = S(), i = (a) => {
|
|
880
|
+
var y, g;
|
|
881
|
+
const d = u.value[a];
|
|
881
882
|
if (d && (!/^\d+$/.test(d) || parseInt(d) > 255)) {
|
|
882
|
-
|
|
883
|
+
u.value[a] = "";
|
|
883
884
|
return;
|
|
884
885
|
}
|
|
885
|
-
parseInt(d) >= 100 && (a < 3 ? (y = r.value) != null && y.length && r.value[a + 1].focus() : t.hasPort && ((
|
|
886
|
+
parseInt(d) >= 100 && (a < 3 ? (y = r.value) != null && y.length && r.value[a + 1].focus() : t.hasPort && ((g = o.value) == null || g.focus())), s.value = `${u.value.join(".")}${t.hasPort ? ":" + l.value : ""}`, n.clearValidate();
|
|
886
887
|
}, p = (a, d) => {
|
|
887
|
-
var y,
|
|
888
|
-
d.key === " " && a < 3 && (d.preventDefault(), (y = r.value) != null && y.length && r.value[a + 1].focus()), d.key === "Backspace" &&
|
|
888
|
+
var y, g;
|
|
889
|
+
d.key === " " && a < 3 && (d.preventDefault(), (y = r.value) != null && y.length && r.value[a + 1].focus()), d.key === "Backspace" && u.value[a] === "" && a > 0 && (g = r.value) != null && g.length && r.value[a - 1].focus();
|
|
889
890
|
};
|
|
890
|
-
function
|
|
891
|
-
s.value = `${
|
|
891
|
+
function c() {
|
|
892
|
+
s.value = `${u.value.join(".")}${t.hasPort ? ":" + (l.value || "") : ""}`, n.clearValidate();
|
|
892
893
|
}
|
|
893
894
|
return J(
|
|
894
895
|
() => s.value,
|
|
@@ -896,56 +897,56 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
896
897
|
if (a) {
|
|
897
898
|
let d = a;
|
|
898
899
|
if (t.hasPort) {
|
|
899
|
-
const
|
|
900
|
-
|
|
900
|
+
const g = a.split(":");
|
|
901
|
+
l.value = g[1] || "", d = g[0];
|
|
901
902
|
}
|
|
902
903
|
const y = d.split(".");
|
|
903
|
-
y.length === 4 && (
|
|
904
|
+
y.length === 4 && (u.value = y);
|
|
904
905
|
} else
|
|
905
|
-
|
|
906
|
+
u.value = ["", "", "", ""], l.value = "";
|
|
906
907
|
},
|
|
907
908
|
{ immediate: !0 }
|
|
908
909
|
), (a, d) => {
|
|
909
|
-
const y =
|
|
910
|
-
return
|
|
910
|
+
const y = re;
|
|
911
|
+
return $(), T("div", Pt, [
|
|
911
912
|
N("div", At, [
|
|
912
|
-
(
|
|
913
|
+
($(!0), T(H, null, K(k(u), (g, v) => ($(), T(H, { key: v }, [
|
|
913
914
|
E(y, {
|
|
914
915
|
ref_for: !0,
|
|
915
916
|
ref_key: "ipPartArr",
|
|
916
917
|
ref: r,
|
|
917
918
|
class: "ip-part",
|
|
918
|
-
value: k(
|
|
919
|
-
"onUpdate:value": (
|
|
919
|
+
value: k(u)[v],
|
|
920
|
+
"onUpdate:value": (x) => k(u)[v] = x,
|
|
920
921
|
min: 0,
|
|
921
922
|
max: 255,
|
|
922
923
|
precision: 0,
|
|
923
924
|
controls: !1,
|
|
924
|
-
onChange: (
|
|
925
|
-
onKeydown: (
|
|
925
|
+
onChange: (x) => i(v),
|
|
926
|
+
onKeydown: (x) => p(v, x)
|
|
926
927
|
}, null, 8, ["value", "onUpdate:value", "onChange", "onKeydown"]),
|
|
927
|
-
|
|
928
|
+
v < 3 ? ($(), T("span", Tt, ".")) : me("", !0)
|
|
928
929
|
], 64))), 128))
|
|
929
930
|
]),
|
|
930
|
-
e.hasPort ? (
|
|
931
|
+
e.hasPort ? ($(), T(H, { key: 0 }, [
|
|
931
932
|
d[1] || (d[1] = N("span", { class: "ip-port-separator" }, ":", -1)),
|
|
932
933
|
E(y, {
|
|
933
934
|
ref_key: "portRef",
|
|
934
935
|
ref: o,
|
|
935
936
|
class: "ip-port",
|
|
936
|
-
value: k(
|
|
937
|
-
"onUpdate:value": d[0] || (d[0] = (
|
|
937
|
+
value: k(l),
|
|
938
|
+
"onUpdate:value": d[0] || (d[0] = (g) => Z(l) ? l.value = g : null),
|
|
938
939
|
min: 0,
|
|
939
940
|
max: 65535,
|
|
940
941
|
precision: 0,
|
|
941
942
|
controls: !1,
|
|
942
|
-
onChange:
|
|
943
|
+
onChange: c
|
|
943
944
|
}, null, 8, ["value"])
|
|
944
945
|
], 64)) : me("", !0)
|
|
945
946
|
]);
|
|
946
947
|
};
|
|
947
948
|
}
|
|
948
|
-
}), Lt = { class: "number-range" }, Bt = { class: "separator" }, Rt = /* @__PURE__ */
|
|
949
|
+
}), Lt = { class: "number-range" }, Bt = { class: "separator" }, Rt = /* @__PURE__ */ F({
|
|
949
950
|
inheritAttrs: !1,
|
|
950
951
|
__name: "index",
|
|
951
952
|
props: /* @__PURE__ */ I({
|
|
@@ -972,41 +973,41 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
972
973
|
}),
|
|
973
974
|
emits: /* @__PURE__ */ I(["change"], ["update:value"]),
|
|
974
975
|
setup(e, { emit: n }) {
|
|
975
|
-
const t = e, s = Q(e, "value"),
|
|
976
|
+
const t = e, s = Q(e, "value"), u = n, r = Pe.useInjectFormItemContext(), l = L(() => {
|
|
976
977
|
const a = s.value[1];
|
|
977
|
-
return
|
|
978
|
-
}), o =
|
|
978
|
+
return R(a) ? t.max : a;
|
|
979
|
+
}), o = L(() => {
|
|
979
980
|
const a = s.value[0];
|
|
980
|
-
return
|
|
981
|
-
}),
|
|
982
|
-
function
|
|
983
|
-
const a = [
|
|
984
|
-
s.value = a, r.onFieldChange(),
|
|
981
|
+
return R(a) ? t.min : a;
|
|
982
|
+
}), i = S(), p = S();
|
|
983
|
+
function c() {
|
|
984
|
+
const a = [i.value, p.value];
|
|
985
|
+
s.value = a, r.onFieldChange(), u("change", a);
|
|
985
986
|
}
|
|
986
987
|
return J(
|
|
987
988
|
() => s.value,
|
|
988
989
|
(a) => {
|
|
989
|
-
a != null && a.length ? (
|
|
990
|
+
a != null && a.length ? (i.value = a[0], p.value = a[1]) : (i.value = void 0, p.value = void 0);
|
|
990
991
|
},
|
|
991
992
|
{ immediate: !0 }
|
|
992
993
|
), (a, d) => {
|
|
993
|
-
const y =
|
|
994
|
-
return
|
|
995
|
-
E(y,
|
|
994
|
+
const y = re;
|
|
995
|
+
return $(), T("div", Lt, [
|
|
996
|
+
E(y, U({
|
|
996
997
|
min: t.min,
|
|
997
|
-
max: k(
|
|
998
|
-
value: k(
|
|
999
|
-
"onUpdate:value": d[0] || (d[0] = (
|
|
998
|
+
max: k(l),
|
|
999
|
+
value: k(i),
|
|
1000
|
+
"onUpdate:value": d[0] || (d[0] = (g) => Z(i) ? i.value = g : null),
|
|
1000
1001
|
placeholder: e.placeholder[0] || ""
|
|
1001
|
-
}, a.$attrs, { onChange:
|
|
1002
|
+
}, a.$attrs, { onChange: c }), null, 16, ["min", "max", "value", "placeholder"]),
|
|
1002
1003
|
N("span", Bt, se(e.separator), 1),
|
|
1003
|
-
E(y,
|
|
1004
|
+
E(y, U({
|
|
1004
1005
|
min: k(o),
|
|
1005
1006
|
max: t.max,
|
|
1006
1007
|
value: k(p),
|
|
1007
|
-
"onUpdate:value": d[1] || (d[1] = (
|
|
1008
|
+
"onUpdate:value": d[1] || (d[1] = (g) => Z(p) ? p.value = g : null),
|
|
1008
1009
|
placeholder: e.placeholder[1] || ""
|
|
1009
|
-
}, a.$attrs, { onChange:
|
|
1010
|
+
}, a.$attrs, { onChange: c }), null, 16, ["min", "max", "value", "placeholder"])
|
|
1010
1011
|
]);
|
|
1011
1012
|
};
|
|
1012
1013
|
}
|
|
@@ -1022,13 +1023,13 @@ const wt = re({ name: "local-clear", render: kt }), $t = { class: "nums-box" },
|
|
|
1022
1023
|
WlRateSlider: Nt,
|
|
1023
1024
|
WlSplitter: Ct
|
|
1024
1025
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1025
|
-
function
|
|
1026
|
+
function Te(e) {
|
|
1026
1027
|
return et() ? (tt(e), !0) : !1;
|
|
1027
1028
|
}
|
|
1028
1029
|
const de = typeof window < "u" && typeof document < "u";
|
|
1029
1030
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
1030
|
-
const
|
|
1031
|
-
function
|
|
1031
|
+
const Ot = Object.prototype.toString, jt = (e) => Ot.call(e) === "[object Object]";
|
|
1032
|
+
function It(e) {
|
|
1032
1033
|
let n;
|
|
1033
1034
|
function t() {
|
|
1034
1035
|
return n || (n = e()), n;
|
|
@@ -1044,24 +1045,24 @@ function ne(e) {
|
|
|
1044
1045
|
function Ut(e, n, t = {}) {
|
|
1045
1046
|
const {
|
|
1046
1047
|
immediate: s = !0,
|
|
1047
|
-
immediateCallback:
|
|
1048
|
+
immediateCallback: u = !1
|
|
1048
1049
|
} = t, r = X(!1);
|
|
1049
|
-
let
|
|
1050
|
+
let l = null;
|
|
1050
1051
|
function o() {
|
|
1051
|
-
|
|
1052
|
+
l && (clearTimeout(l), l = null);
|
|
1052
1053
|
}
|
|
1053
|
-
function
|
|
1054
|
+
function i() {
|
|
1054
1055
|
r.value = !1, o();
|
|
1055
1056
|
}
|
|
1056
|
-
function p(...
|
|
1057
|
-
|
|
1058
|
-
r.value = !1,
|
|
1057
|
+
function p(...c) {
|
|
1058
|
+
u && e(), o(), r.value = !0, l = setTimeout(() => {
|
|
1059
|
+
r.value = !1, l = null, e(...c);
|
|
1059
1060
|
}, q(n));
|
|
1060
1061
|
}
|
|
1061
|
-
return s && (r.value = !0, de && p()),
|
|
1062
|
+
return s && (r.value = !0, de && p()), Te(i), {
|
|
1062
1063
|
isPending: Je(r),
|
|
1063
1064
|
start: p,
|
|
1064
|
-
stop:
|
|
1065
|
+
stop: i
|
|
1065
1066
|
};
|
|
1066
1067
|
}
|
|
1067
1068
|
function Ft(e, n, t) {
|
|
@@ -1074,8 +1075,8 @@ function Ft(e, n, t) {
|
|
|
1074
1075
|
}
|
|
1075
1076
|
);
|
|
1076
1077
|
}
|
|
1077
|
-
const Wt = de ? window : void 0,
|
|
1078
|
-
function
|
|
1078
|
+
const Wt = de ? window : void 0, De = de ? window.navigator : void 0;
|
|
1079
|
+
function Le(e) {
|
|
1079
1080
|
var n;
|
|
1080
1081
|
const t = q(e);
|
|
1081
1082
|
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
@@ -1083,113 +1084,113 @@ function De(e) {
|
|
|
1083
1084
|
function Y(...e) {
|
|
1084
1085
|
const n = [], t = () => {
|
|
1085
1086
|
n.forEach((o) => o()), n.length = 0;
|
|
1086
|
-
}, s = (o,
|
|
1087
|
-
const o = ne(q(e[0])).filter((
|
|
1088
|
-
return o.every((
|
|
1087
|
+
}, s = (o, i, p, c) => (o.addEventListener(i, p, c), () => o.removeEventListener(i, p, c)), u = L(() => {
|
|
1088
|
+
const o = ne(q(e[0])).filter((i) => i != null);
|
|
1089
|
+
return o.every((i) => typeof i != "string") ? o : void 0;
|
|
1089
1090
|
}), r = Ft(
|
|
1090
1091
|
() => {
|
|
1091
|
-
var o,
|
|
1092
|
+
var o, i;
|
|
1092
1093
|
return [
|
|
1093
|
-
(
|
|
1094
|
-
ne(q(
|
|
1095
|
-
ne(k(
|
|
1094
|
+
(i = (o = u.value) == null ? void 0 : o.map((p) => Le(p))) != null ? i : [Wt].filter((p) => p != null),
|
|
1095
|
+
ne(q(u.value ? e[1] : e[0])),
|
|
1096
|
+
ne(k(u.value ? e[2] : e[1])),
|
|
1096
1097
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1097
|
-
q(
|
|
1098
|
+
q(u.value ? e[3] : e[2])
|
|
1098
1099
|
];
|
|
1099
1100
|
},
|
|
1100
|
-
([o,
|
|
1101
|
-
if (t(), !(o != null && o.length) || !(
|
|
1101
|
+
([o, i, p, c]) => {
|
|
1102
|
+
if (t(), !(o != null && o.length) || !(i != null && i.length) || !(p != null && p.length))
|
|
1102
1103
|
return;
|
|
1103
|
-
const a =
|
|
1104
|
+
const a = jt(c) ? { ...c } : c;
|
|
1104
1105
|
n.push(
|
|
1105
1106
|
...o.flatMap(
|
|
1106
|
-
(d) =>
|
|
1107
|
-
(y) => p.map((
|
|
1107
|
+
(d) => i.flatMap(
|
|
1108
|
+
(y) => p.map((g) => s(d, y, g, a))
|
|
1108
1109
|
)
|
|
1109
1110
|
)
|
|
1110
1111
|
);
|
|
1111
1112
|
},
|
|
1112
1113
|
{ flush: "post" }
|
|
1113
|
-
),
|
|
1114
|
+
), l = () => {
|
|
1114
1115
|
r(), t();
|
|
1115
1116
|
};
|
|
1116
|
-
return
|
|
1117
|
+
return Te(t), l;
|
|
1117
1118
|
}
|
|
1118
1119
|
function zt() {
|
|
1119
1120
|
const e = X(!1), n = ee();
|
|
1120
|
-
return n &&
|
|
1121
|
+
return n && Ne(() => {
|
|
1121
1122
|
e.value = !0;
|
|
1122
1123
|
}, n), e;
|
|
1123
1124
|
}
|
|
1124
|
-
function
|
|
1125
|
+
function Be(e) {
|
|
1125
1126
|
const n = zt();
|
|
1126
|
-
return
|
|
1127
|
+
return L(() => (n.value, !!e()));
|
|
1127
1128
|
}
|
|
1128
1129
|
const qt = 500, Kt = 10;
|
|
1129
1130
|
function Vt(e, n, t) {
|
|
1130
|
-
var s,
|
|
1131
|
-
const r =
|
|
1132
|
-
let
|
|
1133
|
-
function
|
|
1134
|
-
|
|
1131
|
+
var s, u;
|
|
1132
|
+
const r = L(() => Le(e));
|
|
1133
|
+
let l, o, i, p = !1;
|
|
1134
|
+
function c() {
|
|
1135
|
+
l && (clearTimeout(l), l = void 0), o = void 0, i = void 0, p = !1;
|
|
1135
1136
|
}
|
|
1136
1137
|
function a(f) {
|
|
1137
1138
|
var m, h, _;
|
|
1138
|
-
const [
|
|
1139
|
-
if (
|
|
1139
|
+
const [b, C, w] = [i, o, p];
|
|
1140
|
+
if (c(), !(t != null && t.onMouseUp) || !C || !b || (m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== r.value)
|
|
1140
1141
|
return;
|
|
1141
1142
|
(h = t == null ? void 0 : t.modifiers) != null && h.prevent && f.preventDefault(), (_ = t == null ? void 0 : t.modifiers) != null && _.stop && f.stopPropagation();
|
|
1142
|
-
const
|
|
1143
|
-
t.onMouseUp(f.timeStamp -
|
|
1143
|
+
const P = f.x - C.x, B = f.y - C.y, A = Math.sqrt(P * P + B * B);
|
|
1144
|
+
t.onMouseUp(f.timeStamp - b, A, w);
|
|
1144
1145
|
}
|
|
1145
1146
|
function d(f) {
|
|
1146
|
-
var m, h, _,
|
|
1147
|
-
(m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== r.value || (
|
|
1147
|
+
var m, h, _, b;
|
|
1148
|
+
(m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== r.value || (c(), (h = t == null ? void 0 : t.modifiers) != null && h.prevent && f.preventDefault(), (_ = t == null ? void 0 : t.modifiers) != null && _.stop && f.stopPropagation(), o = {
|
|
1148
1149
|
x: f.x,
|
|
1149
1150
|
y: f.y
|
|
1150
|
-
},
|
|
1151
|
+
}, i = f.timeStamp, l = setTimeout(
|
|
1151
1152
|
() => {
|
|
1152
1153
|
p = !0, n(f);
|
|
1153
1154
|
},
|
|
1154
|
-
(
|
|
1155
|
+
(b = t == null ? void 0 : t.delay) != null ? b : qt
|
|
1155
1156
|
));
|
|
1156
1157
|
}
|
|
1157
1158
|
function y(f) {
|
|
1158
|
-
var m, h, _,
|
|
1159
|
+
var m, h, _, b;
|
|
1159
1160
|
if ((m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== r.value || !o || (t == null ? void 0 : t.distanceThreshold) === !1)
|
|
1160
1161
|
return;
|
|
1161
1162
|
(h = t == null ? void 0 : t.modifiers) != null && h.prevent && f.preventDefault(), (_ = t == null ? void 0 : t.modifiers) != null && _.stop && f.stopPropagation();
|
|
1162
|
-
const C = f.x - o.x,
|
|
1163
|
-
Math.sqrt(C * C +
|
|
1163
|
+
const C = f.x - o.x, w = f.y - o.y;
|
|
1164
|
+
Math.sqrt(C * C + w * w) >= ((b = t == null ? void 0 : t.distanceThreshold) != null ? b : Kt) && c();
|
|
1164
1165
|
}
|
|
1165
|
-
const
|
|
1166
|
+
const g = {
|
|
1166
1167
|
capture: (s = t == null ? void 0 : t.modifiers) == null ? void 0 : s.capture,
|
|
1167
|
-
once: (
|
|
1168
|
-
},
|
|
1169
|
-
Y(r, "pointerdown", d,
|
|
1170
|
-
Y(r, "pointermove", y,
|
|
1171
|
-
Y(r, ["pointerup", "pointerleave"], a,
|
|
1168
|
+
once: (u = t == null ? void 0 : t.modifiers) == null ? void 0 : u.once
|
|
1169
|
+
}, v = [
|
|
1170
|
+
Y(r, "pointerdown", d, g),
|
|
1171
|
+
Y(r, "pointermove", y, g),
|
|
1172
|
+
Y(r, ["pointerup", "pointerleave"], a, g)
|
|
1172
1173
|
];
|
|
1173
|
-
return () =>
|
|
1174
|
+
return () => v.forEach((f) => f());
|
|
1174
1175
|
}
|
|
1175
1176
|
function _e(e, n = {}) {
|
|
1176
1177
|
const {
|
|
1177
1178
|
controls: t = !1,
|
|
1178
|
-
navigator: s =
|
|
1179
|
-
} = n,
|
|
1180
|
-
var
|
|
1181
|
-
o.value = (a = (
|
|
1179
|
+
navigator: s = De
|
|
1180
|
+
} = n, u = Be(() => s && "permissions" in s), r = X(), l = typeof e == "string" ? { name: e } : e, o = X(), i = () => {
|
|
1181
|
+
var c, a;
|
|
1182
|
+
o.value = (a = (c = r.value) == null ? void 0 : c.state) != null ? a : "prompt";
|
|
1182
1183
|
};
|
|
1183
|
-
Y(r, "change",
|
|
1184
|
-
const p =
|
|
1185
|
-
if (
|
|
1184
|
+
Y(r, "change", i, { passive: !0 });
|
|
1185
|
+
const p = It(async () => {
|
|
1186
|
+
if (u.value) {
|
|
1186
1187
|
if (!r.value)
|
|
1187
1188
|
try {
|
|
1188
|
-
r.value = await s.permissions.query(
|
|
1189
|
+
r.value = await s.permissions.query(l);
|
|
1189
1190
|
} catch {
|
|
1190
1191
|
r.value = void 0;
|
|
1191
1192
|
} finally {
|
|
1192
|
-
|
|
1193
|
+
i();
|
|
1193
1194
|
}
|
|
1194
1195
|
if (t)
|
|
1195
1196
|
return nt(r.value);
|
|
@@ -1197,46 +1198,46 @@ function _e(e, n = {}) {
|
|
|
1197
1198
|
});
|
|
1198
1199
|
return p(), t ? {
|
|
1199
1200
|
state: o,
|
|
1200
|
-
isSupported:
|
|
1201
|
+
isSupported: u,
|
|
1201
1202
|
query: p
|
|
1202
1203
|
} : o;
|
|
1203
1204
|
}
|
|
1204
1205
|
function Xt(e = {}) {
|
|
1205
1206
|
const {
|
|
1206
|
-
navigator: n =
|
|
1207
|
+
navigator: n = De,
|
|
1207
1208
|
read: t = !1,
|
|
1208
1209
|
source: s,
|
|
1209
|
-
copiedDuring:
|
|
1210
|
+
copiedDuring: u = 1500,
|
|
1210
1211
|
legacy: r = !1
|
|
1211
|
-
} = e,
|
|
1212
|
+
} = e, l = Be(() => n && "clipboard" in n), o = _e("clipboard-read"), i = _e("clipboard-write"), p = L(() => l.value || r), c = X(""), a = X(!1), d = Ut(() => a.value = !1, u, { immediate: !1 });
|
|
1212
1213
|
async function y() {
|
|
1213
|
-
let m = !(
|
|
1214
|
+
let m = !(l.value && f(o.value));
|
|
1214
1215
|
if (!m)
|
|
1215
1216
|
try {
|
|
1216
|
-
|
|
1217
|
+
c.value = await n.clipboard.readText();
|
|
1217
1218
|
} catch {
|
|
1218
1219
|
m = !0;
|
|
1219
1220
|
}
|
|
1220
|
-
m && (
|
|
1221
|
+
m && (c.value = x());
|
|
1221
1222
|
}
|
|
1222
1223
|
p.value && t && Y(["copy", "cut"], y, { passive: !0 });
|
|
1223
|
-
async function
|
|
1224
|
+
async function g(m = q(s)) {
|
|
1224
1225
|
if (p.value && m != null) {
|
|
1225
|
-
let h = !(
|
|
1226
|
+
let h = !(l.value && f(i.value));
|
|
1226
1227
|
if (!h)
|
|
1227
1228
|
try {
|
|
1228
1229
|
await n.clipboard.writeText(m);
|
|
1229
1230
|
} catch {
|
|
1230
1231
|
h = !0;
|
|
1231
1232
|
}
|
|
1232
|
-
h &&
|
|
1233
|
+
h && v(m), c.value = m, a.value = !0, d.start();
|
|
1233
1234
|
}
|
|
1234
1235
|
}
|
|
1235
|
-
function
|
|
1236
|
+
function v(m) {
|
|
1236
1237
|
const h = document.createElement("textarea");
|
|
1237
1238
|
h.value = m ?? "", h.style.position = "absolute", h.style.opacity = "0", document.body.appendChild(h), h.select(), document.execCommand("copy"), h.remove();
|
|
1238
1239
|
}
|
|
1239
|
-
function
|
|
1240
|
+
function x() {
|
|
1240
1241
|
var m, h, _;
|
|
1241
1242
|
return (_ = (h = (m = document == null ? void 0 : document.getSelection) == null ? void 0 : m.call(document)) == null ? void 0 : h.toString()) != null ? _ : "";
|
|
1242
1243
|
}
|
|
@@ -1245,23 +1246,23 @@ function Xt(e = {}) {
|
|
|
1245
1246
|
}
|
|
1246
1247
|
return {
|
|
1247
1248
|
isSupported: p,
|
|
1248
|
-
text:
|
|
1249
|
+
text: c,
|
|
1249
1250
|
copied: a,
|
|
1250
|
-
copy:
|
|
1251
|
+
copy: g
|
|
1251
1252
|
};
|
|
1252
1253
|
}
|
|
1253
1254
|
const Ht = Xt();
|
|
1254
1255
|
let oe;
|
|
1255
1256
|
const Yt = {
|
|
1256
1257
|
mounted(e, n, t) {
|
|
1257
|
-
var
|
|
1258
|
-
const s = ce(t.ctx),
|
|
1258
|
+
var l, o;
|
|
1259
|
+
const s = ce(t.ctx), u = ((o = (l = s == null ? void 0 : s.locale) == null ? void 0 : l.locale) == null ? void 0 : o.slice(0, 2)) || "en", r = {
|
|
1259
1260
|
zh: "复制成功",
|
|
1260
1261
|
en: "Copy successfully",
|
|
1261
1262
|
fr: "Copie réussie"
|
|
1262
1263
|
};
|
|
1263
1264
|
e.copyValue = n.value, oe = () => {
|
|
1264
|
-
Ht.copy(e.copyValue), ut.success(r[
|
|
1265
|
+
Ht.copy(e.copyValue), ut.success(r[u]);
|
|
1265
1266
|
}, e.addEventListener("click", oe);
|
|
1266
1267
|
},
|
|
1267
1268
|
updated(e, n) {
|
|
@@ -1275,7 +1276,7 @@ const Yt = {
|
|
|
1275
1276
|
const s = e.tagName === "INPUT" ? e : e.querySelector("input");
|
|
1276
1277
|
if (!s)
|
|
1277
1278
|
return;
|
|
1278
|
-
const
|
|
1279
|
+
const u = n.value, r = {
|
|
1279
1280
|
letterNumber: /^\w*$/,
|
|
1280
1281
|
// 字母和数字
|
|
1281
1282
|
price: /^(\d*|(\d+\.\d{0,2}))$/,
|
|
@@ -1287,11 +1288,11 @@ const Yt = {
|
|
|
1287
1288
|
verify: /^\d{0,6}$/,
|
|
1288
1289
|
idCard: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
1289
1290
|
//身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X
|
|
1290
|
-
},
|
|
1291
|
+
}, l = u instanceof RegExp ? u : n.arg && r[n.arg] ? r[n.arg] : null;
|
|
1291
1292
|
e._handleInput = (o) => {
|
|
1292
1293
|
if (o.isTrusted && !(!o.isComposing && o.inputType === "insertCompositionText" && o.data)) {
|
|
1293
|
-
const
|
|
1294
|
-
if (e._input =
|
|
1294
|
+
const i = l == null ? void 0 : l.test(o.target.value);
|
|
1295
|
+
if (e._input = i ? o.target.value : e._input, o.target.value = "", o.target.value = e._input, !i)
|
|
1295
1296
|
o.target.selectionStart = e._start, o.target.selectionEnd = e._end;
|
|
1296
1297
|
else
|
|
1297
1298
|
switch (o.inputType) {
|
|
@@ -1308,9 +1309,9 @@ const Yt = {
|
|
|
1308
1309
|
case "insertFromPaste":
|
|
1309
1310
|
//粘贴
|
|
1310
1311
|
case "insertFromDrop":
|
|
1311
|
-
const
|
|
1312
|
-
if (
|
|
1313
|
-
const a =
|
|
1312
|
+
const c = o.dataTransfer || o.clipboardData || null;
|
|
1313
|
+
if (c) {
|
|
1314
|
+
const a = c.getData("text") || "";
|
|
1314
1315
|
o.target.selectionStart = e._start + a.length, o.target.selectionEnd = e._start + a.length;
|
|
1315
1316
|
}
|
|
1316
1317
|
break;
|
|
@@ -1326,8 +1327,8 @@ const Yt = {
|
|
|
1326
1327
|
o.target.dispatchEvent(p);
|
|
1327
1328
|
}
|
|
1328
1329
|
}, e._handleKeydown = (o) => {
|
|
1329
|
-
const
|
|
1330
|
-
e._input =
|
|
1330
|
+
const i = l == null ? void 0 : l.test(o.target.value);
|
|
1331
|
+
e._input = i ? o.target.value : "", e._start = o.target.selectionStart, e._end = o.target.selectionEnd;
|
|
1331
1332
|
}, e._handleDrop = (o) => {
|
|
1332
1333
|
o.stopPropagation();
|
|
1333
1334
|
}, s.addEventListener("input", e._handleInput), s.addEventListener("keydown", e._handleKeydown), s.addEventListener("drop", e._handleDrop);
|
|
@@ -1340,16 +1341,16 @@ const Yt = {
|
|
|
1340
1341
|
function be(e, n, t) {
|
|
1341
1342
|
const s = n.value;
|
|
1342
1343
|
if (s) {
|
|
1343
|
-
const
|
|
1344
|
-
e.style.marginLeft = `-${
|
|
1344
|
+
const u = s / 2;
|
|
1345
|
+
e.style.marginLeft = `-${u}px`, e.style.marginRight = `-${u}px`;
|
|
1345
1346
|
const r = t.children;
|
|
1346
|
-
r != null && r.length && r[0].children.forEach((
|
|
1347
|
-
if (
|
|
1348
|
-
const o =
|
|
1349
|
-
o != null && o.style && (o.style.paddingLeft =
|
|
1350
|
-
} else Array.isArray(
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1347
|
+
r != null && r.length && r[0].children.forEach((l) => {
|
|
1348
|
+
if (l.component) {
|
|
1349
|
+
const o = l.el;
|
|
1350
|
+
o != null && o.style && (o.style.paddingLeft = u + "px", o.style.paddingRight = u + "px");
|
|
1351
|
+
} else Array.isArray(l.children) && l.children.forEach((o) => {
|
|
1352
|
+
const i = o.el;
|
|
1353
|
+
i != null && i.style && (i.style.paddingLeft = u + "px", i.style.paddingRight = u + "px");
|
|
1353
1354
|
});
|
|
1354
1355
|
});
|
|
1355
1356
|
}
|
|
@@ -1373,34 +1374,34 @@ const Gt = {
|
|
|
1373
1374
|
}, Jt = {
|
|
1374
1375
|
mounted(e, n, t) {
|
|
1375
1376
|
const { value: s } = n, {
|
|
1376
|
-
content:
|
|
1377
|
+
content: u = "",
|
|
1377
1378
|
placement: r = "top",
|
|
1378
|
-
enabled:
|
|
1379
|
+
enabled: l = !0,
|
|
1379
1380
|
padding: o = 8,
|
|
1380
1381
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1381
|
-
...
|
|
1382
|
+
...i
|
|
1382
1383
|
} = typeof s == "string" ? { content: s } : s;
|
|
1383
|
-
if (e.tooltipDisabled = !1, !
|
|
1384
|
+
if (e.tooltipDisabled = !1, !l)
|
|
1384
1385
|
e.tooltipDisabled = !0;
|
|
1385
1386
|
else if (n.modifiers.exceed) {
|
|
1386
|
-
const y = e.clientWidth,
|
|
1387
|
-
e.tooltipDisabled = y ?
|
|
1387
|
+
const y = e.clientWidth, g = xe(u);
|
|
1388
|
+
e.tooltipDisabled = y ? g < y - o * 2 : !0;
|
|
1388
1389
|
}
|
|
1389
1390
|
const p = S({
|
|
1390
1391
|
top: 0,
|
|
1391
1392
|
left: 0,
|
|
1392
1393
|
bottom: 0,
|
|
1393
1394
|
right: 0
|
|
1394
|
-
}),
|
|
1395
|
+
}), c = S({
|
|
1395
1396
|
getBoundingClientRect: () => p.value
|
|
1396
1397
|
}), a = z(dt, {
|
|
1397
1398
|
visible: !1,
|
|
1398
|
-
content:
|
|
1399
|
+
content: u,
|
|
1399
1400
|
placement: r,
|
|
1400
1401
|
virtualTriggering: !0,
|
|
1401
|
-
virtualRef:
|
|
1402
|
+
virtualRef: c.value,
|
|
1402
1403
|
popperClass: "vtooltip",
|
|
1403
|
-
...
|
|
1404
|
+
...i
|
|
1404
1405
|
}), d = document.createDocumentFragment();
|
|
1405
1406
|
G(a, d), e.tooltipVm = a, e.tooltipContainer = d, e.addEventListener("mouseenter", () => {
|
|
1406
1407
|
p.value = e.getBoundingClientRect(), a.component && !e.tooltipDisabled && (Object.assign(a.component.props, { visible: !0 }), a.component.update());
|
|
@@ -1412,20 +1413,20 @@ const Gt = {
|
|
|
1412
1413
|
if (e.tooltipVm) {
|
|
1413
1414
|
const { value: t } = n, {
|
|
1414
1415
|
content: s = "",
|
|
1415
|
-
placement:
|
|
1416
|
+
placement: u = "top",
|
|
1416
1417
|
enabled: r = !0,
|
|
1417
|
-
padding:
|
|
1418
|
+
padding: l = 8,
|
|
1418
1419
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1419
1420
|
...o
|
|
1420
1421
|
} = typeof t == "string" ? { content: t } : t;
|
|
1421
1422
|
if (e.tooltipDisabled = !1, !r)
|
|
1422
1423
|
e.tooltipDisabled = !0;
|
|
1423
1424
|
else if (n.modifiers.exceed) {
|
|
1424
|
-
const p = e.clientWidth,
|
|
1425
|
-
e.tooltipDisabled = p ?
|
|
1425
|
+
const p = e.clientWidth, c = xe(s);
|
|
1426
|
+
e.tooltipDisabled = p ? c < p - l * 2 : !0;
|
|
1426
1427
|
}
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1428
|
+
const i = e.tooltipVm;
|
|
1429
|
+
i.component && (Object.assign(i.component.props, { content: s, placement: u, ...o }), i.component.update());
|
|
1429
1430
|
}
|
|
1430
1431
|
},
|
|
1431
1432
|
unmounted(e) {
|
|
@@ -1440,8 +1441,8 @@ const en = {
|
|
|
1440
1441
|
beforeMount(e, n) {
|
|
1441
1442
|
const { value: t } = n;
|
|
1442
1443
|
t && (ot(t) || setTimeout(() => {
|
|
1443
|
-
var
|
|
1444
|
-
(
|
|
1444
|
+
var u;
|
|
1445
|
+
(u = e.parentNode) == null || u.removeChild(e);
|
|
1445
1446
|
}, 50));
|
|
1446
1447
|
}
|
|
1447
1448
|
};
|
|
@@ -1451,12 +1452,12 @@ function Ce(e, n = 4) {
|
|
|
1451
1452
|
}
|
|
1452
1453
|
const tn = {
|
|
1453
1454
|
mounted(e, n) {
|
|
1454
|
-
const { value: t } = n, { content: s = "", spaceNum:
|
|
1455
|
-
e.textContent = Ce(r,
|
|
1455
|
+
const { value: t } = n, { content: s = "", spaceNum: u = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, r = s.replace(/\s+/g, "");
|
|
1456
|
+
e.textContent = Ce(r, u) || "-";
|
|
1456
1457
|
},
|
|
1457
1458
|
updated(e, n) {
|
|
1458
|
-
const { value: t } = n, { content: s = "", spaceNum:
|
|
1459
|
-
e.textContent = Ce(r,
|
|
1459
|
+
const { value: t } = n, { content: s = "", spaceNum: u = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, r = s.replace(/\s+/g, "");
|
|
1460
|
+
e.textContent = Ce(r, u) || "-";
|
|
1460
1461
|
}
|
|
1461
1462
|
}, nn = {
|
|
1462
1463
|
mounted(e, n) {
|
|
@@ -1517,10 +1518,10 @@ export {
|
|
|
1517
1518
|
Ln as isElement,
|
|
1518
1519
|
Bn as isFunction,
|
|
1519
1520
|
Rn as isImageDom,
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1521
|
+
On as isNull,
|
|
1522
|
+
R as isNullOrUndef,
|
|
1523
|
+
jn as isNumber,
|
|
1524
|
+
In as isObject,
|
|
1524
1525
|
Un as isPromise,
|
|
1525
1526
|
Fn as isServer,
|
|
1526
1527
|
Wn as isString,
|