@witlink/components 1.0.0 → 1.0.1

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