@gopowerteam/table-render 0.0.159 → 0.0.161

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,23 +1,23 @@
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";
1
+ var Oe = Object.defineProperty;
2
+ var $e = (e, t, r) => t in e ? Oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var O = (e, t, r) => ($e(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { ref as g, getCurrentInstance as H, onMounted as A, onUpdated as je, reactive as Le, createVNode as f, Fragment as I, createTextVNode as Y, getCurrentScope as Re, onScopeDispose as qe, unref as Ee, 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 Ve } from "vue";
5
+ import { Button as E, Tag as Fe, Dropdown as ne, Message as He, Descriptions as Ie, DescriptionsItem as Ke, Divider as We, Space as ae, Pagination as Ne, Transfer as Ue, Table as Ge } from "@arco-design/web-vue";
6
6
  import { useModal as D, onSubmit as Ze, ModalProvider as Je } from "@gopowerteam/modal-render";
7
7
  import * as Qe from "exceljs";
8
- import I from "dayjs";
8
+ import V from "dayjs";
9
9
  import { FormRender as oe } from "@gopowerteam/form-render";
10
- import { TableRenderResolver as kr } from "./resolver.mjs";
10
+ import { TableRenderResolver as xr } from "./resolver.mjs";
11
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
- n[u] = r;
12
+ const [l, ...a] = t.index ? t.index.split(".").reverse() : [t.key], n = a.reverse().reduce((u, c) => u == null ? void 0 : u[c], e);
13
+ n[l] = r;
14
14
  }
15
15
  function pe(e) {
16
16
  const t = g([]), r = (a) => {
17
- const n = e.filter((l) => l.formatter);
18
- return n.length > 0 ? a.map((l) => (n.forEach((i) => {
19
- i.formatter && Xe(l, i, i.formatter(l));
20
- }), l)) : a;
17
+ const n = e.filter((u) => u.formatter);
18
+ return n.length > 0 ? a.map((u) => (n.forEach((c) => {
19
+ c.formatter && Xe(u, c, c.formatter(u));
20
+ }), u)) : a;
21
21
  };
22
22
  return [t, (a) => {
23
23
  t.value = r(a);
@@ -30,32 +30,32 @@ function et(e) {
30
30
  ...typeof t.form == "boolean" ? {} : t.form
31
31
  }));
32
32
  }
33
- function yr(e) {
34
- const t = F(), r = g();
35
- function u() {
36
- var n, l;
37
- const a = (l = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$refs) == null ? void 0 : l[e];
33
+ function br(e) {
34
+ const t = H(), r = g();
35
+ function l() {
36
+ var n, u;
37
+ const a = (u = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$refs) == null ? void 0 : u[e];
38
38
  a && (r.value = a);
39
39
  }
40
- return A(u), je(u), r;
40
+ return A(l), je(l), r;
41
41
  }
42
42
  function tt(e) {
43
43
  return (t, r) => e[t](r);
44
44
  }
45
- class V {
45
+ class F {
46
46
  /**
47
47
  * 构造函数
48
48
  * @param index
49
49
  * @param size
50
50
  */
51
51
  constructor(t = 1, r = 10) {
52
- $(this, "data", Le({
52
+ O(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
+ O(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
58
+ O(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 x(e, t, r) {
106
+ function k(e, t, r) {
107
107
  return t.$type = e, t.$disableColumnMode = r == null ? void 0 : r.disableColumnMode, t.$disableViewMode = r == null ? void 0 : r.disableViewMode, t;
108
108
  }
109
109
  function T(e, t) {
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);
110
+ return t.index ? t.index.split(".").reduce((r, l) => r == null ? void 0 : r[l], e) : [t.key].reduce((r, l) => r == null ? void 0 : r[l], 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 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) => {
116
+ return k("button", (r, l, a) => {
117
+ const n = D(), u = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], c = (i, s) => typeof i == "function" ? i(r) : i === void 0 ? s : i;
118
+ async function o(i) {
119
+ if (await (i.confirm === !0 ? new Promise((m) => {
120
120
  n.confirm({
121
121
  title: "提示信息",
122
- content: s.confirmText ?? "您确定要执行该操作?",
122
+ content: i.confirmText ?? "您确定要执行该操作?",
123
123
  onOk: () => m(!0),
124
124
  onCancel: () => m(!1)
125
125
  });
126
- }) : Promise.resolve(!0)) && (s != null && s.onClick)) {
127
- const m = s.onClick(r);
128
- z(m) && s.autoReload !== !1 && m.then(() => {
126
+ }) : Promise.resolve(!0)) && (i != null && i.onClick)) {
127
+ const m = i.onClick(r);
128
+ z(m) && i.autoReload !== !1 && m.then(() => {
129
129
  a != null && a.emits && (a == null || a.emits("reload"));
130
- }), !z(m) && s.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
130
+ }), !z(m) && i.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
131
131
  }
132
132
  }
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,
133
+ return f(I, null, [u.filter((i) => c(i.visiable, !0)).map((i) => f(E, {
134
+ onClick: () => o(i),
135
+ type: i.type || "text",
136
+ shape: i.shape,
137
137
  size: "mini",
138
- disabled: i(s.disabled, !1)
138
+ disabled: c(i.disabled, !1)
139
139
  }, {
140
- icon: s.icon ? () => s.icon(r) : void 0,
141
- default: () => (typeof s.content == "function" ? s.content(r) : s.content) || ""
140
+ icon: i.icon ? () => i.icon(r) : void 0,
141
+ default: () => (typeof i.content == "function" ? i.content(r) : i.content) || ""
142
142
  }))]);
143
143
  }, {
144
144
  disableViewMode: !0
@@ -163,47 +163,47 @@ 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], 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);
166
+ const u = le[e.inputUnit] / le[e.outputUnit], c = parseFloat((n * u).toFixed(10));
167
+ return (e == null ? void 0 : e.precision) === void 0 ? c : c.toFixed(e == null ? void 0 : e.precision);
168
168
  }, r = (n) => {
169
169
  if (n == null)
170
170
  return;
171
- const l = n.toString().split(".");
172
- return l[0] = l[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), l.join(".");
173
- }, u = (n) => {
171
+ const u = n.toString().split(".");
172
+ return u[0] = u[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), u.join(".");
173
+ }, l = (n) => {
174
174
  if ((e == null ? void 0 : e.zeroString) !== void 0 && Number(n) === 0)
175
175
  return e == null ? void 0 : e.zeroString;
176
176
  if ((e == null ? void 0 : e.nullString) !== void 0 && isNaN(Number(n)))
177
177
  return e == null ? void 0 : e.nullString;
178
- const l = t(Number(n));
179
- return e != null && e.thousands ? r(l) : l;
178
+ const u = t(Number(n));
179
+ return e != null && e.thousands ? r(u) : u;
180
180
  };
181
- return x("dict", (n, l) => {
182
- const i = T(n, l);
181
+ return k("dict", (n, u) => {
182
+ const c = T(n, u);
183
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(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]);
185
+ }, [l(c)]), 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 : {}, it = { exports: {} };
188
+ var ut = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ct = { exports: {} };
189
189
  (function(e, t) {
190
- (function(r, u) {
191
- e.exports = u(I);
190
+ (function(r, l) {
191
+ e.exports = l(V);
192
192
  })(ut, function(r) {
193
- function u(l) {
194
- return l && typeof l == "object" && "default" in l ? l : {
195
- default: l
193
+ function l(u) {
194
+ return u && typeof u == "object" && "default" in u ? u : {
195
+ default: u
196
196
  };
197
197
  }
198
- var a = u(r), n = {
198
+ var a = l(r), n = {
199
199
  name: "zh-cn",
200
200
  weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
201
201
  weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
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, i) {
206
- return i === "W" ? l + "周" : l + "日";
205
+ ordinal: function(u, c) {
206
+ return c === "W" ? u + "周" : u + "日";
207
207
  },
208
208
  weekStart: 1,
209
209
  yearStart: 4,
@@ -234,25 +234,25 @@ 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, i) {
238
- var o = 100 * l + i;
237
+ meridiem: function(u, c) {
238
+ var o = 100 * u + c;
239
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
- })(it);
245
- I.locale("zh-cn");
246
- const ct = {
244
+ })(ct);
245
+ V.locale("zh-cn");
246
+ const it = {
247
247
  date: "YYYY-MM-DD",
248
248
  datetime: "YYYY-MM-DD HH:mm:ss",
249
249
  time: "HH:mm:ss",
250
250
  week: "ddd"
251
251
  };
252
252
  function dt(e) {
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)]);
253
+ return k("date", (r, l) => {
254
+ const a = T(r, l), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : it[(e == null ? void 0 : e.format) || "datetime"], u = V(a);
255
+ return f("span", null, [u.isValid() && u.format(n)]);
256
256
  });
257
257
  }
258
258
  const st = {
@@ -269,42 +269,42 @@ function ot(e) {
269
269
  }
270
270
  function mt(e) {
271
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, {
272
+ return k("dict", (a, n) => {
273
+ const u = T(a, n);
274
+ return r ? f(Fe, {
275
275
  color: r === !0 ? void 0 : r
276
276
  }, {
277
- default: () => [t.get(l) || l]
278
- }) : f("span", null, [t.get(l) || l]);
277
+ default: () => [t.get(u) || u]
278
+ }) : f("span", null, [t.get(u) || u]);
279
279
  });
280
280
  }
281
281
  function ht(e) {
282
282
  const t = D();
283
283
  async function r(a, n) {
284
- a.confirm && !await new Promise((i, o) => {
284
+ a.confirm && !await new Promise((c, o) => {
285
285
  t.open("confirm", {
286
286
  title: "确认",
287
287
  content: a.confirmText || "是否确认执行该操作?",
288
- onOk: () => i(!0),
289
- onCancel: () => i(!1)
288
+ onOk: () => c(!0),
289
+ onCancel: () => c(!1)
290
290
  });
291
291
  }) || a.onClick(n);
292
292
  }
293
- return x("dropdown", (a, n) => {
294
- const l = e.options.filter((i) => typeof i.visiable == "function" ? i.visiable(a) : i.visiable !== !1);
293
+ return k("dropdown", (a, n) => {
294
+ const u = e.options.filter((c) => typeof c.visiable == "function" ? c.visiable(a) : c.visiable !== !1);
295
295
  return f(ne, {
296
296
  trigger: (e == null ? void 0 : e.trigger) || "click"
297
297
  }, {
298
- default: () => f(q, {
299
- disabled: l.length === 0,
298
+ default: () => f(E, {
299
+ disabled: u.length === 0,
300
300
  type: "text"
301
301
  }, {
302
302
  default: () => [(e == null ? void 0 : e.content) || "操作"]
303
303
  }),
304
- content: () => l.map((i) => f(ne.Option, {
305
- onClick: () => r(i, a)
304
+ content: () => u.map((c) => f(ne.Option, {
305
+ onClick: () => r(c, a)
306
306
  }, {
307
- default: () => [typeof i.content == "function" ? i.content(a) : i.content]
307
+ default: () => [typeof c.content == "function" ? c.content(a) : c.content]
308
308
  }))
309
309
  });
310
310
  });
@@ -317,39 +317,28 @@ function bt(e) {
317
317
  ...yt,
318
318
  ...e || {}
319
319
  };
320
- function t(a, n) {
321
- var i;
322
- const l = (i = document.getElementById(a)) == null ? void 0 : i.getBoundingClientRect();
323
- if (l) {
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
- }
327
- }
328
- function r(a) {
329
- const n = document.getElementById(`IMAGE_${a}_PREVIEW`);
330
- n == null || n.remove();
320
+ function t() {
331
321
  }
332
- return x("image", (a, n, l) => {
333
- const i = T(a, n), o = Math.random().toString(32).slice(2).toUpperCase(), s = {
322
+ return k("image", (l, a) => {
323
+ const n = T(l, a), u = Math.random().toString(32).slice(2).toUpperCase(), c = {
334
324
  maxWidth: "100%",
335
325
  maxHeight: "100%",
336
326
  borderRadius: e == null ? void 0 : e.radius,
337
327
  objectFit: "contain",
338
328
  transform: `rotate(${(e == null ? void 0 : e.rotate) || 0}deg)`,
339
- cursor: e != null && e.preview ? "pointer" : "unset"
340
- }, d = `${n.index || n.key}_parsed`;
329
+ cursor: e != null && e.preview ? "zoom-in" : "unset"
330
+ }, o = `${a.index || a.key}_parsed`;
341
331
  if (e != null && e.parse) {
342
- const m = e == null ? void 0 : e.parse(i, a);
343
- z(m) ? m.then((h) => a[d] = h ?? "") : a[d] = m ?? "";
332
+ const i = e == null ? void 0 : e.parse(n, l);
333
+ z(i) ? i.then((s) => l[o] = s ?? "") : l[o] = i ?? "";
344
334
  }
345
- if (e != null && e.parse && !a[d] === void 0)
335
+ if (e != null && e.parse && !l[o] === void 0)
346
336
  return f("div", null, [Y("Loading...")]);
347
337
  {
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),
338
+ const i = l[o] || n;
339
+ return i ? f("div", {
340
+ id: u,
341
+ onClick: t,
353
342
  style: {
354
343
  display: "flex",
355
344
  justifyContent: "center",
@@ -358,17 +347,17 @@ function bt(e) {
358
347
  }
359
348
  }, [f("img", {
360
349
  alt: "image",
361
- style: s,
362
- src: m
363
- }, null)]) : f(H, null, null);
350
+ style: c,
351
+ src: i
352
+ }, null)]) : f(I, null, null);
364
353
  }
365
354
  });
366
355
  }
367
356
  function K(e) {
368
- return Re() ? (Ee(e), !0) : !1;
357
+ return Re() ? (qe(e), !0) : !1;
369
358
  }
370
- function O(e) {
371
- return typeof e == "function" ? e() : qe(e);
359
+ function $(e) {
360
+ return typeof e == "function" ? e() : Ee(e);
372
361
  }
373
362
  const W = typeof window < "u" && typeof document < "u";
374
363
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
@@ -380,70 +369,70 @@ function Ct(e) {
380
369
  return t || (t = e()), t;
381
370
  }
382
371
  return r.reset = async () => {
383
- const u = t;
384
- t = void 0, u && await u;
372
+ const l = t;
373
+ t = void 0, l && await l;
385
374
  }, r;
386
375
  }
387
376
  function kt(e, t) {
388
377
  var r;
389
378
  if (typeof e == "number")
390
379
  return e + t;
391
- const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(u.length), n = Number.parseFloat(u) + t;
380
+ const l = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(l.length), n = Number.parseFloat(l) + t;
392
381
  return Number.isNaN(n) ? e : n + a;
393
382
  }
394
383
  function xt(e, t, r = {}) {
395
384
  const {
396
- immediate: u = !0
385
+ immediate: l = !0
397
386
  } = r, a = g(!1);
398
387
  let n = null;
399
- function l() {
388
+ function u() {
400
389
  n && (clearTimeout(n), n = null);
401
390
  }
402
- function i() {
403
- a.value = !1, l();
391
+ function c() {
392
+ a.value = !1, u();
404
393
  }
405
- function o(...s) {
406
- l(), a.value = !0, n = setTimeout(() => {
407
- a.value = !1, n = null, e(...s);
408
- }, O(t));
394
+ function o(...i) {
395
+ u(), a.value = !0, n = setTimeout(() => {
396
+ a.value = !1, n = null, e(...i);
397
+ }, $(t));
409
398
  }
410
- return u && (a.value = !0, W && o()), K(i), {
399
+ return l && (a.value = !0, W && o()), K(c), {
411
400
  isPending: se(a),
412
401
  start: o,
413
- stop: i
402
+ stop: c
414
403
  };
415
404
  }
416
405
  function St(e) {
417
406
  var t;
418
- const r = O(e);
407
+ const r = $(e);
419
408
  return (t = r == null ? void 0 : r.$el) != null ? t : r;
420
409
  }
421
410
  const N = W ? window : void 0, me = W ? window.navigator : void 0;
422
411
  function he(...e) {
423
- let t, r, u, a;
424
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = N) : [t, r, u, a] = e, !t)
412
+ let t, r, l, a;
413
+ if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, l, a] = e, t = N) : [t, r, l, a] = e, !t)
425
414
  return vt;
426
- Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
427
- const n = [], l = () => {
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
- () => [St(t), O(a)],
431
- ([d, m]) => {
432
- if (l(), !d)
415
+ Array.isArray(r) || (r = [r]), Array.isArray(l) || (l = [l]);
416
+ const n = [], u = () => {
417
+ n.forEach((s) => s()), n.length = 0;
418
+ }, c = (s, m, h, w) => (s.addEventListener(m, h, w), () => s.removeEventListener(m, h, w)), o = Ye(
419
+ () => [St(t), $(a)],
420
+ ([s, m]) => {
421
+ if (u(), !s)
433
422
  return;
434
423
  const h = wt(m) ? { ...m } : m;
435
424
  n.push(
436
- ...r.flatMap((w) => u.map((S) => i(d, w, S, h)))
425
+ ...r.flatMap((w) => l.map((S) => c(s, w, S, h)))
437
426
  );
438
427
  },
439
428
  { immediate: !0, flush: "post" }
440
- ), s = () => {
441
- o(), l();
429
+ ), i = () => {
430
+ o(), u();
442
431
  };
443
- return K(s), s;
432
+ return K(i), i;
444
433
  }
445
434
  function Mt() {
446
- const e = g(!1), t = F();
435
+ const e = g(!1), t = H();
447
436
  return t && A(() => {
448
437
  e.value = !0;
449
438
  }, t), e;
@@ -452,115 +441,115 @@ function U(e) {
452
441
  const t = Mt();
453
442
  return j(() => (t.value, !!e()));
454
443
  }
455
- function E(e, t = {}) {
456
- const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
444
+ function q(e, t = {}) {
445
+ const { window: r = N } = t, l = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
457
446
  let a;
458
- const n = g(!1), l = (s) => {
459
- n.value = s.matches;
460
- }, i = () => {
461
- a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
447
+ const n = g(!1), u = (i) => {
448
+ n.value = i.matches;
449
+ }, c = () => {
450
+ a && ("removeEventListener" in a ? a.removeEventListener("change", u) : a.removeListener(u));
462
451
  }, 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);
452
+ l.value && (c(), a = r.matchMedia($(e)), "addEventListener" in a ? a.addEventListener("change", u) : a.addListener(u), n.value = a.matches);
464
453
  });
465
454
  return K(() => {
466
- o(), i(), a = void 0;
455
+ o(), c(), a = void 0;
467
456
  }), n;
468
457
  }
469
458
  function Tt(e, t = {}) {
470
- function r(d, m) {
471
- let h = O(e[O(d)]);
459
+ function r(s, m) {
460
+ let h = $(e[$(s)]);
472
461
  return m != null && (h = kt(h, m)), typeof h == "number" && (h = `${h}px`), h;
473
462
  }
474
- const { window: u = N, strategy: a = "min-width" } = t;
475
- function n(d) {
476
- return u ? u.matchMedia(d).matches : !1;
463
+ const { window: l = N, strategy: a = "min-width" } = t;
464
+ function n(s) {
465
+ return l ? l.matchMedia(s).matches : !1;
477
466
  }
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),
467
+ const u = (s) => q(() => `(min-width: ${r(s)})`, t), c = (s) => q(() => `(max-width: ${r(s)})`, t), o = Object.keys(e).reduce((s, m) => (Object.defineProperty(s, m, {
468
+ get: () => a === "min-width" ? u(m) : c(m),
480
469
  enumerable: !0,
481
470
  configurable: !0
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));
471
+ }), s), {});
472
+ function i() {
473
+ const s = Object.keys(e).map((m) => [m, u(m)]);
474
+ return j(() => s.filter(([, m]) => m.value).map(([m]) => m));
486
475
  }
487
476
  return Object.assign(o, {
488
- greaterOrEqual: l,
489
- smallerOrEqual: i,
490
- greater(d) {
491
- return E(() => `(min-width: ${r(d, 0.1)})`, t);
477
+ greaterOrEqual: u,
478
+ smallerOrEqual: c,
479
+ greater(s) {
480
+ return q(() => `(min-width: ${r(s, 0.1)})`, t);
492
481
  },
493
- smaller(d) {
494
- return E(() => `(max-width: ${r(d, -0.1)})`, t);
482
+ smaller(s) {
483
+ return q(() => `(max-width: ${r(s, -0.1)})`, t);
495
484
  },
496
- between(d, m) {
497
- return E(() => `(min-width: ${r(d)}) and (max-width: ${r(m, -0.1)})`, t);
485
+ between(s, m) {
486
+ return q(() => `(min-width: ${r(s)}) and (max-width: ${r(m, -0.1)})`, t);
498
487
  },
499
- isGreater(d) {
500
- return n(`(min-width: ${r(d, 0.1)})`);
488
+ isGreater(s) {
489
+ return n(`(min-width: ${r(s, 0.1)})`);
501
490
  },
502
- isGreaterOrEqual(d) {
503
- return n(`(min-width: ${r(d)})`);
491
+ isGreaterOrEqual(s) {
492
+ return n(`(min-width: ${r(s)})`);
504
493
  },
505
- isSmaller(d) {
506
- return n(`(max-width: ${r(d, -0.1)})`);
494
+ isSmaller(s) {
495
+ return n(`(max-width: ${r(s, -0.1)})`);
507
496
  },
508
- isSmallerOrEqual(d) {
509
- return n(`(max-width: ${r(d)})`);
497
+ isSmallerOrEqual(s) {
498
+ return n(`(max-width: ${r(s)})`);
510
499
  },
511
- isInBetween(d, m) {
512
- return n(`(min-width: ${r(d)}) and (max-width: ${r(m, -0.1)})`);
500
+ isInBetween(s, m) {
501
+ return n(`(min-width: ${r(s)}) and (max-width: ${r(m, -0.1)})`);
513
502
  },
514
- current: s,
503
+ current: i,
515
504
  active() {
516
- const d = s();
517
- return j(() => d.value.length === 0 ? "" : d.value.at(-1));
505
+ const s = i();
506
+ return j(() => s.value.length === 0 ? "" : s.value.at(-1));
518
507
  }
519
508
  });
520
509
  }
521
510
  function ue(e, t = {}) {
522
511
  const {
523
512
  controls: r = !1,
524
- navigator: u = me
525
- } = t, a = U(() => u && "permissions" in u);
513
+ navigator: l = me
514
+ } = t, a = U(() => l && "permissions" in l);
526
515
  let n;
527
- const l = typeof e == "string" ? { name: e } : e, i = g(), o = () => {
528
- n && (i.value = n.state);
529
- }, s = Ct(async () => {
516
+ const u = typeof e == "string" ? { name: e } : e, c = g(), o = () => {
517
+ n && (c.value = n.state);
518
+ }, i = Ct(async () => {
530
519
  if (a.value) {
531
520
  if (!n)
532
521
  try {
533
- n = await u.permissions.query(l), he(n, "change", o), o();
522
+ n = await l.permissions.query(u), he(n, "change", o), o();
534
523
  } catch {
535
- i.value = "prompt";
524
+ c.value = "prompt";
536
525
  }
537
526
  return n;
538
527
  }
539
528
  });
540
- return s(), r ? {
541
- state: i,
529
+ return i(), r ? {
530
+ state: c,
542
531
  isSupported: a,
543
- query: s
544
- } : i;
532
+ query: i
533
+ } : c;
545
534
  }
546
535
  function _t(e = {}) {
547
536
  const {
548
537
  navigator: t = me,
549
538
  read: r = !1,
550
- source: u,
539
+ source: l,
551
540
  copiedDuring: a = 1500,
552
541
  legacy: n = !1
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);
542
+ } = e, u = U(() => t && "clipboard" in t), c = ue("clipboard-read"), o = ue("clipboard-write"), i = j(() => u.value || n), s = g(""), m = g(!1), h = xt(() => m.value = !1, a);
554
543
  function w() {
555
- l.value && v(i.value) ? t.clipboard.readText().then((y) => {
556
- d.value = y;
557
- }) : d.value = L();
544
+ u.value && v(c.value) ? t.clipboard.readText().then((y) => {
545
+ s.value = y;
546
+ }) : s.value = L();
558
547
  }
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());
548
+ i.value && r && he(["copy", "cut"], w);
549
+ async function S(y = $(l)) {
550
+ i.value && y != null && (u.value && v(o.value) ? await t.clipboard.writeText(y) : x(y), s.value = y, m.value = !0, h.start());
562
551
  }
563
- function k(y) {
552
+ function x(y) {
564
553
  const C = document.createElement("textarea");
565
554
  C.value = y ?? "", C.style.position = "absolute", C.style.opacity = "0", document.body.appendChild(C), C.select(), document.execCommand("copy"), C.remove();
566
555
  }
@@ -572,33 +561,33 @@ function _t(e = {}) {
572
561
  return y === "granted" || y === "prompt";
573
562
  }
574
563
  return {
575
- isSupported: s,
576
- text: d,
564
+ isSupported: i,
565
+ text: s,
577
566
  copied: m,
578
567
  copy: S
579
568
  };
580
569
  }
581
- const $t = " ";
582
- function Ot(e) {
570
+ const Ot = " ";
571
+ function $t(e) {
583
572
  return e == null ? void 0 : e.replace(/(\d{3})\d*(\d{4})/g, "$1****$2");
584
573
  }
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, "*");
574
+ function ce(e, t) {
575
+ return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? Ot).replace(/M/g, "*");
587
576
  }
588
577
  function jt(e) {
589
578
  const t = _t();
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);
579
+ return k("phone", (l, a) => {
580
+ const n = `phone_${Math.random().toString(36).slice(2)}`, u = "__table__column_phone__", c = T(l, a), o = 16, i = `cursor:pointer;width:${o}px;height:${o}px;`, s = ce($t(c), e == null ? void 0 : e.separator), m = ce(c, e == null ? void 0 : e.separator);
592
581
  function h() {
593
- window.focus(), t.copy(i).then(() => {
594
- Fe.success({
582
+ window.focus(), t.copy(c).then(() => {
583
+ He.success({
595
584
  content: "复制成功",
596
585
  duration: 1e3
597
586
  });
598
587
  });
599
588
  }
600
589
  function w() {
601
- const v = document.querySelectorAll(`.${l}.content`);
590
+ const v = document.querySelectorAll(`.${u}.content`);
602
591
  v.length > 0 && v.forEach((y) => {
603
592
  const C = y;
604
593
  if (C.innerText.includes("****"))
@@ -612,25 +601,25 @@ function jt(e) {
612
601
  const y = document.querySelector(`#${n}>.preview-icon`);
613
602
  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>`);
614
603
  }
615
- function k() {
604
+ function x() {
616
605
  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);
606
+ y ? (w(), v && (v.innerHTML = m)) : v && (v.innerHTML = s), S(!y);
618
607
  }
619
608
  function L() {
620
- window.open(`tel:${i}`, "_blank");
609
+ window.open(`tel:${c}`, "_blank");
621
610
  }
622
611
  return f("div", {
623
612
  id: n,
624
613
  style: "display:flex;align-items:center;gap:4px;"
625
614
  }, [f("div", {
626
- "data-encrypt": d,
627
- class: `${l} content`,
615
+ "data-encrypt": s,
616
+ class: `${u} content`,
628
617
  style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
629
- }, [e != null && e.safe ? d : m]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && f("i", {
618
+ }, [e != null && e.safe ? s : m]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && f("i", {
630
619
  class: "preview-icon",
631
620
  title: "显示完整号码",
632
- style: s,
633
- onClick: k
621
+ style: i,
622
+ onClick: x
634
623
  }, [f("svg", {
635
624
  width: o,
636
625
  height: o,
@@ -650,7 +639,7 @@ function jt(e) {
650
639
  "stroke-width": "4",
651
640
  "stroke-linejoin": "round"
652
641
  }, null)])]), (e == null ? void 0 : e.allowDial) && f("i", {
653
- style: s,
642
+ style: i,
654
643
  title: "拨出号码",
655
644
  onClick: L
656
645
  }, [f("svg", {
@@ -678,7 +667,7 @@ function jt(e) {
678
667
  "stroke-width": "4",
679
668
  "stroke-linejoin": "round"
680
669
  }, null)])]), (e == null ? void 0 : e.allowCopy) && f("i", {
681
- style: s,
670
+ style: i,
682
671
  title: "复制号码",
683
672
  onClick: h
684
673
  }, [f("svg", {
@@ -703,21 +692,21 @@ function jt(e) {
703
692
  });
704
693
  }
705
694
  function Lt(e) {
706
- return x("render", (r) => e(r));
695
+ return k("render", (r) => e(r));
707
696
  }
708
697
  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;
698
+ return k("tag", (r, l) => {
699
+ const a = (e == null ? void 0 : e.maxCount) || 5, n = e != null && e.formatter ? e.formatter(r) : T(r, l), u = (e == null ? void 0 : e.textColors) || ["#F87335"], c = (e == null ? void 0 : e.backgroundColors) || ["#FFF4E8"], o = n.length > a, i = e == null ? void 0 : e.minWidth;
711
700
  return f("div", {
712
701
  style: {
713
702
  display: "flex",
714
703
  flexWrap: "wrap"
715
704
  }
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];
705
+ }, [n.slice(0, a).map((s, m) => {
706
+ const h = typeof u == "function" ? u(s, m) : u[m % u.length], w = typeof c == "function" ? c(s, m) : c[m % c.length];
718
707
  return f("span", {
719
708
  style: {
720
- minWidth: s ? `${s}px` : "unset",
709
+ minWidth: i ? `${i}px` : "unset",
721
710
  textAlign: "center",
722
711
  margin: "2px",
723
712
  padding: "2px 5px",
@@ -726,21 +715,21 @@ function Rt(e) {
726
715
  color: h,
727
716
  backgroundColor: w
728
717
  }
729
- }, [d]);
718
+ }, [s]);
730
719
  }), o && "..."]);
731
720
  });
732
721
  }
733
- function ce(e) {
722
+ function ie(e) {
734
723
  if (typeof e == "string")
735
724
  return e;
736
725
  if (typeof e == "number")
737
726
  return `${e}px`;
738
727
  }
739
- function Et(e, t, r) {
740
- var u, a;
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);
728
+ function qt(e, t, r) {
729
+ var l, a;
730
+ return typeof e == "function" ? (l = e(r)) == null ? void 0 : l.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);
742
731
  }
743
- function qt(e, t) {
732
+ function Et(e, t) {
744
733
  if (typeof e != "function") {
745
734
  if (typeof (e == null ? void 0 : e.color) == "function")
746
735
  return e == null ? void 0 : e.color(t);
@@ -750,36 +739,50 @@ function qt(e, t) {
750
739
  }
751
740
  function Pt(e, t) {
752
741
  if (typeof e != "function")
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
+ return typeof (e == null ? void 0 : e.size) == "function" ? ie(e == null ? void 0 : e.size(t)) : ie(e == null ? void 0 : e.size);
754
743
  }
755
744
  function Yt(e, t) {
756
745
  let r = "";
757
- const u = qt(e, t), a = Pt(e, t);
758
- return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
746
+ const l = Et(e, t), a = Pt(e, t);
747
+ return l && (r += `color:${l};`), a && (r += `font-size:${a};`), r;
759
748
  }
760
749
  function zt(e) {
761
- return x("text", (r, u) => {
762
- const a = Et(e || {}, u, r), n = Yt(e || {}, r);
750
+ return k("text", (r, l) => {
751
+ const a = qt(e || {}, l, r), n = Yt(e || {}, r);
763
752
  return f("span", {
764
753
  style: n
765
754
  }, [a]);
766
755
  });
767
756
  }
768
757
  function At(e) {
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";
770
- return x("progress", (l, i) => {
758
+ const t = (e == null ? void 0 : e.backgroundColor) ?? "#f5f5f5", r = (e == null ? void 0 : e.foregroundColor) ?? "#1677ff", l = (e == null ? void 0 : e.showText) ?? !0, a = (e == null ? void 0 : e.textColor) ?? "#000";
759
+ return k("progress", (u, c) => {
771
760
  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)}%` : "";
761
+ const o = T(u, c), i = (e == null ? void 0 : e.precision) ?? 0, s = Math.min(Math.max(((h = e == null ? void 0 : e.format) == null ? void 0 : h.call(e, o)) ?? o, 0), 1), m = l ? `${(s * 100).toFixed(i)}%` : "";
773
762
  return f("div", {
774
763
  style: `background-color:${t};position:relative;min-height: 20px;text-align: center;border-radius: 2px;overflow:hidden;`
775
764
  }, [f("div", {
776
765
  style: `background-color: ${r};position:absolute;left:0;top:0;right;0;width: ${m};height: 100%;`
777
- }, null), u && f("div", {
766
+ }, null), l && f("div", {
778
767
  style: `position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:${a}`
779
768
  }, [m])]);
780
769
  });
781
770
  }
782
- function Bt() {
771
+ function Bt(e) {
772
+ return k("serial", (r, l, a) => {
773
+ const n = {
774
+ color: typeof (e == null ? void 0 : e.color) == "function" ? e.color(r) : e == null ? void 0 : e.color,
775
+ fontWeight: (e == null ? void 0 : e.weight) || "normal",
776
+ textAlign: "center"
777
+ };
778
+ return f("div", {
779
+ style: n
780
+ }, [a.rowIndex + 1]);
781
+ }, {
782
+ disableViewMode: !0
783
+ });
784
+ }
785
+ function Dt() {
783
786
  return {
784
787
  dropdown: ht,
785
788
  text: zt,
@@ -791,20 +794,25 @@ function Bt() {
791
794
  currency: lt,
792
795
  date: dt,
793
796
  button: nt,
794
- progress: At
797
+ progress: At,
798
+ serial: Bt
795
799
  };
796
800
  }
797
801
  function G(e, t) {
798
802
  if (!(e != null && e.render))
799
803
  return;
800
804
  const r = e.render({
801
- ...Bt()
805
+ ...Dt()
802
806
  // ...(Table?.$override?.table || {}),
803
807
  });
804
808
  return {
805
809
  render: ({
806
- record: u
807
- }) => r(u, e, t),
810
+ record: l,
811
+ rowIndex: a
812
+ }) => r(l, e, {
813
+ ...t || {},
814
+ rowIndex: a
815
+ }),
808
816
  [rt]: r.$type,
809
817
  disableColumnMode: r.$disableColumnMode,
810
818
  disableViewMode: r.$disableViewMode,
@@ -816,50 +824,50 @@ function de({
816
824
  columns: e,
817
825
  columnsOptions: t,
818
826
  columnsGroups: r,
819
- pageMode: u,
827
+ pageMode: l,
820
828
  collapsedColumns: a,
821
829
  events: n
822
830
  }) {
823
- const l = e.map((i) => ({
831
+ const u = e.map((c) => ({
824
832
  ...t || {},
825
- ...i
826
- })).map((i) => Vt(i, u, a, n)).filter(Boolean);
827
- return It(l, r);
828
- }
829
- function Dt(e, t) {
830
- const r = [], u = (n) => {
831
- if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
832
- const l = t.find((i) => {
833
+ ...c
834
+ })).map((c) => Ht(c, l, a, n)).filter(Boolean);
835
+ return Ft(u, r);
836
+ }
837
+ function Vt(e, t) {
838
+ const r = [], l = (n) => {
839
+ if ("children" in n && (n.children = n.children.map(l)), "key" in n) {
840
+ const u = t.find((c) => {
833
841
  var o;
834
- return ((o = Object.getOwnPropertyDescriptor(i, "key")) == null ? void 0 : o.value) === n.key;
842
+ return ((o = Object.getOwnPropertyDescriptor(c, "key")) == null ? void 0 : o.value) === n.key;
835
843
  });
836
- if (l)
837
- return r.push(l), l;
844
+ if (u)
845
+ return r.push(u), u;
838
846
  }
839
847
  return n;
840
- }, a = u(e);
848
+ }, a = l(e);
841
849
  if (r != null && r.length && a) {
842
- const n = Math.min(...r.map((l) => t.indexOf(l)));
843
- r.forEach((l) => {
844
- const i = t.indexOf(l);
845
- t.splice(i, 1);
850
+ const n = Math.min(...r.map((u) => t.indexOf(u)));
851
+ r.forEach((u) => {
852
+ const c = t.indexOf(u);
853
+ t.splice(c, 1);
846
854
  }), t.splice(n, 0, a);
847
855
  }
848
856
  }
849
- function It(e, t = []) {
857
+ function Ft(e, t = []) {
850
858
  return t.forEach((r) => {
851
- Dt(r, e);
859
+ Vt(r, e);
852
860
  }), e;
853
861
  }
854
- function Vt(e, t, r, u) {
862
+ function Ht(e, t, r, l) {
855
863
  const {
856
864
  render: a,
857
865
  disableColumnMode: n
858
866
  } = G(e, {
859
867
  previewing: !1,
860
- emits: u
868
+ emits: l
861
869
  }) || {};
862
- if (!(n || e.visiable === !1) && !(typeof e.visiable == "function" && e.visiable() === !1) && !r.value.find((l) => l.key === e.key && l.collapsed === !0))
870
+ if (!(n || e.visiable === !1) && !(typeof e.visiable == "function" && e.visiable() === !1) && !r.value.find((u) => u.key === e.key && u.collapsed === !0))
863
871
  return {
864
872
  dataIndex: e.index || e.key,
865
873
  title: e.title,
@@ -878,10 +886,10 @@ function Vt(e, t, r, u) {
878
886
  render: a
879
887
  };
880
888
  }
881
- function Ft() {
889
+ function It() {
882
890
  return new Qe.Workbook();
883
891
  }
884
- function Ht(e, t = "Sheet1") {
892
+ function Kt(e, t = "Sheet1") {
885
893
  return e.addWorksheet(t, {
886
894
  headerFooter: {
887
895
  firstHeader: "",
@@ -889,55 +897,55 @@ function Ht(e, t = "Sheet1") {
889
897
  }
890
898
  });
891
899
  }
892
- function Kt(e, t) {
900
+ function Wt(e, t) {
893
901
  e.columns = t;
894
902
  }
895
- function Wt(e, t) {
903
+ function Nt(e, t) {
896
904
  e.addRows(t);
897
905
  }
898
- async function Nt({
906
+ async function Ut({
899
907
  columns: e,
900
908
  rows: t,
901
909
  filename: r
902
910
  }) {
903
- const u = Ft(), a = Ht(u);
904
- Kt(a, e), Wt(a, t);
905
- const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
906
- Ut(l, r || `${I().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
911
+ const l = It(), a = Kt(l);
912
+ Wt(a, e), Nt(a, t);
913
+ const n = await l.xlsx.writeBuffer(), u = new Blob([n]);
914
+ Gt(u, r || `${V().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
907
915
  }
908
- function Ut(e, t) {
916
+ function Gt(e, t) {
909
917
  const r = document.createElement("a");
910
918
  r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
911
919
  URL.revokeObjectURL(r.href);
912
920
  }, 1e3);
913
921
  }
914
- function Gt(e, t) {
922
+ function Zt(e, t) {
915
923
  const r = {};
916
924
  return e.filter((a) => a.exportable !== !1).map((a) => ({
917
925
  options: a,
918
926
  render: G(a),
919
927
  content: typeof a.exportable == "object" ? a.exportable.content : void 0
920
928
  })).forEach((a) => {
921
- var i;
922
- const n = (i = a.render) == null ? void 0 : i.render, l = () => {
929
+ var c;
930
+ const n = (c = a.render) == null ? void 0 : c.render, u = () => {
923
931
  var o;
924
932
  switch (!0) {
925
933
  case !!a.content:
926
934
  return a.content && a.content(t);
927
935
  case !!n: {
928
- const s = document.createElement("div"), d = ze(() => n && n({
936
+ const i = document.createElement("div"), s = ze(() => n && n({
929
937
  record: t
930
938
  }));
931
- return Ae(d, s), (o = d.el) == null ? void 0 : o.innerText;
939
+ return Ae(s, i), (o = s.el) == null ? void 0 : o.innerText;
932
940
  }
933
941
  default:
934
942
  return T(t, a.options);
935
943
  }
936
944
  };
937
- r[a.options.key] = l();
945
+ r[a.options.key] = u();
938
946
  }), r;
939
947
  }
940
- function Zt(e) {
948
+ function Jt(e) {
941
949
  switch (!0) {
942
950
  case typeof e == "number":
943
951
  return e / 6;
@@ -947,31 +955,31 @@ function Zt(e) {
947
955
  return 30;
948
956
  }
949
957
  }
950
- function Jt(e, t, r) {
951
- const u = e.filter((n) => n.exportable !== !1).map((n) => {
952
- var l, i;
958
+ function Qt(e, t, r) {
959
+ const l = e.filter((n) => n.exportable !== !1).map((n) => {
960
+ var u, c;
953
961
  return {
954
962
  key: n.key,
955
- header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
956
- width: ((i = n.exportable) == null ? void 0 : i.width) || Zt(n.width)
963
+ header: ((u = n.exportable) == null ? void 0 : u.header) || n.title,
964
+ width: ((c = n.exportable) == null ? void 0 : c.width) || Jt(n.width)
957
965
  };
958
- }), a = t.map((n) => Gt(e, n));
959
- Nt({
960
- columns: u,
966
+ }), a = t.map((n) => Zt(e, n));
967
+ Ut({
968
+ columns: l,
961
969
  rows: a,
962
970
  filename: r
963
971
  });
964
972
  }
965
- function Qt() {
973
+ function Xt() {
966
974
  return {
967
- exportExcel: Jt
975
+ exportExcel: Qt
968
976
  };
969
977
  }
970
978
  class Z {
971
979
  constructor(t) {
972
- $(this, "sort", {});
973
- $(this, "defaultSort", {});
974
- $(this, "before", (t) => {
980
+ O(this, "sort", {});
981
+ O(this, "defaultSort", {});
982
+ O(this, "before", (t) => {
975
983
  t.paramsQuery = {
976
984
  ...t.paramsQuery || {},
977
985
  sort: this.stringify(this.sort)
@@ -992,9 +1000,9 @@ class Z {
992
1000
  * @param key 排序关键字
993
1001
  */
994
1002
  remove(t) {
995
- const r = Object.entries(this.sort).filter(([u]) => u !== t);
996
- this.sort = {}, r && r.forEach(([u, a]) => {
997
- this.sort[u] = a;
1003
+ const r = Object.entries(this.sort).filter(([l]) => l !== t);
1004
+ this.sort = {}, r && r.forEach(([l, a]) => {
1005
+ this.sort[l] = a;
998
1006
  });
999
1007
  }
1000
1008
  /**
@@ -1007,35 +1015,35 @@ class Z {
1007
1015
  * 转换排序对象为字符串
1008
1016
  */
1009
1017
  stringify(t) {
1010
- return typeof t != "object" ? [] : (t instanceof Z && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
1018
+ return typeof t != "object" ? [] : (t instanceof Z && (t = t.sort), Object.entries(t).map(([r, l]) => `${r},${l}`));
1011
1019
  }
1012
1020
  }
1013
- const Xt = 300;
1014
- function pt(e) {
1021
+ const pt = 300;
1022
+ function er(e) {
1015
1023
  const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
1016
1024
  if (!r)
1017
1025
  return;
1018
- let u, a = !1, n;
1026
+ let l, a = !1, n;
1019
1027
  r.addEventListener("mousedown", () => {
1020
- u = setTimeout(() => {
1021
- u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
1022
- }, Xt);
1028
+ l = setTimeout(() => {
1029
+ l && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
1030
+ }, pt);
1023
1031
  }), r.addEventListener("mouseup", () => {
1024
- clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
1025
- }), r.addEventListener("mousemove", (l) => {
1032
+ clearTimeout(l), l && (l = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
1033
+ }), r.addEventListener("mousemove", (u) => {
1026
1034
  if (a)
1027
1035
  if (n === void 0)
1028
- n = l.clientX;
1036
+ n = u.clientX;
1029
1037
  else {
1030
- const i = n - l.clientX;
1031
- n = l.clientX, r.scrollLeft += i;
1038
+ const c = n - u.clientX;
1039
+ n = u.clientX, r.scrollLeft += c;
1032
1040
  }
1033
1041
  });
1034
1042
  }
1035
- function er(e) {
1043
+ function tr(e) {
1036
1044
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
1037
1045
  }
1038
- const tr = /* @__PURE__ */ B({
1046
+ const rr = /* @__PURE__ */ B({
1039
1047
  props: {
1040
1048
  record: {
1041
1049
  type: Object,
@@ -1069,7 +1077,7 @@ const tr = /* @__PURE__ */ B({
1069
1077
  }
1070
1078
  },
1071
1079
  setup(e) {
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) => ({
1080
+ const t = H(), r = g(0), l = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
1073
1081
  options: n,
1074
1082
  renderer: G(n, {
1075
1083
  previewing: !0
@@ -1077,16 +1085,16 @@ const tr = /* @__PURE__ */ B({
1077
1085
  })).filter(({
1078
1086
  options: n
1079
1087
  }) => {
1080
- var l;
1081
- return !((l = e.exclude) != null && l.includes(n.key));
1088
+ var u;
1089
+ return !((u = e.exclude) != null && u.includes(n.key));
1082
1090
  }).filter(({
1083
1091
  renderer: n
1084
1092
  }) => !(n != null && n.disableViewMode));
1085
1093
  function a() {
1086
1094
  var n;
1087
1095
  if (t) {
1088
- const l = (n = t.proxy) == null ? void 0 : n.$el;
1089
- r.value = Math.floor(l.offsetWidth / e.minWidth);
1096
+ const u = (n = t.proxy) == null ? void 0 : n.$el;
1097
+ r.value = Math.floor(u.offsetWidth / e.minWidth);
1090
1098
  }
1091
1099
  }
1092
1100
  return A(() => {
@@ -1095,19 +1103,19 @@ const tr = /* @__PURE__ */ B({
1095
1103
  let n;
1096
1104
  return f("div", {
1097
1105
  class: "preview-container"
1098
- }, [f(He, {
1106
+ }, [f(Ie, {
1099
1107
  column: r.value,
1100
1108
  bordered: !0,
1101
1109
  align: "left",
1102
1110
  layout: e.layout
1103
- }, er(n = u.map((l) => f(Ke, {
1104
- label: l.options.title
1111
+ }, tr(n = l.map((u) => f(Ke, {
1112
+ label: u.options.title
1105
1113
  }, {
1106
1114
  default: () => {
1107
- var i, o;
1108
- return [(i = l.renderer) != null && i.render ? (o = l.renderer) == null ? void 0 : o.render({
1115
+ var c, o;
1116
+ return [(c = u.renderer) != null && c.render ? (o = u.renderer) == null ? void 0 : o.render({
1109
1117
  record: e.record
1110
- }) : T(e.record, l.options)];
1118
+ }) : T(e.record, u.options)];
1111
1119
  }
1112
1120
  }))) ? n : {
1113
1121
  default: () => [n]
@@ -1115,12 +1123,12 @@ const tr = /* @__PURE__ */ B({
1115
1123
  };
1116
1124
  }
1117
1125
  });
1118
- function rr(e, t, {
1126
+ function nr(e, t, {
1119
1127
  tableForm: r,
1120
- tableEvents: u
1128
+ tableEvents: l
1121
1129
  }) {
1122
1130
  const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
1123
- return a || n ? () => f(H, null, [n && f(We, {
1131
+ return a || n ? () => f(I, null, [n && f(We, {
1124
1132
  margin: 0
1125
1133
  }, null), a && f("div", {
1126
1134
  class: "table-actions",
@@ -1134,19 +1142,19 @@ function rr(e, t, {
1134
1142
  }, [f("div", {
1135
1143
  class: "built-in"
1136
1144
  }, [f(ae, null, {
1137
- default: () => [e.refreshable && f(q, {
1145
+ default: () => [e.refreshable && f(E, {
1138
1146
  type: "primary",
1139
- onClick: () => u("reload")
1147
+ onClick: () => l("reload")
1140
1148
  }, {
1141
1149
  default: () => [Y("刷新")]
1142
- }), e.exportable && f(q, {
1150
+ }), e.exportable && f(E, {
1143
1151
  type: "primary",
1144
- onClick: () => u("export")
1152
+ onClick: () => l("export")
1145
1153
  }, {
1146
1154
  default: () => [Y("导出")]
1147
- }), e.collapsable && f(q, {
1155
+ }), e.collapsable && f(E, {
1148
1156
  type: "primary",
1149
- onClick: () => u("collapse")
1157
+ onClick: () => l("collapse")
1150
1158
  }, {
1151
1159
  default: () => [Y("显示")]
1152
1160
  })]
@@ -1157,9 +1165,9 @@ function rr(e, t, {
1157
1165
  })])])]) : () => {
1158
1166
  };
1159
1167
  }
1160
- function nr(e, t, {
1168
+ function ar(e, t, {
1161
1169
  tableForm: r,
1162
- tableEvents: u,
1170
+ tableEvents: l,
1163
1171
  formInstance: a
1164
1172
  }) {
1165
1173
  return r != null && r.length ? () => f("div", {
@@ -1168,87 +1176,87 @@ function nr(e, t, {
1168
1176
  form: r,
1169
1177
  ref: (n) => a && (a.value = n),
1170
1178
  searchable: !0,
1171
- onSubmit: () => u("reload", {
1179
+ onSubmit: () => l("reload", {
1172
1180
  reset: !0
1173
1181
  })
1174
1182
  }, e.formOptions), null)]) : () => {
1175
1183
  };
1176
1184
  }
1177
- function ar(e, t, {
1185
+ function lr(e, t, {
1178
1186
  tableSource: r
1179
1187
  }) {
1180
- const u = g([]);
1188
+ const l = g([]);
1181
1189
  function a() {
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", []);
1190
+ l.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
1183
1191
  }
1184
1192
  function n() {
1185
1193
  re(() => {
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]]);
1194
+ e.checkboxRows !== void 0 && (l.value = [...e.checkboxRows.map((i) => i[e.rowKey])]), e.checkboxKeys !== void 0 && (l.value = [...e.checkboxKeys]), e.radioKey && (l.value = [e.radioKey]), e.radioRow && (l.value = [e.radioRow[e.rowKey]]);
1187
1195
  });
1188
1196
  }
1189
- function l() {
1190
- const s = typeof e.selection == "string" ? {
1197
+ function u() {
1198
+ const i = typeof e.selection == "string" ? {
1191
1199
  type: e.selection
1192
1200
  } : e.selection;
1193
- switch (s == null ? void 0 : s.type) {
1201
+ switch (i == null ? void 0 : i.type) {
1194
1202
  case "radio":
1195
1203
  return {
1196
1204
  title: "选择",
1197
- ...s,
1198
- selectedRowKeys: u.value
1205
+ ...i,
1206
+ selectedRowKeys: l.value
1199
1207
  };
1200
1208
  case "checkbox":
1201
1209
  return {
1202
1210
  showCheckedAll: !0,
1203
- selectedRowKeys: u.value,
1204
- ...s
1211
+ selectedRowKeys: l.value,
1212
+ ...i
1205
1213
  };
1206
1214
  }
1207
1215
  }
1208
- function i(s, d, m) {
1216
+ function c(i, s, m) {
1209
1217
  const {
1210
1218
  type: h
1211
- } = l() || {};
1219
+ } = u() || {};
1212
1220
  switch (h) {
1213
1221
  case "radio":
1214
- t.emit("update:radio-key", d), t.emit("update:radio-row", m);
1222
+ t.emit("update:radio-key", s), t.emit("update:radio-row", m);
1215
1223
  break;
1216
1224
  case "checkbox":
1217
- t.emit("update:checkbox-keys", s), t.emit("update:checkbox-rows", s.map((w) => {
1225
+ t.emit("update:checkbox-keys", i), t.emit("update:checkbox-rows", i.map((w) => {
1218
1226
  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));
1227
+ return r.value.find((x) => x[e.rowKey] === w) || ((S = e.checkboxRows) == null ? void 0 : S.find((x) => x[e.rowKey] === w));
1220
1228
  }));
1221
1229
  break;
1222
1230
  }
1223
1231
  }
1224
1232
  function o() {
1225
1233
  re(() => {
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));
1234
+ t.emit("update:checkbox-keys", l.value), t.emit("update:checkbox-rows", l.value.map((i) => {
1235
+ var s;
1236
+ return r.value.find((m) => m[e.rowKey] === i) || ((s = e.checkboxRows) == null ? void 0 : s.find((m) => m[e.rowKey] === i));
1229
1237
  }));
1230
1238
  });
1231
1239
  }
1232
1240
  return n(), {
1233
- selectedRowKeys: u,
1234
- rowSelection: l(),
1235
- onSelect: i,
1241
+ selectedRowKeys: l,
1242
+ rowSelection: u(),
1243
+ onSelect: c,
1236
1244
  onSelectAll: o,
1237
1245
  resetSelection: a,
1238
1246
  reloadSelection: n
1239
1247
  };
1240
1248
  }
1241
- function lr(e, t, {
1249
+ function ur(e, t, {
1242
1250
  pageService: r,
1243
- tableEvents: u
1251
+ tableEvents: l
1244
1252
  }) {
1245
- function a(i) {
1246
- r && (r.pageIndex = i, u("reload"));
1253
+ function a(c) {
1254
+ r && (r.pageIndex = c, l("reload"));
1247
1255
  }
1248
- function n(i) {
1249
- r && (r.pageSize = i, u("reload"));
1256
+ function n(c) {
1257
+ r && (r.pageSize = c, l("reload"));
1250
1258
  }
1251
- const l = Tt({
1259
+ const u = Tt({
1252
1260
  mobile: 0,
1253
1261
  tablet: 640,
1254
1262
  desktop: 1024
@@ -1260,24 +1268,24 @@ function lr(e, t, {
1260
1268
  }
1261
1269
  }, [f(Ne, {
1262
1270
  current: r.pageIndex,
1263
- "onUpdate:current": (i) => r.pageIndex = i,
1271
+ "onUpdate:current": (c) => r.pageIndex = c,
1264
1272
  "page-size": r.pageSize,
1265
- "onUpdate:page-size": (i) => r.pageSize = i,
1273
+ "onUpdate:page-size": (c) => r.pageSize = c,
1266
1274
  total: r.total,
1267
1275
  "page-size-options": r.pageSizeOpts,
1268
1276
  "hide-on-single-page": !e.alwayShowPagination,
1269
1277
  "show-total": !0,
1270
1278
  "show-page-size": !0,
1271
- simple: l.smaller("desktop").value,
1272
- onChange: (i) => a(i),
1273
- onPageSizeChange: (i) => n(i),
1279
+ simple: u.smaller("desktop").value,
1280
+ onChange: (c) => a(c),
1281
+ onPageSizeChange: (c) => n(c),
1274
1282
  style: {
1275
1283
  justifyContent: "flex-end"
1276
1284
  }
1277
1285
  }, null)]) : () => {
1278
1286
  };
1279
1287
  }
1280
- const ur = /* @__PURE__ */ B({
1288
+ const cr = /* @__PURE__ */ B({
1281
1289
  props: {
1282
1290
  collapsedColumns: {
1283
1291
  type: Array,
@@ -1289,26 +1297,26 @@ const ur = /* @__PURE__ */ B({
1289
1297
  label: a.title,
1290
1298
  value: a.key,
1291
1299
  disabled: !1
1292
- }))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1300
+ }))), l = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1293
1301
  return Ze(() => {
1294
1302
  const a = e.collapsedColumns.map((n) => ({
1295
1303
  key: n.key,
1296
1304
  title: n.title,
1297
- collapsed: u.value.includes(n.key)
1305
+ collapsed: l.value.includes(n.key)
1298
1306
  }));
1299
1307
  t.close(a);
1300
1308
  }), () => f("div", {
1301
1309
  class: "table-collapsed-render"
1302
1310
  }, [f(Ue, {
1303
1311
  data: r.value,
1304
- "default-value": u.value,
1305
- onChange: (a) => u.value = [...a],
1312
+ "default-value": l.value,
1313
+ onChange: (a) => l.value = [...a],
1306
1314
  title: ["显示列", "隐藏列"],
1307
1315
  style: {
1308
1316
  justifyContent: "center"
1309
1317
  }
1310
1318
  }, {
1311
- default: () => [De(f("template", null, null), [[Ie("slot"), "source"]])]
1319
+ default: () => [De(f("template", null, null), [[Ve("slot"), "source"]])]
1312
1320
  })]);
1313
1321
  }
1314
1322
  }), ir = /* @__PURE__ */ B({
@@ -1328,8 +1336,8 @@ const ur = /* @__PURE__ */ B({
1328
1336
  },
1329
1337
  setup(e) {
1330
1338
  const t = D();
1331
- function r(u) {
1332
- e.onSubmit && e.onSubmit(u), t.close(u);
1339
+ function r(l) {
1340
+ e.onSubmit && e.onSubmit(l), t.close(l);
1333
1341
  }
1334
1342
  return () => f("div", {
1335
1343
  class: "edit-form-container"
@@ -1340,7 +1348,7 @@ const ur = /* @__PURE__ */ B({
1340
1348
  onSubmit: r
1341
1349
  }, null)]);
1342
1350
  }
1343
- }), cr = /* @__PURE__ */ B({
1351
+ }), dr = /* @__PURE__ */ B({
1344
1352
  props: {
1345
1353
  // 数据主键
1346
1354
  rowKey: {
@@ -1479,24 +1487,24 @@ const ur = /* @__PURE__ */ B({
1479
1487
  },
1480
1488
  expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
1481
1489
  setup(e, t) {
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
1490
+ const r = Math.random().toString(32).slice(2).toUpperCase(), l = g(), a = g(), n = g(), u = g(), [c, o] = pe(e.columns), i = g(!1), s = e.form ?? et(e.columns), m = S(), h = L(), w = g(e.columns.map((d) => ({
1491
+ key: d.key,
1492
+ title: d.title,
1493
+ collapsed: !!d.collapsed
1486
1494
  })));
1487
1495
  function S() {
1488
1496
  switch (!0) {
1489
1497
  case (typeof e.pageable == "string" && e.pageable === "server"):
1490
- return new V();
1498
+ return new F();
1491
1499
  case (typeof e.pageable == "boolean" && e.pageable === !0):
1492
- return new V();
1500
+ return new F();
1493
1501
  case (typeof e.pageable == "object" && !!e.pageable.reset):
1494
1502
  return e.pageable;
1495
1503
  case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
1496
- return new V(e.pageable.index, e.pageable.size);
1504
+ return new F(e.pageable.index, e.pageable.size);
1497
1505
  }
1498
1506
  }
1499
- const k = (() => {
1507
+ const x = (() => {
1500
1508
  switch (!0) {
1501
1509
  case typeof e.pageable == "string":
1502
1510
  return e.pageable;
@@ -1507,69 +1515,69 @@ const ur = /* @__PURE__ */ B({
1507
1515
  }
1508
1516
  })();
1509
1517
  function L() {
1510
- const c = e.columns.find((b) => !!b.sortable);
1511
- if (c || e.sortable)
1518
+ const d = e.columns.find((b) => !!b.sortable);
1519
+ if (d || e.sortable)
1512
1520
  return new Z({
1513
1521
  ...e.sortable || {},
1514
- ...c ? {
1515
- [c.key]: c.sortable
1522
+ ...d ? {
1523
+ [d.key]: d.sortable
1516
1524
  } : {}
1517
1525
  });
1518
1526
  }
1519
- function v(c) {
1527
+ function v(d) {
1520
1528
  const {
1521
1529
  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));
1530
+ } = Xt();
1531
+ b((d == null ? void 0 : d.columns) || e.columns, (d == null ? void 0 : d.source) || c.value, (d == null ? void 0 : d.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1524
1532
  }
1525
- function y(c) {
1533
+ function y(d) {
1526
1534
  let b;
1527
1535
  switch (!0) {
1528
- case !!(c != null && c.key):
1529
- b = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1536
+ case !!(d != null && d.key):
1537
+ b = c.value.find((_) => _[e.rowKey] === (d == null ? void 0 : d.key));
1530
1538
  break;
1531
- case !!(c != null && c.record):
1532
- b = c == null ? void 0 : c.record;
1539
+ case !!(d != null && d.record):
1540
+ b = d == null ? void 0 : d.record;
1533
1541
  break;
1534
1542
  }
1535
1543
  if (!b)
1536
1544
  throw new Error("未找到需要预览的数据");
1537
- return n.value.open(tr, {
1545
+ return n.value.open(rr, {
1538
1546
  record: b,
1539
1547
  columns: e.columns
1540
1548
  }, {
1541
- title: (c == null ? void 0 : c.title) || "详情",
1542
- mode: (c == null ? void 0 : c.mode) || "dialog"
1549
+ title: (d == null ? void 0 : d.title) || "详情",
1550
+ mode: (d == null ? void 0 : d.mode) || "dialog"
1543
1551
  });
1544
1552
  }
1545
- function C(c) {
1553
+ function C(d) {
1546
1554
  let b;
1547
1555
  switch (!0) {
1548
- case !!(c != null && c.key):
1549
- b = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1556
+ case !!(d != null && d.key):
1557
+ b = c.value.find((_) => _[e.rowKey] === (d == null ? void 0 : d.key));
1550
1558
  break;
1551
- case !!(c != null && c.record):
1552
- b = c == null ? void 0 : c.record;
1559
+ case !!(d != null && d.record):
1560
+ b = d == null ? void 0 : d.record;
1553
1561
  break;
1554
1562
  }
1555
1563
  if (!b)
1556
1564
  throw new Error("未找到需要编辑的数据");
1557
1565
  return n.value.open(ir, {
1558
1566
  value: b,
1559
- form: c == null ? void 0 : c.form,
1560
- onSubmit: c.onSubmit
1567
+ form: d == null ? void 0 : d.form,
1568
+ onSubmit: d.onSubmit
1561
1569
  }, {
1562
- title: (c == null ? void 0 : c.title) || "编辑",
1563
- mode: (c == null ? void 0 : c.mode) || "dialog",
1570
+ title: (d == null ? void 0 : d.title) || "编辑",
1571
+ mode: (d == null ? void 0 : d.mode) || "dialog",
1564
1572
  footer: !0,
1565
1573
  form: "form"
1566
1574
  });
1567
1575
  }
1568
- function M(c) {
1576
+ function M(d) {
1569
1577
  var p, ee;
1570
1578
  if (!e.dataLoad)
1571
1579
  return Promise.reject();
1572
- c != null && c.reset && (m && m.reset(), h && h.reset(), (p = u.value) == null || p.resetSorters());
1580
+ d != null && d.reset && (m && m.reset(), h && h.reset(), (p = l.value) == null || p.resetSorters());
1573
1581
  const b = {
1574
1582
  ...((ee = a.value) == null ? void 0 : ee.formSource) || {}
1575
1583
  };
@@ -1582,27 +1590,27 @@ const ur = /* @__PURE__ */ B({
1582
1590
  sort: h,
1583
1591
  update: o
1584
1592
  });
1585
- return z(_) ? (s.value = !0, Promise.resolve(_).finally(() => {
1586
- s.value = !1;
1593
+ return z(_) ? (i.value = !0, Promise.resolve(_).finally(() => {
1594
+ i.value = !1;
1587
1595
  }), _) : Promise.resolve();
1588
1596
  }
1589
1597
  function ye() {
1590
- n.value.open(ur, {
1598
+ n.value.open(cr, {
1591
1599
  collapsedColumns: w.value
1592
1600
  }, {
1593
1601
  title: "显示列",
1594
1602
  size: "small",
1595
1603
  footer: !0
1596
- }).then((c) => {
1597
- w.value = c;
1604
+ }).then((d) => {
1605
+ w.value = d;
1598
1606
  });
1599
1607
  }
1600
- const be = (c, {
1608
+ const be = (d, {
1601
1609
  type: b
1602
1610
  }) => {
1603
1611
  switch (b) {
1604
1612
  case "drag": {
1605
- o(c), t.emit("change", c);
1613
+ o(d), t.emit("change", d);
1606
1614
  break;
1607
1615
  }
1608
1616
  }
@@ -1613,38 +1621,38 @@ const ur = /* @__PURE__ */ B({
1613
1621
  edit: C,
1614
1622
  collapse: ye
1615
1623
  });
1616
- function ge(c, b) {
1617
- !h || k === "client" || (b ? h.update(c, b === "descend" ? "desc" : "asc") : h.remove(c), R("reload"));
1624
+ function ge(d, b) {
1625
+ !h || x === "client" || (b ? h.update(d, b === "descend" ? "desc" : "asc") : h.remove(d), R("reload"));
1618
1626
  }
1619
1627
  const J = g(de({
1620
1628
  columns: e.columns,
1621
1629
  columnsOptions: e.columnsOptions,
1622
1630
  columnsGroups: e.columnsGroups,
1623
- pageMode: k,
1631
+ pageMode: x,
1624
1632
  collapsedColumns: w,
1625
1633
  events: R
1626
1634
  })), P = {
1627
1635
  tableEvents: R,
1628
- tableForm: d,
1629
- tableSource: i,
1636
+ tableForm: s,
1637
+ tableSource: c,
1630
1638
  formInstance: a,
1631
1639
  pageService: m,
1632
1640
  formOptions: e.formOptions
1633
- }, we = nr(e, t, P), ve = rr(e, t, P), Ce = lr(e, t, P), {
1641
+ }, we = ar(e, t, P), ve = nr(e, t, P), Ce = ur(e, t, P), {
1634
1642
  selectedRowKeys: Q,
1635
1643
  rowSelection: X,
1636
1644
  onSelect: ke,
1637
1645
  onSelectAll: xe,
1638
1646
  reloadSelection: Se,
1639
1647
  resetSelection: Me
1640
- } = ar(e, t, P), Te = j(() => ({
1648
+ } = lr(e, t, P), Te = j(() => ({
1641
1649
  rowKey: e.rowKey,
1642
1650
  size: e.size,
1643
1651
  bordered: e.bordered,
1644
1652
  hoverable: e.hoverable,
1645
1653
  stripe: e.stripe,
1646
1654
  scroll: {
1647
- x: e.columns.reduce((c, b) => c += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1655
+ x: e.columns.reduce((d, b) => d += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1648
1656
  y: e.height ?? "100%"
1649
1657
  },
1650
1658
  rowSelection: X,
@@ -1661,27 +1669,27 @@ const ur = /* @__PURE__ */ B({
1661
1669
  columns: e.columns,
1662
1670
  columnsOptions: e.columnsOptions,
1663
1671
  columnsGroups: e.columnsGroups,
1664
- pageMode: k,
1672
+ pageMode: x,
1665
1673
  collapsedColumns: w,
1666
1674
  events: R
1667
1675
  });
1668
1676
  }
1669
1677
  return A(() => {
1670
- l.value && (l.value.id = `table-${r}`), e.autoLoad && M(), e.grabbable && l.value && pt(l.value);
1678
+ u.value && (u.value.id = `table-${r}`), e.autoLoad && M(), e.grabbable && u.value && er(u.value);
1671
1679
  }), {
1672
1680
  tableId: r,
1673
- tableInstance: u,
1674
- tableSource: i,
1681
+ tableInstance: l,
1682
+ tableSource: c,
1675
1683
  tableOptions: Te,
1676
1684
  tableColumns: J,
1677
1685
  tableEvents: R,
1678
- tableForm: d,
1679
- tableLoading: s,
1686
+ tableForm: s,
1687
+ tableLoading: i,
1680
1688
  modalInstance: n,
1681
- tableRenderElement: l,
1689
+ tableRenderElement: u,
1682
1690
  formSource: se(j(() => {
1683
- var c;
1684
- return (c = a == null ? void 0 : a.value) == null ? void 0 : c.formSource;
1691
+ var d;
1692
+ return (d = a == null ? void 0 : a.value) == null ? void 0 : d.formSource;
1685
1693
  })),
1686
1694
  formInstance: a,
1687
1695
  reload: M,
@@ -1740,23 +1748,23 @@ const ur = /* @__PURE__ */ B({
1740
1748
  })]);
1741
1749
  }
1742
1750
  });
1743
- function br(e) {
1751
+ function gr(e) {
1744
1752
  return e;
1745
1753
  }
1746
- function gr(e) {
1754
+ function wr(e) {
1747
1755
  return e;
1748
1756
  }
1749
- const wr = {
1757
+ const vr = {
1750
1758
  install(e, t) {
1751
- e.component("TableRender", cr);
1759
+ e.component("TableRender", dr);
1752
1760
  }
1753
1761
  };
1754
1762
  export {
1755
- cr as TableRender,
1756
- kr as TableRenderResolver,
1757
- wr as default,
1758
- br as defineColumns,
1759
- gr as defineTableLoad,
1763
+ dr as TableRender,
1764
+ xr as TableRenderResolver,
1765
+ vr as default,
1766
+ gr as defineColumns,
1767
+ wr as defineTableLoad,
1760
1768
  tt as useEvents,
1761
- yr as useTable
1769
+ br as useTable
1762
1770
  };