@web-utils/form-ui 1.0.0-beta47 → 1.0.0-beta48

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 (118) hide show
  1. package/chunks/{C9dGL28n.mjs → 6yfBZFOB.mjs} +2 -2
  2. package/chunks/B-zqRAXo.mjs +69 -0
  3. package/chunks/{CXvGoZKJ.mjs → B1IPSTA6.mjs} +2 -2
  4. package/chunks/B3pkJUCx2.mjs +146 -0
  5. package/chunks/{Ct5bDJ50.mjs → B9gA65rt2.mjs} +3 -3
  6. package/chunks/{C1AgOUe_.mjs → BA2KEptL.mjs} +2 -2
  7. package/chunks/BRRcYOud.mjs +613 -0
  8. package/chunks/{Bm5eiSmT.mjs → BUGCiCnl.mjs} +11 -7
  9. package/chunks/{DiJyms_r.mjs → BbSPWDDZ.mjs} +2 -2
  10. package/chunks/{BH_JJ8Xh.mjs → BfxDxIg0.mjs} +2 -2
  11. package/chunks/{C3Uo82-I.mjs → BqWvBF14.mjs} +3 -3
  12. package/chunks/BsZgAJX_2.mjs +81 -0
  13. package/chunks/{DXYgAmil.mjs → BtcjAHE6.mjs} +2 -2
  14. package/chunks/{DhtHh0jk.mjs → ByHz4mmh.mjs} +2 -2
  15. package/chunks/C-D7jeLT2.mjs +568 -0
  16. package/chunks/{BufIRDd0.mjs → C2zgFLYO.mjs} +1 -1
  17. package/chunks/{XCGWTz41.mjs → CAd1zK9Q.mjs} +2 -2
  18. package/chunks/{CSyJ-vEx.mjs → CJdkjadi.mjs} +1 -1
  19. package/chunks/{CFOGMFgo.mjs → CabldOLo.mjs} +17 -10
  20. package/chunks/{Bd1UFJic.mjs → Cln3RBAD.mjs} +21 -21
  21. package/chunks/{CTKmEf2M.mjs → CqoVAnxC2.mjs} +2 -2
  22. package/chunks/{DF9fJMQS.mjs → CuAoMR3n.mjs} +3 -3
  23. package/chunks/{XqRTtFfp.mjs → CxTg0r4n.mjs} +1 -1
  24. package/chunks/{pdwFQpA8.mjs → D0Zg2CV0.mjs} +3 -3
  25. package/chunks/{BsCS7SB5.mjs → DA7oGHSX.mjs} +2 -2
  26. package/chunks/DOZRzqlo.mjs +37 -0
  27. package/chunks/{Cj59E77g.mjs → D_qiRmiE.mjs} +5 -5
  28. package/chunks/{cmuHpsX6.mjs → DcTVYqeJ.mjs} +29 -25
  29. package/chunks/{B3ajWLh3.mjs → Dkd5BC98.mjs} +2 -2
  30. package/chunks/{ChmDDqoZ2.mjs → GI8krYU82.mjs} +1 -1
  31. package/chunks/{D8UVq1t1.mjs → V2p-PCpL.mjs} +6 -6
  32. package/chunks/{taicx2sd.mjs → bFbPPcdq.mjs} +2 -2
  33. package/chunks/{TvNHGVAP.mjs → eae6huQB.mjs} +2 -2
  34. package/chunks/gCeDFHo1.mjs +32 -0
  35. package/chunks/{BvA0aMEE.mjs → gLPy4Sus.mjs} +1 -1
  36. package/chunks/{o6VhYAN52.mjs → hzaYr6Ud2.mjs} +2 -2
  37. package/chunks/{CqTcEefA.mjs → pIzhYsBe.mjs} +2 -2
  38. package/chunks/{CWfUPCtS.mjs → vXQf89tS.mjs} +274 -273
  39. package/chunks/{BWBHzD5N.mjs → wXeqV-_7.mjs} +2 -2
  40. package/confirm-button/index.d.ts +2 -0
  41. package/confirm-button/index.mjs +1 -1
  42. package/confirmable/index.d.ts +2 -0
  43. package/confirmable/index.mjs +1 -1
  44. package/dict-render/index.d.ts +28 -0
  45. package/dict-render/index.mjs +2 -0
  46. package/editable-tree/index.mjs +1 -1
  47. package/element-dialog/index.d.ts +2 -2
  48. package/element-dialog/index.mjs +1 -1
  49. package/{resize-observer → element-resize-observer}/index.mjs +3 -3
  50. package/form-button/index.d.ts +2 -0
  51. package/form-cascader/index.d.ts +3 -3
  52. package/form-cascader/index.mjs +1 -1
  53. package/form-checkbox/index.mjs +1 -1
  54. package/form-checkbox-group/index.mjs +2 -0
  55. package/form-date-picker/index.mjs +1 -1
  56. package/form-holder/index.mjs +1 -1
  57. package/form-image/index.mjs +1 -1
  58. package/form-input/index.mjs +1 -1
  59. package/form-input-cron-expression/index.mjs +1 -1
  60. package/form-input-email/index.mjs +1 -1
  61. package/form-input-id-card/index.mjs +1 -1
  62. package/form-input-number/index.mjs +1 -1
  63. package/form-input-phone-number/index.mjs +1 -1
  64. package/form-input-tag/index.mjs +1 -1
  65. package/form-input-time/index.mjs +1 -1
  66. package/form-item-group/index.mjs +1 -1
  67. package/form-item-x/index.mjs +1 -1
  68. package/form-radio-group/index.d.ts +1 -1
  69. package/form-radio-group/index.mjs +1 -1
  70. package/form-rate/index.mjs +1 -1
  71. package/form-row/index.mjs +1 -1
  72. package/form-select/index.d.ts +1 -1
  73. package/form-select/index.mjs +1 -1
  74. package/form-slider/index.mjs +1 -1
  75. package/form-switch/index.mjs +1 -1
  76. package/form-table/index.d.ts +269 -0
  77. package/form-table/index.mjs +2 -0
  78. package/form-table-plus/index.d.ts +266 -0
  79. package/form-table-plus/index.mjs +2 -0
  80. package/form-text/index.mjs +1 -1
  81. package/form-textarea/index.mjs +1 -1
  82. package/form-time-select/index.mjs +1 -1
  83. package/helper/dictionary.mjs +7 -7
  84. package/iframe-window/index.mjs +1 -1
  85. package/index.css +1 -1
  86. package/index.d.ts +8 -3
  87. package/index.mjs +55 -50
  88. package/package.json +1 -1
  89. package/pageable-table/index.d.ts +7 -7
  90. package/pageable-table/index.mjs +1 -1
  91. package/sub-table/index.d.ts +100 -0
  92. package/sub-table/index.mjs +472 -0
  93. package/sub-table/style.css +1 -0
  94. package/sub-table-plus/index.d.ts +97 -0
  95. package/sub-table-plus/index.mjs +2 -0
  96. package/sub-table-plus/style.css +1 -0
  97. package/table-column/index.mjs +1 -1
  98. package/table-column-def/index.d.ts +18 -8
  99. package/table-column-def/index.mjs +1 -1
  100. package/table-view/index.mjs +107 -106
  101. package/toolbar/index.mjs +1 -1
  102. package/toolbar-button/index.d.ts +2 -2
  103. package/toolbar-button/index.mjs +1 -1
  104. package/vue-cron/index.mjs +1 -1
  105. package/web-types.json +1 -1
  106. package/x-input-tag/index.mjs +52 -51
  107. package/year-calendar/index.mjs +1 -1
  108. package/chunks/CLPSCSsy.mjs +0 -603
  109. package/chunks/CuG2Q-PM.mjs +0 -100
  110. package/form-check-box-group/index.mjs +0 -2
  111. package/chunks/{Ds_Tpa_M.mjs → BBERmTup.mjs} +0 -0
  112. package/chunks/{B1MSrc6f.mjs → CkOD-_VV.mjs} +0 -0
  113. package/chunks/{DDmQcNm6.mjs → DOP3aBxf.mjs} +0 -0
  114. package/chunks/{DJe97Fgi.mjs → hlha6Bhc.mjs} +0 -0
  115. package/{resize-observer → element-resize-observer}/index.d.ts +0 -0
  116. package/{resize-observer → element-resize-observer}/style.css +0 -0
  117. package/{form-check-box-group → form-checkbox-group}/index.d.ts +1 -1
  118. /package/{form-check-box-group → form-checkbox-group}/style.css +0 -0
