@gopowerteam/table-render 0.0.174 → 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 +1117 -1089
  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,689 +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 g, 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 = g([]), r = (a) => {
17
- const n = e.filter((l) => l.formatter);
18
- return n.length > 0 ? a.map((l) => (n.forEach((i) => {
19
- i.formatter && 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 gr(e) {
34
- const t = H(), r = g();
35
- function u() {
36
- var n, l;
37
- const a = (l = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$refs) == null ? void 0 : l[e];
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 bt = {
257
+ const xt = {
313
258
  size: 30
314
259
  };
315
- function gt(e) {
260
+ function Ct(e) {
316
261
  return e = {
317
- ...bt,
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`,
289
+ margin: "auto"
344
290
  }
345
- }, [f(He, {
346
- preview: e == null ? void 0 : e.preview,
291
+ }, [u(Ne, {
292
+ preview: e?.preview,
347
293
  width: "100%",
348
294
  height: "100%",
349
295
  fit: "contain",
350
- src: o,
296
+ src: c,
351
297
  alt: "image",
352
- style: l
353
- }, null)]) : f(I, null, null);
298
+ style: a
299
+ }, null)]) : u(G, null, null);
354
300
  }
355
301
  });
356
302
  }
357
- function K(e) {
358
- return Re() ? (qe(e), !0) : !1;
303
+ function kt(e, t) {
304
+ return he() ? (Ee(e, t), !0) : !1;
359
305
  }
360
- function O(e) {
361
- return typeof e == "function" ? e() : Pe(e);
362
- }
363
- 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";
364
312
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
365
- const wt = Object.prototype.toString, vt = (e) => wt.call(e) === "[object Object]", Ct = () => {
366
- };
367
- function kt(e) {
313
+ const Mt = Object.prototype.toString, Tt = (e) => Mt.call(e) === "[object Object]";
314
+ function $t(e) {
368
315
  let t;
369
- function r() {
316
+ function n() {
370
317
  return t || (t = e()), t;
371
318
  }
372
- return r.reset = async () => {
373
- const u = t;
374
- t = void 0, u && await u;
375
- }, r;
319
+ return n.reset = async () => {
320
+ const i = t;
321
+ t = void 0, i && await i;
322
+ }, n;
376
323
  }
377
- function xt(e, t) {
378
- var r;
379
- if (typeof e == "number")
380
- return e + t;
381
- const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", a = e.slice(u.length), n = Number.parseFloat(u) + t;
382
- 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);
383
341
  }
384
- function St(e, t, r = {}) {
342
+ function Lt(e, t, n = {}) {
385
343
  const {
386
- immediate: u = !0
387
- } = r, a = g(!1);
388
- let n = null;
344
+ immediate: i = !0,
345
+ immediateCallback: o = !1
346
+ } = n, r = M(!1);
347
+ let a;
389
348
  function l() {
390
- n && (clearTimeout(n), n = null);
349
+ a && (clearTimeout(a), a = void 0);
391
350
  }
392
- function i() {
393
- a.value = !1, l();
351
+ function c() {
352
+ r.value = !1, l();
394
353
  }
395
- function o(...d) {
396
- l(), a.value = !0, n = setTimeout(() => {
397
- a.value = !1, n = null, e(...d);
398
- }, 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));
399
358
  }
400
- return u && (a.value = !0, W && o()), K(i), {
401
- isPending: se(a),
402
- start: o,
403
- stop: i
359
+ return i && (r.value = !0, Z && s()), kt(c), {
360
+ isPending: qe(r),
361
+ start: s,
362
+ stop: c
404
363
  };
405
364
  }
406
- 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) {
407
373
  var t;
408
- const r = O(e);
409
- return (t = r == null ? void 0 : r.$el) != null ? t : r;
410
- }
411
- const N = W ? window : void 0, me = W ? window.navigator : void 0;
412
- function he(...e) {
413
- let t, r, u, a;
414
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, u, a] = e, t = N) : [t, r, u, a] = e, !t)
415
- return Ct;
416
- Array.isArray(r) || (r = [r]), Array.isArray(u) || (u = [u]);
417
- const n = [], l = () => {
418
- n.forEach((s) => s()), n.length = 0;
419
- }, i = (s, m, h, w) => (s.addEventListener(m, h, w), () => s.removeEventListener(m, h, w)), o = Ee(
420
- () => [Mt(t), O(a)],
421
- ([s, m]) => {
422
- if (l(), !s)
423
- return;
424
- const h = vt(m) ? { ...m } : m;
425
- n.push(
426
- ...r.flatMap((w) => u.map((S) => i(s, w, S, h)))
427
- );
428
- },
429
- { immediate: !0, flush: "post" }
430
- ), d = () => {
431
- o(), l();
432
- };
433
- return K(d), d;
374
+ const n = T(e);
375
+ return (t = n?.$el) !== null && t !== void 0 ? t : n;
434
376
  }
435
- function Tt() {
436
- const e = g(!1), t = H();
437
- 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(() => {
438
401
  e.value = !0;
439
402
  }, t), e;
440
403
  }
441
- function U(e) {
442
- const t = Tt();
443
- return L(() => (t.value, !!e()));
404
+ // @__NO_SIDE_EFFECTS__
405
+ function X(e) {
406
+ const t = /* @__PURE__ */ qt();
407
+ return _(() => (t.value, !!e()));
444
408
  }
445
- function q(e, t = {}) {
446
- const { window: r = N } = t, u = U(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
447
- let a;
448
- const n = g(!1), l = (d) => {
449
- n.value = d.matches;
450
- }, i = () => {
451
- a && ("removeEventListener" in a ? a.removeEventListener("change", l) : a.removeListener(l));
452
- }, o = ze(() => {
453
- u.value && (i(), a = r.matchMedia(O(e)), "addEventListener" in a ? a.addEventListener("change", l) : a.addListener(l), n.value = a.matches);
454
- });
455
- return K(() => {
456
- o(), i(), a = void 0;
457
- }), 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;
458
414
  }
459
- function _t(e, t = {}) {
460
- function r(s, m) {
461
- let h = O(e[O(s)]);
462
- 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;
463
441
  }
464
- const { window: u = N, strategy: a = "min-width" } = t;
465
- function n(s) {
466
- 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;
467
452
  }
468
- 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, {
469
- 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),
470
455
  enumerable: !0,
471
456
  configurable: !0
472
- }), s), {});
473
- function d() {
474
- const s = Object.keys(e).map((m) => [m, l(m)]);
475
- 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));
476
461
  }
477
- return Object.assign(o, {
478
- greaterOrEqual: l,
479
- smallerOrEqual: i,
480
- greater(s) {
481
- 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);
482
467
  },
483
- smaller(s) {
484
- return q(() => `(max-width: ${r(s, -0.1)})`, t);
468
+ smaller(d) {
469
+ return R(() => `(max-width: ${n(d, -0.1)})`, t);
485
470
  },
486
- between(s, m) {
487
- 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);
488
473
  },
489
- isGreater(s) {
490
- return n(`(min-width: ${r(s, 0.1)})`);
474
+ isGreater(d) {
475
+ return c("min", n(d, 0.1));
491
476
  },
492
- isGreaterOrEqual(s) {
493
- return n(`(min-width: ${r(s)})`);
477
+ isGreaterOrEqual(d) {
478
+ return c("min", n(d));
494
479
  },
495
- isSmaller(s) {
496
- return n(`(max-width: ${r(s, -0.1)})`);
480
+ isSmaller(d) {
481
+ return c("max", n(d, -0.1));
497
482
  },
498
- isSmallerOrEqual(s) {
499
- return n(`(max-width: ${r(s)})`);
483
+ isSmallerOrEqual(d) {
484
+ return c("max", n(d));
500
485
  },
501
- isInBetween(s, m) {
502
- 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));
503
488
  },
504
- current: d,
489
+ current: v,
505
490
  active() {
506
- const s = d();
507
- 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));
508
493
  }
509
494
  });
510
495
  }
511
- function ue(e, t = {}) {
496
+ // @__NO_SIDE_EFFECTS__
497
+ function ce(e, t = {}) {
512
498
  const {
513
- controls: r = !1,
514
- navigator: u = me
515
- } = t, a = U(() => u && "permissions" in u);
516
- let n;
517
- const l = typeof e == "string" ? { name: e } : e, i = g(), o = () => {
518
- n && (i.value = n.state);
519
- }, d = kt(async () => {
520
- if (a.value) {
521
- if (!n)
522
- try {
523
- n = await u.permissions.query(l), he(n, "change", o), o();
524
- } catch {
525
- i.value = "prompt";
526
- }
527
- 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);
528
520
  }
529
521
  });
530
- return d(), r ? {
531
- state: i,
532
- isSupported: a,
533
- query: d
534
- } : i;
522
+ return s(), n ? {
523
+ state: l,
524
+ isSupported: o,
525
+ query: s
526
+ } : l;
535
527
  }
536
- function $t(e = {}) {
528
+ function Yt(e = {}) {
537
529
  const {
538
- navigator: t = me,
539
- read: r = !1,
540
- source: u,
541
- copiedDuring: a = 1500,
542
- legacy: n = !1
543
- } = e, l = U(() => t && "clipboard" in t), i = ue("clipboard-read"), o = ue("clipboard-write"), d = L(() => l.value || n), s = g(""), m = g(!1), h = St(() => m.value = !1, a);
544
- function w() {
545
- l.value && v(i.value) ? t.clipboard.readText().then((y) => {
546
- s.value = y;
547
- }) : 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());
548
546
  }
549
- d.value && r && he(["copy", "cut"], w);
550
- async function S(y = O(u)) {
551
- 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
+ }
552
560
  }
553
- function x(y) {
554
- const C = document.createElement("textarea");
555
- 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();
556
564
  }
557
565
  function j() {
558
- var y, C, M;
559
- 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 : "";
560
568
  }
561
- function v(y) {
562
- return y === "granted" || y === "prompt";
569
+ function x(p) {
570
+ return p === "granted" || p === "prompt";
563
571
  }
564
572
  return {
565
- isSupported: d,
566
- text: s,
567
- copied: m,
568
- copy: S
573
+ isSupported: s,
574
+ text: U(m),
575
+ copied: U(f),
576
+ copy: y
569
577
  };
570
578
  }
571
- const Ot = " ";
572
- function Lt(e) {
573
- 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");
574
582
  }
575
- function ie(e, t) {
576
- 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, "*");
577
585
  }
578
- function jt(e) {
579
- const t = $t();
580
- return k("phone", (u, a) => {
581
- 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);
582
- function h() {
583
- window.focus(), t.copy(i).then(() => {
584
- 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({
585
593
  content: "复制成功",
586
594
  duration: 1e3
587
595
  });
588
596
  });
589
597
  }
590
- function w() {
591
- const v = document.querySelectorAll(`.${l}.content`);
592
- v.length > 0 && v.forEach((y) => {
593
- const C = y;
594
- 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("****"))
595
603
  return;
596
- C.innerText = C.dataset.encrypt;
597
- const M = C.nextSibling;
598
- !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>`);
599
607
  });
600
608
  }
601
- function S(v) {
602
- const y = document.querySelector(`#${n}>.preview-icon`);
603
- 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>`);
604
612
  }
605
- function x() {
606
- const v = document.querySelector(`#${n}>.content`), y = !!(v != null && v.innerHTML.includes("****"));
607
- 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);
608
616
  }
609
617
  function j() {
610
- e != null && e.onDial ? e.onDial(i) : window.open(`tel:${i}`, "_blank");
618
+ e?.onDial ? e.onDial(l) : window.open(`tel:${l}`, "_blank");
611
619
  }
612
- return f("div", {
613
- id: n,
620
+ return u("div", {
621
+ id: r,
614
622
  style: "display:flex;align-items:center;gap:4px;"
615
- }, [f("div", {
616
- "data-encrypt": s,
617
- class: `${l} content`,
623
+ }, [u("div", {
624
+ "data-encrypt": m,
625
+ class: `${a} content`,
618
626
  style: "use-select:none;font-family: monospace;cursor:pointer;font-variant-numeric: tabular-nums;padding-right: 2px;"
619
- }, [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", {
620
628
  class: "preview-icon",
621
629
  title: "显示完整号码",
622
- style: d,
623
- onClick: x
624
- }, [f("svg", {
625
- width: o,
626
- height: o,
630
+ style: s,
631
+ onClick: w
632
+ }, [u("svg", {
633
+ width: c,
634
+ height: c,
627
635
  viewBox: "0 0 48 48",
628
636
  fill: "none",
629
637
  xmlns: "http://www.w3.org/2000/svg"
630
- }, [f("path", {
638
+ }, [u("path", {
631
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",
632
640
  fill: "none",
633
641
  stroke: "#333",
634
642
  "stroke-width": "2",
635
643
  "stroke-linejoin": "round"
636
- }, null), f("path", {
644
+ }, null), u("path", {
637
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",
638
646
  fill: "none",
639
647
  stroke: "#333",
640
648
  "stroke-width": "4",
641
649
  "stroke-linejoin": "round"
642
- }, null)])]), (e == null ? void 0 : e.allowDial) && f("i", {
643
- style: d,
650
+ }, null)])]), e?.allowDial && u("i", {
651
+ style: s,
644
652
  title: "拨出号码",
645
653
  onClick: j
646
- }, [f("svg", {
647
- width: o,
648
- height: o,
654
+ }, [u("svg", {
655
+ width: c,
656
+ height: c,
649
657
  viewBox: "0 0 48 48",
650
658
  fill: "none",
651
659
  xmlns: "http://www.w3.org/2000/svg"
652
- }, [f("path", {
660
+ }, [u("path", {
653
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",
654
662
  stroke: "#333",
655
663
  "stroke-width": "2",
656
664
  "stroke-linecap": "round",
657
665
  "stroke-linejoin": "round"
658
- }, null), f("path", {
666
+ }, null), u("path", {
659
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",
660
668
  stroke: "#333",
661
669
  "stroke-width": "4",
662
670
  "stroke-linecap": "round",
663
671
  "stroke-linejoin": "round"
664
- }, null), f("path", {
672
+ }, null), u("path", {
665
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",
666
674
  fill: "none",
667
675
  stroke: "#333",
668
676
  "stroke-width": "4",
669
677
  "stroke-linejoin": "round"
670
- }, null)])]), (e == null ? void 0 : e.allowCopy) && f("i", {
671
- style: d,
678
+ }, null)])]), e?.allowCopy && u("i", {
679
+ style: s,
672
680
  title: "复制号码",
673
- onClick: h
674
- }, [f("svg", {
675
- width: o,
676
- height: o,
681
+ onClick: v
682
+ }, [u("svg", {
683
+ width: c,
684
+ height: c,
677
685
  viewBox: "0 0 48 48",
678
686
  fill: "none",
679
687
  xmlns: "http://www.w3.org/2000/svg"
680
- }, [f("path", {
688
+ }, [u("path", {
681
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",
682
690
  stroke: "#333",
683
691
  "stroke-width": "2",
684
692
  "stroke-linecap": "round",
685
693
  "stroke-linejoin": "round"
686
- }, null), f("path", {
694
+ }, null), u("path", {
687
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",
688
696
  fill: "none",
689
697
  stroke: "#333",
@@ -692,183 +700,178 @@ function jt(e) {
692
700
  }, null)])])]);
693
701
  });
694
702
  }
695
- function Rt(e) {
696
- 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
+ });
697
715
  }
698
- function qt(e) {
699
- return k("tag", (r, u) => {
700
- 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;
701
- 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", {
702
737
  style: {
703
738
  display: "flex",
704
739
  flexWrap: "wrap"
705
740
  }
706
- }, [n.slice(0, a).map((s, m) => {
707
- const h = typeof l == "function" ? l(s, m) : l[m % l.length], w = typeof i == "function" ? i(s, m) : i[m % i.length];
708
- 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", {
709
744
  style: {
710
- minWidth: d ? `${d}px` : "unset",
745
+ minWidth: s ? `${s}px` : "unset",
711
746
  textAlign: "center",
712
747
  margin: "2px",
713
748
  padding: "2px 5px",
714
- border: `solid 2px ${e != null && e.border ? h : "transparent"}`,
715
- borderRadius: `${(e == null ? void 0 : e.radius) || 0}px`,
716
- color: h,
717
- backgroundColor: w
749
+ border: `solid 2px ${e?.border ? v : "transparent"}`,
750
+ borderRadius: `${e?.radius || 0}px`,
751
+ color: v,
752
+ backgroundColor: d
718
753
  }
719
- }, [s]);
720
- }), o && "..."]);
754
+ }, [m]);
755
+ }), c && "..."]);
721
756
  });
722
757
  }
