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