@@ -0,0 +1,613 @@
1
+ import { d as e, n as t, r as n } from "./DcTVYqeJ.mjs";
2
+ import { getDictLabel as r } from "../helper/dictionary.mjs";
3
+ import { pageableTableContextKey as i } from "../constants/index.mjs";
4
+ import { t as a } from "./CxTg0r4n.mjs";
5
+ import o from "../element-resize-observer/index.mjs";
6
+ import { t as s } from "./B-zqRAXo.mjs";
7
+ import { useVisibilityChange as c } from "../hook/useVisibilityChange.mjs";
8
+ import "@web-utils/core";
9
+ import { Fragment as l, computed as u, createBlock as d, createTextVNode as f, createVNode as p, inject as m, isVNode as h, mergeModels as g, mergeProps as _, nextTick as v, onUpdated as ee, openBlock as y, provide as te, reactive as b, ref as x, toDisplayString as S, useModel as C, useTemplateRef as w, watch as T, withCtx as E } from "vue";
10
+ import { ElMessage as D } from "element-plus";
11
+ import { ElCheckbox as O, ElDrawer as k, ElEmpty as ne, ElPagination as re, ElRadio as A, ElTable as j, ElTableColumn as M } from "element-plus/es";
12
+ import { useEventBus as N } from "@web-utils/vue/hooks/useEventBus";
13
+ //#region src/components/table/components/TableColumnFilter.vue
14
+ var ie = {
15
+ __name: "TableColumnFilter",
16
+ props: /* @__PURE__ */ g({ columns: {
17
+ type: Array,
18
+ default: () => []
19
+ } }, {
20
+ modelValue: {
21
+ type: Boolean,
22
+ default: !1
23
+ },
24
+ modelModifiers: {}
25
+ }),
26
+ emits: ["update:modelValue"],
27
+ setup(e, { expose: t }) {
28
+ let n = C(e, "modelValue"), r = b({}), i = b({}), a = b({}), o = b({}), s = (e, t, n) => {
29
+ n === "hide" ? r[t.prop] = e : n === "fixed" ? i[t.prop] = e : n === "filterable" ? a[t.prop] = e : n === "sortable" && (o[t.prop] = e);
30
+ };
31
+ return t({
32
+ hideProps: r,
33
+ fixedProps: i,
34
+ filterableProps: a,
35
+ sortableProps: o
36
+ }), (t, r) => {
37
+ let i = M, a = O, o = j, c = k;
38
+ return y(), d(c, {
39
+ modelValue: n.value,
40
+ "onUpdate:modelValue": r[0] || (r[0] = (e) => n.value = e),
41
+ class: "table-column-filter",
42
+ title: "表格设置",
43
+ "append-to-body": ""
44
+ }, {
45
+ default: E(() => [p(o, {
46
+ data: e.columns,
47
+ border: ""
48
+ }, {
49
+ default: E(() => [
50
+ p(i, { label: "列名" }, {
51
+ default: E(({ row: e }) => [f(S(e.label), 1)]),
52
+ _: 1
53
+ }),
54
+ p(i, {
55
+ label: "隐藏",
56
+ align: "center"
57
+ }, {
58
+ default: E(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "hide") }, null, 8, ["onChange"])]),
59
+ _: 1
60
+ }),
61
+ p(i, {
62
+ label: "冻结",
63
+ align: "center"
64
+ }, {
65
+ default: E(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "fixed") }, null, 8, ["onChange"])]),
66
+ _: 1
67
+ }),
68
+ p(i, {
69
+ label: "过滤",
70
+ align: "center"
71
+ }, {
72
+ default: E(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "filterable") }, null, 8, ["onChange"])]),
73
+ _: 1
74
+ }),
75
+ p(i, {
76
+ label: "排序",
77
+ align: "center"
78
+ }, {
79
+ default: E(({ row: e }) => [p(a, {
80
+ title: e.allowSort ? null : "该列不支持排序!",
81
+ disabled: !e.allowSort,
82
+ onChange: (t) => s(t, e, "sortable")
83
+ }, null, 8, [
84
+ "title",
85
+ "disabled",
86
+ "onChange"
87
+ ])]),
88
+ _: 1
89
+ })
90
+ ]),
91
+ _: 1
92
+ }, 8, ["data"])]),
93
+ _: 1
94
+ }, 8, ["modelValue"]);
95
+ };
96
+ }
97
+ };
98
+ //#endregion
99
+ //#region src/components/table/components/TableColumnFilterable.vue?vue&type=script&lang.jsx
100
+ function P(e) {
101
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
102
+ }
103
+ //#endregion
104
+ //#region src/components/table/components/TableColumnFilterable.vue
105
+ var ae = {
106
+ props: {
107
+ filterable: Boolean,
108
+ prop: String
109
+ },
110
+ setup(e, { attrs: t, slots: n }) {
111
+ let r = m(i, null), a = u(() => {
112
+ if (e.filterable && r) return (e, t, n) => t[n.property] === e;
113
+ }), o = u(() => {
114
+ if (e.filterable && r) return [...new Set(r.records.value.map((t) => t[e.prop]).filter((e) => e))].map((e) => ({
115
+ text: e,
116
+ value: e
117
+ }));
118
+ });
119
+ return () => p(s, _(t, {
120
+ prop: e.prop,
121
+ filterable: e.filterable,
122
+ filterMethod: a.value,
123
+ filters: o.value
124
+ }), P(n) ? n : { default: () => [n] });
125
+ }
126
+ }, F = {
127
+ data: {
128
+ type: Array,
129
+ default: () => []
130
+ },
131
+ height: [String, Number],
132
+ maxHeight: [String, Number],
133
+ stripe: {
134
+ type: Boolean,
135
+ default: !1
136
+ },
137
+ border: {
138
+ type: Boolean,
139
+ default: !0
140
+ },
141
+ size: String,
142
+ fit: {
143
+ type: Boolean,
144
+ default: !0
145
+ },
146
+ showHeader: {
147
+ type: Boolean,
148
+ default: !0
149
+ },
150
+ highlightCurrentRow: {
151
+ type: Boolean,
152
+ default: !1
153
+ },
154
+ currentRowKey: [String, Number],
155
+ rowClassName: [Function, String],
156
+ rowStyle: [Function, Object],
157
+ cellClassName: [Function, String],
158
+ cellStyle: [Function, Object],
159
+ headerRowClassName: [Function, String],
160
+ headerRowStyle: [Function, Object],
161
+ headerCellClassName: [Function, String],
162
+ headerCellStyle: [Function, Object],
163
+ rowKey: {
164
+ type: [Function, String],
165
+ default: "id"
166
+ },
167
+ emptyText: {
168
+ type: String,
169
+ default: "No Data"
170
+ },
171
+ defaultExpandAll: {
172
+ type: Boolean,
173
+ default: !1
174
+ },
175
+ expandRowKeys: {
176
+ type: Array,
177
+ default: () => []
178
+ },
179
+ defaultSort: Object,
180
+ tooltipEffect: {
181
+ type: String,
182
+ default: "dark"
183
+ },
184
+ tooltipOptions: {
185
+ type: Object,
186
+ default: () => ({})
187
+ },
188
+ appendFilterPanelTo: String,
189
+ showSummary: {
190
+ type: Boolean,
191
+ default: !1
192
+ },
193
+ sumText: {
194
+ type: String,
195
+ default: "Sum"
196
+ },
197
+ summaryMethod: Function,
198
+ spanMethod: Function,
199
+ selectOnIndeterminate: {
200
+ type: Boolean,
201
+ default: !0
202
+ },
203
+ indent: {
204
+ type: Number,
205
+ default: 16
206
+ },
207
+ lazy: {
208
+ type: Boolean,
209
+ default: !1
210
+ },
211
+ load: Function,
212
+ treeProps: {
213
+ type: Object,
214
+ default: () => ({})
215
+ },
216
+ tableLayout: {
217
+ type: String,
218
+ default: "fixed"
219
+ },
220
+ scrollbarAlwaysOn: {
221
+ type: Boolean,
222
+ default: !1
223
+ },
224
+ showOverflowTooltip: [Boolean, Object],
225
+ flexible: {
226
+ type: Boolean,
227
+ default: !1
228
+ },
229
+ scrollbarTabindex: [String, Number],
230
+ allowDragLastColumn: {
231
+ type: Boolean,
232
+ default: !0
233
+ },
234
+ tooltipFormatter: Function,
235
+ preserveExpandedContent: {
236
+ type: Boolean,
237
+ default: !1
238
+ },
239
+ nativeScrollbar: {
240
+ type: Boolean,
241
+ default: !1
242
+ },
243
+ rowExpandable: Function,
244
+ selectionWidth: {
245
+ type: String,
246
+ default: "45"
247
+ },
248
+ viewId: String,
249
+ url: String,
250
+ hideOnSinglePage: Boolean,
251
+ api: Function,
252
+ model: Object,
253
+ ascs: {
254
+ type: Array,
255
+ default: () => []
256
+ },
257
+ descs: {
258
+ type: Array,
259
+ default: () => []
260
+ },
261
+ headerBold: Boolean,
262
+ autoHeight: Boolean,
263
+ immediate: {
264
+ type: Boolean,
265
+ default: !0
266
+ },
267
+ index: {
268
+ type: Boolean,
269
+ default: !0
270
+ },
271
+ multiple: {
272
+ type: Boolean,
273
+ default: !0
274
+ },
275
+ selection: {
276
+ type: Boolean,
277
+ default: !0
278
+ },
279
+ reloadOnModelChange: {
280
+ type: Boolean,
281
+ default: !1
282
+ },
283
+ columns: Array,
284
+ pageSize: {
285
+ type: Number,
286
+ default: 25
287
+ },
288
+ dicOptions: {
289
+ type: Array,
290
+ default: () => []
291
+ },
292
+ paging: {
293
+ type: Boolean,
294
+ default: !0
295
+ },
296
+ clickRowSelect: Boolean,
297
+ payloadStyle: String,
298
+ disabledRowKeys: Array,
299
+ selectExport: Boolean,
300
+ useVisibilityChange: Boolean
301
+ }, I = { data: !0 }, oe = (e) => I[e] !== !0;
302
+ //#endregion
303
+ //#region src/components/table/PageableTable.vue?vue&type=script&lang.jsx
304
+ function se(e) {
305
+ let t = "";
306
+ for (let n in e) t += `<TableColumnDef prop="${n}" label="${n}"/>\n`;
307
+ return t;
308
+ }
309
+ var L = {
310
+ loading: 1,
311
+ error: -1,
312
+ empty: 2,
313
+ success: 0
314
+ }, R = {
315
+ name: "PageableTable",
316
+ emits: { "page-loaded": null },
317
+ inheritAttrs: !1,
318
+ props: { ...F },
319
+ setup(s, { emit: d, attrs: m, slots: h, expose: g }) {
320
+ let y = w("table"), b = w("settingPanel"), S = x(L.empty), C = x([]), E = x(null), O = x(!1), k = x([]), P = x({
321
+ total: 0,
322
+ page: 1,
323
+ limit: s.pageSize,
324
+ ascs: s.ascs,
325
+ descs: s.descs
326
+ }), F = x(0), I = x(0), R = u(() => s.reloadOnModelChange ? {
327
+ asc: P.value.ascs,
328
+ desc: P.value.descs,
329
+ page: P.value.page,
330
+ limit: P.value.limit,
331
+ model: s.model
332
+ } : {
333
+ asc: P.value.ascs,
334
+ desc: P.value.descs,
335
+ page: P.value.page,
336
+ limit: P.value.limit
337
+ }), z = u(() => {
338
+ var e;
339
+ let t = `${(P.value.page - 1) * P.value.limit + (((e = C.value) == null ? void 0 : e.length) ?? 0)}`;
340
+ return t.length > 3 ? 60 + (t.length - 3) * 10 : 60;
341
+ }), B = () => {
342
+ H();
343
+ }, V = (e, t, n) => {
344
+ if (s.clickRowSelect && $(e)) {
345
+ var r;
346
+ if (k.value.find((t) => t[s.rowKey] === e[s.rowKey])) {
347
+ var i;
348
+ (i = y.value) == null || i.toggleRowSelection(e, !1);
349
+ return;
350
+ }
351
+ (r = y.value) == null || r.toggleRowSelection(e);
352
+ }
353
+ }, H = () => {
354
+ var e, t;
355
+ let n = (e = y.value) == null || (e = e.$children) == null ? void 0 : e.find((e) => {
356
+ var t;
357
+ return ((t = e.$options) == null ? void 0 : t.name) === "ElTableBody";
358
+ });
359
+ n == null || (t = n.$refs) == null || (t = t.tooltip) == null || t.hide();
360
+ }, U = ({ scrollLeft: e, scrollTop: t }) => {
361
+ F.value = t, I.value = e;
362
+ }, W = () => {
363
+ fe(F.value, I.value);
364
+ }, G = (e) => t(se(e)), ce = ({ prop: e, order: t }) => {
365
+ s.payloadStyle === "body" ? (P.value.ascs = t === "ascending" ? [e] : s.ascs, P.value.descs = t === "descending" ? [e] : s.descs) : (P.value.ascs = t === "ascending" ? e : "", P.value.descs = t === "descending" ? e : "");
366
+ }, le = (e) => {
367
+ $(e) && (E.value = e);
368
+ }, ue = (e) => {
369
+ k.value = e;
370
+ }, K = () => {
371
+ var e;
372
+ (e = y.value) == null || e.clearSelection();
373
+ }, de = () => {
374
+ let e;
375
+ return e = s.payloadStyle === "body" ? {
376
+ page: {
377
+ ...P.value,
378
+ current: P.value.page,
379
+ size: P.value.limit
380
+ },
381
+ example: s.model || {}
382
+ } : {
383
+ ...P.value,
384
+ current: P.value.page,
385
+ size: P.value.limit,
386
+ ...s.model || {}
387
+ }, s.selectExport && (s.rowKey ? e.exportKeys = k.value.map((e) => e[s.rowKey]) : e.exportKeys = k.value.map((e) => C.value.indexOf(e))), e;
388
+ }, q = async (e = !0) => {
389
+ if (s.data !== !1) {
390
+ var t;
391
+ C.value = s.data, P.value.page = 1, P.value.total = (t = C.value) == null ? void 0 : t.length, P.value.limit = P.value.total;
392
+ return;
393
+ }
394
+ e !== !1 && (C.value = []);
395
+ let n, r = de();
396
+ if (s.api) {
397
+ e !== !1 && (S.value = L.loading);
398
+ try {
399
+ s.api && (n = await s.api(r));
400
+ } catch {
401
+ S.value = L.error;
402
+ return;
403
+ }
404
+ } else if (s.data) n = { data: { data: {
405
+ total: s.data.length,
406
+ records: s.data
407
+ } } };
408
+ else {
409
+ D.warning({
410
+ title: "开发提示!",
411
+ message: "PageableTable api(Function) 属性"
412
+ });
413
+ return;
414
+ }
415
+ let { data: { data: i } = {} } = n || {}, { total: a, records: o } = i || {};
416
+ P.value.total = Number(a), C.value = await pe(o), !o || !o.length ? S.value = L.empty : S.value = L.success, J(), d("page-loaded", i);
417
+ }, J = () => {
418
+ v(() => {
419
+ var e;
420
+ (e = y.value) == null || e.doLayout();
421
+ });
422
+ }, Y = async (e) => {
423
+ await q(e);
424
+ }, X = () => {
425
+ P.value = {
426
+ total: 0,
427
+ page: 1,
428
+ limit: s.pageSize,
429
+ ascs: s.ascs,
430
+ descs: s.descs
431
+ };
432
+ }, fe = (e, t) => {
433
+ y.value.setScrollTop(e), y.value.setScrollLeft(t);
434
+ }, Z = (e, t) => {
435
+ var n;
436
+ (n = y.value) == null || n.toggleRowSelection(e, t);
437
+ }, pe = async (e) => {
438
+ if (!e) return [];
439
+ let t = [...e];
440
+ for (let e of t) for (let t of s.dicOptions) if (e[`$${t.prop}`] = e[t.prop], t.dicData) {
441
+ var n;
442
+ e[t.prop] = ((n = t.dicData.find((n) => n.modelValue === e[t.prop])) == null ? void 0 : n.label) || e[t.prop];
443
+ } else e[t.prop] = await r(t.dicType, e[t.prop]);
444
+ return t;
445
+ }, Q = () => {
446
+ O.value = !O.value;
447
+ }, $ = (e) => {
448
+ var t;
449
+ return !(e != null && e.disabled) && !((t = s.disabledRowKeys) != null && t.includes(e == null ? void 0 : e[s.rowKey]));
450
+ };
451
+ s.useVisibilityChange && c({ onPageVisible: () => {
452
+ Y(!1);
453
+ } }), N("reloadTableView", (e) => {
454
+ e === s.viewId && q();
455
+ }), T(() => s.url, X), T(() => s.api, X), T(() => m.data, q), T(() => R.value, q, {
456
+ deep: !0,
457
+ immediate: s.immediate
458
+ }), ee(() => {
459
+ W();
460
+ }), g({
461
+ records: C,
462
+ getPage: q,
463
+ refresh: Y,
464
+ reload: X,
465
+ doLayout: J,
466
+ clearSelection: K,
467
+ toggleRowSelection: Z,
468
+ toggleSettings: Q
469
+ }), te(i, {
470
+ records: C,
471
+ getPage: q,
472
+ refresh: Y,
473
+ reload: X,
474
+ doLayout: J,
475
+ clearSelection: K,
476
+ toggleRowSelection: Z,
477
+ toggleSettings: Q
478
+ });
479
+ let { autoBindProps: me, listeners: he } = e(s, { predicate: oe });
480
+ return () => {
481
+ var e;
482
+ let t = E.value && E.value[m["row-key"] || s.rowKey || "id"] === (E.value && s.rowKey ? E.value[s.rowKey] : (e = E.value) == null ? void 0 : e.id), r = [];
483
+ if (h.default) {
484
+ var i;
485
+ let e = n((i = h.default) == null ? void 0 : i.call(h));
486
+ for (let t = 0; t < e.length; t++) {
487
+ let { props: n, children: i } = e[t];
488
+ if (!n) continue;
489
+ let { sortable: a, prop: o, fixed: s, ...c } = n, l = {
490
+ ...c,
491
+ prop: o,
492
+ allowSort: a !== !1
493
+ };
494
+ i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), r.push(l);
495
+ }
496
+ } else if (s.columns) for (let e = 0; e < s.columns.length; e++) {
497
+ let { prop: t, sortable: n, fixed: i, ...a } = s.columns[e], o = {
498
+ ...a,
499
+ prop: t,
500
+ allowSort: n !== !1
501
+ };
502
+ b.value && (o.hide = b.value.hideProps[t], o.filterable = b.value.filterableProps[t], o.sortable = b.value.sortableProps[t] === !0, o.fixed = i || b.value.fixedProps[t]), r.push(o);
503
+ }
504
+ return p("div", { class: ["pageable-table", { "auto-height": s.autoHeight }] }, [p("div", { class: "pageable-table-wrapper" }, [
505
+ h.toolbar && h.toolbar({ selectedRows: k.value }),
506
+ p(j, _(he.value, me.value, {
507
+ ref: "table",
508
+ data: C.value,
509
+ class: ["flex-item", { "header-bold": s.headerBold }],
510
+ border: s.border,
511
+ stripe: !0,
512
+ size: "default",
513
+ height: s.autoHeight ? null : "auto",
514
+ onScroll: U,
515
+ onSortChange: ce,
516
+ onRowDblclick: B,
517
+ onRowClick: V,
518
+ onCellClick: H,
519
+ onCurrentChange: le,
520
+ onSelectionChange: ue
521
+ }), {
522
+ default: () => {
523
+ let e = [];
524
+ if (s.multiple && s.selection && e.push(p(M, {
525
+ key: "selection",
526
+ type: "selection",
527
+ selectable: $,
528
+ width: s.selectionWidth,
529
+ align: "center"
530
+ }, null)), !s.multiple && s.selection && e.push(p(M, {
531
+ key: "single-selection",
532
+ type: "single-selection",
533
+ "class-name": "single-select-column",
534
+ width: s.selectionWidth,
535
+ align: "center"
536
+ }, {
537
+ header: () => p(A, {
538
+ modelValue: !!E.value,
539
+ label: !0
540
+ }, { default: () => [p("span", null, null)] }),
541
+ default: ({ row: e }) => p(A, {
542
+ label: !0,
543
+ disabled: !$(e),
544
+ modelValue: t
545
+ }, { default: () => [p("span", null, null)] })
546
+ })), s.index && e.push(p(M, {
547
+ key: "index",
548
+ type: "index",
549
+ label: "序号",
550
+ width: z.value,
551
+ align: "center"
552
+ }, { default: ({ $index: e }) => (P.value.page - 1) * P.value.limit + e + 1 || e + 1 })), r.length > 0) for (let t = 0; t < r.length; t++) {
553
+ let n = r[t];
554
+ if (n.hide) continue;
555
+ let { prop: i, headerSlot: a, defaultSlot: o, expandSlot: s, iconSlot: c, ...l } = n;
556
+ e.push(p(ae, _(l, { prop: i }), {
557
+ default: h[i] ? ({ row: e }) => h[i]({ row: e }) : o,
558
+ header: a,
559
+ expand: s,
560
+ "filter-icon": c
561
+ }));
562
+ }
563
+ else e.push(p(M, {
564
+ key: "default",
565
+ label: "点击表格行复制模板"
566
+ }, { default: ({ row: e }) => p("pre", {
567
+ class: "pointer",
568
+ onClick: () => G(e)
569
+ }, [JSON.stringify(e, null, " ")]) }));
570
+ return e;
571
+ },
572
+ empty: () => h.empty ? h.empty() : p(l, null, [
573
+ S.value === L.loading && p("span", { class: "pageable-table-loading" }, [p("i", { class: "table-status-icon el-icon-loading" }, null), f("加载中...")]),
574
+ S.value === L.error && p(a, {
575
+ class: "pageable-table-error",
576
+ onClick: Y
577
+ }, { default: () => [p("i", { class: "table-status-icon el-icon-error" }, null), f("加载失败,点击重试!")] }),
578
+ S.value !== L.loading && S.value !== L.error && p(ne, null, null)
579
+ ]),
580
+ append: h.append
581
+ }),
582
+ s.paging && p(re, {
583
+ "current-page": P.value.page,
584
+ "onUpdate:current-page": (e) => P.value.page = e,
585
+ "hide-on-single-page": s.hideOnSinglePage,
586
+ "page-size": P.value.limit,
587
+ "onUpdate:page-size": (e) => P.value.limit = e,
588
+ total: P.value.total,
589
+ "page-sizes": [
590
+ 10,
591
+ 25,
592
+ 50,
593
+ 100,
594
+ 500,
595
+ 1e3,
596
+ 2e3
597
+ ],
598
+ class: "flex-not-shrink",
599
+ background: !0,
600
+ layout: "total, sizes, prev, pager, next, jumper"
601
+ }, null),
602
+ p(ie, {
603
+ ref: "settingPanel",
604
+ modelValue: O.value,
605
+ "onUpdate:modelValue": (e) => O.value = e,
606
+ columns: r
607
+ }, null)
608
+ ]), p(o, { onNotify: J }, null)]);
609
+ };
610
+ }
611
+ };
612
+ //#endregion
613
+ export { R as t };
@@ -1,6 +1,6 @@
1
1
  import { isFunction as e } from "@web-utils/core";
