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