@witlink/components 1.0.23 → 1.0.24
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 +347 -340
- 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,23 +1,23 @@
|
|
|
1
|
-
import { InputNumber as ae, RangePicker as
|
|
2
|
-
import { markRaw as se, createElementBlock as A, openBlock 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 A, openBlock as $, createElementVNode as E, defineComponent as F, mergeModels as j, useModel as G, useSlots as ke, useAttrs as Ue, createBlock as z, mergeProps as I, createSlots as le, renderList as V, withCtx as M, unref as k, renderSlot as q, normalizeProps as re, guardReactiveProps as we, createVNode as N, ref as S, getCurrentInstance as J, render as Z, h as W, computed as D, onMounted as $e, onUnmounted as We, normalizeClass as ze, normalizeStyle as de, resolveDirective as Ke, isRef as Q, withKeys as Ve, withModifiers as pe, Fragment as H, createTextVNode as ee, toDisplayString as oe, withDirectives as qe, nextTick as fe, useCssVars as Xe, watch as ie, createCommentVNode as me, shallowRef as X, shallowReadonly as He, toValue as K, 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 $n, isDate as En, isDef as Mn, isElement as Pn, isFunction as
|
|
5
|
-
import
|
|
6
|
-
import { Drawer as
|
|
7
|
-
import { ElScrollbar as st, ElTooltip as
|
|
8
|
-
const
|
|
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 $n, isDate as En, isDef as Mn, isElement as Pn, isFunction as Nn, isImageDom as An, isNull as Tn, 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 Kn, setMenuInfo as Vn, setToken as qn, setUserCenterParams as Xn, setUserInfo as Hn, toUserCenterConsole as Yn } from "./utils.js";
|
|
5
|
+
import ve from "dayjs";
|
|
6
|
+
import { Drawer as T, App as Je, Modal as et, Button as tt, ConfigProvider as nt, Textarea as ot, Form as Ee, message as at } from "ant-design-vue";
|
|
7
|
+
import { ElScrollbar as st, ElTooltip as lt } from "element-plus";
|
|
8
|
+
const rt = {
|
|
9
9
|
class: "icon",
|
|
10
10
|
viewBox: "0 0 1024 1024",
|
|
11
11
|
width: "1.2em",
|
|
12
12
|
height: "1.2em"
|
|
13
13
|
};
|
|
14
14
|
function it(e, n) {
|
|
15
|
-
return
|
|
16
|
-
|
|
15
|
+
return $(), A("svg", rt, n[0] || (n[0] = [
|
|
16
|
+
E("path", {
|
|
17
17
|
fill: "currentColor",
|
|
18
18
|
d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"
|
|
19
19
|
}, null, -1),
|
|
20
|
-
|
|
20
|
+
E("path", {
|
|
21
21
|
fill: "currentColor",
|
|
22
22
|
d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"
|
|
23
23
|
}, null, -1)
|
|
@@ -30,8 +30,8 @@ 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
|
|
34
|
-
|
|
33
|
+
return $(), A("svg", ct, n[0] || (n[0] = [
|
|
34
|
+
E("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)
|
|
@@ -58,55 +58,55 @@ 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"),
|
|
61
|
+
const t = G(e, "value"), r = e, u = n, i = ke(), o = Ue();
|
|
62
62
|
function s(a) {
|
|
63
63
|
if (B(a))
|
|
64
64
|
t.value = null, u("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, u("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
77
|
if (o.disabled) return;
|
|
78
78
|
const a = Number(t.value);
|
|
79
79
|
!B(o.min) && a <= Number(o.min) || s(a - 1);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function l() {
|
|
82
82
|
if (o.disabled) return;
|
|
83
83
|
const a = Number(t.value);
|
|
84
84
|
!B(o.max) && a >= Number(o.max) || s(a + 1);
|
|
85
85
|
}
|
|
86
|
-
return (a,
|
|
86
|
+
return (a, d) => {
|
|
87
87
|
const y = pt, h = ut, v = ae;
|
|
88
|
-
return
|
|
88
|
+
return $(), z(v, I({
|
|
89
89
|
value: t.value,
|
|
90
90
|
precision: e.precision,
|
|
91
91
|
stringMode: e.stringMode,
|
|
92
92
|
controls: !e.customControls,
|
|
93
93
|
onChange: s,
|
|
94
|
-
onBlur:
|
|
95
|
-
}, a.$attrs),
|
|
94
|
+
onBlur: c
|
|
95
|
+
}, a.$attrs), le({ _: 2 }, [
|
|
96
96
|
V(Object.keys(k(i)), (x) => ({
|
|
97
97
|
name: x,
|
|
98
98
|
fn: M((f) => [
|
|
99
|
-
q(a.$slots, x,
|
|
99
|
+
q(a.$slots, x, re(we(f)))
|
|
100
100
|
])
|
|
101
101
|
})),
|
|
102
102
|
e.customControls ? {
|
|
103
103
|
name: "addonBefore",
|
|
104
104
|
fn: M(() => [
|
|
105
|
-
|
|
105
|
+
E("div", {
|
|
106
106
|
class: "btn-control",
|
|
107
107
|
onClick: p
|
|
108
108
|
}, [
|
|
109
|
-
|
|
109
|
+
N(y, { class: "btn-icon" })
|
|
110
110
|
])
|
|
111
111
|
]),
|
|
112
112
|
key: "0"
|
|
@@ -114,11 +114,11 @@ const pt = se({ name: "ant-design-minus", render: dt }), ft = /* @__PURE__ */ F(
|
|
|
114
114
|
e.customControls ? {
|
|
115
115
|
name: "addonAfter",
|
|
116
116
|
fn: M(() => [
|
|
117
|
-
|
|
117
|
+
E("div", {
|
|
118
118
|
class: "btn-control",
|
|
119
|
-
onClick:
|
|
119
|
+
onClick: l
|
|
120
120
|
}, [
|
|
121
|
-
|
|
121
|
+
N(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 =
|
|
159
|
+
const t = e, r = n, u = S(), i = S(), o = (l) => {
|
|
160
|
+
const a = ve().add(t.max, t.maxUnit), d = ve().subtract(t.min, t.minUnit), y = t.interval;
|
|
161
161
|
if (!u.value || u.value.length === 0)
|
|
162
|
-
return
|
|
163
|
-
const h = u.value[0] && (
|
|
164
|
-
return u.value[1] && (u.value[1].diff(
|
|
165
|
-
}, s = (
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
}, p = (
|
|
170
|
-
u.value =
|
|
162
|
+
return l.isAfter(a) || l.isBefore(d);
|
|
163
|
+
const h = u.value[0] && (l.diff(u.value[0], "days") > y || l.isAfter(a));
|
|
164
|
+
return u.value[1] && (u.value[1].diff(l, "days") > y || l.isBefore(d)) || h;
|
|
165
|
+
}, s = (l) => {
|
|
166
|
+
l ? (u.value = [], i.value = []) : i.value = void 0;
|
|
167
|
+
}, c = (l) => {
|
|
168
|
+
r("update:value", l), r("change", l);
|
|
169
|
+
}, p = (l) => {
|
|
170
|
+
u.value = l;
|
|
171
171
|
};
|
|
172
|
-
return (
|
|
173
|
-
const
|
|
174
|
-
return
|
|
172
|
+
return (l, a) => {
|
|
173
|
+
const d = De;
|
|
174
|
+
return $(), z(d, I({
|
|
175
175
|
value: k(i) || e.value,
|
|
176
176
|
"disabled-date": o,
|
|
177
|
-
onChange:
|
|
177
|
+
onChange: c,
|
|
178
178
|
onOpenChange: s,
|
|
179
179
|
onCalendarChange: p
|
|
180
|
-
},
|
|
181
|
-
V(Object.keys(
|
|
180
|
+
}, l.$attrs), le({ _: 2 }, [
|
|
181
|
+
V(Object.keys(l.$slots), (y) => ({
|
|
182
182
|
name: y,
|
|
183
183
|
fn: M((h) => [
|
|
184
|
-
q(
|
|
184
|
+
q(l.$slots, y, re(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, o]) => [i, k(o)])
|
|
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
|
+
T.destroy = function() {
|
|
221
|
+
const e = T.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
|
+
T.destroyAll = function() {
|
|
230
|
+
(T.instanceArr || []).forEach((n) => {
|
|
231
231
|
Z(null, n.container);
|
|
232
|
-
}),
|
|
232
|
+
}), T.instanceArr = [];
|
|
233
233
|
};
|
|
234
|
-
function
|
|
235
|
-
var
|
|
234
|
+
function ln() {
|
|
235
|
+
var l, 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,11 +247,11 @@ function rn() {
|
|
|
247
247
|
zh: "请输入",
|
|
248
248
|
en: "Please Enter",
|
|
249
249
|
fr: "Veuillez entrer"
|
|
250
|
-
},
|
|
251
|
-
function i({ title:
|
|
250
|
+
}, r = ue(), u = ((a = (l = r == null ? void 0 : r.locale) == null ? void 0 : l.locale) == null ? void 0 : a.slice(0, 2)) || "en";
|
|
251
|
+
function i({ title: d, ...y }) {
|
|
252
252
|
const h = S();
|
|
253
253
|
return o({
|
|
254
|
-
title:
|
|
254
|
+
title: d,
|
|
255
255
|
...y,
|
|
256
256
|
comp: ot,
|
|
257
257
|
props: {
|
|
@@ -270,9 +270,9 @@ function rn() {
|
|
|
270
270
|
})
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
|
-
function o({ title:
|
|
273
|
+
function o({ 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,
|
|
@@ -301,14 +301,14 @@ function rn() {
|
|
|
301
301
|
function s() {
|
|
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
|
+
T.instanceArr || (T.instanceArr = []);
|
|
307
|
+
const f = T.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
|
+
T.destroy();
|
|
333
333
|
}
|
|
334
334
|
},
|
|
335
335
|
n[u]
|
|
336
336
|
)
|
|
337
337
|
});
|
|
338
|
-
const
|
|
338
|
+
const _ = v.width || 992;
|
|
339
339
|
delete v.width;
|
|
340
|
-
const
|
|
341
|
-
|
|
340
|
+
const C = W(
|
|
341
|
+
T,
|
|
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(), T.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
|
+
T.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
377
|
modalComp: o,
|
|
378
378
|
modalDestroy: s,
|
|
379
|
-
drawerComp:
|
|
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(), u = S([]), i = S(!1), o = S(0), s = S(1), c = S(10), p = S(), l = 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
409
|
total: o.value,
|
|
406
410
|
current: s.value,
|
|
407
|
-
pageSize:
|
|
411
|
+
pageSize: c.value,
|
|
408
412
|
showSizeChanger: !0,
|
|
409
413
|
size: "small",
|
|
410
414
|
showTotal: (b) => a[y.value].replace("{num}", b)
|
|
@@ -413,24 +417,27 @@ 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: s.value, size: c.value } : _ = { pageNo: s.value, pageSize: c.value }, t.formatSortParams && ((b = l.value) != null && b.orderMap) && (_[l.value.field + "SortField"] = l.value.orderMap), t.loadData(_, p.value, l.value).then((C) => {
|
|
422
|
+
if (i.value = !1, (C == null ? void 0 : C.code) === 0) {
|
|
423
|
+
const w = C.result || {};
|
|
424
|
+
t.newFieldName ? (o.value = w.total, u.value = w.records) : (o.value = w.totalCount, u.value = w.data);
|
|
425
|
+
}
|
|
419
426
|
});
|
|
420
427
|
}
|
|
421
428
|
}
|
|
422
|
-
function x(b,
|
|
423
|
-
if (s.value = b.current,
|
|
424
|
-
const
|
|
429
|
+
function x(b, _, C) {
|
|
430
|
+
if (s.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
|
+
l.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
|
s.value = 1, v();
|
|
@@ -442,20 +449,20 @@ const gt = /* @__PURE__ */ F({
|
|
|
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 $(), z(C, I({
|
|
448
455
|
class: "table-ex",
|
|
449
456
|
loading: k(i),
|
|
450
457
|
pagination: k(h),
|
|
451
458
|
dataSource: k(u),
|
|
452
459
|
onChange: x,
|
|
453
460
|
onResizeColumn: f
|
|
454
|
-
}, b.$attrs),
|
|
455
|
-
V(Object.keys(k(
|
|
456
|
-
name:
|
|
461
|
+
}, b.$attrs), le({ _: 2 }, [
|
|
462
|
+
V(Object.keys(k(r)), (w) => ({
|
|
463
|
+
name: w,
|
|
457
464
|
fn: M((L) => [
|
|
458
|
-
|
|
465
|
+
w !== "emptyText" ? q(b.$slots, w, re(I({ key: 0 }, L))) : q(b.$slots, w, { key: 1 })
|
|
459
466
|
])
|
|
460
467
|
}))
|
|
461
468
|
]), 1040, ["loading", "pagination", "dataSource"]);
|
|
@@ -478,18 +485,18 @@ const gt = /* @__PURE__ */ F({
|
|
|
478
485
|
}
|
|
479
486
|
},
|
|
480
487
|
setup(e) {
|
|
481
|
-
const n = e, t = S(),
|
|
488
|
+
const n = e, t = S(), r = S(), u = S({}), i = S({}), o = S(0.2);
|
|
482
489
|
function s(p) {
|
|
483
490
|
u.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 l = 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 -
|
|
499
|
+
const f = (v.clientX - d) / l;
|
|
493
500
|
f > n.leftMin && f < n.leftMax && (o.value = f, s(f));
|
|
494
501
|
}
|
|
495
502
|
function h() {
|
|
@@ -497,30 +504,30 @@ const gt = /* @__PURE__ */ F({
|
|
|
497
504
|
}
|
|
498
505
|
document.addEventListener("mousemove", y), document.addEventListener("mouseup", h);
|
|
499
506
|
}
|
|
500
|
-
return
|
|
501
|
-
s(o.value),
|
|
507
|
+
return $e(() => {
|
|
508
|
+
s(o.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, l) => ($(), A("div", {
|
|
505
512
|
ref_key: "container",
|
|
506
513
|
ref: t,
|
|
507
514
|
class: ze(["wl-splitter", { bordered: e.bordered }])
|
|
508
515
|
}, [
|
|
509
|
-
|
|
516
|
+
E("div", {
|
|
510
517
|
class: "my-left",
|
|
511
|
-
style:
|
|
518
|
+
style: de(k(u))
|
|
512
519
|
}, [
|
|
513
520
|
q(p.$slots, "left")
|
|
514
521
|
], 4),
|
|
515
|
-
|
|
522
|
+
E("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
|
+
E("div", {
|
|
522
529
|
class: "my-right",
|
|
523
|
-
style:
|
|
530
|
+
style: de(k(i))
|
|
524
531
|
}, [
|
|
525
532
|
q(p.$slots, "right")
|
|
526
533
|
], 4)
|
|
@@ -535,20 +542,20 @@ const gt = /* @__PURE__ */ F({
|
|
|
535
542
|
xmlns: "http://www.w3.org/2000/svg"
|
|
536
543
|
};
|
|
537
544
|
function bt(e, n) {
|
|
538
|
-
return
|
|
539
|
-
|
|
545
|
+
return $(), A("svg", yt, n[0] || (n[0] = [
|
|
546
|
+
E("path", {
|
|
540
547
|
d: "M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",
|
|
541
548
|
stroke: "#272E3B",
|
|
542
549
|
"stroke-linecap": "round",
|
|
543
550
|
"stroke-linejoin": "round"
|
|
544
551
|
}, null, -1),
|
|
545
|
-
|
|
552
|
+
E("path", {
|
|
546
553
|
d: "M10.8125 9.5L15.8125 14.5",
|
|
547
554
|
stroke: "#272E3B",
|
|
548
555
|
"stroke-linecap": "round",
|
|
549
556
|
"stroke-linejoin": "round"
|
|
550
557
|
}, null, -1),
|
|
551
|
-
|
|
558
|
+
E("path", {
|
|
552
559
|
d: "M15.8125 9.5L10.8125 14.5",
|
|
553
560
|
stroke: "#272E3B",
|
|
554
561
|
"stroke-linecap": "round",
|
|
@@ -582,27 +589,27 @@ 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, u = S(), i = S(), o = S(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), s = G(e, "value"), c = S(!1);
|
|
586
593
|
function p() {
|
|
587
|
-
|
|
594
|
+
c.value = !0;
|
|
588
595
|
}
|
|
589
|
-
function
|
|
596
|
+
function l() {
|
|
590
597
|
x();
|
|
591
598
|
}
|
|
592
599
|
function a(f) {
|
|
593
600
|
i.value.focus(), s.value = Number(f).toFixed(t.precision);
|
|
594
601
|
}
|
|
595
|
-
function
|
|
602
|
+
function d(f) {
|
|
596
603
|
if (i.value.focus(), B(s.value) || s.value === "") {
|
|
597
604
|
if (["00", "."].includes(f))
|
|
598
605
|
return;
|
|
599
606
|
s.value = f;
|
|
600
607
|
} else {
|
|
601
|
-
const m = String(s.value), g = u.value.getElementsByTagName("input")[0], b = g.selectionStart || 0,
|
|
602
|
-
s.value = `${m.slice(0, b)}${f}${m.slice(
|
|
603
|
-
const
|
|
604
|
-
|
|
605
|
-
i.value.setSelectionRange(
|
|
608
|
+
const m = String(s.value), g = u.value.getElementsByTagName("input")[0], b = g.selectionStart || 0, _ = g.selectionEnd || 0;
|
|
609
|
+
s.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
|
}
|
|
@@ -611,9 +618,9 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
611
618
|
return;
|
|
612
619
|
const f = String(s.value);
|
|
613
620
|
if (f != null && f.length) {
|
|
614
|
-
const m = u.value.getElementsByTagName("input")[0], g = m.selectionStart || 0, b = m.selectionEnd || 0,
|
|
615
|
-
g === b ? s.value = f.slice(0,
|
|
616
|
-
i.value.setSelectionRange(
|
|
621
|
+
const m = u.value.getElementsByTagName("input")[0], g = m.selectionStart || 0, b = m.selectionEnd || 0, _ = g > 0 ? g - 1 : 0;
|
|
622
|
+
g === b ? s.value = f.slice(0, _) + f.slice(b) : s.value = f.slice(0, g) + f.slice(b), fe(() => {
|
|
623
|
+
i.value.setSelectionRange(_, _);
|
|
617
624
|
});
|
|
618
625
|
}
|
|
619
626
|
}
|
|
@@ -626,48 +633,48 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
626
633
|
function x() {
|
|
627
634
|
const f = t.min, m = t.max;
|
|
628
635
|
let g = parseFloat(s.value || "0");
|
|
629
|
-
B(f) || (g = g > f ? g : f), B(m) || (g = g > m ? m : g), s.value = Number(g).toFixed(t.precision),
|
|
636
|
+
B(f) || (g = g > f ? g : f), B(m) || (g = g > m ? m : g), s.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 = Ke("longpress");
|
|
640
|
+
return $(), A("div", {
|
|
634
641
|
class: "number-keyboard",
|
|
635
642
|
ref_key: "numberKeyboard",
|
|
636
643
|
ref: u
|
|
637
644
|
}, [
|
|
638
|
-
|
|
645
|
+
N(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] = (P) => Q(
|
|
650
|
+
open: k(c),
|
|
651
|
+
"onUpdate:open": m[2] || (m[2] = (P) => Q(c) ? c.value = P : null)
|
|
645
652
|
}, {
|
|
646
653
|
content: M(() => [
|
|
647
|
-
|
|
654
|
+
E("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
|
+
N(C, { gutter: "8" }, {
|
|
653
660
|
default: M(() => [
|
|
654
|
-
|
|
661
|
+
N(b, { span: 18 }, {
|
|
655
662
|
default: M(() => [
|
|
656
|
-
|
|
657
|
-
(
|
|
663
|
+
E("div", xt, [
|
|
664
|
+
($(!0), A(H, null, V(e.quickNums, (P) => ($(), z(g, {
|
|
658
665
|
class: "btn-num",
|
|
659
666
|
key: P,
|
|
660
|
-
onClick: (
|
|
667
|
+
onClick: (Te) => a(P)
|
|
661
668
|
}, {
|
|
662
669
|
default: M(() => [
|
|
663
670
|
ee(oe(P), 1)
|
|
664
671
|
]),
|
|
665
672
|
_: 2
|
|
666
673
|
}, 1032, ["onClick"]))), 128)),
|
|
667
|
-
(
|
|
674
|
+
($(!0), A(H, null, V(k(o), (P) => ($(), z(g, {
|
|
668
675
|
class: "btn-num",
|
|
669
676
|
key: P,
|
|
670
|
-
onClick: (
|
|
677
|
+
onClick: (Te) => d(P)
|
|
671
678
|
}, {
|
|
672
679
|
default: M(() => [
|
|
673
680
|
ee(oe(P), 1)
|
|
@@ -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
|
+
N(b, { span: 6 }, {
|
|
682
689
|
default: M(() => [
|
|
683
|
-
|
|
684
|
-
qe((
|
|
690
|
+
E("div", Ct, [
|
|
691
|
+
qe(($(), z(g, {
|
|
685
692
|
class: "btn-clear",
|
|
686
693
|
onClick: y
|
|
687
694
|
}, {
|
|
688
695
|
default: M(() => [
|
|
689
|
-
|
|
696
|
+
N(_, { style: { width: "24px", height: "24px" } })
|
|
690
697
|
]),
|
|
691
698
|
_: 1
|
|
692
699
|
})), [
|
|
693
700
|
[U, h]
|
|
694
701
|
]),
|
|
695
|
-
|
|
702
|
+
N(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
|
+
N(w, I({
|
|
716
723
|
ref_key: "inputRef",
|
|
717
724
|
ref: i,
|
|
718
725
|
value: s.value,
|
|
719
726
|
"onUpdate:value": m[1] || (m[1] = (P) => s.value = P)
|
|
720
727
|
}, f.$attrs, {
|
|
721
728
|
onFocus: p,
|
|
722
|
-
onBlur:
|
|
729
|
+
onBlur: l,
|
|
723
730
|
onKeyup: Ve(v, ["enter"])
|
|
724
731
|
}), null, 16, ["value"])
|
|
725
732
|
]),
|
|
@@ -757,40 +764,40 @@ 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((l) => ({
|
|
768
|
+
"6ffd511e": k(o),
|
|
769
|
+
"1201d0a5": k(s),
|
|
770
|
+
"1201d466": k(c)
|
|
764
771
|
}));
|
|
765
|
-
const t = e,
|
|
766
|
-
const
|
|
772
|
+
const t = e, r = G(e, "value"), u = n, i = D(() => {
|
|
773
|
+
const l = {}, 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 (l[x] = x, v > 0) {
|
|
770
777
|
const f = a.shift(), m = h[v - 1], g = m + (x - m) / 2;
|
|
771
|
-
|
|
778
|
+
l[g] = { style: { top: "-28px" }, label: f };
|
|
772
779
|
}
|
|
773
780
|
}
|
|
774
|
-
return
|
|
781
|
+
return l;
|
|
775
782
|
}), o = D(() => {
|
|
776
|
-
const
|
|
783
|
+
const l = r.value, a = t.min || 0, d = t.max || 100, y = Math.floor((l[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
|
-
}), s = D(() => t.colorStops[1]),
|
|
779
|
-
function p(
|
|
780
|
-
const a = t.min || 0,
|
|
781
|
-
|
|
785
|
+
}), s = D(() => t.colorStops[1]), c = D(() => t.colorStops[2]);
|
|
786
|
+
function p(l) {
|
|
787
|
+
const a = t.min || 0, d = t.max || 100;
|
|
788
|
+
l[0] <= a ? l[0] = a + 1 : l.at(-1) >= d && (l[l.length - 1] = d - 1), l.length === new Set(l).size && (r.value = l, u("change", l));
|
|
782
789
|
}
|
|
783
|
-
return (
|
|
784
|
-
const
|
|
785
|
-
return
|
|
790
|
+
return (l, a) => {
|
|
791
|
+
const d = Fe;
|
|
792
|
+
return $(), 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
|
+
}, l.$attrs), null, 16, ["value", "min", "max", "marks"]);
|
|
794
801
|
};
|
|
795
802
|
}
|
|
796
803
|
}), wt = { class: "ip-input" }, $t = { class: "ip-wrapper" }, Et = {
|
|
@@ -809,42 +816,42 @@ 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 =
|
|
819
|
+
const n = Ee.useInjectFormItemContext(), t = e, r = G(e, "value"), u = S(["", "", "", ""]), i = S(), o = S(""), s = S(), c = (a) => {
|
|
813
820
|
var y, h;
|
|
814
|
-
const
|
|
815
|
-
if (
|
|
821
|
+
const d = u.value[a];
|
|
822
|
+
if (d && (!/^\d+$/.test(d) || parseInt(d) > 255)) {
|
|
816
823
|
u.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 = s.value) == null || h.focus())), r.value = `${u.value.join(".")}${t.hasPort ? ":" + o.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" && u.value[a] === "" && a > 0 && (h = i.value) != null && h.length && i.value[a - 1].focus();
|
|
823
830
|
};
|
|
824
|
-
function
|
|
825
|
-
|
|
831
|
+
function l() {
|
|
832
|
+
r.value = `${u.value.join(".")}${t.hasPort ? ":" + (o.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
|
-
o.value = h[1] || "",
|
|
841
|
+
o.value = h[1] || "", d = h[0];
|
|
835
842
|
}
|
|
836
|
-
const y =
|
|
843
|
+
const y = d.split(".");
|
|
837
844
|
y.length === 4 && (u.value = y);
|
|
838
845
|
} else
|
|
839
846
|
u.value = ["", "", "", ""], o.value = "";
|
|
840
847
|
},
|
|
841
848
|
{ immediate: !0 }
|
|
842
|
-
), (a,
|
|
849
|
+
), (a, d) => {
|
|
843
850
|
const y = ae;
|
|
844
|
-
return
|
|
845
|
-
|
|
846
|
-
(
|
|
847
|
-
|
|
851
|
+
return $(), A("div", wt, [
|
|
852
|
+
E("div", $t, [
|
|
853
|
+
($(!0), A(H, null, V(k(u), (h, v) => ($(), A(H, { key: v }, [
|
|
854
|
+
N(y, {
|
|
848
855
|
ref_for: !0,
|
|
849
856
|
ref_key: "ipPartArr",
|
|
850
857
|
ref: i,
|
|
@@ -855,31 +862,31 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
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 ? ($(), A("span", Et, ".")) : me("", !0)
|
|
862
869
|
], 64))), 128))
|
|
863
870
|
]),
|
|
864
|
-
e.hasPort ? (
|
|
865
|
-
|
|
866
|
-
|
|
871
|
+
e.hasPort ? ($(), A(H, { key: 0 }, [
|
|
872
|
+
d[1] || (d[1] = E("span", { class: "ip-port-separator" }, ":", -1)),
|
|
873
|
+
N(y, {
|
|
867
874
|
ref_key: "portRef",
|
|
868
875
|
ref: s,
|
|
869
876
|
class: "ip-port",
|
|
870
877
|
value: k(o),
|
|
871
|
-
"onUpdate:value":
|
|
878
|
+
"onUpdate:value": d[0] || (d[0] = (h) => Q(o) ? o.value = h : null),
|
|
872
879
|
min: 0,
|
|
873
880
|
max: 65535,
|
|
874
881
|
precision: 0,
|
|
875
882
|
controls: !1,
|
|
876
|
-
onChange:
|
|
883
|
+
onChange: l
|
|
877
884
|
}, null, 8, ["value"])
|
|
878
|
-
], 64)) :
|
|
885
|
+
], 64)) : me("", !0)
|
|
879
886
|
]);
|
|
880
887
|
};
|
|
881
888
|
}
|
|
882
|
-
}), Pt = { class: "number-range" },
|
|
889
|
+
}), Pt = { class: "number-range" }, Nt = { class: "separator" }, At = /* @__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,45 +913,45 @@ 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"), u = n, i = Ee.useInjectFormItemContext(), o = D(() => {
|
|
917
|
+
const a = r.value[1];
|
|
911
918
|
return B(a) ? t.max : a;
|
|
912
919
|
}), s = D(() => {
|
|
913
|
-
const a =
|
|
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 l() {
|
|
924
|
+
const a = [c.value, p.value];
|
|
925
|
+
r.value = a, i.onFieldChange(), u("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 $(), A("div", Pt, [
|
|
936
|
+
N(y, I({
|
|
930
937
|
min: t.min,
|
|
931
938
|
max: k(o),
|
|
932
|
-
value: k(
|
|
933
|
-
"onUpdate:value":
|
|
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
|
-
|
|
937
|
-
|
|
942
|
+
}, a.$attrs, { onChange: l }), null, 16, ["min", "max", "value", "placeholder"]),
|
|
943
|
+
E("span", Nt, oe(e.separator), 1),
|
|
944
|
+
N(y, I({
|
|
938
945
|
min: k(s),
|
|
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: l }), 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,
|
|
@@ -955,20 +962,20 @@ const _t = se({ name: "local-clear", render: bt }), xt = { class: "nums-box" },
|
|
|
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 Tt = Object.prototype.toString, Dt = (e) => Tt.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:
|
|
986
|
+
immediate: r = !0,
|
|
980
987
|
immediateCallback: u = !1
|
|
981
988
|
} = t, i = X(!1);
|
|
982
989
|
let o = null;
|
|
983
990
|
function s() {
|
|
984
991
|
o && (clearTimeout(o), o = null);
|
|
985
992
|
}
|
|
986
|
-
function
|
|
993
|
+
function c() {
|
|
987
994
|
i.value = !1, s();
|
|
988
995
|
}
|
|
989
|
-
function p(...
|
|
996
|
+
function p(...l) {
|
|
990
997
|
u && e(), s(), i.value = !0, o = setTimeout(() => {
|
|
991
|
-
i.value = !1, o = null, e(...
|
|
998
|
+
i.value = !1, o = null, e(...l);
|
|
992
999
|
}, K(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,8 +1014,8 @@ function Rt(e, n, t) {
|
|
|
1007
1014
|
}
|
|
1008
1015
|
);
|
|
1009
1016
|
}
|
|
1010
|
-
const jt =
|
|
1011
|
-
function
|
|
1017
|
+
const jt = ce ? window : void 0, Pe = ce ? window.navigator : void 0;
|
|
1018
|
+
function Ne(e) {
|
|
1012
1019
|
var n;
|
|
1013
1020
|
const t = K(e);
|
|
1014
1021
|
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
@@ -1016,28 +1023,28 @@ function Pe(e) {
|
|
|
1016
1023
|
function Y(...e) {
|
|
1017
1024
|
const n = [], t = () => {
|
|
1018
1025
|
n.forEach((s) => s()), n.length = 0;
|
|
1019
|
-
},
|
|
1020
|
-
const s = te(K(e[0])).filter((
|
|
1021
|
-
return s.every((
|
|
1026
|
+
}, r = (s, c, p, l) => (s.addEventListener(c, p, l), () => s.removeEventListener(c, p, l)), u = D(() => {
|
|
1027
|
+
const s = te(K(e[0])).filter((c) => c != null);
|
|
1028
|
+
return s.every((c) => typeof c != "string") ? s : void 0;
|
|
1022
1029
|
}), i = Rt(
|
|
1023
1030
|
() => {
|
|
1024
|
-
var s,
|
|
1031
|
+
var s, c;
|
|
1025
1032
|
return [
|
|
1026
|
-
(
|
|
1033
|
+
(c = (s = u.value) == null ? void 0 : s.map((p) => Ne(p))) != null ? c : [jt].filter((p) => p != null),
|
|
1027
1034
|
te(K(u.value ? e[1] : e[0])),
|
|
1028
1035
|
te(k(u.value ? e[2] : e[1])),
|
|
1029
1036
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1030
1037
|
K(u.value ? e[3] : e[2])
|
|
1031
1038
|
];
|
|
1032
1039
|
},
|
|
1033
|
-
([s,
|
|
1034
|
-
if (t(), !(s != null && s.length) || !(
|
|
1040
|
+
([s, c, p, l]) => {
|
|
1041
|
+
if (t(), !(s != null && s.length) || !(c != null && c.length) || !(p != null && p.length))
|
|
1035
1042
|
return;
|
|
1036
|
-
const a = Dt(
|
|
1043
|
+
const a = Dt(l) ? { ...l } : l;
|
|
1037
1044
|
n.push(
|
|
1038
1045
|
...s.flatMap(
|
|
1039
|
-
(
|
|
1040
|
-
(y) => p.map((h) =>
|
|
1046
|
+
(d) => c.flatMap(
|
|
1047
|
+
(y) => p.map((h) => r(d, y, h, a))
|
|
1041
1048
|
)
|
|
1042
1049
|
)
|
|
1043
1050
|
);
|
|
@@ -1046,83 +1053,83 @@ function Y(...e) {
|
|
|
1046
1053
|
), o = () => {
|
|
1047
1054
|
i(), t();
|
|
1048
1055
|
};
|
|
1049
|
-
return
|
|
1056
|
+
return Me(t), o;
|
|
1050
1057
|
}
|
|
1051
1058
|
function Ot() {
|
|
1052
1059
|
const e = X(!1), n = J();
|
|
1053
|
-
return n &&
|
|
1060
|
+
return n && $e(() => {
|
|
1054
1061
|
e.value = !0;
|
|
1055
1062
|
}, n), e;
|
|
1056
1063
|
}
|
|
1057
|
-
function
|
|
1064
|
+
function Ae(e) {
|
|
1058
1065
|
const n = Ot();
|
|
1059
1066
|
return D(() => (n.value, !!e()));
|
|
1060
1067
|
}
|
|
1061
1068
|
const It = 500, Ft = 10;
|
|
1062
1069
|
function Ut(e, n, t) {
|
|
1063
|
-
var
|
|
1064
|
-
const i = D(() =>
|
|
1065
|
-
let o, s,
|
|
1066
|
-
function
|
|
1067
|
-
o && (clearTimeout(o), o = void 0), s = void 0,
|
|
1070
|
+
var r, u;
|
|
1071
|
+
const i = D(() => Ne(e));
|
|
1072
|
+
let o, s, c, p = !1;
|
|
1073
|
+
function l() {
|
|
1074
|
+
o && (clearTimeout(o), o = void 0), s = 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, s, p];
|
|
1079
|
+
if (l(), !(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, P = Math.sqrt(L * L + U * U);
|
|
1083
|
+
t.onMouseUp(f.timeStamp - _, P, 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 || (l(), (g = t == null ? void 0 : t.modifiers) != null && g.prevent && f.preventDefault(), (b = t == null ? void 0 : t.modifiers) != null && b.stop && f.stopPropagation(), s = {
|
|
1081
1088
|
x: f.x,
|
|
1082
1089
|
y: f.y
|
|
1083
|
-
},
|
|
1090
|
+
}, c = f.timeStamp, o = 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,
|
|
1098
|
+
var m, g, b, _;
|
|
1092
1099
|
if ((m = t == null ? void 0 : t.modifiers) != null && m.self && f.target !== i.value || !s || (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 - s.x, w = f.y - s.y;
|
|
1103
|
+
Math.sqrt(C * C + w * w) >= ((_ = t == null ? void 0 : t.distanceThreshold) != null ? _ : Ft) && l();
|
|
1097
1104
|
}
|
|
1098
1105
|
const h = {
|
|
1099
|
-
capture: (
|
|
1106
|
+
capture: (r = t == null ? void 0 : t.modifiers) == null ? void 0 : r.capture,
|
|
1100
1107
|
once: (u = t == null ? void 0 : t.modifiers) == null ? void 0 : u.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, u =
|
|
1113
|
-
var
|
|
1114
|
-
s.value = (a = (
|
|
1118
|
+
navigator: r = Pe
|
|
1119
|
+
} = n, u = Ae(() => r && "permissions" in r), i = X(), o = typeof e == "string" ? { name: e } : e, s = X(), c = () => {
|
|
1120
|
+
var l, a;
|
|
1121
|
+
s.value = (a = (l = i.value) == null ? void 0 : l.state) != null ? a : "prompt";
|
|
1115
1122
|
};
|
|
1116
|
-
Y(i, "change",
|
|
1123
|
+
Y(i, "change", c, { passive: !0 });
|
|
1117
1124
|
const p = Lt(async () => {
|
|
1118
1125
|
if (u.value) {
|
|
1119
1126
|
if (!i.value)
|
|
1120
1127
|
try {
|
|
1121
|
-
i.value = await
|
|
1128
|
+
i.value = await r.permissions.query(o);
|
|
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);
|
|
@@ -1136,33 +1143,33 @@ function ye(e, n = {}) {
|
|
|
1136
1143
|
}
|
|
1137
1144
|
function Wt(e = {}) {
|
|
1138
1145
|
const {
|
|
1139
|
-
navigator: n =
|
|
1146
|
+
navigator: n = Pe,
|
|
1140
1147
|
read: t = !1,
|
|
1141
|
-
source:
|
|
1148
|
+
source: r,
|
|
1142
1149
|
copiedDuring: u = 1500,
|
|
1143
1150
|
legacy: i = !1
|
|
1144
|
-
} = e, o =
|
|
1151
|
+
} = e, o = Ae(() => n && "clipboard" in n), s = be("clipboard-read"), c = be("clipboard-write"), p = D(() => o.value || i), l = X(""), a = X(!1), d = Bt(() => a.value = !1, u, { immediate: !1 });
|
|
1145
1152
|
async function y() {
|
|
1146
1153
|
let m = !(o.value && f(s.value));
|
|
1147
1154
|
if (!m)
|
|
1148
1155
|
try {
|
|
1149
|
-
|
|
1156
|
+
l.value = await n.clipboard.readText();
|
|
1150
1157
|
} catch {
|
|
1151
1158
|
m = !0;
|
|
1152
1159
|
}
|
|
1153
|
-
m && (
|
|
1160
|
+
m && (l.value = x());
|
|
1154
1161
|
}
|
|
1155
1162
|
p.value && t && Y(["copy", "cut"], y, { passive: !0 });
|
|
1156
|
-
async function h(m = K(
|
|
1163
|
+
async function h(m = K(r)) {
|
|
1157
1164
|
if (p.value && m != null) {
|
|
1158
|
-
let g = !(o.value && f(
|
|
1165
|
+
let g = !(o.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), l.value = m, a.value = !0, d.start();
|
|
1166
1173
|
}
|
|
1167
1174
|
}
|
|
1168
1175
|
function v(m) {
|
|
@@ -1178,7 +1185,7 @@ function Wt(e = {}) {
|
|
|
1178
1185
|
}
|
|
1179
1186
|
return {
|
|
1180
1187
|
isSupported: p,
|
|
1181
|
-
text:
|
|
1188
|
+
text: l,
|
|
1182
1189
|
copied: a,
|
|
1183
1190
|
copy: h
|
|
1184
1191
|
};
|
|
@@ -1188,7 +1195,7 @@ let ne;
|
|
|
1188
1195
|
const Kt = {
|
|
1189
1196
|
mounted(e, n, t) {
|
|
1190
1197
|
var o, s;
|
|
1191
|
-
const
|
|
1198
|
+
const r = ue(t.ctx), u = ((s = (o = r == null ? void 0 : r.locale) == null ? void 0 : o.locale) == null ? void 0 : s.slice(0, 2)) || "en", i = {
|
|
1192
1199
|
zh: "复制成功",
|
|
1193
1200
|
en: "Copy successfully",
|
|
1194
1201
|
fr: "Copie réussie"
|
|
@@ -1205,7 +1212,7 @@ const Kt = {
|
|
|
1205
1212
|
}
|
|
1206
1213
|
}, Vt = {
|
|
1207
1214
|
beforeMount(e, n, t) {
|
|
1208
|
-
const
|
|
1215
|
+
const r = n.value, u = {
|
|
1209
1216
|
letterNumber: /^\w*$/,
|
|
1210
1217
|
// 字母和数字
|
|
1211
1218
|
price: /^(\d*|(\d+\.\d{0,2}))$/,
|
|
@@ -1217,7 +1224,7 @@ const Kt = {
|
|
|
1217
1224
|
verify: /^\d{0,6}$/,
|
|
1218
1225
|
idCard: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
1219
1226
|
//身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X
|
|
1220
|
-
}, i =
|
|
1227
|
+
}, i = r instanceof RegExp ? r : n.arg && u[n.arg] ? u[n.arg] : null;
|
|
1221
1228
|
e._handleInput = (o) => {
|
|
1222
1229
|
if (o.isTrusted && !(!o.isComposing && o.inputType === "insertCompositionText" && o.data)) {
|
|
1223
1230
|
const s = i == null ? void 0 : i.test(o.target.value);
|
|
@@ -1240,8 +1247,8 @@ const Kt = {
|
|
|
1240
1247
|
case "insertFromDrop":
|
|
1241
1248
|
const p = o.dataTransfer || o.clipboardData || null;
|
|
1242
1249
|
if (p) {
|
|
1243
|
-
const
|
|
1244
|
-
o.target.selectionStart = e._start +
|
|
1250
|
+
const l = p.getData("text") || "";
|
|
1251
|
+
o.target.selectionStart = e._start + l.length, o.target.selectionEnd = e._start + l.length;
|
|
1245
1252
|
}
|
|
1246
1253
|
break;
|
|
1247
1254
|
case "insertText":
|
|
@@ -1250,10 +1257,10 @@ const Kt = {
|
|
|
1250
1257
|
o.target.selectionStart = e._start + 1, o.target.selectionEnd = e._start + 1;
|
|
1251
1258
|
break;
|
|
1252
1259
|
}
|
|
1253
|
-
const
|
|
1260
|
+
const c = new InputEvent("input", {
|
|
1254
1261
|
isComposing: !1
|
|
1255
1262
|
});
|
|
1256
|
-
o.target.dispatchEvent(
|
|
1263
|
+
o.target.dispatchEvent(c);
|
|
1257
1264
|
}
|
|
1258
1265
|
}, e._handleKeydown = (o) => {
|
|
1259
1266
|
const s = i == null ? void 0 : i.test(o.target.value);
|
|
@@ -1266,10 +1273,10 @@ const Kt = {
|
|
|
1266
1273
|
e._handleInput && e.removeEventListener("input", e._handleInput), e._handleKeydown && e.removeEventListener("keydown", e._handleKeydown), e._handleDrop && e.removeEventListener("drop", e._handleDrop);
|
|
1267
1274
|
}
|
|
1268
1275
|
};
|
|
1269
|
-
function
|
|
1270
|
-
const
|
|
1271
|
-
if (
|
|
1272
|
-
const u =
|
|
1276
|
+
function _e(e, n, t) {
|
|
1277
|
+
const r = n.value;
|
|
1278
|
+
if (r) {
|
|
1279
|
+
const u = r / 2;
|
|
1273
1280
|
e.style.marginLeft = `-${u}px`, e.style.marginRight = `-${u}px`;
|
|
1274
1281
|
const i = t.children;
|
|
1275
1282
|
i != null && i.length && i[0].children.forEach((o) => {
|
|
@@ -1277,8 +1284,8 @@ function be(e, n, t) {
|
|
|
1277
1284
|
const s = o.el;
|
|
1278
1285
|
s != null && s.style && (s.style.paddingLeft = u + "px", s.style.paddingRight = u + "px");
|
|
1279
1286
|
} else Array.isArray(o.children) && o.children.forEach((s) => {
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1287
|
+
const c = s.el;
|
|
1288
|
+
c != null && c.style && (c.style.paddingLeft = u + "px", c.style.paddingRight = u + "px");
|
|
1282
1289
|
});
|
|
1283
1290
|
});
|
|
1284
1291
|
}
|
|
@@ -1288,10 +1295,10 @@ const qt = {
|
|
|
1288
1295
|
e.classList.add("ant-row"), e.style.display = "flex", e.style.flexWrap = "wrap", e.style.flexDirection = "row", e.style.minWidth = 0;
|
|
1289
1296
|
},
|
|
1290
1297
|
mounted(e, n, t) {
|
|
1291
|
-
|
|
1298
|
+
_e(e, n, t);
|
|
1292
1299
|
},
|
|
1293
|
-
updated(e, n, t,
|
|
1294
|
-
|
|
1300
|
+
updated(e, n, t, r) {
|
|
1301
|
+
_e(e, n, t);
|
|
1295
1302
|
}
|
|
1296
1303
|
}, Xt = {
|
|
1297
1304
|
beforeMount(e, n) {
|
|
@@ -1301,18 +1308,18 @@ const qt = {
|
|
|
1301
1308
|
}
|
|
1302
1309
|
}, Ht = {
|
|
1303
1310
|
mounted(e, n, t) {
|
|
1304
|
-
const { value:
|
|
1311
|
+
const { value: r } = n, {
|
|
1305
1312
|
content: u = "",
|
|
1306
1313
|
placement: i = "top",
|
|
1307
1314
|
enabled: o = !0,
|
|
1308
1315
|
padding: s = 8,
|
|
1309
1316
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1310
|
-
...
|
|
1311
|
-
} = typeof
|
|
1317
|
+
...c
|
|
1318
|
+
} = typeof r == "string" ? { content: r } : r;
|
|
1312
1319
|
if (e.tooltipDisabled = !1, !o)
|
|
1313
1320
|
e.tooltipDisabled = !0;
|
|
1314
1321
|
else if (n.modifiers.exceed) {
|
|
1315
|
-
const y = e.clientWidth, h =
|
|
1322
|
+
const y = e.clientWidth, h = xe(u);
|
|
1316
1323
|
e.tooltipDisabled = y ? h < y - s * 2 : !0;
|
|
1317
1324
|
}
|
|
1318
1325
|
const p = S({
|
|
@@ -1320,18 +1327,18 @@ const qt = {
|
|
|
1320
1327
|
left: 0,
|
|
1321
1328
|
bottom: 0,
|
|
1322
1329
|
right: 0
|
|
1323
|
-
}),
|
|
1330
|
+
}), l = S({
|
|
1324
1331
|
getBoundingClientRect: () => p.value
|
|
1325
|
-
}), a = W(
|
|
1332
|
+
}), a = W(lt, {
|
|
1326
1333
|
visible: !1,
|
|
1327
1334
|
content: u,
|
|
1328
1335
|
placement: i,
|
|
1329
1336
|
virtualTriggering: !0,
|
|
1330
|
-
virtualRef:
|
|
1337
|
+
virtualRef: l.value,
|
|
1331
1338
|
popperClass: "vtooltip",
|
|
1332
|
-
...
|
|
1333
|
-
}),
|
|
1334
|
-
Z(a,
|
|
1339
|
+
...c
|
|
1340
|
+
}), d = document.createDocumentFragment();
|
|
1341
|
+
Z(a, d), e.tooltipVm = a, e.tooltipContainer = d, e.addEventListener("mouseenter", () => {
|
|
1335
1342
|
p.value = e.getBoundingClientRect(), a.component && !e.tooltipDisabled && (Object.assign(a.component.props, { visible: !0 }), a.component.update());
|
|
1336
1343
|
}), e.addEventListener("mouseleave", () => {
|
|
1337
1344
|
a.component && (Object.assign(a.component.props, { visible: !1 }), a.component.update());
|
|
@@ -1340,7 +1347,7 @@ const qt = {
|
|
|
1340
1347
|
updated(e, n) {
|
|
1341
1348
|
if (e.tooltipVm) {
|
|
1342
1349
|
const { value: t } = n, {
|
|
1343
|
-
content:
|
|
1350
|
+
content: r = "",
|
|
1344
1351
|
placement: u = "top",
|
|
1345
1352
|
enabled: i = !0,
|
|
1346
1353
|
padding: o = 8,
|
|
@@ -1350,20 +1357,20 @@ const qt = {
|
|
|
1350
1357
|
if (e.tooltipDisabled = !1, !i)
|
|
1351
1358
|
e.tooltipDisabled = !0;
|
|
1352
1359
|
else if (n.modifiers.exceed) {
|
|
1353
|
-
const p = e.clientWidth,
|
|
1354
|
-
e.tooltipDisabled = p ?
|
|
1360
|
+
const p = e.clientWidth, l = xe(r);
|
|
1361
|
+
e.tooltipDisabled = p ? l < p - o * 2 : !0;
|
|
1355
1362
|
}
|
|
1356
|
-
const
|
|
1357
|
-
|
|
1363
|
+
const c = e.tooltipVm;
|
|
1364
|
+
c.component && (Object.assign(c.component.props, { content: r, placement: u, ...s }), c.component.update());
|
|
1358
1365
|
}
|
|
1359
1366
|
},
|
|
1360
1367
|
unmounted(e) {
|
|
1361
1368
|
e.tooltipContainer && Z(null, e.tooltipContainer);
|
|
1362
1369
|
}
|
|
1363
1370
|
};
|
|
1364
|
-
function
|
|
1365
|
-
const
|
|
1366
|
-
return
|
|
1371
|
+
function xe(e, n) {
|
|
1372
|
+
const r = document.createElement("canvas").getContext("2d");
|
|
1373
|
+
return r.font = "14px Arial", r.measureText(e).width;
|
|
1367
1374
|
}
|
|
1368
1375
|
const Yt = {
|
|
1369
1376
|
beforeMount(e, n) {
|
|
@@ -1374,24 +1381,24 @@ const Yt = {
|
|
|
1374
1381
|
}, 50));
|
|
1375
1382
|
}
|
|
1376
1383
|
};
|
|
1377
|
-
function
|
|
1384
|
+
function Ce(e, n = 4) {
|
|
1378
1385
|
const t = new RegExp(`(.{${n}})`, "g");
|
|
1379
1386
|
return e.replace(t, "$1 ").trim();
|
|
1380
1387
|
}
|
|
1381
1388
|
const Zt = {
|
|
1382
1389
|
mounted(e, n) {
|
|
1383
|
-
const { value: t } = n, { content:
|
|
1384
|
-
e.textContent =
|
|
1390
|
+
const { value: t } = n, { content: r = "", spaceNum: u = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, i = r.replace(/\s+/g, "");
|
|
1391
|
+
e.textContent = Ce(i, u) || "-";
|
|
1385
1392
|
},
|
|
1386
1393
|
updated(e, n) {
|
|
1387
|
-
const { value: t } = n, { content:
|
|
1388
|
-
e.textContent =
|
|
1394
|
+
const { value: t } = n, { content: r = "", spaceNum: u = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, i = r.replace(/\s+/g, "");
|
|
1395
|
+
e.textContent = Ce(i, u) || "-";
|
|
1389
1396
|
}
|
|
1390
1397
|
}, Gt = {
|
|
1391
1398
|
mounted(e, n) {
|
|
1392
1399
|
typeof n.value == "function" && Ut(e, n.value, { modifiers: n.modifiers });
|
|
1393
1400
|
}
|
|
1394
|
-
},
|
|
1401
|
+
}, Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1395
1402
|
__proto__: null,
|
|
1396
1403
|
col: Xt,
|
|
1397
1404
|
copy: Kt,
|
|
@@ -1403,13 +1410,13 @@ const Zt = {
|
|
|
1403
1410
|
tooltip: Ht
|
|
1404
1411
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1405
1412
|
function Qt(e) {
|
|
1406
|
-
Object.keys(
|
|
1407
|
-
e.component(n,
|
|
1408
|
-
}), Object.keys(
|
|
1409
|
-
e.directive(n,
|
|
1413
|
+
Object.keys(ye).forEach((n) => {
|
|
1414
|
+
e.component(n, ye[n]);
|
|
1415
|
+
}), Object.keys(Se).forEach((n) => {
|
|
1416
|
+
e.directive(n, Se[n]);
|
|
1410
1417
|
});
|
|
1411
1418
|
}
|
|
1412
|
-
const
|
|
1419
|
+
const rn = { install: Qt };
|
|
1413
1420
|
export {
|
|
1414
1421
|
ft as AInputNumberEx,
|
|
1415
1422
|
mt as ARangePickerEx,
|
|
@@ -1423,7 +1430,7 @@ export {
|
|
|
1423
1430
|
pn as buildTree,
|
|
1424
1431
|
Xt as col,
|
|
1425
1432
|
Kt as copy,
|
|
1426
|
-
|
|
1433
|
+
rn as default,
|
|
1427
1434
|
fn as exportFile,
|
|
1428
1435
|
mn as forEachTree,
|
|
1429
1436
|
vn as getButtonPermissions,
|
|
@@ -1443,9 +1450,9 @@ export {
|
|
|
1443
1450
|
En as isDate,
|
|
1444
1451
|
Mn as isDef,
|
|
1445
1452
|
Pn as isElement,
|
|
1446
|
-
|
|
1453
|
+
Nn as isFunction,
|
|
1447
1454
|
An as isImageDom,
|
|
1448
|
-
|
|
1455
|
+
Tn as isNull,
|
|
1449
1456
|
B as isNullOrUndef,
|
|
1450
1457
|
Dn as isNumber,
|
|
1451
1458
|
Ln as isObject,
|
|
@@ -1469,7 +1476,7 @@ export {
|
|
|
1469
1476
|
Zt as space,
|
|
1470
1477
|
Yn as toUserCenterConsole,
|
|
1471
1478
|
Ht as tooltip,
|
|
1472
|
-
|
|
1479
|
+
ue as useConfigProvider,
|
|
1473
1480
|
sn as useFindParent,
|
|
1474
|
-
|
|
1481
|
+
ln as useModal
|
|
1475
1482
|
};
|