2
- import { defineComponent as t, h as n, resolveComponent as r } from "vue";
3
- import { ElLoading as i, ElMessageBox as a } from "element-plus";
2
+ import { defineComponent as t, h as n } from "vue";
3
+ import { ElButton as r, ElLoading as i, ElMessageBox as a } from "element-plus";
4
4
  //#region src/components/button/confirmable-mixin.ts
5
5
  async function o(t, n, r) {
6
6
  let { stop: o, prevent: s, message: c, loadable: l, loadingText: u, confirmable: d, confirmType: f, confirmText: p, confirmTitle: m } = n;
@@ -64,15 +64,19 @@ var s = t({
64
64
  tag: {
65
65
  type: String,
66
66
  default: "i"
67
- }
67
+ },
68
+ icon: String
68
69
  },
69
70
  render() {
70
- let e = r(this.tag), { text: t, ...i } = this.$props, { onClick: a, ...s } = this.$attrs;
71
+ let e = this.tag === "ElButton" ? r : this.tag, { text: t, icon: i, ...a } = this.$props, { onClick: s, ...c } = this.$attrs;
71
72
  return n(e, {
72
- ...s,
73
- ...i,
73
+ ...c,
74
+ ...a,
74
75
  onClick: (e) => o(e, this.$props, this.$attrs)
75
- }, { default: this.$slots.default || (() => t) });
76
+ }, {
77
+ default: this.$slots.default || (() => t),
78
+ icon: this.icon ? () => n("i", { class: this.icon }) : null
79
+ });
76
80
  }
