@gopowerteam/table-render 0.0.158 → 0.0.160

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 W, 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 We, DescriptionsItem as He, Divider as Ke, 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
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);
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 br(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() {
@@ -106,7 +106,7 @@ const rt = Symbol.for("RenderColumnType");
106
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 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) {
@@ -114,31 +114,31 @@ function z(e) {
114
114
  }
115
115
  function nt(e) {
116
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) => {
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(W, 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;
@@ -179,13 +179,13 @@ function lt(e) {
179
179
  return e != null && e.thousands ? r(l) : l;
180
180
  };
181
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", {
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,16 +234,16 @@ 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",
@@ -251,78 +251,78 @@ const it = {
251
251
  };
252
252
  function dt(e) {
253
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)]);
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);
271
+ const t = ft(e), r = ot(e);
272
272
  return k("dict", (a, n) => {
273
- const l = S(a, n);
274
- return r ? s(Ve, {
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
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, {
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) {
@@ -330,47 +330,47 @@ function bt(e) {
330
330
  n == null || n.remove();
331
331
  }
332
332
  return k("image", (a, n, l) => {
333
- const c = S(a, n), m = Math.random().toString(32).slice(2).toUpperCase(), d = {
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(W, null, null);
364
364
  }
365
365
  });
366
366
  }
367
- function W(e) {
368
- return je() ? (Le(e), !0) : !1;
367
+ function H(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 K = 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, K && o()), H(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 = K ? window : void 0, me = K ? 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 H(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 H(() => {
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) : x(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 x(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
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(() => {
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
+ });
606
610
  }
607
- function y() {
608
- window.open(`tel:${c}`, "_blank");
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>`);
609
614
  }
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,
615
+ function x() {
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);
618
+ }
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: x
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) {
705
+ function Lt(e) {
694
706
  return k("render", (r) => e(r));
695
707
  }
696
- function jt(e) {
708
+ function Rt(e) {
697
709
  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", {
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,63 +748,82 @@ 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
761
  return k("text", (r, u) => {
750
- const a = Lt(e || {}, u, r), n = Yt(e || {}, r);
751
- return s("span", {
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 k("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
- function Bt() {
782
+ function Bt(e) {
783
+ return k("serial", (r, u, a) => {
784
+ const n = {
785
+ color: typeof (e == null ? void 0 : e.color) == "function" ? e.color(r) : e == null ? void 0 : e.color,
786
+ fontWeight: (e == null ? void 0 : e.weight) || "normal",
787
+ textAlign: "center"
788
+ };
789
+ return f("div", {
790
+ style: n
791
+ }, [a.rowIndex + 1]);
792
+ }, {
793
+ disableViewMode: !0
794
+ });
795
+ }
796
+ function Dt() {
771
797
  return {
772
- dropdown: yt,
798
+ dropdown: ht,
773
799
  text: zt,
774
800
  dict: mt,
775
- tag: jt,
776
- render: Et,
777
- phone: $t,
801
+ tag: Rt,
802
+ render: Lt,
803
+ phone: jt,
778
804
  image: bt,
779
805
  currency: lt,
780
806
  date: dt,
781
807
  button: nt,
782
- progress: At
808
+ progress: At,
809
+ serial: Bt
783
810
  };
784
811
  }
785
812
  function G(e, t) {
786
813
  if (!(e != null && e.render))
787
814
  return;
788
815
  const r = e.render({
789
- ...Bt()
816
+ ...Dt()
790
817
  // ...(Table?.$override?.table || {}),
791
818
  });
792
819
  return {
793
820
  render: ({
794
- record: u
795
- }) => r(u, e, t),
821
+ record: u,
822
+ rowIndex: a
823
+ }) => r(u, e, {
824
+ ...t || {},
825
+ rowIndex: a
826
+ }),
796
827
  [rt]: r.$type,
797
828
  disableColumnMode: r.$disableColumnMode,
798
829
  disableViewMode: r.$disableViewMode,
@@ -808,18 +839,18 @@ function de({
808
839
  collapsedColumns: a,
809
840
  events: n
810
841
  }) {
811
- const l = e.map((c) => ({
842
+ const l = e.map((i) => ({
812
843
  ...t || {},
813
- ...c
814
- })).map((c) => Vt(c, u, a, n)).filter(Boolean);
815
- return It(l, r);
844
+ ...i
845
+ })).map((i) => Ft(i, u, a, n)).filter(Boolean);
846
+ return Vt(l, r);
816
847
  }
817
- function Dt(e, t) {
848
+ function It(e, t) {
818
849
  const r = [], u = (n) => {
819
850
  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;
851
+ const l = t.find((i) => {
852
+ var o;
853
+ return ((o = Object.getOwnPropertyDescriptor(i, "key")) == null ? void 0 : o.value) === n.key;
823
854
  });
824
855
  if (l)
825
856
  return r.push(l), l;
@@ -829,17 +860,17 @@ function Dt(e, t) {
829
860
  if (r != null && r.length && a) {
830
861
  const n = Math.min(...r.map((l) => t.indexOf(l)));
831
862
  r.forEach((l) => {
832
- const c = t.indexOf(l);
833
- t.splice(c, 1);
863
+ const i = t.indexOf(l);
864
+ t.splice(i, 1);
834
865
  }), t.splice(n, 0, a);
835
866
  }
836
867
  }
837
- function It(e, t = []) {
868
+ function Vt(e, t = []) {
838
869
  return t.forEach((r) => {
839
- Dt(r, e);
870
+ It(r, e);
840
871
  }), e;
841
872
  }
842
- function Vt(e, t, r, u) {
873
+ function Ft(e, t, r, u) {
843
874
  const {
844
875
  render: a,
845
876
  disableColumnMode: n
@@ -866,10 +897,10 @@ function Vt(e, t, r, u) {
866
897
  render: a
867
898
  };
868
899
  }
869
- function Ft() {
870
- return new Xe.Workbook();
900
+ function Wt() {
901
+ return new Qe.Workbook();
871
902
  }
872
- function Kt(e, t = "Sheet1") {
903
+ function Ht(e, t = "Sheet1") {
873
904
  return e.addWorksheet(t, {
874
905
  headerFooter: {
875
906
  firstHeader: "",
@@ -877,49 +908,49 @@ function Kt(e, t = "Sheet1") {
877
908
  }
878
909
  });
879
910
  }
880
- function Wt(e, t) {
911
+ function Kt(e, t) {
881
912
  e.columns = t;
882
913
  }
883
- function Ht(e, t) {
914
+ function Nt(e, t) {
884
915
  e.addRows(t);
885
916
  }
886
- async function Nt({
917
+ async function Ut({
887
918
  columns: e,
888
919
  rows: t,
889
920
  filename: r
890
921
  }) {
891
- const u = Ft(), a = Kt(u);
892
- Wt(a, e), Ht(a, t);
922
+ const u = Wt(), a = Ht(u);
923
+ Kt(a, e), Nt(a, t);
893
924
  const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
894
- Ut(l, r || `${I().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
925
+ Gt(l, r || `${I().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
895
926
  }
896
- function Ut(e, t) {
927
+ function Gt(e, t) {
897
928
  const r = document.createElement("a");
898
929
  r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
899
930
  URL.revokeObjectURL(r.href);
900
931
  }, 1e3);
901
932
  }
902
- function Gt(e, t) {
933
+ function Zt(e, t) {
903
934
  const r = {};
904
935
  return e.filter((a) => a.exportable !== !1).map((a) => ({
905
936
  options: a,
906
937
  render: G(a),
907
938
  content: typeof a.exportable == "object" ? a.exportable.content : void 0
908
939
  })).forEach((a) => {
909
- var c;
910
- const n = (c = a.render) == null ? void 0 : c.render, l = () => {
911
- var m;
940
+ var i;
941
+ const n = (i = a.render) == null ? void 0 : i.render, l = () => {
942
+ var o;
912
943
  switch (!0) {
913
944
  case !!a.content:
914
945
  return a.content && a.content(t);
915
946
  case !!n: {
916
- const d = document.createElement("div"), f = ze(() => n && n({
947
+ const s = document.createElement("div"), d = ze(() => n && n({
917
948
  record: t
918
949
  }));
919
- return Ae(f, d), (m = f.el) == null ? void 0 : m.innerText;
950
+ return Ae(d, s), (o = d.el) == null ? void 0 : o.innerText;
920
951
  }
921
952
  default:
922
- return S(t, a.options);
953
+ return T(t, a.options);
923
954
  }
924
955
  };
925
956
  r[a.options.key] = l();
@@ -937,14 +968,14 @@ function Jt(e) {
937
968
  }
938
969
  function Qt(e, t, r) {
939
970
  const u = e.filter((n) => n.exportable !== !1).map((n) => {
940
- var l, c;
971
+ var l, i;
941
972
  return {
942
973
  key: n.key,
943
974
  header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
944
- width: ((c = n.exportable) == null ? void 0 : c.width) || Jt(n.width)
975
+ width: ((i = n.exportable) == null ? void 0 : i.width) || Jt(n.width)
945
976
  };
946
- }), a = t.map((n) => Gt(e, n));
947
- Nt({
977
+ }), a = t.map((n) => Zt(e, n));
978
+ Ut({
948
979
  columns: u,
949
980
  rows: a,
950
981
  filename: r
@@ -955,11 +986,11 @@ function Xt() {
955
986
  exportExcel: Qt
956
987
  };
957
988
  }
958
- class J {
989
+ class Z {
959
990
  constructor(t) {
960
- _(this, "sort", {});
961
- _(this, "defaultSort", {});
962
- _(this, "before", (t) => {
991
+ $(this, "sort", {});
992
+ $(this, "defaultSort", {});
993
+ $(this, "before", (t) => {
963
994
  t.paramsQuery = {
964
995
  ...t.paramsQuery || {},
965
996
  sort: this.stringify(this.sort)
@@ -995,19 +1026,19 @@ class J {
995
1026
  * 转换排序对象为字符串
996
1027
  */
997
1028
  stringify(t) {
998
- return typeof t != "object" ? [] : (t instanceof J && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
1029
+ return typeof t != "object" ? [] : (t instanceof Z && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
999
1030
  }
1000
1031
  }
1001
- const Zt = 300;
1002
- function pt(e) {
1032
+ const pt = 300;
1033
+ function er(e) {
1003
1034
  const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
1004
1035
  if (!r)
1005
1036
  return;
1006
1037
  let u, a = !1, n;
1007
1038
  r.addEventListener("mousedown", () => {
1008
- console.log("mousedown"), u = setTimeout(() => {
1039
+ u = setTimeout(() => {
1009
1040
  u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
1010
- }, Zt);
1041
+ }, pt);
1011
1042
  }), r.addEventListener("mouseup", () => {
1012
1043
  clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
1013
1044
  }), r.addEventListener("mousemove", (l) => {
@@ -1015,15 +1046,15 @@ function pt(e) {
1015
1046
  if (n === void 0)
1016
1047
  n = l.clientX;
1017
1048
  else {
1018
- const c = n - l.clientX;
1019
- n = l.clientX, r.scrollLeft += c;
1049
+ const i = n - l.clientX;
1050
+ n = l.clientX, r.scrollLeft += i;
1020
1051
  }
1021
1052
  });
1022
1053
  }
1023
- function er(e) {
1054
+ function tr(e) {
1024
1055
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
1025
1056
  }
1026
- const tr = /* @__PURE__ */ B({
1057
+ const rr = /* @__PURE__ */ B({
1027
1058
  props: {
1028
1059
  record: {
1029
1060
  type: Object,
@@ -1057,7 +1088,7 @@ const tr = /* @__PURE__ */ B({
1057
1088
  }
1058
1089
  },
1059
1090
  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) => ({
1091
+ 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
1092
  options: n,
1062
1093
  renderer: G(n, {
1063
1094
  previewing: !0
@@ -1081,21 +1112,21 @@ const tr = /* @__PURE__ */ B({
1081
1112
  a();
1082
1113
  }), () => {
1083
1114
  let n;
1084
- return s("div", {
1115
+ return f("div", {
1085
1116
  class: "preview-container"
1086
- }, [s(Ke, {
1117
+ }, [f(We, {
1087
1118
  column: r.value,
1088
1119
  bordered: !0,
1089
1120
  align: "left",
1090
1121
  layout: e.layout
1091
- }, er(n = u.map((l) => s(We, {
1122
+ }, tr(n = u.map((l) => f(He, {
1092
1123
  label: l.options.title
1093
1124
  }, {
1094
1125
  default: () => {
1095
- var c, m;
1096
- return [(c = l.renderer) != null && c.render ? (m = l.renderer) == null ? void 0 : m.render({
1126
+ var i, o;
1127
+ return [(i = l.renderer) != null && i.render ? (o = l.renderer) == null ? void 0 : o.render({
1097
1128
  record: e.record
1098
- }) : S(e.record, l.options)];
1129
+ }) : T(e.record, l.options)];
1099
1130
  }
1100
1131
  }))) ? n : {
1101
1132
  default: () => [n]
@@ -1103,14 +1134,14 @@ const tr = /* @__PURE__ */ B({
1103
1134
  };
1104
1135
  }
1105
1136
  });
1106
- function rr(e, t, {
1137
+ function nr(e, t, {
1107
1138
  tableForm: r,
1108
1139
  tableEvents: u
1109
1140
  }) {
1110
1141
  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, {
1142
+ return a || n ? () => f(W, null, [n && f(Ke, {
1112
1143
  margin: 0
1113
- }, null), a && s("div", {
1144
+ }, null), a && f("div", {
1114
1145
  class: "table-actions",
1115
1146
  style: {
1116
1147
  display: "flex",
@@ -1119,40 +1150,40 @@ function rr(e, t, {
1119
1150
  flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
1120
1151
  alignItems: "center"
1121
1152
  }
1122
- }, [s("div", {
1153
+ }, [f("div", {
1123
1154
  class: "built-in"
1124
- }, [s(ae, null, {
1125
- default: () => [e.refreshable && s(P, {
1155
+ }, [f(ae, null, {
1156
+ default: () => [e.refreshable && f(q, {
1126
1157
  type: "primary",
1127
1158
  onClick: () => u("reload")
1128
1159
  }, {
1129
1160
  default: () => [Y("刷新")]
1130
- }), e.exportable && s(P, {
1161
+ }), e.exportable && f(q, {
1131
1162
  type: "primary",
1132
1163
  onClick: () => u("export")
1133
1164
  }, {
1134
1165
  default: () => [Y("导出")]
1135
- }), e.collapsable && s(P, {
1166
+ }), e.collapsable && f(q, {
1136
1167
  type: "primary",
1137
1168
  onClick: () => u("collapse")
1138
1169
  }, {
1139
1170
  default: () => [Y("显示")]
1140
1171
  })]
1141
- })]), s("div", {
1172
+ })]), f("div", {
1142
1173
  class: "customs"
1143
- }, [s(ae, null, {
1174
+ }, [f(ae, null, {
1144
1175
  default: () => [t.slots.actions && t.slots.actions()]
1145
1176
  })])])]) : () => {
1146
1177
  };
1147
1178
  }
1148
- function nr(e, t, {
1179
+ function ar(e, t, {
1149
1180
  tableForm: r,
1150
1181
  tableEvents: u,
1151
1182
  formInstance: a
1152
1183
  }) {
1153
- return r != null && r.length ? () => s("div", {
1184
+ return r != null && r.length ? () => f("div", {
1154
1185
  class: "table-form"
1155
- }, [s(oe, se({
1186
+ }, [f(oe, fe({
1156
1187
  form: r,
1157
1188
  ref: (n) => a && (a.value = n),
1158
1189
  searchable: !0,
@@ -1162,110 +1193,110 @@ function nr(e, t, {
1162
1193
  }, e.formOptions), null)]) : () => {
1163
1194
  };
1164
1195
  }
1165
- function ar(e, t, {
1196
+ function lr(e, t, {
1166
1197
  tableSource: r
1167
1198
  }) {
1168
- const u = w([]);
1199
+ const u = g([]);
1169
1200
  function a() {
1170
1201
  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
1202
  }
1172
1203
  function n() {
1173
1204
  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]]);
1205
+ 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
1206
  });
1176
1207
  }
1177
1208
  function l() {
1178
- const d = typeof e.selection == "string" ? {
1209
+ const s = typeof e.selection == "string" ? {
1179
1210
  type: e.selection
1180
1211
  } : e.selection;
1181
- switch (d == null ? void 0 : d.type) {
1212
+ switch (s == null ? void 0 : s.type) {
1182
1213
  case "radio":
1183
1214
  return {
1184
1215
  title: "选择",
1185
- ...d,
1216
+ ...s,
1186
1217
  selectedRowKeys: u.value
1187
1218
  };
1188
1219
  case "checkbox":
1189
1220
  return {
1190
1221
  showCheckedAll: !0,
1191
1222
  selectedRowKeys: u.value,
1192
- ...d
1223
+ ...s
1193
1224
  };
1194
1225
  }
1195
1226
  }
1196
- function c(d, f, o) {
1227
+ function i(s, d, m) {
1197
1228
  const {
1198
- type: y
1229
+ type: h
1199
1230
  } = l() || {};
1200
- switch (y) {
1231
+ switch (h) {
1201
1232
  case "radio":
1202
- t.emit("update:radio-key", f), t.emit("update:radio-row", o);
1233
+ t.emit("update:radio-key", d), t.emit("update:radio-row", m);
1203
1234
  break;
1204
1235
  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));
1236
+ t.emit("update:checkbox-keys", s), t.emit("update:checkbox-rows", s.map((w) => {
1237
+ var S;
1238
+ return r.value.find((x) => x[e.rowKey] === w) || ((S = e.checkboxRows) == null ? void 0 : S.find((x) => x[e.rowKey] === w));
1208
1239
  }));
1209
1240
  break;
1210
1241
  }
1211
1242
  }
1212
- function m() {
1243
+ function o() {
1213
1244
  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));
1245
+ t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((s) => {
1246
+ var d;
1247
+ return r.value.find((m) => m[e.rowKey] === s) || ((d = e.checkboxRows) == null ? void 0 : d.find((m) => m[e.rowKey] === s));
1217
1248
  }));
1218
1249
  });
1219
1250
  }
1220
1251
  return n(), {
1221
1252
  selectedRowKeys: u,
1222
1253
  rowSelection: l(),
1223
- onSelect: c,
1224
- onSelectAll: m,
1254
+ onSelect: i,
1255
+ onSelectAll: o,
1225
1256
  resetSelection: a,
1226
1257
  reloadSelection: n
1227
1258
  };
1228
1259
  }
1229
- function lr(e, t, {
1260
+ function ur(e, t, {
1230
1261
  pageService: r,
1231
1262
  tableEvents: u
1232
1263
  }) {
1233
- function a(c) {
1234
- r && (r.pageIndex = c, u("reload"));
1264
+ function a(i) {
1265
+ r && (r.pageIndex = i, u("reload"));
1235
1266
  }
1236
- function n(c) {
1237
- r && (r.pageSize = c, u("reload"));
1267
+ function n(i) {
1268
+ r && (r.pageSize = i, u("reload"));
1238
1269
  }
1239
- const l = Mt({
1270
+ const l = Tt({
1240
1271
  mobile: 0,
1241
1272
  tablet: 640,
1242
1273
  desktop: 1024
1243
1274
  });
1244
- return r ? () => s("div", {
1275
+ return r ? () => f("div", {
1245
1276
  class: "table-pagination",
1246
1277
  style: {
1247
1278
  padding: "10px 0"
1248
1279
  }
1249
- }, [s(Ne, {
1280
+ }, [f(Ne, {
1250
1281
  current: r.pageIndex,
1251
- "onUpdate:current": (c) => r.pageIndex = c,
1282
+ "onUpdate:current": (i) => r.pageIndex = i,
1252
1283
  "page-size": r.pageSize,
1253
- "onUpdate:page-size": (c) => r.pageSize = c,
1284
+ "onUpdate:page-size": (i) => r.pageSize = i,
1254
1285
  total: r.total,
1255
1286
  "page-size-options": r.pageSizeOpts,
1256
1287
  "hide-on-single-page": !e.alwayShowPagination,
1257
1288
  "show-total": !0,
1258
1289
  "show-page-size": !0,
1259
1290
  simple: l.smaller("desktop").value,
1260
- onChange: (c) => a(c),
1261
- onPageSizeChange: (c) => n(c),
1291
+ onChange: (i) => a(i),
1292
+ onPageSizeChange: (i) => n(i),
1262
1293
  style: {
1263
1294
  justifyContent: "flex-end"
1264
1295
  }
1265
1296
  }, null)]) : () => {
1266
1297
  };
1267
1298
  }
1268
- const ur = /* @__PURE__ */ B({
1299
+ const ir = /* @__PURE__ */ B({
1269
1300
  props: {
1270
1301
  collapsedColumns: {
1271
1302
  type: Array,
@@ -1273,21 +1304,21 @@ const ur = /* @__PURE__ */ B({
1273
1304
  }
1274
1305
  },
1275
1306
  setup(e) {
1276
- const t = D(), r = w(e.collapsedColumns.map((a) => ({
1307
+ const t = D(), r = g(e.collapsedColumns.map((a) => ({
1277
1308
  label: a.title,
1278
1309
  value: a.key,
1279
1310
  disabled: !1
1280
- }))), u = w(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1281
- return Je(() => {
1311
+ }))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1312
+ return Ze(() => {
1282
1313
  const a = e.collapsedColumns.map((n) => ({
1283
1314
  key: n.key,
1284
1315
  title: n.title,
1285
1316
  collapsed: u.value.includes(n.key)
1286
1317
  }));
1287
1318
  t.close(a);
1288
- }), () => s("div", {
1319
+ }), () => f("div", {
1289
1320
  class: "table-collapsed-render"
1290
- }, [s(Ue, {
1321
+ }, [f(Ue, {
1291
1322
  data: r.value,
1292
1323
  "default-value": u.value,
1293
1324
  onChange: (a) => u.value = [...a],
@@ -1296,7 +1327,7 @@ const ur = /* @__PURE__ */ B({
1296
1327
  justifyContent: "center"
1297
1328
  }
1298
1329
  }, {
1299
- default: () => [De(s("template", null, null), [[Ie("slot"), "source"]])]
1330
+ default: () => [De(f("template", null, null), [[Ie("slot"), "source"]])]
1300
1331
  })]);
1301
1332
  }
1302
1333
  }), cr = /* @__PURE__ */ B({
@@ -1319,16 +1350,16 @@ const ur = /* @__PURE__ */ B({
1319
1350
  function r(u) {
1320
1351
  e.onSubmit && e.onSubmit(u), t.close(u);
1321
1352
  }
1322
- return console.log(e.value), () => s("div", {
1353
+ return () => f("div", {
1323
1354
  class: "edit-form-container"
1324
- }, [s(oe, {
1355
+ }, [f(oe, {
1325
1356
  name: "form",
1326
1357
  value: e.value,
1327
1358
  form: e.form,
1328
1359
  onSubmit: r
1329
1360
  }, null)]);
1330
1361
  }
1331
- }), ir = /* @__PURE__ */ B({
1362
+ }), dr = /* @__PURE__ */ B({
1332
1363
  props: {
1333
1364
  // 数据主键
1334
1365
  rowKey: {
@@ -1467,12 +1498,12 @@ const ur = /* @__PURE__ */ B({
1467
1498
  },
1468
1499
  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
1500
  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
1501
+ 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) => ({
1502
+ key: c.key,
1503
+ title: c.title,
1504
+ collapsed: !!c.collapsed
1474
1505
  })));
1475
- function v() {
1506
+ function S() {
1476
1507
  switch (!0) {
1477
1508
  case (typeof e.pageable == "string" && e.pageable === "server"):
1478
1509
  return new V();
@@ -1484,7 +1515,7 @@ const ur = /* @__PURE__ */ B({
1484
1515
  return new V(e.pageable.index, e.pageable.size);
1485
1516
  }
1486
1517
  }
1487
- const C = (() => {
1518
+ const x = (() => {
1488
1519
  switch (!0) {
1489
1520
  case typeof e.pageable == "string":
1490
1521
  return e.pageable;
@@ -1494,188 +1525,188 @@ const ur = /* @__PURE__ */ B({
1494
1525
  return "server";
1495
1526
  }
1496
1527
  })();
1497
- function R() {
1498
- const i = e.columns.find((h) => !!h.sortable);
1499
- if (i || e.sortable)
1500
- return new J({
1528
+ function L() {
1529
+ const c = e.columns.find((b) => !!b.sortable);
1530
+ if (c || e.sortable)
1531
+ return new Z({
1501
1532
  ...e.sortable || {},
1502
- ...i ? {
1503
- [i.key]: i.sortable
1533
+ ...c ? {
1534
+ [c.key]: c.sortable
1504
1535
  } : {}
1505
1536
  });
1506
1537
  }
1507
- function T(i) {
1538
+ function v(c) {
1508
1539
  const {
1509
- exportExcel: h
1540
+ exportExcel: b
1510
1541
  } = 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));
1542
+ 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
1543
  }
1513
- function g(i) {
1514
- let h;
1544
+ function y(c) {
1545
+ let b;
1515
1546
  switch (!0) {
1516
- case !!(i != null && i.key):
1517
- h = c.value.find((M) => M[e.rowKey] === (i == null ? void 0 : i.key));
1547
+ case !!(c != null && c.key):
1548
+ b = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1518
1549
  break;
1519
- case !!(i != null && i.record):
1520
- h = i == null ? void 0 : i.record;
1550
+ case !!(c != null && c.record):
1551
+ b = c == null ? void 0 : c.record;
1521
1552
  break;
1522
1553
  }
1523
- if (!h)
1554
+ if (!b)
1524
1555
  throw new Error("未找到需要预览的数据");
1525
- return n.value.open(tr, {
1526
- record: h,
1556
+ return n.value.open(rr, {
1557
+ record: b,
1527
1558
  columns: e.columns
1528
1559
  }, {
1529
- title: (i == null ? void 0 : i.title) || "详情",
1530
- mode: (i == null ? void 0 : i.mode) || "dialog"
1560
+ title: (c == null ? void 0 : c.title) || "详情",
1561
+ mode: (c == null ? void 0 : c.mode) || "dialog"
1531
1562
  });
1532
1563
  }
1533
- function x(i) {
1534
- let h;
1564
+ function C(c) {
1565
+ let b;
1535
1566
  switch (!0) {
1536
- case !!(i != null && i.key):
1537
- h = c.value.find((M) => M[e.rowKey] === (i == null ? void 0 : i.key));
1567
+ case !!(c != null && c.key):
1568
+ b = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1538
1569
  break;
1539
- case !!(i != null && i.record):
1540
- h = i == null ? void 0 : i.record;
1570
+ case !!(c != null && c.record):
1571
+ b = c == null ? void 0 : c.record;
1541
1572
  break;
1542
1573
  }
1543
- if (!h)
1574
+ if (!b)
1544
1575
  throw new Error("未找到需要编辑的数据");
1545
1576
  return n.value.open(cr, {
1546
- value: h,
1547
- form: i == null ? void 0 : i.form,
1548
- onSubmit: i.onSubmit
1577
+ value: b,
1578
+ form: c == null ? void 0 : c.form,
1579
+ onSubmit: c.onSubmit
1549
1580
  }, {
1550
- title: (i == null ? void 0 : i.title) || "编辑",
1551
- mode: (i == null ? void 0 : i.mode) || "dialog",
1581
+ title: (c == null ? void 0 : c.title) || "编辑",
1582
+ mode: (c == null ? void 0 : c.mode) || "dialog",
1552
1583
  footer: !0,
1553
1584
  form: "form"
1554
1585
  });
1555
1586
  }
1556
- function $(i) {
1587
+ function M(c) {
1557
1588
  var p, ee;
1558
1589
  if (!e.dataLoad)
1559
1590
  return Promise.reject();
1560
- i != null && i.reset && (o && o.reset(), y && y.reset(), (p = u.value) == null || p.resetSorters());
1561
- const h = {
1591
+ c != null && c.reset && (m && m.reset(), h && h.reset(), (p = u.value) == null || p.resetSorters());
1592
+ const b = {
1562
1593
  ...((ee = a.value) == null ? void 0 : ee.formSource) || {}
1563
1594
  };
1564
- Object.keys(h).forEach((te) => {
1565
- [null, void 0, ""].includes(h[te]) && delete h[te];
1595
+ Object.keys(b).forEach((te) => {
1596
+ [null, void 0, ""].includes(b[te]) && delete b[te];
1566
1597
  });
1567
- const M = e.dataLoad({
1568
- form: h,
1569
- page: o,
1570
- sort: y,
1571
- update: m
1598
+ const _ = e.dataLoad({
1599
+ form: b,
1600
+ page: m,
1601
+ sort: h,
1602
+ update: o
1572
1603
  });
1573
- return z(M) ? (d.value = !0, Promise.resolve(M).finally(() => {
1574
- d.value = !1;
1575
- }), M) : Promise.resolve();
1604
+ return z(_) ? (s.value = !0, Promise.resolve(_).finally(() => {
1605
+ s.value = !1;
1606
+ }), _) : Promise.resolve();
1576
1607
  }
1577
- function he() {
1578
- n.value.open(ur, {
1579
- collapsedColumns: b.value
1608
+ function ye() {
1609
+ n.value.open(ir, {
1610
+ collapsedColumns: w.value
1580
1611
  }, {
1581
1612
  title: "显示列",
1582
1613
  size: "small",
1583
1614
  footer: !0
1584
- }).then((i) => {
1585
- b.value = i;
1615
+ }).then((c) => {
1616
+ w.value = c;
1586
1617
  });
1587
1618
  }
1588
- const be = (i, {
1589
- type: h
1619
+ const be = (c, {
1620
+ type: b
1590
1621
  }) => {
1591
- switch (h) {
1622
+ switch (b) {
1592
1623
  case "drag": {
1593
- m(i), t.emit("change", i);
1624
+ o(c), t.emit("change", c);
1594
1625
  break;
1595
1626
  }
1596
1627
  }
1597
- }, j = tt({
1598
- reload: $,
1599
- preview: g,
1600
- export: T,
1601
- edit: x,
1602
- collapse: he
1628
+ }, R = tt({
1629
+ reload: M,
1630
+ preview: y,
1631
+ export: v,
1632
+ edit: C,
1633
+ collapse: ye
1603
1634
  });
1604
- function ge(i, h) {
1605
- !y || C === "client" || (h ? y.update(i, h === "descend" ? "desc" : "asc") : y.remove(i), j("reload"));
1635
+ function ge(c, b) {
1636
+ !h || x === "client" || (b ? h.update(c, b === "descend" ? "desc" : "asc") : h.remove(c), R("reload"));
1606
1637
  }
1607
- const Q = w(de({
1638
+ const J = g(de({
1608
1639
  columns: e.columns,
1609
1640
  columnsOptions: e.columnsOptions,
1610
1641
  columnsGroups: e.columnsGroups,
1611
- pageMode: C,
1612
- collapsedColumns: b,
1613
- events: j
1614
- })), q = {
1615
- tableEvents: j,
1616
- tableForm: f,
1617
- tableSource: c,
1642
+ pageMode: x,
1643
+ collapsedColumns: w,
1644
+ events: R
1645
+ })), P = {
1646
+ tableEvents: R,
1647
+ tableForm: d,
1648
+ tableSource: i,
1618
1649
  formInstance: a,
1619
- pageService: o,
1650
+ pageService: m,
1620
1651
  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,
1652
+ }, we = ar(e, t, P), ve = nr(e, t, P), Ce = ur(e, t, P), {
1653
+ selectedRowKeys: Q,
1654
+ rowSelection: X,
1655
+ onSelect: ke,
1656
+ onSelectAll: xe,
1626
1657
  reloadSelection: Se,
1627
- resetSelection: Te
1628
- } = ar(e, t, q), Me = E(() => ({
1658
+ resetSelection: Me
1659
+ } = lr(e, t, P), Te = j(() => ({
1629
1660
  rowKey: e.rowKey,
1630
1661
  size: e.size,
1631
1662
  bordered: e.bordered,
1632
1663
  hoverable: e.hoverable,
1633
1664
  stripe: e.stripe,
1634
1665
  scroll: {
1635
- x: e.columns.reduce((i, h) => i += typeof h.width != "number" ? Math.max(h.title.length * 16, 80) : h.width, 0),
1666
+ x: e.columns.reduce((c, b) => c += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1636
1667
  y: e.height ?? "100%"
1637
1668
  },
1638
- rowSelection: Z,
1669
+ rowSelection: X,
1639
1670
  draggable: e.draggable ? {
1640
1671
  type: "handle",
1641
1672
  width: 40
1642
1673
  } : void 0,
1643
1674
  pagination: e.pageable === void 0 || e.pageable === "client",
1644
- selectedKeys: X.value,
1675
+ selectedKeys: Q.value,
1645
1676
  expandable: e.expandable
1646
1677
  }));
1647
1678
  function _e() {
1648
- Q.value = de({
1679
+ J.value = de({
1649
1680
  columns: e.columns,
1650
1681
  columnsOptions: e.columnsOptions,
1651
1682
  columnsGroups: e.columnsGroups,
1652
- pageMode: C,
1653
- collapsedColumns: b,
1654
- events: j
1683
+ pageMode: x,
1684
+ collapsedColumns: w,
1685
+ events: R
1655
1686
  });
1656
1687
  }
1657
1688
  return A(() => {
1658
- l.value && (l.value.id = `table-${r}`), e.autoLoad && $(), e.grabbable && l.value && pt(l.value);
1689
+ l.value && (l.value.id = `table-${r}`), e.autoLoad && M(), e.grabbable && l.value && er(l.value);
1659
1690
  }), {
1660
1691
  tableId: r,
1661
1692
  tableInstance: u,
1662
- tableSource: c,
1663
- tableOptions: Me,
1664
- tableColumns: Q,
1665
- tableEvents: j,
1666
- tableForm: f,
1667
- tableLoading: d,
1693
+ tableSource: i,
1694
+ tableOptions: Te,
1695
+ tableColumns: J,
1696
+ tableEvents: R,
1697
+ tableForm: d,
1698
+ tableLoading: s,
1668
1699
  modalInstance: n,
1669
1700
  tableRenderElement: l,
1670
- formSource: fe(E(() => {
1671
- var i;
1672
- return (i = a == null ? void 0 : a.value) == null ? void 0 : i.formSource;
1701
+ formSource: se(j(() => {
1702
+ var c;
1703
+ return (c = a == null ? void 0 : a.value) == null ? void 0 : c.formSource;
1673
1704
  })),
1674
1705
  formInstance: a,
1675
- reload: $,
1676
- preview: g,
1677
- edit: x,
1678
- export: T,
1706
+ reload: M,
1707
+ preview: y,
1708
+ edit: C,
1709
+ export: v,
1679
1710
  onSorterChange: ge,
1680
1711
  onTableChange: be,
1681
1712
  renders: {
@@ -1684,23 +1715,23 @@ const ur = /* @__PURE__ */ B({
1684
1715
  renderTablePagination: Ce
1685
1716
  },
1686
1717
  tableSelection: {
1687
- selectedRowKeys: X,
1688
- rowSelection: Z,
1689
- onSelect: xe,
1690
- onSelectAll: ke
1718
+ selectedRowKeys: Q,
1719
+ rowSelection: X,
1720
+ onSelect: ke,
1721
+ onSelectAll: xe
1691
1722
  },
1692
- resetSelection: Te,
1723
+ resetSelection: Me,
1693
1724
  reloadSelection: Se,
1694
1725
  reloadColumns: _e
1695
1726
  };
1696
1727
  },
1697
1728
  render() {
1698
1729
  this.reloadColumns();
1699
- const e = () => s("div", {
1730
+ const e = () => f("div", {
1700
1731
  class: "table-body"
1701
- }, [s("div", {
1732
+ }, [f("div", {
1702
1733
  class: "table-body-wrapper"
1703
- }, [s(Ge, se({
1734
+ }, [f(Ge, fe({
1704
1735
  loading: this.tableLoading,
1705
1736
  data: this.tableSource,
1706
1737
  columns: this.tableColumns,
@@ -1713,38 +1744,38 @@ const ur = /* @__PURE__ */ B({
1713
1744
  selectedKeys: this.tableSelection.selectedRowKeys.value,
1714
1745
  "onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
1715
1746
  }, this.tableOptions), null)])]);
1716
- return s("div", {
1747
+ return f("div", {
1717
1748
  class: {
1718
1749
  "table-render": !0,
1719
1750
  "auto-fill": this.autoFill
1720
1751
  },
1721
1752
  ref: (t) => this.tableRenderElement = t
1722
- }, [s(Qe, {
1753
+ }, [f(Je, {
1723
1754
  ref: (t) => this.modalInstance = t
1724
1755
  }, {
1725
- default: () => [s("div", {
1756
+ default: () => [f("div", {
1726
1757
  class: "table-render-content"
1727
1758
  }, [this.renders.renderTableForm(), this.renders.renderTableActions(), this.$slots.header && this.$slots.header(), e(), this.renders.renderTablePagination()])]
1728
1759
  })]);
1729
1760
  }
1730
1761
  });
1731
- function br(e) {
1762
+ function gr(e) {
1732
1763
  return e;
1733
1764
  }
1734
- function gr(e) {
1765
+ function wr(e) {
1735
1766
  return e;
1736
1767
  }
1737
- const wr = {
1768
+ const vr = {
1738
1769
  install(e, t) {
1739
- e.component("TableRender", ir);
1770
+ e.component("TableRender", dr);
1740
1771
  }
1741
1772
  };
1742
1773
  export {
1743
- ir as TableRender,
1774
+ dr as TableRender,
1744
1775
  xr as TableRenderResolver,
1745
- wr as default,
1746
- br as defineColumns,
1747
- gr as defineTableLoad,
1776
+ vr as default,
1777
+ gr as defineColumns,
1778
+ wr as defineTableLoad,
1748
1779
  tt as useEvents,
1749
- hr as useTable
1780
+ br as useTable
1750
1781
  };