@web-utils/form-ui 1.0.0-beta27 → 1.0.0-beta29

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