@witlink/components 1.0.19 → 1.0.20
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 +616 -556
- 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 _e, useAttrs as Le, createBlock as U, mergeProps as I, createSlots as ae, renderList as V, withCtx as M, unref as x, renderSlot as z, normalizeProps as Ce, guardReactiveProps as Ie, createVNode as N, ref as C, getCurrentInstance as Y, render as X, h as W, computed as B, onMounted as xe, onUnmounted as Oe, normalizeClass as We, normalizeStyle as le, isRef as G, withKeys as Fe, withModifiers as ie, Fragment as q, createTextVNode as Q, toDisplayString as te, nextTick as ce, useCssVars as Ue, watch as ke, createCommentVNode as ue, shallowRef as K, shallowReadonly as Ve, toValue as F, getCurrentScope as ze, onScopeDispose as Ke, 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 de 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",
|
|
@@ -11,36 +11,36 @@ const nt = {
|
|
|
11
11
|
width: "1.2em",
|
|
12
12
|
height: "1.2em"
|
|
13
13
|
};
|
|
14
|
-
function ot(e,
|
|
15
|
-
return S(),
|
|
16
|
-
|
|
14
|
+
function ot(e, n) {
|
|
15
|
+
return S(), P("svg", nt, n[0] || (n[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
|
-
function rt(e,
|
|
33
|
-
return S(),
|
|
34
|
-
|
|
32
|
+
function rt(e, n) {
|
|
33
|
+
return S(), P("svg", st, n[0] || (n[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__ */
|
|
60
|
-
setup(e, { emit:
|
|
61
|
-
const
|
|
62
|
-
function s(
|
|
63
|
-
if (
|
|
64
|
-
|
|
59
|
+
emits: /* @__PURE__ */ R(["change"], ["update:value"]),
|
|
60
|
+
setup(e, { emit: n }) {
|
|
61
|
+
const t = H(e, "value"), r = e, i = n, c = _e(), o = Le();
|
|
62
|
+
function s(l) {
|
|
63
|
+
if (j(l))
|
|
64
|
+
t.value = null, i("change", null);
|
|
65
65
|
else {
|
|
66
|
-
let u =
|
|
67
|
-
r.stringMode && (u = Number(u).toFixed(r.precision)),
|
|
66
|
+
let u = l;
|
|
67
|
+
r.stringMode && (u = Number(u).toFixed(r.precision)), t.value !== u && (t.value = u, i("change", u));
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
function d() {
|
|
71
|
-
if (
|
|
71
|
+
if (j(t.value))
|
|
72
72
|
return;
|
|
73
|
-
let
|
|
74
|
-
r.stringMode && (
|
|
73
|
+
let l = t.value;
|
|
74
|
+
r.stringMode && (l = Number(l).toFixed(r.precision)), t.value = l;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function p() {
|
|
77
77
|
if (o.disabled) return;
|
|
78
|
-
const
|
|
79
|
-
!
|
|
78
|
+
const l = Number(t.value);
|
|
79
|
+
!j(o.min) && l <= Number(o.min) || s(l - 1);
|
|
80
80
|
}
|
|
81
81
|
function a() {
|
|
82
82
|
if (o.disabled) return;
|
|
83
|
-
const
|
|
84
|
-
!
|
|
83
|
+
const l = Number(t.value);
|
|
84
|
+
!j(o.max) && l >= Number(o.max) || s(l + 1);
|
|
85
85
|
}
|
|
86
|
-
return (
|
|
87
|
-
const v = lt, g = at, m =
|
|
88
|
-
return S(),
|
|
89
|
-
value:
|
|
86
|
+
return (l, u) => {
|
|
87
|
+
const v = lt, g = at, m = ne;
|
|
88
|
+
return S(), U(m, I({
|
|
89
|
+
value: t.value,
|
|
90
90
|
precision: e.precision,
|
|
91
91
|
stringMode: e.stringMode,
|
|
92
92
|
controls: !e.customControls,
|
|
93
93
|
onChange: s,
|
|
94
94
|
onBlur: d
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
name:
|
|
98
|
-
fn: M((
|
|
99
|
-
|
|
95
|
+
}, l.$attrs), ae({ _: 2 }, [
|
|
96
|
+
V(Object.keys(x(c)), (h) => ({
|
|
97
|
+
name: h,
|
|
98
|
+
fn: M((y) => [
|
|
99
|
+
z(l.$slots, h, Ce(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
119
|
onClick: a
|
|
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: {},
|
|
@@ -155,107 +155,107 @@ const lt = ee({ name: "ant-design-minus", render: rt }), it = /* @__PURE__ */ I(
|
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
emits: ["update:value", "change"],
|
|
158
|
-
setup(e, { emit:
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
162
|
-
return a.isAfter(
|
|
163
|
-
const g =
|
|
164
|
-
return
|
|
158
|
+
setup(e, { emit: n }) {
|
|
159
|
+
const t = e, r = n, i = C(), c = C(), o = (a) => {
|
|
160
|
+
const l = de().add(t.max, t.maxUnit), u = de().subtract(t.min, t.minUnit), v = t.interval;
|
|
161
|
+
if (!i.value || i.value.length === 0)
|
|
162
|
+
return a.isAfter(l) || a.isBefore(u);
|
|
163
|
+
const g = i.value[0] && (a.diff(i.value[0], "days") > v || a.isAfter(l));
|
|
164
|
+
return i.value[1] && (i.value[1].diff(a, "days") > v || a.isBefore(u)) || g;
|
|
165
165
|
}, s = (a) => {
|
|
166
|
-
a ? (
|
|
166
|
+
a ? (i.value = [], c.value = []) : c.value = void 0;
|
|
167
167
|
}, d = (a) => {
|
|
168
168
|
r("update:value", a), r("change", a);
|
|
169
|
-
},
|
|
170
|
-
|
|
169
|
+
}, p = (a) => {
|
|
170
|
+
i.value = a;
|
|
171
171
|
};
|
|
172
|
-
return (a,
|
|
173
|
-
const u =
|
|
174
|
-
return S(),
|
|
175
|
-
value:
|
|
172
|
+
return (a, l) => {
|
|
173
|
+
const u = Ne;
|
|
174
|
+
return S(), U(u, I({
|
|
175
|
+
value: x(c) || e.value,
|
|
176
176
|
"disabled-date": o,
|
|
177
177
|
onChange: d,
|
|
178
178
|
onOpenChange: s,
|
|
179
|
-
onCalendarChange:
|
|
180
|
-
}, a.$attrs),
|
|
181
|
-
|
|
179
|
+
onCalendarChange: p
|
|
180
|
+
}, a.$attrs), ae({ _: 2 }, [
|
|
181
|
+
V(Object.keys(a.$slots), (v) => ({
|
|
182
182
|
name: v,
|
|
183
183
|
fn: M((g) => [
|
|
184
|
-
|
|
184
|
+
z(a.$slots, v)
|
|
185
185
|
])
|
|
186
186
|
}))
|
|
187
187
|
]), 1040, ["value"]);
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
|
-
function
|
|
192
|
-
e || (e =
|
|
193
|
-
const
|
|
191
|
+
function se(e) {
|
|
192
|
+
e || (e = Y());
|
|
193
|
+
const n = (e == null ? void 0 : e.provides) || {}, t = ut(n, "configProvider"), r = n[t];
|
|
194
194
|
return Object.fromEntries(
|
|
195
|
-
Object.entries(r).map(([c, o]) => [c,
|
|
195
|
+
Object.entries(r).map(([c, o]) => [c, x(o)])
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
|
-
function ut(e,
|
|
198
|
+
function ut(e, n) {
|
|
199
199
|
for (; e; ) {
|
|
200
|
-
const
|
|
201
|
-
(r) => r ===
|
|
200
|
+
const t = Reflect.ownKeys(e).find(
|
|
201
|
+
(r) => r === n || typeof r == "symbol" && r.description === n
|
|
202
202
|
);
|
|
203
|
-
if (
|
|
204
|
-
return
|
|
203
|
+
if (t)
|
|
204
|
+
return t;
|
|
205
205
|
e = Object.getPrototypeOf(e);
|
|
206
206
|
}
|
|
207
207
|
return null;
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
var
|
|
211
|
-
let
|
|
212
|
-
for (;
|
|
213
|
-
if (
|
|
214
|
-
return
|
|
215
|
-
|
|
209
|
+
function Yt(e) {
|
|
210
|
+
var t;
|
|
211
|
+
let n = (t = Y()) == null ? void 0 : t.parent;
|
|
212
|
+
for (; n; ) {
|
|
213
|
+
if (n.type.name === e)
|
|
214
|
+
return n;
|
|
215
|
+
n = n.parent;
|
|
216
216
|
}
|
|
217
217
|
return null;
|
|
218
218
|
}
|
|
219
|
-
let
|
|
220
|
-
|
|
221
|
-
const e =
|
|
222
|
-
if (
|
|
223
|
-
const
|
|
224
|
-
Object.assign(
|
|
219
|
+
let L, pe, D, fe;
|
|
220
|
+
A.destroy = function() {
|
|
221
|
+
const e = A.instanceArr || [], n = e.pop();
|
|
222
|
+
if (n && X(null, n.container), e.length > 0) {
|
|
223
|
+
const t = e[e.length - 1].instance;
|
|
224
|
+
Object.assign(t.component.props, {
|
|
225
225
|
contentWrapperStyle: { transform: null }
|
|
226
|
-
}),
|
|
226
|
+
}), t.component.update();
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
|
-
|
|
230
|
-
(
|
|
231
|
-
X(null,
|
|
232
|
-
}),
|
|
229
|
+
A.destroyAll = function() {
|
|
230
|
+
(A.instanceArr || []).forEach((n) => {
|
|
231
|
+
X(null, n.container);
|
|
232
|
+
}), A.instanceArr = [];
|
|
233
233
|
};
|
|
234
|
-
function
|
|
235
|
-
var a,
|
|
236
|
-
const e =
|
|
237
|
-
if (!
|
|
238
|
-
const u =
|
|
239
|
-
|
|
234
|
+
function Qt() {
|
|
235
|
+
var a, l;
|
|
236
|
+
const e = Y();
|
|
237
|
+
if (!D) {
|
|
238
|
+
const u = He.useApp();
|
|
239
|
+
D = u.modal, pe = u.message, fe = u.notification;
|
|
240
240
|
}
|
|
241
|
-
|
|
242
|
-
const
|
|
241
|
+
D.info || (D = Ze);
|
|
242
|
+
const n = {
|
|
243
243
|
zh: "关闭",
|
|
244
244
|
en: "Close",
|
|
245
245
|
fr: "fermeture"
|
|
246
|
-
},
|
|
246
|
+
}, t = {
|
|
247
247
|
zh: "请输入",
|
|
248
248
|
en: "Please Enter",
|
|
249
249
|
fr: "Veuillez entrer"
|
|
250
|
-
}, r =
|
|
250
|
+
}, r = se(), i = ((l = (a = r == null ? void 0 : r.locale) == null ? void 0 : a.locale) == null ? void 0 : l.slice(0, 2)) || "en";
|
|
251
251
|
function c({ title: u, ...v }) {
|
|
252
252
|
const g = C();
|
|
253
253
|
return o({
|
|
254
254
|
title: u,
|
|
255
255
|
...v,
|
|
256
|
-
comp:
|
|
256
|
+
comp: Qe,
|
|
257
257
|
props: {
|
|
258
|
-
placeholder:
|
|
258
|
+
placeholder: t[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
273
|
function o({ title: u, comp: v, props: g, ...m }) {
|
|
274
|
-
const
|
|
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
301
|
function s() {
|
|
302
|
-
|
|
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
|
-
|
|
335
|
+
n[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: pe,
|
|
374
|
+
modal: D,
|
|
375
|
+
notification: fe,
|
|
376
376
|
modalInput: c,
|
|
377
377
|
modalComp: o,
|
|
378
378
|
modalDestroy: s,
|
|
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: {
|
|
@@ -393,75 +393,75 @@ const dt = /* @__PURE__ */ I({
|
|
|
393
393
|
default: !0
|
|
394
394
|
}
|
|
395
395
|
},
|
|
396
|
-
setup(e, { expose:
|
|
397
|
-
const
|
|
396
|
+
setup(e, { expose: n }) {
|
|
397
|
+
const t = e, r = _e(), i = C([]), c = C(!1), o = C(0), s = C(1), d = C(10), p = C(), a = C(), l = {
|
|
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 =
|
|
401
|
+
}, u = se(), 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
405
|
total: o.value,
|
|
406
406
|
current: s.value,
|
|
407
407
|
pageSize: d.value,
|
|
408
408
|
showSizeChanger: !0,
|
|
409
409
|
size: "small",
|
|
410
|
-
showTotal: (_) =>
|
|
410
|
+
showTotal: (_) => l[v.value].replace("{num}", _)
|
|
411
411
|
}));
|
|
412
412
|
function m() {
|
|
413
413
|
var _;
|
|
414
|
-
if (typeof
|
|
414
|
+
if (typeof t.loadData == "function") {
|
|
415
415
|
c.value = !0;
|
|
416
416
|
const w = { pageNo: s.value, pageSize: d.value };
|
|
417
|
-
|
|
418
|
-
c.value = !1, (
|
|
417
|
+
t.formatSortParams && ((_ = a.value) != null && _.orderMap) && (w[a.value.field + "SortField"] = a.value.orderMap), t.loadData(w, p.value, a.value).then((k) => {
|
|
418
|
+
c.value = !1, (k == null ? void 0 : k.code) === 0 && (o.value = k.result.totalCount, i.value = k.result.data);
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
if (s.value = _.current, d.value = _.pageSize,
|
|
424
|
-
const
|
|
422
|
+
function h(_, w, k) {
|
|
423
|
+
if (s.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
|
-
a.value =
|
|
430
|
+
a.value = k, m();
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function y(_, w) {
|
|
433
433
|
w.width = _;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function f() {
|
|
436
436
|
s.value = 1, m();
|
|
437
437
|
}
|
|
438
438
|
function b() {
|
|
439
|
-
s.value = 1, o.value = 0,
|
|
439
|
+
s.value = 1, o.value = 0, i.value = [];
|
|
440
440
|
}
|
|
441
|
-
return
|
|
441
|
+
return n({
|
|
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
|
-
|
|
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
|
+
V(Object.keys(x(r)), (T) => ({
|
|
456
|
+
name: T,
|
|
457
|
+
fn: M((E) => [
|
|
458
|
+
T !== "emptyText" ? z(_.$slots, T, Ce(I({ key: 0 }, E))) : z(_.$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
|
|
482
|
-
function s(
|
|
483
|
-
|
|
481
|
+
const n = e, t = C(), r = C(), i = C({}), c = C({}), o = C(0.2);
|
|
482
|
+
function s(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 = t.value;
|
|
487
|
+
if (!p)
|
|
488
488
|
return;
|
|
489
|
-
const a =
|
|
489
|
+
const a = p.clientWidth, l = p.getBoundingClientRect(), u = l.left;
|
|
490
490
|
function v(m) {
|
|
491
|
-
m.preventDefault(), (m.clientX <
|
|
492
|
-
const
|
|
493
|
-
|
|
491
|
+
m.preventDefault(), (m.clientX < l.left || m.clientX > l.right || m.clientY < l.top || m.clientY > l.bottom) && g();
|
|
492
|
+
const y = (m.clientX - u) / a;
|
|
493
|
+
y > n.leftMin && y < n.leftMax && (o.value = y, s(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
|
|
500
|
+
return xe(() => {
|
|
501
501
|
s(o.value), r.value && r.value.addEventListener("mousedown", d, !1);
|
|
502
502
|
}), Oe(() => {
|
|
503
503
|
r.value && r.value.removeEventListener("mousedown", d);
|
|
504
|
-
}), (
|
|
504
|
+
}), (p, a) => (S(), P("div", {
|
|
505
505
|
ref_key: "container",
|
|
506
|
-
ref:
|
|
507
|
-
class:
|
|
506
|
+
ref: t,
|
|
507
|
+
class: We(["wl-splitter", { bordered: e.bordered }])
|
|
508
508
|
}, [
|
|
509
|
-
|
|
509
|
+
$("div", {
|
|
510
510
|
class: "my-left",
|
|
511
|
-
style:
|
|
511
|
+
style: le(x(i))
|
|
512
512
|
}, [
|
|
513
|
-
|
|
513
|
+
z(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: le(x(c))
|
|
524
524
|
}, [
|
|
525
|
-
|
|
525
|
+
z(p.$slots, "right")
|
|
526
526
|
], 4)
|
|
527
527
|
], 2));
|
|
528
528
|
}
|
|
@@ -534,21 +534,21 @@ const dt = /* @__PURE__ */ I({
|
|
|
534
534
|
fill: "none",
|
|
535
535
|
xmlns: "http://www.w3.org/2000/svg"
|
|
536
536
|
};
|
|
537
|
-
function mt(e,
|
|
538
|
-
return S(),
|
|
539
|
-
|
|
537
|
+
function mt(e, n) {
|
|
538
|
+
return S(), P("svg", ft, n[0] || (n[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__ */
|
|
584
|
-
setup(e, { emit:
|
|
585
|
-
const
|
|
586
|
-
function
|
|
583
|
+
emits: /* @__PURE__ */ R(["enter"], ["update:value"]),
|
|
584
|
+
setup(e, { emit: n }) {
|
|
585
|
+
const t = e, r = n, i = C(), c = C(), o = C(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), s = H(e, "value"), d = C(!1);
|
|
586
|
+
function p() {
|
|
587
587
|
d.value = !0;
|
|
588
588
|
}
|
|
589
589
|
function a() {
|
|
590
590
|
m();
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
c.value.focus(), s.value = Number(
|
|
592
|
+
function l(h) {
|
|
593
|
+
c.value.focus(), s.value = Number(h).toFixed(t.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(s.value) || s.value === "") {
|
|
597
|
+
if (["00", "."].includes(h))
|
|
598
598
|
return;
|
|
599
|
-
s.value =
|
|
599
|
+
s.value = h;
|
|
600
600
|
} else {
|
|
601
|
-
const
|
|
602
|
-
s.value = `${
|
|
603
|
-
const w = b +
|
|
604
|
-
|
|
601
|
+
const y = String(s.value), f = i.value.getElementsByTagName("input")[0], b = f.selectionStart || 0, _ = f.selectionEnd || 0;
|
|
602
|
+
s.value = `${y.slice(0, b)}${h}${y.slice(_)}`;
|
|
603
|
+
const w = b + h.length;
|
|
604
|
+
ce(() => {
|
|
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(s.value))
|
|
611
611
|
return;
|
|
612
|
-
const
|
|
613
|
-
if (
|
|
614
|
-
const
|
|
615
|
-
|
|
612
|
+
const h = String(s.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 ? s.value = h.slice(0, _) + h.slice(b) : s.value = h.slice(0, f) + h.slice(b), ce(() => {
|
|
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 = t.min, y = t.max;
|
|
625
|
+
let f = parseFloat(s.value || "0");
|
|
626
|
+
j(h) || (f = f > h ? f : h), j(y) || (f = f > y ? y : f), s.value = Number(f).toFixed(t.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] = ie(() => {
|
|
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, V(e.quickNums, (E) => (S(), U(f, {
|
|
655
655
|
class: "btn-num",
|
|
656
|
-
key:
|
|
657
|
-
onClick: (
|
|
656
|
+
key: E,
|
|
657
|
+
onClick: (Z) => l(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, V(x(o), (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: ie(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
713
|
value: s.value,
|
|
714
|
-
"onUpdate:value":
|
|
715
|
-
},
|
|
716
|
-
onFocus:
|
|
714
|
+
"onUpdate:value": y[1] || (y[1] = (E) => s.value = E)
|
|
715
|
+
}, h.$attrs, {
|
|
716
|
+
onFocus: p,
|
|
717
717
|
onBlur: a,
|
|
718
|
-
onKeyup:
|
|
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__ */
|
|
754
|
-
setup(e, { emit:
|
|
755
|
-
|
|
756
|
-
"6aa59d12":
|
|
757
|
-
"191f412b":
|
|
758
|
-
"191f44ec":
|
|
753
|
+
emits: /* @__PURE__ */ R(["change"], ["update:value"]),
|
|
754
|
+
setup(e, { emit: n }) {
|
|
755
|
+
Ue((a) => ({
|
|
756
|
+
"6aa59d12": x(o),
|
|
757
|
+
"191f412b": x(s),
|
|
758
|
+
"191f44ec": x(d)
|
|
759
759
|
}));
|
|
760
|
-
const
|
|
761
|
-
const a = {},
|
|
760
|
+
const t = e, r = H(e, "value"), i = n, c = B(() => {
|
|
761
|
+
const a = {}, l = Array.from(t.flagStops), u = t.min || 0, v = t.max || 100, g = [u, ...r.value, v];
|
|
762
762
|
for (let m = 0; m < g.length; m++) {
|
|
763
|
-
const
|
|
764
|
-
if (a[
|
|
765
|
-
const
|
|
766
|
-
a[b] = { style: { top: "-28px" }, label:
|
|
763
|
+
const h = g[m];
|
|
764
|
+
if (a[h] = h, m > 0) {
|
|
765
|
+
const y = l.shift(), f = g[m - 1], b = f + (h - f) / 2;
|
|
766
|
+
a[b] = { style: { top: "-28px" }, label: y };
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
return a;
|
|
770
|
-
}), o =
|
|
771
|
-
const a = r.value,
|
|
772
|
-
return `linear-gradient(90deg, ${m} 0%, ${m} ${v}%, ${
|
|
773
|
-
}), s =
|
|
774
|
-
function
|
|
775
|
-
const
|
|
776
|
-
a[0] <=
|
|
770
|
+
}), o = B(() => {
|
|
771
|
+
const a = r.value, l = t.min || 0, u = t.max || 100, v = Math.floor((a[0] - l) / (u - l) * 100), g = t.colorStops, m = g[0], h = g[g.length - 1];
|
|
772
|
+
return `linear-gradient(90deg, ${m} 0%, ${m} ${v}%, ${h} ${v}%, ${h} 100%)`;
|
|
773
|
+
}), s = B(() => t.colorStops[1]), d = B(() => t.colorStops[2]);
|
|
774
|
+
function p(a) {
|
|
775
|
+
const l = t.min || 0, u = t.max || 100;
|
|
776
|
+
a[0] <= l ? a[0] = l + 1 : a.at(-1) >= u && (a[a.length - 1] = u - 1), a.length === new Set(a).size && (r.value = a, i("change", a));
|
|
777
777
|
}
|
|
778
|
-
return (a,
|
|
779
|
-
const u =
|
|
780
|
-
return S(),
|
|
778
|
+
return (a, l) => {
|
|
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:
|
|
786
|
+
marks: x(c),
|
|
787
|
+
onChange: p
|
|
788
788
|
}, a.$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,110 +804,169 @@ 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
|
|
807
|
+
const n = Se.useInjectFormItemContext(), t = e, r = H(e, "value"), i = C(["", "", "", ""]), c = C(), o = C(""), s = C(), d = (l) => {
|
|
808
808
|
var v, g;
|
|
809
|
-
const u =
|
|
809
|
+
const u = i.value[l];
|
|
810
810
|
if (u && (!/^\d+$/.test(u) || parseInt(u) > 255)) {
|
|
811
|
-
|
|
811
|
+
i.value[l] = "";
|
|
812
812
|
return;
|
|
813
813
|
}
|
|
814
|
-
parseInt(u) >= 100 && (
|
|
815
|
-
},
|
|
814
|
+
parseInt(u) >= 100 && (l < 3 ? (v = c.value) != null && v.length && c.value[l + 1].focus() : t.hasPort && ((g = s.value) == null || g.focus())), r.value = `${i.value.join(".")}${t.hasPort ? ":" + o.value : ""}`, n.clearValidate();
|
|
815
|
+
}, p = (l, u) => {
|
|
816
816
|
var v, g;
|
|
817
|
-
u.key === " " &&
|
|
817
|
+
u.key === " " && l < 3 && (u.preventDefault(), (v = c.value) != null && v.length && c.value[l + 1].focus()), u.key === "Backspace" && i.value[l] === "" && l > 0 && (g = c.value) != null && g.length && c.value[l - 1].focus();
|
|
818
818
|
};
|
|
819
819
|
function a() {
|
|
820
|
-
r.value = `${
|
|
820
|
+
r.value = `${i.value.join(".")}${t.hasPort ? ":" + (o.value || "") : ""}`, n.clearValidate();
|
|
821
821
|
}
|
|
822
822
|
return ke(
|
|
823
823
|
() => r.value,
|
|
824
|
-
(
|
|
825
|
-
if (
|
|
826
|
-
let u =
|
|
827
|
-
if (
|
|
828
|
-
const g =
|
|
824
|
+
(l) => {
|
|
825
|
+
if (l) {
|
|
826
|
+
let u = l;
|
|
827
|
+
if (t.hasPort) {
|
|
828
|
+
const g = l.split(":");
|
|
829
829
|
o.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 = ["", "", "", ""], o.value = "";
|
|
835
835
|
},
|
|
836
836
|
{ immediate: !0 }
|
|
837
|
-
), (
|
|
838
|
-
const v =
|
|
839
|
-
return S(),
|
|
840
|
-
|
|
841
|
-
(S(!0),
|
|
842
|
-
|
|
837
|
+
), (l, u) => {
|
|
838
|
+
const v = ne;
|
|
839
|
+
return S(), P("div", _t, [
|
|
840
|
+
$("div", Ct, [
|
|
841
|
+
(S(!0), P(q, null, V(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, ".")) : ue("", !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
863
|
ref: s,
|
|
864
864
|
class: "ip-port",
|
|
865
|
-
value:
|
|
866
|
-
"onUpdate:value": u[0] || (u[0] = (g) =>
|
|
865
|
+
value: x(o),
|
|
866
|
+
"onUpdate:value": u[0] || (u[0] = (g) => G(o) ? o.value = g : null),
|
|
867
867
|
min: 0,
|
|
868
868
|
max: 65535,
|
|
869
869
|
precision: 0,
|
|
870
870
|
controls: !1,
|
|
871
871
|
onChange: a
|
|
872
872
|
}, null, 8, ["value"])
|
|
873
|
-
], 64)) :
|
|
873
|
+
], 64)) : ue("", !0)
|
|
874
|
+
]);
|
|
875
|
+
};
|
|
876
|
+
}
|
|
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(["enter"], ["update:value"]),
|
|
903
|
+
setup(e, { emit: n }) {
|
|
904
|
+
const t = e, r = H(e, "value"), i = Se.useInjectFormItemContext(), c = B(() => {
|
|
905
|
+
const a = r.value[1];
|
|
906
|
+
return j(a) ? t.max : a;
|
|
907
|
+
}), o = B(() => {
|
|
908
|
+
const a = r.value[0];
|
|
909
|
+
return j(a) ? t.min : a;
|
|
910
|
+
}), s = C(), d = C();
|
|
911
|
+
function p() {
|
|
912
|
+
r.value = [s.value, d.value], i.onFieldChange();
|
|
913
|
+
}
|
|
914
|
+
return (a, l) => {
|
|
915
|
+
const u = ne;
|
|
916
|
+
return S(), P("div", St, [
|
|
917
|
+
N(u, I({
|
|
918
|
+
min: t.min,
|
|
919
|
+
max: x(c),
|
|
920
|
+
value: x(s),
|
|
921
|
+
"onUpdate:value": l[0] || (l[0] = (v) => G(s) ? s.value = v : null),
|
|
922
|
+
placeholder: e.placeholder[0] || ""
|
|
923
|
+
}, a.$attrs, { onChange: p }), null, 16, ["min", "max", "value", "placeholder"]),
|
|
924
|
+
$("span", wt, te(e.separator), 1),
|
|
925
|
+
N(u, I({
|
|
926
|
+
min: x(o),
|
|
927
|
+
max: t.max,
|
|
928
|
+
value: x(d),
|
|
929
|
+
"onUpdate:value": l[1] || (l[1] = (v) => G(d) ? d.value = v : null),
|
|
930
|
+
placeholder: e.placeholder[1] || ""
|
|
931
|
+
}, a.$attrs, { onChange: p }), null, 16, ["min", "max", "value", "placeholder"])
|
|
874
932
|
]);
|
|
875
933
|
};
|
|
876
934
|
}
|
|
877
|
-
}),
|
|
935
|
+
}), me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
878
936
|
__proto__: null,
|
|
879
937
|
AInputNumberEx: it,
|
|
880
938
|
ARangePickerEx: ct,
|
|
881
939
|
ATableEx: dt,
|
|
940
|
+
WlInputNumberRange: $t,
|
|
882
941
|
WlIpInput: kt,
|
|
883
|
-
WlNumberKeyboard:
|
|
942
|
+
WlNumberKeyboard: yt,
|
|
884
943
|
WlRateSlider: bt,
|
|
885
944
|
WlSplitter: pt
|
|
886
945
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
887
|
-
function
|
|
888
|
-
return ze() ? (
|
|
946
|
+
function we(e) {
|
|
947
|
+
return ze() ? (Ke(e), !0) : !1;
|
|
889
948
|
}
|
|
890
|
-
const
|
|
949
|
+
const re = typeof window < "u" && typeof document < "u";
|
|
891
950
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
892
|
-
const
|
|
893
|
-
function
|
|
894
|
-
let
|
|
895
|
-
function
|
|
896
|
-
return
|
|
951
|
+
const Et = Object.prototype.toString, Mt = (e) => Et.call(e) === "[object Object]";
|
|
952
|
+
function Nt(e) {
|
|
953
|
+
let n;
|
|
954
|
+
function t() {
|
|
955
|
+
return n || (n = e()), n;
|
|
897
956
|
}
|
|
898
|
-
return
|
|
899
|
-
const r =
|
|
900
|
-
|
|
901
|
-
},
|
|
957
|
+
return t.reset = async () => {
|
|
958
|
+
const r = n;
|
|
959
|
+
n = void 0, r && await r;
|
|
960
|
+
}, t;
|
|
902
961
|
}
|
|
903
|
-
function
|
|
962
|
+
function J(e) {
|
|
904
963
|
return Array.isArray(e) ? e : [e];
|
|
905
964
|
}
|
|
906
|
-
function
|
|
965
|
+
function Pt(e, n, t = {}) {
|
|
907
966
|
const {
|
|
908
967
|
immediate: r = !0,
|
|
909
|
-
immediateCallback:
|
|
910
|
-
} =
|
|
968
|
+
immediateCallback: i = !1
|
|
969
|
+
} = t, c = K(!1);
|
|
911
970
|
let o = null;
|
|
912
971
|
function s() {
|
|
913
972
|
o && (clearTimeout(o), o = null);
|
|
@@ -915,89 +974,89 @@ function Et(e, t, n = {}) {
|
|
|
915
974
|
function d() {
|
|
916
975
|
c.value = !1, s();
|
|
917
976
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
977
|
+
function p(...a) {
|
|
978
|
+
i && e(), s(), c.value = !0, o = setTimeout(() => {
|
|
920
979
|
c.value = !1, o = null, e(...a);
|
|
921
|
-
},
|
|
980
|
+
}, F(n));
|
|
922
981
|
}
|
|
923
|
-
return r && (c.value = !0,
|
|
924
|
-
isPending:
|
|
925
|
-
start:
|
|
982
|
+
return r && (c.value = !0, re && p()), we(d), {
|
|
983
|
+
isPending: Ve(c),
|
|
984
|
+
start: p,
|
|
926
985
|
stop: d
|
|
927
986
|
};
|
|
928
987
|
}
|
|
929
|
-
function
|
|
988
|
+
function At(e, n, t) {
|
|
930
989
|
return ke(
|
|
931
990
|
e,
|
|
932
|
-
|
|
991
|
+
n,
|
|
933
992
|
{
|
|
934
|
-
...
|
|
993
|
+
...t,
|
|
935
994
|
immediate: !0
|
|
936
995
|
}
|
|
937
996
|
);
|
|
938
997
|
}
|
|
939
|
-
const
|
|
940
|
-
function
|
|
941
|
-
var
|
|
942
|
-
const
|
|
943
|
-
return (
|
|
998
|
+
const Bt = re ? window : void 0, $e = re ? window.navigator : void 0;
|
|
999
|
+
function Tt(e) {
|
|
1000
|
+
var n;
|
|
1001
|
+
const t = F(e);
|
|
1002
|
+
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
944
1003
|
}
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
|
|
948
|
-
}, r = (s, d,
|
|
949
|
-
const s =
|
|
1004
|
+
function Ee(...e) {
|
|
1005
|
+
const n = [], t = () => {
|
|
1006
|
+
n.forEach((s) => s()), n.length = 0;
|
|
1007
|
+
}, r = (s, d, p, a) => (s.addEventListener(d, p, a), () => s.removeEventListener(d, p, a)), i = B(() => {
|
|
1008
|
+
const s = J(F(e[0])).filter((d) => d != null);
|
|
950
1009
|
return s.every((d) => typeof d != "string") ? s : void 0;
|
|
951
|
-
}), c =
|
|
1010
|
+
}), c = At(
|
|
952
1011
|
() => {
|
|
953
1012
|
var s, d;
|
|
954
1013
|
return [
|
|
955
|
-
(d = (s =
|
|
956
|
-
|
|
957
|
-
|
|
1014
|
+
(d = (s = i.value) == null ? void 0 : s.map((p) => Tt(p))) != null ? d : [Bt].filter((p) => p != null),
|
|
1015
|
+
J(F(i.value ? e[1] : e[0])),
|
|
1016
|
+
J(x(i.value ? e[2] : e[1])),
|
|
958
1017
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
959
|
-
|
|
1018
|
+
F(i.value ? e[3] : e[2])
|
|
960
1019
|
];
|
|
961
1020
|
},
|
|
962
|
-
([s, d,
|
|
963
|
-
if (
|
|
1021
|
+
([s, d, p, a]) => {
|
|
1022
|
+
if (t(), !(s != null && s.length) || !(d != null && d.length) || !(p != null && p.length))
|
|
964
1023
|
return;
|
|
965
|
-
const
|
|
966
|
-
|
|
1024
|
+
const l = Mt(a) ? { ...a } : a;
|
|
1025
|
+
n.push(
|
|
967
1026
|
...s.flatMap(
|
|
968
1027
|
(u) => d.flatMap(
|
|
969
|
-
(v) =>
|
|
1028
|
+
(v) => p.map((g) => r(u, v, g, l))
|
|
970
1029
|
)
|
|
971
1030
|
)
|
|
972
1031
|
);
|
|
973
1032
|
},
|
|
974
1033
|
{ flush: "post" }
|
|
975
1034
|
), o = () => {
|
|
976
|
-
c(),
|
|
1035
|
+
c(), t();
|
|
977
1036
|
};
|
|
978
|
-
return
|
|
1037
|
+
return we(t), o;
|
|
979
1038
|
}
|
|
980
|
-
function
|
|
981
|
-
const e = K(!1),
|
|
982
|
-
return
|
|
1039
|
+
function jt() {
|
|
1040
|
+
const e = K(!1), n = Y();
|
|
1041
|
+
return n && xe(() => {
|
|
983
1042
|
e.value = !0;
|
|
984
|
-
},
|
|
1043
|
+
}, n), e;
|
|
985
1044
|
}
|
|
986
|
-
function
|
|
987
|
-
const
|
|
988
|
-
return
|
|
1045
|
+
function Me(e) {
|
|
1046
|
+
const n = jt();
|
|
1047
|
+
return B(() => (n.value, !!e()));
|
|
989
1048
|
}
|
|
990
|
-
function
|
|
1049
|
+
function ve(e, n = {}) {
|
|
991
1050
|
const {
|
|
992
|
-
controls:
|
|
993
|
-
navigator: r =
|
|
994
|
-
} =
|
|
995
|
-
var a,
|
|
996
|
-
s.value = (
|
|
1051
|
+
controls: t = !1,
|
|
1052
|
+
navigator: r = $e
|
|
1053
|
+
} = n, i = Me(() => r && "permissions" in r), c = K(), o = typeof e == "string" ? { name: e } : e, s = K(), d = () => {
|
|
1054
|
+
var a, l;
|
|
1055
|
+
s.value = (l = (a = c.value) == null ? void 0 : a.state) != null ? l : "prompt";
|
|
997
1056
|
};
|
|
998
|
-
|
|
999
|
-
const
|
|
1000
|
-
if (
|
|
1057
|
+
Ee(c, "change", d, { passive: !0 });
|
|
1058
|
+
const p = Nt(async () => {
|
|
1059
|
+
if (i.value) {
|
|
1001
1060
|
if (!c.value)
|
|
1002
1061
|
try {
|
|
1003
1062
|
c.value = await r.permissions.query(o);
|
|
@@ -1006,88 +1065,88 @@ function fe(e, t = {}) {
|
|
|
1006
1065
|
} finally {
|
|
1007
1066
|
d();
|
|
1008
1067
|
}
|
|
1009
|
-
if (
|
|
1010
|
-
return
|
|
1068
|
+
if (t)
|
|
1069
|
+
return qe(c.value);
|
|
1011
1070
|
}
|
|
1012
1071
|
});
|
|
1013
|
-
return
|
|
1072
|
+
return p(), t ? {
|
|
1014
1073
|
state: s,
|
|
1015
|
-
isSupported:
|
|
1016
|
-
query:
|
|
1074
|
+
isSupported: i,
|
|
1075
|
+
query: p
|
|
1017
1076
|
} : s;
|
|
1018
1077
|
}
|
|
1019
|
-
function
|
|
1078
|
+
function Dt(e = {}) {
|
|
1020
1079
|
const {
|
|
1021
|
-
navigator:
|
|
1022
|
-
read:
|
|
1080
|
+
navigator: n = $e,
|
|
1081
|
+
read: t = !1,
|
|
1023
1082
|
source: r,
|
|
1024
|
-
copiedDuring:
|
|
1083
|
+
copiedDuring: i = 1500,
|
|
1025
1084
|
legacy: c = !1
|
|
1026
|
-
} = e, o =
|
|
1085
|
+
} = e, o = Me(() => n && "clipboard" in n), s = ve("clipboard-read"), d = ve("clipboard-write"), p = B(() => o.value || c), a = K(""), l = K(!1), u = Pt(() => l.value = !1, i, { immediate: !1 });
|
|
1027
1086
|
async function v() {
|
|
1028
|
-
let
|
|
1029
|
-
if (!
|
|
1087
|
+
let f = !(o.value && y(s.value));
|
|
1088
|
+
if (!f)
|
|
1030
1089
|
try {
|
|
1031
|
-
a.value = await
|
|
1090
|
+
a.value = await n.clipboard.readText();
|
|
1032
1091
|
} catch {
|
|
1033
|
-
|
|
1092
|
+
f = !0;
|
|
1034
1093
|
}
|
|
1035
|
-
|
|
1094
|
+
f && (a.value = h());
|
|
1036
1095
|
}
|
|
1037
|
-
|
|
1038
|
-
async function g(
|
|
1039
|
-
if (
|
|
1040
|
-
let b = !(o.value &&
|
|
1096
|
+
p.value && t && Ee(["copy", "cut"], v, { passive: !0 });
|
|
1097
|
+
async function g(f = F(r)) {
|
|
1098
|
+
if (p.value && f != null) {
|
|
1099
|
+
let b = !(o.value && y(d.value));
|
|
1041
1100
|
if (!b)
|
|
1042
1101
|
try {
|
|
1043
|
-
await
|
|
1102
|
+
await n.clipboard.writeText(f);
|
|
1044
1103
|
} catch {
|
|
1045
1104
|
b = !0;
|
|
1046
1105
|
}
|
|
1047
|
-
b && m(
|
|
1106
|
+
b && m(f), a.value = f, l.value = !0, u.start();
|
|
1048
1107
|
}
|
|
1049
1108
|
}
|
|
1050
|
-
function m(
|
|
1109
|
+
function m(f) {
|
|
1051
1110
|
const b = document.createElement("textarea");
|
|
1052
|
-
b.value =
|
|
1111
|
+
b.value = f ?? "", b.style.position = "absolute", b.style.opacity = "0", document.body.appendChild(b), b.select(), document.execCommand("copy"), b.remove();
|
|
1053
1112
|
}
|
|
1054
|
-
function
|
|
1055
|
-
var
|
|
1056
|
-
return (_ = (b = (
|
|
1113
|
+
function h() {
|
|
1114
|
+
var f, b, _;
|
|
1115
|
+
return (_ = (b = (f = document == null ? void 0 : document.getSelection) == null ? void 0 : f.call(document)) == null ? void 0 : b.toString()) != null ? _ : "";
|
|
1057
1116
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1117
|
+
function y(f) {
|
|
1118
|
+
return f === "granted" || f === "prompt";
|
|
1060
1119
|
}
|
|
1061
1120
|
return {
|
|
1062
|
-
isSupported:
|
|
1121
|
+
isSupported: p,
|
|
1063
1122
|
text: a,
|
|
1064
|
-
copied:
|
|
1123
|
+
copied: l,
|
|
1065
1124
|
copy: g
|
|
1066
1125
|
};
|
|
1067
1126
|
}
|
|
1068
|
-
const
|
|
1069
|
-
let
|
|
1070
|
-
const
|
|
1071
|
-
mounted(e,
|
|
1127
|
+
const Rt = Dt();
|
|
1128
|
+
let ee;
|
|
1129
|
+
const Lt = {
|
|
1130
|
+
mounted(e, n, t) {
|
|
1072
1131
|
var o, s;
|
|
1073
|
-
const r =
|
|
1132
|
+
const r = se(t.ctx), i = ((s = (o = r == null ? void 0 : r.locale) == null ? void 0 : o.locale) == null ? void 0 : s.slice(0, 2)) || "en", c = {
|
|
1074
1133
|
zh: "复制成功",
|
|
1075
1134
|
en: "Copy successfully",
|
|
1076
1135
|
fr: "Copie réussie"
|
|
1077
1136
|
};
|
|
1078
|
-
e.copyValue =
|
|
1079
|
-
|
|
1080
|
-
}, e.addEventListener("click",
|
|
1137
|
+
e.copyValue = n.value, ee = () => {
|
|
1138
|
+
Rt.copy(e.copyValue), Je.success(c[i]);
|
|
1139
|
+
}, e.addEventListener("click", ee);
|
|
1081
1140
|
},
|
|
1082
|
-
updated(e,
|
|
1083
|
-
e.copyValue =
|
|
1141
|
+
updated(e, n) {
|
|
1142
|
+
e.copyValue = n.value;
|
|
1084
1143
|
},
|
|
1085
1144
|
unmounted(e) {
|
|
1086
|
-
e.removeEventListener("click",
|
|
1145
|
+
e.removeEventListener("click", ee);
|
|
1087
1146
|
}
|
|
1088
|
-
},
|
|
1089
|
-
beforeMount(e,
|
|
1090
|
-
const r =
|
|
1147
|
+
}, It = {
|
|
1148
|
+
beforeMount(e, n, t) {
|
|
1149
|
+
const r = n.value, i = {
|
|
1091
1150
|
letterNumber: /^\w*$/,
|
|
1092
1151
|
// 字母和数字
|
|
1093
1152
|
price: /^(\d*|(\d+\.\d{0,2}))$/,
|
|
@@ -1099,7 +1158,7 @@ const Dt = {
|
|
|
1099
1158
|
verify: /^\d{0,6}$/,
|
|
1100
1159
|
idCard: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
|
|
1101
1160
|
//身份证号(15位、18位数字),最后一位是校验位,可能为数字或字符X
|
|
1102
|
-
}, c = r instanceof RegExp ? r :
|
|
1161
|
+
}, c = r instanceof RegExp ? r : n.arg && i[n.arg] ? i[n.arg] : null;
|
|
1103
1162
|
e._handleInput = (o) => {
|
|
1104
1163
|
if (o.isTrusted && !(!o.isComposing && o.inputType === "insertCompositionText" && o.data)) {
|
|
1105
1164
|
const s = c == null ? void 0 : c.test(o.target.value);
|
|
@@ -1120,9 +1179,9 @@ const Dt = {
|
|
|
1120
1179
|
case "insertFromPaste":
|
|
1121
1180
|
//粘贴
|
|
1122
1181
|
case "insertFromDrop":
|
|
1123
|
-
const
|
|
1124
|
-
if (
|
|
1125
|
-
const a =
|
|
1182
|
+
const p = o.dataTransfer || o.clipboardData || null;
|
|
1183
|
+
if (p) {
|
|
1184
|
+
const a = p.getData("text") || "";
|
|
1126
1185
|
o.target.selectionStart = e._start + a.length, o.target.selectionEnd = e._start + a.length;
|
|
1127
1186
|
}
|
|
1128
1187
|
break;
|
|
@@ -1142,49 +1201,49 @@ const Dt = {
|
|
|
1142
1201
|
e._input = s ? o.target.value : "", e._start = o.target.selectionStart, e._end = o.target.selectionEnd;
|
|
1143
1202
|
}, e._handleDrop = (o) => {
|
|
1144
1203
|
o.stopPropagation();
|
|
1145
|
-
},
|
|
1204
|
+
}, t.type === "input" && (e.addEventListener("input", e._handleInput), e.addEventListener("keydown", e._handleKeydown), e.addEventListener("drop", e._handleDrop));
|
|
1146
1205
|
},
|
|
1147
1206
|
unmounted(e) {
|
|
1148
1207
|
e._handleInput && e.removeEventListener("input", e._handleInput), e._handleKeydown && e.removeEventListener("keydown", e._handleKeydown), e._handleDrop && e.removeEventListener("drop", e._handleDrop);
|
|
1149
1208
|
}
|
|
1150
1209
|
};
|
|
1151
|
-
function
|
|
1152
|
-
const r =
|
|
1210
|
+
function ge(e, n, t) {
|
|
1211
|
+
const r = n.value;
|
|
1153
1212
|
if (r) {
|
|
1154
|
-
const
|
|
1155
|
-
e.style.marginLeft = `-${
|
|
1156
|
-
const c =
|
|
1213
|
+
const i = r / 2;
|
|
1214
|
+
e.style.marginLeft = `-${i}px`, e.style.marginRight = `-${i}px`;
|
|
1215
|
+
const c = t.children;
|
|
1157
1216
|
c != null && c.length && c[0].children.forEach((o) => {
|
|
1158
1217
|
if (o.component) {
|
|
1159
1218
|
const s = o.el;
|
|
1160
|
-
s != null && s.style && (s.style.paddingLeft =
|
|
1219
|
+
s != null && s.style && (s.style.paddingLeft = i + "px", s.style.paddingRight = i + "px");
|
|
1161
1220
|
} else Array.isArray(o.children) && o.children.forEach((s) => {
|
|
1162
1221
|
const d = s.el;
|
|
1163
|
-
d != null && d.style && (d.style.paddingLeft =
|
|
1222
|
+
d != null && d.style && (d.style.paddingLeft = i + "px", d.style.paddingRight = i + "px");
|
|
1164
1223
|
});
|
|
1165
1224
|
});
|
|
1166
1225
|
}
|
|
1167
1226
|
}
|
|
1168
|
-
const
|
|
1227
|
+
const Ot = {
|
|
1169
1228
|
beforeMount(e) {
|
|
1170
1229
|
e.classList.add("ant-row"), e.style.display = "flex", e.style.flexWrap = "wrap", e.style.flexDirection = "row", e.style.minWidth = 0;
|
|
1171
1230
|
},
|
|
1172
|
-
mounted(e,
|
|
1173
|
-
|
|
1231
|
+
mounted(e, n, t) {
|
|
1232
|
+
ge(e, n, t);
|
|
1174
1233
|
},
|
|
1175
|
-
updated(e,
|
|
1176
|
-
|
|
1234
|
+
updated(e, n, t, r) {
|
|
1235
|
+
ge(e, n, t);
|
|
1177
1236
|
}
|
|
1178
|
-
},
|
|
1179
|
-
beforeMount(e,
|
|
1180
|
-
e.classList.add("ant-col", `ant-col-${
|
|
1181
|
-
const
|
|
1182
|
-
e.style.position = "relative", e.style.flex = `0 0 ${
|
|
1237
|
+
}, Wt = {
|
|
1238
|
+
beforeMount(e, n) {
|
|
1239
|
+
e.classList.add("ant-col", `ant-col-${n.value}`);
|
|
1240
|
+
const t = n.value / 24 * 100;
|
|
1241
|
+
e.style.position = "relative", e.style.flex = `0 0 ${t}%`, e.style.maxWidth = `${t}%`;
|
|
1183
1242
|
}
|
|
1184
|
-
},
|
|
1185
|
-
mounted(e,
|
|
1186
|
-
const { value: r } =
|
|
1187
|
-
content:
|
|
1243
|
+
}, Ft = {
|
|
1244
|
+
mounted(e, n, t) {
|
|
1245
|
+
const { value: r } = n, {
|
|
1246
|
+
content: i = "",
|
|
1188
1247
|
placement: c = "top",
|
|
1189
1248
|
enabled: o = !0,
|
|
1190
1249
|
padding: s = 8,
|
|
@@ -1193,158 +1252,159 @@ const Lt = {
|
|
|
1193
1252
|
} = typeof r == "string" ? { content: r } : r;
|
|
1194
1253
|
if (e.tooltipDisabled = !1, !o)
|
|
1195
1254
|
e.tooltipDisabled = !0;
|
|
1196
|
-
else if (
|
|
1197
|
-
const v = e.clientWidth, g =
|
|
1255
|
+
else if (n.modifiers.exceed) {
|
|
1256
|
+
const v = e.clientWidth, g = he(i);
|
|
1198
1257
|
e.tooltipDisabled = v ? g < v - s * 2 : !0;
|
|
1199
1258
|
}
|
|
1200
|
-
const
|
|
1259
|
+
const p = C({
|
|
1201
1260
|
top: 0,
|
|
1202
1261
|
left: 0,
|
|
1203
1262
|
bottom: 0,
|
|
1204
1263
|
right: 0
|
|
1205
1264
|
}), a = C({
|
|
1206
|
-
getBoundingClientRect: () =>
|
|
1207
|
-
}),
|
|
1265
|
+
getBoundingClientRect: () => p.value
|
|
1266
|
+
}), l = W(tt, {
|
|
1208
1267
|
visible: !1,
|
|
1209
|
-
content:
|
|
1268
|
+
content: i,
|
|
1210
1269
|
placement: c,
|
|
1211
1270
|
virtualTriggering: !0,
|
|
1212
1271
|
virtualRef: a.value,
|
|
1213
1272
|
popperClass: "vtooltip",
|
|
1214
1273
|
...d
|
|
1215
1274
|
}), u = document.createDocumentFragment();
|
|
1216
|
-
X(
|
|
1217
|
-
|
|
1275
|
+
X(l, u), e.tooltipVm = l, e.tooltipContainer = u, e.addEventListener("mouseenter", () => {
|
|
1276
|
+
p.value = e.getBoundingClientRect(), l.component && !e.tooltipDisabled && (Object.assign(l.component.props, { visible: !0 }), l.component.update());
|
|
1218
1277
|
}), e.addEventListener("mouseleave", () => {
|
|
1219
|
-
|
|
1278
|
+
l.component && (Object.assign(l.component.props, { visible: !1 }), l.component.update());
|
|
1220
1279
|
});
|
|
1221
1280
|
},
|
|
1222
|
-
updated(e,
|
|
1281
|
+
updated(e, n) {
|
|
1223
1282
|
if (e.tooltipVm) {
|
|
1224
|
-
const { value:
|
|
1283
|
+
const { value: t } = n, {
|
|
1225
1284
|
content: r = "",
|
|
1226
|
-
placement:
|
|
1285
|
+
placement: i = "top",
|
|
1227
1286
|
enabled: c = !0,
|
|
1228
1287
|
padding: o = 8,
|
|
1229
1288
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1230
1289
|
...s
|
|
1231
|
-
} = typeof
|
|
1290
|
+
} = typeof t == "string" ? { content: t } : t;
|
|
1232
1291
|
if (e.tooltipDisabled = !1, !c)
|
|
1233
1292
|
e.tooltipDisabled = !0;
|
|
1234
|
-
else if (
|
|
1235
|
-
const
|
|
1236
|
-
e.tooltipDisabled =
|
|
1293
|
+
else if (n.modifiers.exceed) {
|
|
1294
|
+
const p = e.clientWidth, a = he(r);
|
|
1295
|
+
e.tooltipDisabled = p ? a < p - o * 2 : !0;
|
|
1237
1296
|
}
|
|
1238
1297
|
const d = e.tooltipVm;
|
|
1239
|
-
d.component && (Object.assign(d.component.props, { content: r, placement:
|
|
1298
|
+
d.component && (Object.assign(d.component.props, { content: r, placement: i, ...s }), d.component.update());
|
|
1240
1299
|
}
|
|
1241
1300
|
},
|
|
1242
1301
|
unmounted(e) {
|
|
1243
1302
|
e.tooltipContainer && X(null, e.tooltipContainer);
|
|
1244
1303
|
}
|
|
1245
1304
|
};
|
|
1246
|
-
function
|
|
1305
|
+
function he(e, n) {
|
|
1247
1306
|
const r = document.createElement("canvas").getContext("2d");
|
|
1248
1307
|
return r.font = "14px Arial", r.measureText(e).width;
|
|
1249
1308
|
}
|
|
1250
|
-
const
|
|
1251
|
-
beforeMount(e,
|
|
1252
|
-
const { value:
|
|
1253
|
-
|
|
1254
|
-
var
|
|
1255
|
-
(
|
|
1309
|
+
const Ut = {
|
|
1310
|
+
beforeMount(e, n) {
|
|
1311
|
+
const { value: t } = n;
|
|
1312
|
+
t && (Xe(t) || setTimeout(() => {
|
|
1313
|
+
var i;
|
|
1314
|
+
(i = e.parentNode) == null || i.removeChild(e);
|
|
1256
1315
|
}, 50));
|
|
1257
1316
|
}
|
|
1258
1317
|
};
|
|
1259
|
-
function
|
|
1260
|
-
const
|
|
1261
|
-
return e.replace(
|
|
1318
|
+
function ye(e, n = 4) {
|
|
1319
|
+
const t = new RegExp(`(.{${n}})`, "g");
|
|
1320
|
+
return e.replace(t, "$1 ").trim();
|
|
1262
1321
|
}
|
|
1263
|
-
const
|
|
1264
|
-
mounted(e,
|
|
1265
|
-
const { value:
|
|
1266
|
-
e.textContent =
|
|
1322
|
+
const Vt = {
|
|
1323
|
+
mounted(e, n) {
|
|
1324
|
+
const { value: t } = n, { content: r = "", spaceNum: i = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, c = r.replace(/\s+/g, "");
|
|
1325
|
+
e.textContent = ye(c, i) || "-";
|
|
1267
1326
|
},
|
|
1268
|
-
updated(e,
|
|
1269
|
-
const { value:
|
|
1270
|
-
e.textContent =
|
|
1327
|
+
updated(e, n) {
|
|
1328
|
+
const { value: t } = n, { content: r = "", spaceNum: i = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, c = r.replace(/\s+/g, "");
|
|
1329
|
+
e.textContent = ye(c, i) || "-";
|
|
1271
1330
|
}
|
|
1272
|
-
},
|
|
1331
|
+
}, be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1273
1332
|
__proto__: null,
|
|
1274
|
-
col:
|
|
1275
|
-
copy:
|
|
1276
|
-
inputlimit:
|
|
1277
|
-
permission:
|
|
1278
|
-
row:
|
|
1279
|
-
space:
|
|
1280
|
-
tooltip:
|
|
1333
|
+
col: Wt,
|
|
1334
|
+
copy: Lt,
|
|
1335
|
+
inputlimit: It,
|
|
1336
|
+
permission: Ut,
|
|
1337
|
+
row: Ot,
|
|
1338
|
+
space: Vt,
|
|
1339
|
+
tooltip: Ft
|
|
1281
1340
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1282
|
-
function
|
|
1283
|
-
Object.keys(
|
|
1284
|
-
e.component(
|
|
1285
|
-
}), Object.keys(
|
|
1286
|
-
e.directive(
|
|
1341
|
+
function zt(e) {
|
|
1342
|
+
Object.keys(me).forEach((n) => {
|
|
1343
|
+
e.component(n, me[n]);
|
|
1344
|
+
}), Object.keys(be).forEach((n) => {
|
|
1345
|
+
e.directive(n, be[n]);
|
|
1287
1346
|
});
|
|
1288
1347
|
}
|
|
1289
|
-
const
|
|
1348
|
+
const Jt = { install: zt };
|
|
1290
1349
|
export {
|
|
1291
1350
|
it as AInputNumberEx,
|
|
1292
1351
|
ct as ARangePickerEx,
|
|
1293
1352
|
dt as ATableEx,
|
|
1294
|
-
|
|
1353
|
+
nn as UserCenterKey,
|
|
1354
|
+
$t as WlInputNumberRange,
|
|
1295
1355
|
kt as WlIpInput,
|
|
1296
|
-
|
|
1356
|
+
yt as WlNumberKeyboard,
|
|
1297
1357
|
bt as WlRateSlider,
|
|
1298
1358
|
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
|
-
|
|
1359
|
+
on as buildTree,
|
|
1360
|
+
Wt as col,
|
|
1361
|
+
Lt as copy,
|
|
1362
|
+
Jt as default,
|
|
1363
|
+
an as exportFile,
|
|
1364
|
+
sn as forEachTree,
|
|
1365
|
+
rn as getButtonPermissions,
|
|
1366
|
+
ln as getLocale,
|
|
1367
|
+
cn as getMenuInfo,
|
|
1368
|
+
un as getToken,
|
|
1369
|
+
dn as getUserCenterParams,
|
|
1370
|
+
pn as getUserCenterParamsByUrl,
|
|
1371
|
+
fn as getUserInfo,
|
|
1372
|
+
Xe as hasPermission,
|
|
1373
|
+
It as inputlimit,
|
|
1374
|
+
mn as is,
|
|
1375
|
+
vn as isArray,
|
|
1376
|
+
gn as isAsyncFunction,
|
|
1377
|
+
hn as isBoolean,
|
|
1378
|
+
yn as isClient,
|
|
1379
|
+
bn as isDate,
|
|
1380
|
+
_n as isDef,
|
|
1381
|
+
Cn as isElement,
|
|
1382
|
+
xn as isFunction,
|
|
1383
|
+
kn as isImageDom,
|
|
1384
|
+
Sn as isNull,
|
|
1385
|
+
j as isNullOrUndef,
|
|
1386
|
+
wn as isNumber,
|
|
1387
|
+
$n as isObject,
|
|
1388
|
+
En as isPromise,
|
|
1389
|
+
Mn as isServer,
|
|
1390
|
+
Nn as isString,
|
|
1391
|
+
Pn as isUndef,
|
|
1392
|
+
An as isWindow,
|
|
1393
|
+
Bn as logoutToUserCenter,
|
|
1394
|
+
Ut as permission,
|
|
1395
|
+
Tn as removeAll,
|
|
1396
|
+
jn as removeLocale,
|
|
1397
|
+
Dn as removeToken,
|
|
1398
|
+
Ot as row,
|
|
1399
|
+
Rn as setLocale,
|
|
1400
|
+
Ln as setMenuInfo,
|
|
1401
|
+
In as setToken,
|
|
1402
|
+
On as setUserCenterParams,
|
|
1403
|
+
Wn as setUserInfo,
|
|
1404
|
+
Vt as space,
|
|
1405
|
+
Fn as toUserCenterConsole,
|
|
1406
|
+
Ft as tooltip,
|
|
1407
|
+
se as useConfigProvider,
|
|
1408
|
+
Yt as useFindParent,
|
|
1409
|
+
Qt as useModal
|
|
1350
1410
|
};
|