@witlink/components 1.0.23 → 1.0.25
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.css +1 -1
- package/dist/index.d.ts +58 -26
- package/dist/index.js +440 -429
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +56 -56
- package/package.json +18 -11
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InputNumber as ae, RangePicker as
|
|
2
|
-
import { markRaw as se, createElementBlock as
|
|
1
|
+
import { InputNumber as ae, RangePicker as De, Table as Le, Popover as Be, Input as Re, Row as je, Col as Oe, Button as Ie, Slider as Fe } from "ant-design-vue/es";
|
|
2
|
+
import { markRaw as se, createElementBlock as T, openBlock as E, createElementVNode as $, defineComponent as F, mergeModels as j, useModel as G, useSlots as ke, useAttrs as Ue, createBlock as z, mergeProps as I, createSlots as re, renderList as V, withCtx as M, unref as k, renderSlot as K, normalizeProps as le, guardReactiveProps as we, createVNode as P, ref as S, getCurrentInstance as J, render as Z, h as W, computed as D, onMounted as Ee, onUnmounted as We, normalizeClass as ze, normalizeStyle as de, resolveDirective as qe, isRef as Q, withKeys as Ve, withModifiers as pe, Fragment as H, createTextVNode as ee, toDisplayString as oe, withDirectives as Ke, nextTick as fe, useCssVars as Xe, watch as ie, createCommentVNode as me, shallowRef as X, shallowReadonly as He, toValue as q, getCurrentScope as Ye, onScopeDispose as Ze, toRaw as Ge } from "vue";
|
|
3
3
|
import { isNullOrUndef as B, hasPermission as Qe } from "./utils.js";
|
|
4
|
-
import { UserCenterKey as dn, buildTree as pn, exportFile as fn, forEachTree as mn, getButtonPermissions as vn, getLocale as gn, getMenuInfo as hn, getToken as yn, getUserCenterParams as bn, getUserCenterParamsByUrl as _n, getUserInfo as xn, is as Cn, isArray as Sn, isAsyncFunction as kn, isBoolean as wn, isClient as
|
|
5
|
-
import
|
|
6
|
-
import { Drawer as
|
|
4
|
+
import { UserCenterKey as dn, buildTree as pn, exportFile as fn, forEachTree as mn, getButtonPermissions as vn, getLocale as gn, getMenuInfo as hn, getToken as yn, getUserCenterParams as bn, getUserCenterParamsByUrl as _n, getUserInfo as xn, is as Cn, isArray as Sn, isAsyncFunction as kn, isBoolean as wn, isClient as En, isDate as $n, isDef as Mn, isElement as Nn, isFunction as Pn, isImageDom as Tn, isNull as An, isNumber as Dn, isObject as Ln, isPromise as Bn, isServer as Rn, isString as jn, isUndef as On, isWindow as In, logoutToUserCenter as Fn, removeAll as Un, removeLocale as Wn, removeToken as zn, setLocale as qn, setMenuInfo as Vn, setToken as Kn, setUserCenterParams as Xn, setUserInfo as Hn, toUserCenterConsole as Yn } from "./utils.js";
|
|
5
|
+
import ve from "dayjs";
|
|
6
|
+
import { Drawer as A, App as Je, Modal as et, Button as tt, ConfigProvider as nt, Textarea as ot, Form as $e, message as at } from "ant-design-vue";
|
|
7
7
|
import { ElScrollbar as st, ElTooltip as rt } from "element-plus";
|
|
8
8
|
const lt = {
|
|
9
9
|
class: "icon",
|
|
@@ -12,7 +12,7 @@ const lt = {
|
|
|
12
12
|
height: "1.2em"
|
|
13
13
|
};
|
|
14
14
|
function it(e, n) {
|
|
15
|
-
return
|
|
15
|
+
return E(), T("svg", lt, n[0] || (n[0] = [
|
|
16
16
|
$("path", {
|
|
17
17
|
fill: "currentColor",
|
|
18
18
|
d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"
|
|
@@ -30,7 +30,7 @@ const ut = se({ name: "ant-design-plus", render: it }), ct = {
|
|
|
30
30
|
height: "1.2em"
|
|
31
31
|
};
|
|
32
32
|
function dt(e, n) {
|
|
33
|
-
return
|
|
33
|
+
return E(), T("svg", ct, n[0] || (n[0] = [
|
|
34
34
|
$("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"
|
|
@@ -58,45 +58,45 @@ const pt = se({ name: "ant-design-minus", render: dt }), ft = /* @__PURE__ */ F(
|
|
|
58
58
|
}),
|
|
59
59
|
emits: /* @__PURE__ */ j(["change"], ["update:value"]),
|
|
60
60
|
setup(e, { emit: n }) {
|
|
61
|
-
const t = G(e, "value"),
|
|
62
|
-
function
|
|
61
|
+
const t = G(e, "value"), r = e, l = n, i = ke(), u = Ue();
|
|
62
|
+
function o(a) {
|
|
63
63
|
if (B(a))
|
|
64
|
-
t.value = null,
|
|
64
|
+
t.value = null, l("change", null);
|
|
65
65
|
else {
|
|
66
|
-
let
|
|
67
|
-
|
|
66
|
+
let d = a;
|
|
67
|
+
r.stringMode && (d = Number(d).toFixed(r.precision)), t.value !== d && (t.value = d, l("change", d));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function c() {
|
|
71
71
|
if (B(t.value))
|
|
72
72
|
return;
|
|
73
73
|
let a = t.value;
|
|
74
|
-
|
|
74
|
+
r.stringMode && (a = Number(a).toFixed(r.precision)), t.value = a;
|
|
75
75
|
}
|
|
76
76
|
function p() {
|
|
77
|
-
if (
|
|
77
|
+
if (u.disabled) return;
|
|
78
78
|
const a = Number(t.value);
|
|
79
|
-
!B(
|
|
79
|
+
!B(u.min) && a <= Number(u.min) || o(a - 1);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
81
|
+
function s() {
|
|
82
|
+
if (u.disabled) return;
|
|
83
83
|
const a = Number(t.value);
|
|
84
|
-
!B(
|
|
84
|
+
!B(u.max) && a >= Number(u.max) || o(a + 1);
|
|
85
85
|
}
|
|
86
|
-
return (a,
|
|
86
|
+
return (a, d) => {
|
|
87
87
|
const y = pt, h = ut, v = ae;
|
|
88
|
-
return
|
|
88
|
+
return E(), z(v, I({
|
|
89
89
|
value: t.value,
|
|
90
90
|
precision: e.precision,
|
|
91
91
|
stringMode: e.stringMode,
|
|
92
92
|
controls: !e.customControls,
|
|
93
|
-
onChange:
|
|
94
|
-
onBlur:
|
|
93
|
+
onChange: o,
|
|
94
|
+
onBlur: c
|
|
95
95
|
}, a.$attrs), re({ _: 2 }, [
|
|
96
96
|
V(Object.keys(k(i)), (x) => ({
|
|
97
97
|
name: x,
|
|
98
98
|
fn: M((f) => [
|
|
99
|
-
|
|
99
|
+
K(a.$slots, x, le(we(f)))
|
|
100
100
|
])
|
|
101
101
|
})),
|
|
102
102
|
e.customControls ? {
|
|
@@ -106,7 +106,7 @@ const pt = se({ name: "ant-design-minus", render: dt }), ft = /* @__PURE__ */ F(
|
|
|
106
106
|
class: "btn-control",
|
|
107
107
|
onClick: p
|
|
108
108
|
}, [
|
|
109
|
-
|
|
109
|
+
P(y, { class: "btn-icon" })
|
|
110
110
|
])
|
|
111
111
|
]),
|
|
112
112
|
key: "0"
|
|
@@ -116,9 +116,9 @@ const pt = se({ name: "ant-design-minus", render: dt }), ft = /* @__PURE__ */ F(
|
|
|
116
116
|
fn: M(() => [
|
|
117
117
|
$("div", {
|
|
118
118
|
class: "btn-control",
|
|
119
|
-
onClick:
|
|
119
|
+
onClick: s
|
|
120
120
|
}, [
|
|
121
|
-
|
|
121
|
+
P(h, { class: "btn-icon" })
|
|
122
122
|
])
|
|
123
123
|
]),
|
|
124
124
|
key: "1"
|
|
@@ -156,49 +156,49 @@ const pt = se({ name: "ant-design-minus", render: dt }), ft = /* @__PURE__ */ F(
|
|
|
156
156
|
},
|
|
157
157
|
emits: ["update:value", "change"],
|
|
158
158
|
setup(e, { emit: n }) {
|
|
159
|
-
const t = e,
|
|
160
|
-
const a =
|
|
161
|
-
if (!
|
|
162
|
-
return
|
|
163
|
-
const h =
|
|
164
|
-
return
|
|
165
|
-
},
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
}, p = (
|
|
170
|
-
|
|
159
|
+
const t = e, r = n, l = S(), i = S(), u = (s) => {
|
|
160
|
+
const a = ve().add(t.max, t.maxUnit), d = ve().subtract(t.min, t.minUnit), y = t.interval;
|
|
161
|
+
if (!l.value || l.value.length === 0)
|
|
162
|
+
return s.isAfter(a) || s.isBefore(d);
|
|
163
|
+
const h = l.value[0] && (s.diff(l.value[0], "days") > y || s.isAfter(a));
|
|
164
|
+
return l.value[1] && (l.value[1].diff(s, "days") > y || s.isBefore(d)) || h;
|
|
165
|
+
}, o = (s) => {
|
|
166
|
+
s ? (l.value = [], i.value = []) : i.value = void 0;
|
|
167
|
+
}, c = (s) => {
|
|
168
|
+
r("update:value", s), r("change", s);
|
|
169
|
+
}, p = (s) => {
|
|
170
|
+
l.value = s;
|
|
171
171
|
};
|
|
172
|
-
return (
|
|
173
|
-
const
|
|
174
|
-
return
|
|
172
|
+
return (s, a) => {
|
|
173
|
+
const d = De;
|
|
174
|
+
return E(), z(d, I({
|
|
175
175
|
value: k(i) || e.value,
|
|
176
|
-
"disabled-date":
|
|
177
|
-
onChange:
|
|
178
|
-
onOpenChange:
|
|
176
|
+
"disabled-date": u,
|
|
177
|
+
onChange: c,
|
|
178
|
+
onOpenChange: o,
|
|
179
179
|
onCalendarChange: p
|
|
180
|
-
},
|
|
181
|
-
V(Object.keys(
|
|
180
|
+
}, s.$attrs), re({ _: 2 }, [
|
|
181
|
+
V(Object.keys(s.$slots), (y) => ({
|
|
182
182
|
name: y,
|
|
183
183
|
fn: M((h) => [
|
|
184
|
-
|
|
184
|
+
K(s.$slots, y, le(we(h)))
|
|
185
185
|
])
|
|
186
186
|
}))
|
|
187
187
|
]), 1040, ["value"]);
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
|
-
function
|
|
191
|
+
function ue(e) {
|
|
192
192
|
e || (e = J());
|
|
193
|
-
const n = (e == null ? void 0 : e.provides) || {}, t = vt(n, "configProvider"),
|
|
193
|
+
const n = (e == null ? void 0 : e.provides) || {}, t = vt(n, "configProvider"), r = n[t];
|
|
194
194
|
return Object.fromEntries(
|
|
195
|
-
Object.entries(
|
|
195
|
+
Object.entries(r).map(([i, u]) => [i, k(u)])
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
function vt(e, n) {
|
|
199
199
|
for (; e; ) {
|
|
200
200
|
const t = Reflect.ownKeys(e).find(
|
|
201
|
-
(
|
|
201
|
+
(r) => r === n || typeof r == "symbol" && r.description === n
|
|
202
202
|
);
|
|
203
203
|
if (t)
|
|
204
204
|
return t;
|
|
@@ -216,9 +216,9 @@ function sn(e) {
|
|
|
216
216
|
}
|
|
217
217
|
return null;
|
|
218
218
|
}
|
|
219
|
-
let O,
|
|
220
|
-
|
|
221
|
-
const e =
|
|
219
|
+
let O, ge, R, he;
|
|
220
|
+
A.destroy = function() {
|
|
221
|
+
const e = A.instanceArr || [], n = e.pop();
|
|
222
222
|
if (n && Z(null, n.container), e.length > 0) {
|
|
223
223
|
const t = e[e.length - 1].instance;
|
|
224
224
|
Object.assign(t.component.props, {
|
|
@@ -226,17 +226,17 @@ N.destroy = function() {
|
|
|
226
226
|
}), t.component.update();
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
|
|
230
|
-
(
|
|
229
|
+
A.destroyAll = function() {
|
|
230
|
+
(A.instanceArr || []).forEach((n) => {
|
|
231
231
|
Z(null, n.container);
|
|
232
|
-
}),
|
|
232
|
+
}), A.instanceArr = [];
|
|
233
233
|
};
|
|
234
234
|
function rn() {
|
|
235
|
-
var
|
|
235
|
+
var s, a;
|
|
236
236
|
const e = J();
|
|
237
237
|
if (!R) {
|
|
238
|
-
const
|
|
239
|
-
R =
|
|
238
|
+
const d = Je.useApp();
|
|
239
|
+
R = d.modal, ge = d.message, he = d.notification;
|
|
240
240
|
}
|
|
241
241
|
R.info || (R = et);
|
|
242
242
|
const n = {
|
|
@@ -247,15 +247,15 @@ function rn() {
|
|
|
247
247
|
zh: "请输入",
|
|
248
248
|
en: "Please Enter",
|
|
249
249
|
fr: "Veuillez entrer"
|
|
250
|
-
},
|
|
251
|
-
function i({ title:
|
|
250
|
+
}, r = ue(), l = ((a = (s = r == null ? void 0 : r.locale) == null ? void 0 : s.locale) == null ? void 0 : a.slice(0, 2)) || "en";
|
|
251
|
+
function i({ title: d, ...y }) {
|
|
252
252
|
const h = S();
|
|
253
|
-
return
|
|
254
|
-
title:
|
|
253
|
+
return u({
|
|
254
|
+
title: d,
|
|
255
255
|
...y,
|
|
256
256
|
comp: ot,
|
|
257
257
|
props: {
|
|
258
|
-
placeholder: t[
|
|
258
|
+
placeholder: t[l],
|
|
259
259
|
autoSize: { minRows: 6 },
|
|
260
260
|
value: h,
|
|
261
261
|
"onUpdate:value": (v) => {
|
|
@@ -270,9 +270,9 @@ function rn() {
|
|
|
270
270
|
})
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function u({ title: d, comp: y, props: h, ...v }) {
|
|
274
274
|
const x = W(y, h), f = (v == null ? void 0 : v.type) ?? "info", m = {
|
|
275
|
-
title:
|
|
275
|
+
title: d,
|
|
276
276
|
content: x,
|
|
277
277
|
width: "auto",
|
|
278
278
|
icon: null,
|
|
@@ -298,17 +298,17 @@ function rn() {
|
|
|
298
298
|
}
|
|
299
299
|
return O;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function o() {
|
|
302
302
|
O == null || O.destroy();
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function c({ title: d, comp: y, props: h, ...v }) {
|
|
305
305
|
const x = v.getContainer || document.createDocumentFragment();
|
|
306
|
-
|
|
307
|
-
const f =
|
|
306
|
+
A.instanceArr || (A.instanceArr = []);
|
|
307
|
+
const f = A.instanceArr, m = f[f.length - 1];
|
|
308
308
|
let g;
|
|
309
309
|
if ((m == null ? void 0 : m.comp) === y) {
|
|
310
310
|
const b = m.instance;
|
|
311
|
-
Object.assign(b.component.props, { title:
|
|
311
|
+
Object.assign(b.component.props, { title: d, ...v }), b.component.update(), g = m.compInstance, Object.assign(g.component.props, { ...h }), g.component.update();
|
|
312
312
|
} else {
|
|
313
313
|
if (m) {
|
|
314
314
|
const U = m.instance;
|
|
@@ -329,36 +329,36 @@ function rn() {
|
|
|
329
329
|
tt,
|
|
330
330
|
{
|
|
331
331
|
onClick: () => {
|
|
332
|
-
|
|
332
|
+
A.destroy();
|
|
333
333
|
}
|
|
334
334
|
},
|
|
335
|
-
n[
|
|
335
|
+
n[l]
|
|
336
336
|
)
|
|
337
337
|
});
|
|
338
|
-
const
|
|
338
|
+
const _ = v.width || 992;
|
|
339
339
|
delete v.width;
|
|
340
|
-
const
|
|
341
|
-
|
|
340
|
+
const C = W(
|
|
341
|
+
A,
|
|
342
342
|
{
|
|
343
|
-
title:
|
|
344
|
-
width:
|
|
343
|
+
title: d,
|
|
344
|
+
width: _,
|
|
345
345
|
open: !0,
|
|
346
346
|
class: "drawer-comp",
|
|
347
347
|
footerStyle: {
|
|
348
348
|
textAlign: "right"
|
|
349
349
|
},
|
|
350
350
|
onClose: () => {
|
|
351
|
-
v != null && v.afterClose && v.afterClose(),
|
|
351
|
+
v != null && v.afterClose && v.afterClose(), A.destroy();
|
|
352
352
|
},
|
|
353
353
|
...v
|
|
354
354
|
},
|
|
355
355
|
b
|
|
356
|
-
),
|
|
356
|
+
), w = r.getPrefixCls(), L = W(
|
|
357
357
|
nt,
|
|
358
|
-
{ ...
|
|
359
|
-
{ default: () =>
|
|
358
|
+
{ ...r, prefixCls: w },
|
|
359
|
+
{ default: () => C }
|
|
360
360
|
);
|
|
361
|
-
L.appContext = e.appContext, Z(L, x), f.push({ instance:
|
|
361
|
+
L.appContext = e.appContext, Z(L, x), f.push({ instance: C, comp: y, compInstance: g, container: x });
|
|
362
362
|
}
|
|
363
363
|
return {
|
|
364
364
|
updateProps: (b) => {
|
|
@@ -367,16 +367,16 @@ function rn() {
|
|
|
367
367
|
};
|
|
368
368
|
}
|
|
369
369
|
function p() {
|
|
370
|
-
|
|
370
|
+
A.destroy();
|
|
371
371
|
}
|
|
372
372
|
return {
|
|
373
|
-
message:
|
|
373
|
+
message: ge,
|
|
374
374
|
modal: R,
|
|
375
|
-
notification:
|
|
375
|
+
notification: he,
|
|
376
376
|
modalInput: i,
|
|
377
|
-
modalComp:
|
|
378
|
-
modalDestroy:
|
|
379
|
-
drawerComp:
|
|
377
|
+
modalComp: u,
|
|
378
|
+
modalDestroy: o,
|
|
379
|
+
drawerComp: c,
|
|
380
380
|
drawerDestroy: p
|
|
381
381
|
};
|
|
382
382
|
}
|
|
@@ -391,20 +391,24 @@ const gt = /* @__PURE__ */ F({
|
|
|
391
391
|
formatSortParams: {
|
|
392
392
|
type: Boolean,
|
|
393
393
|
default: !0
|
|
394
|
+
},
|
|
395
|
+
newFieldName: {
|
|
396
|
+
type: Boolean,
|
|
397
|
+
default: !1
|
|
394
398
|
}
|
|
395
399
|
},
|
|
396
400
|
setup(e, { expose: n }) {
|
|
397
|
-
const t = e,
|
|
401
|
+
const t = e, r = ke(), l = S([]), i = S(!1), u = S(0), o = S(1), c = S(10), p = S(), s = S(), a = {
|
|
398
402
|
zh: "共 {num} 条",
|
|
399
403
|
en: "Total {num} items",
|
|
400
404
|
fr: "Total de {num}"
|
|
401
|
-
},
|
|
402
|
-
var
|
|
403
|
-
return ((
|
|
405
|
+
}, d = ue(), y = D(() => {
|
|
406
|
+
var _, C;
|
|
407
|
+
return ((C = (_ = d == null ? void 0 : d.locale) == null ? void 0 : _.locale) == null ? void 0 : C.slice(0, 2)) || "en";
|
|
404
408
|
}), h = D(() => ({
|
|
405
|
-
total:
|
|
406
|
-
current:
|
|
407
|
-
pageSize:
|
|
409
|
+
total: u.value,
|
|
410
|
+
current: o.value,
|
|
411
|
+
pageSize: c.value,
|
|
408
412
|
showSizeChanger: !0,
|
|
409
413
|
size: "small",
|
|
410
414
|
showTotal: (b) => a[y.value].replace("{num}", b)
|
|
@@ -413,49 +417,52 @@ const gt = /* @__PURE__ */ F({
|
|
|
413
417
|
var b;
|
|
414
418
|
if (typeof t.loadData == "function") {
|
|
415
419
|
i.value = !0;
|
|
416
|
-
|
|
417
|
-
t.formatSortParams && ((b =
|
|
418
|
-
i.value = !1, (
|
|
420
|
+
let _;
|
|
421
|
+
t.newFieldName ? _ = { current: o.value, size: c.value } : _ = { pageNo: o.value, pageSize: c.value }, t.formatSortParams && ((b = s.value) != null && b.orderMap) && (_[s.value.field + "SortField"] = s.value.orderMap), t.loadData(_, p.value, s.value).then((C) => {
|
|
422
|
+
if (i.value = !1, (C == null ? void 0 : C.code) === 0) {
|
|
423
|
+
const w = C.result || {};
|
|
424
|
+
t.newFieldName ? (u.value = w.total, l.value = w.records) : (u.value = w.totalCount, l.value = w.data);
|
|
425
|
+
}
|
|
419
426
|
});
|
|
420
427
|
}
|
|
421
428
|
}
|
|
422
|
-
function x(b,
|
|
423
|
-
if (
|
|
424
|
-
const
|
|
429
|
+
function x(b, _, C) {
|
|
430
|
+
if (o.value = b.current, c.value = b.pageSize, p.value = _, C) {
|
|
431
|
+
const w = {
|
|
425
432
|
ascend: "asc",
|
|
426
433
|
descend: "desc"
|
|
427
434
|
};
|
|
428
|
-
|
|
435
|
+
C.orderMap = w[C.order] || "";
|
|
429
436
|
}
|
|
430
|
-
|
|
437
|
+
s.value = C, v();
|
|
431
438
|
}
|
|
432
|
-
function f(b,
|
|
433
|
-
|
|
439
|
+
function f(b, _) {
|
|
440
|
+
_.width = b;
|
|
434
441
|
}
|
|
435
442
|
function m() {
|
|
436
|
-
|
|
443
|
+
o.value = 1, v();
|
|
437
444
|
}
|
|
438
445
|
function g() {
|
|
439
|
-
|
|
446
|
+
o.value = 1, u.value = 0, l.value = [];
|
|
440
447
|
}
|
|
441
448
|
return n({
|
|
442
449
|
loadData: v,
|
|
443
450
|
refresh: m,
|
|
444
451
|
reset: g
|
|
445
|
-
}), (b,
|
|
446
|
-
const
|
|
447
|
-
return
|
|
452
|
+
}), (b, _) => {
|
|
453
|
+
const C = Le;
|
|
454
|
+
return E(), z(C, I({
|
|
448
455
|
class: "table-ex",
|
|
449
456
|
loading: k(i),
|
|
450
457
|
pagination: k(h),
|
|
451
|
-
dataSource: k(
|
|
458
|
+
dataSource: k(l),
|
|
452
459
|
onChange: x,
|
|
453
460
|
onResizeColumn: f
|
|
454
461
|
}, b.$attrs), re({ _: 2 }, [
|
|
455
|
-
V(Object.keys(k(
|
|
456
|
-
name:
|
|
462
|
+
V(Object.keys(k(r)), (w) => ({
|
|
463
|
+
name: w,
|
|
457
464
|
fn: M((L) => [
|
|
458
|
-
|
|
465
|
+
w !== "emptyText" ? K(b.$slots, w, le(I({ key: 0 }, L))) : K(b.$slots, w, { key: 1 })
|
|
459
466
|
])
|
|
460
467
|
}))
|
|
461
468
|
]), 1040, ["loading", "pagination", "dataSource"]);
|
|
@@ -478,51 +485,51 @@ const gt = /* @__PURE__ */ F({
|
|
|
478
485
|
}
|
|
479
486
|
},
|
|
480
487
|
setup(e) {
|
|
481
|
-
const n = e, t = S(),
|
|
482
|
-
function
|
|
483
|
-
|
|
488
|
+
const n = e, t = S(), r = S(), l = S({}), i = S({}), u = S(0.2);
|
|
489
|
+
function o(p) {
|
|
490
|
+
l.value = { width: `calc(${p * 100}% - 5px)` }, i.value = { width: `calc(${(1 - p) * 100}% - 5px)` };
|
|
484
491
|
}
|
|
485
|
-
function
|
|
492
|
+
function c() {
|
|
486
493
|
const p = t.value;
|
|
487
494
|
if (!p)
|
|
488
495
|
return;
|
|
489
|
-
const
|
|
496
|
+
const s = p.clientWidth, a = p.getBoundingClientRect(), d = a.left;
|
|
490
497
|
function y(v) {
|
|
491
498
|
v.preventDefault(), (v.clientX < a.left || v.clientX > a.right || v.clientY < a.top || v.clientY > a.bottom) && h();
|
|
492
|
-
const f = (v.clientX -
|
|
493
|
-
f > n.leftMin && f < n.leftMax && (
|
|
499
|
+
const f = (v.clientX - d) / s;
|
|
500
|
+
f > n.leftMin && f < n.leftMax && (u.value = f, o(f));
|
|
494
501
|
}
|
|
495
502
|
function h() {
|
|
496
503
|
document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", h);
|
|
497
504
|
}
|
|
498
505
|
document.addEventListener("mousemove", y), document.addEventListener("mouseup", h);
|
|
499
506
|
}
|
|
500
|
-
return
|
|
501
|
-
|
|
507
|
+
return Ee(() => {
|
|
508
|
+
o(u.value), r.value && r.value.addEventListener("mousedown", c, !1);
|
|
502
509
|
}), We(() => {
|
|
503
|
-
|
|
504
|
-
}), (p,
|
|
510
|
+
r.value && r.value.removeEventListener("mousedown", c);
|
|
511
|
+
}), (p, s) => (E(), T("div", {
|
|
505
512
|
ref_key: "container",
|
|
506
513
|
ref: t,
|
|
507
514
|
class: ze(["wl-splitter", { bordered: e.bordered }])
|
|
508
515
|
}, [
|
|
509
516
|
$("div", {
|
|
510
517
|
class: "my-left",
|
|
511
|
-
style:
|
|
518
|
+
style: de(k(l))
|
|
512
519
|
}, [
|
|
513
|
-
|
|
520
|
+
K(p.$slots, "left")
|
|
514
521
|
], 4),
|
|
515
522
|
$("div", {
|
|
516
523
|
ref_key: "spliter",
|
|
517
|
-
ref:
|
|
524
|
+
ref: r,
|
|
518
525
|
style: { height: "100%", width: "10px" },
|
|
519
526
|
class: "my-spliter"
|
|
520
527
|
}, null, 512),
|
|
521
528
|
$("div", {
|
|
522
529
|
class: "my-right",
|
|
523
|
-
style:
|
|
530
|
+
style: de(k(i))
|
|
524
531
|
}, [
|
|
525
|
-
|
|
532
|
+
K(p.$slots, "right")
|
|
526
533
|
], 4)
|
|
527
534
|
], 2));
|
|
528
535
|
}
|
|
@@ -535,7 +542,7 @@ const gt = /* @__PURE__ */ F({
|
|
|
535
542
|
xmlns: "http://www.w3.org/2000/svg"
|
|
536
543
|
};
|
|
537
544
|
function bt(e, n) {
|
|
538
|
-
return
|
|
545
|
+
return E(), T("svg", yt, n[0] || (n[0] = [
|
|
539
546
|
$("path", {
|
|
540
547
|
d: "M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",
|
|
541
548
|
stroke: "#272E3B",
|
|
@@ -582,95 +589,95 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
582
589
|
}),
|
|
583
590
|
emits: /* @__PURE__ */ j(["enter"], ["update:value"]),
|
|
584
591
|
setup(e, { emit: n }) {
|
|
585
|
-
const t = e,
|
|
592
|
+
const t = e, r = n, l = S(), i = S(), u = S(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), o = G(e, "value"), c = S(!1);
|
|
586
593
|
function p() {
|
|
587
|
-
|
|
594
|
+
c.value = !0;
|
|
588
595
|
}
|
|
589
|
-
function
|
|
596
|
+
function s() {
|
|
590
597
|
x();
|
|
591
598
|
}
|
|
592
599
|
function a(f) {
|
|
593
|
-
i.value.focus(),
|
|
600
|
+
i.value.focus(), o.value = Number(f).toFixed(t.precision);
|
|
594
601
|
}
|
|
595
|
-
function
|
|
596
|
-
if (i.value.focus(), B(
|
|
602
|
+
function d(f) {
|
|
603
|
+
if (i.value.focus(), B(o.value) || o.value === "") {
|
|
597
604
|
if (["00", "."].includes(f))
|
|
598
605
|
return;
|
|
599
|
-
|
|
606
|
+
o.value = f;
|
|
600
607
|
} else {
|
|
601
|
-
const m = String(
|
|
602
|
-
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
i.value.setSelectionRange(
|
|
608
|
+
const m = String(o.value), g = l.value.getElementsByTagName("input")[0], b = g.selectionStart || 0, _ = g.selectionEnd || 0;
|
|
609
|
+
o.value = `${m.slice(0, b)}${f}${m.slice(_)}`;
|
|
610
|
+
const C = b + f.length;
|
|
611
|
+
fe(() => {
|
|
612
|
+
i.value.setSelectionRange(C, C);
|
|
606
613
|
});
|
|
607
614
|
}
|
|
608
615
|
}
|
|
609
616
|
function y() {
|
|
610
|
-
if (i.value.focus(), B(
|
|
617
|
+
if (i.value.focus(), B(o.value))
|
|
611
618
|
return;
|
|
612
|
-
const f = String(
|
|
619
|
+
const f = String(o.value);
|
|
613
620
|
if (f != null && f.length) {
|
|
614
|
-
const m =
|
|
615
|
-
g === b ?
|
|
616
|
-
i.value.setSelectionRange(
|
|
621
|
+
const m = l.value.getElementsByTagName("input")[0], g = m.selectionStart || 0, b = m.selectionEnd || 0, _ = g > 0 ? g - 1 : 0;
|
|
622
|
+
g === b ? o.value = f.slice(0, _) + f.slice(b) : o.value = f.slice(0, g) + f.slice(b), fe(() => {
|
|
623
|
+
i.value.setSelectionRange(_, _);
|
|
617
624
|
});
|
|
618
625
|
}
|
|
619
626
|
}
|
|
620
627
|
function h() {
|
|
621
|
-
i.value.focus(),
|
|
628
|
+
i.value.focus(), o.value = "";
|
|
622
629
|
}
|
|
623
630
|
function v() {
|
|
624
631
|
i.value.blur();
|
|
625
632
|
}
|
|
626
633
|
function x() {
|
|
627
634
|
const f = t.min, m = t.max;
|
|
628
|
-
let g = parseFloat(
|
|
629
|
-
B(f) || (g = g > f ? g : f), B(m) || (g = g > m ? m : g),
|
|
635
|
+
let g = parseFloat(o.value || "0");
|
|
636
|
+
B(f) || (g = g > f ? g : f), B(m) || (g = g > m ? m : g), o.value = Number(g).toFixed(t.precision), c.value = !1, r("enter");
|
|
630
637
|
}
|
|
631
638
|
return (f, m) => {
|
|
632
|
-
const g =
|
|
633
|
-
return
|
|
639
|
+
const g = Ie, b = Oe, _ = _t, C = je, w = Re, L = Be, U = qe("longpress");
|
|
640
|
+
return E(), T("div", {
|
|
634
641
|
class: "number-keyboard",
|
|
635
642
|
ref_key: "numberKeyboard",
|
|
636
|
-
ref:
|
|
643
|
+
ref: l
|
|
637
644
|
}, [
|
|
638
|
-
|
|
645
|
+
P(L, {
|
|
639
646
|
overlayClassName: "popover-keyboard",
|
|
640
647
|
trigger: "manual",
|
|
641
648
|
placement: "bottomLeft",
|
|
642
649
|
align: { offset: [0, -9] },
|
|
643
|
-
open: k(
|
|
644
|
-
"onUpdate:open": m[2] || (m[2] = (
|
|
650
|
+
open: k(c),
|
|
651
|
+
"onUpdate:open": m[2] || (m[2] = (N) => Q(c) ? c.value = N : null)
|
|
645
652
|
}, {
|
|
646
653
|
content: M(() => [
|
|
647
654
|
$("div", {
|
|
648
655
|
class: "keyboard-panel",
|
|
649
|
-
onMousedownCapture: m[0] || (m[0] =
|
|
656
|
+
onMousedownCapture: m[0] || (m[0] = pe(() => {
|
|
650
657
|
}, ["prevent", "stop"]))
|
|
651
658
|
}, [
|
|
652
|
-
|
|
659
|
+
P(C, { gutter: "8" }, {
|
|
653
660
|
default: M(() => [
|
|
654
|
-
|
|
661
|
+
P(b, { span: 18 }, {
|
|
655
662
|
default: M(() => [
|
|
656
663
|
$("div", xt, [
|
|
657
|
-
(
|
|
664
|
+
(E(!0), T(H, null, V(e.quickNums, (N) => (E(), z(g, {
|
|
658
665
|
class: "btn-num",
|
|
659
|
-
key:
|
|
660
|
-
onClick: (Ae) => a(
|
|
666
|
+
key: N,
|
|
667
|
+
onClick: (Ae) => a(N)
|
|
661
668
|
}, {
|
|
662
669
|
default: M(() => [
|
|
663
|
-
ee(oe(
|
|
670
|
+
ee(oe(N), 1)
|
|
664
671
|
]),
|
|
665
672
|
_: 2
|
|
666
673
|
}, 1032, ["onClick"]))), 128)),
|
|
667
|
-
(
|
|
674
|
+
(E(!0), T(H, null, V(k(u), (N) => (E(), z(g, {
|
|
668
675
|
class: "btn-num",
|
|
669
|
-
key:
|
|
670
|
-
onClick: (Ae) =>
|
|
676
|
+
key: N,
|
|
677
|
+
onClick: (Ae) => d(N)
|
|
671
678
|
}, {
|
|
672
679
|
default: M(() => [
|
|
673
|
-
ee(oe(
|
|
680
|
+
ee(oe(N), 1)
|
|
674
681
|
]),
|
|
675
682
|
_: 2
|
|
676
683
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -678,24 +685,24 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
678
685
|
]),
|
|
679
686
|
_: 1
|
|
680
687
|
}),
|
|
681
|
-
|
|
688
|
+
P(b, { span: 6 }, {
|
|
682
689
|
default: M(() => [
|
|
683
690
|
$("div", Ct, [
|
|
684
|
-
|
|
691
|
+
Ke((E(), z(g, {
|
|
685
692
|
class: "btn-clear",
|
|
686
693
|
onClick: y
|
|
687
694
|
}, {
|
|
688
695
|
default: M(() => [
|
|
689
|
-
|
|
696
|
+
P(_, { style: { width: "24px", height: "24px" } })
|
|
690
697
|
]),
|
|
691
698
|
_: 1
|
|
692
699
|
})), [
|
|
693
700
|
[U, h]
|
|
694
701
|
]),
|
|
695
|
-
|
|
702
|
+
P(g, {
|
|
696
703
|
class: "btn-enter",
|
|
697
704
|
type: "primary",
|
|
698
|
-
onClick:
|
|
705
|
+
onClick: pe(v, ["stop"])
|
|
699
706
|
}, {
|
|
700
707
|
default: M(() => m[3] || (m[3] = [
|
|
701
708
|
ee("Enter ")
|
|
@@ -712,14 +719,14 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
712
719
|
], 32)
|
|
713
720
|
]),
|
|
714
721
|
default: M(() => [
|
|
715
|
-
|
|
722
|
+
P(w, I({
|
|
716
723
|
ref_key: "inputRef",
|
|
717
724
|
ref: i,
|
|
718
|
-
value:
|
|
719
|
-
"onUpdate:value": m[1] || (m[1] = (
|
|
725
|
+
value: o.value,
|
|
726
|
+
"onUpdate:value": m[1] || (m[1] = (N) => o.value = N)
|
|
720
727
|
}, f.$attrs, {
|
|
721
728
|
onFocus: p,
|
|
722
|
-
onBlur:
|
|
729
|
+
onBlur: s,
|
|
723
730
|
onKeyup: Ve(v, ["enter"])
|
|
724
731
|
}), null, 16, ["value"])
|
|
725
732
|
]),
|
|
@@ -757,43 +764,43 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
757
764
|
}),
|
|
758
765
|
emits: /* @__PURE__ */ j(["change"], ["update:value"]),
|
|
759
766
|
setup(e, { emit: n }) {
|
|
760
|
-
Xe((
|
|
761
|
-
"
|
|
762
|
-
"
|
|
763
|
-
"
|
|
767
|
+
Xe((s) => ({
|
|
768
|
+
"6ffd511e": k(u),
|
|
769
|
+
"1201d0a5": k(o),
|
|
770
|
+
"1201d466": k(c)
|
|
764
771
|
}));
|
|
765
|
-
const t = e,
|
|
766
|
-
const
|
|
772
|
+
const t = e, r = G(e, "value"), l = n, i = D(() => {
|
|
773
|
+
const s = {}, a = Array.from(t.flagStops), d = t.min || 0, y = t.max || 100, h = [d, ...r.value, y];
|
|
767
774
|
for (let v = 0; v < h.length; v++) {
|
|
768
775
|
const x = h[v];
|
|
769
|
-
if (
|
|
776
|
+
if (s[x] = x, v > 0) {
|
|
770
777
|
const f = a.shift(), m = h[v - 1], g = m + (x - m) / 2;
|
|
771
|
-
|
|
778
|
+
s[g] = { style: { top: "-28px" }, label: f };
|
|
772
779
|
}
|
|
773
780
|
}
|
|
774
|
-
return
|
|
775
|
-
}),
|
|
776
|
-
const
|
|
781
|
+
return s;
|
|
782
|
+
}), u = D(() => {
|
|
783
|
+
const s = r.value, a = t.min || 0, d = t.max || 100, y = Math.floor((s[0] - a) / (d - a) * 100), h = t.colorStops, v = h[0], x = h[h.length - 1];
|
|
777
784
|
return `linear-gradient(90deg, ${v} 0%, ${v} ${y}%, ${x} ${y}%, ${x} 100%)`;
|
|
778
|
-
}),
|
|
779
|
-
function p(
|
|
780
|
-
const a = t.min || 0,
|
|
781
|
-
|
|
785
|
+
}), o = D(() => t.colorStops[1]), c = D(() => t.colorStops[2]);
|
|
786
|
+
function p(s) {
|
|
787
|
+
const a = t.min || 0, d = t.max || 100;
|
|
788
|
+
s[0] <= a ? s[0] = a + 1 : s.at(-1) >= d && (s[s.length - 1] = d - 1), s.length === new Set(s).size && (r.value = s, l("change", s));
|
|
782
789
|
}
|
|
783
|
-
return (
|
|
784
|
-
const
|
|
785
|
-
return
|
|
790
|
+
return (s, a) => {
|
|
791
|
+
const d = Fe;
|
|
792
|
+
return E(), z(d, I({
|
|
786
793
|
class: "rate-slider",
|
|
787
|
-
value:
|
|
794
|
+
value: r.value,
|
|
788
795
|
min: e.min,
|
|
789
796
|
max: e.max,
|
|
790
797
|
range: "",
|
|
791
798
|
marks: k(i),
|
|
792
799
|
onChange: p
|
|
793
|
-
},
|
|
800
|
+
}, s.$attrs), null, 16, ["value", "min", "max", "marks"]);
|
|
794
801
|
};
|
|
795
802
|
}
|
|
796
|
-
}), wt = { class: "ip-input" },
|
|
803
|
+
}), wt = { class: "ip-input" }, Et = { class: "ip-wrapper" }, $t = {
|
|
797
804
|
key: 0,
|
|
798
805
|
class: "ip-separator"
|
|
799
806
|
}, Mt = /* @__PURE__ */ F({
|
|
@@ -809,77 +816,77 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
809
816
|
}),
|
|
810
817
|
emits: ["update:value"],
|
|
811
818
|
setup(e) {
|
|
812
|
-
const n = $e.useInjectFormItemContext(), t = e,
|
|
819
|
+
const n = $e.useInjectFormItemContext(), t = e, r = G(e, "value"), l = S(["", "", "", ""]), i = S(), u = S(""), o = S(), c = (a) => {
|
|
813
820
|
var y, h;
|
|
814
|
-
const
|
|
815
|
-
if (
|
|
816
|
-
|
|
821
|
+
const d = l.value[a];
|
|
822
|
+
if (d && (!/^\d+$/.test(d) || parseInt(d) > 255)) {
|
|
823
|
+
l.value[a] = "";
|
|
817
824
|
return;
|
|
818
825
|
}
|
|
819
|
-
parseInt(
|
|
820
|
-
}, p = (a,
|
|
826
|
+
parseInt(d) >= 100 && (a < 3 ? (y = i.value) != null && y.length && i.value[a + 1].focus() : t.hasPort && ((h = o.value) == null || h.focus())), r.value = `${l.value.join(".")}${t.hasPort ? ":" + u.value : ""}`, n.clearValidate();
|
|
827
|
+
}, p = (a, d) => {
|
|
821
828
|
var y, h;
|
|
822
|
-
|
|
829
|
+
d.key === " " && a < 3 && (d.preventDefault(), (y = i.value) != null && y.length && i.value[a + 1].focus()), d.key === "Backspace" && l.value[a] === "" && a > 0 && (h = i.value) != null && h.length && i.value[a - 1].focus();
|
|
823
830
|
};
|
|
824
|
-
function
|
|
825
|
-
|
|
831
|
+
function s() {
|
|
832
|
+
r.value = `${l.value.join(".")}${t.hasPort ? ":" + (u.value || "") : ""}`, n.clearValidate();
|
|
826
833
|
}
|
|
827
|
-
return
|
|
828
|
-
() =>
|
|
834
|
+
return ie(
|
|
835
|
+
() => r.value,
|
|
829
836
|
(a) => {
|
|
830
837
|
if (a) {
|
|
831
|
-
let
|
|
838
|
+
let d = a;
|
|
832
839
|
if (t.hasPort) {
|
|
833
840
|
const h = a.split(":");
|
|
834
|
-
|
|
841
|
+
u.value = h[1] || "", d = h[0];
|
|
835
842
|
}
|
|
836
|
-
const y =
|
|
837
|
-
y.length === 4 && (
|
|
843
|
+
const y = d.split(".");
|
|
844
|
+
y.length === 4 && (l.value = y);
|
|
838
845
|
} else
|
|
839
|
-
|
|
846
|
+
l.value = ["", "", "", ""], u.value = "";
|
|
840
847
|
},
|
|
841
848
|
{ immediate: !0 }
|
|
842
|
-
), (a,
|
|
849
|
+
), (a, d) => {
|
|
843
850
|
const y = ae;
|
|
844
|
-
return
|
|
845
|
-
$("div",
|
|
846
|
-
(
|
|
847
|
-
|
|
851
|
+
return E(), T("div", wt, [
|
|
852
|
+
$("div", Et, [
|
|
853
|
+
(E(!0), T(H, null, V(k(l), (h, v) => (E(), T(H, { key: v }, [
|
|
854
|
+
P(y, {
|
|
848
855
|
ref_for: !0,
|
|
849
856
|
ref_key: "ipPartArr",
|
|
850
857
|
ref: i,
|
|
851
858
|
class: "ip-part",
|
|
852
|
-
value: k(
|
|
853
|
-
"onUpdate:value": (x) => k(
|
|
859
|
+
value: k(l)[v],
|
|
860
|
+
"onUpdate:value": (x) => k(l)[v] = x,
|
|
854
861
|
min: 0,
|
|
855
862
|
max: 255,
|
|
856
863
|
precision: 0,
|
|
857
864
|
controls: !1,
|
|
858
|
-
onChange: (x) =>
|
|
865
|
+
onChange: (x) => c(v),
|
|
859
866
|
onKeydown: (x) => p(v, x)
|
|
860
867
|
}, null, 8, ["value", "onUpdate:value", "onChange", "onKeydown"]),
|
|
861
|
-
v < 3 ? (
|
|
868
|
+
v < 3 ? (E(), T("span", $t, ".")) : me("", !0)
|
|
862
869
|
], 64))), 128))
|
|
863
870
|
]),
|
|
864
|
-
e.hasPort ? (
|
|
865
|
-
|
|
866
|
-
|
|
871
|
+
e.hasPort ? (E(), T(H, { key: 0 }, [
|
|
872
|
+
d[1] || (d[1] = $("span", { class: "ip-port-separator" }, ":", -1)),
|
|
873
|
+
P(y, {
|
|
867
874
|
ref_key: "portRef",
|
|
868
|
-
ref:
|
|
875
|
+
ref: o,
|
|
869
876
|
class: "ip-port",
|
|
870
|
-
value: k(
|
|
871
|
-
"onUpdate:value":
|
|
877
|
+
value: k(u),
|
|
878
|
+
"onUpdate:value": d[0] || (d[0] = (h) => Q(u) ? u.value = h : null),
|
|
872
879
|
min: 0,
|
|
873
880
|
max: 65535,
|
|
874
881
|
precision: 0,
|
|
875
882
|
controls: !1,
|
|
876
|
-
onChange:
|
|
883
|
+
onChange: s
|
|
877
884
|
}, null, 8, ["value"])
|
|
878
|
-
], 64)) :
|
|
885
|
+
], 64)) : me("", !0)
|
|
879
886
|
]);
|
|
880
887
|
};
|
|
881
888
|
}
|
|
882
|
-
}),
|
|
889
|
+
}), Nt = { class: "number-range" }, Pt = { class: "separator" }, Tt = /* @__PURE__ */ F({
|
|
883
890
|
inheritAttrs: !1,
|
|
884
891
|
__name: "index",
|
|
885
892
|
props: /* @__PURE__ */ j({
|
|
@@ -890,7 +897,7 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
890
897
|
type: Number
|
|
891
898
|
},
|
|
892
899
|
placeholder: {
|
|
893
|
-
type:
|
|
900
|
+
type: Array,
|
|
894
901
|
default: []
|
|
895
902
|
},
|
|
896
903
|
separator: {
|
|
@@ -906,69 +913,69 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
906
913
|
}),
|
|
907
914
|
emits: /* @__PURE__ */ j(["change"], ["update:value"]),
|
|
908
915
|
setup(e, { emit: n }) {
|
|
909
|
-
const t = e,
|
|
910
|
-
const a =
|
|
916
|
+
const t = e, r = G(e, "value"), l = n, i = $e.useInjectFormItemContext(), u = D(() => {
|
|
917
|
+
const a = r.value[1];
|
|
911
918
|
return B(a) ? t.max : a;
|
|
912
|
-
}),
|
|
913
|
-
const a =
|
|
919
|
+
}), o = D(() => {
|
|
920
|
+
const a = r.value[0];
|
|
914
921
|
return B(a) ? t.min : a;
|
|
915
|
-
}),
|
|
916
|
-
function
|
|
917
|
-
const a = [
|
|
918
|
-
|
|
922
|
+
}), c = S(), p = S();
|
|
923
|
+
function s() {
|
|
924
|
+
const a = [c.value, p.value];
|
|
925
|
+
r.value = a, i.onFieldChange(), l("change", a);
|
|
919
926
|
}
|
|
920
|
-
return
|
|
921
|
-
() =>
|
|
927
|
+
return ie(
|
|
928
|
+
() => r.value,
|
|
922
929
|
(a) => {
|
|
923
|
-
a != null && a.length ? (
|
|
930
|
+
a != null && a.length ? (c.value = a[0], p.value = a[1]) : (c.value = void 0, p.value = void 0);
|
|
924
931
|
},
|
|
925
932
|
{ immediate: !0 }
|
|
926
|
-
), (a,
|
|
933
|
+
), (a, d) => {
|
|
927
934
|
const y = ae;
|
|
928
|
-
return
|
|
929
|
-
|
|
935
|
+
return E(), T("div", Nt, [
|
|
936
|
+
P(y, I({
|
|
930
937
|
min: t.min,
|
|
931
|
-
max: k(
|
|
932
|
-
value: k(
|
|
933
|
-
"onUpdate:value":
|
|
938
|
+
max: k(u),
|
|
939
|
+
value: k(c),
|
|
940
|
+
"onUpdate:value": d[0] || (d[0] = (h) => Q(c) ? c.value = h : null),
|
|
934
941
|
placeholder: e.placeholder[0] || ""
|
|
935
|
-
}, a.$attrs, { onChange:
|
|
936
|
-
$("span",
|
|
937
|
-
|
|
938
|
-
min: k(
|
|
942
|
+
}, a.$attrs, { onChange: s }), null, 16, ["min", "max", "value", "placeholder"]),
|
|
943
|
+
$("span", Pt, oe(e.separator), 1),
|
|
944
|
+
P(y, I({
|
|
945
|
+
min: k(o),
|
|
939
946
|
max: t.max,
|
|
940
947
|
value: k(p),
|
|
941
|
-
"onUpdate:value":
|
|
948
|
+
"onUpdate:value": d[1] || (d[1] = (h) => Q(p) ? p.value = h : null),
|
|
942
949
|
placeholder: e.placeholder[1] || ""
|
|
943
|
-
}, a.$attrs, { onChange:
|
|
950
|
+
}, a.$attrs, { onChange: s }), null, 16, ["min", "max", "value", "placeholder"])
|
|
944
951
|
]);
|
|
945
952
|
};
|
|
946
953
|
}
|
|
947
|
-
}),
|
|
954
|
+
}), ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
948
955
|
__proto__: null,
|
|
949
956
|
AInputNumberEx: ft,
|
|
950
957
|
ARangePickerEx: mt,
|
|
951
958
|
ATableEx: gt,
|
|
952
|
-
WlInputNumberRange:
|
|
959
|
+
WlInputNumberRange: Tt,
|
|
953
960
|
WlIpInput: Mt,
|
|
954
961
|
WlNumberKeyboard: St,
|
|
955
962
|
WlRateSlider: kt,
|
|
956
963
|
WlSplitter: ht
|
|
957
964
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
958
|
-
function
|
|
965
|
+
function Me(e) {
|
|
959
966
|
return Ye() ? (Ze(e), !0) : !1;
|
|
960
967
|
}
|
|
961
|
-
const
|
|
968
|
+
const ce = typeof window < "u" && typeof document < "u";
|
|
962
969
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
963
|
-
const
|
|
970
|
+
const At = Object.prototype.toString, Dt = (e) => At.call(e) === "[object Object]";
|
|
964
971
|
function Lt(e) {
|
|
965
972
|
let n;
|
|
966
973
|
function t() {
|
|
967
974
|
return n || (n = e()), n;
|
|
968
975
|
}
|
|
969
976
|
return t.reset = async () => {
|
|
970
|
-
const
|
|
971
|
-
n = void 0,
|
|
977
|
+
const r = n;
|
|
978
|
+
n = void 0, r && await r;
|
|
972
979
|
}, t;
|
|
973
980
|
}
|
|
974
981
|
function te(e) {
|
|
@@ -976,29 +983,29 @@ function te(e) {
|
|
|
976
983
|
}
|
|
977
984
|
function Bt(e, n, t = {}) {
|
|
978
985
|
const {
|
|
979
|
-
immediate:
|
|
980
|
-
immediateCallback:
|
|
986
|
+
immediate: r = !0,
|
|
987
|
+
immediateCallback: l = !1
|
|
981
988
|
} = t, i = X(!1);
|
|
982
|
-
let
|
|
983
|
-
function
|
|
984
|
-
|
|
989
|
+
let u = null;
|
|
990
|
+
function o() {
|
|
991
|
+
u && (clearTimeout(u), u = null);
|
|
985
992
|
}
|
|
986
|
-
function
|
|
987
|
-
i.value = !1,
|
|
993
|
+
function c() {
|
|
994
|
+
i.value = !1, o();
|
|
988
995
|
}
|
|
989
|
-
function p(...
|
|
990
|
-
|
|
991
|
-
i.value = !1,
|
|
992
|
-
},
|
|
996
|
+
function p(...s) {
|
|
997
|
+
l && e(), o(), i.value = !0, u = setTimeout(() => {
|
|
998
|
+
i.value = !1, u = null, e(...s);
|
|
999
|
+
}, q(n));
|
|
993
1000
|
}
|
|
994
|
-
return
|
|
1001
|
+
return r && (i.value = !0, ce && p()), Me(c), {
|
|
995
1002
|
isPending: He(i),
|
|
996
1003
|
start: p,
|
|
997
|
-
stop:
|
|
1004
|
+
stop: c
|
|
998
1005
|
};
|
|
999
1006
|
}
|
|
1000
1007
|
function Rt(e, n, t) {
|
|
1001
|
-
return
|
|
1008
|
+
return ie(
|
|
1002
1009
|
e,
|
|
1003
1010
|
n,
|
|
1004
1011
|
{
|
|
@@ -1007,50 +1014,50 @@ function Rt(e, n, t) {
|
|
|
1007
1014
|
}
|
|
1008
1015
|
);
|
|
1009
1016
|
}
|
|
1010
|
-
const jt =
|
|
1017
|
+
const jt = ce ? window : void 0, Ne = ce ? window.navigator : void 0;
|
|
1011
1018
|
function Pe(e) {
|
|
1012
1019
|
var n;
|
|
1013
|
-
const t =
|
|
1020
|
+
const t = q(e);
|
|
1014
1021
|
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
1015
1022
|
}
|
|
1016
1023
|
function Y(...e) {
|
|
1017
1024
|
const n = [], t = () => {
|
|
1018
|
-
n.forEach((
|
|
1019
|
-
},
|
|
1020
|
-
const
|
|
1021
|
-
return
|
|
1025
|
+
n.forEach((o) => o()), n.length = 0;
|
|
1026
|
+
}, r = (o, c, p, s) => (o.addEventListener(c, p, s), () => o.removeEventListener(c, p, s)), l = D(() => {
|
|
1027
|
+
const o = te(q(e[0])).filter((c) => c != null);
|
|
1028
|
+
return o.every((c) => typeof c != "string") ? o : void 0;
|
|
1022
1029
|
}), i = Rt(
|
|
1023
1030
|
() => {
|
|
1024
|
-
var
|
|
1031
|
+
var o, c;
|
|
1025
1032
|
return [
|
|
1026
|
-
(
|
|
1027
|
-
te(
|
|
1028
|
-
te(k(
|
|
1033
|
+
(c = (o = l.value) == null ? void 0 : o.map((p) => Pe(p))) != null ? c : [jt].filter((p) => p != null),
|
|
1034
|
+
te(q(l.value ? e[1] : e[0])),
|
|
1035
|
+
te(k(l.value ? e[2] : e[1])),
|
|
1029
1036
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1030
|
-
|
|
1037
|
+
q(l.value ? e[3] : e[2])
|
|
1031
1038
|
];
|
|
1032
1039
|
},
|
|
1033
|
-
([
|
|
1034
|
-
if (t(), !(
|
|
1040
|
+
([o, c, p, s]) => {
|
|
1041
|
+
if (t(), !(o != null && o.length) || !(c != null && c.length) || !(p != null && p.length))
|
|
1035
1042
|
return;
|
|
1036
|
-
const a = Dt(
|
|
1043
|
+
const a = Dt(s) ? { ...s } : s;
|
|
1037
1044
|
n.push(
|
|
1038
|
-
...
|
|
1039
|
-
(
|
|
1040
|
-
(y) => p.map((h) =>
|
|
1045
|
+
...o.flatMap(
|
|
1046
|
+
(d) => c.flatMap(
|
|
1047
|
+
(y) => p.map((h) => r(d, y, h, a))
|
|
1041
1048
|
)
|
|
1042
1049
|
)
|
|
1043
1050
|
);
|
|
1044
1051
|
},
|
|
1045
1052
|
{ flush: "post" }
|
|
1046
|
-
),
|
|
1053
|
+
), u = () => {
|
|
1047
1054
|
i(), t();
|
|
1048
1055
|
};
|
|
1049
|
-
return
|
|
1056
|
+
return Me(t), u;
|
|
1050
1057
|
}
|
|
1051
1058
|
function Ot() {
|
|
1052
1059
|
const e = X(!1), n = J();
|
|
1053
|
-
return n &&
|
|
1060
|
+
return n && Ee(() => {
|
|
1054
1061
|
e.value = !0;
|
|
1055
1062
|
}, n), e;
|
|
1056
1063
|
}
|
|
@@ -1060,109 +1067,109 @@ function Te(e) {
|
|
|
1060
1067
|
}
|
|
1061
1068
|
const It = 500, Ft = 10;
|
|
1062
1069
|
function Ut(e, n, t) {
|
|
1063
|
-
var
|
|
1070
|
+
var r, l;
|
|
1064
1071
|
const i = D(() => Pe(e));
|
|
1065
|
-
let
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1072
|
+
let u, o, c, p = !1;
|
|
1073
|
+
function s() {
|
|
1074
|
+
u && (clearTimeout(u), u = void 0), o = void 0, c = void 0, p = !1;
|
|
1068
1075
|
}
|
|
1069
1076
|
function a(f) {
|
|
1070
1077
|
var m, g, b;
|
|
1071
|
-
const [
|
|
1072
|
-
if (
|
|
1078
|
+
const [_, C, w] = [c, o, p];
|
|
1079
|
+
if (s(), !(t != null && t.onMouseUp) || !C || !_ || (m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== i.value)
|
|
1073
1080
|
return;
|
|
1074
1081
|
(g = t == null ? void 0 : t.modifiers) != null && g.prevent && f.preventDefault(), (b = t == null ? void 0 : t.modifiers) != null && b.stop && f.stopPropagation();
|
|
1075
|
-
const L = f.x -
|
|
1076
|
-
t.onMouseUp(f.timeStamp -
|
|
1082
|
+
const L = f.x - C.x, U = f.y - C.y, N = Math.sqrt(L * L + U * U);
|
|
1083
|
+
t.onMouseUp(f.timeStamp - _, N, w);
|
|
1077
1084
|
}
|
|
1078
|
-
function
|
|
1079
|
-
var m, g, b,
|
|
1080
|
-
(m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== i.value || (
|
|
1085
|
+
function d(f) {
|
|
1086
|
+
var m, g, b, _;
|
|
1087
|
+
(m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== i.value || (s(), (g = t == null ? void 0 : t.modifiers) != null && g.prevent && f.preventDefault(), (b = t == null ? void 0 : t.modifiers) != null && b.stop && f.stopPropagation(), o = {
|
|
1081
1088
|
x: f.x,
|
|
1082
1089
|
y: f.y
|
|
1083
|
-
},
|
|
1090
|
+
}, c = f.timeStamp, u = setTimeout(
|
|
1084
1091
|
() => {
|
|
1085
1092
|
p = !0, n(f);
|
|
1086
1093
|
},
|
|
1087
|
-
(
|
|
1094
|
+
(_ = t == null ? void 0 : t.delay) != null ? _ : It
|
|
1088
1095
|
));
|
|
1089
1096
|
}
|
|
1090
1097
|
function y(f) {
|
|
1091
|
-
var m, g, b,
|
|
1092
|
-
if ((m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== i.value || !
|
|
1098
|
+
var m, g, b, _;
|
|
1099
|
+
if ((m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== i.value || !o || (t == null ? void 0 : t.distanceThreshold) === !1)
|
|
1093
1100
|
return;
|
|
1094
1101
|
(g = t == null ? void 0 : t.modifiers) != null && g.prevent && f.preventDefault(), (b = t == null ? void 0 : t.modifiers) != null && b.stop && f.stopPropagation();
|
|
1095
|
-
const
|
|
1096
|
-
Math.sqrt(
|
|
1102
|
+
const C = f.x - o.x, w = f.y - o.y;
|
|
1103
|
+
Math.sqrt(C * C + w * w) >= ((_ = t == null ? void 0 : t.distanceThreshold) != null ? _ : Ft) && s();
|
|
1097
1104
|
}
|
|
1098
1105
|
const h = {
|
|
1099
|
-
capture: (
|
|
1100
|
-
once: (
|
|
1106
|
+
capture: (r = t == null ? void 0 : t.modifiers) == null ? void 0 : r.capture,
|
|
1107
|
+
once: (l = t == null ? void 0 : t.modifiers) == null ? void 0 : l.once
|
|
1101
1108
|
}, v = [
|
|
1102
|
-
Y(i, "pointerdown",
|
|
1109
|
+
Y(i, "pointerdown", d, h),
|
|
1103
1110
|
Y(i, "pointermove", y, h),
|
|
1104
1111
|
Y(i, ["pointerup", "pointerleave"], a, h)
|
|
1105
1112
|
];
|
|
1106
1113
|
return () => v.forEach((f) => f());
|
|
1107
1114
|
}
|
|
1108
|
-
function
|
|
1115
|
+
function be(e, n = {}) {
|
|
1109
1116
|
const {
|
|
1110
1117
|
controls: t = !1,
|
|
1111
|
-
navigator:
|
|
1112
|
-
} = n,
|
|
1113
|
-
var
|
|
1114
|
-
|
|
1118
|
+
navigator: r = Ne
|
|
1119
|
+
} = n, l = Te(() => r && "permissions" in r), i = X(), u = typeof e == "string" ? { name: e } : e, o = X(), c = () => {
|
|
1120
|
+
var s, a;
|
|
1121
|
+
o.value = (a = (s = i.value) == null ? void 0 : s.state) != null ? a : "prompt";
|
|
1115
1122
|
};
|
|
1116
|
-
Y(i, "change",
|
|
1123
|
+
Y(i, "change", c, { passive: !0 });
|
|
1117
1124
|
const p = Lt(async () => {
|
|
1118
|
-
if (
|
|
1125
|
+
if (l.value) {
|
|
1119
1126
|
if (!i.value)
|
|
1120
1127
|
try {
|
|
1121
|
-
i.value = await
|
|
1128
|
+
i.value = await r.permissions.query(u);
|
|
1122
1129
|
} catch {
|
|
1123
1130
|
i.value = void 0;
|
|
1124
1131
|
} finally {
|
|
1125
|
-
|
|
1132
|
+
c();
|
|
1126
1133
|
}
|
|
1127
1134
|
if (t)
|
|
1128
1135
|
return Ge(i.value);
|
|
1129
1136
|
}
|
|
1130
1137
|
});
|
|
1131
1138
|
return p(), t ? {
|
|
1132
|
-
state:
|
|
1133
|
-
isSupported:
|
|
1139
|
+
state: o,
|
|
1140
|
+
isSupported: l,
|
|
1134
1141
|
query: p
|
|
1135
|
-
} :
|
|
1142
|
+
} : o;
|
|
1136
1143
|
}
|
|
1137
1144
|
function Wt(e = {}) {
|
|
1138
1145
|
const {
|
|
1139
|
-
navigator: n =
|
|
1146
|
+
navigator: n = Ne,
|
|
1140
1147
|
read: t = !1,
|
|
1141
|
-
source:
|
|
1142
|
-
copiedDuring:
|
|
1148
|
+
source: r,
|
|
1149
|
+
copiedDuring: l = 1500,
|
|
1143
1150
|
legacy: i = !1
|
|
1144
|
-
} = e,
|
|
1151
|
+
} = e, u = Te(() => n && "clipboard" in n), o = be("clipboard-read"), c = be("clipboard-write"), p = D(() => u.value || i), s = X(""), a = X(!1), d = Bt(() => a.value = !1, l, { immediate: !1 });
|
|
1145
1152
|
async function y() {
|
|
1146
|
-
let m = !(
|
|
1153
|
+
let m = !(u.value && f(o.value));
|
|
1147
1154
|
if (!m)
|
|
1148
1155
|
try {
|
|
1149
|
-
|
|
1156
|
+
s.value = await n.clipboard.readText();
|
|
1150
1157
|
} catch {
|
|
1151
1158
|
m = !0;
|
|
1152
1159
|
}
|
|
1153
|
-
m && (
|
|
1160
|
+
m && (s.value = x());
|
|
1154
1161
|
}
|
|
1155
1162
|
p.value && t && Y(["copy", "cut"], y, { passive: !0 });
|
|
1156
|
-
async function h(m =
|
|
1163
|
+
async function h(m = q(r)) {
|
|
1157
1164
|
if (p.value && m != null) {
|
|
1158
|
-
let g = !(
|
|
1165
|
+
let g = !(u.value && f(c.value));
|
|
1159
1166
|
if (!g)
|
|
1160
1167
|
try {
|
|
1161
1168
|
await n.clipboard.writeText(m);
|
|
1162
1169
|
} catch {
|
|
1163
1170
|
g = !0;
|
|
1164
1171
|
}
|
|
1165
|
-
g && v(m),
|
|
1172
|
+
g && v(m), s.value = m, a.value = !0, d.start();
|
|
1166
1173
|
}
|
|
1167
1174
|
}
|
|
1168
1175
|
function v(m) {
|
|
@@ -1178,23 +1185,23 @@ function Wt(e = {}) {
|
|
|
1178
1185
|
}
|
|
1179
1186
|
return {
|
|
1180
1187
|
isSupported: p,
|
|
1181
|
-
text:
|
|
1188
|
+
text: s,
|
|
1182
1189
|
copied: a,
|
|
1183
1190
|
copy: h
|
|
1184
1191
|
};
|
|
1185
1192
|
}
|
|
1186
1193
|
const zt = Wt();
|
|
1187
1194
|
let ne;
|
|
1188
|
-
const
|
|
1195
|
+
const qt = {
|
|
1189
1196
|
mounted(e, n, t) {
|
|
1190
|
-
var
|
|
1191
|
-
const
|
|
1197
|
+
var u, o;
|
|
1198
|
+
const r = ue(t.ctx), l = ((o = (u = r == null ? void 0 : r.locale) == null ? void 0 : u.locale) == null ? void 0 : o.slice(0, 2)) || "en", i = {
|
|
1192
1199
|
zh: "复制成功",
|
|
1193
1200
|
en: "Copy successfully",
|
|
1194
1201
|
fr: "Copie réussie"
|
|
1195
1202
|
};
|
|
1196
1203
|
e.copyValue = n.value, ne = () => {
|
|
1197
|
-
zt.copy(e.copyValue), at.success(i[
|
|
1204
|
+
zt.copy(e.copyValue), at.success(i[l]);
|
|
1198
1205
|
}, e.addEventListener("click", ne);
|
|
1199
1206
|
},
|
|
1200
1207
|
updated(e, n) {
|
|
@@ -1205,7 +1212,10 @@ const Kt = {
|
|
|
1205
1212
|
}
|
|
1206
1213
|
}, Vt = {
|
|
1207
1214
|
beforeMount(e, n, t) {
|
|
1208
|
-
const
|
|
1215
|
+
const r = e.tagName === "INPUT" ? e : e.querySelector("input");
|
|
1216
|
+
if (!r)
|
|
1217
|
+
return;
|
|
1218
|
+
const l = n.value, i = {
|
|
1209
1219
|
letterNumber: /^\w*$/,
|
|
1210
1220
|
// 字母和数字
|
|
1211
1221
|
price: /^(\d*|(\d+\.\d{0,2}))$/,
|
|
@@ -1217,11 +1227,11 @@ const Kt = {
|
|
|
1217
1227
|
verify: /^\d{0,6}$/,
|
|
1218
1228
|
idCard: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
1219
1229
|
//身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X
|
|
1220
|
-
},
|
|
1230
|
+
}, u = l instanceof RegExp ? l : n.arg && i[n.arg] ? i[n.arg] : null;
|
|
1221
1231
|
e._handleInput = (o) => {
|
|
1222
1232
|
if (o.isTrusted && !(!o.isComposing && o.inputType === "insertCompositionText" && o.data)) {
|
|
1223
|
-
const
|
|
1224
|
-
if (e._input =
|
|
1233
|
+
const c = u == null ? void 0 : u.test(o.target.value);
|
|
1234
|
+
if (e._input = c ? o.target.value : e._input, o.target.value = "", o.target.value = e._input, !c)
|
|
1225
1235
|
o.target.selectionStart = e._start, o.target.selectionEnd = e._end;
|
|
1226
1236
|
else
|
|
1227
1237
|
switch (o.inputType) {
|
|
@@ -1238,10 +1248,10 @@ const Kt = {
|
|
|
1238
1248
|
case "insertFromPaste":
|
|
1239
1249
|
//粘贴
|
|
1240
1250
|
case "insertFromDrop":
|
|
1241
|
-
const
|
|
1242
|
-
if (
|
|
1243
|
-
const
|
|
1244
|
-
o.target.selectionStart = e._start +
|
|
1251
|
+
const s = o.dataTransfer || o.clipboardData || null;
|
|
1252
|
+
if (s) {
|
|
1253
|
+
const a = s.getData("text") || "";
|
|
1254
|
+
o.target.selectionStart = e._start + a.length, o.target.selectionEnd = e._start + a.length;
|
|
1245
1255
|
}
|
|
1246
1256
|
break;
|
|
1247
1257
|
case "insertText":
|
|
@@ -1250,48 +1260,49 @@ const Kt = {
|
|
|
1250
1260
|
o.target.selectionStart = e._start + 1, o.target.selectionEnd = e._start + 1;
|
|
1251
1261
|
break;
|
|
1252
1262
|
}
|
|
1253
|
-
const
|
|
1263
|
+
const p = new InputEvent("input", {
|
|
1254
1264
|
isComposing: !1
|
|
1255
1265
|
});
|
|
1256
|
-
o.target.dispatchEvent(
|
|
1266
|
+
o.target.dispatchEvent(p);
|
|
1257
1267
|
}
|
|
1258
1268
|
}, e._handleKeydown = (o) => {
|
|
1259
|
-
const
|
|
1260
|
-
e._input =
|
|
1269
|
+
const c = u == null ? void 0 : u.test(o.target.value);
|
|
1270
|
+
e._input = c ? o.target.value : "", e._start = o.target.selectionStart, e._end = o.target.selectionEnd;
|
|
1261
1271
|
}, e._handleDrop = (o) => {
|
|
1262
1272
|
o.stopPropagation();
|
|
1263
|
-
},
|
|
1273
|
+
}, r.addEventListener("input", e._handleInput), r.addEventListener("keydown", e._handleKeydown), r.addEventListener("drop", e._handleDrop);
|
|
1264
1274
|
},
|
|
1265
1275
|
unmounted(e) {
|
|
1266
|
-
|
|
1276
|
+
const n = e.tagName === "INPUT" ? e : e.querySelector("input");
|
|
1277
|
+
n && (n.removeEventListener("input", e._handleInput), n.removeEventListener("keydown", e._handleKeydown), n.removeEventListener("drop", e._handleDrop));
|
|
1267
1278
|
}
|
|
1268
1279
|
};
|
|
1269
|
-
function
|
|
1270
|
-
const
|
|
1271
|
-
if (
|
|
1272
|
-
const
|
|
1273
|
-
e.style.marginLeft = `-${
|
|
1280
|
+
function _e(e, n, t) {
|
|
1281
|
+
const r = n.value;
|
|
1282
|
+
if (r) {
|
|
1283
|
+
const l = r / 2;
|
|
1284
|
+
e.style.marginLeft = `-${l}px`, e.style.marginRight = `-${l}px`;
|
|
1274
1285
|
const i = t.children;
|
|
1275
|
-
i != null && i.length && i[0].children.forEach((
|
|
1276
|
-
if (
|
|
1277
|
-
const
|
|
1278
|
-
|
|
1279
|
-
} else Array.isArray(
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1286
|
+
i != null && i.length && i[0].children.forEach((u) => {
|
|
1287
|
+
if (u.component) {
|
|
1288
|
+
const o = u.el;
|
|
1289
|
+
o != null && o.style && (o.style.paddingLeft = l + "px", o.style.paddingRight = l + "px");
|
|
1290
|
+
} else Array.isArray(u.children) && u.children.forEach((o) => {
|
|
1291
|
+
const c = o.el;
|
|
1292
|
+
c != null && c.style && (c.style.paddingLeft = l + "px", c.style.paddingRight = l + "px");
|
|
1282
1293
|
});
|
|
1283
1294
|
});
|
|
1284
1295
|
}
|
|
1285
1296
|
}
|
|
1286
|
-
const
|
|
1297
|
+
const Kt = {
|
|
1287
1298
|
beforeMount(e) {
|
|
1288
1299
|
e.classList.add("ant-row"), e.style.display = "flex", e.style.flexWrap = "wrap", e.style.flexDirection = "row", e.style.minWidth = 0;
|
|
1289
1300
|
},
|
|
1290
1301
|
mounted(e, n, t) {
|
|
1291
|
-
|
|
1302
|
+
_e(e, n, t);
|
|
1292
1303
|
},
|
|
1293
|
-
updated(e, n, t,
|
|
1294
|
-
|
|
1304
|
+
updated(e, n, t, r) {
|
|
1305
|
+
_e(e, n, t);
|
|
1295
1306
|
}
|
|
1296
1307
|
}, Xt = {
|
|
1297
1308
|
beforeMount(e, n) {
|
|
@@ -1301,37 +1312,37 @@ const qt = {
|
|
|
1301
1312
|
}
|
|
1302
1313
|
}, Ht = {
|
|
1303
1314
|
mounted(e, n, t) {
|
|
1304
|
-
const { value:
|
|
1305
|
-
content:
|
|
1315
|
+
const { value: r } = n, {
|
|
1316
|
+
content: l = "",
|
|
1306
1317
|
placement: i = "top",
|
|
1307
|
-
enabled:
|
|
1308
|
-
padding:
|
|
1318
|
+
enabled: u = !0,
|
|
1319
|
+
padding: o = 8,
|
|
1309
1320
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1310
|
-
...
|
|
1311
|
-
} = typeof
|
|
1312
|
-
if (e.tooltipDisabled = !1, !
|
|
1321
|
+
...c
|
|
1322
|
+
} = typeof r == "string" ? { content: r } : r;
|
|
1323
|
+
if (e.tooltipDisabled = !1, !u)
|
|
1313
1324
|
e.tooltipDisabled = !0;
|
|
1314
1325
|
else if (n.modifiers.exceed) {
|
|
1315
|
-
const y = e.clientWidth, h =
|
|
1316
|
-
e.tooltipDisabled = y ? h < y -
|
|
1326
|
+
const y = e.clientWidth, h = xe(l);
|
|
1327
|
+
e.tooltipDisabled = y ? h < y - o * 2 : !0;
|
|
1317
1328
|
}
|
|
1318
1329
|
const p = S({
|
|
1319
1330
|
top: 0,
|
|
1320
1331
|
left: 0,
|
|
1321
1332
|
bottom: 0,
|
|
1322
1333
|
right: 0
|
|
1323
|
-
}),
|
|
1334
|
+
}), s = S({
|
|
1324
1335
|
getBoundingClientRect: () => p.value
|
|
1325
1336
|
}), a = W(rt, {
|
|
1326
1337
|
visible: !1,
|
|
1327
|
-
content:
|
|
1338
|
+
content: l,
|
|
1328
1339
|
placement: i,
|
|
1329
1340
|
virtualTriggering: !0,
|
|
1330
|
-
virtualRef:
|
|
1341
|
+
virtualRef: s.value,
|
|
1331
1342
|
popperClass: "vtooltip",
|
|
1332
|
-
...
|
|
1333
|
-
}),
|
|
1334
|
-
Z(a,
|
|
1343
|
+
...c
|
|
1344
|
+
}), d = document.createDocumentFragment();
|
|
1345
|
+
Z(a, d), e.tooltipVm = a, e.tooltipContainer = d, e.addEventListener("mouseenter", () => {
|
|
1335
1346
|
p.value = e.getBoundingClientRect(), a.component && !e.tooltipDisabled && (Object.assign(a.component.props, { visible: !0 }), a.component.update());
|
|
1336
1347
|
}), e.addEventListener("mouseleave", () => {
|
|
1337
1348
|
a.component && (Object.assign(a.component.props, { visible: !1 }), a.component.update());
|
|
@@ -1340,73 +1351,73 @@ const qt = {
|
|
|
1340
1351
|
updated(e, n) {
|
|
1341
1352
|
if (e.tooltipVm) {
|
|
1342
1353
|
const { value: t } = n, {
|
|
1343
|
-
content:
|
|
1344
|
-
placement:
|
|
1354
|
+
content: r = "",
|
|
1355
|
+
placement: l = "top",
|
|
1345
1356
|
enabled: i = !0,
|
|
1346
|
-
padding:
|
|
1357
|
+
padding: u = 8,
|
|
1347
1358
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1348
|
-
...
|
|
1359
|
+
...o
|
|
1349
1360
|
} = typeof t == "string" ? { content: t } : t;
|
|
1350
1361
|
if (e.tooltipDisabled = !1, !i)
|
|
1351
1362
|
e.tooltipDisabled = !0;
|
|
1352
1363
|
else if (n.modifiers.exceed) {
|
|
1353
|
-
const p = e.clientWidth,
|
|
1354
|
-
e.tooltipDisabled = p ?
|
|
1364
|
+
const p = e.clientWidth, s = xe(r);
|
|
1365
|
+
e.tooltipDisabled = p ? s < p - u * 2 : !0;
|
|
1355
1366
|
}
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1367
|
+
const c = e.tooltipVm;
|
|
1368
|
+
c.component && (Object.assign(c.component.props, { content: r, placement: l, ...o }), c.component.update());
|
|
1358
1369
|
}
|
|
1359
1370
|
},
|
|
1360
1371
|
unmounted(e) {
|
|
1361
1372
|
e.tooltipContainer && Z(null, e.tooltipContainer);
|
|
1362
1373
|
}
|
|
1363
1374
|
};
|
|
1364
|
-
function
|
|
1365
|
-
const
|
|
1366
|
-
return
|
|
1375
|
+
function xe(e, n) {
|
|
1376
|
+
const r = document.createElement("canvas").getContext("2d");
|
|
1377
|
+
return r.font = "14px Arial", r.measureText(e).width;
|
|
1367
1378
|
}
|
|
1368
1379
|
const Yt = {
|
|
1369
1380
|
beforeMount(e, n) {
|
|
1370
1381
|
const { value: t } = n;
|
|
1371
1382
|
t && (Qe(t) || setTimeout(() => {
|
|
1372
|
-
var
|
|
1373
|
-
(
|
|
1383
|
+
var l;
|
|
1384
|
+
(l = e.parentNode) == null || l.removeChild(e);
|
|
1374
1385
|
}, 50));
|
|
1375
1386
|
}
|
|
1376
1387
|
};
|
|
1377
|
-
function
|
|
1388
|
+
function Ce(e, n = 4) {
|
|
1378
1389
|
const t = new RegExp(`(.{${n}})`, "g");
|
|
1379
1390
|
return e.replace(t, "$1 ").trim();
|
|
1380
1391
|
}
|
|
1381
1392
|
const Zt = {
|
|
1382
1393
|
mounted(e, n) {
|
|
1383
|
-
const { value: t } = n, { content:
|
|
1384
|
-
e.textContent =
|
|
1394
|
+
const { value: t } = n, { content: r = "", spaceNum: l = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, i = r.replace(/\s+/g, "");
|
|
1395
|
+
e.textContent = Ce(i, l) || "-";
|
|
1385
1396
|
},
|
|
1386
1397
|
updated(e, n) {
|
|
1387
|
-
const { value: t } = n, { content:
|
|
1388
|
-
e.textContent =
|
|
1398
|
+
const { value: t } = n, { content: r = "", spaceNum: l = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, i = r.replace(/\s+/g, "");
|
|
1399
|
+
e.textContent = Ce(i, l) || "-";
|
|
1389
1400
|
}
|
|
1390
1401
|
}, Gt = {
|
|
1391
1402
|
mounted(e, n) {
|
|
1392
1403
|
typeof n.value == "function" && Ut(e, n.value, { modifiers: n.modifiers });
|
|
1393
1404
|
}
|
|
1394
|
-
},
|
|
1405
|
+
}, Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1395
1406
|
__proto__: null,
|
|
1396
1407
|
col: Xt,
|
|
1397
|
-
copy:
|
|
1408
|
+
copy: qt,
|
|
1398
1409
|
inputlimit: Vt,
|
|
1399
1410
|
longpress: Gt,
|
|
1400
1411
|
permission: Yt,
|
|
1401
|
-
row:
|
|
1412
|
+
row: Kt,
|
|
1402
1413
|
space: Zt,
|
|
1403
1414
|
tooltip: Ht
|
|
1404
1415
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1405
1416
|
function Qt(e) {
|
|
1406
|
-
Object.keys(
|
|
1407
|
-
e.component(n,
|
|
1408
|
-
}), Object.keys(
|
|
1409
|
-
e.directive(n,
|
|
1417
|
+
Object.keys(ye).forEach((n) => {
|
|
1418
|
+
e.component(n, ye[n]);
|
|
1419
|
+
}), Object.keys(Se).forEach((n) => {
|
|
1420
|
+
e.directive(n, Se[n]);
|
|
1410
1421
|
});
|
|
1411
1422
|
}
|
|
1412
1423
|
const ln = { install: Qt };
|
|
@@ -1415,14 +1426,14 @@ export {
|
|
|
1415
1426
|
mt as ARangePickerEx,
|
|
1416
1427
|
gt as ATableEx,
|
|
1417
1428
|
dn as UserCenterKey,
|
|
1418
|
-
|
|
1429
|
+
Tt as WlInputNumberRange,
|
|
1419
1430
|
Mt as WlIpInput,
|
|
1420
1431
|
St as WlNumberKeyboard,
|
|
1421
1432
|
kt as WlRateSlider,
|
|
1422
1433
|
ht as WlSplitter,
|
|
1423
1434
|
pn as buildTree,
|
|
1424
1435
|
Xt as col,
|
|
1425
|
-
|
|
1436
|
+
qt as copy,
|
|
1426
1437
|
ln as default,
|
|
1427
1438
|
fn as exportFile,
|
|
1428
1439
|
mn as forEachTree,
|
|
@@ -1439,13 +1450,13 @@ export {
|
|
|
1439
1450
|
Sn as isArray,
|
|
1440
1451
|
kn as isAsyncFunction,
|
|
1441
1452
|
wn as isBoolean,
|
|
1442
|
-
|
|
1443
|
-
|
|
1453
|
+
En as isClient,
|
|
1454
|
+
$n as isDate,
|
|
1444
1455
|
Mn as isDef,
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1456
|
+
Nn as isElement,
|
|
1457
|
+
Pn as isFunction,
|
|
1458
|
+
Tn as isImageDom,
|
|
1459
|
+
An as isNull,
|
|
1449
1460
|
B as isNullOrUndef,
|
|
1450
1461
|
Dn as isNumber,
|
|
1451
1462
|
Ln as isObject,
|
|
@@ -1460,16 +1471,16 @@ export {
|
|
|
1460
1471
|
Un as removeAll,
|
|
1461
1472
|
Wn as removeLocale,
|
|
1462
1473
|
zn as removeToken,
|
|
1463
|
-
|
|
1464
|
-
|
|
1474
|
+
Kt as row,
|
|
1475
|
+
qn as setLocale,
|
|
1465
1476
|
Vn as setMenuInfo,
|
|
1466
|
-
|
|
1477
|
+
Kn as setToken,
|
|
1467
1478
|
Xn as setUserCenterParams,
|
|
1468
1479
|
Hn as setUserInfo,
|
|
1469
1480
|
Zt as space,
|
|
1470
1481
|
Yn as toUserCenterConsole,
|
|
1471
1482
|
Ht as tooltip,
|
|
1472
|
-
|
|
1483
|
+
ue as useConfigProvider,
|
|
1473
1484
|
sn as useFindParent,
|
|
1474
1485
|
rn as useModal
|
|
1475
1486
|
};
|