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