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