723
- function ce(e) {
758
+ function fe(e) {
724
759
  if (typeof e == "string")
725
760
  return e;
726
761
  if (typeof e == "number")
727
762
  return `${e}px`;
728
763
  }
729
- function Pt(e, t, r) {
730
- var u, a;
731
- 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);
732
766
  }
733
- function zt(e, t) {
767
+ function Kt(e, t) {
734
768
  if (typeof e != "function") {
735
- if (typeof (e == null ? void 0 : e.color) == "function")
736
- return e == null ? void 0 : e.color(t);
737
- if (typeof (e == null ? void 0 : e.color) == "string")
738
- 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;
739
773
  }
740
774
  }
741
- function Et(e, t) {
775
+ function Nt(e, t) {
742
776
  if (typeof e != "function")
743
- return typeof (e == null ? void 0 : e.size) == "function" ? ce(e == null ? void 0 : e.size(t)) : ce(e == null ? void 0 : e.size);
744
- }
745
- function Yt(e, t) {
746
- let r = "";
747
- const u = zt(e, t), a = Et(e, t);
748
- return u && (r += `color:${u};`), a && (r += `font-size:${a};`), r;
749
- }
750
- function At(e) {
751
- return k("text", (r, u) => {
752
- const a = Pt(e || {}, u, r), n = Yt(e || {}, r);
753
- return f("span", {
754
- style: n
755
- }, [a]);
756
- });
757
- }
758
- function Bt(e) {
759
- 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";
760
- return k("progress", (l, i) => {
761
- var h;
762
- 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)}%` : "";
763
- return f("div", {
764
- style: `background-color:${t};position:relative;min-height: 20px;text-align: center;border-radius: 2px;overflow:hidden;`
765
- }, [f("div", {
766
- style: `background-color: ${r};position:absolute;left:0;top:0;right;0;width: ${m};height: 100%;`
767
- }, null), u && f("div", {
768
- style: `position:absolute;inset:0;display:flex;justify-content:center;align-items:center;color:${a}`
769
- }, [m])]);
770
- });
777
+ return typeof e?.size == "function" ? fe(e?.size(t)) : fe(e?.size);
771
778
  }
772
- function Dt(e) {
773
- return k("serial", (r, u, a) => {
774
- const n = {
775
- color: typeof (e == null ? void 0 : e.color) == "function" ? e.color(r) : e == null ? void 0 : e.color,
776
- fontWeight: (e == null ? void 0 : e.weight) || "normal",
777
- textAlign: "center"
778
- };
779
- return f("div", {
780
- style: n
781
- }, [a.rowIndex + 1]);
782
- }, {
783
- 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]);
784
790
  });
785
791
  }
786
- function Vt() {
792
+ function Zt() {
787
793
  return {
788
- dropdown: yt,
789
- text: At,
790
- dict: ht,
791
- tag: qt,
792
- render: Rt,
793
- phone: jt,
794
- image: gt,
795
- currency: ut,
796
- date: st,
797
- button: at,
798
- progress: Bt,
799
- 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
800
806
  };
801
807
  }
802
- function G(e, t) {
803
- if (!(e != null && e.render))
808
+ function ee(e, t) {
809
+ if (!e?.render)
804
810
  return;
805
- const r = e.render({
806
- ...Vt()
811
+ const n = e.render({
812
+ ...Zt()
807
813
  // ...(Table?.$override?.table || {}),
808
814
  });
809
815
  return {
810
816
  render: ({
811
- record: u,
812
- rowIndex: a
813
- }) => r(u, e, {
817
+ record: i,
818
+ rowIndex: o
819
+ }) => n(i, e, {
814
820
  ...t || {},
815
- rowIndex: a
821
+ rowIndex: o
816
822
  }),
817
- [nt]: r.$type,
818
- disableColumnMode: r.$disableColumnMode,
819
- disableViewMode: r.$disableViewMode,
820
- isRender: r.$type === "render",
821
- type: r.$type
823
+ [it]: n.$type,
824
+ disableColumnMode: n.$disableColumnMode,
825
+ disableViewMode: n.$disableViewMode,
826
+ isRender: n.$type === "render",
827
+ type: n.$type
822
828
  };
823
829
  }
824
- function de({
830
+ function me({
825
831
  columns: e,
826
832
  columnsOptions: t,
827
- columnsGroups: r,
828
- pageMode: u,
829
- collapsedColumns: a,
830
- events: n
833
+ columnsGroups: n,
834
+ pageMode: i,
835
+ collapsedColumns: o,
836
+ events: r
831
837
  }) {
832
- const l = e.map((i) => ({
838
+ const a = e.map((l) => ({
833
839
  ...t || {},
834
- ...i
835
- })).map((i) => It(i, u, a, n)).filter(Boolean);
836
- return Ht(l, r);
837
- }
838
- function Ft(e, t) {
839
- const r = [], u = (n) => {
840
- if ("children" in n && (n.children = n.children.map(u)), "key" in n) {
841
- const l = t.find((i) => {
842
- var o;
843
- return ((o = Object.getOwnPropertyDescriptor(i, "key")) == null ? void 0 : o.value) === n.key;
844
- });
845
- if (l)
846
- 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;
847
850
  }
848
- return n;
849
- }, a = u(e);
850
- if (r != null && r.length && a) {
851
- const n = Math.min(...r.map((l) => t.indexOf(l)));
852
- r.forEach((l) => {
853
- const i = t.indexOf(l);
854
- t.splice(i, 1);
855
- }), 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);
856
859
  }
857
860
  }
858
- function Ht(e, t = []) {
859
- return t.forEach((r) => {
860
- Ft(r, e);
861
+ function Qt(e, t = []) {
862
+ return t.forEach((n) => {
863
+ Jt(n, e);
861
864
  }), e;
862
865
  }
863
- function It(e, t, r, u) {
866
+ function Xt(e, t, n, i) {
864
867
  const {
865
- render: a,
866
- disableColumnMode: n
867
- } = G(e, {
868
+ render: o,
869
+ disableColumnMode: r
870
+ } = ee(e, {
868
871
  previewing: !1,
869
- emits: u
872
+ emits: i
870
873
  }) || {};
871
- 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))
872
875
  return {
873
876
  dataIndex: e.index || e.key,
874
877
  title: e.title,
@@ -884,13 +887,13 @@ function It(e, t, r, u) {
884
887
  tooltip: !0,
885
888
  ...e.extraProps,
886
889
  key: e.key,
887
- render: a
890
+ render: o
888
891
  };
889
892
  }
890
- function Kt() {
891
- return new Xe.Workbook();
893
+ function en() {
894
+ return new rt.Workbook();
892
895
  }
893
- function Wt(e, t = "Sheet1") {
896
+ function tn(e, t = "Sheet1") {
894
897
  return e.addWorksheet(t, {
895
898
  headerFooter: {
896
899
  firstHeader: "",
@@ -898,94 +901,164 @@ function Wt(e, t = "Sheet1") {
898
901
  }
899
902
  });
900
903
  }
901
- function Nt(e, t) {
904
+ function nn(e, t) {
902
905
  e.columns = t;
903
906
  }
904
- function Ut(e, t) {
907
+ function rn(e, t) {
905
908
  e.addRows(t);
906
909
  }
907
- async function Gt({
910
+ async function on({
908
911
  columns: e,
909
912
  rows: t,
910
- filename: r
913
+ filename: n
911
914
  }) {
912
- const u = Kt(), a = Wt(u);
913
- Nt(a, e), Ut(a, t);
914
- const n = await u.xlsx.writeBuffer(), l = new Blob([n]);
915
- Zt(l, r || `${V().format("YYYY-MM-DD HH:mm:ss")}.xlsx`);
916
- }
917
- function Zt(e, t) {
918
- const r = document.createElement("a");
919
- r.download = t || "download", r.href = URL.createObjectURL(e), r.click(), setTimeout(() => {
920
- 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);
921
924
  }, 1e3);
922
925
  }
923
- function Jt(e, t) {
924
- const r = {};
925
- return e.filter((a) => a.exportable !== !1).map((a) => ({
926
- options: a,
927
- render: G(a),
928
- content: typeof a.exportable == "object" ? a.exportable.content : void 0
929
- })).forEach((a) => {
930
- var i;
931
- const n = (i = a.render) == null ? void 0 : i.render, l = () => {
932
- 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 = () => {
933
934
  switch (!0) {
934
- case !!a.content:
935
- return a.content && a.content(t);
936
- case !!n: {
937
- 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({
938
939
  record: t
939
940
  }));
940
- return Ae(s, d), (o = s.el) == null ? void 0 : o.innerText;
941
+ return Fe(c, l), c.el?.textContent;
941
942
  }
942
943
  default:
943
- return T(t, a.options);
944
+ return $(t, o.options);
944
945
  }
945
946
  };
946
- r[a.options.key] = l();
947
- }), r;
947
+ n[o.options.key] = a();
948
+ }), n;
948
949
  }
949
- function Qt(e) {
950
+ function sn(e) {
950
951
  switch (!0) {
951
952
  case typeof e == "number":
952
953
  return e / 6;
953
954
  case (typeof e == "string" && e.endsWith("px")):
954
- return parseInt(e.replace("px", "")) / 6;
955
+ return Number.parseInt(e.replace("px", "")) / 6;
955
956
  default:
956
957
  return 30;
957
958
  }
958
959
  }
959
- function Xt(e, t, r) {
960
- const u = e.filter((n) => n.exportable !== !1).map((n) => {
961
- var l, i;
962
- return {
963
- key: n.key,
964
- header: ((l = n.exportable) == null ? void 0 : l.header) || n.title,
965
- width: ((i = n.exportable) == null ? void 0 : i.width) || Qt(n.width)
966
- };
967
- }), a = t.map((n) => Jt(e, n));
968
- Gt({
969
- columns: u,
970
- rows: a,
971
- 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
972
970
  });
973
971
  }
974
- function pt() {
972
+ function cn() {
975
973
  return {
976
- exportExcel: Xt
974
+ exportExcel: un
977
975
  };
978
976
  }
979
- 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 = {};
980
1061
  constructor(t) {
981
- $(this, "sort", {});
982
- $(this, "defaultSort", {});
983
- $(this, "before", (t) => {
984
- t.paramsQuery = {
985
- ...t.paramsQuery || {},
986
- sort: this.stringify(this.sort)
987
- };
988
- });
989
1062
  t && (this.sort = t, this.defaultSort = t);
990
1063
  }
991
1064
  /**
@@ -993,19 +1066,25 @@ class Z {
993
1066
  * @param key 排序关键字
994
1067
  * @param value 排序方式
995
1068
  */
996
- update(t, r) {
997
- t && r && (this.sort[t] = r);
1069
+ update(t, n) {
1070
+ t && n && (this.sort[t] = n);
998
1071
  }
999
1072
  /**
1000
1073
  * 移除排序项
1001
1074
  * @param key 排序关键字
1002
1075
  */
1003
1076
  remove(t) {
1004
- const r = Object.entries(this.sort).filter(([u]) => u !== t);
1005
- this.sort = {}, r && r.forEach(([u, a]) => {
1006
- 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;
1007
1080
  });
1008
1081
  }
1082
+ before = (t) => {
1083
+ t.paramsQuery = {
1084
+ ...t.paramsQuery || {},
1085
+ sort: this.stringify(this.sort)
1086
+ };
1087
+ };
1009
1088
  /**
1010
1089
  * 重置分页数据
1011
1090
  */
@@ -1016,122 +1095,17 @@ class Z {
1016
1095
  * 转换排序对象为字符串
1017
1096
  */
1018
1097
  stringify(t) {
1019
- 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}`));
1020
1099
  }
