@gopowerteam/table-render 0.0.175 → 1.0.0

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.
Files changed (90) hide show
  1. package/dist/cjs/config/provide.config.d.ts +0 -1
  2. package/dist/cjs/defines/define-columns.d.ts +0 -1
  3. package/dist/cjs/defines/define-table-load.d.ts +0 -1
  4. package/dist/cjs/hooks/index.d.ts +1 -1
  5. package/dist/cjs/hooks/use-events.d.ts +0 -1
  6. package/dist/cjs/hooks/use-export.d.ts +0 -1
  7. package/dist/cjs/hooks/use-table.d.ts +2 -3
  8. package/dist/cjs/index.cjs +1 -1
  9. package/dist/cjs/index.d.ts +4 -5
  10. package/dist/cjs/install.d.ts +0 -1
  11. package/dist/cjs/interfaces/index.d.ts +3 -3
  12. package/dist/cjs/interfaces/pageable-options.d.ts +1 -1
  13. package/dist/cjs/interfaces/sortable-options.d.ts +3 -3
  14. package/dist/cjs/interfaces/table-column-options.d.ts +2 -3
  15. package/dist/cjs/interfaces/table-column-render.d.ts +0 -1
  16. package/dist/cjs/interfaces/table-load-params.d.ts +1 -2
  17. package/dist/cjs/table-columns/currency/index.d.ts +0 -1
  18. package/dist/cjs/table-columns/date/index.d.ts +0 -1
  19. package/dist/cjs/table-columns/dict/index.d.ts +0 -1
  20. package/dist/cjs/table-columns/dropdown/index.d.ts +0 -1
  21. package/dist/cjs/table-columns/image/index.d.ts +0 -1
  22. package/dist/cjs/table-columns/phone/index.d.ts +0 -1
  23. package/dist/cjs/table-columns/progress/index.d.ts +0 -1
  24. package/dist/cjs/table-columns/render/index.d.ts +0 -1
  25. package/dist/cjs/table-columns/serial/index.d.ts +0 -1
  26. package/dist/cjs/table-columns/tag/index.d.ts +0 -1
  27. package/dist/cjs/table-columns/text/index.d.ts +0 -1
  28. package/dist/cjs/table-render/index.d.ts +1419 -323
  29. package/dist/cjs/table-render/table-actions-render.d.ts +0 -1
  30. package/dist/cjs/table-render/table-collapsed-render.d.ts +3 -4
  31. package/dist/cjs/table-render/table-column-render.d.ts +11 -6
  32. package/dist/cjs/table-render/table-edit-render.d.ts +4 -5
  33. package/dist/cjs/table-render/table-form-render.d.ts +0 -1
  34. package/dist/cjs/table-render/table-pagination-render.d.ts +0 -1
  35. package/dist/cjs/table-render/table-selection-render.d.ts +3 -4
  36. package/dist/cjs/table-render/table-view-render.d.ts +6 -7
  37. package/dist/cjs/utils/create-column-render.d.ts +0 -1
  38. package/dist/cjs/utils/create-table-form.d.ts +0 -1
  39. package/dist/cjs/utils/create-table-source.d.ts +0 -1
  40. package/dist/cjs/utils/get-column-value.d.ts +4 -5
  41. package/dist/cjs/utils/index.d.ts +1 -1
  42. package/dist/cjs/utils/page.service.d.ts +0 -1
  43. package/dist/cjs/utils/set-column-value.d.ts +4 -5
  44. package/dist/cjs/utils/sort.service.d.ts +0 -1
  45. package/dist/es/config/provide.config.d.ts +0 -1
  46. package/dist/es/defines/define-columns.d.ts +0 -1
  47. package/dist/es/defines/define-table-load.d.ts +0 -1
  48. package/dist/es/hooks/index.d.ts +1 -1
  49. package/dist/es/hooks/use-events.d.ts +0 -1
  50. package/dist/es/hooks/use-export.d.ts +0 -1
  51. package/dist/es/hooks/use-table.d.ts +2 -3
  52. package/dist/es/index.d.ts +4 -5
  53. package/dist/es/index.mjs +1126 -1099
  54. package/dist/es/install.d.ts +0 -1
  55. package/dist/es/interfaces/index.d.ts +3 -3
  56. package/dist/es/interfaces/pageable-options.d.ts +1 -1
  57. package/dist/es/interfaces/sortable-options.d.ts +3 -3
  58. package/dist/es/interfaces/table-column-options.d.ts +2 -3
  59. package/dist/es/interfaces/table-column-render.d.ts +0 -1
  60. package/dist/es/interfaces/table-load-params.d.ts +1 -2
  61. package/dist/es/table-columns/currency/index.d.ts +0 -1
  62. package/dist/es/table-columns/date/index.d.ts +0 -1
  63. package/dist/es/table-columns/dict/index.d.ts +0 -1
  64. package/dist/es/table-columns/dropdown/index.d.ts +0 -1
  65. package/dist/es/table-columns/image/index.d.ts +0 -1
  66. package/dist/es/table-columns/phone/index.d.ts +0 -1
  67. package/dist/es/table-columns/progress/index.d.ts +0 -1
  68. package/dist/es/table-columns/render/index.d.ts +0 -1
  69. package/dist/es/table-columns/serial/index.d.ts +0 -1
  70. package/dist/es/table-columns/tag/index.d.ts +0 -1
  71. package/dist/es/table-columns/text/index.d.ts +0 -1
  72. package/dist/es/table-render/index.d.ts +1419 -323
  73. package/dist/es/table-render/table-actions-render.d.ts +0 -1
  74. package/dist/es/table-render/table-collapsed-render.d.ts +3 -4
  75. package/dist/es/table-render/table-column-render.d.ts +11 -6
  76. package/dist/es/table-render/table-edit-render.d.ts +4 -5
  77. package/dist/es/table-render/table-form-render.d.ts +0 -1
  78. package/dist/es/table-render/table-pagination-render.d.ts +0 -1
  79. package/dist/es/table-render/table-selection-render.d.ts +3 -4
  80. package/dist/es/table-render/table-view-render.d.ts +6 -7
  81. package/dist/es/utils/create-column-render.d.ts +0 -1
  82. package/dist/es/utils/create-table-form.d.ts +0 -1
  83. package/dist/es/utils/create-table-source.d.ts +0 -1
  84. package/dist/es/utils/get-column-value.d.ts +4 -5
  85. package/dist/es/utils/index.d.ts +1 -1
  86. package/dist/es/utils/page.service.d.ts +0 -1
  87. package/dist/es/utils/set-column-value.d.ts +4 -5
  88. package/dist/es/utils/sort.service.d.ts +0 -1
  89. package/dist/style.css +1 -1
  90. package/package.json +38 -37
