@gopowerteam/table-render 0.0.151 → 0.0.153

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/es/index.mjs CHANGED
@@ -1,19 +1,19 @@
1
1
  var Oe = Object.defineProperty;
2
2
  var Re = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var M = (e, t, r) => (Re(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { ref as h, getCurrentInstance as K, onMounted as L, onUpdated as Ee, reactive as $e, createVNode as o, Fragment as V, createTextVNode as z, getCurrentScope as qe, onScopeDispose as je, unref as Ye, readonly as fe, computed as R, watchEffect as ze, watch as Pe, h as Le, render as Ae, defineComponent as A, isVNode as De, mergeProps as se, nextTick as re, withDirectives as Be, resolveDirective as Ie } from "vue";
5
- import { Button as j, Tag as We, Dropdown as ne, Message as Ke, Descriptions as Ve, DescriptionsItem as Fe, Divider as Ne, Space as ae, Pagination as Ue, Transfer as He, Table as Ge } from "@arco-design/web-vue";
4
+ import { ref as g, getCurrentInstance as F, onMounted as A, onUpdated as Ee, reactive as je, createVNode as s, Fragment as K, createTextVNode as Y, getCurrentScope as $e, onScopeDispose as Le, unref as qe, readonly as fe, computed as j, watchEffect as Pe, watch as Ye, h as ze, render as Ae, defineComponent as B, isVNode as Be, mergeProps as se, nextTick as re, withDirectives as De, resolveDirective as Ie } from "vue";
5
+ import { Button as q, Tag as Ve, Dropdown as ne, Message as Fe, Descriptions as Ke, DescriptionsItem as We, Divider as He, Space as ae, Pagination as Ne, Transfer as Ue, Table as Ge } from "@arco-design/web-vue";
6
6
  import { useModal as D, onSubmit as Je, ModalProvider as Qe } from "@gopowerteam/modal-render";
7
7
  import * as Xe from "exceljs";
8
- import B from "dayjs";
8
+ import I from "dayjs";
9
9
  import { FormRender as oe } from "@gopowerteam/form-render";
10
- import { TableRenderResolver as xr } from "./resolver.mjs";
10
+ import { TableRenderResolver as Cr } from "./resolver.mjs";
11
11
  function Ze(e, t, r) {
12
12
  const [u, ...a] = t.index ? t.index.split(".").reverse() : [t.key], n = a.reverse().reduce((l, c) => l == null ? void 0 : l[c], e);
13
13
  n[u] = r;
14
14
  }
15
15
  function pe(e) {
16
- const t = h([]), r = (a) => {
16
+ const t = g([]), r = (a) => {
17
17
  const n = e.filter((l) => l.formatter);
18
18
  return n.length > 0 ? a.map((l) => (n.forEach((c) => {
19
19
  c.formatter && Ze(l, c, c.formatter(l));
@@ -31,25 +31,25 @@ function et(e) {
31
31
  }));
32
32
  }
33
33
  function yr(e) {
34
- const t = K(), r = h();
34
+ const t = F(), r = g();
35
35
  function u() {
36
36
  var n, l;
37
37
  const a = (l = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$refs) == null ? void 0 : l[e];
38
38
  a && (r.value = a);
39
39
  }
40
- return L(u), Ee(u), r;
40
+ return A(u), Ee(u), r;
41
41
  }
42
42
  function tt(e) {
43
43
  return (t, r) => e[t](r);
44
44
  }
45
- class W {
45
+ class V {
46
46
  /**
47
47
  * 构造函数
48
48
  * @param index
49
49
  * @param size
50
50
  */
51
51
  constructor(t = 1, r = 10) {
52
- M(this, "data", $e({
52
+ M(this, "data", je({
53
53
  index: 1,
54
54
  size: 10,
55
55
  total: 0
@@ -103,34 +103,34 @@ class W {
103
103
  }
104
104
  }
105
105
  const rt = Symbol.for("RenderColumnType");
106
- function x(e, t, r) {
106
+ function k(e, t, r) {
107
107
  return t.$type = e, t.$disableColumnMode = r == null ? void 0 : r.disableColumnMode, t.$disableViewMode = r == null ? void 0 : r.disableViewMode, t;
108
108
  }
109
- function C(e, t) {
109
+ function S(e, t) {
110
110
  return t.index ? t.index.split(".").reduce((r, u) => r == null ? void 0 : r[u], e) : [t.key].reduce((r, u) => r == null ? void 0 : r[u], e);
111
111
  }
112
- function P(e) {
112
+ function z(e) {
113
113
  return !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
114
114
  }
115
115
  function nt(e) {
116
- return x("button", (r, u, a) => {
117
- const n = D(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (f, i) => typeof f == "function" ? f(r) : f === void 0 ? i : f;
116
+ return k("button", (r, u, a) => {
117
+ const n = D(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (f, d) => typeof f == "function" ? f(r) : f === void 0 ? d : f;
118
118
  async function m(f) {
119
- if (await (f.confirm === !0 ? new Promise((s) => {
119
+ if (await (f.confirm === !0 ? new Promise((o) => {
120
120
  n.confirm({
121
121
  title: "提示信息",
122
122
  content: f.confirmText ?? "您确定要执行该操作?",
123
- onOk: () => s(!0),
124
- onCancel: () => s(!1)
123
+ onOk: () => o(!0),
124
+ onCancel: () => o(!1)
125
125
  });
126
126
  }) : Promise.resolve(!0)) && (f != null && f.onClick)) {
127
- const s = f.onClick(r);
128
- P(s) && f.autoReload !== !1 && s.then(() => {
127
+ const o = f.onClick(r);
128
+ z(o) && f.autoReload !== !1 && o.then(() => {
129
129
  a != null && a.emits && (a == null || a.emits("reload"));
130
- }), !P(s) && f.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
130
+ }), !z(o) && f.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
131
131
  }
132
132
  }
133
- return o(V, null, [l.filter((f) => c(f.visiable, !0)).map((f) => o(j, {
133
+ return s(K, null, [l.filter((f) => c(f.visiable, !0)).map((f) => s(q, {
134
134
  onClick: () => m(f),
135
135
  type: f.type || "text",
136
136
  shape: f.shape,
@@ -178,17 +178,17 @@ function lt(e) {
178
178
  const l = t(Number(n));
179
179
  return e != null && e.thousands ? r(l) : l;
180
180
  };
181
- return x("dict", (n, l) => {
182
- const c = C(n, l);
183
- return o("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? o("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? o("span", null, [e.prefix()]) : void 0, o("span", {
181
+ return k("dict", (n, l) => {
182
+ const c = S(n, l);
183
+ return s("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? s("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? s("span", null, [e.prefix()]) : void 0, s("span", {
184
184
  class: "currency_value"
185
- }, [u(c)]), typeof (e == null ? void 0 : e.suffix) == "string" ? o("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? o("span", null, [e.suffix()]) : void 0]);
185
+ }, [u(c)]), typeof (e == null ? void 0 : e.suffix) == "string" ? s("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? s("span", null, [e.suffix()]) : void 0]);
186
186
  });
187
187
  }
188
188
  var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ct = { exports: {} };
189
189
  (function(e, t) {
190
190
  (function(r, u) {
191
- e.exports = u(B);
191
+ e.exports = u(I);
192
192
  })(ut, function(r) {
193
193
  function u(l) {
194
194
  return l && typeof l == "object" && "default" in l ? l : {
@@ -242,17 +242,17 @@ var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
242
242
  return a.default.locale(n, null, !0), n;
243
243
  });
244
244
  })(ct);
245
- B.locale("zh-cn");
246
- const dt = {
245
+ I.locale("zh-cn");
246
+ const it = {
247
247
  date: "YYYY-MM-DD",
248
248
  datetime: "YYYY-MM-DD HH:mm:ss",
249
249
  time: "HH:mm:ss",
250
250
  week: "ddd"
251
251
  };
252
- function it(e) {
253
- return x("date", (r, u) => {
254
- const a = C(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : dt[(e == null ? void 0 : e.format) || "datetime"], l = B(a);
255
- return o("span", null, [l.isValid() && l.format(n)]);
252
+ function dt(e) {
253
+ return k("date", (r, u) => {
254
+ const a = S(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : it[(e == null ? void 0 : e.format) || "datetime"], l = I(a);
255
+ return s("span", null, [l.isValid() && l.format(n)]);
256
256
  });
257
257
  }
258
258
  const ft = {
@@ -269,13 +269,13 @@ function ot(e) {
269
269
  }
270
270
  function mt(e) {
271
271
  const t = st(e), r = ot(e);
272
- return x("dict", (a, n) => {
273
- const l = C(a, n);
274
- return r ? o(We, {
272
+ return k("dict", (a, n) => {
273
+ const l = S(a, n);
274
+ return r ? s(Ve, {
275
275
  color: r === !0 ? void 0 : r
276
276
  }, {
277
277
  default: () => [t.get(l) || l]
278
- }) : o("span", null, [t.get(l) || l]);
278
+ }) : s("span", null, [t.get(l) || l]);
279
279
  });
280
280
  }
281
281
  function yt(e) {
@@ -290,18 +290,18 @@ function yt(e) {
290
290
  });
291
291
  }) || a.onClick(n);
292
292
  }
293
- return x("dropdown", (a, n) => {
293
+ return k("dropdown", (a, n) => {
294
294
  const l = e.options.filter((c) => typeof c.visiable == "function" ? c.visiable(a) : c.visiable !== !1);
295
- return o(ne, {
295
+ return s(ne, {
296
296
  trigger: (e == null ? void 0 : e.trigger) || "click"
297
297
  }, {
298
- default: () => o(j, {
298
+ default: () => s(q, {
299
299
  disabled: l.length === 0,
300
300
  type: "text"
301
301
  }, {
302
302
  default: () => [(e == null ? void 0 : e.content) || "操作"]
303
303
  }),
304
- content: () => l.map((c) => o(ne.Option, {
304
+ content: () => l.map((c) => s(ne.Option, {
305
305
  onClick: () => r(c, a)
306
306
  }, {
307
307
  default: () => [typeof c.content == "function" ? c.content(a) : c.content]
@@ -309,12 +309,12 @@ function yt(e) {
309
309
  });
310
310
  });
311
311
  }
312
- const bt = {
312
+ const ht = {
313
313
  size: 30
314
314
  };
315
- function ht(e) {
315
+ function bt(e) {
316
316
  e = {
317
- ...bt,
317
+ ...ht,
318
318
  ...e || {}
319
319
  };
320
320
  function t(a, n) {
@@ -329,26 +329,26 @@ function ht(e) {
329
329
  const n = document.getElementById(`IMAGE_${a}_PREVIEW`);
330
330
  n == null || n.remove();
331
331
  }
332
- return x("image", (a, n, l) => {
333
- const c = C(a, n), m = Math.random().toString(32).slice(2).toUpperCase(), f = {
332
+ return k("image", (a, n, l) => {
333
+ const c = S(a, n), m = Math.random().toString(32).slice(2).toUpperCase(), f = {
334
334
  maxWidth: "100%",
335
335
  maxHeight: "100%",
336
336
  borderRadius: e == null ? void 0 : e.radius,
337
337
  objectFit: "contain",
338
338
  transform: `rotate(${(e == null ? void 0 : e.rotate) || 0}deg)`,
339
339
  cursor: e != null && e.preview ? "pointer" : "unset"
340
- }, i = `${n.index || n.key}_parsed`;
340
+ }, d = `${n.index || n.key}_parsed`;
341
341
  if (e != null && e.parse) {
342
- const s = e == null ? void 0 : e.parse(c, a);
343
- P(s) ? s.then((y) => a[i] = y ?? "") : a[i] = s ?? "";
342
+ const o = e == null ? void 0 : e.parse(c, a);
343
+ z(o) ? o.then((y) => a[d] = y ?? "") : a[d] = o ?? "";
344
344
  }
345
- if (e != null && e.parse && !a[i] === void 0)
346
- return o("div", null, [z("Loading...")]);
345
+ if (e != null && e.parse && !a[d] === void 0)
346
+ return s("div", null, [Y("Loading...")]);
347
347
  {
348
- const s = a[i] || c;
349
- return s ? o("div", {
348
+ const o = a[d] || c;
349
+ return o ? s("div", {
350
350
  id: m,
351
- onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m, s),
351
+ onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m, o),
352
352
  onMouseleave: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && r(m),
353
353
  style: {
354
354
  display: "flex",
@@ -356,25 +356,25 @@ function ht(e) {
356
356
  alignItems: "center",
357
357
  height: `${e == null ? void 0 : e.size}px`
358
358
  }
359
- }, [o("img", {
359
+ }, [s("img", {
360
360
  alt: "image",
361
361
  style: f,
362
- src: s
363
- }, null)]) : o(V, null, null);
362
+ src: o
363
+ }, null)]) : s(K, null, null);
364
364
  }
365
365
  });
366
366
  }
367
- function F(e) {
368
- return qe() ? (je(e), !0) : !1;
367
+ function W(e) {
368
+ return $e() ? (Le(e), !0) : !1;
369
369
  }
370
- function _(e) {
371
- return typeof e == "function" ? e() : Ye(e);
370
+ function O(e) {
371
+ return typeof e == "function" ? e() : qe(e);
372
372
  }
373
- const N = typeof window < "u" && typeof document < "u";
373
+ const H = typeof window < "u" && typeof document < "u";
374
374
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
375
375
  const gt = Object.prototype.toString, wt = (e) => gt.call(e) === "[object Object]", vt = () => {
376
376
  };
377
- function xt(e) {
377
+ function Ct(e) {
378
378
  let t;
379
379
  function r() {
380
380
  return t || (t = e()), t;
@@ -384,17 +384,17 @@ function xt(e) {
384
384
  t = void 0, u && await u;
385
385
  }, r;
386
386
  }
387
- function St(e, t) {
387
+ function xt(e, t) {
388
388
  var r;
389
389
  if (typeof e == "number")
390
390
  return e + t;
391
391
  const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(u.length), n = Number.parseFloat(u) + t;
392
392
  return Number.isNaN(n) ? e : n + a;
393
393
  }
394
- function Ct(e, t, r = {}) {
394
+ function kt(e, t, r = {}) {
395
395
  const {
396
396
  immediate: u = !0
397
- } = r, a = h(!1);
397
+ } = r, a = g(!1);
398
398
  let n = null;
399
399
  function l() {
400
400
  n && (clearTimeout(n), n = null);
@@ -405,116 +405,116 @@ function Ct(e, t, r = {}) {
405
405
  function m(...f) {
406
406
  l(), a.value = !0, n = setTimeout(() => {
407
407
  a.value = !1, n = null, e(...f);
408
- }, _(t));
408
+ }, O(t));
409
409
  }
410
- return u && (a.value = !0, N && m()), F(c), {
410
+ return u && (a.value = !0, H && m()), W(c), {
411
411
  isPending: fe(a),
412
412
  start: m,
413
413
  stop: c
414
414
  };
415
415
  }
416
- function kt(e) {
416
+ function St(e) {
417
417
  var t;
418
- const r = _(e);
418
+ const r = O(e);
419
419
  return (t = r == null ? void 0 : r.$el) != null ? t : r;
420
420
  }
421
- const U = N ? window : void 0, me = N ? window.navigator : void 0;
421
+ const N = H ? window : void 0, me = H ? window.navigator : void 0;
422
422
  function ye(...e) {
423
423
  let t, r, u, a;
424
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = U) : [t, r, u, a] = e, !t)
424
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = N) : [t, r, u, a] = e, !t)
425
425
  return vt;
426
426
  Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
427
427
  const n = [], l = () => {
428
- n.forEach((i) => i()), n.length = 0;
429
- }, c = (i, s, y, w) => (i.addEventListener(s, y, w), () => i.removeEventListener(s, y, w)), m = Pe(
430
- () => [kt(t), _(a)],
431
- ([i, s]) => {
432
- if (l(), !i)
428
+ n.forEach((d) => d()), n.length = 0;
429
+ }, c = (d, o, y, b) => (d.addEventListener(o, y, b), () => d.removeEventListener(o, y, b)), m = Ye(
430
+ () => [St(t), O(a)],
431
+ ([d, o]) => {
432
+ if (l(), !d)
433
433
  return;
434
- const y = wt(s) ? { ...s } : s;
434
+ const y = wt(o) ? { ...o } : o;
435
435
  n.push(
436
- ...r.flatMap((w) => u.map((k) => c(i, w, k, y)))
436
+ ...r.flatMap((b) => u.map((v) => c(d, b, v, y)))
437
437
  );
438
438
  },
439
439
  { immediate: !0, flush: "post" }
440
440
  ), f = () => {
441
441
  m(), l();
442
442
  };
443
- return F(f), f;
443
+ return W(f), f;
444
444
  }
445
445
  function Tt() {
446
- const e = h(!1), t = K();
447
- return t && L(() => {
446
+ const e = g(!1), t = F();
447
+ return t && A(() => {
448
448
  e.value = !0;
449
449
  }, t), e;
450
450
  }
451
- function H(e) {
451
+ function U(e) {
452
452
  const t = Tt();
453
- return R(() => (t.value, !!e()));
453
+ return j(() => (t.value, !!e()));
454
454
  }
455
- function q(e, t = {}) {
456
- const { window: r = U } = t, u = H(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
455
+ function L(e, t = {}) {
456
+ const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
457
457
  let a;
458
- const n = h(!1), l = (f) => {
458
+ const n = g(!1), l = (f) => {
459
459
  n.value = f.matches;
460
460
  }, c = () => {
461
461
  a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
462
- }, m = ze(() => {
463
- u.value && (c(), a = r.matchMedia(_(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
462
+ }, m = Pe(() => {
463
+ u.value && (c(), a = r.matchMedia(O(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
464
464
  });
465
- return F(() => {
465
+ return W(() => {
466
466
  m(), c(), a = void 0;
467
467
  }), n;
468
468
  }
469
- function Mt(e, t = {}) {
470
- function r(i, s) {
471
- let y = _(e[_(i)]);
472
- return s != null && (y = St(y, s)), typeof y == "number" && (y = `${y}px`), y;
469
+ function _t(e, t = {}) {
470
+ function r(d, o) {
471
+ let y = O(e[O(d)]);
472
+ return o != null && (y = xt(y, o)), typeof y == "number" && (y = `${y}px`), y;
473
473
  }
474
- const { window: u = U, strategy: a = "min-width" } = t;
475
- function n(i) {
476
- return u ? u.matchMedia(i).matches : !1;
474
+ const { window: u = N, strategy: a = "min-width" } = t;
475
+ function n(d) {
476
+ return u ? u.matchMedia(d).matches : !1;
477
477
  }
478
- const l = (i) => q(() => `(min-width: ${r(i)})`, t), c = (i) => q(() => `(max-width: ${r(i)})`, t), m = Object.keys(e).reduce((i, s) => (Object.defineProperty(i, s, {
479
- get: () => a === "min-width" ? l(s) : c(s),
478
+ const l = (d) => L(() => `(min-width: ${r(d)})`, t), c = (d) => L(() => `(max-width: ${r(d)})`, t), m = Object.keys(e).reduce((d, o) => (Object.defineProperty(d, o, {
479
+ get: () => a === "min-width" ? l(o) : c(o),
480
480
  enumerable: !0,
481
481
  configurable: !0
482
- }), i), {});
482
+ }), d), {});
483
483
  function f() {
484
- const i = Object.keys(e).map((s) => [s, l(s)]);
485
- return R(() => i.filter(([, s]) => s.value).map(([s]) => s));
484
+ const d = Object.keys(e).map((o) => [o, l(o)]);
485
+ return j(() => d.filter(([, o]) => o.value).map(([o]) => o));
486
486
  }
487
487
  return Object.assign(m, {
488
488
  greaterOrEqual: l,
489
489
  smallerOrEqual: c,
490
- greater(i) {
491
- return q(() => `(min-width: ${r(i, 0.1)})`, t);
490
+ greater(d) {
491
+ return L(() => `(min-width: ${r(d, 0.1)})`, t);
492
492
  },
493
- smaller(i) {
494
- return q(() => `(max-width: ${r(i, -0.1)})`, t);
493
+ smaller(d) {
494
+ return L(() => `(max-width: ${r(d, -0.1)})`, t);
495
495
  },
496
- between(i, s) {
497
- return q(() => `(min-width: ${r(i)}) and (max-width: ${r(s, -0.1)})`, t);
496
+ between(d, o) {
497
+ return L(() => `(min-width: ${r(d)}) and (max-width: ${r(o, -0.1)})`, t);
498
498
  },
499
- isGreater(i) {
500
- return n(`(min-width: ${r(i, 0.1)})`);
499
+ isGreater(d) {
500
+ return n(`(min-width: ${r(d, 0.1)})`);
501
501
  },
502
- isGreaterOrEqual(i) {
503
- return n(`(min-width: ${r(i)})`);
502
+ isGreaterOrEqual(d) {
503
+ return n(`(min-width: ${r(d)})`);
504
504
  },
505
- isSmaller(i) {
506
- return n(`(max-width: ${r(i, -0.1)})`);
505
+ isSmaller(d) {
506
+ return n(`(max-width: ${r(d, -0.1)})`);
507
507
  },
508
- isSmallerOrEqual(i) {
509
- return n(`(max-width: ${r(i)})`);
508
+ isSmallerOrEqual(d) {
509
+ return n(`(max-width: ${r(d)})`);
510
510
  },
511
- isInBetween(i, s) {
512
- return n(`(min-width: ${r(i)}) and (max-width: ${r(s, -0.1)})`);
511
+ isInBetween(d, o) {
512
+ return n(`(min-width: ${r(d)}) and (max-width: ${r(o, -0.1)})`);
513
513
  },
514
514
  current: f,
515
515
  active() {
516
- const i = f();
517
- return R(() => i.value.length === 0 ? "" : i.value.at(-1));
516
+ const d = f();
517
+ return j(() => d.value.length === 0 ? "" : d.value.at(-1));
518
518
  }
519
519
  });
520
520
  }
@@ -522,11 +522,11 @@ function ue(e, t = {}) {
522
522
  const {
523
523
  controls: r = !1,
524
524
  navigator: u = me
525
- } = t, a = H(() => u && "permissions" in u);
525
+ } = t, a = U(() => u && "permissions" in u);
526
526
  let n;
527
- const l = typeof e == "string" ? { name: e } : e, c = h(), m = () => {
527
+ const l = typeof e == "string" ? { name: e } : e, c = g(), m = () => {
528
528
  n && (c.value = n.state);
529
- }, f = xt(async () => {
529
+ }, f = Ct(async () => {
530
530
  if (a.value) {
531
531
  if (!n)
532
532
  try {
@@ -543,39 +543,39 @@ function ue(e, t = {}) {
543
543
  query: f
544
544
  } : c;
545
545
  }
546
- function _t(e = {}) {
546
+ function Mt(e = {}) {
547
547
  const {
548
548
  navigator: t = me,
549
549
  read: r = !1,
550
550
  source: u,
551
551
  copiedDuring: a = 1500,
552
552
  legacy: n = !1
553
- } = e, l = H(() => t && "clipboard" in t), c = ue("clipboard-read"), m = ue("clipboard-write"), f = R(() => l.value || n), i = h(""), s = h(!1), y = Ct(() => s.value = !1, a);
554
- function w() {
555
- l.value && E(c.value) ? t.clipboard.readText().then((g) => {
556
- i.value = g;
557
- }) : i.value = I();
553
+ } = e, l = U(() => t && "clipboard" in t), c = ue("clipboard-read"), m = ue("clipboard-write"), f = j(() => l.value || n), d = g(""), o = g(!1), y = kt(() => o.value = !1, a);
554
+ function b() {
555
+ l.value && T(c.value) ? t.clipboard.readText().then((w) => {
556
+ d.value = w;
557
+ }) : d.value = R();
558
558
  }
559
- f.value && r && ye(["copy", "cut"], w);
560
- async function k(g = _(u)) {
561
- f.value && g != null && (l.value && E(m.value) ? await t.clipboard.writeText(g) : S(g), i.value = g, s.value = !0, y.start());
559
+ f.value && r && ye(["copy", "cut"], b);
560
+ async function v(w = O(u)) {
561
+ f.value && w != null && (l.value && T(m.value) ? await t.clipboard.writeText(w) : C(w), d.value = w, o.value = !0, y.start());
562
562
  }
563
- function S(g) {
564
- const v = document.createElement("textarea");
565
- v.value = g ?? "", v.style.position = "absolute", v.style.opacity = "0", document.body.appendChild(v), v.select(), document.execCommand("copy"), v.remove();
563
+ function C(w) {
564
+ const x = document.createElement("textarea");
565
+ x.value = w ?? "", x.style.position = "absolute", x.style.opacity = "0", document.body.appendChild(x), x.select(), document.execCommand("copy"), x.remove();
566
566
  }
567
- function I() {
568
- var g, v, O;
569
- return (O = (v = (g = document == null ? void 0 : document.getSelection) == null ? void 0 : g.call(document)) == null ? void 0 : v.toString()) != null ? O : "";
567
+ function R() {
568
+ var w, x, E;
569
+ return (E = (x = (w = document == null ? void 0 : document.getSelection) == null ? void 0 : w.call(document)) == null ? void 0 : x.toString()) != null ? E : "";
570
570
  }
571
- function E(g) {
572
- return g === "granted" || g === "prompt";
571
+ function T(w) {
572
+ return w === "granted" || w === "prompt";
573
573
  }
574
574
  return {
575
575
  isSupported: f,
576
- text: i,
577
- copied: s,
578
- copy: k
576
+ text: d,
577
+ copied: o,
578
+ copy: v
579
579
  };
580
580
  }
581
581
  const Ot = " ";
@@ -586,54 +586,122 @@ function ce(e, t) {
586
586
  return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? Ot).replace(/M/g, "*");
587
587
  }
588
588
  function Et(e) {
589
- const t = _t();
590
- return x("phone", (u, a) => {
591
- const n = C(u, a), l = ce(Rt(n), e == null ? void 0 : e.separator), c = ce(n, e == null ? void 0 : e.separator);
592
- function m(s) {
593
- if (e != null && e.safe && e.noSafeWhenHover) {
594
- const y = s.target;
595
- y.innerText = c;
596
- }
597
- }
598
- function f(s) {
599
- if (e != null && e.safe && e.noSafeWhenHover) {
600
- const y = s.target;
601
- y.innerText = l;
602
- }
603
- }
604
- function i() {
605
- t.copy(n).then(() => {
606
- Ke.success({
589
+ const t = Mt();
590
+ return k("phone", (u, a) => {
591
+ const n = Math.random().toString(36).slice(2), l = "__table__column_phone__", c = S(u, a), m = ce(Rt(c), e == null ? void 0 : e.separator), f = ce(c, e == null ? void 0 : e.separator);
592
+ function d() {
593
+ window.focus(), t.copy(c).then(() => {
594
+ Fe.success({
607
595
  content: "复制成功",
608
596
  duration: 1e3
609
597
  });
610
598
  });
611
599
  }
612
- return e != null && e.callable ? o("a", {
613
- style: "text-decoration:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;",
614
- href: `tel:${n}`
615
- }, [e != null && e.safe ? l : c]) : o("a", {
616
- onClick: i,
617
- style: "text-decoration:none;use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;",
618
- onMouseenter: m,
619
- onMouseleave: f
620
- }, [e != null && e.safe ? l : c]);
600
+ function o() {
601
+ const C = document.getElementById(n), R = document.querySelectorAll(`.${l}`);
602
+ R.length > 0 && R.forEach((T) => {
603
+ T.innerHTML = m;
604
+ }), C && (C.innerHTML = f);
605
+ }
606
+ function y() {
607
+ window.open(`tel:${c}`, "_blank");
608
+ }
609
+ const b = 16, v = `cursor:pointer;width:${b}px;height:${b}px;`;
610
+ return s("div", {
611
+ style: "display:flex;align-items:center;gap:4px;"
612
+ }, [s("div", {
613
+ class: l,
614
+ id: n,
615
+ style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
616
+ }, [e != null && e.safe ? m : f]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && s("i", {
617
+ title: "显示完整号码",
618
+ style: v,
619
+ onClick: o
620
+ }, [s("svg", {
621
+ width: b,
622
+ height: b,
623
+ viewBox: "0 0 48 48",
624
+ fill: "none",
625
+ xmlns: "http://www.w3.org/2000/svg"
626
+ }, [s("path", {
627
+ d: "M24 36C35.0457 36 44 24 44 24C44 24 35.0457 12 24 12C12.9543 12 4 24 4 24C4 24 12.9543 36 24 36Z",
628
+ fill: "none",
629
+ stroke: "#333",
630
+ "stroke-width": "2",
631
+ "stroke-linejoin": "round"
632
+ }, null), s("path", {
633
+ d: "M24 29C26.7614 29 29 26.7614 29 24C29 21.2386 26.7614 19 24 19C21.2386 19 19 21.2386 19 24C19 26.7614 21.2386 29 24 29Z",
634
+ fill: "none",
635
+ stroke: "#333",
636
+ "stroke-width": "4",
637
+ "stroke-linejoin": "round"
638
+ }, null)])]), (e == null ? void 0 : e.allowDial) && s("i", {
639
+ style: v,
640
+ title: "拨出号码",
641
+ onClick: y
642
+ }, [s("svg", {
643
+ width: b,
644
+ height: b,
645
+ viewBox: "0 0 48 48",
646
+ fill: "none",
647
+ xmlns: "http://www.w3.org/2000/svg"
648
+ }, [s("path", {
649
+ d: "M41.7796 20.6066C42.0324 18.9108 41.9495 17.1747 41.5309 15.5054C40.978 13.3002 39.8392 11.2118 38.1147 9.4873C36.3902 7.76281 34.3018 6.62409 32.0967 6.07115C30.4274 5.65257 28.6912 5.56967 26.9954 5.82245",
650
+ stroke: "#333",
651
+ "stroke-width": "2",
652
+ "stroke-linecap": "round",
653
+ "stroke-linejoin": "round"
654
+ }, null), s("path", {
655
+ d: "M34.1896 19.8035C34.4604 17.9869 33.8966 16.0699 32.4982 14.6715C31.0997 13.2731 29.1827 12.7092 27.3662 12.98",
656
+ stroke: "#333",
657
+ "stroke-width": "4",
658
+ "stroke-linecap": "round",
659
+ "stroke-linejoin": "round"
660
+ }, null), s("path", {
661
+ d: "M14.3755 8.79423C15.1021 8.79423 15.7715 9.18825 16.1241 9.82349L18.5706 14.2303C18.8909 14.8073 18.9059 15.5052 18.6108 16.0955L16.254 20.8091C16.254 20.8091 16.937 24.3206 19.7954 27.179C22.6538 30.0374 26.1535 30.7086 26.1535 30.7086L30.8664 28.3522C31.4571 28.0568 32.1555 28.0721 32.7327 28.393L37.152 30.85C37.7866 31.2028 38.1802 31.8719 38.1802 32.598L38.1802 37.6715C38.1802 40.2552 35.7803 42.1213 33.3322 41.2952C28.3043 39.5987 20.4996 36.3685 15.5528 31.4216C10.6059 26.4748 7.3757 18.6701 5.67916 13.6422C4.85314 11.1941 6.71923 8.79423 9.30288 8.79423L14.3755 8.79423Z",
662
+ fill: "none",
663
+ stroke: "#333",
664
+ "stroke-width": "4",
665
+ "stroke-linejoin": "round"
666
+ }, null)])]), (e == null ? void 0 : e.allowCopy) && s("i", {
667
+ style: v,
668
+ title: "复制号码",
669
+ onClick: d
670
+ }, [s("svg", {
671
+ width: b,
672
+ height: b,
673
+ viewBox: "0 0 48 48",
674
+ fill: "none",
675
+ xmlns: "http://www.w3.org/2000/svg"
676
+ }, [s("path", {
677
+ d: "M13 12.4316V7.8125C13 6.2592 14.2592 5 15.8125 5H40.1875C41.7408 5 43 6.2592 43 7.8125V32.1875C43 33.7408 41.7408 35 40.1875 35H35.5163",
678
+ stroke: "#333",
679
+ "stroke-width": "2",
680
+ "stroke-linecap": "round",
681
+ "stroke-linejoin": "round"
682
+ }, null), s("path", {
683
+ d: "M32.1875 13H7.8125C6.2592 13 5 14.2592 5 15.8125V40.1875C5 41.7408 6.2592 43 7.8125 43H32.1875C33.7408 43 35 41.7408 35 40.1875V15.8125C35 14.2592 33.7408 13 32.1875 13Z",
684
+ fill: "none",
685
+ stroke: "#333",
686
+ "stroke-width": "4",
687
+ "stroke-linejoin": "round"
688
+ }, null)])])]);
621
689
  });
622
690
  }
623
- function $t(e) {
624
- return x("render", (r) => e(r));
691
+ function jt(e) {
692
+ return k("render", (r) => e(r));
625
693
  }
626
- function qt(e) {
627
- return x("tag", (r, u) => {
628
- const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : C(r, u), l = (e == null ? void 0 : e.textColors) || ["#F87335"], c = (e == null ? void 0 : e.backgroundColors) || ["#FFF4E8"], m = n.length > a, f = e == null ? void 0 : e.minWidth;
629
- return o("div", {
694
+ function $t(e) {
695
+ return k("tag", (r, u) => {
696
+ const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : S(r, u), l = (e == null ? void 0 : e.textColors) || ["#F87335"], c = (e == null ? void 0 : e.backgroundColors) || ["#FFF4E8"], m = n.length > a, f = e == null ? void 0 : e.minWidth;
697
+ return s("div", {
630
698
  style: {
631
699
  display: "flex",
632
700
  flexWrap: "wrap"
633
701
  }
634
- }, [n.slice(0, a).map((i, s) => {
635
- const y = typeof l == "function" ? l(i, s) : l[s % l.length], w = typeof c == "function" ? c(i, s) : c[s % c.length];
636
- return o("span", {
702
+ }, [n.slice(0, a).map((d, o) => {
703
+ const y = typeof l == "function" ? l(d, o) : l[o % l.length], b = typeof c == "function" ? c(d, o) : c[o % c.length];
704
+ return s("span", {
637
705
  style: {
638
706
  minWidth: f ? `${f}px` : "unset",
639
707
  textAlign: "center",
@@ -642,23 +710,23 @@ function qt(e) {
642
710
  border: `solid 2px ${e != null && e.border ? y : "transparent"}`,
643
711
  borderRadius: `${(e == null ? void 0 : e.radius) || 0}px`,
644
712
  color: y,
645
- backgroundColor: w
713
+ backgroundColor: b
646
714
  }
647
- }, [i]);
715
+ }, [d]);
648
716
  }), m && "..."]);
649
717
  });
650
718
  }
651
- function de(e) {
719
+ function ie(e) {
652
720
  if (typeof e == "string")
653
721
  return e;
654
722
  if (typeof e == "number")
655
723
  return `${e}px`;
656
724
  }
657
- function jt(e, t, r) {
725
+ function Lt(e, t, r) {
658
726
  var u, a;
659
- return typeof e == "function" ? (u = e(r)) == null ? void 0 : u.toString() : typeof (e == null ? void 0 : e.content) == "function" ? (a = e == null ? void 0 : e.content(r)) == null ? void 0 : a.toString() : typeof (e == null ? void 0 : e.content) == "string" ? e == null ? void 0 : e.content : C(r, t);
727
+ return typeof e == "function" ? (u = e(r)) == null ? void 0 : u.toString() : typeof (e == null ? void 0 : e.content) == "function" ? (a = e == null ? void 0 : e.content(r)) == null ? void 0 : a.toString() : typeof (e == null ? void 0 : e.content) == "string" ? e == null ? void 0 : e.content : S(r, t);
660
728
  }
661
- function Yt(e, t) {
729
+ function qt(e, t) {
662
730
  if (typeof e != "function") {
663
731
  if (typeof (e == null ? void 0 : e.color) == "function")
664
732
  return e == null ? void 0 : e.color(t);
@@ -666,19 +734,19 @@ function Yt(e, t) {
666
734
  return e == null ? void 0 : e.color;
667
735
  }
668
736
  }
669
- function zt(e, t) {
737
+ function Pt(e, t) {
670
738
  if (typeof e != "function")
671
- return typeof (e == null ? void 0 : e.size) == "function" ? de(e == null ? void 0 : e.size(t)) : de(e == null ? void 0 : e.size);
739
+ return typeof (e == null ? void 0 : e.size) == "function" ? ie(e == null ? void 0 : e.size(t)) : ie(e == null ? void 0 : e.size);
672
740
  }
673
- function Pt(e, t) {
741
+ function Yt(e, t) {
674
742
  let r = "";
675
- const u = Yt(e, t), a = zt(e, t);
743
+ const u = qt(e, t), a = Pt(e, t);
676
744
  return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
677
745
  }
678
- function Lt(e) {
679
- return x("text", (r, u) => {
680
- const a = jt(e || {}, u, r), n = Pt(e || {}, r);
681
- return o("span", {
746
+ function zt(e) {
747
+ return k("text", (r, u) => {
748
+ const a = Lt(e || {}, u, r), n = Yt(e || {}, r);
749
+ return s("span", {
682
750
  style: n
683
751
  }, [a]);
684
752
  });
@@ -686,14 +754,14 @@ function Lt(e) {
686
754
  function At() {
687
755
  return {
688
756
  dropdown: yt,
689
- text: Lt,
757
+ text: zt,
690
758
  dict: mt,
691
- tag: qt,
692
- render: $t,
759
+ tag: $t,
760
+ render: jt,
693
761
  phone: Et,
694
- image: ht,
762
+ image: bt,
695
763
  currency: lt,
696
- date: it,
764
+ date: dt,
697
765
  button: nt
698
766
  };
699
767
  }
@@ -715,7 +783,7 @@ function G(e, t) {
715
783
  type: r.$type
716
784
  };
717
785
  }
718
- function ie({
786
+ function de({
719
787
  columns: e,
720
788
  columnsOptions: t,
721
789
  columnsGroups: r,
@@ -727,9 +795,9 @@ function ie({
727
795
  ...t || {},
728
796
  ...c
729
797
  })).map((c) => It(c, u, a, n)).filter(Boolean);
730
- return Bt(l, r);
798
+ return Dt(l, r);
731
799
  }
732
- function Dt(e, t) {
800
+ function Bt(e, t) {
733
801
  const r = [], u = (n) => {
734
802
  if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
735
803
  const l = t.find((c) => {
@@ -749,9 +817,9 @@ function Dt(e, t) {
749
817
  }), t.splice(n, 0, a);
750
818
  }
751
819
  }
752
- function Bt(e, t = []) {
820
+ function Dt(e, t = []) {
753
821
  return t.forEach((r) => {
754
- Dt(r, e);
822
+ Bt(r, e);
755
823
  }), e;
756
824
  }
757
825
  function It(e, t, r, u) {
@@ -781,10 +849,10 @@ function It(e, t, r, u) {
781
849
  render: a
782
850
  };
783
851
  }
784
- function Wt() {
852
+ function Vt() {
785
853
  return new Xe.Workbook();
786
854
  }
787
- function Kt(e, t = "Sheet1") {
855
+ function Ft(e, t = "Sheet1") {
788
856
  return e.addWorksheet(t, {
789
857
  headerFooter: {
790
858
  firstHeader: "",
@@ -792,29 +860,29 @@ function Kt(e, t = "Sheet1") {
792
860
  }
793
861
  });
794
862
  }
795
- function Vt(e, t) {
863
+ function Kt(e, t) {
796
864
  e.columns = t;
797
865
  }
798
- function Ft(e, t) {
866
+ function Wt(e, t) {
799
867
  e.addRows(t);
800
868
  }
801
- async function Nt({
869
+ async function Ht({
802
870
  columns: e,
803
871
  rows: t,
804
872
  filename: r
805
873
  }) {
806
- const u = Wt(), a = Kt(u);
807
- Vt(a, e), Ft(a, t);
874
+ const u = Vt(), a = Ft(u);
875
+ Kt(a, e), Wt(a, t);
808
876
  const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
809
- Ut(l, r || `${B().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
877
+ Nt(l, r || `${I().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
810
878
  }
811
- function Ut(e, t) {
879
+ function Nt(e, t) {
812
880
  const r = document.createElement("a");
813
881
  r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
814
882
  URL.revokeObjectURL(r.href);
815
883
  }, 1e3);
816
884
  }
817
- function Ht(e, t) {
885
+ function Ut(e, t) {
818
886
  const r = {};
819
887
  return e.filter((a) => a.exportable !== !1).map((a) => ({
820
888
  options: a,
@@ -828,13 +896,13 @@ function Ht(e, t) {
828
896
  case !!a.content:
829
897
  return a.content && a.content(t);
830
898
  case !!n: {
831
- const f = document.createElement("div"), i = Le(() => n && n({
899
+ const f = document.createElement("div"), d = ze(() => n && n({
832
900
  record: t
833
901
  }));
834
- return Ae(i, f), (m = i.el) == null ? void 0 : m.innerText;
902
+ return Ae(d, f), (m = d.el) == null ? void 0 : m.innerText;
835
903
  }
836
904
  default:
837
- return C(t, a.options);
905
+ return S(t, a.options);
838
906
  }
839
907
  };
840
908
  r[a.options.key] = l();
@@ -858,8 +926,8 @@ function Jt(e, t, r) {
858
926
  header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
859
927
  width: ((c = n.exportable) == null ? void 0 : c.width) || Gt(n.width)
860
928
  };
861
- }), a = t.map((n) => Ht(e, n));
862
- Nt({
929
+ }), a = t.map((n) => Ut(e, n));
930
+ Ht({
863
931
  columns: u,
864
932
  rows: a,
865
933
  filename: r
@@ -936,9 +1004,9 @@ function Zt(e) {
936
1004
  });
937
1005
  }
938
1006
  function pt(e) {
939
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !De(e);
1007
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
940
1008
  }
941
- const er = /* @__PURE__ */ A({
1009
+ const er = /* @__PURE__ */ B({
942
1010
  props: {
943
1011
  record: {
944
1012
  type: Object,
@@ -972,7 +1040,7 @@ const er = /* @__PURE__ */ A({
972
1040
  }
973
1041
  },
974
1042
  setup(e) {
975
- const t = K(), r = h(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
1043
+ const t = F(), r = g(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
976
1044
  options: n,
977
1045
  renderer: G(n, {
978
1046
  previewing: !0
@@ -992,25 +1060,25 @@ const er = /* @__PURE__ */ A({
992
1060
  r.value = Math.floor(l.offsetWidth / e.minWidth);
993
1061
  }
994
1062
  }
995
- return L(() => {
1063
+ return A(() => {
996
1064
  a();
997
1065
  }), () => {
998
1066
  let n;
999
- return o("div", {
1067
+ return s("div", {
1000
1068
  class: "preview-container"
1001
- }, [o(Ve, {
1069
+ }, [s(Ke, {
1002
1070
  column: r.value,
1003
1071
  bordered: !0,
1004
1072
  align: "left",
1005
1073
  layout: e.layout
1006
- }, pt(n = u.map((l) => o(Fe, {
1074
+ }, pt(n = u.map((l) => s(We, {
1007
1075
  label: l.options.title
1008
1076
  }, {
1009
1077
  default: () => {
1010
1078
  var c, m;
1011
1079
  return [(c = l.renderer) != null && c.render ? (m = l.renderer) == null ? void 0 : m.render({
1012
1080
  record: e.record
1013
- }) : C(e.record, l.options)];
1081
+ }) : S(e.record, l.options)];
1014
1082
  }
1015
1083
  }))) ? n : {
1016
1084
  default: () => [n]
@@ -1023,9 +1091,9 @@ function tr(e, t, {
1023
1091
  tableEvents: u
1024
1092
  }) {
1025
1093
  const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
1026
- return a || n ? () => o(V, null, [n && o(Ne, {
1094
+ return a || n ? () => s(K, null, [n && s(He, {
1027
1095
  margin: 0
1028
- }, null), a && o("div", {
1096
+ }, null), a && s("div", {
1029
1097
  class: "table-actions",
1030
1098
  style: {
1031
1099
  display: "flex",
@@ -1034,28 +1102,28 @@ function tr(e, t, {
1034
1102
  flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
1035
1103
  alignItems: "center"
1036
1104
  }
1037
- }, [o("div", {
1105
+ }, [s("div", {
1038
1106
  class: "built-in"
1039
- }, [o(ae, null, {
1040
- default: () => [e.refreshable && o(j, {
1107
+ }, [s(ae, null, {
1108
+ default: () => [e.refreshable && s(q, {
1041
1109
  type: "primary",
1042
1110
  onClick: () => u("reload")
1043
1111
  }, {
1044
- default: () => [z("刷新")]
1045
- }), e.exportable && o(j, {
1112
+ default: () => [Y("刷新")]
1113
+ }), e.exportable && s(q, {
1046
1114
  type: "primary",
1047
1115
  onClick: () => u("export")
1048
1116
  }, {
1049
- default: () => [z("导出")]
1050
- }), e.collapsable && o(j, {
1117
+ default: () => [Y("导出")]
1118
+ }), e.collapsable && s(q, {
1051
1119
  type: "primary",
1052
1120
  onClick: () => u("collapse")
1053
1121
  }, {
1054
- default: () => [z("显示")]
1122
+ default: () => [Y("显示")]
1055
1123
  })]
1056
- })]), o("div", {
1124
+ })]), s("div", {
1057
1125
  class: "customs"
1058
- }, [o(ae, null, {
1126
+ }, [s(ae, null, {
1059
1127
  default: () => [t.slots.actions && t.slots.actions()]
1060
1128
  })])])]) : () => {
1061
1129
  };
@@ -1065,9 +1133,9 @@ function rr(e, t, {
1065
1133
  tableEvents: u,
1066
1134
  formInstance: a
1067
1135
  }) {
1068
- return r != null && r.length ? () => o("div", {
1136
+ return r != null && r.length ? () => s("div", {
1069
1137
  class: "table-form"
1070
- }, [o(oe, se({
1138
+ }, [s(oe, se({
1071
1139
  form: r,
1072
1140
  ref: (n) => a && (a.value = n),
1073
1141
  searchable: !0,
@@ -1080,7 +1148,7 @@ function rr(e, t, {
1080
1148
  function nr(e, t, {
1081
1149
  tableSource: r
1082
1150
  }) {
1083
- const u = h([]);
1151
+ const u = g([]);
1084
1152
  function a() {
1085
1153
  u.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
1086
1154
  }
@@ -1108,18 +1176,18 @@ function nr(e, t, {
1108
1176
  };
1109
1177
  }
1110
1178
  }
1111
- function c(f, i, s) {
1179
+ function c(f, d, o) {
1112
1180
  const {
1113
1181
  type: y
1114
1182
  } = l() || {};
1115
1183
  switch (y) {
1116
1184
  case "radio":
1117
- t.emit("update:radio-key", i), t.emit("update:radio-row", s);
1185
+ t.emit("update:radio-key", d), t.emit("update:radio-row", o);
1118
1186
  break;
1119
1187
  case "checkbox":
1120
- t.emit("update:checkbox-keys", f), t.emit("update:checkbox-rows", f.map((w) => {
1121
- var k;
1122
- return r.value.find((S) => S[e.rowKey] === w) || ((k = e.checkboxRows) == null ? void 0 : k.find((S) => S[e.rowKey] === w));
1188
+ t.emit("update:checkbox-keys", f), t.emit("update:checkbox-rows", f.map((b) => {
1189
+ var v;
1190
+ return r.value.find((C) => C[e.rowKey] === b) || ((v = e.checkboxRows) == null ? void 0 : v.find((C) => C[e.rowKey] === b));
1123
1191
  }));
1124
1192
  break;
1125
1193
  }
@@ -1127,8 +1195,8 @@ function nr(e, t, {
1127
1195
  function m() {
1128
1196
  re(() => {
1129
1197
  t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((f) => {
1130
- var i;
1131
- return r.value.find((s) => s[e.rowKey] === f) || ((i = e.checkboxRows) == null ? void 0 : i.find((s) => s[e.rowKey] === f));
1198
+ var d;
1199
+ return r.value.find((o) => o[e.rowKey] === f) || ((d = e.checkboxRows) == null ? void 0 : d.find((o) => o[e.rowKey] === f));
1132
1200
  }));
1133
1201
  });
1134
1202
  }
@@ -1151,17 +1219,17 @@ function ar(e, t, {
1151
1219
  function n(c) {
1152
1220
  r && (r.pageSize = c, u("reload"));
1153
1221
  }
1154
- const l = Mt({
1222
+ const l = _t({
1155
1223
  mobile: 0,
1156
1224
  tablet: 640,
1157
1225
  desktop: 1024
1158
1226
  });
1159
- return r ? () => o("div", {
1227
+ return r ? () => s("div", {
1160
1228
  class: "table-pagination",
1161
1229
  style: {
1162
1230
  padding: "10px 0"
1163
1231
  }
1164
- }, [o(Ue, {
1232
+ }, [s(Ne, {
1165
1233
  current: r.pageIndex,
1166
1234
  "onUpdate:current": (c) => r.pageIndex = c,
1167
1235
  "page-size": r.pageSize,
@@ -1180,7 +1248,7 @@ function ar(e, t, {
1180
1248
  }, null)]) : () => {
1181
1249
  };
1182
1250
  }
1183
- const lr = /* @__PURE__ */ A({
1251
+ const lr = /* @__PURE__ */ B({
1184
1252
  props: {
1185
1253
  collapsedColumns: {
1186
1254
  type: Array,
@@ -1188,11 +1256,11 @@ const lr = /* @__PURE__ */ A({
1188
1256
  }
1189
1257
  },
1190
1258
  setup(e) {
1191
- const t = D(), r = h(e.collapsedColumns.map((a) => ({
1259
+ const t = D(), r = g(e.collapsedColumns.map((a) => ({
1192
1260
  label: a.title,
1193
1261
  value: a.key,
1194
1262
  disabled: !1
1195
- }))), u = h(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1263
+ }))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1196
1264
  return Je(() => {
1197
1265
  const a = e.collapsedColumns.map((n) => ({
1198
1266
  key: n.key,
@@ -1200,9 +1268,9 @@ const lr = /* @__PURE__ */ A({
1200
1268
  collapsed: u.value.includes(n.key)
1201
1269
  }));
1202
1270
  t.close(a);
1203
- }), () => o("div", {
1271
+ }), () => s("div", {
1204
1272
  class: "table-collapsed-render"
1205
- }, [o(He, {
1273
+ }, [s(Ue, {
1206
1274
  data: r.value,
1207
1275
  "default-value": u.value,
1208
1276
  onChange: (a) => u.value = [...a],
@@ -1211,10 +1279,10 @@ const lr = /* @__PURE__ */ A({
1211
1279
  justifyContent: "center"
1212
1280
  }
1213
1281
  }, {
1214
- default: () => [Be(o("template", null, null), [[Ie("slot"), "source"]])]
1282
+ default: () => [De(s("template", null, null), [[Ie("slot"), "source"]])]
1215
1283
  })]);
1216
1284
  }
1217
- }), ur = /* @__PURE__ */ A({
1285
+ }), ur = /* @__PURE__ */ B({
1218
1286
  props: {
1219
1287
  value: {
1220
1288
  type: Object,
@@ -1234,16 +1302,16 @@ const lr = /* @__PURE__ */ A({
1234
1302
  function r(u) {
1235
1303
  e.onSubmit && e.onSubmit(u), t.close(u);
1236
1304
  }
1237
- return console.log(e.value), () => o("div", {
1305
+ return console.log(e.value), () => s("div", {
1238
1306
  class: "edit-form-container"
1239
- }, [o(oe, {
1307
+ }, [s(oe, {
1240
1308
  name: "form",
1241
1309
  value: e.value,
1242
1310
  form: e.form,
1243
1311
  onSubmit: r
1244
1312
  }, null)]);
1245
1313
  }
1246
- }), cr = /* @__PURE__ */ A({
1314
+ }), cr = /* @__PURE__ */ B({
1247
1315
  props: {
1248
1316
  // 数据主键
1249
1317
  rowKey: {
@@ -1382,24 +1450,24 @@ const lr = /* @__PURE__ */ A({
1382
1450
  },
1383
1451
  expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
1384
1452
  setup(e, t) {
1385
- const r = Math.random().toString(32).slice(2).toUpperCase(), u = h(), a = h(), n = h(), l = h(), [c, m] = pe(e.columns), f = h(!1), i = e.form ?? et(e.columns), s = k(), y = I(), w = h(e.columns.map((d) => ({
1386
- key: d.key,
1387
- title: d.title,
1388
- collapsed: !!d.collapsed
1453
+ const r = Math.random().toString(32).slice(2).toUpperCase(), u = g(), a = g(), n = g(), l = g(), [c, m] = pe(e.columns), f = g(!1), d = e.form ?? et(e.columns), o = v(), y = R(), b = g(e.columns.map((i) => ({
1454
+ key: i.key,
1455
+ title: i.title,
1456
+ collapsed: !!i.collapsed
1389
1457
  })));
1390
- function k() {
1458
+ function v() {
1391
1459
  switch (!0) {
1392
1460
  case (typeof e.pageable == "string" && e.pageable === "server"):
1393
- return new W();
1461
+ return new V();
1394
1462
  case (typeof e.pageable == "boolean" && e.pageable === !0):
1395
- return new W();
1463
+ return new V();
1396
1464
  case (typeof e.pageable == "object" && !!e.pageable.reset):
1397
1465
  return e.pageable;
1398
1466
  case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
1399
- return new W(e.pageable.index, e.pageable.size);
1467
+ return new V(e.pageable.index, e.pageable.size);
1400
1468
  }
1401
1469
  }
1402
- const S = (() => {
1470
+ const C = (() => {
1403
1471
  switch (!0) {
1404
1472
  case typeof e.pageable == "string":
1405
1473
  return e.pageable;
@@ -1409,145 +1477,145 @@ const lr = /* @__PURE__ */ A({
1409
1477
  return "server";
1410
1478
  }
1411
1479
  })();
1412
- function I() {
1413
- const d = e.columns.find((b) => !!b.sortable);
1414
- if (d || e.sortable)
1480
+ function R() {
1481
+ const i = e.columns.find((h) => !!h.sortable);
1482
+ if (i || e.sortable)
1415
1483
  return new J({
1416
1484
  ...e.sortable || {},
1417
- ...d ? {
1418
- [d.key]: d.sortable
1485
+ ...i ? {
1486
+ [i.key]: i.sortable
1419
1487
  } : {}
1420
1488
  });
1421
1489
  }
1422
- function E(d) {
1490
+ function T(i) {
1423
1491
  const {
1424
- exportExcel: b
1492
+ exportExcel: h
1425
1493
  } = Qt();
1426
- b((d == null ? void 0 : d.columns) || e.columns, (d == null ? void 0 : d.source) || c.value, (d == null ? void 0 : d.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1494
+ h((i == null ? void 0 : i.columns) || e.columns, (i == null ? void 0 : i.source) || c.value, (i == null ? void 0 : i.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1427
1495
  }
1428
- function g(d) {
1429
- let b;
1496
+ function w(i) {
1497
+ let h;
1430
1498
  switch (!0) {
1431
- case !!(d != null && d.key):
1432
- b = c.value.find((T) => T[e.rowKey] === (d == null ? void 0 : d.key));
1499
+ case !!(i != null && i.key):
1500
+ h = c.value.find((_) => _[e.rowKey] === (i == null ? void 0 : i.key));
1433
1501
  break;
1434
- case !!(d != null && d.record):
1435
- b = d == null ? void 0 : d.record;
1502
+ case !!(i != null && i.record):
1503
+ h = i == null ? void 0 : i.record;
1436
1504
  break;
1437
1505
  }
1438
- if (!b)
1506
+ if (!h)
1439
1507
  throw new Error("未找到需要预览的数据");
1440
1508
  return n.value.open(er, {
1441
- record: b,
1509
+ record: h,
1442
1510
  columns: e.columns
1443
1511
  }, {
1444
- title: (d == null ? void 0 : d.title) || "详情",
1445
- mode: (d == null ? void 0 : d.mode) || "dialog"
1512
+ title: (i == null ? void 0 : i.title) || "详情",
1513
+ mode: (i == null ? void 0 : i.mode) || "dialog"
1446
1514
  });
1447
1515
  }
1448
- function v(d) {
1449
- let b;
1516
+ function x(i) {
1517
+ let h;
1450
1518
  switch (!0) {
1451
- case !!(d != null && d.key):
1452
- b = c.value.find((T) => T[e.rowKey] === (d == null ? void 0 : d.key));
1519
+ case !!(i != null && i.key):
1520
+ h = c.value.find((_) => _[e.rowKey] === (i == null ? void 0 : i.key));
1453
1521
  break;
1454
- case !!(d != null && d.record):
1455
- b = d == null ? void 0 : d.record;
1522
+ case !!(i != null && i.record):
1523
+ h = i == null ? void 0 : i.record;
1456
1524
  break;
1457
1525
  }
1458
- if (!b)
1526
+ if (!h)
1459
1527
  throw new Error("未找到需要编辑的数据");
1460
1528
  return n.value.open(ur, {
1461
- value: b,
1462
- form: d == null ? void 0 : d.form,
1463
- onSubmit: d.onSubmit
1529
+ value: h,
1530
+ form: i == null ? void 0 : i.form,
1531
+ onSubmit: i.onSubmit
1464
1532
  }, {
1465
- title: (d == null ? void 0 : d.title) || "编辑",
1466
- mode: (d == null ? void 0 : d.mode) || "dialog",
1533
+ title: (i == null ? void 0 : i.title) || "编辑",
1534
+ mode: (i == null ? void 0 : i.mode) || "dialog",
1467
1535
  footer: !0,
1468
1536
  form: "form"
1469
1537
  });
1470
1538
  }
1471
- function O(d) {
1539
+ function E(i) {
1472
1540
  var p, ee;
1473
1541
  if (!e.dataLoad)
1474
1542
  return Promise.reject();
1475
- d != null && d.reset && (s && s.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
1476
- const b = {
1543
+ i != null && i.reset && (o && o.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
1544
+ const h = {
1477
1545
  ...((ee = a.value) == null ? void 0 : ee.formSource) || {}
1478
1546
  };
1479
- Object.keys(b).forEach((te) => {
1480
- [null, void 0, ""].includes(b[te]) && delete b[te];
1547
+ Object.keys(h).forEach((te) => {
1548
+ [null, void 0, ""].includes(h[te]) && delete h[te];
1481
1549
  });
1482
- const T = e.dataLoad({
1483
- form: b,
1484
- page: s,
1550
+ const _ = e.dataLoad({
1551
+ form: h,
1552
+ page: o,
1485
1553
  sort: y,
1486
1554
  update: m
1487
1555
  });
1488
- return P(T) ? (f.value = !0, Promise.resolve(T).finally(() => {
1556
+ return z(_) ? (f.value = !0, Promise.resolve(_).finally(() => {
1489
1557
  f.value = !1;
1490
- }), T) : Promise.resolve();
1558
+ }), _) : Promise.resolve();
1491
1559
  }
1492
- function be() {
1560
+ function he() {
1493
1561
  n.value.open(lr, {
1494
- collapsedColumns: w.value
1562
+ collapsedColumns: b.value
1495
1563
  }, {
1496
1564
  title: "显示列",
1497
1565
  size: "small",
1498
1566
  footer: !0
1499
- }).then((d) => {
1500
- w.value = d;
1567
+ }).then((i) => {
1568
+ b.value = i;
1501
1569
  });
1502
1570
  }
1503
- const he = (d, {
1504
- type: b
1571
+ const be = (i, {
1572
+ type: h
1505
1573
  }) => {
1506
- switch (b) {
1574
+ switch (h) {
1507
1575
  case "drag": {
1508
- m(d), t.emit("change", d);
1576
+ m(i), t.emit("change", i);
1509
1577
  break;
1510
1578
  }
1511
1579
  }
1512
1580
  }, $ = tt({
1513
- reload: O,
1514
- preview: g,
1515
- export: E,
1516
- edit: v,
1517
- collapse: be
1581
+ reload: E,
1582
+ preview: w,
1583
+ export: T,
1584
+ edit: x,
1585
+ collapse: he
1518
1586
  });
1519
- function ge(d, b) {
1520
- !y || S === "client" || (b ? y.update(d, b === "descend" ? "desc" : "asc") : y.remove(d), $("reload"));
1587
+ function ge(i, h) {
1588
+ !y || C === "client" || (h ? y.update(i, h === "descend" ? "desc" : "asc") : y.remove(i), $("reload"));
1521
1589
  }
1522
- const Q = h(ie({
1590
+ const Q = g(de({
1523
1591
  columns: e.columns,
1524
1592
  columnsOptions: e.columnsOptions,
1525
1593
  columnsGroups: e.columnsGroups,
1526
- pageMode: S,
1527
- collapsedColumns: w,
1594
+ pageMode: C,
1595
+ collapsedColumns: b,
1528
1596
  events: $
1529
- })), Y = {
1597
+ })), P = {
1530
1598
  tableEvents: $,
1531
- tableForm: i,
1599
+ tableForm: d,
1532
1600
  tableSource: c,
1533
1601
  formInstance: a,
1534
- pageService: s,
1602
+ pageService: o,
1535
1603
  formOptions: e.formOptions
1536
- }, we = rr(e, t, Y), ve = tr(e, t, Y), xe = ar(e, t, Y), {
1604
+ }, we = rr(e, t, P), ve = tr(e, t, P), Ce = ar(e, t, P), {
1537
1605
  selectedRowKeys: X,
1538
1606
  rowSelection: Z,
1539
- onSelect: Se,
1540
- onSelectAll: Ce,
1541
- reloadSelection: ke,
1607
+ onSelect: xe,
1608
+ onSelectAll: ke,
1609
+ reloadSelection: Se,
1542
1610
  resetSelection: Te
1543
- } = nr(e, t, Y), Me = R(() => ({
1611
+ } = nr(e, t, P), _e = j(() => ({
1544
1612
  rowKey: e.rowKey,
1545
1613
  size: e.size,
1546
1614
  bordered: e.bordered,
1547
1615
  hoverable: e.hoverable,
1548
1616
  stripe: e.stripe,
1549
1617
  scroll: {
1550
- x: e.columns.reduce((d, b) => d += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1618
+ x: e.columns.reduce((i, h) => i += typeof h.width != "number" ? Math.max(h.title.length * 16, 80) : h.width, 0),
1551
1619
  y: e.height ?? "100%"
1552
1620
  },
1553
1621
  rowSelection: Z,
@@ -1559,63 +1627,63 @@ const lr = /* @__PURE__ */ A({
1559
1627
  selectedKeys: X.value,
1560
1628
  expandable: e.expandable
1561
1629
  }));
1562
- function _e() {
1563
- Q.value = ie({
1630
+ function Me() {
1631
+ Q.value = de({
1564
1632
  columns: e.columns,
1565
1633
  columnsOptions: e.columnsOptions,
1566
1634
  columnsGroups: e.columnsGroups,
1567
- pageMode: S,
1568
- collapsedColumns: w,
1635
+ pageMode: C,
1636
+ collapsedColumns: b,
1569
1637
  events: $
1570
1638
  });
1571
1639
  }
1572
- return L(() => {
1573
- l.value && (l.value.id = `table-${r}`), e.autoLoad && O(), e.grabbable && l.value && Zt(l.value);
1640
+ return A(() => {
1641
+ l.value && (l.value.id = `table-${r}`), e.autoLoad && E(), e.grabbable && l.value && Zt(l.value);
1574
1642
  }), {
1575
1643
  tableId: r,
1576
1644
  tableInstance: u,
1577
1645
  tableSource: c,
1578
- tableOptions: Me,
1646
+ tableOptions: _e,
1579
1647
  tableColumns: Q,
1580
1648
  tableEvents: $,
1581
- tableForm: i,
1649
+ tableForm: d,
1582
1650
  tableLoading: f,
1583
1651
  modalInstance: n,
1584
1652
  tableRenderElement: l,
1585
- formSource: fe(R(() => {
1586
- var d;
1587
- return (d = a == null ? void 0 : a.value) == null ? void 0 : d.formSource;
1653
+ formSource: fe(j(() => {
1654
+ var i;
1655
+ return (i = a == null ? void 0 : a.value) == null ? void 0 : i.formSource;
1588
1656
  })),
1589
1657
  formInstance: a,
1590
- reload: O,
1591
- preview: g,
1592
- edit: v,
1593
- export: E,
1658
+ reload: E,
1659
+ preview: w,
1660
+ edit: x,
1661
+ export: T,
1594
1662
  onSorterChange: ge,
1595
- onTableChange: he,
1663
+ onTableChange: be,
1596
1664
  renders: {
1597
1665
  renderTableForm: we,
1598
1666
  renderTableActions: ve,
1599
- renderTablePagination: xe
1667
+ renderTablePagination: Ce
1600
1668
  },
1601
1669
  tableSelection: {
1602
1670
  selectedRowKeys: X,
1603
1671
  rowSelection: Z,
1604
- onSelect: Se,
1605
- onSelectAll: Ce
1672
+ onSelect: xe,
1673
+ onSelectAll: ke
1606
1674
  },
1607
1675
  resetSelection: Te,
1608
- reloadSelection: ke,
1609
- reloadColumns: _e
1676
+ reloadSelection: Se,
1677
+ reloadColumns: Me
1610
1678
  };
1611
1679
  },
1612
1680
  render() {
1613
1681
  this.reloadColumns();
1614
- const e = () => o("div", {
1682
+ const e = () => s("div", {
1615
1683
  class: "table-body"
1616
- }, [o("div", {
1684
+ }, [s("div", {
1617
1685
  class: "table-body-wrapper"
1618
- }, [o(Ge, se({
1686
+ }, [s(Ge, se({
1619
1687
  loading: this.tableLoading,
1620
1688
  data: this.tableSource,
1621
1689
  columns: this.tableColumns,
@@ -1628,25 +1696,25 @@ const lr = /* @__PURE__ */ A({
1628
1696
  selectedKeys: this.tableSelection.selectedRowKeys.value,
1629
1697
  "onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
1630
1698
  }, this.tableOptions), null)])]);
1631
- return o("div", {
1699
+ return s("div", {
1632
1700
  class: {
1633
1701
  "table-render": !0,
1634
1702
  "auto-fill": this.autoFill
1635
1703
  },
1636
1704
  ref: (t) => this.tableRenderElement = t
1637
- }, [o(Qe, {
1705
+ }, [s(Qe, {
1638
1706
  ref: (t) => this.modalInstance = t
1639
1707
  }, {
1640
- default: () => [o("div", {
1708
+ default: () => [s("div", {
1641
1709
  class: "table-render-content"
1642
1710
  }, [this.renders.renderTableForm(), this.renders.renderTableActions(), this.$slots.header && this.$slots.header(), e(), this.renders.renderTablePagination()])]
1643
1711
  })]);
1644
1712
  }
1645
1713
  });
1646
- function br(e) {
1714
+ function hr(e) {
1647
1715
  return e;
1648
1716
  }
1649
- function hr(e) {
1717
+ function br(e) {
1650
1718
  return e;
1651
1719
  }
1652
1720
  const gr = {
@@ -1656,10 +1724,10 @@ const gr = {
1656
1724
  };
1657
1725
  export {
1658
1726
  cr as TableRender,
1659
- xr as TableRenderResolver,
1727
+ Cr as TableRenderResolver,
1660
1728
  gr as default,
1661
- br as defineColumns,
1662
- hr as defineTableLoad,
1729
+ hr as defineColumns,
1730
+ br as defineTableLoad,
1663
1731
  tt as useEvents,
1664
1732
  yr as useTable
1665
1733
  };