@web-utils/form-ui 1.0.0-beta50 → 1.0.0-beta51

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 (47) hide show
  1. package/chunks/{zwXzk9ff2.mjs → BG8z3V9d2.mjs} +204 -129
  2. package/chunks/{kflKDW4T2.mjs → BQk3-Ppb2.mjs} +1 -1
  3. package/chunks/{hzaYr6Ud2.mjs → BQyL45PF2.mjs} +1 -1
  4. package/chunks/{Cln3RBAD.mjs → BWh6u1O0.mjs} +1 -1
  5. package/chunks/{Dkd5BC98.mjs → Bwbtu2cp.mjs} +0 -4
  6. package/chunks/{vXQf89tS.mjs → C7G-cAoI.mjs} +1 -1
  7. package/chunks/{BUGCiCnl.mjs → CXsoKP22.mjs} +4 -1
  8. package/chunks/{CqoVAnxC2.mjs → CqVd8D222.mjs} +0 -4
  9. package/chunks/{BA2KEptL.mjs → DKwp6AMl.mjs} +0 -4
  10. package/chunks/{D0Zg2CV0.mjs → D_Fs3bkZ.mjs} +1 -1
  11. package/chunks/{CxTg0r4n.mjs → Dt3lfDnL.mjs} +1 -1
  12. package/chunks/{cqIZWDHo.mjs → YFiU0ngn.mjs} +174 -166
  13. package/chunks/{B-zqRAXo.mjs → wDS9KBFw.mjs} +2 -4
  14. package/confirm-button/index.d.ts +9 -2
  15. package/confirm-button/index.mjs +1 -1
  16. package/confirmable/index.d.ts +9 -2
  17. package/confirmable/index.mjs +1 -1
  18. package/constants/index.d.ts +1 -0
  19. package/constants/index.mjs +2 -2
  20. package/editable-tree/index.mjs +1 -1
  21. package/form-button/index.d.ts +9 -2
  22. package/form-cascader/index.d.ts +8 -8
  23. package/form-cascader/index.mjs +1 -1
  24. package/form-input-cron-expression/index.mjs +1 -1
  25. package/form-input-time/index.d.ts +8 -8
  26. package/form-input-time/index.mjs +1 -1
  27. package/form-table-plus/index.mjs +1 -1
  28. package/form-time-select/index.d.ts +8 -8
  29. package/form-time-select/index.mjs +1 -1
  30. package/index.css +1 -1
  31. package/index.mjs +12 -12
  32. package/package.json +1 -1
  33. package/pageable-table/index.d.ts +2 -0
  34. package/pageable-table/index.mjs +1 -1
  35. package/pageable-table/style.css +1 -1
  36. package/sub-table/index.mjs +154 -89
  37. package/sub-table-plus/index.d.ts +4 -1
  38. package/sub-table-plus/index.mjs +1 -1
  39. package/table-column/index.mjs +1 -1
  40. package/table-view/index.d.ts +2 -1
  41. package/table-view/index.mjs +111 -108
  42. package/toolbar/index.mjs +1 -1
  43. package/toolbar-button/index.d.ts +2 -2
  44. package/toolbar-button/index.mjs +1 -1
  45. package/vue-cron/index.mjs +1 -1
  46. package/web-types.json +1 -1
  47. package/x-input-tag/index.mjs +1 -1
@@ -1,4 +1,4 @@
1
- import { t as e } from "./CxTg0r4n.mjs";
1
+ import { t as e } from "./Dt3lfDnL.mjs";
2
2
  import { t } from "./CkOD-_VV.mjs";
3
3
  import { copy as n } from "@web-utils/core";
4
4
  import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, openBlock as u, renderList as d, toDisplayString as f, withCtx as p } from "vue";
