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