77
81
  });
78
82
  //#endregion
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Cj59E77g.mjs";
2
- import { n, t as r } from "./CSyJ-vEx.mjs";
1
+ import { i as e, n as t } from "./D_qiRmiE.mjs";
2
+ import { n, t as r } from "./CJdkjadi.mjs";
3
3
  import { isString as i } from "@web-utils/core";
4
4
  import { computed as a, createVNode as o, mergeProps as s } from "vue";
5
5
  import { ElInputNumber as c } from "element-plus/es";
@@ -1,5 +1,5 @@
1
- import { i as e, n as t } from "./Cj59E77g.mjs";
2
- import { n } from "./CSyJ-vEx.mjs";
1
+ import { i as e, n as t } from "./D_qiRmiE.mjs";
2
+ import { n } from "./CJdkjadi.mjs";
3
3
  import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
4
  import { ElSwitch as o } from "element-plus/es";
5
5
  //#region src/components/form/props/switch.ts
@@ -1,6 +1,6 @@
1
- import { d as e } from "./cmuHpsX6.mjs";
2
- import { o as t, r as n } from "./Cj59E77g.mjs";
3
- import { n as r } from "./CSyJ-vEx.mjs";
1
+ import { f as e } from "./DcTVYqeJ.mjs";
2
+ import { o as t, r as n } from "./D_qiRmiE.mjs";
3
+ import { n as r } from "./CJdkjadi.mjs";
4
4
  import { createVNode as i, isVNode as a, mergeProps as o } from "vue";
5
5
  import { ElImage as s } from "element-plus/es";
6
6
  //#region src/components/form/props/image.ts