@gopowerteam/table-render 0.0.158 → 0.0.159

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,22 +1,22 @@
1
- var Oe = Object.defineProperty;
2
- var Re = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var _ = (e, t, r) => (Re(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { ref as w, getCurrentInstance as F, onMounted as A, onUpdated as $e, reactive as Ee, createVNode as s, Fragment as K, createTextVNode as Y, getCurrentScope as je, onScopeDispose as Le, unref as Pe, readonly as fe, computed as E, watchEffect as qe, 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 P, 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
- import { useModal as D, onSubmit as Je, ModalProvider as Qe } from "@gopowerteam/modal-render";
7
- import * as Xe from "exceljs";
1
+ var $e = Object.defineProperty;
2
+ var Oe = (e, t, r) => t in e ? $e(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var $ = (e, t, r) => (Oe(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { ref as g, getCurrentInstance as F, onMounted as A, onUpdated as je, reactive as Le, createVNode as f, Fragment as H, createTextVNode as Y, getCurrentScope as Re, onScopeDispose as Ee, unref as qe, readonly as se, computed as j, watchEffect as Pe, watch as Ye, h as ze, render as Ae, defineComponent as B, isVNode as Be, mergeProps as fe, 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 He, DescriptionsItem as Ke, Divider as We, Space as ae, Pagination as Ne, Transfer as Ue, Table as Ge } from "@arco-design/web-vue";
6
+ import { useModal as D, onSubmit as Ze, ModalProvider as Je } from "@gopowerteam/modal-render";
7
+ import * as Qe from "exceljs";
8
8
  import I from "dayjs";
9
9
  import { FormRender as oe } from "@gopowerteam/form-render";
10
- import { TableRenderResolver as xr } from "./resolver.mjs";
11
- function Ze(e, t, r) {
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);
10
+ import { TableRenderResolver as kr } from "./resolver.mjs";
11
+ function Xe(e, t, r) {
12
+ const [u, ...a] = t.index ? t.index.split(".").reverse() : [t.key], n = a.reverse().reduce((l, i) => l == null ? void 0 : l[i], e);
13
13
  n[u] = r;
14
14
  }
15
15
  function pe(e) {
16
- const t = w([]), r = (a) => {
16
+ const t = g([]), r = (a) => {
17
17
  const n = e.filter((l) => l.formatter);
18
- return n.length > 0 ? a.map((l) => (n.forEach((c) => {
19
- c.formatter && Ze(l, c, c.formatter(l));
18
+ return n.length > 0 ? a.map((l) => (n.forEach((i) => {
19
+ i.formatter && Xe(l, i, i.formatter(l));
20
20
  }), l)) : a;
21
21
  };
22
22
  return [t, (a) => {
@@ -30,14 +30,14 @@ function et(e) {
30
30
  ...typeof t.form == "boolean" ? {} : t.form
31
31
  }));
32
32
  }
33
- function hr(e) {
34
- const t = F(), r = w();
33
+ function yr(e) {
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 A(u), $e(u), r;
40
+ return A(u), je(u), r;
41
41
  }
42
42
  function tt(e) {
43
43
  return (t, r) => e[t](r);
@@ -49,13 +49,13 @@ class V {
49
49
  * @param size
50
50
  */
51
51
  constructor(t = 1, r = 10) {
52
- _(this, "data", Ee({
52
+ $(this, "data", Le({
53
53
  index: 1,
54
54
  size: 10,
55
55
  total: 0
56
56
  }));
57
- _(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
58
- _(this, "pageLayouts", ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]);
57
+ $(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
58
+ $(this, "pageLayouts", ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]);
59
59
  this.pageIndex = t, this.pageSize = r;
60
60
  }
61
61
  get pageIndex() {
@@ -103,42 +103,42 @@ class V {
103
103
  }
104
104
  }
105
105
  const rt = Symbol.for("RenderColumnType");
106
- function k(e, t, r) {
106
+ function x(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 S(e, t) {
109
+ function T(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
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 k("button", (r, u, a) => {
117
- const n = D(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (d, f) => typeof d == "function" ? d(r) : d === void 0 ? f : d;
118
- async function m(d) {
119
- if (await (d.confirm === !0 ? new Promise((o) => {
116
+ return x("button", (r, u, a) => {
117
+ const n = D(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], i = (s, d) => typeof s == "function" ? s(r) : s === void 0 ? d : s;
118
+ async function o(s) {
119
+ if (await (s.confirm === !0 ? new Promise((m) => {
120
120
  n.confirm({
121
121
  title: "提示信息",
122
- content: d.confirmText ?? "您确定要执行该操作?",
123
- onOk: () => o(!0),
124
- onCancel: () => o(!1)
122
+ content: s.confirmText ?? "您确定要执行该操作?",
123
+ onOk: () => m(!0),
124
+ onCancel: () => m(!1)
125
125
  });
126
- }) : Promise.resolve(!0)) && (d != null && d.onClick)) {
127
- const o = d.onClick(r);
128
- z(o) && d.autoReload !== !1 && o.then(() => {
126
+ }) : Promise.resolve(!0)) && (s != null && s.onClick)) {
127
+ const m = s.onClick(r);
128
+ z(m) && s.autoReload !== !1 && m.then(() => {
129
129
  a != null && a.emits && (a == null || a.emits("reload"));
130
- }), !z(o) && d.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
130
+ }), !z(m) && s.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
131
131
  }
132
132
  }
133
- return s(K, null, [l.filter((d) => c(d.visiable, !0)).map((d) => s(P, {
134
- onClick: () => m(d),
135
- type: d.type || "text",
136
- shape: d.shape,
133
+ return f(H, null, [l.filter((s) => i(s.visiable, !0)).map((s) => f(q, {
134
+ onClick: () => o(s),
135
+ type: s.type || "text",
136
+ shape: s.shape,
137
137
  size: "mini",
138
- disabled: c(d.disabled, !1)
138
+ disabled: i(s.disabled, !1)
139
139
  }, {
140
- icon: d.icon ? () => d.icon(r) : void 0,
141
- default: () => (typeof d.content == "function" ? d.content(r) : d.content) || ""
140
+ icon: s.icon ? () => s.icon(r) : void 0,
141
+ default: () => (typeof s.content == "function" ? s.content(r) : s.content) || ""
142
142
  }))]);
143
143
  }, {
144
144
  disableViewMode: !0
@@ -163,8 +163,8 @@ function lt(e) {
163
163
  return;
164
164
  if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
165
165
  return n;
166
- const l = le[e.inputUnit] / le[e.outputUnit], c = parseFloat((n * l).toFixed(10));
167
- return (e == null ? void 0 : e.precision) === void 0 ? c : c.toFixed(e == null ? void 0 : e.precision);
166
+ const l = le[e.inputUnit] / le[e.outputUnit], i = parseFloat((n * l).toFixed(10));
167
+ return (e == null ? void 0 : e.precision) === void 0 ? i : i.toFixed(e == null ? void 0 : e.precision);
168
168
  }, r = (n) => {
169
169
  if (n == null)
170
170
  return;
@@ -178,14 +178,14 @@ function lt(e) {
178
178
  const l = t(Number(n));
179
179
  return e != null && e.thousands ? r(l) : l;
180
180
  };
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", {
181
+ return x("dict", (n, l) => {
182
+ const i = T(n, l);
183
+ return f("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? f("span", null, [e.prefix()]) : void 0, f("span", {
184
184
  class: "currency_value"
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]);
185
+ }, [u(i)]), typeof (e == null ? void 0 : e.suffix) == "string" ? f("span", null, [e.suffix]) : typeof (e == null ? void 0 : e.suffix) == "function" ? f("span", null, [e.suffix()]) : void 0]);
186
186
  });
187
187
  }
188
- var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ct = { exports: {} };
188
+ var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, it = { exports: {} };
189
189
  (function(e, t) {
190
190
  (function(r, u) {
191
191
  e.exports = u(I);
@@ -202,8 +202,8 @@ var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
202
202
  weekdaysMin: "日_一_二_三_四_五_六".split("_"),
203
203
  months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
204
204
  monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
205
- ordinal: function(l, c) {
206
- return c === "W" ? l + "周" : l + "日";
205
+ ordinal: function(l, i) {
206
+ return i === "W" ? l + "周" : l + "日";
207
207
  },
208
208
  weekStart: 1,
209
209
  yearStart: 4,
@@ -234,143 +234,143 @@ var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
234
234
  y: "1 年",
235
235
  yy: "%d 年"
236
236
  },
237
- meridiem: function(l, c) {
238
- var m = 100 * l + c;
239
- return m < 600 ? "凌晨" : m < 900 ? "早上" : m < 1100 ? "上午" : m < 1300 ? "中午" : m < 1800 ? "下午" : "晚上";
237
+ meridiem: function(l, i) {
238
+ var o = 100 * l + i;
239
+ return o < 600 ? "凌晨" : o < 900 ? "早上" : o < 1100 ? "上午" : o < 1300 ? "中午" : o < 1800 ? "下午" : "晚上";
240
240
  }
241
241
  };
242
242
  return a.default.locale(n, null, !0), n;
243
243
  });
244
- })(ct);
244
+ })(it);
245
245
  I.locale("zh-cn");
246
- const it = {
246
+ const ct = {
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
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)]);
253
+ return x("date", (r, u) => {
254
+ const a = T(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : ct[(e == null ? void 0 : e.format) || "datetime"], l = I(a);
255
+ return f("span", null, [l.isValid() && l.format(n)]);
256
256
  });
257
257
  }
258
- const ft = {
258
+ const st = {
259
259
  success: "arcoblue",
260
260
  warning: "orange",
261
261
  error: "red"
262
262
  };
263
- function st(e) {
263
+ function ft(e) {
264
264
  return e instanceof Map ? e : e.dict;
265
265
  }
266
266
  function ot(e) {
267
267
  const t = e instanceof Map ? !1 : e.tag;
268
- return typeof t == "string" ? ft[t] : t;
268
+ return typeof t == "string" ? st[t] : t;
269
269
  }
270
270
  function mt(e) {
271
- const t = st(e), r = ot(e);
272
- return k("dict", (a, n) => {
273
- const l = S(a, n);
274
- return r ? s(Ve, {
271
+ const t = ft(e), r = ot(e);
272
+ return x("dict", (a, n) => {
273
+ const l = T(a, n);
274
+ return r ? f(Ve, {
275
275
  color: r === !0 ? void 0 : r
276
276
  }, {
277
277
  default: () => [t.get(l) || l]
278
- }) : s("span", null, [t.get(l) || l]);
278
+ }) : f("span", null, [t.get(l) || l]);
279
279
  });
280
280
  }
281
- function yt(e) {
281
+ function ht(e) {
282
282
  const t = D();
283
283
  async function r(a, n) {
284
- a.confirm && !await new Promise((c, m) => {
284
+ a.confirm && !await new Promise((i, o) => {
285
285
  t.open("confirm", {
286
286
  title: "确认",
287
287
  content: a.confirmText || "是否确认执行该操作?",
288
- onOk: () => c(!0),
289
- onCancel: () => c(!1)
288
+ onOk: () => i(!0),
289
+ onCancel: () => i(!1)
290
290
  });
291
291
  }) || a.onClick(n);
292
292
  }
293
- return k("dropdown", (a, n) => {
294
- const l = e.options.filter((c) => typeof c.visiable == "function" ? c.visiable(a) : c.visiable !== !1);
295
- return s(ne, {
293
+ return x("dropdown", (a, n) => {
294
+ const l = e.options.filter((i) => typeof i.visiable == "function" ? i.visiable(a) : i.visiable !== !1);
295
+ return f(ne, {
296
296
  trigger: (e == null ? void 0 : e.trigger) || "click"
297
297
  }, {
298
- default: () => s(P, {
298
+ default: () => f(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) => s(ne.Option, {
305
- onClick: () => r(c, a)
304
+ content: () => l.map((i) => f(ne.Option, {
305
+ onClick: () => r(i, a)
306
306
  }, {
307
- default: () => [typeof c.content == "function" ? c.content(a) : c.content]
307
+ default: () => [typeof i.content == "function" ? i.content(a) : i.content]
308
308
  }))
309
309
  });
310
310
  });
311
311
  }
312
- const ht = {
312
+ const yt = {
313
313
  size: 30
314
314
  };
315
315
  function bt(e) {
316
316
  e = {
317
- ...ht,
317
+ ...yt,
318
318
  ...e || {}
319
319
  };
320
320
  function t(a, n) {
321
- var c;
322
- const l = (c = document.getElementById(a)) == null ? void 0 : c.getBoundingClientRect();
321
+ var i;
322
+ const l = (i = document.getElementById(a)) == null ? void 0 : i.getBoundingClientRect();
323
323
  if (l) {
324
- const m = new Image(100, 100);
325
- m.id = `IMAGE_${a}_PREVIEW`, m.src = n, m.setAttribute("style", ["position:fixed;", `top:${l.top}px;`, `left:${l.left + l.width}px;`, "min-width:400px;", "height:auto;", "z-index:100;"].join("")), document.body.appendChild(m);
324
+ const o = new Image(100, 100);
325
+ o.id = `IMAGE_${a}_PREVIEW`, o.src = n, o.setAttribute("style", ["position:fixed;", `top:${l.top}px;`, `left:${l.left + l.width}px;`, "min-width:400px;", "height:auto;", "z-index:100;"].join("")), document.body.appendChild(o);
326
326
  }
327
327
  }
328
328
  function r(a) {
329
329
  const n = document.getElementById(`IMAGE_${a}_PREVIEW`);
330
330
  n == null || n.remove();
331
331
  }
332
- return k("image", (a, n, l) => {
333
- const c = S(a, n), m = Math.random().toString(32).slice(2).toUpperCase(), d = {
332
+ return x("image", (a, n, l) => {
333
+ const i = T(a, n), o = Math.random().toString(32).slice(2).toUpperCase(), s = {
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
- }, f = `${n.index || n.key}_parsed`;
340
+ }, d = `${n.index || n.key}_parsed`;
341
341
  if (e != null && e.parse) {
342
- const o = e == null ? void 0 : e.parse(c, a);
343
- z(o) ? o.then((y) => a[f] = y ?? "") : a[f] = o ?? "";
342
+ const m = e == null ? void 0 : e.parse(i, a);
343
+ z(m) ? m.then((h) => a[d] = h ?? "") : a[d] = m ?? "";
344
344
  }
345
- if (e != null && e.parse && !a[f] === void 0)
346
- return s("div", null, [Y("Loading...")]);
345
+ if (e != null && e.parse && !a[d] === void 0)
346
+ return f("div", null, [Y("Loading...")]);
347
347
  {
348
- const o = a[f] || c;
349
- return o ? s("div", {
350
- id: m,
351
- onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(m, o),
352
- onMouseleave: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && r(m),
348
+ const m = a[d] || i;
349
+ return m ? f("div", {
350
+ id: o,
351
+ onMouseenter: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && t(o, m),
352
+ onMouseleave: () => (e == null ? void 0 : e.preview) && !(l != null && l.previewing) && r(o),
353
353
  style: {
354
354
  display: "flex",
355
355
  justifyContent: "center",
356
356
  alignItems: "center",
357
357
  height: `${e == null ? void 0 : e.size}px`
358
358
  }
359
- }, [s("img", {
359
+ }, [f("img", {
360
360
  alt: "image",
361
- style: d,
362
- src: o
363
- }, null)]) : s(K, null, null);
361
+ style: s,
362
+ src: m
363
+ }, null)]) : f(H, null, null);
364
364
  }
365
365
  });
366
366
  }
367
- function W(e) {
368
- return je() ? (Le(e), !0) : !1;
367
+ function K(e) {
368
+ return Re() ? (Ee(e), !0) : !1;
369
369
  }
370
370
  function O(e) {
371
- return typeof e == "function" ? e() : Pe(e);
371
+ return typeof e == "function" ? e() : qe(e);
372
372
  }
373
- const H = typeof window < "u" && typeof document < "u";
373
+ const W = 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
  };
@@ -384,33 +384,33 @@ function Ct(e) {
384
384
  t = void 0, u && await u;
385
385
  }, r;
386
386
  }
387
- function xt(e, t) {
387
+ function kt(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 kt(e, t, r = {}) {
394
+ function xt(e, t, r = {}) {
395
395
  const {
396
396
  immediate: u = !0
397
- } = r, a = w(!1);
397
+ } = r, a = g(!1);
398
398
  let n = null;
399
399
  function l() {
400
400
  n && (clearTimeout(n), n = null);
401
401
  }
402
- function c() {
402
+ function i() {
403
403
  a.value = !1, l();
404
404
  }
405
- function m(...d) {
405
+ function o(...s) {
406
406
  l(), a.value = !0, n = setTimeout(() => {
407
- a.value = !1, n = null, e(...d);
407
+ a.value = !1, n = null, e(...s);
408
408
  }, O(t));
409
409
  }
410
- return u && (a.value = !0, H && m()), W(c), {
411
- isPending: fe(a),
412
- start: m,
413
- stop: c
410
+ return u && (a.value = !0, W && o()), K(i), {
411
+ isPending: se(a),
412
+ start: o,
413
+ stop: i
414
414
  };
415
415
  }
416
416
  function St(e) {
@@ -418,103 +418,103 @@ function St(e) {
418
418
  const r = O(e);
419
419
  return (t = r == null ? void 0 : r.$el) != null ? t : r;
420
420
  }
421
- const N = H ? window : void 0, me = H ? window.navigator : void 0;
422
- function ye(...e) {
421
+ const N = W ? window : void 0, me = W ? window.navigator : void 0;
422
+ function he(...e) {
423
423
  let t, r, u, a;
424
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((f) => f()), n.length = 0;
429
- }, c = (f, o, y, b) => (f.addEventListener(o, y, b), () => f.removeEventListener(o, y, b)), m = Ye(
428
+ n.forEach((d) => d()), n.length = 0;
429
+ }, i = (d, m, h, w) => (d.addEventListener(m, h, w), () => d.removeEventListener(m, h, w)), o = Ye(
430
430
  () => [St(t), O(a)],
431
- ([f, o]) => {
432
- if (l(), !f)
431
+ ([d, m]) => {
432
+ if (l(), !d)
433
433
  return;
434
- const y = wt(o) ? { ...o } : o;
434
+ const h = wt(m) ? { ...m } : m;
435
435
  n.push(
436
- ...r.flatMap((b) => u.map((v) => c(f, b, v, y)))
436
+ ...r.flatMap((w) => u.map((S) => i(d, w, S, h)))
437
437
  );
438
438
  },
439
439
  { immediate: !0, flush: "post" }
440
- ), d = () => {
441
- m(), l();
440
+ ), s = () => {
441
+ o(), l();
442
442
  };
443
- return W(d), d;
443
+ return K(s), s;
444
444
  }
445
- function Tt() {
446
- const e = w(!1), t = F();
445
+ function Mt() {
446
+ const e = g(!1), t = F();
447
447
  return t && A(() => {
448
448
  e.value = !0;
449
449
  }, t), e;
450
450
  }
451
451
  function U(e) {
452
- const t = Tt();
453
- return E(() => (t.value, !!e()));
452
+ const t = Mt();
453
+ return j(() => (t.value, !!e()));
454
454
  }
455
- function L(e, t = {}) {
455
+ function E(e, t = {}) {
456
456
  const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
457
457
  let a;
458
- const n = w(!1), l = (d) => {
459
- n.value = d.matches;
460
- }, c = () => {
458
+ const n = g(!1), l = (s) => {
459
+ n.value = s.matches;
460
+ }, i = () => {
461
461
  a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
462
- }, m = qe(() => {
463
- u.value && (c(), a = r.matchMedia(O(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
462
+ }, o = Pe(() => {
463
+ u.value && (i(), a = r.matchMedia(O(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
464
464
  });
465
- return W(() => {
466
- m(), c(), a = void 0;
465
+ return K(() => {
466
+ o(), i(), a = void 0;
467
467
  }), n;
468
468
  }
469
- function Mt(e, t = {}) {
470
- function r(f, o) {
471
- let y = O(e[O(f)]);
472
- return o != null && (y = xt(y, o)), typeof y == "number" && (y = `${y}px`), y;
469
+ function Tt(e, t = {}) {
470
+ function r(d, m) {
471
+ let h = O(e[O(d)]);
472
+ return m != null && (h = kt(h, m)), typeof h == "number" && (h = `${h}px`), h;
473
473
  }
474
474
  const { window: u = N, strategy: a = "min-width" } = t;
475
- function n(f) {
476
- return u ? u.matchMedia(f).matches : !1;
475
+ function n(d) {
476
+ return u ? u.matchMedia(d).matches : !1;
477
477
  }
478
- const l = (f) => L(() => `(min-width: ${r(f)})`, t), c = (f) => L(() => `(max-width: ${r(f)})`, t), m = Object.keys(e).reduce((f, o) => (Object.defineProperty(f, o, {
479
- get: () => a === "min-width" ? l(o) : c(o),
478
+ const l = (d) => E(() => `(min-width: ${r(d)})`, t), i = (d) => E(() => `(max-width: ${r(d)})`, t), o = Object.keys(e).reduce((d, m) => (Object.defineProperty(d, m, {
479
+ get: () => a === "min-width" ? l(m) : i(m),
480
480
  enumerable: !0,
481
481
  configurable: !0
482
- }), f), {});
483
- function d() {
484
- const f = Object.keys(e).map((o) => [o, l(o)]);
485
- return E(() => f.filter(([, o]) => o.value).map(([o]) => o));
482
+ }), d), {});
483
+ function s() {
484
+ const d = Object.keys(e).map((m) => [m, l(m)]);
485
+ return j(() => d.filter(([, m]) => m.value).map(([m]) => m));
486
486
  }
487
- return Object.assign(m, {
487
+ return Object.assign(o, {
488
488
  greaterOrEqual: l,
489
- smallerOrEqual: c,
490
- greater(f) {
491
- return L(() => `(min-width: ${r(f, 0.1)})`, t);
489
+ smallerOrEqual: i,
490
+ greater(d) {
491
+ return E(() => `(min-width: ${r(d, 0.1)})`, t);
492
492
  },
493
- smaller(f) {
494
- return L(() => `(max-width: ${r(f, -0.1)})`, t);
493
+ smaller(d) {
494
+ return E(() => `(max-width: ${r(d, -0.1)})`, t);
495
495
  },
496
- between(f, o) {
497
- return L(() => `(min-width: ${r(f)}) and (max-width: ${r(o, -0.1)})`, t);
496
+ between(d, m) {
497
+ return E(() => `(min-width: ${r(d)}) and (max-width: ${r(m, -0.1)})`, t);
498
498
  },
499
- isGreater(f) {
500
- return n(`(min-width: ${r(f, 0.1)})`);
499
+ isGreater(d) {
500
+ return n(`(min-width: ${r(d, 0.1)})`);
501
501
  },
502
- isGreaterOrEqual(f) {
503
- return n(`(min-width: ${r(f)})`);
502
+ isGreaterOrEqual(d) {
503
+ return n(`(min-width: ${r(d)})`);
504
504
  },
505
- isSmaller(f) {
506
- return n(`(max-width: ${r(f, -0.1)})`);
505
+ isSmaller(d) {
506
+ return n(`(max-width: ${r(d, -0.1)})`);
507
507
  },
508
- isSmallerOrEqual(f) {
509
- return n(`(max-width: ${r(f)})`);
508
+ isSmallerOrEqual(d) {
509
+ return n(`(max-width: ${r(d)})`);
510
510
  },
511
- isInBetween(f, o) {
512
- return n(`(min-width: ${r(f)}) and (max-width: ${r(o, -0.1)})`);
511
+ isInBetween(d, m) {
512
+ return n(`(min-width: ${r(d)}) and (max-width: ${r(m, -0.1)})`);
513
513
  },
514
- current: d,
514
+ current: s,
515
515
  active() {
516
- const f = d();
517
- return E(() => f.value.length === 0 ? "" : f.value.at(-1));
516
+ const d = s();
517
+ return j(() => d.value.length === 0 ? "" : d.value.at(-1));
518
518
  }
519
519
  });
520
520
  }
@@ -524,24 +524,24 @@ function ue(e, t = {}) {
524
524
  navigator: u = me
525
525
  } = t, a = U(() => u && "permissions" in u);
526
526
  let n;
527
- const l = typeof e == "string" ? { name: e } : e, c = w(), m = () => {
528
- n && (c.value = n.state);
529
- }, d = Ct(async () => {
527
+ const l = typeof e == "string" ? { name: e } : e, i = g(), o = () => {
528
+ n && (i.value = n.state);
529
+ }, s = Ct(async () => {
530
530
  if (a.value) {
531
531
  if (!n)
532
532
  try {
533
- n = await u.permissions.query(l), ye(n, "change", m), m();
533
+ n = await u.permissions.query(l), he(n, "change", o), o();
534
534
  } catch {
535
- c.value = "prompt";
535
+ i.value = "prompt";
536
536
  }
537
537
  return n;
538
538
  }
539
539
  });
540
- return d(), r ? {
541
- state: c,
540
+ return s(), r ? {
541
+ state: i,
542
542
  isSupported: a,
543
- query: d
544
- } : c;
543
+ query: s
544
+ } : i;
545
545
  }
546
546
  function _t(e = {}) {
547
547
  const {
@@ -550,138 +550,150 @@ function _t(e = {}) {
550
550
  source: u,
551
551
  copiedDuring: a = 1500,
552
552
  legacy: n = !1
553
- } = e, l = U(() => t && "clipboard" in t), c = ue("clipboard-read"), m = ue("clipboard-write"), d = E(() => l.value || n), f = w(""), o = w(!1), y = kt(() => o.value = !1, a);
554
- function b() {
555
- l.value && T(c.value) ? t.clipboard.readText().then((g) => {
556
- f.value = g;
557
- }) : f.value = R();
553
+ } = e, l = U(() => t && "clipboard" in t), i = ue("clipboard-read"), o = ue("clipboard-write"), s = j(() => l.value || n), d = g(""), m = g(!1), h = xt(() => m.value = !1, a);
554
+ function w() {
555
+ l.value && v(i.value) ? t.clipboard.readText().then((y) => {
556
+ d.value = y;
557
+ }) : d.value = L();
558
558
  }
559
- d.value && r && ye(["copy", "cut"], b);
560
- async function v(g = O(u)) {
561
- d.value && g != null && (l.value && T(m.value) ? await t.clipboard.writeText(g) : C(g), f.value = g, o.value = !0, y.start());
559
+ s.value && r && he(["copy", "cut"], w);
560
+ async function S(y = O(u)) {
561
+ s.value && y != null && (l.value && v(o.value) ? await t.clipboard.writeText(y) : k(y), d.value = y, m.value = !0, h.start());
562
562
  }
563
- function C(g) {
564
- const x = document.createElement("textarea");
565
- x.value = g ?? "", x.style.position = "absolute", x.style.opacity = "0", document.body.appendChild(x), x.select(), document.execCommand("copy"), x.remove();
563
+ function k(y) {
564
+ const C = document.createElement("textarea");
565
+ C.value = y ?? "", C.style.position = "absolute", C.style.opacity = "0", document.body.appendChild(C), C.select(), document.execCommand("copy"), C.remove();
566
566
  }
567
- function R() {
568
- var g, x, $;
569
- return ($ = (x = (g = document == null ? void 0 : document.getSelection) == null ? void 0 : g.call(document)) == null ? void 0 : x.toString()) != null ? $ : "";
567
+ function L() {
568
+ var y, C, M;
569
+ return (M = (C = (y = document == null ? void 0 : document.getSelection) == null ? void 0 : y.call(document)) == null ? void 0 : C.toString()) != null ? M : "";
570
570
  }
571
- function T(g) {
572
- return g === "granted" || g === "prompt";
571
+ function v(y) {
572
+ return y === "granted" || y === "prompt";
573
573
  }
574
574
  return {
575
- isSupported: d,
576
- text: f,
577
- copied: o,
578
- copy: v
575
+ isSupported: s,
576
+ text: d,
577
+ copied: m,
578
+ copy: S
579
579
  };
580
580
  }
581
- const Ot = " ";
582
- function Rt(e) {
581
+ const $t = " ";
582
+ function Ot(e) {
583
583
  return e == null ? void 0 : e.replace(/(\d{3})\d*(\d{4})/g, "$1****$2");
584
584
  }
585
- function ce(e, t) {
586
- return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? Ot).replace(/M/g, "*");
585
+ function ie(e, t) {
586
+ return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? $t).replace(/M/g, "*");
587
587
  }
588
- function $t(e) {
588
+ function jt(e) {
589
589
  const t = _t();
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), d = ce(c, e == null ? void 0 : e.separator);
592
- function f() {
593
- window.focus(), t.copy(c).then(() => {
590
+ return x("phone", (u, a) => {
591
+ const n = `phone_${Math.random().toString(36).slice(2)}`, l = "__table__column_phone__", i = T(u, a), o = 16, s = `cursor:pointer;width:${o}px;height:${o}px;`, d = ie(Ot(i), e == null ? void 0 : e.separator), m = ie(i, e == null ? void 0 : e.separator);
592
+ function h() {
593
+ window.focus(), t.copy(i).then(() => {
594
594
  Fe.success({
595
595
  content: "复制成功",
596
596
  duration: 1e3
597
597
  });
598
598
  });
599
599
  }
600
- function o() {
601
- const C = document.getElementById(n), R = document.querySelectorAll(`.${l}`);
602
- R.length > 0 && R.forEach((T) => {
603
- const g = T;
604
- g.innerHTML = g.dataset.encrypt;
605
- }), C && (C.innerHTML = d);
600
+ function w() {
601
+ const v = document.querySelectorAll(`.${l}.content`);
602
+ v.length > 0 && v.forEach((y) => {
603
+ const C = y;
604
+ if (C.innerText.includes("****"))
605
+ return;
606
+ C.innerText = C.dataset.encrypt;
607
+ const M = C.nextSibling;
608
+ !M || !M.classList.contains("preview-icon") || (M.innerHTML = `<svg width="${o}" height="${o}" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path 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" fill="none" stroke="#333" stroke-width="2" stroke-linejoin="round"/><path 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" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>`);
609
+ });
610
+ }
611
+ function S(v) {
612
+ const y = document.querySelector(`#${n}>.preview-icon`);
613
+ y && (v ? y.innerHTML = `<svg width="${o}" height="${o}" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path 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" fill="none" stroke="#333" stroke-width="2" stroke-linejoin="round"/><path 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" fill="none" stroke="#333" stroke-width="4" stroke-linejoin="round"/></svg>` : y.innerHTML = `<svg width="${o}" height="${o}" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 16C6.63472 17.2193 7.59646 18.3504 8.82276 19.3554C12.261 22.1733 17.779 24 24 24C30.221 24 35.739 22.1733 39.1772 19.3554C40.4035 18.3504 41.3653 17.2193 42 16" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M28.9775 24L31.048 31.7274" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M37.3535 21.3536L43.0103 27.0104" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M5.00004 27.0103L10.6569 21.3534" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/><path d="M16.9278 31.7276L18.9983 24.0001" stroke="#333" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>`);
606
614
  }
607
- function y() {
608
- window.open(`tel:${c}`, "_blank");
615
+ function k() {
616
+ const v = document.querySelector(`#${n}>.content`), y = !!(v != null && v.innerHTML.includes("****"));
617
+ y ? (w(), v && (v.innerHTML = m)) : v && (v.innerHTML = d), S(!y);
609
618
  }
610
- const b = 16, v = `cursor:pointer;width:${b}px;height:${b}px;`;
611
- return s("div", {
612
- style: "display:flex;align-items:center;gap:4px;"
613
- }, [s("div", {
614
- "data-encrypt": m,
615
- class: l,
619
+ function L() {
620
+ window.open(`tel:${i}`, "_blank");
621
+ }
622
+ return f("div", {
616
623
  id: n,
624
+ style: "display:flex;align-items:center;gap:4px;"
625
+ }, [f("div", {
626
+ "data-encrypt": d,
627
+ class: `${l} content`,
617
628
  style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
618
- }, [e != null && e.safe ? m : d]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && s("i", {
629
+ }, [e != null && e.safe ? d : m]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && f("i", {
630
+ class: "preview-icon",
619
631
  title: "显示完整号码",
620
- style: v,
621
- onClick: o
622
- }, [s("svg", {
623
- width: b,
624
- height: b,
632
+ style: s,
633
+ onClick: k
634
+ }, [f("svg", {
635
+ width: o,
636
+ height: o,
625
637
  viewBox: "0 0 48 48",
626
638
  fill: "none",
627
639
  xmlns: "http://www.w3.org/2000/svg"
628
- }, [s("path", {
640
+ }, [f("path", {
629
641
  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",
630
642
  fill: "none",
631
643
  stroke: "#333",
632
644
  "stroke-width": "2",
633
645
  "stroke-linejoin": "round"
634
- }, null), s("path", {
646
+ }, null), f("path", {
635
647
  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",
636
648
  fill: "none",
637
649
  stroke: "#333",
638
650
  "stroke-width": "4",
639
651
  "stroke-linejoin": "round"
640
- }, null)])]), (e == null ? void 0 : e.allowDial) && s("i", {
641
- style: v,
652
+ }, null)])]), (e == null ? void 0 : e.allowDial) && f("i", {
653
+ style: s,
642
654
  title: "拨出号码",
643
- onClick: y
644
- }, [s("svg", {
645
- width: b,
646
- height: b,
655
+ onClick: L
656
+ }, [f("svg", {
657
+ width: o,
658
+ height: o,
647
659
  viewBox: "0 0 48 48",
648
660
  fill: "none",
649
661
  xmlns: "http://www.w3.org/2000/svg"
650
- }, [s("path", {
662
+ }, [f("path", {
651
663
  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",
652
664
  stroke: "#333",
653
665
  "stroke-width": "2",
654
666
  "stroke-linecap": "round",
655
667
  "stroke-linejoin": "round"
656
- }, null), s("path", {
668
+ }, null), f("path", {
657
669
  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",
658
670
  stroke: "#333",
659
671
  "stroke-width": "4",
660
672
  "stroke-linecap": "round",
661
673
  "stroke-linejoin": "round"
662
- }, null), s("path", {
674
+ }, null), f("path", {
663
675
  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",
664
676
  fill: "none",
665
677
  stroke: "#333",
666
678
  "stroke-width": "4",
667
679
  "stroke-linejoin": "round"
668
- }, null)])]), (e == null ? void 0 : e.allowCopy) && s("i", {
669
- style: v,
680
+ }, null)])]), (e == null ? void 0 : e.allowCopy) && f("i", {
681
+ style: s,
670
682
  title: "复制号码",
671
- onClick: f
672
- }, [s("svg", {
673
- width: b,
674
- height: b,
683
+ onClick: h
684
+ }, [f("svg", {
685
+ width: o,
686
+ height: o,
675
687
  viewBox: "0 0 48 48",
676
688
  fill: "none",
677
689
  xmlns: "http://www.w3.org/2000/svg"
678
- }, [s("path", {
690
+ }, [f("path", {
679
691
  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",
680
692
  stroke: "#333",
681
693
  "stroke-width": "2",
682
694
  "stroke-linecap": "round",
683
695
  "stroke-linejoin": "round"
684
- }, null), s("path", {
696
+ }, null), f("path", {
685
697
  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",
686
698
  fill: "none",
687
699
  stroke: "#333",
@@ -690,45 +702,45 @@ function $t(e) {
690
702
  }, null)])])]);
691
703
  });
692
704
  }
693
- function Et(e) {
694
- return k("render", (r) => e(r));
705
+ function Lt(e) {
706
+ return x("render", (r) => e(r));
695
707
  }
696
- function jt(e) {
697
- return k("tag", (r, u) => {
698
- 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, d = e == null ? void 0 : e.minWidth;
699
- return s("div", {
708
+ function Rt(e) {
709
+ return x("tag", (r, u) => {
710
+ const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : T(r, u), l = (e == null ? void 0 : e.textColors) || ["#F87335"], i = (e == null ? void 0 : e.backgroundColors) || ["#FFF4E8"], o = n.length > a, s = e == null ? void 0 : e.minWidth;
711
+ return f("div", {
700
712
  style: {
701
713
  display: "flex",
702
714
  flexWrap: "wrap"
703
715
  }
704
- }, [n.slice(0, a).map((f, o) => {
705
- const y = typeof l == "function" ? l(f, o) : l[o % l.length], b = typeof c == "function" ? c(f, o) : c[o % c.length];
706
- return s("span", {
716
+ }, [n.slice(0, a).map((d, m) => {
717
+ const h = typeof l == "function" ? l(d, m) : l[m % l.length], w = typeof i == "function" ? i(d, m) : i[m % i.length];
718
+ return f("span", {
707
719
  style: {
708
- minWidth: d ? `${d}px` : "unset",
720
+ minWidth: s ? `${s}px` : "unset",
709
721
  textAlign: "center",
710
722
  margin: "2px",
711
723
  padding: "2px 5px",
712
- border: `solid 2px ${e != null && e.border ? y : "transparent"}`,
724
+ border: `solid 2px ${e != null && e.border ? h : "transparent"}`,
713
725
  borderRadius: `${(e == null ? void 0 : e.radius) || 0}px`,
714
- color: y,
715
- backgroundColor: b
726
+ color: h,
727
+ backgroundColor: w
716
728
  }
717
- }, [f]);
718
- }), m && "..."]);
729
+ }, [d]);
730
+ }), o && "..."]);
719
731
  });
720
732
  }
721
- function ie(e) {
733
+ function ce(e) {
722
734
  if (typeof e == "string")
723
735
  return e;
724
736
  if (typeof e == "number")
725
737
  return `${e}px`;
726
738
  }
727
- function Lt(e, t, r) {
739
+ function Et(e, t, r) {
728
740
  var u, a;
729
- 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);
741
+ 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 : T(r, t);
730
742
  }
731
- function Pt(e, t) {
743
+ function qt(e, t) {
732
744
  if (typeof e != "function") {
733
745
  if (typeof (e == null ? void 0 : e.color) == "function")
734
746
  return e == null ? void 0 : e.color(t);
@@ -736,45 +748,45 @@ function Pt(e, t) {
736
748
  return e == null ? void 0 : e.color;
737
749
  }
738
750
  }
739
- function qt(e, t) {
751
+ function Pt(e, t) {
740
752
  if (typeof e != "function")
741
- return typeof (e == null ? void 0 : e.size) == "function" ? ie(e == null ? void 0 : e.size(t)) : ie(e == null ? void 0 : e.size);
753
+ return typeof (e == null ? void 0 : e.size) == "function" ? ce(e == null ? void 0 : e.size(t)) : ce(e == null ? void 0 : e.size);
742
754
  }
743
755
  function Yt(e, t) {
744
756
  let r = "";
745
- const u = Pt(e, t), a = qt(e, t);
757
+ const u = qt(e, t), a = Pt(e, t);
746
758
  return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
747
759
  }
748
760
  function zt(e) {
749
- return k("text", (r, u) => {
750
- const a = Lt(e || {}, u, r), n = Yt(e || {}, r);
751
- return s("span", {
761
+ return x("text", (r, u) => {
762
+ const a = Et(e || {}, u, r), n = Yt(e || {}, r);
763
+ return f("span", {
752
764
  style: n
753
765
  }, [a]);
754
766
  });
755
767
  }
756
768
  function At(e) {
757
769
  const t = (e == null ? void 0 : e.backgroundColor) ?? "#f5f5f5", r = (e == null ? void 0 : e.foregroundColor) ?? "#1677ff", u = (e == null ? void 0 : e.showText) ?? !0, a = (e == null ? void 0 : e.textColor) ?? "#000";
758
- return k("progress", (l, c) => {
759
- var y;
760
- const m = S(l, c), d = (e == null ? void 0 : e.precision) ?? 0, f = Math.min(Math.max(((y = e == null ? void 0 : e.format) == null ? void 0 : y.call(e, m)) ?? m, 0), 1), o = u ? `${(f * 100).toFixed(d)}%` : "";
761
- return s("div", {
770
+ return x("progress", (l, i) => {
771
+ var h;
772
+ const o = T(l, i), s = (e == null ? void 0 : e.precision) ?? 0, d = Math.min(Math.max(((h = e == null ? void 0 : e.format) == null ? void 0 : h.call(e, o)) ?? o, 0), 1), m = u ? `${(d * 100).toFixed(s)}%` : "";
773
+ return f("div", {
762
774
  style: `background-color:${t};position:relative;min-height: 20px;text-align: center;border-radius: 2px;overflow:hidden;`
763
- }, [s("div", {
764
- style: `background-color: ${r};position:absolute;left:0;top:0;right;0;width: ${o};height: 100%;`
765
- }, null), u && s("div", {
775
+ }, [f("div", {
776
+ style: `background-color: ${r};position:absolute;left:0;top:0;right;0;width: ${m};height: 100%;`
777
+ }, null), u && f("div", {
766
778
  style: `position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:${a}`
767
- }, [o])]);
779
+ }, [m])]);
768
780
  });
769
781
  }
770
782
  function Bt() {
771
783
  return {
772
- dropdown: yt,
784
+ dropdown: ht,
773
785
  text: zt,
774
786
  dict: mt,
775
- tag: jt,
776
- render: Et,
777
- phone: $t,
787
+ tag: Rt,
788
+ render: Lt,
789
+ phone: jt,
778
790
  image: bt,
779
791
  currency: lt,
780
792
  date: dt,
@@ -808,18 +820,18 @@ function de({
808
820
  collapsedColumns: a,
809
821
  events: n
810
822
  }) {
811
- const l = e.map((c) => ({
823
+ const l = e.map((i) => ({
812
824
  ...t || {},
813
- ...c
814
- })).map((c) => Vt(c, u, a, n)).filter(Boolean);
825
+ ...i
826
+ })).map((i) => Vt(i, u, a, n)).filter(Boolean);
815
827
  return It(l, r);
816
828
  }
817
829
  function Dt(e, t) {
818
830
  const r = [], u = (n) => {
819
831
  if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
820
- const l = t.find((c) => {
821
- var m;
822
- return ((m = Object.getOwnPropertyDescriptor(c, "key")) == null ? void 0 : m.value) === n.key;
832
+ const l = t.find((i) => {
833
+ var o;
834
+ return ((o = Object.getOwnPropertyDescriptor(i, "key")) == null ? void 0 : o.value) === n.key;
823
835
  });
824
836
  if (l)
825
837
  return r.push(l), l;
@@ -829,8 +841,8 @@ function Dt(e, t) {
829
841
  if (r != null && r.length && a) {
830
842
  const n = Math.min(...r.map((l) => t.indexOf(l)));
831
843
  r.forEach((l) => {
832
- const c = t.indexOf(l);
833
- t.splice(c, 1);
844
+ const i = t.indexOf(l);
845
+ t.splice(i, 1);
834
846
  }), t.splice(n, 0, a);
835
847
  }
836
848
  }
@@ -867,9 +879,9 @@ function Vt(e, t, r, u) {
867
879
  };
868
880
  }
869
881
  function Ft() {
870
- return new Xe.Workbook();
882
+ return new Qe.Workbook();
871
883
  }
872
- function Kt(e, t = "Sheet1") {
884
+ function Ht(e, t = "Sheet1") {
873
885
  return e.addWorksheet(t, {
874
886
  headerFooter: {
875
887
  firstHeader: "",
@@ -877,10 +889,10 @@ function Kt(e, t = "Sheet1") {
877
889
  }
878
890
  });
879
891
  }
880
- function Wt(e, t) {
892
+ function Kt(e, t) {
881
893
  e.columns = t;
882
894
  }
883
- function Ht(e, t) {
895
+ function Wt(e, t) {
884
896
  e.addRows(t);
885
897
  }
886
898
  async function Nt({
@@ -888,8 +900,8 @@ async function Nt({
888
900
  rows: t,
889
901
  filename: r
890
902
  }) {
891
- const u = Ft(), a = Kt(u);
892
- Wt(a, e), Ht(a, t);
903
+ const u = Ft(), a = Ht(u);
904
+ Kt(a, e), Wt(a, t);
893
905
  const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
894
906
  Ut(l, r || `${I().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
895
907
  }
@@ -906,26 +918,26 @@ function Gt(e, t) {
906
918
  render: G(a),
907
919
  content: typeof a.exportable == "object" ? a.exportable.content : void 0
908
920
  })).forEach((a) => {
909
- var c;
910
- const n = (c = a.render) == null ? void 0 : c.render, l = () => {
911
- var m;
921
+ var i;
922
+ const n = (i = a.render) == null ? void 0 : i.render, l = () => {
923
+ var o;
912
924
  switch (!0) {
913
925
  case !!a.content:
914
926
  return a.content && a.content(t);
915
927
  case !!n: {
916
- const d = document.createElement("div"), f = ze(() => n && n({
928
+ const s = document.createElement("div"), d = ze(() => n && n({
917
929
  record: t
918
930
  }));
919
- return Ae(f, d), (m = f.el) == null ? void 0 : m.innerText;
931
+ return Ae(d, s), (o = d.el) == null ? void 0 : o.innerText;
920
932
  }
921
933
  default:
922
- return S(t, a.options);
934
+ return T(t, a.options);
923
935
  }
924
936
  };
925
937
  r[a.options.key] = l();
926
938
  }), r;
927
939
  }
928
- function Jt(e) {
940
+ function Zt(e) {
929
941
  switch (!0) {
930
942
  case typeof e == "number":
931
943
  return e / 6;
@@ -935,13 +947,13 @@ function Jt(e) {
935
947
  return 30;
936
948
  }
937
949
  }
938
- function Qt(e, t, r) {
950
+ function Jt(e, t, r) {
939
951
  const u = e.filter((n) => n.exportable !== !1).map((n) => {
940
- var l, c;
952
+ var l, i;
941
953
  return {
942
954
  key: n.key,
943
955
  header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
944
- width: ((c = n.exportable) == null ? void 0 : c.width) || Jt(n.width)
956
+ width: ((i = n.exportable) == null ? void 0 : i.width) || Zt(n.width)
945
957
  };
946
958
  }), a = t.map((n) => Gt(e, n));
947
959
  Nt({
@@ -950,16 +962,16 @@ function Qt(e, t, r) {
950
962
  filename: r
951
963
  });
952
964
  }
953
- function Xt() {
965
+ function Qt() {
954
966
  return {
955
- exportExcel: Qt
967
+ exportExcel: Jt
956
968
  };
957
969
  }
958
- class J {
970
+ class Z {
959
971
  constructor(t) {
960
- _(this, "sort", {});
961
- _(this, "defaultSort", {});
962
- _(this, "before", (t) => {
972
+ $(this, "sort", {});
973
+ $(this, "defaultSort", {});
974
+ $(this, "before", (t) => {
963
975
  t.paramsQuery = {
964
976
  ...t.paramsQuery || {},
965
977
  sort: this.stringify(this.sort)
@@ -995,19 +1007,19 @@ class J {
995
1007
  * 转换排序对象为字符串
996
1008
  */
997
1009
  stringify(t) {
998
- return typeof t != "object" ? [] : (t instanceof J && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
1010
+ return typeof t != "object" ? [] : (t instanceof Z && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
999
1011
  }
1000
1012
  }
1001
- const Zt = 300;
1013
+ const Xt = 300;
1002
1014
  function pt(e) {
1003
1015
  const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
1004
1016
  if (!r)
1005
1017
  return;
1006
1018
  let u, a = !1, n;
1007
1019
  r.addEventListener("mousedown", () => {
1008
- console.log("mousedown"), u = setTimeout(() => {
1020
+ u = setTimeout(() => {
1009
1021
  u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
1010
- }, Zt);
1022
+ }, Xt);
1011
1023
  }), r.addEventListener("mouseup", () => {
1012
1024
  clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
1013
1025
  }), r.addEventListener("mousemove", (l) => {
@@ -1015,8 +1027,8 @@ function pt(e) {
1015
1027
  if (n === void 0)
1016
1028
  n = l.clientX;
1017
1029
  else {
1018
- const c = n - l.clientX;
1019
- n = l.clientX, r.scrollLeft += c;
1030
+ const i = n - l.clientX;
1031
+ n = l.clientX, r.scrollLeft += i;
1020
1032
  }
1021
1033
  });
1022
1034
  }
@@ -1057,7 +1069,7 @@ const tr = /* @__PURE__ */ B({
1057
1069
  }
1058
1070
  },
1059
1071
  setup(e) {
1060
- const t = F(), r = w(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
1072
+ 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) => ({
1061
1073
  options: n,
1062
1074
  renderer: G(n, {
1063
1075
  previewing: !0
@@ -1081,21 +1093,21 @@ const tr = /* @__PURE__ */ B({
1081
1093
  a();
1082
1094
  }), () => {
1083
1095
  let n;
1084
- return s("div", {
1096
+ return f("div", {
1085
1097
  class: "preview-container"
1086
- }, [s(Ke, {
1098
+ }, [f(He, {
1087
1099
  column: r.value,
1088
1100
  bordered: !0,
1089
1101
  align: "left",
1090
1102
  layout: e.layout
1091
- }, er(n = u.map((l) => s(We, {
1103
+ }, er(n = u.map((l) => f(Ke, {
1092
1104
  label: l.options.title
1093
1105
  }, {
1094
1106
  default: () => {
1095
- var c, m;
1096
- return [(c = l.renderer) != null && c.render ? (m = l.renderer) == null ? void 0 : m.render({
1107
+ var i, o;
1108
+ return [(i = l.renderer) != null && i.render ? (o = l.renderer) == null ? void 0 : o.render({
1097
1109
  record: e.record
1098
- }) : S(e.record, l.options)];
1110
+ }) : T(e.record, l.options)];
1099
1111
  }
1100
1112
  }))) ? n : {
1101
1113
  default: () => [n]
@@ -1108,9 +1120,9 @@ function rr(e, t, {
1108
1120
  tableEvents: u
1109
1121
  }) {
1110
1122
  const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
1111
- return a || n ? () => s(K, null, [n && s(He, {
1123
+ return a || n ? () => f(H, null, [n && f(We, {
1112
1124
  margin: 0
1113
- }, null), a && s("div", {
1125
+ }, null), a && f("div", {
1114
1126
  class: "table-actions",
1115
1127
  style: {
1116
1128
  display: "flex",
@@ -1119,28 +1131,28 @@ function rr(e, t, {
1119
1131
  flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
1120
1132
  alignItems: "center"
1121
1133
  }
1122
- }, [s("div", {
1134
+ }, [f("div", {
1123
1135
  class: "built-in"
1124
- }, [s(ae, null, {
1125
- default: () => [e.refreshable && s(P, {
1136
+ }, [f(ae, null, {
1137
+ default: () => [e.refreshable && f(q, {
1126
1138
  type: "primary",
1127
1139
  onClick: () => u("reload")
1128
1140
  }, {
1129
1141
  default: () => [Y("刷新")]
1130
- }), e.exportable && s(P, {
1142
+ }), e.exportable && f(q, {
1131
1143
  type: "primary",
1132
1144
  onClick: () => u("export")
1133
1145
  }, {
1134
1146
  default: () => [Y("导出")]
1135
- }), e.collapsable && s(P, {
1147
+ }), e.collapsable && f(q, {
1136
1148
  type: "primary",
1137
1149
  onClick: () => u("collapse")
1138
1150
  }, {
1139
1151
  default: () => [Y("显示")]
1140
1152
  })]
1141
- })]), s("div", {
1153
+ })]), f("div", {
1142
1154
  class: "customs"
1143
- }, [s(ae, null, {
1155
+ }, [f(ae, null, {
1144
1156
  default: () => [t.slots.actions && t.slots.actions()]
1145
1157
  })])])]) : () => {
1146
1158
  };
@@ -1150,9 +1162,9 @@ function nr(e, t, {
1150
1162
  tableEvents: u,
1151
1163
  formInstance: a
1152
1164
  }) {
1153
- return r != null && r.length ? () => s("div", {
1165
+ return r != null && r.length ? () => f("div", {
1154
1166
  class: "table-form"
1155
- }, [s(oe, se({
1167
+ }, [f(oe, fe({
1156
1168
  form: r,
1157
1169
  ref: (n) => a && (a.value = n),
1158
1170
  searchable: !0,
@@ -1165,63 +1177,63 @@ function nr(e, t, {
1165
1177
  function ar(e, t, {
1166
1178
  tableSource: r
1167
1179
  }) {
1168
- const u = w([]);
1180
+ const u = g([]);
1169
1181
  function a() {
1170
1182
  u.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
1171
1183
  }
1172
1184
  function n() {
1173
1185
  re(() => {
1174
- e.checkboxRows !== void 0 && (u.value = [...e.checkboxRows.map((d) => d[e.rowKey])]), e.checkboxKeys !== void 0 && (u.value = [...e.checkboxKeys]), e.radioKey && (u.value = [e.radioKey]), e.radioRow && (u.value = [e.radioRow[e.rowKey]]);
1186
+ e.checkboxRows !== void 0 && (u.value = [...e.checkboxRows.map((s) => s[e.rowKey])]), e.checkboxKeys !== void 0 && (u.value = [...e.checkboxKeys]), e.radioKey && (u.value = [e.radioKey]), e.radioRow && (u.value = [e.radioRow[e.rowKey]]);
1175
1187
  });
1176
1188
  }
1177
1189
  function l() {
1178
- const d = typeof e.selection == "string" ? {
1190
+ const s = typeof e.selection == "string" ? {
1179
1191
  type: e.selection
1180
1192
  } : e.selection;
1181
- switch (d == null ? void 0 : d.type) {
1193
+ switch (s == null ? void 0 : s.type) {
1182
1194
  case "radio":
1183
1195
  return {
1184
1196
  title: "选择",
1185
- ...d,
1197
+ ...s,
1186
1198
  selectedRowKeys: u.value
1187
1199
  };
1188
1200
  case "checkbox":
1189
1201
  return {
1190
1202
  showCheckedAll: !0,
1191
1203
  selectedRowKeys: u.value,
1192
- ...d
1204
+ ...s
1193
1205
  };
1194
1206
  }
1195
1207
  }
1196
- function c(d, f, o) {
1208
+ function i(s, d, m) {
1197
1209
  const {
1198
- type: y
1210
+ type: h
1199
1211
  } = l() || {};
1200
- switch (y) {
1212
+ switch (h) {
1201
1213
  case "radio":
1202
- t.emit("update:radio-key", f), t.emit("update:radio-row", o);
1214
+ t.emit("update:radio-key", d), t.emit("update:radio-row", m);
1203
1215
  break;
1204
1216
  case "checkbox":
1205
- t.emit("update:checkbox-keys", d), t.emit("update:checkbox-rows", d.map((b) => {
1206
- var v;
1207
- return r.value.find((C) => C[e.rowKey] === b) || ((v = e.checkboxRows) == null ? void 0 : v.find((C) => C[e.rowKey] === b));
1217
+ t.emit("update:checkbox-keys", s), t.emit("update:checkbox-rows", s.map((w) => {
1218
+ var S;
1219
+ return r.value.find((k) => k[e.rowKey] === w) || ((S = e.checkboxRows) == null ? void 0 : S.find((k) => k[e.rowKey] === w));
1208
1220
  }));
1209
1221
  break;
1210
1222
  }
1211
1223
  }
1212
- function m() {
1224
+ function o() {
1213
1225
  re(() => {
1214
- t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((d) => {
1215
- var f;
1216
- return r.value.find((o) => o[e.rowKey] === d) || ((f = e.checkboxRows) == null ? void 0 : f.find((o) => o[e.rowKey] === d));
1226
+ t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((s) => {
1227
+ var d;
1228
+ return r.value.find((m) => m[e.rowKey] === s) || ((d = e.checkboxRows) == null ? void 0 : d.find((m) => m[e.rowKey] === s));
1217
1229
  }));
1218
1230
  });
1219
1231
  }
1220
1232
  return n(), {
1221
1233
  selectedRowKeys: u,
1222
1234
  rowSelection: l(),
1223
- onSelect: c,
1224
- onSelectAll: m,
1235
+ onSelect: i,
1236
+ onSelectAll: o,
1225
1237
  resetSelection: a,
1226
1238
  reloadSelection: n
1227
1239
  };
@@ -1230,35 +1242,35 @@ function lr(e, t, {
1230
1242
  pageService: r,
1231
1243
  tableEvents: u
1232
1244
  }) {
1233
- function a(c) {
1234
- r && (r.pageIndex = c, u("reload"));
1245
+ function a(i) {
1246
+ r && (r.pageIndex = i, u("reload"));
1235
1247
  }
1236
- function n(c) {
1237
- r && (r.pageSize = c, u("reload"));
1248
+ function n(i) {
1249
+ r && (r.pageSize = i, u("reload"));
1238
1250
  }
1239
- const l = Mt({
1251
+ const l = Tt({
1240
1252
  mobile: 0,
1241
1253
  tablet: 640,
1242
1254
  desktop: 1024
1243
1255
  });
1244
- return r ? () => s("div", {
1256
+ return r ? () => f("div", {
1245
1257
  class: "table-pagination",
1246
1258
  style: {
1247
1259
  padding: "10px 0"
1248
1260
  }
1249
- }, [s(Ne, {
1261
+ }, [f(Ne, {
1250
1262
  current: r.pageIndex,
1251
- "onUpdate:current": (c) => r.pageIndex = c,
1263
+ "onUpdate:current": (i) => r.pageIndex = i,
1252
1264
  "page-size": r.pageSize,
1253
- "onUpdate:page-size": (c) => r.pageSize = c,
1265
+ "onUpdate:page-size": (i) => r.pageSize = i,
1254
1266
  total: r.total,
1255
1267
  "page-size-options": r.pageSizeOpts,
1256
1268
  "hide-on-single-page": !e.alwayShowPagination,
1257
1269
  "show-total": !0,
1258
1270
  "show-page-size": !0,
1259
1271
  simple: l.smaller("desktop").value,
1260
- onChange: (c) => a(c),
1261
- onPageSizeChange: (c) => n(c),
1272
+ onChange: (i) => a(i),
1273
+ onPageSizeChange: (i) => n(i),
1262
1274
  style: {
1263
1275
  justifyContent: "flex-end"
1264
1276
  }
@@ -1273,21 +1285,21 @@ const ur = /* @__PURE__ */ B({
1273
1285
  }
1274
1286
  },
1275
1287
  setup(e) {
1276
- const t = D(), r = w(e.collapsedColumns.map((a) => ({
1288
+ const t = D(), r = g(e.collapsedColumns.map((a) => ({
1277
1289
  label: a.title,
1278
1290
  value: a.key,
1279
1291
  disabled: !1
1280
- }))), u = w(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1281
- return Je(() => {
1292
+ }))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1293
+ return Ze(() => {
1282
1294
  const a = e.collapsedColumns.map((n) => ({
1283
1295
  key: n.key,
1284
1296
  title: n.title,
1285
1297
  collapsed: u.value.includes(n.key)
1286
1298
  }));
1287
1299
  t.close(a);
1288
- }), () => s("div", {
1300
+ }), () => f("div", {
1289
1301
  class: "table-collapsed-render"
1290
- }, [s(Ue, {
1302
+ }, [f(Ue, {
1291
1303
  data: r.value,
1292
1304
  "default-value": u.value,
1293
1305
  onChange: (a) => u.value = [...a],
@@ -1296,10 +1308,10 @@ const ur = /* @__PURE__ */ B({
1296
1308
  justifyContent: "center"
1297
1309
  }
1298
1310
  }, {
1299
- default: () => [De(s("template", null, null), [[Ie("slot"), "source"]])]
1311
+ default: () => [De(f("template", null, null), [[Ie("slot"), "source"]])]
1300
1312
  })]);
1301
1313
  }
1302
- }), cr = /* @__PURE__ */ B({
1314
+ }), ir = /* @__PURE__ */ B({
1303
1315
  props: {
1304
1316
  value: {
1305
1317
  type: Object,
@@ -1319,16 +1331,16 @@ const ur = /* @__PURE__ */ B({
1319
1331
  function r(u) {
1320
1332
  e.onSubmit && e.onSubmit(u), t.close(u);
1321
1333
  }
1322
- return console.log(e.value), () => s("div", {
1334
+ return () => f("div", {
1323
1335
  class: "edit-form-container"
1324
- }, [s(oe, {
1336
+ }, [f(oe, {
1325
1337
  name: "form",
1326
1338
  value: e.value,
1327
1339
  form: e.form,
1328
1340
  onSubmit: r
1329
1341
  }, null)]);
1330
1342
  }
1331
- }), ir = /* @__PURE__ */ B({
1343
+ }), cr = /* @__PURE__ */ B({
1332
1344
  props: {
1333
1345
  // 数据主键
1334
1346
  rowKey: {
@@ -1467,12 +1479,12 @@ const ur = /* @__PURE__ */ B({
1467
1479
  },
1468
1480
  expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
1469
1481
  setup(e, t) {
1470
- const r = Math.random().toString(32).slice(2).toUpperCase(), u = w(), a = w(), n = w(), l = w(), [c, m] = pe(e.columns), d = w(!1), f = e.form ?? et(e.columns), o = v(), y = R(), b = w(e.columns.map((i) => ({
1471
- key: i.key,
1472
- title: i.title,
1473
- collapsed: !!i.collapsed
1482
+ const r = Math.random().toString(32).slice(2).toUpperCase(), u = g(), a = g(), n = g(), l = g(), [i, o] = pe(e.columns), s = g(!1), d = e.form ?? et(e.columns), m = S(), h = L(), w = g(e.columns.map((c) => ({
1483
+ key: c.key,
1484
+ title: c.title,
1485
+ collapsed: !!c.collapsed
1474
1486
  })));
1475
- function v() {
1487
+ function S() {
1476
1488
  switch (!0) {
1477
1489
  case (typeof e.pageable == "string" && e.pageable === "server"):
1478
1490
  return new V();
@@ -1484,7 +1496,7 @@ const ur = /* @__PURE__ */ B({
1484
1496
  return new V(e.pageable.index, e.pageable.size);
1485
1497
  }
1486
1498
  }
1487
- const C = (() => {
1499
+ const k = (() => {
1488
1500
  switch (!0) {
1489
1501
  case typeof e.pageable == "string":
1490
1502
  return e.pageable;
@@ -1494,188 +1506,188 @@ const ur = /* @__PURE__ */ B({
1494
1506
  return "server";
1495
1507
  }
1496
1508
  })();
1497
- function R() {
1498
- const i = e.columns.find((h) => !!h.sortable);
1499
- if (i || e.sortable)
1500
- return new J({
1509
+ function L() {
1510
+ const c = e.columns.find((b) => !!b.sortable);
1511
+ if (c || e.sortable)
1512
+ return new Z({
1501
1513
  ...e.sortable || {},
1502
- ...i ? {
1503
- [i.key]: i.sortable
1514
+ ...c ? {
1515
+ [c.key]: c.sortable
1504
1516
  } : {}
1505
1517
  });
1506
1518
  }
1507
- function T(i) {
1519
+ function v(c) {
1508
1520
  const {
1509
- exportExcel: h
1510
- } = Xt();
1511
- 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));
1521
+ exportExcel: b
1522
+ } = Qt();
1523
+ b((c == null ? void 0 : c.columns) || e.columns, (c == null ? void 0 : c.source) || i.value, (c == null ? void 0 : c.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1512
1524
  }
1513
- function g(i) {
1514
- let h;
1525
+ function y(c) {
1526
+ let b;
1515
1527
  switch (!0) {
1516
- case !!(i != null && i.key):
1517
- h = c.value.find((M) => M[e.rowKey] === (i == null ? void 0 : i.key));
1528
+ case !!(c != null && c.key):
1529
+ b = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1518
1530
  break;
1519
- case !!(i != null && i.record):
1520
- h = i == null ? void 0 : i.record;
1531
+ case !!(c != null && c.record):
1532
+ b = c == null ? void 0 : c.record;
1521
1533
  break;
1522
1534
  }
1523
- if (!h)
1535
+ if (!b)
1524
1536
  throw new Error("未找到需要预览的数据");
1525
1537
  return n.value.open(tr, {
1526
- record: h,
1538
+ record: b,
1527
1539
  columns: e.columns
1528
1540
  }, {
1529
- title: (i == null ? void 0 : i.title) || "详情",
1530
- mode: (i == null ? void 0 : i.mode) || "dialog"
1541
+ title: (c == null ? void 0 : c.title) || "详情",
1542
+ mode: (c == null ? void 0 : c.mode) || "dialog"
1531
1543
  });
1532
1544
  }
1533
- function x(i) {
1534
- let h;
1545
+ function C(c) {
1546
+ let b;
1535
1547
  switch (!0) {
1536
- case !!(i != null && i.key):
1537
- h = c.value.find((M) => M[e.rowKey] === (i == null ? void 0 : i.key));
1548
+ case !!(c != null && c.key):
1549
+ b = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1538
1550
  break;
1539
- case !!(i != null && i.record):
1540
- h = i == null ? void 0 : i.record;
1551
+ case !!(c != null && c.record):
1552
+ b = c == null ? void 0 : c.record;
1541
1553
  break;
1542
1554
  }
1543
- if (!h)
1555
+ if (!b)
1544
1556
  throw new Error("未找到需要编辑的数据");
1545
- return n.value.open(cr, {
1546
- value: h,
1547
- form: i == null ? void 0 : i.form,
1548
- onSubmit: i.onSubmit
1557
+ return n.value.open(ir, {
1558
+ value: b,
1559
+ form: c == null ? void 0 : c.form,
1560
+ onSubmit: c.onSubmit
1549
1561
  }, {
1550
- title: (i == null ? void 0 : i.title) || "编辑",
1551
- mode: (i == null ? void 0 : i.mode) || "dialog",
1562
+ title: (c == null ? void 0 : c.title) || "编辑",
1563
+ mode: (c == null ? void 0 : c.mode) || "dialog",
1552
1564
  footer: !0,
1553
1565
  form: "form"
1554
1566
  });
1555
1567
  }
1556
- function $(i) {
1568
+ function M(c) {
1557
1569
  var p, ee;
1558
1570
  if (!e.dataLoad)
1559
1571
  return Promise.reject();
1560
- i != null && i.reset && (o && o.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
1561
- const h = {
1572
+ c != null && c.reset && (m && m.reset(), h && h.reset(), (p = u.value) == null || p.resetSorters());
1573
+ const b = {
1562
1574
  ...((ee = a.value) == null ? void 0 : ee.formSource) || {}
1563
1575
  };
1564
- Object.keys(h).forEach((te) => {
1565
- [null, void 0, ""].includes(h[te]) && delete h[te];
1576
+ Object.keys(b).forEach((te) => {
1577
+ [null, void 0, ""].includes(b[te]) && delete b[te];
1566
1578
  });
1567
- const M = e.dataLoad({
1568
- form: h,
1569
- page: o,
1570
- sort: y,
1571
- update: m
1579
+ const _ = e.dataLoad({
1580
+ form: b,
1581
+ page: m,
1582
+ sort: h,
1583
+ update: o
1572
1584
  });
1573
- return z(M) ? (d.value = !0, Promise.resolve(M).finally(() => {
1574
- d.value = !1;
1575
- }), M) : Promise.resolve();
1585
+ return z(_) ? (s.value = !0, Promise.resolve(_).finally(() => {
1586
+ s.value = !1;
1587
+ }), _) : Promise.resolve();
1576
1588
  }
1577
- function he() {
1589
+ function ye() {
1578
1590
  n.value.open(ur, {
1579
- collapsedColumns: b.value
1591
+ collapsedColumns: w.value
1580
1592
  }, {
1581
1593
  title: "显示列",
1582
1594
  size: "small",
1583
1595
  footer: !0
1584
- }).then((i) => {
1585
- b.value = i;
1596
+ }).then((c) => {
1597
+ w.value = c;
1586
1598
  });
1587
1599
  }
1588
- const be = (i, {
1589
- type: h
1600
+ const be = (c, {
1601
+ type: b
1590
1602
  }) => {
1591
- switch (h) {
1603
+ switch (b) {
1592
1604
  case "drag": {
1593
- m(i), t.emit("change", i);
1605
+ o(c), t.emit("change", c);
1594
1606
  break;
1595
1607
  }
1596
1608
  }
1597
- }, j = tt({
1598
- reload: $,
1599
- preview: g,
1600
- export: T,
1601
- edit: x,
1602
- collapse: he
1609
+ }, R = tt({
1610
+ reload: M,
1611
+ preview: y,
1612
+ export: v,
1613
+ edit: C,
1614
+ collapse: ye
1603
1615
  });
1604
- function ge(i, h) {
1605
- !y || C === "client" || (h ? y.update(i, h === "descend" ? "desc" : "asc") : y.remove(i), j("reload"));
1616
+ function ge(c, b) {
1617
+ !h || k === "client" || (b ? h.update(c, b === "descend" ? "desc" : "asc") : h.remove(c), R("reload"));
1606
1618
  }
1607
- const Q = w(de({
1619
+ const J = g(de({
1608
1620
  columns: e.columns,
1609
1621
  columnsOptions: e.columnsOptions,
1610
1622
  columnsGroups: e.columnsGroups,
1611
- pageMode: C,
1612
- collapsedColumns: b,
1613
- events: j
1614
- })), q = {
1615
- tableEvents: j,
1616
- tableForm: f,
1617
- tableSource: c,
1623
+ pageMode: k,
1624
+ collapsedColumns: w,
1625
+ events: R
1626
+ })), P = {
1627
+ tableEvents: R,
1628
+ tableForm: d,
1629
+ tableSource: i,
1618
1630
  formInstance: a,
1619
- pageService: o,
1631
+ pageService: m,
1620
1632
  formOptions: e.formOptions
1621
- }, we = nr(e, t, q), ve = rr(e, t, q), Ce = lr(e, t, q), {
1622
- selectedRowKeys: X,
1623
- rowSelection: Z,
1624
- onSelect: xe,
1625
- onSelectAll: ke,
1633
+ }, we = nr(e, t, P), ve = rr(e, t, P), Ce = lr(e, t, P), {
1634
+ selectedRowKeys: Q,
1635
+ rowSelection: X,
1636
+ onSelect: ke,
1637
+ onSelectAll: xe,
1626
1638
  reloadSelection: Se,
1627
- resetSelection: Te
1628
- } = ar(e, t, q), Me = E(() => ({
1639
+ resetSelection: Me
1640
+ } = ar(e, t, P), Te = j(() => ({
1629
1641
  rowKey: e.rowKey,
1630
1642
  size: e.size,
1631
1643
  bordered: e.bordered,
1632
1644
  hoverable: e.hoverable,
1633
1645
  stripe: e.stripe,
1634
1646
  scroll: {
1635
- x: e.columns.reduce((i, h) => i += typeof h.width != "number" ? Math.max(h.title.length * 16, 80) : h.width, 0),
1647
+ x: e.columns.reduce((c, b) => c += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1636
1648
  y: e.height ?? "100%"
1637
1649
  },
1638
- rowSelection: Z,
1650
+ rowSelection: X,
1639
1651
  draggable: e.draggable ? {
1640
1652
  type: "handle",
1641
1653
  width: 40
1642
1654
  } : void 0,
1643
1655
  pagination: e.pageable === void 0 || e.pageable === "client",
1644
- selectedKeys: X.value,
1656
+ selectedKeys: Q.value,
1645
1657
  expandable: e.expandable
1646
1658
  }));
1647
1659
  function _e() {
1648
- Q.value = de({
1660
+ J.value = de({
1649
1661
  columns: e.columns,
1650
1662
  columnsOptions: e.columnsOptions,
1651
1663
  columnsGroups: e.columnsGroups,
1652
- pageMode: C,
1653
- collapsedColumns: b,
1654
- events: j
1664
+ pageMode: k,
1665
+ collapsedColumns: w,
1666
+ events: R
1655
1667
  });
1656
1668
  }
1657
1669
  return A(() => {
1658
- l.value && (l.value.id = `table-${r}`), e.autoLoad && $(), e.grabbable && l.value && pt(l.value);
1670
+ l.value && (l.value.id = `table-${r}`), e.autoLoad && M(), e.grabbable && l.value && pt(l.value);
1659
1671
  }), {
1660
1672
  tableId: r,
1661
1673
  tableInstance: u,
1662
- tableSource: c,
1663
- tableOptions: Me,
1664
- tableColumns: Q,
1665
- tableEvents: j,
1666
- tableForm: f,
1667
- tableLoading: d,
1674
+ tableSource: i,
1675
+ tableOptions: Te,
1676
+ tableColumns: J,
1677
+ tableEvents: R,
1678
+ tableForm: d,
1679
+ tableLoading: s,
1668
1680
  modalInstance: n,
1669
1681
  tableRenderElement: l,
1670
- formSource: fe(E(() => {
1671
- var i;
1672
- return (i = a == null ? void 0 : a.value) == null ? void 0 : i.formSource;
1682
+ formSource: se(j(() => {
1683
+ var c;
1684
+ return (c = a == null ? void 0 : a.value) == null ? void 0 : c.formSource;
1673
1685
  })),
1674
1686
  formInstance: a,
1675
- reload: $,
1676
- preview: g,
1677
- edit: x,
1678
- export: T,
1687
+ reload: M,
1688
+ preview: y,
1689
+ edit: C,
1690
+ export: v,
1679
1691
  onSorterChange: ge,
1680
1692
  onTableChange: be,
1681
1693
  renders: {
@@ -1684,23 +1696,23 @@ const ur = /* @__PURE__ */ B({
1684
1696
  renderTablePagination: Ce
1685
1697
  },
1686
1698
  tableSelection: {
1687
- selectedRowKeys: X,
1688
- rowSelection: Z,
1689
- onSelect: xe,
1690
- onSelectAll: ke
1699
+ selectedRowKeys: Q,
1700
+ rowSelection: X,
1701
+ onSelect: ke,
1702
+ onSelectAll: xe
1691
1703
  },
1692
- resetSelection: Te,
1704
+ resetSelection: Me,
1693
1705
  reloadSelection: Se,
1694
1706
  reloadColumns: _e
1695
1707
  };
1696
1708
  },
1697
1709
  render() {
1698
1710
  this.reloadColumns();
1699
- const e = () => s("div", {
1711
+ const e = () => f("div", {
1700
1712
  class: "table-body"
1701
- }, [s("div", {
1713
+ }, [f("div", {
1702
1714
  class: "table-body-wrapper"
1703
- }, [s(Ge, se({
1715
+ }, [f(Ge, fe({
1704
1716
  loading: this.tableLoading,
1705
1717
  data: this.tableSource,
1706
1718
  columns: this.tableColumns,
@@ -1713,16 +1725,16 @@ const ur = /* @__PURE__ */ B({
1713
1725
  selectedKeys: this.tableSelection.selectedRowKeys.value,
1714
1726
  "onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
1715
1727
  }, this.tableOptions), null)])]);
1716
- return s("div", {
1728
+ return f("div", {
1717
1729
  class: {
1718
1730
  "table-render": !0,
1719
1731
  "auto-fill": this.autoFill
1720
1732
  },
1721
1733
  ref: (t) => this.tableRenderElement = t
1722
- }, [s(Qe, {
1734
+ }, [f(Je, {
1723
1735
  ref: (t) => this.modalInstance = t
1724
1736
  }, {
1725
- default: () => [s("div", {
1737
+ default: () => [f("div", {
1726
1738
  class: "table-render-content"
1727
1739
  }, [this.renders.renderTableForm(), this.renders.renderTableActions(), this.$slots.header && this.$slots.header(), e(), this.renders.renderTablePagination()])]
1728
1740
  })]);
@@ -1736,15 +1748,15 @@ function gr(e) {
1736
1748
  }
1737
1749
  const wr = {
1738
1750
  install(e, t) {
1739
- e.component("TableRender", ir);
1751
+ e.component("TableRender", cr);
1740
1752
  }
1741
1753
  };
1742
1754
  export {
1743
- ir as TableRender,
1744
- xr as TableRenderResolver,
1755
+ cr as TableRender,
1756
+ kr as TableRenderResolver,
1745
1757
  wr as default,
1746
1758
  br as defineColumns,
1747
1759
  gr as defineTableLoad,
1748
1760
  tt as useEvents,
1749
- hr as useTable
1761
+ yr as useTable
1750
1762
  };