1021
1100
  }
1022
- const er = 300;
1023
- function tr(e) {
1024
- const t = e, r = t == null ? void 0 : t.querySelector(".arco-scrollbar-container.arco-table-body");
1025
- if (!r)
1026
- return;
1027
- let u, a = !1, n;
1028
- r.addEventListener("mousedown", () => {
1029
- u = setTimeout(() => {
1030
- u && (r.style.cursor = "grab", r.style.userSelect = "none", a = !0);
1031
- }, er);
1032
- }), r.addEventListener("mouseup", () => {
1033
- clearTimeout(u), u && (u = void 0, a = !1, r.style.cursor = "", r.style.userSelect = "", n = void 0);
1034
- }), r.addEventListener("mousemove", (l) => {
1035
- if (a)
1036
- if (n === void 0)
1037
- n = l.clientX;
1038
- else {
1039
- const i = n - l.clientX;
1040
- n = l.clientX, r.scrollLeft += i;
1041
- }
1042
- });
1043
- }
1044
- function rr(e) {
1045
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Be(e);
1046
- }
1047
- const nr = /* @__PURE__ */ B({
1048
- props: {
1049
- record: {
1050
- type: Object,
1051
- required: !0
1052
- },
1053
- columns: {
1054
- type: Array,
1055
- required: !0
1056
- },
1057
- minWidth: {
1058
- type: Number,
1059
- required: !1,
1060
- default: 320
1061
- },
1062
- border: {
1063
- type: Boolean,
1064
- default: !0
1065
- },
1066
- exclude: {
1067
- type: Array,
1068
- default: () => []
1069
- },
1070
- layout: {
1071
- type: String,
1072
- required: !1,
1073
- default: "horizontal"
1074
- },
1075
- buttons: {
1076
- type: Array,
1077
- default: () => []
1078
- }
1079
- },
1080
- setup(e) {
1081
- const t = H(), r = g(0), u = e.columns.filter((n) => typeof n.visiable == "boolean" ? n.visiable : typeof n.visiable == "function" ? n.visiable() : !0).map((n) => ({
1082
- options: n,
1083
- renderer: G(n, {
1084
- previewing: !0
1085
- })
1086
- })).filter(({
1087
- options: n
1088
- }) => {
1089
- var l;
1090
- return !((l = e.exclude) != null && l.includes(n.key));
1091
- }).filter(({
1092
- renderer: n
1093
- }) => !(n != null && n.disableViewMode));
1094
- function a() {
1095
- var n;
1096
- if (t) {
1097
- const l = (n = t.proxy) == null ? void 0 : n.$el;
1098
- r.value = Math.floor(l.offsetWidth / e.minWidth);
1099
- }
1100
- }
1101
- return A(() => {
1102
- a();
1103
- }), () => {
1104
- let n;
1105
- return f("div", {
1106
- class: "preview-container"
1107
- }, [f(Ke, {
1108
- column: r.value,
1109
- bordered: !0,
1110
- align: "left",
1111
- layout: e.layout
1112
- }, rr(n = u.map((l) => f(We, {
1113
- label: l.options.title
1114
- }, {
1115
- default: () => {
1116
- var i, o;
1117
- return [(i = l.renderer) != null && i.render ? (o = l.renderer) == null ? void 0 : o.render({
1118
- record: e.record
1119
- }) : T(e.record, l.options)];
1120
- }
1121
- }))) ? n : {
1122
- default: () => [n]
1123
- })]);
1124
- };
1125
- }
1126
- });
1127
- function ar(e, t, {
1128
- tableForm: r,
1129
- tableEvents: u
1101
+ function mn(e, t, {
1102
+ tableForm: n,
1103
+ tableEvents: i
1130
1104
  }) {
1131
- const a = e.refreshable || e.exportable || t.slots.actions, n = !!(r != null && r.length) && a;
1132
- 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, {
1133
1107
  margin: 0
1134
- }, null), a && f("div", {
1108
+ }, null), o && u("div", {
1135
1109
  class: "table-actions",
1136
1110
  style: {
1137
1111
  display: "flex",
@@ -1140,44 +1114,108 @@ function ar(e, t, {
1140
1114
  flexDirection: e.actionsPosition === "right" ? "row" : "row-reverse",
1141
1115
  alignItems: "center"
1142
1116
  }
1143
- }, [f("div", {
1117
+ }, [u("div", {
1144
1118
  class: "built-in"
1145
- }, [f(ae, null, {
1146
- default: () => [e.refreshable && f(P, {
1119
+ }, [u(le, null, {
1120
+ default: () => [e.refreshable && u(P, {
1147
1121
  type: "primary",
1148
- onClick: () => u("reload")
1122
+ onClick: () => i("reload")
1149
1123
  }, {
1150
- default: () => [E("刷新")]
1151
- }), e.exportable && f(P, {
1124
+ default: () => [A("刷新")]
1125
+ }), e.exportable && u(P, {
1152
1126
  type: "primary",
1153
- onClick: () => u("export")
1127
+ onClick: () => i("export")
1154
1128
  }, {
1155
- default: () => [E("导出")]
1156
- }), e.collapsable && f(P, {
1129
+ default: () => [A("导出")]
1130
+ }), e.collapsable && u(P, {
1157
1131
  type: "primary",
1158
- onClick: () => u("collapse")
1132
+ onClick: () => i("collapse")
1159
1133
  }, {
1160
- default: () => [E("显示")]
1134
+ default: () => [A("显示")]
1161
1135
  })]
1162
- })]), f("div", {
1136
+ })]), u("div", {
1163
1137
  class: "customs"
1164
- }, [f(ae, null, {
1138
+ }, [u(le, null, {
1165
1139
  default: () => [t.slots.actions && t.slots.actions()]
1166
1140
  })])])]) : () => {
1167
1141
  };
1168
1142
  }
1169
- function lr(e, t, {
1170
- tableForm: r,
1171
- tableEvents: u,
1172
- 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
1173
1211
  }) {
1174
- return r != null && r.length ? () => f("div", {
1212
+ return n?.length ? () => u("div", {
1175
1213
  class: "table-form"
1176
- }, [f(oe, fe({
1177
- form: r,
1178
- ref: (n) => a && (a.value = n),
1214
+ }, [u(be, pe({
1215
+ form: n,
1216
+ ref: (r) => o && (o.value = r),
1179
1217
  searchable: !0,
1180
- onSubmit: () => u("reload", {
1218
+ onSubmit: () => i("reload", {
1181
1219
  reset: !0
1182
1220
  })
1183
1221
  }, e.formOptions), {
@@ -1185,176 +1223,182 @@ function lr(e, t, {
1185
1223
  })]) : () => {
1186
1224
  };
1187
1225
  }
1188
- function ur(e, t, {
1189
- tableSource: r
1226
+ function bn(e, t, {
1227
+ pageService: n,
1228
+ tableEvents: i
1190
1229
  }) {
1191
- const u = g([]);
1192
- function a() {
1193
- 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"));
1194
1232
  }
1195
- function n() {
1196
- re(() => {
1197
- 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]]);
1198
1276
  });
1199
1277
  }
1200
- function l() {
1201
- const d = typeof e.selection == "string" ? {
1278
+ function a() {
1279
+ const s = typeof e.selection == "string" ? {
1202
1280
  type: e.selection
1203
1281
  } : e.selection;
1204
- switch (d == null ? void 0 : d.type) {
1282
+ switch (s?.type) {
1205
1283
  case "radio":
1206
1284
  return {
1207
1285
  title: "选择",
1208
1286
  width: 80,
1209
- selectedRowKeys: u.value,
1210
- ...d
1287
+ selectedRowKeys: i.value,
1288
+ ...s
1211
1289
  };
1212
1290
  case "checkbox":
1213
1291
  return {
1214
1292
  width: 80,
1215
1293
  showCheckedAll: !0,
1216
- selectedRowKeys: u.value,
1217
- ...d
1294
+ selectedRowKeys: i.value,
1295
+ ...s
1218
1296
  };
1219
1297
  }
1220
1298
  }
1221
- function i(d, s, m) {
1299
+ function l(s, m, f) {
1222
1300
  const {
1223
- type: h
1224
- } = l() || {};
1225
- switch (h) {
1301
+ type: v
1302
+ } = a() || {};
1303
+ switch (v) {
1226
1304
  case "radio":
1227
- 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);
1228
1306
  break;
1229
1307
  case "checkbox":
1230
- t.emit("update:checkbox-keys", d), t.emit("update:checkbox-rows", d.map((w) => {
1231
- var S;
1232
- return r.value.find((x) => x[e.rowKey] === w) || ((S = e.checkboxRows) == null ? void 0 : S.find((x) => x[e.rowKey] === w));
1233
- }));
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)));
1234
1309
  break;
1235
1310
  }
1236
1311
  }
1237
- function o() {
1238
- re(() => {
1239
- t.emit("update:checkbox-keys", u.value), t.emit("update:checkbox-rows", u.value.map((d) => {
1240
- var s;
1241
- return r.value.find((m) => m[e.rowKey] === d) || ((s = e.checkboxRows) == null ? void 0 : s.find((m) => m[e.rowKey] === d));
1242
- }));
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)));
1243
1315
  });
1244
1316
  }
1245
- return n(), {
1246
- selectedRowKeys: u,
1247
- rowSelection: l(),
1248
- onSelect: i,
1249
- onSelectAll: o,
1250
- resetSelection: a,
1251
- reloadSelection: n
1317
+ return r(), {
1318
+ selectedRowKeys: i,
1319
+ rowSelection: a(),
1320
+ onSelect: l,
1321
+ onSelectAll: c,
1322
+ resetSelection: o,
1323
+ reloadSelection: r
1252
1324
  };
1253
1325
  }
1254
- function ir(e, t, {
1255
- pageService: r,
1256
- tableEvents: u
1257
- }) {
1258
- function a(i) {
1259
- r && (r.pageIndex = i, u("reload"));
1260
- }
1261
- function n(i) {
1262
- r && (r.pageSize = i, u("reload"));
1263
- }
1264
- const l = _t({
1265
- mobile: 0,
1266
- tablet: 640,
1267
- desktop: 1024
1268
- });
1269
- return r ? () => f("div", {
1270
- class: "table-pagination",
1271
- style: {
1272
- padding: "10px 0"
1273
- }
1274
- }, [f(Ue, {
1275
- current: r.pageIndex,
1276
- "onUpdate:current": (i) => r.pageIndex = i,
1277
- "page-size": r.pageSize,
1278
- "onUpdate:page-size": (i) => r.pageSize = i,
1279
- total: r.total,
1280
- "page-size-options": r.pageSizeOpts,
1281
- "hide-on-single-page": !e.alwayShowPagination,
1282
- "show-total": !0,
1283
- "show-page-size": !0,
1284
- size: "small",
1285
- simple: l.smaller("desktop").value,
1286
- onChange: (i) => a(i),
1287
- onPageSizeChange: (i) => n(i),
1288
- style: {
1289
- justifyContent: "flex-end"
1290
- }
1291
- }, null)]) : () => {
1292
- };
1326
+ function vn(e) {
1327
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !He(e);
1293
1328
  }
1294
- const cr = /* @__PURE__ */ B({
1295
- props: {
1296
- collapsedColumns: {
1297
- type: Array,
1298
- required: !0
1299
- }
1300
- },
1301
- setup(e) {
1302
- const t = D(), r = g(e.collapsedColumns.map((a) => ({
1303
- label: a.title,
1304
- value: a.key,
1305
- disabled: !1
1306
- }))), u = g(e.collapsedColumns.filter((a) => a.collapsed).map((a) => a.key));
1307
- return Je(() => {
1308
- const a = e.collapsedColumns.map((n) => ({
1309
- key: n.key,
1310
- title: n.title,
1311
- collapsed: u.value.includes(n.key)
1312
- }));
1313
- t.close(a);
1314
- }), () => f("div", {
1315
- class: "table-collapsed-render"
1316
- }, [f(Ge, {
1317
- data: r.value,
1318
- "default-value": u.value,
1319
- onChange: (a) => u.value = [...a],
1320
- title: ["显示列", "隐藏列"],
1321
- style: {
1322
- justifyContent: "center"
1323
- }
1324
- }, {
1325
- default: () => [De(f("template", null, null), [[Ve("slot"), "source"]])]
1326
- })]);
1327
- }
1328
- }), dr = /* @__PURE__ */ B({
1329
+ const wn = /* @__PURE__ */ F({
1329
1330
  props: {
1330
- value: {
1331
+ record: {
1331
1332
  type: Object,
1332
1333
  required: !0
1333
1334
  },
1334
- form: {
1335
+ columns: {
1335
1336
  type: Array,
1336
1337
  required: !0
1337
1338
  },
1338
- onSubmit: {
1339
- type: Function,
1340
- 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: () => []
1341
1360
  }
1342
1361
  },
1343
1362
  setup(e) {
1344
- const t = D();
1345
- function r(u) {
1346
- 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
+ }
1347
1378
  }
1348
- return () => f("div", {
1349
- class: "edit-form-container"
1350
- }, [f(oe, {
1351
- name: "form",
1352
- value: e.value,
1353
- form: e.form,
1354
- onSubmit: r
1355
- }, 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
+ };
1356
1400
  }
1357
- }), sr = /* @__PURE__ */ B({
1401
+ }), xn = /* @__PURE__ */ F({
1358
1402
  props: {
1359
1403
  // 数据主键
1360
1404
  rowKey: {
@@ -1503,24 +1547,24 @@ const cr = /* @__PURE__ */ B({
1503
1547
  },
1504
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"],
1505
1549
  setup(e, t) {
1506
- const r = Math.random().toString(32).slice(2).toUpperCase(), u = g(), a = g(), n = g(), l = g(), [i, o] = et(e.columns), d = g(!1), s = e.form ?? tt(e.columns), m = S(), h = j(), w = g(e.columns.map((c) => ({
1507
- key: c.key,
1508
- title: c.title,
1509
- 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
1510
1554
  })));
1511
- function S() {
1555
+ function y() {
1512
1556
  switch (!0) {
1513
1557
  case (typeof e.pageable == "string" && e.pageable === "server"):
1514
- return new F();
1558
+ return new K();
1515
1559
  case (typeof e.pageable == "boolean" && e.pageable === !0):
1516
- return new F();
1560
+ return new K();
1517
1561
  case (typeof e.pageable == "object" && !!e.pageable.reset):
1518
1562
  return e.pageable;
1519
1563
  case (typeof e.pageable == "object" && (!!e.pageable.index || !!e.pageable.size)):
1520
- return new F(e.pageable.index, e.pageable.size);
1564
+ return new K(e.pageable.index, e.pageable.size);
1521
1565
  }
1522
1566
  }
1523
- const x = (() => {
1567
+ const w = (() => {
1524
1568
  switch (!0) {
1525
1569
  case typeof e.pageable == "string":
1526
1570
  return e.pageable;
@@ -1531,215 +1575,206 @@ const cr = /* @__PURE__ */ B({
1531
1575
  }
1532
1576
  })();
1533
1577
  function j() {
1534
- const c = e.columns.find((b) => !!b.sortable);
1535
- if (c || e.sortable)
1536
- return new Z({
1578
+ const h = e.columns.find((b) => !!b.sortable);
1579
+ if (h || e.sortable)
1580
+ return new te({
1537
1581
  ...e.sortable || {},
1538
- ...c ? {
1539
- [c.key]: c.sortable
1582
+ ...h ? {
1583
+ [h.key]: h.sortable
1540
1584
  } : {}
1541
1585
  });
1542
1586
  }
1543
- function v(c) {
1587
+ function x(h) {
1544
1588
  const {
1545
1589
  exportExcel: b
1546
- } = pt();
1547
- b((c == null ? void 0 : c.columns) || e.columns, (c == null ? void 0 : c.source) || i.value, (c == null ? void 0 : c.filename) || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1590
+ } = cn();
1591
+ b(h?.columns || e.columns, h?.source || l.value, h?.filename || (typeof e.exportable == "object" ? e.exportable.filename : void 0));
1548
1592
  }
1549
- function y(c) {
1593
+ function p(h) {
1550
1594
  let b;
1551
1595
  switch (!0) {
1552
- case !!(c != null && c.key):
1553
- b = 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);
1554
1598
  break;
1555
- case !!(c != null && c.record):
1556
- b = c == null ? void 0 : c.record;
1599
+ case !!h?.record:
1600
+ b = h?.record;
1557
1601
  break;
1558
1602
  }
1559
1603
  if (!b)
1560
1604
  throw new Error("未找到需要预览的数据");
1561
- return n.value.open(nr, {
1605
+ return r.value.open(wn, {
1562
1606
  record: b,
1563
1607
  columns: e.columns
1564
1608
  }, {
1565
- title: (c == null ? void 0 : c.title) || "详情",
1566
- mode: (c == null ? void 0 : c.mode) || "dialog"
1609
+ title: h?.title || "详情",
1610
+ mode: h?.mode || "dialog"
1567
1611
  });
1568
1612
  }
1569
- function C(c) {
1613
+ function g(h) {
1570
1614
  let b;
1571
1615
  switch (!0) {
1572
- case !!(c != null && c.key):
1573
- b = 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);
1574
1618
  break;
1575
- case !!(c != null && c.record):
1576
- b = c == null ? void 0 : c.record;
1619
+ case !!h?.record:
1620
+ b = h?.record;
1577
1621
  break;
1578
1622
  }
1579
1623
  if (!b)
1580
1624
  throw new Error("未找到需要编辑的数据");
1581
- return n.value.open(dr, {
1625
+ return r.value.open(yn, {
1582
1626
  value: b,
1583
- form: c == null ? void 0 : c.form,
1584
- onSubmit: c.onSubmit
1627
+ form: h?.form,
1628
+ onSubmit: h.onSubmit
1585
1629
  }, {
1586
- title: (c == null ? void 0 : c.title) || "编辑",
1587
- mode: (c == null ? void 0 : c.mode) || "dialog",
1630
+ title: h?.title || "编辑",
1631
+ mode: h?.mode || "dialog",
1588
1632
  footer: !0,
1589
1633
  form: "form"
1590
1634
  });
1591
1635
  }
1592
- function M(c) {
1593
- var p, ee;
1636
+ function C(h) {
1594
1637
  if (!e.dataLoad)
1595
- return Promise.reject();
1596
- c != null && c.reset && (m && m.reset(), h && h.reset(), (p = u.value) == null || p.resetSorters());
1638
+ return Promise.reject(new Error("dataLoad is required"));
1639
+ h?.reset && (f && f.reset(), v && v.reset(), i.value?.resetSorters());
1597
1640
  const b = {
1598
- ...((ee = a.value) == null ? void 0 : ee.formSource) || {}
1641
+ ...o.value?.formSource || {}
1599
1642
  };
1600
- Object.keys(b).forEach((te) => {
1601
- [null, void 0, ""].includes(b[te]) && delete b[te];
1643
+ Object.keys(b).forEach((ie) => {
1644
+ [null, void 0, ""].includes(b[ie]) && delete b[ie];
1602
1645
  });
1603
- const _ = e.dataLoad({
1646
+ const O = e.dataLoad({
1604
1647
  form: b,
1605
- page: m,
1606
- sort: h,
1607
- update: o
1648
+ page: f,
1649
+ sort: v,
1650
+ update: c
1608
1651
  });
1609
- return Y(_) ? (d.value = !0, Promise.resolve(_).finally(() => {
1610
- d.value = !1;
1611
- }), _) : Promise.resolve();
1652
+ return B(O) ? (s.value = !0, Promise.resolve(O).finally(() => {
1653
+ s.value = !1;
1654
+ }), O) : Promise.resolve();
1612
1655
  }
1613
- function ye() {
1614
- n.value.open(cr, {
1615
- collapsedColumns: w.value
1656
+ function we() {
1657
+ r.value.open(hn, {
1658
+ collapsedColumns: d.value
1616
1659
  }, {
1617
1660
  title: "显示列",
1618
1661
  size: "small",
1619
1662
  footer: !0
1620
- }).then((c) => {
1621
- w.value = c;
1663
+ }).then((h) => {
1664
+ d.value = h;
1622
1665
  });
1623
1666
  }
1624
- const be = (c, {
1667
+ const xe = (h, {
1625
1668
  type: b
1626
1669
  }) => {
1627
- switch (b) {
1628
- case "drag": {
1629
- o(c), t.emit("change", c);
1630
- break;
1631
- }
1632
- }
1633
- }, R = rt({
1634
- reload: M,
1635
- preview: y,
1636
- export: v,
1637
- edit: C,
1638
- 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
1639
1677
  });
1640
- function ge(c, b) {
1641
- !h || x === "client" || (b ? h.update(c, b === "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"));
1642
1680
  }
1643
- const J = g(de({
1681
+ const ne = k(me({
1644
1682
  columns: e.columns,
1645
1683
  columnsOptions: e.columnsOptions,
1646
1684
  columnsGroups: e.columnsGroups,
1647
- pageMode: x,
1648
- collapsedColumns: w,
1649
- events: R
1650
- })), z = {
1651
- tableEvents: R,
1652
- tableForm: s,
1653
- tableSource: i,
1654
- formInstance: a,
1655
- 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,
1656
1694
  formOptions: e.formOptions
1657
- }, we = lr(e, t, z), ve = ar(e, t, z), Ce = ir(e, t, z), {
1658
- selectedRowKeys: Q,
1659
- rowSelection: X,
1660
- onSelect: ke,
1661
- onSelectAll: xe,
1662
- reloadSelection: Se,
1663
- resetSelection: Me
1664
- } = 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 = _(() => ({
1665
1703
  rowKey: e.rowKey,
1666
1704
  size: e.size,
1667
1705
  bordered: e.bordered,
1668
1706
  hoverable: e.hoverable,
1669
1707
  stripe: e.stripe,
1670
1708
  scroll: {
1671
- x: e.columns.reduce((c, b) => c += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1709
+ x: e.columns.reduce((h, b) => h += typeof b.width != "number" ? Math.max(b.title.length * 16, 80) : b.width, 0),
1672
1710
  y: e.height ?? "100%"
1673
1711
  },
1674
- rowSelection: X,
1712
+ rowSelection: oe,
1675
1713
  draggable: e.draggable ? {
1676
1714
  type: "handle",
1677
1715
  width: 40
1678
1716
  } : void 0,
1679
1717
  pagination: e.pageable === void 0 || e.pageable === "client",
1680
- selectedKeys: Q.value,
1718
+ selectedKeys: re.value,
1681
1719
  expandable: e.expandable,
1682
1720
  virtualListProps: e.virtualList ? {
1683
1721
  height: e.height
1684
1722
  } : void 0
1685
1723
  }));
1686
- function _e() {
1687
- J.value = de({
1724
+ function Le() {
1725
+ ne.value = me({
1688
1726
  columns: e.columns,
1689
1727
  columnsOptions: e.columnsOptions,
1690
1728
  columnsGroups: e.columnsGroups,
1691
- pageMode: x,
1692
- collapsedColumns: w,
1693
- events: R
1729
+ pageMode: w,
1730
+ collapsedColumns: d,
1731
+ events: L
1694
1732
  });
1695
1733
  }
1696
- return A(() => {
1697
- 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);
1698
1736
  }), {
1699
- tableId: r,
1700
- tableInstance: u,
1701
- tableSource: i,
1702
- tableOptions: Te,
1703
- tableColumns: J,
1704
- tableEvents: R,
1705
- tableForm: s,
1706
- tableLoading: d,
1707
- modalInstance: n,
1708
- tableRenderElement: l,
1709
- formSource: se(L(() => {
1710
- var c;
1711
- return (c = a == null ? void 0 : a.value) == null ? void 0 : c.formSource;
1712
- })),
1713
- formInstance: a,
1714
- reload: M,
1715
- preview: y,
1716
- edit: C,
1717
- export: v,
1718
- onSorterChange: ge,
1719
- onTableChange: be,
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,
1720
1755
  renders: {
1721
- renderTableForm: we,
1722
- renderTableActions: ve,
1723
- renderTablePagination: Ce
1756
+ renderTableForm: ke,
1757
+ renderTableActions: Se,
1758
+ renderTablePagination: Me
1724
1759
  },
1725
1760
  tableSelection: {
1726
- selectedRowKeys: Q,
1727
- rowSelection: X,
1728
- onSelect: ke,
1729
- onSelectAll: xe
1761
+ selectedRowKeys: re,
1762
+ rowSelection: oe,
1763
+ onSelect: Te,
1764
+ onSelectAll: $e
1730
1765
  },
1731
- resetSelection: Me,
1732
- reloadSelection: Se,
1733
- reloadColumns: _e
1766
+ resetSelection: Oe,
1767
+ reloadSelection: _e,
1768
+ reloadColumns: Le
1734
1769
  };
1735
1770
  },
1736
1771
  render() {
1737
1772
  this.reloadColumns();
1738
- const e = () => f("div", {
1773
+ const e = () => u("div", {
1739
1774
  class: "table-body"
1740
- }, [f("div", {
1775
+ }, [u("div", {
1741
1776
  class: "table-body-wrapper"
1742
- }, [f(Ze, fe({
1777
+ }, [u(et, pe({
1743
1778
  loading: this.tableLoading,
1744
1779
  data: this.tableSource,
1745
1780
  columns: this.tableColumns,
@@ -1752,38 +1787,31 @@ const cr = /* @__PURE__ */ B({
1752
1787
  selectedKeys: this.tableSelection.selectedRowKeys.value,
1753
1788
  "onUpdate:selectedKeys": (t) => this.tableSelection.selectedRowKeys.value = t
1754
1789
  }, this.tableOptions), null)])]);
1755
- return f("div", {
1790
+ return u("div", {
1756
1791
  class: {
1757
1792
  "table-render": !0,
1758
1793
  "auto-fill": this.autoFill
1759
1794
  },
1760
1795
  ref: (t) => this.tableRenderElement = t
1761
- }, [f(Qe, {
1796
+ }, [u(nt, {
1762
1797
  ref: (t) => this.modalInstance = t
1763
1798
  }, {
1764
- default: () => [f("div", {
1799
+ default: () => [u("div", {
1765
1800
  class: "table-render-content"
1766
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()])]
1767
1802
  })]);
1768
1803
  }
1769
- });
1770
- function wr(e) {
1771
- return e;
1772
- }
1773
- function vr(e) {
1774
- return e;
1775
- }
1776
- const Cr = {
1804
+ }), jn = {
1777
1805
  install(e, t) {
1778
- e.component("TableRender", sr);
1806
+ e.component("TableRender", xn);
1779
1807
  }
1780
1808
  };
1781
1809
  export {
1782
- sr as TableRender,
1783
- Sr as TableRenderResolver,
1784
- Cr as default,
1785
- wr as defineColumns,
1786
- vr as defineTableLoad,
1787
- rt as useEvents,
1788
- gr 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
1789
1817
  };