@@ -55,7 +55,10 @@ var s = t({
55
55
  type: String,
56
56
  default: "warning"
57
57
  },
58
- confirmTitle: String,
58
+ confirmTitle: {
59
+ type: String,
60
+ default: "系统提示"
61
+ },
59
62
  loadable: Boolean,
60
63
  loadingText: {
61
64
  type: String,
@@ -7,10 +7,6 @@ var s = {
7
7
  ...n,
8
8
  ...r,
9
9
  modelValue: String,
10
- disabled: {
11
- type: Boolean,
12
- default: !1
13
- },
14
10
  editable: {
15
11
  type: Boolean,
16
12
  default: !0
@@ -15,10 +15,6 @@ var s = {
15
15
  type: Boolean,
16
16
  default: !1
17
17
  },
18
- disabled: {
19
- type: Boolean,
20
- default: !1
21
- },
22
18
  editable: {
23
19
  type: Boolean,
24
20
  default: !0
@@ -1,6 +1,6 @@
1
1
  import { i as e, n as t } from "./D_qiRmiE.mjs";
2
2
  import { n, t as r } from "./CJdkjadi.mjs";
3
- import { t as i } from "./vXQf89tS.mjs";
3
+ import { t as i } from "./C7G-cAoI.mjs";
4
4
  import { createVNode as a, mergeProps as o, ref as s } from "vue";
5
5
  import { ElInput as c, ElPopover as l } from "element-plus/es";
6
6
  //#region src/components/form/props/input-cron.ts
@@ -50,7 +50,7 @@ var h = {
50
50
  loadingIcon: [String, Object],
51
51
  disabled: {
52
52
  type: Boolean,
53
- default: !1
53
+ default: void 0
54
54
  },
55
55
  icon: [String, Object],
56
56
  autofocus: {
@@ -1,17 +1,16 @@
1
1
  import { d as e, n as t, r as n } from "./DcTVYqeJ.mjs";
2
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";
3
+ import { cellClickHandlerContextKey as i, pageableTableContextKey as a } from "../constants/index.mjs";
4
+ import { t as o } from "./Dt3lfDnL.mjs";
5
+ import s from "../element-resize-observer/index.mjs";
6
+ import { t as c } from "./wDS9KBFw.mjs";
7
+ import { useVisibilityChange as l } from "../hook/useVisibilityChange.mjs";
8
+ import { Fragment as ee, 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 te, openBlock as y, provide as b, reactive as x, ref as S, toDisplayString as C, useModel as w, useTemplateRef as T, watch as E, withCtx as D } from "vue";
10
9
  import { ElMessage as ne } from "element-plus";
11
- import { ElCheckbox as D, ElDrawer as O, ElEmpty as re, ElPagination as ie, ElRadio as k, ElTable as A, ElTableColumn as j } from "element-plus/es";
12
- import { useEventBus as ae } from "@web-utils/vue/hooks/useEventBus";
10
+ import { ElCheckbox as O, ElDrawer as k, ElEmpty as A, ElPagination as re, ElRadio as j, ElTable as M, ElTableColumn as N } from "element-plus/es";
11
+ import { useEventBus as ie } from "@web-utils/vue/hooks/useEventBus";
13
12
  //#region src/components/table/components/TableColumnFilter.vue
14
- var oe = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
13
+ var ae = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
15
14
  __name: "TableColumnFilter",
16
15
  props: /* @__PURE__ */ g({ columns: {
17
16
  type: Array,
@@ -25,7 +24,7 @@ var oe = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
25
24
  }),
26
25
  emits: ["update:modelValue"],
27
26
  setup(e, { expose: t }) {
28
- let n = C(e, "modelValue"), r = b({}), i = b({}), a = b({}), o = b({}), s = (e, t, n) => {
27
+ let n = w(e, "modelValue"), r = x({}), i = x({}), a = x({}), o = x({}), s = (e, t, n) => {
29
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);
30
29
  };
31
30
  return t({
@@ -34,7 +33,7 @@ var oe = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
34
33
  filterableProps: a,
35
34
  sortableProps: o
36
35
  }), (t, r) => {
37
- let i = j, a = D, o = A, c = O;
36
+ let i = N, a = O, o = M, c = k;
38
37
  return y(), d(c, {
39
38
  modelValue: n.value,
40
39
  "onUpdate:modelValue": r[0] || (r[0] = (e) => n.value = e),
@@ -42,41 +41,41 @@ var oe = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
42
41
  title: "表格设置",
43
42
  "append-to-body": ""
44
43
  }, {
45
- default: E(() => [p(o, {
44
+ default: D(() => [p(o, {
46
45
  data: e.columns,
47
46
  border: ""
48
47
  }, {
49
- default: E(() => [
48
+ default: D(() => [
50
49
  p(i, { label: "列名" }, {
51
- default: E(({ row: e }) => [f(S(e.label), 1)]),
50
+ default: D(({ row: e }) => [f(C(e.label), 1)]),
52
51
  _: 1
53
52
  }),
54
53
  p(i, {
55
54
  label: "隐藏",
56
55
  align: "center"
57
56
  }, {
58
- default: E(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "hide") }, null, 8, ["onChange"])]),
57
+ default: D(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "hide") }, null, 8, ["onChange"])]),
59
58
  _: 1
60
59
  }),
61
60
  p(i, {
62
61
  label: "冻结",
63
62
  align: "center"
64
63
  }, {
65
- default: E(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "fixed") }, null, 8, ["onChange"])]),
64
+ default: D(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "fixed") }, null, 8, ["onChange"])]),
66
65
  _: 1
67
66
  }),
68
67
  p(i, {
69
68
  label: "过滤",
70
69
  align: "center"
71
70
  }, {
72
- default: E(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "filterable") }, null, 8, ["onChange"])]),
71
+ default: D(({ row: e }) => [p(a, { onChange: (t) => s(t, e, "filterable") }, null, 8, ["onChange"])]),
73
72
  _: 1
74
73
  }),
75
74
  p(i, {
76
75
  label: "排序",
77
76
  align: "center"
78
77
  }, {
79
- default: E(({ row: e }) => [p(a, {
78
+ default: D(({ row: e }) => [p(a, {
80
79
  title: e.allowSort ? null : "该列不支持排序!",
81
80
  disabled: !e.allowSort,
82
81
  onChange: (t) => s(t, e, "sortable")
@@ -97,19 +96,19 @@ var oe = /* @__PURE__ */ Object.assign({ name: "TableColumnFilter" }, {
97
96
  });
98
97
  //#endregion
99
98
  //#region src/components/table/components/TableColumnFilterable.vue?vue&type=script&lang.jsx
100
- function M(e) {
99
+ function P(e) {
101
100
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !h(e);
102
101
  }
103
102
  //#endregion
104
103
  //#region src/components/table/components/TableColumnFilterable.vue
105
- var N = {
104
+ var F = {
106
105
  name: "TableColumnFilterable",
107
106
  props: {
108
107
  filterable: Boolean,
109
108
  prop: String
110
109
  },
111
110
  setup(e, { attrs: t, slots: n }) {
112
- let r = m(i, null), a = u(() => {
111
+ let r = m(a, null), i = u(() => {
113
112
  if (e.filterable && r) return (e, t, n) => t[n.property] === e;
114
113
  }), o = u(() => {
115
114
  if (e.filterable && r) return [...new Set(r.records.value.map((t) => t[e.prop]).filter((e) => e))].map((e) => ({
@@ -117,14 +116,14 @@ var N = {
117
116
  value: e
118
117
  }));
119
118
  });
120
- return () => p(s, _(t, {
119
+ return () => p(c, _(t, {
121
120
  prop: e.prop,
122
121
  filterable: e.filterable,
123
- filterMethod: a.value,
122
+ filterMethod: i.value,
124
123
  filters: o.value
125
- }), M(n) ? n : { default: () => [n] });
124
+ }), P(n) ? n : { default: () => [n] });
126
125
  }
127
- }, P = {
126
+ }, I = {
128
127
  data: {
129
128
  type: Array,
130
129
  default: () => []
@@ -298,113 +297,115 @@ var N = {
298
297
  payloadStyle: String,
299
298
  disabledRowKeys: Array,
300
299
  selectExport: Boolean,
301
- useVisibilityChange: Boolean
302
- }, F = { data: !0 }, se = (e) => F[e] !== !0;
300
+ useVisibilityChange: Boolean,
301
+ rowDbClick: Function
302
+ }, L = { data: !0 }, oe = (e) => L[e] !== !0;
303
303
  //#endregion
304
304
  //#region src/components/table/PageableTable.vue?vue&type=script&lang.jsx
305
- function ce(e) {
305
+ function se(e) {
306
306
  let t = "";
307
307
  for (let n in e) t += `<TableColumnDef prop="${n}" label="${n}"/>\n`;
308
308
  return t;
309
309
  }
310
- var I = {
310
+ var R = {
311
311
  loading: 1,
312
312
  error: -1,
313
313
  empty: 2,
314
314
  success: 0
315
- }, L = {
315
+ }, z = {
316
316
  name: "PageableTable",
317
317
  emits: { "page-loaded": null },
318
318
  inheritAttrs: !1,
319
- props: { ...P },
320
- setup(s, { emit: d, attrs: m, slots: h, expose: g }) {
321
- let y = w("table"), b = w("settingPanel"), S = x(I.empty), C = x([]), E = x(null), D = x(!1), O = x([]), M = x({
319
+ props: { ...I },
320
+ setup(c, { emit: d, attrs: m, slots: h, expose: g }) {
321
+ b(i, c.rowDbClick);
322
+ let y = T("table"), x = T("settingPanel"), C = S(R.empty), w = S([]), D = S(null), O = S(!1), k = S([]), P = S({
322
323
  total: 0,
323
324
  page: 1,
324
- limit: s.pageSize,
325
- ascs: s.ascs,
326
- descs: s.descs
327
- }), P = x(0), F = x(0), L = u(() => s.reloadOnModelChange ? {
328
- asc: M.value.ascs,
329
- desc: M.value.descs,
330
- page: M.value.page,
331
- limit: M.value.limit,
332
- model: s.model
325
+ limit: c.pageSize,
326
+ ascs: c.ascs,
327
+ descs: c.descs
328
+ }), I = S(0), L = S(0), z = u(() => c.reloadOnModelChange ? {
329
+ asc: P.value.ascs,
330
+ desc: P.value.descs,
331
+ page: P.value.page,
332
+ limit: P.value.limit,
333
+ model: c.model
333
334
  } : {
334
- asc: M.value.ascs,
335
- desc: M.value.descs,
336
- page: M.value.page,
337
- limit: M.value.limit
338
- }), R = u(() => {
335
+ asc: P.value.ascs,
336
+ desc: P.value.descs,
337
+ page: P.value.page,
338
+ limit: P.value.limit
339
+ }), B = u(() => {
339
340
  var e;
340
- let t = `${(M.value.page - 1) * M.value.limit + (((e = C.value) == null ? void 0 : e.length) ?? 0)}`;
341
+ let t = `${(P.value.page - 1) * P.value.limit + (((e = w.value) == null ? void 0 : e.length) ?? 0)}`;
341
342
  return t.length > 3 ? 60 + (t.length - 3) * 10 : 60;
342
- }), z = () => {
343
- V();
344
- }, B = (e, t, n) => {
345
- if (s.clickRowSelect && $(e)) {
343
+ }), V = () => {
344
+ U();
345
+ }, H = (e, t, n) => {
346
+ if (c.clickRowSelect && $(e)) {
346
347
  var r;
347
- if (O.value.find((t) => t[s.rowKey] === e[s.rowKey])) {
348
+ if (k.value.find((t) => t[c.rowKey] === e[c.rowKey])) {
348
349
  var i;
349
350
  (i = y.value) == null || i.toggleRowSelection(e, !1);
350
351
  return;
351
352
  }
352
353
  (r = y.value) == null || r.toggleRowSelection(e);
353
354
  }
354
- }, V = () => {
355
+ }, U = () => {
355
356
  var e, t;
356
357
  let n = (e = y.value) == null || (e = e.$children) == null ? void 0 : e.find((e) => {
357
358
  var t;
358
359
  return ((t = e.$options) == null ? void 0 : t.name) === "ElTableBody";
359
360
  });
360
361
  n == null || (t = n.$refs) == null || (t = t.tooltip) == null || t.hide();
361
- }, H = ({ scrollLeft: e, scrollTop: t }) => {
362
- P.value = t, F.value = e;
363
- }, U = () => {
364
- X(P.value, F.value);
365
- }, W = (e) => t(ce(e)), le = ({ prop: e, order: t }) => {
366
- s.payloadStyle === "body" ? (M.value.ascs = t === "ascending" ? [e] : s.ascs, M.value.descs = t === "descending" ? [e] : s.descs) : (M.value.ascs = t === "ascending" ? e : "", M.value.descs = t === "descending" ? e : "");
362
+ }, W = ({ scrollLeft: e, scrollTop: t }) => {
363
+ I.value = t, L.value = e;
364
+ }, G = () => {
365
+ pe(I.value, L.value);
366
+ }, ce = (e) => t(se(e)), le = ({ prop: e, order: t }) => {
367
+ c.payloadStyle === "body" ? (P.value.ascs = t === "ascending" ? [e] : c.ascs, P.value.descs = t === "descending" ? [e] : c.descs) : (P.value.ascs = t === "ascending" ? e : "", P.value.descs = t === "descending" ? e : "");
367
368
  }, ue = (e) => {
368
- $(e) && (E.value = e);
369
+ $(e) && (D.value = e);
369
370
  }, de = (e) => {
370
- O.value = e;
371
- }, G = () => {
371
+ k.value = e;
372
+ }, K = () => {
372
373
  var e;
373
374
  (e = y.value) == null || e.clearSelection();
374
375
  }, fe = () => {
375
376
  let e;
376
- return e = s.payloadStyle === "body" ? {
377
+ return e = c.payloadStyle === "body" ? {
377
378
  page: {
378
- ...M.value,
379
- current: M.value.page,
380
- size: M.value.limit
379
+ ...P.value,
380
+ current: P.value.page,
381
+ size: P.value.limit
381
382
  },
382
- example: s.model || {}
383
+ example: c.model || {}
383
384
  } : {
384
- ...M.value,
385
- current: M.value.page,
386
- size: M.value.limit,
387
- ...s.model || {}
388
- }, s.selectExport && (s.rowKey ? e.exportKeys = O.value.map((e) => e[s.rowKey]) : e.exportKeys = O.value.map((e) => C.value.indexOf(e))), e;
389
- }, K = async (e = !0) => {
390
- if (!s.api && s.data !== !1) {
385
+ ...P.value,
386
+ current: P.value.page,
387
+ size: P.value.limit,
388
+ ...c.model || {}
389
+ }, c.selectExport && (c.rowKey ? e.exportKeys = k.value.map((e) => e[c.rowKey]) : e.exportKeys = k.value.map((e) => w.value.indexOf(e))), e;
390
+ }, q = async (e = !0) => {
391
+ if (!c.api && c.data !== !1) {
391
392
  var t;
392
- C.value = s.data, M.value.page = 1, M.value.total = (t = C.value) == null ? void 0 : t.length, M.value.limit = M.value.total;
393
+ w.value = c.data, P.value.page = 1, P.value.total = (t = w.value) == null ? void 0 : t.length, P.value.limit = P.value.total;
393
394
  return;
394
395
  }
395
- e !== !1 && (C.value = []);
396
+ e !== !1 && (w.value = []);
396
397
  let n, r = fe();
397
- if (s.api) {
398
- e !== !1 && (S.value = I.loading);
398
+ if (c.api) {
399
+ e !== !1 && (C.value = R.loading);
399
400
  try {
400
- s.api && (n = await s.api(r));
401
+ c.api && (n = await c.api(r));
401
402
  } catch {
402
- S.value = I.error;
403
+ C.value = R.error;
403
404
  return;
404
405
  }
405
- } else if (s.data) n = { data: { data: {
406
- total: s.data.length,
407
- records: s.data
406
+ } else if (c.data) n = { data: { data: {
407
+ total: c.data.length,
408
+ records: c.data
408
409
  } } };
409
410
  else {
410
411
  ne.warning({
@@ -414,73 +415,73 @@ var I = {
414
415
  return;
415
416
  }
416
417
  let { data: { data: i } = {} } = n || {}, { total: a, records: o } = i || {};
417
- M.value.total = Number(a), C.value = await pe(o), !o || !o.length ? S.value = I.empty : S.value = I.success, q(), d("page-loaded", i);
418
- }, q = () => {
418
+ P.value.total = Number(a), w.value = await me(o), !o || !o.length ? C.value = R.empty : C.value = R.success, J(), d("page-loaded", i);
419
+ }, J = () => {
419
420
  v(() => {
420
421
  var e;
421
422
  (e = y.value) == null || e.doLayout();
422
423
  });
423
- }, J = async (e) => {
424
- await K(e);
425
- }, Y = () => {
426
- M.value = {
424
+ }, Y = async (e) => {
425
+ await q(e);
426
+ }, X = () => {
427
+ P.value = {
427
428
  total: 0,
428
429
  page: 1,
429
- limit: s.pageSize,
430
- ascs: s.ascs,
431
- descs: s.descs
430
+ limit: c.pageSize,
431
+ ascs: c.ascs,
432
+ descs: c.descs
432
433
  };
433
- }, X = (e, t) => {
434
+ }, pe = (e, t) => {
434
435
  y.value.setScrollTop(e), y.value.setScrollLeft(t);
435
436
  }, Z = (e, t) => {
436
437
  var n;
437
438
  (n = y.value) == null || n.toggleRowSelection(e, t);
438
- }, pe = async (e) => {
439
+ }, me = async (e) => {
439
440
  if (!e) return [];
440
441
  let t = [...e];
441
- for (let e of t) for (let t of s.dicOptions) if (e[`$${t.prop}`] = e[t.prop], t.dicData) {
442
+ for (let e of t) for (let t of c.dicOptions) if (e[`$${t.prop}`] = e[t.prop], t.dicData) {
442
443
  var n;
443
444
  e[t.prop] = ((n = t.dicData.find((n) => n.modelValue === e[t.prop])) == null ? void 0 : n.label) || e[t.prop];
444
445
  } else e[t.prop] = await r(t.dicType, e[t.prop]);
445
446
  return t;
446
447
  }, Q = () => {
447
- D.value = !D.value;
448
+ O.value = !O.value;
448
449
  }, $ = (e) => {
449
450
  var t;
450
- return !(e != null && e.disabled) && !((t = s.disabledRowKeys) != null && t.includes(e == null ? void 0 : e[s.rowKey]));
451
+ return !(e != null && e.disabled) && !((t = c.disabledRowKeys) != null && t.includes(e == null ? void 0 : e[c.rowKey]));
451
452
  };
452
- s.useVisibilityChange && c({ onPageVisible: () => {
453
- J(!1);
454
- } }), ae("reloadTableView", (e) => {
455
- e === s.viewId && K();
456
- }), T(() => s.url, Y), T(() => s.api, Y), T(() => s.data, K), T(() => L.value, K, {
453
+ c.useVisibilityChange && l({ onPageVisible: () => {
454
+ Y(!1);
455
+ } }), ie("reloadTableView", (e) => {
456
+ e === c.viewId && q();
457
+ }), E(() => c.url, X), E(() => c.api, X), E(() => c.data, q), E(() => z.value, q, {
457
458
  deep: !0,
458
- immediate: s.immediate
459
- }), ee(() => {
460
- U();
459
+ immediate: c.immediate
460
+ }), te(() => {
461
+ G();
461
462
  }), g({
462
- records: C,
463
- getPage: K,
464
- refresh: J,
465
- reload: Y,
466
- doLayout: q,
467
- clearSelection: G,
463
+ records: w,
464
+ getPage: q,
465
+ refresh: Y,
466
+ reload: X,
467
+ doLayout: J,
468
+ clearSelection: K,
468
469
  toggleRowSelection: Z,
469
470
  toggleSettings: Q
470
- }), te(i, {
471
- records: C,
472
- getPage: K,
473
- refresh: J,
474
- reload: Y,
475
- doLayout: q,
476
- clearSelection: G,
471
+ }), b(a, {
472
+ records: w,
473
+ getPage: q,
474
+ refresh: Y,
475
+ reload: X,
476
+ doLayout: J,
477
+ clearSelection: K,
477
478
  toggleRowSelection: Z,
478
479
  toggleSettings: Q
479
480
  });
480
- let { autoBindProps: me, listeners: he } = e(s, { predicate: se });
481
+ let { autoBindProps: he, listeners: ge } = e(c, { predicate: oe });
481
482
  return () => {
482
483
  var e;
483
- 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 = [];
484
+ let t = D.value && D.value[m["row-key"] || c.rowKey || "id"] === (D.value && c.rowKey ? D.value[c.rowKey] : (e = D.value) == null ? void 0 : e.id), r = [];
484
485
  if (h.default) {
485
486
  var i;
486
487
  let e = n((i = h.default) == null ? void 0 : i.call(h));
@@ -494,99 +495,106 @@ var I = {
494
495
  };
495
496
  i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), r.push(l);
496
497
  }
497
- } else if (s.columns) for (let e = 0; e < s.columns.length; e++) {
498
- let { prop: t, sortable: n, fixed: i, ...a } = s.columns[e], o = {
498
+ } else if (c.columns) for (let e = 0; e < c.columns.length; e++) {
499
+ let { prop: t, sortable: n, fixed: i, ...a } = c.columns[e], o = {
499
500
  ...a,
500
501
  prop: t,
501
502
  allowSort: n !== !1
502
503
  };
503
- 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);
504
+ x.value && (o.hide = x.value.hideProps[t], o.filterable = x.value.filterableProps[t], o.sortable = x.value.sortableProps[t] === !0, o.fixed = i || x.value.fixedProps[t]), r.push(o);
504
505
  }
505
- return p("div", { class: ["pageable-table", { "auto-height": s.autoHeight }] }, [p("div", { class: "pageable-table-wrapper" }, [
506
- h.toolbar && h.toolbar({ selectedRows: O.value }),
507
- p(A, _(he.value, me.value, {
506
+ return p("div", {
507
+ class: [
508
+ "pageable-table",
509
+ { "auto-height": c.autoHeight },
510
+ m.class
511
+ ],
512
+ style: m.style
513
+ }, [p("div", { class: "pageable-table-wrapper" }, [
514
+ h.toolbar && h.toolbar({ selectedRows: k.value }),
515
+ p(M, _(ge.value, he.value, {
508
516
  ref: "table",
509
- data: C.value,
510
- class: ["flex-item", { "header-bold": s.headerBold }],
511
- border: s.border,
517
+ data: w.value,
518
+ class: ["flex-item", { "header-bold": c.headerBold }],
519
+ border: c.border,
512
520
  stripe: !0,
513
521
  size: "default",
514
- height: s.autoHeight ? null : "auto",
515
- onScroll: H,
522
+ height: c.autoHeight ? null : "auto",
523
+ onScroll: W,
516
524
  onSortChange: le,
517
- onRowDblclick: z,
518
- onRowClick: B,
519
- onCellClick: V,
525
+ onRowDblclick: V,
526
+ onRowClick: H,
527
+ onCellClick: U,
520
528
  onCurrentChange: ue,
521
529
  onSelectionChange: de
522
530
  }), {
523
531
  default: () => {
524
532
  let e = [];
525
- if (s.multiple && s.selection && e.push(p(j, {
533
+ if (c.multiple && c.selection && e.push(p(N, {
526
534
  key: "selection",
527
535
  type: "selection",
528
536
  selectable: $,
529
- width: s.selectionWidth,
537
+ width: c.selectionWidth,
530
538
  align: "center"
531
- }, null)), !s.multiple && s.selection && e.push(p(j, {
539
+ }, null)), !c.multiple && c.selection && e.push(p(N, {
532
540
  key: "single-selection",
533
541
  type: "single-selection",
534
542
  "class-name": "single-select-column",
535
- width: s.selectionWidth,
543
+ width: c.selectionWidth,
536
544
  align: "center"
537
545
  }, {
538
- header: () => p(k, {
539
- modelValue: !!E.value,
546
+ header: () => p(j, {
547
+ modelValue: !!D.value,
540
548
  label: !0
541
549
  }, { default: () => [p("span", null, null)] }),
542
- default: ({ row: e }) => p(k, {
550
+ default: ({ row: e }) => p(j, {
543
551
  label: !0,
544
552
  disabled: !$(e),
545
553
  modelValue: t
546
554
  }, { default: () => [p("span", null, null)] })
547
- })), s.index && e.push(p(j, {
555
+ })), c.index && e.push(p(N, {
548
556
  key: "index",
549
557
  type: "index",
550
558
  label: "序号",
551
- width: R.value,
559
+ width: B.value,
552
560
  align: "center"
553
- }, { default: ({ $index: e }) => (M.value.page - 1) * M.value.limit + e + 1 || e + 1 })), r.length > 0) for (let t = 0; t < r.length; t++) {
561
+ }, { 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++) {
554
562
  let n = r[t];
555
563
  if (n.hide) continue;
556
564
  let { prop: i, headerSlot: a, defaultSlot: o, expandSlot: s, iconSlot: c, ...l } = n;
557
- e.push(p(N, _(l, { prop: i }), {
565
+ e.push(p(F, _(l, { prop: i }), {
558
566
  default: h[i] ? ({ row: e }) => h[i]({ row: e }) : o,
559
567
  header: a,
560
568
  expand: s,
561
569
  "filter-icon": c
562
570
  }));
563
571
  }
564
- else e.push(p(j, {
572
+ else e.push(p(N, {
565
573
  key: "default",
566
574
  label: "点击表格行复制模板"
567
575
  }, { default: ({ row: e }) => p("pre", {
568
576
  class: "pointer",
569
- onClick: () => W(e)
577
+ onClick: () => ce(e)
570
578
  }, [JSON.stringify(e, null, " ")]) }));
571
579
  return e;
572
580
  },
573
- empty: () => h.empty ? h.empty() : p(l, null, [
574
- S.value === I.loading && p("span", { class: "pageable-table-loading" }, [p("i", { class: "table-status-icon el-icon-loading" }, null), f("加载中...")]),
575
- S.value === I.error && p(a, {
581
+ empty: () => h.empty ? h.empty() : p(ee, null, [
582
+ C.value === R.loading && p("span", { class: "pageable-table-loading" }, [p("i", { class: "table-status-icon el-icon-loading" }, null), f("加载中...")]),
583
+ C.value === R.error && p(o, {
576
584
  class: "pageable-table-error",
577
- onClick: J
585
+ onClick: Y
578
586
  }, { default: () => [p("i", { class: "table-status-icon el-icon-error" }, null), f("加载失败,点击重试!")] }),
579
- S.value !== I.loading && S.value !== I.error && p(re, null, null)
587
+ C.value !== R.loading && C.value !== R.error && p(A, null, null)
580
588
  ]),
581
589
  append: h.append
582
590
  }),
583
- s.paging && p(ie, {
584
- "current-page": M.value.page,
585
- "onUpdate:current-page": (e) => M.value.page = e,
586
- "hide-on-single-page": s.hideOnSinglePage,
587
- "page-size": M.value.limit,
588
- "onUpdate:page-size": (e) => M.value.limit = e,
589
- total: M.value.total,
591
+ c.paging && p(re, {
592
+ "current-page": P.value.page,
593
+ "onUpdate:current-page": (e) => P.value.page = e,
594
+ "hide-on-single-page": c.hideOnSinglePage,
595
+ "page-size": P.value.limit,
596
+ "onUpdate:page-size": (e) => P.value.limit = e,
597
+ total: P.value.total,
590
598
  "page-sizes": [
591
599
  10,
592
600
  25,
@@ -600,15 +608,15 @@ var I = {
600
608
  background: !0,
601
609
  layout: "total, sizes, prev, pager, next, jumper"
602
610
  }, null),
603
- p(oe, {
611
+ p(ae, {
604
612
  ref: "settingPanel",
605
- modelValue: D.value,
606
- "onUpdate:modelValue": (e) => D.value = e,
613
+ modelValue: O.value,
614
+ "onUpdate:modelValue": (e) => O.value = e,
607
615
  columns: r
608
616
  }, null)
609
- ]), p(o, { onNotify: q }, null)]);
617
+ ]), p(s, { onNotify: J }, null)]);
610
618
  };
611
619
  }
612
620
  };
613
621
  //#endregion
614
- export { L as t };
622
+ export { z as t };