package/dist/es/index.mjs CHANGED
@@ -1,690 +1,697 @@
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 b, getCurrentInstance as H, onMounted as A, onUpdated as Le, reactive as je, createVNode as f, Fragment as I, createTextVNode as E, getCurrentScope as Re, onScopeDispose as qe, unref as Pe, readonly as se, computed as L, watchEffect as ze, watch as Ee, h as Ye, 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 P, Tag as Fe, Dropdown as ne, Image as He, Message as Ie, Descriptions as Ke, DescriptionsItem as We, Divider as Ne, Space as ae, Pagination as Ue, Transfer as Ge, Table as Ze } 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";
8
- import V from "dayjs";
9
- import { FormRender as oe } from "@gopowerteam/form-render";
10
- import { TableRenderResolver as Sr } from "./resolver.mjs";
11
- function pe(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;
14
- }
15
- function et(e) {
16
- const t = b([]), r = (a) => {
17
- const n = e.filter((l) => l.formatter);
18
- return n.length > 0 ? a.map((l) => (n.forEach((i) => {
19
- i.formatter && pe(l, i, i.formatter(l));
20
- }), l)) : a;
21
- };
22
- return [t, (a) => {
23
- t.value = r(a);
24
- }];
1
+ import { getCurrentInstance as z, ref as k, onMounted as E, onUpdated as Re, createVNode as u, Fragment as G, createTextVNode as A, nextTick as N, getCurrentScope as he, hasInjectionContext as ye, inject as Pe, shallowRef as M, shallowReadonly as qe, watch as ze, toValue as T, onScopeDispose as Ee, computed as _, watchEffect as Ye, readonly as U, unref as Ae, toRaw as De, h as Be, render as Fe, reactive as We, defineComponent as F, withDirectives as Ie, resolveDirective as Ve, mergeProps as pe, isVNode as He } from "vue";
2
+ import { Button as P, Tag as Ke, Dropdown as ae, Image as Ne, Message as Ue, Divider as Ge, Space as le, Transfer as Ze, Pagination as Je, Descriptions as Qe, DescriptionsItem as Xe, Table as et } from "@arco-design/web-vue";
3
+ import { useModal as W, onSubmit as tt, ModalProvider as nt } from "@gopowerteam/modal-render";
4
+ import I from "dayjs";
5
+ import * as rt from "exceljs";
6
+ import { FormRender as be } from "@gopowerteam/form-render";
7
+ import { TableRenderResolver as Pn } from "./resolver.mjs";
8
+ function $n(e) {
9
+ return e;
10
+ }
11
+ function _n(e) {
12
+ return e;
13
+ }
14
+ function ot(e) {
15
+ return (t, n) => e[t](n);
25
16
  }
26
- function tt(e) {
17
+ function On(e) {
18
+ const t = z(), n = k();
19
+ function i() {
20
+ const o = t?.proxy?.$refs?.[e];
21
+ o && (n.value = o);
22
+ }
23
+ return E(i), Re(i), n;
24
+ }
25
+ const it = /* @__PURE__ */ Symbol.for("RenderColumnType");
26
+ function S(e, t, n) {
27
+ return t.$type = e, t.$disableColumnMode = n?.disableColumnMode, t.$disableViewMode = n?.disableViewMode, t;
28
+ }
29
+ function at(e) {
27
30
  return e.filter((t) => t.form).map((t) => ({
28
31
  key: t.key,
29
32
  title: t.title,
30
33
  ...typeof t.form == "boolean" ? {} : t.form
31
34
  }));
32
35
  }
33
- function br(e) {
34
- const t = H(), r = b();
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];
38
- a && (r.value = a);
39
- }
40
- return A(u), Le(u), r;
41
- }
42
- function rt(e) {
43
- return (t, r) => e[t](r);
44
- }
45
- class F {
46
- /**
47
- * 构造函数
48
- * @param index
49
- * @param size
50
- */
51
- constructor(t = 1, r = 10) {
52
- $(this, "data", je({
53
- index: 1,
54
- size: 10,
55
- total: 0
56
- }));
57
- $(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
58
- $(this, "pageLayouts", ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]);
59
- this.pageIndex = t, this.pageSize = r;
60
- }
61
- get pageIndex() {
62
- return this.data.index;
63
- }
64
- set pageIndex(t) {
65
- this.data.index = t;
66
- }
67
- get pageSize() {
68
- return this.data.size;
69
- }
70
- set pageSize(t) {
71
- this.data.size = t;
72
- }
73
- get total() {
74
- return this.data.total;
75
- }
76
- set total(t) {
77
- this.data.total = t;
78
- }
79
- /**
80
- * 重置操作
81
- */
82
- reset() {
83
- this.pageIndex = 1;
84
- }
85
- /**
86
- * 前置操作
87
- * @param options
88
- */
89
- before(t) {
90
- t.paramsQuery = {
91
- ...t.paramsQuery,
92
- page: this.pageIndex - 1,
93
- size: this.pageSize
94
- };
95
- }
96
- /**
97
- * 后置操作
98
- * @param response
99
- */
100
- after(t) {
101
- var r;
102
- this.total = (r = t.data) == null ? void 0 : r.totalElements;
103
- }
36
+ function lt(e, t, n) {
37
+ const [i, ...o] = t.index ? t.index.split(".").reverse() : [t.key], r = o.reverse().reduce((a, l) => a?.[l], e);
38
+ r[i] = n;
104
39
  }
105
- const nt = Symbol.for("RenderColumnType");
106
- function k(e, t, r) {
107
- return t.$type = e, t.$disableColumnMode = r == null ? void 0 : r.disableColumnMode, t.$disableViewMode = r == null ? void 0 : r.disableViewMode, t;
40
+ function st(e) {
41
+ const t = k([]), n = (o) => {
42
+ const r = e.filter((a) => a.formatter);
43
+ return r.length > 0 ? o.map((a) => (r.forEach((l) => {
44
+ l.formatter && lt(a, l, l.formatter(a));
45
+ }), a)) : o;
46
+ };
47
+ return [t, (o) => {
48
+ t.value = n(o);
49
+ }];
108
50
  }
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);
51
+ function $(e, t) {
52
+ return t.index ? t.index.split(".").reduce((n, i) => n?.[i], e) : [t.key].reduce((n, i) => n?.[i], e);
111
53
  }
112
- function Y(e) {
54
+ function B(e) {
113
55
  return !!e && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
114
56
  }
115
- function at(e) {
116
- return k("button", (r, u, a) => {
117
- const n = D(), l = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], i = (d, s) => typeof d == "function" ? d(r) : d === void 0 ? s : d;
118
- async function o(d) {
119
- if (await (d.confirm === !0 ? new Promise((m) => {
120
- n.confirm({
57
+ function ut(e) {
58
+ return S("button", (n, i, o) => {
59
+ const r = W(), a = Array.isArray(e) ? e : "buttons" in e ? e.buttons : [e], l = (s, m) => typeof s == "function" ? s(n) : s === void 0 ? m : s;
60
+ async function c(s) {
61
+ if (await (s.confirm === !0 ? new Promise((f) => {
62
+ r.confirm({
121
63
  title: "提示信息",
122
- content: d.confirmText ?? "您确定要执行该操作?",
123
- onOk: () => m(!0),
124
- onCancel: () => m(!1)
64
+ content: s.confirmText ?? "您确定要执行该操作?",
65
+ onOk: () => f(!0),
66
+ onCancel: () => f(!1)
125
67
  });
126
- }) : Promise.resolve(!0)) && (d != null && d.onClick)) {
127
- const m = d.onClick(r);
128
- Y(m) && d.autoReload !== !1 && m.then(() => {
129
- a != null && a.emits && (a == null || a.emits("reload"));
130
- }), !Y(m) && d.autoReload === !0 && a != null && a.emits && (a == null || a.emits("reload"));
68
+ }) : Promise.resolve(!0)) && s?.onClick) {
69
+ const f = s.onClick(n);
70
+ B(f) && s.autoReload !== !1 && f.then(() => {
71
+ o?.emits && o?.emits("reload");
72
+ }), !B(f) && s.autoReload === !0 && o?.emits && o?.emits("reload");
131
73
  }
132
74
  }
133
- return f(I, null, [l.filter((d) => i(d.visiable, !0)).map((d) => f(P, {
134
- onClick: () => o(d),
135
- type: d.type || "text",
136
- shape: d.shape,
75
+ return u(G, null, [a.filter((s) => l(s.visiable, !0)).map((s) => u(P, {
76
+ onClick: () => c(s),
77
+ type: s.type || "text",
78
+ shape: s.shape,
137
79
  size: "mini",
138
- disabled: i(d.disabled, !1)
80
+ disabled: l(s.disabled, !1)
139
81
  }, {
140
- icon: d.icon ? () => d.icon(r) : void 0,
141
- default: () => (typeof d.content == "function" ? d.content(r) : d.content) || ""
82
+ icon: s.icon ? () => s.icon(n) : void 0,
83
+ default: () => (typeof s.content == "function" ? s.content(n) : s.content) || ""
142
84
  }))]);
143
85
  }, {
144
86
  disableViewMode: !0
145
87
  });
146
88
  }
147
- const lt = {
89
+ const ct = {
148
90
  thousands: !0,
149
91
  inputUnit: "元",
150
92
  outputUnit: "元"
151
- }, le = {
93
+ }, se = {
152
94
  分: 10 ** 0,
153
95
  元: 10 ** 2,
154
96
  万: 10 ** 6
155
97
  };
156
- function ut(e) {
98
+ function dt(e) {
157
99
  e = {
158
- ...lt,
100
+ ...ct,
159
101
  ...e || {}
160
102
  };
161
- const t = (n) => {
162
- if (n == null)
103
+ const t = (r) => {
104
+ if (r == null)
163
105
  return;
164
- if ((e == null ? void 0 : e.inputUnit) === (e == null ? void 0 : e.outputUnit))
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);
168
- }, r = (n) => {
169
- if (n == null)
106
+ if (e?.inputUnit === e?.outputUnit)
107
+ return r;
108
+ const a = se[e.inputUnit] / se[e.outputUnit], l = Number.parseFloat((r * a).toFixed(10));
109
+ return e?.precision === void 0 ? l : l.toFixed(e?.precision);
110
+ }, n = (r) => {
111
+ if (r == null)
170
112
  return;
171
- const l = n.toString().split(".");
172
- return l[0] = l[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), l.join(".");
173
- }, u = (n) => {
174
- if ((e == null ? void 0 : e.zeroString) !== void 0 && Number(n) === 0)
175
- return e == null ? void 0 : e.zeroString;
176
- if ((e == null ? void 0 : e.nullString) !== void 0 && isNaN(Number(n)))
177
- return e == null ? void 0 : e.nullString;
178
- const l = t(Number(n));
179
- return e != null && e.thousands ? r(l) : l;
113
+ const a = r.toString().split(".");
114
+ return a[0] = a[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), a.join(".");
115
+ }, i = (r) => {
116
+ if (e?.zeroString !== void 0 && Number(r) === 0)
117
+ return e?.zeroString;
118
+ if (e?.nullString !== void 0 && Number.isNaN(Number(r)))
119
+ return e?.nullString;
120
+ const a = t(Number(r));
121
+ return e?.thousands ? n(a) : a;
180
122
  };
181
- return k("dict", (n, l) => {
182
- const i = T(n, l);
183
- return f("div", null, [typeof (e == null ? void 0 : e.prefix) == "string" ? f("span", null, [e.prefix]) : typeof (e == null ? void 0 : e.prefix) == "function" ? f("span", null, [e.prefix()]) : void 0, f("span", {
123
+ return S("dict", (r, a) => {
124
+ const l = $(r, a);
125
+ return u("div", null, [typeof e?.prefix == "string" ? u("span", null, [e.prefix]) : typeof e?.prefix == "function" ? u("span", null, [e.prefix()]) : void 0, u("span", {
184
126
  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]);
127
+ }, [i(l)]), typeof e?.suffix == "string" ? u("span", null, [e.suffix]) : typeof e?.suffix == "function" ? u("span", null, [e.suffix()]) : void 0]);
186
128
  });
187
129
  }
188
- var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ct = { exports: {} };
189
- (function(e, t) {
190
- (function(r, u) {
191
- e.exports = u(V);
192
- })(it, function(r) {
193
- function u(l) {
194
- return l && typeof l == "object" && "default" in l ? l : {
195
- default: l
196
- };
197
- }
198
- var a = u(r), n = {
199
- name: "zh-cn",
200
- weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
201
- weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
202
- weekdaysMin: "日_一_二_三_四_五_六".split("_"),
203
- months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
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 + "日";
207
- },
208
- weekStart: 1,
209
- yearStart: 4,
210
- formats: {
211
- LT: "HH:mm",
212
- LTS: "HH:mm:ss",
213
- L: "YYYY/MM/DD",
214
- LL: "YYYY年M月D日",
215
- LLL: "YYYY年M月D日Ah点mm分",
216
- LLLL: "YYYY年M月D日ddddAh点mm分",
217
- l: "YYYY/M/D",
218
- ll: "YYYY年M月D日",
219
- lll: "YYYY年M月D日 HH:mm",
220
- llll: "YYYY年M月D日dddd HH:mm"
221
- },
222
- relativeTime: {
223
- future: "%s内",
224
- past: "%s前",
225
- s: "几秒",
226
- m: "1 分钟",
227
- mm: "%d 分钟",
228
- h: "1 小时",
229
- hh: "%d 小时",
230
- d: "1 天",
231
- dd: "%d 天",
232
- M: "1 个月",
233
- MM: "%d 个月",
234
- y: "1 年",
235
- yy: "%d 年"
236
- },
237
- meridiem: function(l, i) {
238
- var o = 100 * l + i;
239
- return o < 600 ? "凌晨" : o < 900 ? "早上" : o < 1100 ? "上午" : o < 1300 ? "中午" : o < 1800 ? "下午" : "晚上";
130
+ var D = { exports: {} }, ft = D.exports, ue;
131
+ function mt() {
132
+ return ue || (ue = 1, (function(e, t) {
133
+ (function(n, i) {
134
+ e.exports = i(I);
135
+ })(ft, function(n) {
136
+ function i(a) {
137
+ return a && typeof a == "object" && "default" in a ? a : {
138
+ default: a
139
+ };
240
140
  }
241
- };
242
- return a.default.locale(n, null, !0), n;
243
- });
244
- })(ct);
245
- V.locale("zh-cn");
246
- const dt = {
141
+ var o = i(n), r = {
142
+ name: "zh-cn",
143
+ weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
144
+ weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"),
145
+ weekdaysMin: "日_一_二_三_四_五_六".split("_"),
146
+ months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
147
+ monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
148
+ ordinal: function(a, l) {
149
+ return l === "W" ? a + "周" : a + "日";
150
+ },
151
+ weekStart: 1,
152
+ yearStart: 4,
153
+ formats: {
154
+ LT: "HH:mm",
155
+ LTS: "HH:mm:ss",
156
+ L: "YYYY/MM/DD",
157
+ LL: "YYYY年M月D日",
158
+ LLL: "YYYY年M月D日Ah点mm分",
159
+ LLLL: "YYYY年M月D日ddddAh点mm分",
160
+ l: "YYYY/M/D",
161
+ ll: "YYYY年M月D日",
162
+ lll: "YYYY年M月D日 HH:mm",
163
+ llll: "YYYY年M月D日dddd HH:mm"
164
+ },
165
+ relativeTime: {
166
+ future: "%s内",
167
+ past: "%s前",
168
+ s: "几秒",
169
+ m: "1 分钟",
170
+ mm: "%d 分钟",
171
+ h: "1 小时",
172
+ hh: "%d 小时",
173
+ d: "1 天",
174
+ dd: "%d 天",
175
+ M: "1 个月",
176
+ MM: "%d 个月",
177
+ y: "1 年",
178
+ yy: "%d 年"
179
+ },
180
+ meridiem: function(a, l) {
181
+ var c = 100 * a + l;
182
+ return c < 600 ? "凌晨" : c < 900 ? "早上" : c < 1100 ? "上午" : c < 1300 ? "中午" : c < 1800 ? "下午" : "晚上";
183
+ }
184
+ };
185
+ return o.default.locale(r, null, !0), r;
186
+ });
187
+ })(D)), D.exports;
188
+ }
189
+ mt();
190
+ I.locale("zh-cn");
191
+ const ht = {
247
192
  date: "YYYY-MM-DD",
248
193
  datetime: "YYYY-MM-DD HH:mm:ss",
249
194
  time: "HH:mm:ss",
250
195
  week: "ddd"
251
196
  };
252
- function st(e) {
253
- return k("date", (r, u) => {
254
- const a = T(r, u), n = typeof (e == null ? void 0 : e.format) == "function" ? e == null ? void 0 : e.format() : dt[(e == null ? void 0 : e.format) || "datetime"], l = V(a);
255
- return f("span", null, [l.isValid() && l.format(n)]);
197
+ function yt(e) {
198
+ return S("date", (n, i) => {
199
+ const o = $(n, i), r = typeof e?.format == "function" ? e?.format() : ht[e?.format || "datetime"], a = I(o);
200
+ return u("span", null, [a.isValid() && a.format(r)]);
256
201
  });
257
202
  }
258
- const ft = {
203
+ const pt = {
259
204
  success: "arcoblue",
260
205
  warning: "orange",
261
206
  error: "red"
262
207
  };
263
- function ot(e) {
208
+ function bt(e) {
264
209
  return e instanceof Map ? e : e.dict;
265
210
  }
266
- function mt(e) {
211
+ function gt(e) {
267
212
  const t = e instanceof Map ? !1 : e.tag;
268
- return typeof t == "string" ? ft[t] : t;
269
- }
270
- function ht(e) {
271
- const t = ot(e), r = mt(e);
272
- return k("dict", (a, n) => {
273
- const l = T(a, n);
274
- return r ? f(Fe, {
275
- color: r === !0 ? void 0 : r
213
+ return typeof t == "string" ? pt[t] : t;
214
+ }
215
+ function vt(e) {
216
+ const t = bt(e), n = gt(e);
217
+ return S("dict", (o, r) => {
218
+ const a = $(o, r);
219
+ return n ? u(Ke, {
220
+ color: n === !0 ? void 0 : n
276
221
  }, {
277
- default: () => [t.get(l) || l]
278
- }) : f("span", null, [t.get(l) || l]);
222
+ default: () => [t.get(a) || a]
223
+ }) : u("span", null, [t.get(a) || a]);
279
224
  });
280
225
  }
281
- function yt(e) {
282
- const t = D();
283
- async function r(a, n) {
284
- a.confirm && !await new Promise((i, o) => {
226
+ function wt(e) {
227
+ const t = W();
228
+ async function n(o, r) {
229
+ o.confirm && !await new Promise((l) => {
285
230
  t.open("confirm", {
286
231
  title: "确认",
287
- content: a.confirmText || "是否确认执行该操作?",
288
- onOk: () => i(!0),
289
- onCancel: () => i(!1)
232
+ content: o.confirmText || "是否确认执行该操作?",
233
+ onOk: () => l(!0),
234
+ onCancel: () => l(!1)
290
235
  });
291
- }) || a.onClick(n);
236
+ }) || o.onClick(r);
292
237
  }
293
- return k("dropdown", (a, n) => {
294
- const l = e.options.filter((i) => typeof i.visiable == "function" ? i.visiable(a) : i.visiable !== !1);
295
- return f(ne, {
296
- trigger: (e == null ? void 0 : e.trigger) || "click"
238
+ return S("dropdown", (o, r) => {
239
+ const a = e.options.filter((l) => typeof l.visiable == "function" ? l.visiable(o) : l.visiable !== !1);
240
+ return u(ae, {
241
+ trigger: e?.trigger || "click"
297
242
  }, {
298
- default: () => f(P, {
299
- disabled: l.length === 0,
243
+ default: () => u(P, {
244
+ disabled: a.length === 0,
300
245
  type: "text"
301
246
  }, {
302
- default: () => [(e == null ? void 0 : e.content) || "操作"]
247
+ default: () => [e?.content || "操作"]
303
248
  }),
304
- content: () => l.map((i) => f(ne.Option, {
305
- onClick: () => r(i, a)
249
+ content: () => a.map((l) => u(ae.Option, {
250
+ onClick: () => n(l, o)
306
251
  }, {
307
- default: () => [typeof i.content == "function" ? i.content(a) : i.content]
252
+ default: () => [typeof l.content == "function" ? l.content(o) : l.content]
308
253
  }))
309
254
  });
310
255
  });
311
256
  }
312
- const gt = {
257
+ const xt = {
313
258
  size: 30
314
259
  };
315
- function bt(e) {
260
+ function Ct(e) {
316
261
  return e = {
317
- ...gt,
262
+ ...xt,
318
263
  ...e || {}
319
- }, k("image", (r, u) => {
320
- const a = T(r, u), n = Math.random().toString(32).slice(2).toUpperCase(), l = {
264
+ }, S("image", (n, i) => {
265
+ const o = $(n, i), r = Math.random().toString(32).slice(2).toUpperCase(), a = {
321
266
  maxWidth: "100%",
322
267
  maxHeight: "100%",
323
- borderRadius: e == null ? void 0 : e.radius,
324
- transform: `rotate(${(e == null ? void 0 : e.rotate) || 0}deg)`,
325
- cursor: e != null && e.preview ? "zoom-in" : "unset",
268
+ borderRadius: e?.radius,
269
+ transform: `rotate(${e?.rotate || 0}deg)`,
270
+ cursor: e?.preview ? "zoom-in" : "unset",
326
271
  overflow: "hidden"
327
- }, i = `${u.index || u.key}_parsed`;
328
- if (e != null && e.parse) {
329
- const o = e == null ? void 0 : e.parse(a, r);
330
- Y(o) ? o.then((d) => r[i] = d ?? "") : r[i] = o ?? "";
272
+ }, l = `${i.index || i.key}_parsed`;
273
+ if (e?.parse) {
274
+ const c = e?.parse(o, n);
275
+ B(c) ? c.then((s) => n[l] = s ?? "") : n[l] = c ?? "";
331
276
  }
332
- if (e != null && e.parse && !r[i] === void 0)
333
- return f("div", null, [E("Loading...")]);
277
+ if (e?.parse && !n[l] === void 0)
278
+ return u("div", null, [A("Loading...")]);
334
279
  {
335
- const o = r[i] || a;
336
- return o ? f("div", {
337
- id: n,
280
+ const c = n[l] || o;
281
+ return c ? u("div", {
282
+ id: r,
338
283
  style: {
339
284
  display: "flex",
340
285
  justifyContent: "center",
341
286
  alignItems: "center",
342
- height: `${e == null ? void 0 : e.size}px`,
343
- width: `${e == null ? void 0 : e.size}px`,
287
+ height: `${e?.size}px`,
288
+ width: `${e?.size}px`,
344
289
  margin: "auto"
345
290
  }
346
- }, [f(He, {
347
- preview: e == null ? void 0 : e.preview,
291
+ }, [u(Ne, {
292
+ preview: e?.preview,
348
293
  width: "100%",
349
294
  height: "100%",
350
295
  fit: "contain",
351
- src: o,
296
+ src: c,
352
297
  alt: "image",
353
- style: l
354
- }, null)]) : f(I, null, null);
298
+ style: a
299
+ }, null)]) : u(G, null, null);
355
300
  }
356
301
  });
357
302
  }
358
- function K(e) {
359
- return Re() ? (qe(e), !0) : !1;
303
+ function kt(e, t) {
304
+ return he() ? (Ee(e, t), !0) : !1;
360
305
  }
361
- function O(e) {
362
- return typeof e == "function" ? e() : Pe(e);
363
- }
364
- const W = typeof window < "u" && typeof document < "u";
306
+ const V = /* @__PURE__ */ new WeakMap(), St = /* @__NO_SIDE_EFFECTS__ */ (...e) => {
307
+ var t;
308
+ const n = e[0], i = (t = z()) === null || t === void 0 ? void 0 : t.proxy, o = i ?? he();
309
+ if (o == null && !ye()) throw new Error("injectLocal must be called in setup");
310
+ return o && V.has(o) && n in V.get(o) ? V.get(o)[n] : Pe(...e);
311
+ }, Z = typeof window < "u" && typeof document < "u";
365
312
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
366
- const wt = Object.prototype.toString, vt = (e) => wt.call(e) === "[object Object]", Ct = () => {
367
- };
368
- function kt(e) {
313
+ const Mt = Object.prototype.toString, Tt = (e) => Mt.call(e) === "[object Object]";
314
+ function $t(e) {
369
315
  let t;
370
- function r() {
316
+ function n() {
371
317
  return t || (t = e()), t;
372
318
  }
373
- return r.reset = async () => {
374
- const u = t;
375
- t = void 0, u && await u;
376
- }, r;
319
+ return n.reset = async () => {
320
+ const i = t;
321
+ t = void 0, i && await i;
322
+ }, n;
377
323
  }
378
- function xt(e, t) {
379
- var r;
380
- if (typeof e == "number")
381
- return e + t;
382
- const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(u.length), n = Number.parseFloat(u) + t;
383
- return Number.isNaN(n) ? e : n + a;
324
+ function _t(e, t) {
325
+ var n;
326
+ if (typeof e == "number") return e + t;
327
+ const i = ((n = e.match(/^-?\d+\.?\d*/)) === null || n === void 0 ? void 0 : n[0]) || "", o = e.slice(i.length), r = Number.parseFloat(i) + t;
328
+ return Number.isNaN(r) ? e : r + o;
329
+ }
330
+ function q(e) {
331
+ return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
332
+ }
333
+ function H(e) {
334
+ return Array.isArray(e) ? e : [e];
335
+ }
336
+ function Ot(e) {
337
+ return z();
338
+ }
339
+ function jt(e, t = !0, n) {
340
+ Ot() ? E(e, n) : t ? e() : N(e);
384
341
  }
385
- function St(e, t, r = {}) {
342
+ function Lt(e, t, n = {}) {
386
343
  const {
387
- immediate: u = !0
388
- } = r, a = b(!1);
389
- let n = null;
344
+ immediate: i = !0,
345
+ immediateCallback: o = !1
346
+ } = n, r = M(!1);
347
+ let a;
390
348
  function l() {
391
- n && (clearTimeout(n), n = null);
349
+ a && (clearTimeout(a), a = void 0);
392
350
  }
393
- function i() {
394
- a.value = !1, l();
351
+ function c() {
352
+ r.value = !1, l();
395
353
  }
396
- function o(...d) {
397
- l(), a.value = !0, n = setTimeout(() => {
398
- a.value = !1, n = null, e(...d);
399
- }, O(t));
354
+ function s(...m) {
355
+ o && e(), l(), r.value = !0, a = setTimeout(() => {
356
+ r.value = !1, a = void 0, e(...m);
357
+ }, T(t));
400
358
  }
401
- return u && (a.value = !0, W && o()), K(i), {
402
- isPending: se(a),
403
- start: o,
404
- stop: i
359
+ return i && (r.value = !0, Z && s()), kt(c), {
360
+ isPending: qe(r),
361
+ start: s,
362
+ stop: c
405
363
  };
406
364
  }
407
- function Mt(e) {
365
+ function Rt(e, t, n) {
366
+ return ze(e, t, {
367
+ ...n,
368
+ immediate: !0
369
+ });
370
+ }
371
+ const J = Z ? window : void 0, ge = Z ? window.navigator : void 0;
372
+ function Pt(e) {
408
373
  var t;
409
- const r = O(e);
410
- return (t = r == null ? void 0 : r.$el) != null ? t : r;
411
- }
412
- const N = W ? window : void 0, me = W ? window.navigator : void 0;
413
- function he(...e) {
414
- let t, r, u, a;
415
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = N) : [t, r, u, a] = e, !t)
416
- return Ct;
417
- Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
418
- const n = [], l = () => {
419
- n.forEach((s) => s()), n.length = 0;
420
- }, i = (s, m, h, w) => (s.addEventListener(m, h, w), () => s.removeEventListener(m, h, w)), o = Ee(
421
- () => [Mt(t), O(a)],
422
- ([s, m]) => {
423
- if (l(), !s)
424
- return;
425
- const h = vt(m) ? { ...m } : m;
426
- n.push(
427
- ...r.flatMap((w) => u.map((S) => i(s, w, S, h)))
428
- );
429
- },
430
- { immediate: !0, flush: "post" }
431
- ), d = () => {
432
- o(), l();
433
- };
434
- return K(d), d;
374
+ const n = T(e);
375
+ return (t = n?.$el) !== null && t !== void 0 ? t : n;
435
376
  }
436
- function Tt() {
437
- const e = b(!1), t = H();
438
- return t && A(() => {
377
+ function Q(...e) {
378
+ const t = (i, o, r, a) => (i.addEventListener(o, r, a), () => i.removeEventListener(o, r, a)), n = _(() => {
379
+ const i = H(T(e[0])).filter((o) => o != null);
380
+ return i.every((o) => typeof o != "string") ? i : void 0;
381
+ });
382
+ return Rt(() => {
383
+ var i, o;
384
+ return [(i = (o = n.value) === null || o === void 0 ? void 0 : o.map((r) => Pt(r))) !== null && i !== void 0 ? i : [J].filter((r) => r != null), H(T(n.value ? e[1] : e[0])), H(Ae(n.value ? e[2] : e[1])), T(n.value ? e[3] : e[2])];
385
+ }, ([i, o, r, a], l, c) => {
386
+ if (!i?.length || !o?.length || !r?.length) return;
387
+ const s = Tt(a) ? {
388
+ ...a
389
+ } : a, m = i.flatMap((f) => o.flatMap((v) => r.map((d) => t(f, v, d, s))));
390
+ c(() => {
391
+ m.forEach((f) => f());
392
+ });
393
+ }, {
394
+ flush: "post"
395
+ });
396
+ }
397
+ // @__NO_SIDE_EFFECTS__
398
+ function qt() {
399
+ const e = M(!1), t = z();
400
+ return t && E(() => {
439
401
  e.value = !0;
440
402
  }, t), e;
441
403
  }
442
- function U(e) {
443
- const t = Tt();
444
- return L(() => (t.value, !!e()));
404
+ // @__NO_SIDE_EFFECTS__
405
+ function X(e) {
406
+ const t = /* @__PURE__ */ qt();
407
+ return _(() => (t.value, !!e()));
445
408
  }
446
- function q(e, t = {}) {
447
- const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
448
- let a;
449
- const n = b(!1), l = (d) => {
450
- n.value = d.matches;
451
- }, i = () => {
452
- a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
453
- }, o = ze(() => {
454
- u.value && (i(), a = r.matchMedia(O(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
455
- });
456
- return K(() => {
457
- o(), i(), a = void 0;
458
- }), n;
409
+ const zt = /* @__PURE__ */ Symbol("vueuse-ssr-width");
410
+ // @__NO_SIDE_EFFECTS__
411
+ function ve() {
412
+ const e = ye() ? /* @__PURE__ */ St(zt, null) : null;
413
+ return typeof e == "number" ? e : void 0;
459
414
  }
460
- function _t(e, t = {}) {
461
- function r(s, m) {
462
- let h = O(e[O(s)]);
463
- return m != null && (h = xt(h, m)), typeof h == "number" && (h = `${h}px`), h;
415
+ function R(e, t = {}) {
416
+ const {
417
+ window: n = J,
418
+ ssrWidth: i = /* @__PURE__ */ ve()
419
+ } = t, o = /* @__PURE__ */ X(() => n && "matchMedia" in n && typeof n.matchMedia == "function"), r = M(typeof i == "number"), a = M(), l = M(!1), c = (s) => {
420
+ l.value = s.matches;
421
+ };
422
+ return Ye(() => {
423
+ if (r.value) {
424
+ r.value = !o.value, l.value = T(e).split(",").some((s) => {
425
+ const m = s.includes("not all"), f = s.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), v = s.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);
426
+ let d = !!(f || v);
427
+ return f && d && (d = i >= q(f[1])), v && d && (d = i <= q(v[1])), m ? !d : d;
428
+ });
429
+ return;
430
+ }
431
+ o.value && (a.value = n.matchMedia(T(e)), l.value = a.value.matches);
432
+ }), Q(a, "change", c, {
433
+ passive: !0
434
+ }), _(() => l.value);
435
+ }
436
+ // @__NO_SIDE_EFFECTS__
437
+ function Et(e, t = {}) {
438
+ function n(d, y) {
439
+ let w = T(e[T(d)]);
440
+ return y != null && (w = _t(w, y)), typeof w == "number" && (w = `${w}px`), w;
464
441
  }
465
- const { window: u = N, strategy: a = "min-width" } = t;
466
- function n(s) {
467
- return u ? u.matchMedia(s).matches : !1;
442
+ const {
443
+ window: i = J,
444
+ strategy: o = "min-width",
445
+ ssrWidth: r = /* @__PURE__ */ ve()
446
+ } = t, a = typeof r == "number", l = a ? M(!1) : {
447
+ value: !0
448
+ };
449
+ a && jt(() => l.value = !!i);
450
+ function c(d, y) {
451
+ return !l.value && a ? d === "min" ? r >= q(y) : r <= q(y) : i ? i.matchMedia(`(${d}-width: ${y})`).matches : !1;
468
452
  }
469
- const l = (s) => q(() => `(min-width: ${r(s)})`, t), i = (s) => q(() => `(max-width: ${r(s)})`, t), o = Object.keys(e).reduce((s, m) => (Object.defineProperty(s, m, {
470
- get: () => a === "min-width" ? l(m) : i(m),
453
+ const s = (d) => R(() => `(min-width: ${n(d)})`, t), m = (d) => R(() => `(max-width: ${n(d)})`, t), f = Object.keys(e).reduce((d, y) => (Object.defineProperty(d, y, {
454
+ get: () => o === "min-width" ? s(y) : m(y),
471
455
  enumerable: !0,
472
456
  configurable: !0
473
- }), s), {});
474
- function d() {
475
- const s = Object.keys(e).map((m) => [m, l(m)]);
476
- return L(() => s.filter(([, m]) => m.value).map(([m]) => m));
457
+ }), d), {});
458
+ function v() {
459
+ const d = Object.keys(e).map((y) => [y, f[y], q(n(y))]).sort((y, w) => y[2] - w[2]);
460
+ return _(() => d.filter(([, y]) => y.value).map(([y]) => y));
477
461
  }
478
- return Object.assign(o, {
479
- greaterOrEqual: l,
480
- smallerOrEqual: i,
481
- greater(s) {
482
- return q(() => `(min-width: ${r(s, 0.1)})`, t);
462
+ return Object.assign(f, {
463
+ greaterOrEqual: s,
464
+ smallerOrEqual: m,
465
+ greater(d) {
466
+ return R(() => `(min-width: ${n(d, 0.1)})`, t);
483
467
  },
484
- smaller(s) {
485
- return q(() => `(max-width: ${r(s, -0.1)})`, t);
468
+ smaller(d) {
469
+ return R(() => `(max-width: ${n(d, -0.1)})`, t);
486
470
  },
487
- between(s, m) {
488
- return q(() => `(min-width: ${r(s)}) and (max-width: ${r(m, -0.1)})`, t);
471
+ between(d, y) {
472
+ return R(() => `(min-width: ${n(d)}) and (max-width: ${n(y, -0.1)})`, t);
489
473
  },
490
- isGreater(s) {
491
- return n(`(min-width: ${r(s, 0.1)})`);
474
+ isGreater(d) {
475
+ return c("min", n(d, 0.1));
492
476
  },
493
- isGreaterOrEqual(s) {
494
- return n(`(min-width: ${r(s)})`);
477
+ isGreaterOrEqual(d) {
478
+ return c("min", n(d));
495
479
  },
496
- isSmaller(s) {
497
- return n(`(max-width: ${r(s, -0.1)})`);
480
+ isSmaller(d) {
481
+ return c("max", n(d, -0.1));
498
482
  },
499
- isSmallerOrEqual(s) {
500
- return n(`(max-width: ${r(s)})`);
483
+ isSmallerOrEqual(d) {
484
+ return c("max", n(d));
501
485
  },
502
- isInBetween(s, m) {
503
- return n(`(min-width: ${r(s)}) and (max-width: ${r(m, -0.1)})`);
486
+ isInBetween(d, y) {
487
+ return c("min", n(d)) && c("max", n(y, -0.1));
504
488
  },
505
- current: d,
489
+ current: v,
506
490
  active() {
507
- const s = d();
508
- return L(() => s.value.length === 0 ? "" : s.value.at(-1));
491
+ const d = v();
492
+ return _(() => d.value.length === 0 ? "" : d.value.at(o === "min-width" ? -1 : 0));
509
493
  }
510
494
  });
511
495
  }
512
- function ue(e, t = {}) {
496
+ // @__NO_SIDE_EFFECTS__
497
+ function ce(e, t = {}) {
513
498
  const {
514
- controls: r = !1,
515
- navigator: u = me
516
- } = t, a = U(() => u && "permissions" in u);
517
- let n;
518
- const l = typeof e == "string" ? { name: e } : e, i = b(), o = () => {
519
- n && (i.value = n.state);
520
- }, d = kt(async () => {
521
- if (a.value) {
522
- if (!n)
523
- try {
524
- n = await u.permissions.query(l), he(n, "change", o), o();
525
- } catch {
526
- i.value = "prompt";
527
- }
528
- return n;
499
+ controls: n = !1,
500
+ navigator: i = ge
501
+ } = t, o = /* @__PURE__ */ X(() => i && "permissions" in i), r = M(), a = typeof e == "string" ? {
502
+ name: e
503
+ } : e, l = M(), c = () => {
504
+ var m, f;
505
+ l.value = (m = (f = r.value) === null || f === void 0 ? void 0 : f.state) !== null && m !== void 0 ? m : "prompt";
506
+ };
507
+ Q(r, "change", c, {
508
+ passive: !0
509
+ });
510
+ const s = $t(async () => {
511
+ if (o.value) {
512
+ if (!r.value) try {
513
+ r.value = await i.permissions.query(a);
514
+ } catch {
515
+ r.value = void 0;
516
+ } finally {
517
+ c();
518
+ }
519
+ if (n) return De(r.value);
529
520
  }
530
521
  });
531
- return d(), r ? {
532
- state: i,
533
- isSupported: a,
534
- query: d
535
- } : i;
522
+ return s(), n ? {
523
+ state: l,
524
+ isSupported: o,
525
+ query: s
526
+ } : l;
536
527
  }
537
- function $t(e = {}) {
528
+ function Yt(e = {}) {
538
529
  const {
539
- navigator: t = me,
540
- read: r = !1,
541
- source: u,
542
- copiedDuring: a = 1500,
543
- legacy: n = !1
544
- } = e, l = U(() => t && "clipboard" in t), i = ue("clipboard-read"), o = ue("clipboard-write"), d = L(() => l.value || n), s = b(""), m = b(!1), h = St(() => m.value = !1, a);
545
- function w() {
546
- l.value && v(i.value) ? t.clipboard.readText().then((y) => {
547
- s.value = y;
548
- }) : s.value = j();
530
+ navigator: t = ge,
531
+ read: n = !1,
532
+ source: i,
533
+ copiedDuring: o = 1500,
534
+ legacy: r = !1
535
+ } = e, a = /* @__PURE__ */ X(() => t && "clipboard" in t), l = /* @__PURE__ */ ce("clipboard-read"), c = /* @__PURE__ */ ce("clipboard-write"), s = _(() => a.value || r), m = M(""), f = M(!1), v = Lt(() => f.value = !1, o, {
536
+ immediate: !1
537
+ });
538
+ async function d() {
539
+ let p = !(a.value && x(l.value));
540
+ if (!p) try {
541
+ m.value = await t.clipboard.readText();
542
+ } catch {
543
+ p = !0;
544
+ }
545
+ p && (m.value = j());
549
546
  }
550
- d.value && r && he(["copy", "cut"], w);
551
- async function S(y = O(u)) {
552
- d.value && y != null && (l.value && v(o.value) ? await t.clipboard.writeText(y) : x(y), s.value = y, m.value = !0, h.start());
547
+ s.value && n && Q(["copy", "cut"], d, {
548
+ passive: !0
549
+ });
550
+ async function y(p = T(i)) {
551
+ if (s.value && p != null) {
552
+ let g = !(a.value && x(c.value));
553
+ if (!g) try {
554
+ await t.clipboard.writeText(p);
555
+ } catch {
556
+ g = !0;
557
+ }
558
+ g && w(p), m.value = p, f.value = !0, v.start();
559
+ }
553
560
  }
554
- function x(y) {
555
- const C = document.createElement("textarea");
556
- C.value = y ?? "", C.style.position = "absolute", C.style.opacity = "0", document.body.appendChild(C), C.select(), document.execCommand("copy"), C.remove();
561
+ function w(p) {
562
+ const g = document.createElement("textarea");
563
+ g.value = p, g.style.position = "absolute", g.style.opacity = "0", g.setAttribute("readonly", ""), document.body.appendChild(g), g.select(), document.execCommand("copy"), g.remove();
557
564
  }
558
565
  function j() {
559
- var y, C, M;
560
- return (M = (C = (y = document == null ? void 0 : document.getSelection) == null ? void 0 : y.call(document)) == null ? void 0 : C.toString()) != null ? M : "";
566
+ var p, g, C;
567
+ return (p = (g = document) === null || g === void 0 || (C = g.getSelection) === null || C === void 0 || (C = C.call(g)) === null || C === void 0 ? void 0 : C.toString()) !== null && p !== void 0 ? p : "";
561
568
  }
562
- function v(y) {
563
- return y === "granted" || y === "prompt";
569
+ function x(p) {
570
+ return p === "granted" || p === "prompt";
564
571
  }
565
572
  return {
566
- isSupported: d,
567
- text: s,
568
- copied: m,
569
- copy: S
573
+ isSupported: s,
574
+ text: U(m),
575
+ copied: U(f),
576
+ copy: y
570
577
  };
571
578
  }
572
- const Ot = " ";
573
- function Lt(e) {
574
- return e == null ? void 0 : e.replace(/(\d{3})\d*(\d{4})/g, "$1****$2");
579
+ const At = " ";
580
+ function Dt(e) {
581
+ return e?.replace(/(\d{3})\d*(\d{4})/g, "$1****$2");
575
582
  }
576
- function ie(e, t) {
577
- return e == null ? void 0 : e.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? Ot).replace(/M/g, "*");
583
+ function de(e, t) {
584
+ return e?.replace(/\*/g, "M").replace(/\B(?=(?:\S{4})+$)/g, t ?? At).replace(/M/g, "*");
578
585
  }
579
- function jt(e) {
580
- const t = $t();
581
- return k("phone", (u, a) => {
582
- const n = `phone_${Math.random().toString(36).slice(2)}`, l = "__table__column_phone__", i = T(u, a), o = 16, d = `cursor:pointer;width:${o}px;height:${o}px;`, s = ie(Lt(i), e == null ? void 0 : e.separator), m = ie(i, e == null ? void 0 : e.separator);
583
- function h() {
584
- window.focus(), t.copy(i).then(() => {
585
- Ie.success({
586
+ function Bt(e) {
587
+ const t = Yt();
588
+ return S("phone", (i, o) => {
589
+ const r = `phone_${Math.random().toString(36).slice(2)}`, a = "__table__column_phone__", l = $(i, o), c = 16, s = `cursor:pointer;width:${c}px;height:${c}px;`, m = de(Dt(l), e?.separator), f = de(l, e?.separator);
590
+ function v() {
591
+ window.focus(), t.copy(l).then(() => {
592
+ Ue.success({
586
593
  content: "复制成功",
587
594
  duration: 1e3
588
595
  });
589
596
  });
590
597
  }
591
- function w() {
592
- const v = document.querySelectorAll(`.${l}.content`);
593
- v.length > 0 && v.forEach((y) => {
594
- const C = y;
595
- if (C.innerText.includes("****"))
598
+ function d() {
599
+ const x = document.querySelectorAll(`.${a}.content`);
600
+ x.length > 0 && x.forEach((p) => {
601
+ const g = p;
602
+ if (g.textContent?.includes("****"))
596
603
  return;
597
- C.innerText = C.dataset.encrypt;
598
- const M = C.nextSibling;
599
- !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>`);
604
+ g.dataset.encrypt && (g.textContent = g.dataset.encrypt);
605
+ const C = g.nextSibling;
606
+ !C || !C.classList.contains("preview-icon") || (C.innerHTML = `<svg width="${c}" height="${c}" 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>`);
600
607
  });
601
608
  }
602
- function S(v) {
603
- const y = document.querySelector(`#${n}>.preview-icon`);
604
- 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
+ function y(x) {
610
+ const p = document.querySelector(`#${r}>.preview-icon`);
611
+ p && (x ? p.innerHTML = `<svg width="${c}" height="${c}" 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>` : p.innerHTML = `<svg width="${c}" height="${c}" 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>`);
605
612
  }
606
- function x() {
607
- const v = document.querySelector(`#${n}>.content`), y = !!(v != null && v.innerHTML.includes("****"));
608
- y ? (w(), v && (v.innerHTML = m)) : v && (v.innerHTML = s), S(!y);
613
+ function w() {
614
+ const x = document.querySelector(`#${r}>.content`), p = !!x?.innerHTML.includes("****");
615
+ p ? (d(), x && (x.innerHTML = f)) : x && (x.innerHTML = m), y(!p);
609
616
  }
610
617
  function j() {
611
- e != null && e.onDial ? e.onDial(i) : window.open(`tel:${i}`, "_blank");
618
+ e?.onDial ? e.onDial(l) : window.open(`tel:${l}`, "_blank");
612
619
  }
613
- return f("div", {
614
- id: n,
620
+ return u("div", {
621
+ id: r,
615
622
  style: "display:flex;align-items:center;gap:4px;"
616
- }, [f("div", {
617
- "data-encrypt": s,
618
- class: `${l} content`,
623
+ }, [u("div", {
624
+ "data-encrypt": m,
625
+ class: `${a} content`,
619
626
  style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
620
- }, [e != null && e.safe ? s : m]), (e == null ? void 0 : e.safe) && (e == null ? void 0 : e.allowPreview) && f("i", {
627
+ }, [e?.safe ? m : f]), e?.safe && e?.allowPreview && u("i", {
621
628
  class: "preview-icon",
622
629
  title: "显示完整号码",
623
- style: d,
624
- onClick: x
625
- }, [f("svg", {
626
- width: o,
627
- height: o,
630
+ style: s,
631
+ onClick: w
632
+ }, [u("svg", {
633
+ width: c,
634
+ height: c,
628
635
  viewBox: "0 0 48 48",
629
636
  fill: "none",
630
637
  xmlns: "http://www.w3.org/2000/svg"
631
- }, [f("path", {
638
+ }, [u("path", {
632
639
  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",
633
640
  fill: "none",
634
641
  stroke: "#333",
635
642
  "stroke-width": "2",
636
643
  "stroke-linejoin": "round"
637
- }, null), f("path", {
644
+ }, null), u("path", {
638
645
  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",
639
646
  fill: "none",
640
647
  stroke: "#333",
641
648
  "stroke-width": "4",
642
649
  "stroke-linejoin": "round"
643
- }, null)])]), (e == null ? void 0 : e.allowDial) && f("i", {
644
- style: d,
650
+ }, null)])]), e?.allowDial && u("i", {
651
+ style: s,
645
652
  title: "拨出号码",
646
653
  onClick: j
647
- }, [f("svg", {
648
- width: o,
649
- height: o,
654
+ }, [u("svg", {
655
+ width: c,
656
+ height: c,
650
657
  viewBox: "0 0 48 48",
651
658
  fill: "none",
652
659
  xmlns: "http://www.w3.org/2000/svg"
653
- }, [f("path", {
660
+ }, [u("path", {
654
661
  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",
655
662
  stroke: "#333",
656
663
  "stroke-width": "2",
657
664
  "stroke-linecap": "round",
658
665
  "stroke-linejoin": "round"
659
- }, null), f("path", {
666
+ }, null), u("path", {
660
667
  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",
661
668
  stroke: "#333",
662
669
  "stroke-width": "4",
663
670
  "stroke-linecap": "round",
664
671
  "stroke-linejoin": "round"
665
- }, null), f("path", {
672
+ }, null), u("path", {
666
673
  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",
667
674
  fill: "none",
668
675
  stroke: "#333",
669
676
  "stroke-width": "4",
670
677
  "stroke-linejoin": "round"
671
- }, null)])]), (e == null ? void 0 : e.allowCopy) && f("i", {
672
- style: d,
678
+ }, null)])]), e?.allowCopy && u("i", {
679
+ style: s,
673
680
  title: "复制号码",
674
- onClick: h
675
- }, [f("svg", {
676
- width: o,
677
- height: o,
681
+ onClick: v
682
+ }, [u("svg", {
683
+ width: c,
684
+ height: c,
678
685
  viewBox: "0 0 48 48",
679
686
  fill: "none",
680
687
  xmlns: "http://www.w3.org/2000/svg"
681
- }, [f("path", {
688
+ }, [u("path", {
682
689
  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",
683
690
  stroke: "#333",
684
691
  "stroke-width": "2",
685
692
  "stroke-linecap": "round",
686
693
  "stroke-linejoin": "round"
687
- }, null), f("path", {
694
+ }, null), u("path", {
688
695
  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",
689
696
  fill: "none",
690
697
  stroke: "#333",
@@ -693,183 +700,178 @@ function jt(e) {
693
700
  }, null)])])]);
694
701
  });
695
702
  }
696
- function Rt(e) {
697
- return k("render", (r) => e(r));
703
+ function Ft(e) {
704
+ const t = e?.backgroundColor ?? "#f5f5f5", n = e?.foregroundColor ?? "#1677ff", i = e?.showText ?? !0, o = e?.textColor ?? "#000";
705
+ return S("progress", (a, l) => {
706
+ const c = $(a, l), s = e?.precision ?? 0, m = Math.min(Math.max(e?.format?.(c) ?? c, 0), 1), f = i ? `${(m * 100).toFixed(s)}%` : "";
707
+ return u("div", {
708
+ style: `background-color:${t};position:relative;min-height: 20px;text-align: center;border-radius: 2px;overflow:hidden;`
709
+ }, [u("div", {
710
+ style: `background-color: ${n};position:absolute;left:0;top:0;right;0;width: ${f};height: 100%;`
711
+ }, null), i && u("div", {
712
+ style: `position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:${o}`
713
+ }, [f])]);
714
+ });
698
715
  }
699
- function qt(e) {
700
- return k("tag", (r, u) => {
701
- 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, d = e == null ? void 0 : e.minWidth;
702
- return f("div", {
716
+ function Wt(e) {
717
+ return S("render", (n) => e(n));
718
+ }
719
+ function It(e) {
720
+ return S("serial", (n, i, o) => {
721
+ const r = {
722
+ color: typeof e?.color == "function" ? e.color(n) : e?.color,
723
+ fontWeight: e?.weight || "normal",
724
+ textAlign: "center"
725
+ };
726
+ return u("div", {
727
+ style: r
728
+ }, [o.rowIndex + 1]);
729
+ }, {
730
+ disableViewMode: !0
731
+ });
732
+ }
733
+ function Vt(e) {
734
+ return S("tag", (n, i) => {
735
+ const o = e?.maxCount || 5, r = e?.formatter ? e.formatter(n) : $(n, i), a = e?.textColors || ["#F87335"], l = e?.backgroundColors || ["#FFF4E8"], c = r.length > o, s = e?.minWidth;
736
+ return u("div", {
703
737
  style: {
704
738
  display: "flex",
705
739
  flexWrap: "wrap"
706
740
  }
707
- }, [n.slice(0, a).map((s, m) => {
708
- const h = typeof l == "function" ? l(s, m) : l[m % l.length], w = typeof i == "function" ? i(s, m) : i[m % i.length];
709
- return f("span", {
741
+ }, [r.slice(0, o).map((m, f) => {
742
+ const v = typeof a == "function" ? a(m, f) : a[f % a.length], d = typeof l == "function" ? l(m, f) : l[f % l.length];
743
+ return u("span", {
710
744
  style: {
711
- minWidth: d ? `${d}px` : "unset",
745
+ minWidth: s ? `${s}px` : "unset",
712
746
  textAlign: "center",
713
747
  margin: "2px",
714
748
  padding: "2px 5px",
715
- border: `solid 2px ${e != null && e.border ? h : "transparent"}`,
716
- borderRadius: `${(e == null ? void 0 : e.radius) || 0}px`,
717
- color: h,
718
- backgroundColor: w
749
+ border: `solid 2px ${e?.border ? v : "transparent"}`,
750
+ borderRadius: `${e?.radius || 0}px`,
751
+ color: v,
752
+ backgroundColor: d
719
753
  }
720
- }, [s]);
721
- }), o && "..."]);
754
+ }, [m]);
755
+ }), c && "..."]);
722
756
  });
723
757
  }
724
- function ce(e) {
758
+ function fe(e) {
725
759
  if (typeof e == "string")
726
760
  return e;
727
761
  if (typeof e == "number")
728
762
  return `${e}px`;
729
763
  }
730
- function Pt(e, t, r) {
731
- var u, a;
732
- 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);
764
+ function Ht(e, t, n) {
765
+ return typeof e == "function" ? e(n)?.toString() : typeof e?.content == "function" ? e?.content(n)?.toString() : typeof e?.content == "string" ? e?.content : $(n, t);
733
766
  }
734
- function zt(e, t) {
767
+ function Kt(e, t) {
735
768
  if (typeof e != "function") {
736
- if (typeof (e == null ? void 0 : e.color) == "function")
737
- return e == null ? void 0 : e.color(t);
738
- if (typeof (e == null ? void 0 : e.color) == "string")
739
- return e == null ? void 0 : e.color;
769
+ if (typeof e?.color == "function")
770
+ return e?.color(t);
771
+ if (typeof e?.color == "string")
772
+ return e?.color;
740
773
  }
741
774
  }
742
- function Et(e, t) {
775
+ function Nt(e, t) {
743
776
  if (typeof e != "function")
744
- return typeof (e == null ? void 0 : e.size) == "function" ? ce(e == null ? void 0 : e.size(t)) : ce(e == null ? void 0 : e.size);
745
- }
746
- function Yt(e, t) {
747
- let r = "";
748
- const u = zt(e, t), a = Et(e, t);
749
- return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
750
- }
751
- function At(e) {
752
- return k("text", (r, u) => {
753
- const a = Pt(e || {}, u, r), n = Yt(e || {}, r);
754
- return f("span", {
755
- style: n
756
- }, [a]);
757
- });
758
- }
759
- function Bt(e) {
760
- 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";
761
- return k("progress", (l, i) => {
762
- var h;
763
- const o = T(l, i), d = (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 = u ? `${(s * 100).toFixed(d)}%` : "";
764
- return f("div", {
765
- style: `background-color:${t};position:relative;min-height: 20px;text-align: center;border-radius: 2px;overflow:hidden;`
766
- }, [f("div", {
767
- style: `background-color: ${r};position:absolute;left:0;top:0;right;0;width: ${m};height: 100%;`
768
- }, null), u && f("div", {
769
- style: `position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:${a}`
770
- }, [m])]);
771
- });
777
+ return typeof e?.size == "function" ? fe(e?.size(t)) : fe(e?.size);
772
778
  }
773
- function Dt(e) {
774
- return k("serial", (r, u, a) => {
775
- const n = {
776
- color: typeof (e == null ? void 0 : e.color) == "function" ? e.color(r) : e == null ? void 0 : e.color,
777
- fontWeight: (e == null ? void 0 : e.weight) || "normal",
778
- textAlign: "center"
779
- };
780
- return f("div", {
781
- style: n
782
- }, [a.rowIndex + 1]);
783
- }, {
784
- disableViewMode: !0
779
+ function Ut(e, t) {
780
+ let n = "";
781
+ const i = Kt(e, t), o = Nt(e, t);
782
+ return i && (n += `color:${i};`), o && (n += `font-size:${o};`), n;
783
+ }
784
+ function Gt(e) {
785
+ return S("text", (n, i) => {
786
+ const o = Ht(e || {}, i, n), r = Ut(e || {}, n);
787
+ return u("span", {
788
+ style: r
789
+ }, [o]);
785
790
  });
786
791
  }
787
- function Vt() {
792
+ function Zt() {
788
793
  return {
789
- dropdown: yt,
790
- text: At,
791
- dict: ht,
792
- tag: qt,
793
- render: Rt,
794
- phone: jt,
795
- image: bt,
796
- currency: ut,
797
- date: st,
798
- button: at,
799
- progress: Bt,
800
- serial: Dt
794
+ dropdown: wt,
795
+ text: Gt,
796
+ dict: vt,
797
+ tag: Vt,
798
+ render: Wt,
799
+ phone: Bt,
800
+ image: Ct,
801
+ currency: dt,
802
+ date: yt,
803
+ button: ut,
804
+ progress: Ft,
805
+ serial: It
801
806
  };
802
807
  }
803
- function G(e, t) {
804
- if (!(e != null && e.render))
808
+ function ee(e, t) {
809
+ if (!e?.render)
805
810
  return;
806
- const r = e.render({
807
- ...Vt()
811
+ const n = e.render({
812
+ ...Zt()
808
813
  // ...(Table?.$override?.table || {}),
809
814
  });
810
815
  return {
811
816
  render: ({
812
- record: u,
813
- rowIndex: a
814
- }) => r(u, e, {
817
+ record: i,
818
+ rowIndex: o
819
+ }) => n(i, e, {
815
820
  ...t || {},
816
- rowIndex: a
821
+ rowIndex: o
817
822
  }),
818
- [nt]: r.$type,
819
- disableColumnMode: r.$disableColumnMode,
820
- disableViewMode: r.$disableViewMode,
821
- isRender: r.$type === "render",
822
- type: r.$type
823
+ [it]: n.$type,
824
+ disableColumnMode: n.$disableColumnMode,
825
+ disableViewMode: n.$disableViewMode,
826
+ isRender: n.$type === "render",
827
+ type: n.$type
823
828
  };
824
829
  }
825
- function de({
830
+ function me({
826
831
  columns: e,
827
832
  columnsOptions: t,
828
- columnsGroups: r,
829
- pageMode: u,
830
- collapsedColumns: a,
831
- events: n
833
+ columnsGroups: n,
834
+ pageMode: i,
835
+ collapsedColumns: o,
836
+ events: r
832
837
  }) {
833
- const l = e.map((i) => ({
838
+ const a = e.map((l) => ({
834
839
  ...t || {},
835
- ...i
836
- })).map((i) => It(i, u, a, n)).filter(Boolean);
837
- return Ht(l, r);
838
- }
839
- function Ft(e, t) {
840
- const r = [], u = (n) => {
841
- if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
842
- const l = t.find((i) => {
843
- var o;
844
- return ((o = Object.getOwnPropertyDescriptor(i, "key")) == null ? void 0 : o.value) === n.key;
845
- });
846
- if (l)
847
- return r.push(l), l;
840
+ ...l
841
+ })).map((l) => Xt(l, i, o, r)).filter(Boolean);
842
+ return Qt(a, n);
843
+ }
844
+ function Jt(e, t) {
845
+ const n = [], i = (r) => {
846
+ if ("children" in r && (r.children = r.children.map(i)), "key" in r) {
847
+ const a = t.find((l) => Object.getOwnPropertyDescriptor(l, "key")?.value === r.key);
848
+ if (a)
849
+ return n.push(a), a;
848
850
  }
849
- return n;
850
- }, a = u(e);
851
- if (r != null && r.length && a) {
852
- const n = Math.min(...r.map((l) => t.indexOf(l)));
853
- r.forEach((l) => {
854
- const i = t.indexOf(l);
855
- t.splice(i, 1);
856
- }), t.splice(n, 0, a);
851
+ return r;
852
+ }, o = i(e);
853
+ if (n?.length && o) {
854
+ const r = Math.min(...n.map((a) => t.indexOf(a)));
855
+ n.forEach((a) => {
856
+ const l = t.indexOf(a);
857
+ t.splice(l, 1);
858
+ }), t.splice(r, 0, o);
857
859
  }
858
860
  }
859
- function Ht(e, t = []) {
860
- return t.forEach((r) => {
861
- Ft(r, e);
861
+ function Qt(e, t = []) {
862
+ return t.forEach((n) => {
863
+ Jt(n, e);
862
864
  }), e;
863
865
  }
864
- function It(e, t, r, u) {
866
+ function Xt(e, t, n, i) {
865
867
  const {
866
- render: a,
867
- disableColumnMode: n
868
- } = G(e, {
868
+ render: o,
869
+ disableColumnMode: r
870
+ } = ee(e, {
869
871
  previewing: !1,
870
- emits: u
872
+ emits: i
871
873
  }) || {};
872
- if (!(n || e.visiable === !1) && !(typeof e.visiable == "function" && e.visiable() === !1) && !r.value.find((l) => l.key === e.key && l.collapsed === !0))
874
+ if (!(r || e.visiable === !1) && !(typeof e.visiable == "function" && e.visiable() === !1) && !n.value.find((a) => a.key === e.key && a.collapsed === !0))
873
875
  return {
874
876
  dataIndex: e.index || e.key,
875
877
  title: e.title,
@@ -885,13 +887,13 @@ function It(e, t, r, u) {
885
887
  tooltip: !0,
886
888
  ...e.extraProps,
887
889
  key: e.key,
888
- render: a
890
+ render: o
889
891
  };
890
892
  }
891
- function Kt() {
892
- return new Xe.Workbook();
893
+ function en() {
894
+ return new rt.Workbook();
893
895
  }
894
- function Wt(e, t = "Sheet1") {
896
+ function tn(e, t = "Sheet1") {
895
897
  return e.addWorksheet(t, {
896
898
  headerFooter: {
897
899
  firstHeader: "",
@@ -899,94 +901,164 @@ function Wt(e, t = "Sheet1") {
899
901
  }
900
902
  });
901
903
  }
902
- function Nt(e, t) {
904
+ function nn(e, t) {
903
905
  e.columns = t;
904
906
  }
905
- function Ut(e, t) {
907
+ function rn(e, t) {
906
908
  e.addRows(t);
907
909
  }
908
- async function Gt({
910
+ async function on({
909
911
  columns: e,
910
912
  rows: t,
911
- filename: r
913
+ filename: n
912
914
  }) {
913
- const u = Kt(), a = Wt(u);
914
- Nt(a, e), Ut(a, t);
915
- const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
916
- Zt(l, r || `${V().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
917
- }
918
- function Zt(e, t) {
919
- const r = document.createElement("a");
920
- r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
921
- URL.revokeObjectURL(r.href);
915
+ const i = en(), o = tn(i);
916
+ nn(o, e), rn(o, t);
917
+ const r = await i.xlsx.writeBuffer(), a = new Blob([r]);
918
+ an(a, n || `${I().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
919
+ }
920
+ function an(e, t) {
921
+ const n = document.createElement("a");
922
+ n.download = t || "download", n.href = URL.createObjectURL(e), n.click(), setTimeout(() => {
923
+ URL.revokeObjectURL(n.href);
922
924
  }, 1e3);
923
925
  }
924
- function Jt(e, t) {
925
- const r = {};
926
- return e.filter((a) => a.exportable !== !1).map((a) => ({
927
- options: a,
928
- render: G(a),
929
- content: typeof a.exportable == "object" ? a.exportable.content : void 0
930
- })).forEach((a) => {
931
- var i;
932
- const n = (i = a.render) == null ? void 0 : i.render, l = () => {
933
- var o;
926
+ function ln(e, t) {
927
+ const n = {};
928
+ return e.filter((o) => o.exportable !== !1).map((o) => ({
929
+ options: o,
930
+ render: ee(o),
931
+ content: typeof o.exportable == "object" ? o.exportable.content : void 0
932
+ })).forEach((o) => {
933
+ const r = o.render?.render, a = () => {
934
934
  switch (!0) {
935
- case !!a.content:
936
- return a.content && a.content(t);
937
- case !!n: {
938
- const d = document.createElement("div"), s = Ye(() => n && n({
935
+ case !!o.content:
936
+ return o.content && o.content(t);
937
+ case !!r: {
938
+ const l = document.createElement("div"), c = Be(() => r && r({
939
939
  record: t
940
940
  }));
941
- return Ae(s, d), (o = s.el) == null ? void 0 : o.innerText;
941
+ return Fe(c, l), c.el?.textContent;
942
942
  }
943
943
  default:
944
- return T(t, a.options);
944
+ return $(t, o.options);
945
945
  }
946
946
  };
947
- r[a.options.key] = l();
948
- }), r;
947
+ n[o.options.key] = a();
948
+ }), n;
949
949
  }
950
- function Qt(e) {
950
+ function sn(e) {
951
951
  switch (!0) {
952
952
  case typeof e == "number":
953
953
  return e / 6;
954
954
  case (typeof e == "string" && e.endsWith("px")):
955
- return parseInt(e.replace("px", "")) / 6;
955
+ return Number.parseInt(e.replace("px", "")) / 6;
956
956
  default:
957
957
  return 30;
958
958
  }
959
959
  }
960
- function Xt(e, t, r) {
961
- const u = e.filter((n) => n.exportable !== !1).map((n) => {
962
- var l, i;
963
- return {
964
- key: n.key,
965
- header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
966
- width: ((i = n.exportable) == null ? void 0 : i.width) || Qt(n.width)
967
- };
968
- }), a = t.map((n) => Jt(e, n));
969
- Gt({
970
- columns: u,
971
- rows: a,
972
- filename: r
960
+ function un(e, t, n) {
961
+ const i = e.filter((r) => r.exportable !== !1).map((r) => ({
962
+ key: r.key,
963
+ header: r.exportable?.header || r.title,
964
+ width: r.exportable?.width || sn(r.width)
965
+ })), o = t.map((r) => ln(e, r));
966
+ on({
967
+ columns: i,
968
+ rows: o,
969
+ filename: n
973
970
  });
974
971
  }
975
- function pt() {
972
+ function cn() {
976
973
  return {
977
- exportExcel: Xt
974
+ exportExcel: un
978
975
  };
979
976
  }
980
- class Z {
977
+ const dn = 300;
978
+ function fn(e) {
979
+ const n = e?.querySelector(".arco-scrollbar-container.arco-table-body");
980
+ if (!n)
981
+ return;
982
+ let i, o = !1, r;
983
+ n.addEventListener("mousedown", () => {
984
+ i = setTimeout(() => {
985
+ i && (n.style.cursor = "grab", n.style.userSelect = "none", o = !0);
986
+ }, dn);
987
+ }), n.addEventListener("mouseup", () => {
988
+ clearTimeout(i), i && (i = void 0, o = !1, n.style.cursor = "", n.style.userSelect = "", r = void 0);
989
+ }), n.addEventListener("mousemove", (a) => {
990
+ if (o)
991
+ if (r === void 0)
992
+ r = a.clientX;
993
+ else {
994
+ const l = r - a.clientX;
995
+ r = a.clientX, n.scrollLeft += l;
996
+ }
997
+ });
998
+ }
999
+ class K {
1000
+ data = We({
1001
+ index: 1,
1002
+ size: 10,
1003
+ total: 0
1004
+ });
1005
+ get pageIndex() {
1006
+ return this.data.index;
1007
+ }
1008
+ set pageIndex(t) {
1009
+ this.data.index = t;
1010
+ }
1011
+ get pageSize() {
1012
+ return this.data.size;
1013
+ }
1014
+ set pageSize(t) {
1015
+ this.data.size = t;
1016
+ }
1017
+ get total() {
1018
+ return this.data.total;
1019
+ }
1020
+ set total(t) {
1021
+ this.data.total = t;
1022
+ }
1023
+ pageSizeOpts = [10, 20, 30, 40, 50];
1024
+ pageLayouts = ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"];
1025
+ /**
1026
+ * 构造函数
1027
+ * @param index
1028
+ * @param size
1029
+ */
1030
+ constructor(t = 1, n = 10) {
1031
+ this.pageIndex = t, this.pageSize = n;
1032
+ }
1033
+ /**
1034
+ * 重置操作
1035
+ */
1036
+ reset() {
1037
+ this.pageIndex = 1;
1038
+ }
1039
+ /**
1040
+ * 前置操作
1041
+ * @param options
1042
+ */
1043
+ before(t) {
1044
+ t.paramsQuery = {
1045
+ ...t.paramsQuery,
1046
+ page: this.pageIndex - 1,
1047
+ size: this.pageSize
1048
+ };
1049
+ }
1050
+ /**
1051
+ * 后置操作
1052
+ * @param response
1053
+ */
1054
+ after(t) {
1055
+ this.total = t.data?.totalElements;
1056
+ }
1057
+ }
1058
+ class te {
1059
+ sort = {};
1060
+ defaultSort = {};
981
1061
  constructor(t) {
982
- $(this, "sort", {});
983
- $(this, "defaultSort", {});
984
- $(this, "before", (t) => {
985
- t.paramsQuery = {
986
- ...t.paramsQuery || {},
987
- sort: this.stringify(this.sort)
988
- };
989
- });
990
1062
  t && (this.sort = t, this.defaultSort = t);
991
1063
  }
992
1064
  /**
@@ -994,19 +1066,25 @@ class Z {
994
1066
  * @param key 排序关键字
995
1067
  * @param value 排序方式
996
1068
  */
997
- update(t, r) {
998
- t && r && (this.sort[t] = r);
1069
+ update(t, n) {
1070
+ t && n && (this.sort[t] = n);
999
1071
  }
1000
1072
  /**
1001
1073
  * 移除排序项
1002
1074
  * @param key 排序关键字
1003
1075
  */
1004
1076
  remove(t) {
1005
- const r = Object.entries(this.sort).filter(([u]) => u !== t);
1006
- this.sort = {}, r && r.forEach(([u, a]) => {
1007
- this.sort[u] = a;
1077
+ const n = Object.entries(this.sort).filter(([i]) => i !== t);
1078
+ this.sort = {}, n && n.forEach(([i, o]) => {
1079
+ this.sort[i] = o;
1008
1080
  });
1009
1081
  }
1082
+ before = (t) => {
1083
+ t.paramsQuery = {
1084
+ ...t.paramsQuery || {},
1085
+ sort: this.stringify(this.sort)
1086
+ };
1087
+ };
1010
1088
  /**
1011
1089
  * 重置分页数据
1012
1090
  */
@@ -1017,122 +1095,17 @@ class Z {
1017
1095
  * 转换排序对象为字符串
1018
1096
  */
1019
1097
  stringify(t) {
1020
- return typeof t != "object" ? [] : (t instanceof Z && (t = t.sort), Object.entries(t).map(([r, u]) => `${r},${u}`));
1098
+ return typeof t != "object" ? [] : (t instanceof te && (t = t.sort), Object.entries(t).map(([n, i]) => `${n},${i}`));
1021
1099
  }
1022
1100
  }
1023
- const er = 300;
1024
- function tr(e) {
1025
- const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
1026
- if (!r)
1027
- return;
1028
- let u, a = !1, n;
1029
- r.addEventListener("mousedown", () => {
1030
- u = setTimeout(() => {
1031
- u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
1032
- }, er);
1033
- }), r.addEventListener("mouseup", () => {
1034
- clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
1035
- }), r.addEventListener("mousemove", (l) => {
1036
- if (a)
1037
- if (n === void 0)
1038
- n = l.clientX;
1039
- else {
1040
- const i = n - l.clientX;
1041
- n = l.clientX, r.scrollLeft += i;
1042
- }
1043
- });
1044
- }
1045
- function rr(e) {
1046
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
1047
- }
1048
- const nr = /* @__PURE__ */ B({
1049
- props: {
1050
- record: {
1051
- type: Object,
1052
- required: !0
1053
- },
1054
- columns: {
1055
- type: Array,
1056
- required: !0
1057
- },
1058
- minWidth: {
1059
- type: Number,
1060
- required: !1,
1061
- default: 320
1062
- },
1063
- border: {
1064
- type: Boolean,
1065
- default: !0
1066
- },
1067
- exclude: {
1068
- type: Array,
1069
- default: () => []
1070
- },
1071
- layout: {
1072
- type: String,
1073
- required: !1,
1074
- default: "horizontal"
1075
- },
1076
- buttons: {
1077
- type: Array,
1078
- default: () => []
1079
- }
1080
- },
1081
- setup(e) {
1082
- const t = H(), r = b(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
1083
- options: n,
1084
- renderer: G(n, {
1085
- previewing: !0
1086
- })
1087
- })).filter(({
1088
- options: n
1089
- }) => {
1090
- var l;
1091
- return !((l = e.exclude) != null && l.includes(n.key));
1092
- }).filter(({
1093
- renderer: n
1094
- }) => !(n != null && n.disableViewMode));
1095
- function a() {
1096
- var n;
1097
- if (t) {
1098
- const l = (n = t.proxy) == null ? void 0 : n.$el;
1099
- r.value = Math.floor(l.offsetWidth / e.minWidth);
1100
- }
1101
- }
1102
- return A(() => {
1103
- a();
1104
- }), () => {
1105
- let n;
1106
- return f("div", {
1107
- class: "preview-container"
1108
- }, [f(Ke, {
1109
- column: r.value,
1110
- bordered: !0,
1111
- align: "left",
1112
- layout: e.layout
1113
- }, rr(n = u.map((l) => f(We, {
1114
- label: l.options.title
1115
- }, {
1116
- default: () => {
1117
- var i, o;
1118
- return [(i = l.renderer) != null && i.render ? (o = l.renderer) == null ? void 0 : o.render({
1119
- record: e.record
1120
- }) : T(e.record, l.options)];
1121
- }
1122
- }))) ? n : {
1123
- default: () => [n]
1124
- })]);
1125
- };
1126
- }
1127
- });
1128
- function ar(e, t, {
1129
- tableForm: r,
1130
- tableEvents: u
1101
+ function mn(e, t, {
1102
+ tableForm: n,
1103
+ tableEvents: i
1131
1104
  }) {
1132
- const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
1133
- return a || n ? () => f(I, null, [n && f(Ne, {
1105
+ const o = e.refreshable || e.exportable || t.slots.actions, r = !!n?.length && o;
1106
+ return o || r ? () => u(G, null, [r && u(Ge, {
1134
1107
  margin: 0
1135
- }, null), a && f("div", {
1108
+ }, null), o && u("div", {
1136
1109
  class: "table-actions",
1137
1110
  style: {
1138
1111
  display: "flex",
@@ -1141,44 +1114,108 @@ function ar(e, t, {
1141
1114
  flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
1142
1115
  alignItems: "center"
1143
1116
  }
1144
- }, [f("div", {
1117
+ }, [u("div", {
1145
1118
  class: "built-in"
1146
- }, [f(ae, null, {
1147
- default: () => [e.refreshable && f(P, {
1119
+ }, [u(le, null, {
1120
+ default: () => [e.refreshable && u(P, {
1148
1121
  type: "primary",
1149
- onClick: () => u("reload")
1122
+ onClick: () => i("reload")
1150
1123
  }, {
1151
- default: () => [E("刷新")]
1152
- }), e.exportable && f(P, {
1124
+ default: () => [A("刷新")]
1125
+ }), e.exportable && u(P, {
1153
1126
  type: "primary",
1154
- onClick: () => u("export")
1127
+ onClick: () => i("export")
1155
1128
  }, {
1156
- default: () => [E("导出")]
1157
- }), e.collapsable && f(P, {
1129
+ default: () => [A("导出")]
1130
+ }), e.collapsable && u(P, {
1158
1131
  type: "primary",
1159
- onClick: () => u("collapse")
1132
+ onClick: () => i("collapse")
1160
1133
  }, {
1161
- default: () => [E("显示")]
1134
+ default: () => [A("显示")]
1162
1135
  })]
1163
- })]), f("div", {
1136
+ })]), u("div", {
1164
1137
  class: "customs"
1165
- }, [f(ae, null, {
1138
+ }, [u(le, null, {
1166
1139
  default: () => [t.slots.actions && t.slots.actions()]
1167
1140
  })])])]) : () => {
1168
1141
  };
1169
1142
  }
1170
- function lr(e, t, {
1171
- tableForm: r,
1172
- tableEvents: u,
1173
- formInstance: a
1143
+ const hn = /* @__PURE__ */ F({
1144
+ props: {
1145
+ collapsedColumns: {
1146
+ type: Array,
1147
+ required: !0
1148
+ }
1149
+ },
1150
+ setup(e) {
1151
+ const t = W(), n = k(e.collapsedColumns.map((o) => ({
1152
+ label: o.title,
1153
+ value: o.key,
1154
+ disabled: !1
1155
+ }))), i = k(e.collapsedColumns.filter((o) => o.collapsed).map((o) => o.key));
1156
+ return tt(() => {
1157
+ const o = e.collapsedColumns.map((r) => ({
1158
+ key: r.key,
1159
+ title: r.title,
1160
+ collapsed: i.value.includes(r.key)
1161
+ }));
1162
+ t.close(o);
1163
+ }), () => u("div", {
1164
+ class: "table-collapsed-render"
1165
+ }, [u(Ze, {
1166
+ data: n.value,
1167
+ "default-value": i.value,
1168
+ onChange: (o) => i.value = [...o],
1169
+ title: ["显示列", "隐藏列"],
1170
+ style: {
1171
+ justifyContent: "center"
1172
+ }
1173
+ }, {
1174
+ default: () => [Ie(u("template", null, null), [[Ve("slot"), "source"]])]
1175
+ })]);
1176
+ }
1177
+ }), yn = /* @__PURE__ */ F({
1178
+ props: {
1179
+ value: {
1180
+ type: Object,
1181
+ required: !0
1182
+ },
1183
+ form: {
1184
+ type: Array,
1185
+ required: !0
1186
+ },
1187
+ onSubmit: {
1188
+ type: Function,
1189
+ required: !1
1190
+ }
1191
+ },
1192
+ setup(e) {
1193
+ const t = W();
1194
+ function n(i) {
1195
+ e.onSubmit && e.onSubmit(i), t.close(i);
1196
+ }
1197
+ return () => u("div", {
1198
+ class: "edit-form-container"
1199
+ }, [u(be, {
1200
+ name: "form",
1201
+ value: e.value,
1202
+ form: e.form,
1203
+ onSubmit: n
1204
+ }, null)]);
1205
+ }
1206
+ });
1207
+ function pn(e, t, {
1208
+ tableForm: n,
1209
+ tableEvents: i,
1210
+ formInstance: o
1174
1211
  }) {
1175
- return r != null && r.length ? () => f("div", {
1212
+ return n?.length ? () => u("div", {
1176
1213
  class: "table-form"
1177
- }, [f(oe, fe({
1178
- form: r,
1179
- ref: (n) => a && (a.value = n),
1214
+ }, [u(be, pe({
1215
+ form: n,
1216
+ ref: (r) => o && (o.value = r),
1180
1217
  searchable: !0,
1181
- onSubmit: () => u("reload", {
1218
+ onSubmit: () => i("reload", {
1182
1219
  reset: !0
1183
1220
  })
1184
1221
  }, e.formOptions), {
@@ -1186,176 +1223,182 @@ function lr(e, t, {
1186
1223
  })]) : () => {
1187
1224
  };
1188
1225
  }
1189
- function ur(e, t, {
1190
- tableSource: r
1226
+ function bn(e, t, {
1227
+ pageService: n,
1228
+ tableEvents: i
1191
1229
  }) {
1192
- const u = b([]);
1193
- function a() {
1194
- u.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
1230
+ function o(l) {
1231
+ n && (n.pageIndex = l, i("reload"));
1195
1232
  }
1196
- function n() {
1197
- re(() => {
1198
- 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]]);
1233
+ function r(l) {
1234
+ n && (n.pageSize = l, i("reload"));
1235
+ }
1236
+ const a = /* @__PURE__ */ Et({
1237
+ mobile: 0,
1238
+ tablet: 640,
1239
+ desktop: 1024
1240
+ });
1241
+ return n ? () => u("div", {
1242
+ class: "table-pagination",
1243
+ style: {
1244
+ padding: "10px 0"
1245
+ }
1246
+ }, [u(Je, {
1247
+ current: n.pageIndex,
1248
+ "onUpdate:current": (l) => n.pageIndex = l,
1249
+ "page-size": n.pageSize,
1250
+ "onUpdate:page-size": (l) => n.pageSize = l,
1251
+ total: n.total,
1252
+ "page-size-options": n.pageSizeOpts,
1253
+ "hide-on-single-page": !e.alwayShowPagination,
1254
+ "show-total": !0,
1255
+ "show-page-size": !0,
1256
+ size: "small",
1257
+ simple: a.smaller("desktop").value,
1258
+ onChange: (l) => o(l),
1259
+ onPageSizeChange: (l) => r(l),
1260
+ style: {
1261
+ justifyContent: "flex-end"
1262
+ }
1263
+ }, null)]) : () => {
1264
+ };
1265
+ }
1266
+ function gn(e, t, {
1267
+ tableSource: n
1268
+ }) {
1269
+ const i = k([]);
1270
+ function o() {
1271
+ i.value = [], t.emit("update:radio-key", null), t.emit("update:radio-row", null), t.emit("update:checkbox-keys", []), t.emit("update:checkbox-rows", []);
1272
+ }
1273
+ function r() {
1274
+ N(() => {
1275
+ e.checkboxRows !== void 0 && (i.value = [...e.checkboxRows.map((s) => s[e.rowKey])]), e.checkboxKeys !== void 0 && (i.value = [...e.checkboxKeys]), e.radioKey && (i.value = [e.radioKey]), e.radioRow && (i.value = [e.radioRow[e.rowKey]]);
1199
1276
  });
1200
1277
  }
1201
- function l() {
1202
- const d = typeof e.selection == "string" ? {
1278
+ function a() {
1279
+ const s = typeof e.selection == "string" ? {
1203
1280
  type: e.selection
1204
1281
  } : e.selection;
1205
- switch (d == null ? void 0 : d.type) {
1282
+ switch (s?.type) {
1206
1283
  case "radio":
1207
1284
  return {
1208
1285
  title: "选择",
1209
1286
  width: 80,
1210
- selectedRowKeys: u.value,
1211
- ...d
1287
+ selectedRowKeys: i.value,
1288
+ ...s
1212
1289
  };
1213
1290
  case "checkbox":
1214
1291
  return {
1215
1292
  width: 80,
1216
1293
  showCheckedAll: !0,
1217
- selectedRowKeys: u.value,
1218
- ...d
1294
+ selectedRowKeys: i.value,
1295
+ ...s
1219
1296
  };
1220
1297
  }
1221
1298
  }
1222
- function i(d, s, m) {
1299
+ function l(s, m, f) {
1223
1300
  const {
1224
- type: h
1225
- } = l() || {};
1226
- switch (h) {
1301
+ type: v
1302
+ } = a() || {};
1303
+ switch (v) {
1227
1304
  case "radio":
1228
- t.emit("update:radio-key", s), t.emit("update:radio-row", m);
1305
+ t.emit("update:radio-key", m), t.emit("update:radio-row", f);
1229
1306
  break;
1230
1307
  case "checkbox":
1231
- t.emit("update:checkbox-keys", d), t.emit("update:checkbox-rows", d.map((w) => {
1232
- var S;
1233
- return r.value.find((x) => x[e.rowKey] === w) || ((S = e.checkboxRows) == null ? void 0 : S.find((x) => x[e.rowKey] === w));
1234
- }));
1308
+ t.emit("update:checkbox-keys", s), t.emit("update:checkbox-rows", s.map((d) => n.value.find((y) => y[e.rowKey] === d) || e.checkboxRows?.find((y) => y[e.rowKey] === d)));
1235
1309
  break;
1236
1310
  }
1237
1311
  }
1238
- function o() {
1239
- re(() => {
1240
- t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((d) => {
1241
- var s;
1242
- return r.value.find((m) => m[e.rowKey] === d) || ((s = e.checkboxRows) == null ? void 0 : s.find((m) => m[e.rowKey] === d));
1243
- }));
1312
+ function c() {
1313
+ N(() => {
1314
+ t.emit("update:checkbox-keys", i.value), t.emit("update:checkbox-rows", i.value.map((s) => n.value.find((m) => m[e.rowKey] === s) || e.checkboxRows?.find((m) => m[e.rowKey] === s)));
1244
1315
  });
1245
1316
  }
1246
- return n(), {
1247
- selectedRowKeys: u,
1248
- rowSelection: l(),
1249
- onSelect: i,
1250
- onSelectAll: o,
1251
- resetSelection: a,
1252
- reloadSelection: n
1317
+ return r(), {
1318
+ selectedRowKeys: i,
1319
+ rowSelection: a(),
1320
+ onSelect: l,
1321
+ onSelectAll: c,
1322
+ resetSelection: o,
1323
+ reloadSelection: r
1253
1324
  };
1254
1325
  }
1255
- function ir(e, t, {
1256
- pageService: r,
1257
- tableEvents: u
1258
- }) {
1259
- function a(i) {
1260
- r && (r.pageIndex = i, u("reload"));
1261
- }
1262
- function n(i) {
1263
- r && (r.pageSize = i, u("reload"));
1264
- }
1265
- const l = _t({
1266
- mobile: 0,
1267
- tablet: 640,
1268
- desktop: 1024
1269
- });
1270
- return r ? () => f("div", {
1271
- class: "table-pagination",
1272
- style: {
1273
- padding: "10px 0"
1274
- }
1275
- }, [f(Ue, {
1276
- current: r.pageIndex,
1277
- "onUpdate:current": (i) => r.pageIndex = i,
1278
- "page-size": r.pageSize,
1279
- "onUpdate:page-size": (i) => r.pageSize = i,
1280
- total: r.total,
1281
- "page-size-options": r.pageSizeOpts,
1282
- "hide-on-single-page": !e.alwayShowPagination,
1283
- "show-total": !0,
1284
- "show-page-size": !0,
1285
- size: "small",
1286
- simple: l.smaller("desktop").value,
1287
- onChange: (i) => a(i),
1288
- onPageSizeChange: (i) => n(i),
1289
- style: {
1290
- justifyContent: "flex-end"
1291
- }
1292
- }, null)]) : () => {
1293
- };
1326
+ function vn(e) {
1327
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !He(e);
1294
1328
  }
1295
- const cr = /* @__PURE__ */ B({
1296
- props: {
1297
- collapsedColumns: {
1298
- type: Array,
1299
- required: !0
1300
- }
1301
- },
1302
- setup(e) {
1303
- const t = D(), r = b(e.collapsedColumns.map((a) => ({
1304
- label: a.title,
1305
- value: a.key,
1306
- disabled: !1
1307
- }))), u = b(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1308
- return Je(() => {
1309
- const a = e.collapsedColumns.map((n) => ({
1310
- key: n.key,
1311
- title: n.title,
1312
- collapsed: u.value.includes(n.key)
1313
- }));
1314
- t.close(a);
1315
- }), () => f("div", {
1316
- class: "table-collapsed-render"
1317
- }, [f(Ge, {
1318
- data: r.value,
1319
- "default-value": u.value,
1320
- onChange: (a) => u.value = [...a],
1321
- title: ["显示列", "隐藏列"],
1322
- style: {
1323
- justifyContent: "center"
1324
- }
1325
- }, {
1326
- default: () => [De(f("template", null, null), [[Ve("slot"), "source"]])]
1327
- })]);
1328
- }
1329
- }), dr = /* @__PURE__ */ B({
1329
+ const wn = /* @__PURE__ */ F({
1330
1330
  props: {
1331
- value: {
1331
+ record: {
1332
1332
  type: Object,
1333
1333
  required: !0
1334
1334
  },
1335
- form: {
1335
+ columns: {
1336
1336
  type: Array,
1337
1337
  required: !0
1338
1338
  },
1339
- onSubmit: {
1340
- type: Function,
1341
- required: !1
1339
+ minWidth: {
1340
+ type: Number,
1341
+ required: !1,
1342
+ default: 320
1343
+ },
1344
+ border: {
1345
+ type: Boolean,
1346
+ default: !0
1347
+ },
1348
+ exclude: {
1349
+ type: Array,
1350
+ default: () => []
1351
+ },
1352
+ layout: {
1353
+ type: String,
1354
+ required: !1,
1355
+ default: "horizontal"
1356
+ },
1357
+ buttons: {
1358
+ type: Array,
1359
+ default: () => []
1342
1360
  }
1343
1361
  },
1344
1362
  setup(e) {
1345
- const t = D();
1346
- function r(u) {
1347
- e.onSubmit && e.onSubmit(u), t.close(u);
1363
+ const t = z(), n = k(0), i = e.columns.filter((r) => typeof r.visiable == "boolean" ? r.visiable : typeof r.visiable == "function" ? r.visiable() : !0).map((r) => ({
1364
+ options: r,
1365
+ renderer: ee(r, {
1366
+ previewing: !0
1367
+ })
1368
+ })).filter(({
1369
+ options: r
1370
+ }) => !e.exclude?.includes(r.key)).filter(({
1371
+ renderer: r
1372
+ }) => !r?.disableViewMode);
1373
+ function o() {
1374
+ if (t) {
1375
+ const r = t.proxy?.$el;
1376
+ n.value = Math.floor(r.offsetWidth / e.minWidth);
1377
+ }
1348
1378
  }
1349
- return () => f("div", {
1350
- class: "edit-form-container"
1351
- }, [f(oe, {
1352
- name: "form",
1353
- value: e.value,
1354
- form: e.form,
1355
- onSubmit: r
1356
- }, null)]);
1379
+ return E(() => {
1380
+ o();
1381
+ }), () => {
1382
+ let r;
1383
+ return u("div", {
1384
+ class: "preview-container"
1385
+ }, [u(Qe, {
1386
+ column: n.value,
1387
+ bordered: !0,
1388
+ align: "left",
1389
+ layout: e.layout
1390
+ }, vn(r = i.map((a) => u(Xe, {
1391
+ label: a.options.title
1392
+ }, {
1393
+ default: () => [a.renderer?.render ? a.renderer?.render({
1394
+ record: e.record
1395
+ }) : $(e.record, a.options)]
1396
+ }))) ? r : {
1397
+ default: () => [r]
1398
+ })]);
1399
+ };
1357
1400
  }
1358
- }), sr = /* @__PURE__ */ B({
1401
+ }), xn = /* @__PURE__ */ F({
1359
1402
  props: {
1360
1403
  // 数据主键
1361
1404
  rowKey: {
@@ -1504,24 +1547,24 @@ const cr = /* @__PURE__ */ B({
1504
1547
  },
1505
1548
  expose: ["preview", "export", "edit", "reload", "tableSource", "formSource", "update:radio-key", "update:radio-row", "update:checkbox-keys", "update:checkbox-rows", "formInstance", "resetSelection", "reloadSelection", "reloadColumns", "change"],
1506
1549
  setup(e, t) {
1507
- const r = Math.random().toString(32).slice(2).toUpperCase(), u = b(), a = b(), n = b(), l = b(), [i, o] = et(e.columns), d = b(!1), s = e.form ?? tt(e.columns), m = S(), h = j(), w = b(e.columns.map((c) => ({
1508
- key: c.key,
1509
- title: c.title,
1510
- collapsed: !!c.collapsed
1550
+ const n = Math.random().toString(32).slice(2).toUpperCase(), i = k(), o = k(), r = k(), a = k(), [l, c] = st(e.columns), s = k(!1), m = e.form ?? at(e.columns), f = y(), v = j(), d = k(e.columns.map((h) => ({
1551
+ key: h.key,
1552
+ title: h.title,
1553
+ collapsed: !!h.collapsed
1511
1554
  })));
1512
- function S() {
1555
+ function y() {
1513
1556
  switch (!0) {
1514
1557
  case (typeof e.pageable == "string" && e.pageable === "server"):
1515
- return new F();
1558
+ return new K();
1516
1559
  case (typeof e.pageable == "boolean" && e.pageable === !0):
1517
- return new F();
1560
+ return new K();
1518
1561
  case (typeof e.pageable == "object" && !!e.pageable.reset):
1519
1562
  return e.pageable;
1520
1563
  case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
1521
- return new F(e.pageable.index, e.pageable.size);
1564
+ return new K(e.pageable.index, e.pageable.size);
1522
1565
  }
1523
1566
  }
1524
- const x = (() => {
1567
+ const w = (() => {
1525
1568
  switch (!0) {
1526
1569
  case typeof e.pageable == "string":
1527
1570
  return e.pageable;
@@ -1532,215 +1575,206 @@ const cr = /* @__PURE__ */ B({
1532
1575
  }
1533
1576
  })();
1534
1577
  function j() {
1535
- const c = e.columns.find((g) => !!g.sortable);
1536
- if (c || e.sortable)
1537
- return new Z({
1578
+ const h = e.columns.find((b) => !!b.sortable);
1579
+ if (h || e.sortable)
1580
+ return new te({
1538
1581
  ...e.sortable || {},
1539
- ...c ? {
1540
- [c.key]: c.sortable
1582
+ ...h ? {
1583
+ [h.key]: h.sortable
1541
1584
  } : {}
1542
1585
  });
1543
1586
  }
1544
- function v(c) {
1587
+ function x(h) {
1545
1588
  const {
1546
- exportExcel: g
1547
- } = pt();
1548
- g((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));
1589
+ exportExcel: b
1590
+ } = cn();
1591
+ b(h?.columns || e.columns, h?.source || l.value, h?.filename || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1549
1592
  }
1550
- function y(c) {
1551
- let g;
1593
+ function p(h) {
1594
+ let b;
1552
1595
  switch (!0) {
1553
- case !!(c != null && c.key):
1554
- g = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1596
+ case !!h?.key:
1597
+ b = l.value.find((O) => O[e.rowKey] === h?.key);
1555
1598
  break;
1556
- case !!(c != null && c.record):
1557
- g = c == null ? void 0 : c.record;
1599
+ case !!h?.record:
1600
+ b = h?.record;
1558
1601
  break;
1559
1602
  }
1560
- if (!g)
1603
+ if (!b)
1561
1604
  throw new Error("未找到需要预览的数据");
1562
- return n.value.open(nr, {
1563
- record: g,
1605
+ return r.value.open(wn, {
1606
+ record: b,
1564
1607
  columns: e.columns
1565
1608
  }, {
1566
- title: (c == null ? void 0 : c.title) || "详情",
1567
- mode: (c == null ? void 0 : c.mode) || "dialog"
1609
+ title: h?.title || "详情",
1610
+ mode: h?.mode || "dialog"
1568
1611
  });
1569
1612
  }
1570
- function C(c) {
1571
- let g;
1613
+ function g(h) {
1614
+ let b;
1572
1615
  switch (!0) {
1573
- case !!(c != null && c.key):
1574
- g = i.value.find((_) => _[e.rowKey] === (c == null ? void 0 : c.key));
1616
+ case !!h?.key:
1617
+ b = l.value.find((O) => O[e.rowKey] === h?.key);
1575
1618
  break;
1576
- case !!(c != null && c.record):
1577
- g = c == null ? void 0 : c.record;
1619
+ case !!h?.record:
1620
+ b = h?.record;
1578
1621
  break;
1579
1622
  }
1580
- if (!g)
1623
+ if (!b)
1581
1624
  throw new Error("未找到需要编辑的数据");
1582
- return n.value.open(dr, {
1583
- value: g,
1584
- form: c == null ? void 0 : c.form,
1585
- onSubmit: c.onSubmit
1625
+ return r.value.open(yn, {
1626
+ value: b,
1627
+ form: h?.form,
1628
+ onSubmit: h.onSubmit
1586
1629
  }, {
1587
- title: (c == null ? void 0 : c.title) || "编辑",
1588
- mode: (c == null ? void 0 : c.mode) || "dialog",
1630
+ title: h?.title || "编辑",
1631
+ mode: h?.mode || "dialog",
1589
1632
  footer: !0,
1590
1633
  form: "form"
1591
1634
  });
1592
1635
  }
1593
- function M(c) {
1594
- var p, ee;
1636
+ function C(h) {
1595
1637
  if (!e.dataLoad)
1596
- return Promise.reject();
1597
- c != null && c.reset && (m && m.reset(), h && h.reset(), (p = u.value) == null || p.resetSorters());
1598
- const g = {
1599
- ...((ee = a.value) == null ? void 0 : ee.formSource) || {}
1638
+ return Promise.reject(new Error("dataLoad is required"));
1639
+ h?.reset && (f && f.reset(), v && v.reset(), i.value?.resetSorters());
1640
+ const b = {
1641
+ ...o.value?.formSource || {}
1600
1642
  };
1601
- Object.keys(g).forEach((te) => {
1602
- [null, void 0, ""].includes(g[te]) && delete g[te];
1643
+ Object.keys(b).forEach((ie) => {
1644
+ [null, void 0, ""].includes(b[ie]) && delete b[ie];
1603
1645
  });
1604
- const _ = e.dataLoad({
1605
- form: g,
1606
- page: m,
1607
- sort: h,
1608
- update: o
1646
+ const O = e.dataLoad({
1647
+ form: b,
1648
+ page: f,
1649
+ sort: v,
1650
+ update: c
1609
1651
  });
1610
- return Y(_) ? (d.value = !0, Promise.resolve(_).finally(() => {
1611
- d.value = !1;
1612
- }), _) : Promise.resolve();
1652
+ return B(O) ? (s.value = !0, Promise.resolve(O).finally(() => {
1653
+ s.value = !1;
1654
+ }), O) : Promise.resolve();
1613
1655
  }
1614
- function ye() {
1615
- n.value.open(cr, {
1616
- collapsedColumns: w.value
1656
+ function we() {
1657
+ r.value.open(hn, {
1658
+ collapsedColumns: d.value
1617
1659
  }, {
1618
1660
  title: "显示列",
1619
1661
  size: "small",
1620
1662
  footer: !0
1621
- }).then((c) => {
1622
- w.value = c;
1663
+ }).then((h) => {
1664
+ d.value = h;
1623
1665
  });
1624
1666
  }
1625
- const ge = (c, {
1626
- type: g
1667
+ const xe = (h, {
1668
+ type: b
1627
1669
  }) => {
1628
- switch (g) {
1629
- case "drag": {
1630
- o(c), t.emit("change", c);
1631
- break;
1632
- }
1633
- }
1634
- }, R = rt({
1635
- reload: M,
1636
- preview: y,
1637
- export: v,
1638
- edit: C,
1639
- collapse: ye
1670
+ b === "drag" && (c(h), t.emit("change", h));
1671
+ }, L = ot({
1672
+ reload: C,
1673
+ preview: p,
1674
+ export: x,
1675
+ edit: g,
1676
+ collapse: we
1640
1677
  });
1641
- function be(c, g) {
1642
- !h || x === "client" || (g ? h.update(c, g === "descend" ? "desc" : "asc") : h.remove(c), R("reload"));
1678
+ function Ce(h, b) {
1679
+ !v || w === "client" || (b ? v.update(h, b === "descend" ? "desc" : "asc") : v.remove(h), L("reload"));
1643
1680
  }
1644
- const J = b(de({
1681
+ const ne = k(me({
1645
1682
  columns: e.columns,
1646
1683
  columnsOptions: e.columnsOptions,
1647
1684
  columnsGroups: e.columnsGroups,
1648
- pageMode: x,
1649
- collapsedColumns: w,
1650
- events: R
1651
- })), z = {
1652
- tableEvents: R,
1653
- tableForm: s,
1654
- tableSource: i,
1655
- formInstance: a,
1656
- pageService: m,
1685
+ pageMode: w,
1686
+ collapsedColumns: d,
1687
+ events: L
1688
+ })), Y = {
1689
+ tableEvents: L,
1690
+ tableForm: m,
1691
+ tableSource: l,
1692
+ formInstance: o,
1693
+ pageService: f,
1657
1694
  formOptions: e.formOptions
1658
- }, we = lr(e, t, z), ve = ar(e, t, z), Ce = ir(e, t, z), {
1659
- selectedRowKeys: Q,
1660
- rowSelection: X,
1661
- onSelect: ke,
1662
- onSelectAll: xe,
1663
- reloadSelection: Se,
1664
- resetSelection: Me
1665
- } = ur(e, t, z), Te = L(() => ({
1695
+ }, ke = pn(e, t, Y), Se = mn(e, t, Y), Me = bn(e, t, Y), {
1696
+ selectedRowKeys: re,
1697
+ rowSelection: oe,
1698
+ onSelect: Te,
1699
+ onSelectAll: $e,
1700
+ reloadSelection: _e,
1701
+ resetSelection: Oe
1702
+ } = gn(e, t, Y), je = _(() => ({
1666
1703
  rowKey: e.rowKey,
1667
1704
  size: e.size,
1668
1705
  bordered: e.bordered,
1669
1706
  hoverable: e.hoverable,
1670
1707
  stripe: e.stripe,
1671
1708
  scroll: {
1672
- x: e.columns.reduce((c, g) => c += typeof g.width != "number" ? Math.max(g.title.length * 16, 80) : g.width, 0),
1709
+ x: e.columns.reduce((h, b) => h += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1673
1710
  y: e.height ?? "100%"
1674
1711
  },
1675
- rowSelection: X,
1712
+ rowSelection: oe,
1676
1713
  draggable: e.draggable ? {
1677
1714
  type: "handle",
1678
1715
  width: 40
1679
1716
  } : void 0,
1680
1717
  pagination: e.pageable === void 0 || e.pageable === "client",
1681
- selectedKeys: Q.value,
1718
+ selectedKeys: re.value,
1682
1719
  expandable: e.expandable,
1683
1720
  virtualListProps: e.virtualList ? {
1684
1721
  height: e.height
1685
1722
  } : void 0
1686
1723
  }));
1687
- function _e() {
1688
- J.value = de({
1724
+ function Le() {
1725
+ ne.value = me({
1689
1726
  columns: e.columns,
1690
1727
  columnsOptions: e.columnsOptions,
1691
1728
  columnsGroups: e.columnsGroups,
1692
- pageMode: x,
1693
- collapsedColumns: w,
1694
- events: R
1729
+ pageMode: w,
1730
+ collapsedColumns: d,
1731
+ events: L
1695
1732
  });
1696
1733
  }
1697
- return A(() => {
1698
- l.value && (l.value.id = `table-${r}`), e.autoLoad && M(), e.grabbable && l.value && tr(l.value);
1734
+ return E(() => {
1735
+ a.value && (a.value.id = `table-${n}`), e.autoLoad && C(), e.grabbable && a.value && fn(a.value);
1699
1736
  }), {
1700
- tableId: r,
1701
- tableInstance: u,
1702
- tableSource: i,
1703
- tableOptions: Te,
1704
- tableColumns: J,
1705
- tableEvents: R,
1706
- tableForm: s,
1707
- tableLoading: d,
1708
- modalInstance: n,
1709
- tableRenderElement: l,
1710
- formSource: se(L(() => {
1711
- var c;
1712
- return (c = a == null ? void 0 : a.value) == null ? void 0 : c.formSource;
1713
- })),
1714
- formInstance: a,
1715
- reload: M,
1716
- preview: y,
1717
- edit: C,
1718
- export: v,
1719
- onSorterChange: be,
1720
- onTableChange: ge,
1737
+ tableId: n,
1738
+ tableInstance: i,
1739
+ tableSource: l,
1740
+ tableOptions: je,
1741
+ tableColumns: ne,
1742
+ tableEvents: L,
1743
+ tableForm: m,
1744
+ tableLoading: s,
1745
+ modalInstance: r,
1746
+ tableRenderElement: a,
1747
+ formSource: U(_(() => o?.value?.formSource)),
1748
+ formInstance: o,
1749
+ reload: C,
1750
+ preview: p,
1751
+ edit: g,
1752
+ export: x,
1753
+ onSorterChange: Ce,
1754
+ onTableChange: xe,
1721
1755
  renders: {
1722
- renderTableForm: we,
1723
- renderTableActions: ve,
1724
- renderTablePagination: Ce
1756
+ renderTableForm: ke,
1757
+ renderTableActions: Se,
1758
+ renderTablePagination: Me
1725
1759
  },
1726
1760
  tableSelection: {
1727
- selectedRowKeys: Q,
1728
- rowSelection: X,
1729
- onSelect: ke,
1730
- onSelectAll: xe
1761
+ selectedRowKeys: re,
1762
+ rowSelection: oe,
1763
+ onSelect: Te,
1764
+ onSelectAll: $e
1731
1765
  },
1732
- resetSelection: Me,
1733
- reloadSelection: Se,
1734
- reloadColumns: _e
1766
+ resetSelection: Oe,
1767
+ reloadSelection: _e,
1768
+ reloadColumns: Le
1735
1769
  };
1736
1770
  },
1737
1771
  render() {
1738
1772
  this.reloadColumns();
1739
- const e = () => f("div", {
1773
+ const e = () => u("div", {
1740
1774
  class: "table-body"
1741
- }, [f("div", {
1775
+ }, [u("div", {
1742
1776
  class: "table-body-wrapper"
1743
- }, [f(Ze, fe({
1777
+ }, [u(et, pe({
1744
1778
  loading: this.tableLoading,
1745
1779
  data: this.tableSource,
1746
1780
  columns: this.tableColumns,
@@ -1753,38 +1787,31 @@ const cr = /* @__PURE__ */ B({
1753
1787
  selectedKeys: this.tableSelection.selectedRowKeys.value,
1754
1788
  "onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
1755
1789
  }, this.tableOptions), null)])]);
1756
- return f("div", {
1790
+ return u("div", {
1757
1791
  class: {
1758
1792
  "table-render": !0,
1759
1793
  "auto-fill": this.autoFill
1760
1794
  },
1761
1795
  ref: (t) => this.tableRenderElement = t
1762
- }, [f(Qe, {
1796
+ }, [u(nt, {
1763
1797
  ref: (t) => this.modalInstance = t
1764
1798
  }, {
1765
- default: () => [f("div", {
1799
+ default: () => [u("div", {
1766
1800
  class: "table-render-content"
1767
1801
  }, [this.renders.renderTableForm(), this.renders.renderTableActions(), this.$slots.header && this.$slots.header(), ["all", "top"].includes(this.$props.pagePosition) && this.renders.renderTablePagination(), e(), ["all", "bottom"].includes(this.$props.pagePosition) && this.renders.renderTablePagination()])]
1768
1802
  })]);
1769
1803
  }
1770
- });
1771
- function wr(e) {
1772
- return e;
1773
- }
1774
- function vr(e) {
1775
- return e;
1776
- }
1777
- const Cr = {
1804
+ }), jn = {
1778
1805
  install(e, t) {
1779
- e.component("TableRender", sr);
1806
+ e.component("TableRender", xn);
1780
1807
  }
1781
1808
  };
1782
1809
  export {
1783
- sr as TableRender,
1784
- Sr as TableRenderResolver,
1785
- Cr as default,
1786
- wr as defineColumns,
1787
- vr as defineTableLoad,
1788
- rt as useEvents,
1789
- br as useTable
1810
+ xn as TableRender,
1811
+ Pn as TableRenderResolver,
1812
+ jn as default,
1813
+ $n as defineColumns,
1814
+ _n as defineTableLoad,
1815
+ ot as useEvents,
1816
+ On as useTable
1790
1817
  };