@web-utils/component 4.0.15 → 4.0.16

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 (169) hide show
  1. package/address-input/index.mjs +13 -15
  2. package/card/index.mjs +18 -20
  3. package/carousel/index.mjs +10 -12
  4. package/chat/index.mjs +45 -56
  5. package/chunk-file-uploader/index.mjs +36 -378
  6. package/chunk-file-uploader/style.css +1 -1
  7. package/chunks/ElementBaseInfo.ZADwixb5.mjs +125 -0
  8. package/chunks/ElementForm.CQ3PN5qj.mjs +223 -0
  9. package/chunks/ElementListeners.De_PRuIm.mjs +215 -0
  10. package/chunks/ElementMultiInstance.DQo2wuAQ.mjs +181 -0
  11. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
  12. package/chunks/ElementProperties.CosfDrlW.mjs +112 -0
  13. package/chunks/{ElementTaskConfig.AvBOzAni.mjs → ElementTaskConfig.Bko0kgTp.mjs} +55 -63
  14. package/chunks/FlowCondition.Y6qEYi1T.mjs +102 -0
  15. package/chunks/FormTemp.BQxO5IQq.mjs +123 -0
  16. package/chunks/SignalAndMessage.Bb5PFX0N.mjs +85 -0
  17. package/chunks/UserTaskListeners.Bv3BDfEI.mjs +169 -0
  18. package/chunks/{confirmable-mixin.BFZb6pcK.mjs → confirmable-mixin.B2TtLAdk.mjs} +1 -1
  19. package/chunks/core.0Exl13Mz.mjs +54 -0
  20. package/chunks/{dataformat.DJoNBlmI.mjs → dataformat.CpqOeGBl.mjs} +6 -6
  21. package/chunks/{dic.BinnDitI.mjs → dic.Dkl-leRW.mjs} +9 -9
  22. package/chunks/dictionary.DGt59Ir7.mjs +68 -0
  23. package/chunks/{event.DSlcqYHL.mjs → event.9aDS6jcw.mjs} +2 -2
  24. package/chunks/{form-input.BtS_J5a2.mjs → form-input.CvFdwlEV.mjs} +2 -2
  25. package/chunks/form-item.LWjePsPa.mjs +233 -0
  26. package/chunks/{index.CIfe3UB3.mjs → index.9OxHjTIE.mjs} +2 -2
  27. package/chunks/{index.Cn7aq-Et.mjs → index.B2TRddqf.mjs} +8 -8
  28. package/chunks/{init.xOlFpTyZ.mjs → init.DAsXSoLW.mjs} +2 -2
  29. package/chunks/sub-table-plus-props.BVsD71hT.mjs +30 -0
  30. package/chunks/{util.DI42t5GU.mjs → util.DqFv_pWg.mjs} +22 -22
  31. package/chunks/utilSelf.Csq1766E.mjs +48 -0
  32. package/chunks/utils.DRcxC1Fb.mjs +60 -0
  33. package/color-picker/index.mjs +22 -101
  34. package/confirm-button/index.mjs +1 -1
  35. package/confirmable/index.mjs +1 -1
  36. package/data-box/index.mjs +12 -15
  37. package/data-card/index.mjs +10 -12
  38. package/data-card-text/index.mjs +10 -12
  39. package/data-display/index.mjs +15 -17
  40. package/data-icons/index.mjs +13 -16
  41. package/data-imgtext/index.mjs +15 -18
  42. package/data-operatext/index.mjs +14 -16
  43. package/data-panel/index.mjs +13 -16
  44. package/data-pay/index.mjs +16 -20
  45. package/data-price/index.mjs +14 -16
  46. package/data-progress/index.mjs +13 -17
  47. package/data-rotate/index.mjs +12 -15
  48. package/data-table-picker/index.mjs +15 -18
  49. package/data-tabs/index.mjs +12 -15
  50. package/dialog-form/index.mjs +16 -18
  51. package/dynamic-table/index.mjs +25 -30
  52. package/editable-progress/index.mjs +9 -11
  53. package/editable-tree/index.mjs +52 -56
  54. package/egd-collapse-item/index.mjs +9 -9
  55. package/element-dialog/index.mjs +22 -23
  56. package/element-listeners/style.css +1 -0
  57. package/element-multi-instance/style.css +1 -0
  58. package/flex-column/index.mjs +1 -1
  59. package/flex-item/index.mjs +1 -1
  60. package/flex-row/index.mjs +1 -1
  61. package/flow/index.mjs +10 -11
  62. package/flow-designer/index.mjs +699 -1973
  63. package/flow-designer/style.css +1 -1
  64. package/flow-node/index.mjs +1 -1
  65. package/flow-viewer/index.mjs +9 -9
  66. package/form-block/index.mjs +32 -34
  67. package/form-cascader/index.mjs +23 -24
  68. package/form-checkbox/index.mjs +16 -17
  69. package/form-checkbox-group/index.mjs +20 -23
  70. package/form-date-picker/index.mjs +18 -20
  71. package/form-holder/index.mjs +13 -14
  72. package/form-input/index.mjs +14 -15
  73. package/form-input-cron-expression/index.mjs +19 -22
  74. package/form-input-email/index.mjs +15 -16
  75. package/form-input-id-card/index.mjs +12 -13
  76. package/form-input-number/index.mjs +16 -17
  77. package/form-input-phone-number/index.mjs +21 -22
  78. package/form-input-tag/index.mjs +14 -15
  79. package/form-input-time/index.mjs +14 -15
  80. package/form-item/index.mjs +140 -3
  81. package/form-item-group/index.mjs +28 -31
  82. package/form-radio-group/index.mjs +27 -28
  83. package/form-select/index.mjs +21 -23
  84. package/form-switch/index.mjs +16 -17
  85. package/form-table/index.mjs +16 -17
  86. package/form-table-plus/index.mjs +21 -22
  87. package/form-textarea/index.mjs +15 -16
  88. package/form-tree-select/index.mjs +14 -15
  89. package/form-tree-select-multiple/index.mjs +14 -15
  90. package/form-view/index.mjs +35 -39
  91. package/fy-array/index.mjs +33 -37
  92. package/fy-cascader/index.mjs +16 -17
  93. package/fy-checkbox/index.mjs +11 -13
  94. package/fy-code/index.mjs +10 -10
  95. package/fy-curd/index.mjs +1128 -1152
  96. package/fy-date/index.mjs +10 -11
  97. package/fy-draggable/index.mjs +9 -10
  98. package/fy-dynamic/index.mjs +22 -25
  99. package/fy-empty/index.mjs +1 -1
  100. package/fy-form/index.mjs +638 -15
  101. package/fy-form-design/index.mjs +1307 -1345
  102. package/fy-from/crud/zh.d.ts +6 -6
  103. package/fy-input/index.mjs +12 -14
  104. package/fy-input-color/index.mjs +13 -15
  105. package/fy-input-icon/index.mjs +20 -23
  106. package/fy-input-map/index.mjs +28 -31
  107. package/fy-input-number/index.mjs +9 -10
  108. package/fy-input-table/index.mjs +18 -22
  109. package/fy-input-tree/index.mjs +33 -37
  110. package/fy-progress/index.mjs +9 -10
  111. package/fy-radio/index.mjs +15 -16
  112. package/fy-rate/index.mjs +10 -11
  113. package/fy-select/index.mjs +25 -29
  114. package/fy-slider/index.mjs +11 -12
  115. package/fy-switch/index.mjs +9 -10
  116. package/fy-tabs/index.mjs +15 -17
  117. package/fy-time/index.mjs +1 -1
  118. package/fy-title/index.mjs +1 -1
  119. package/fy-tree/index.mjs +18 -24
  120. package/fy-u-editor/index.mjs +1 -1
  121. package/fy-upload/index.mjs +74 -76
  122. package/guide-steps/index.mjs +11 -13
  123. package/iframe-window/index.mjs +9 -10
  124. package/image-cropper/index.mjs +28 -30
  125. package/image-preview/index.mjs +12 -14
  126. package/index.mjs +72 -72
  127. package/input-number/index.mjs +13 -14
  128. package/input-number-range/index.mjs +11 -12
  129. package/license/index.mjs +1 -1
  130. package/login/index.mjs +21 -26
  131. package/nav-bar/index.mjs +9 -10
  132. package/notice/index.mjs +9 -10
  133. package/package.json +1 -1
  134. package/page-index/index.mjs +12 -13
  135. package/page-index-top/index.mjs +23 -28
  136. package/page-skeleton/index.mjs +14 -14
  137. package/page-skeleton-new/index.mjs +8 -9
  138. package/pageable-table/index.mjs +172 -182
  139. package/pageable-view/index.mjs +15 -16
  140. package/picker-table-view/index.mjs +49 -58
  141. package/present-view/index.mjs +35 -39
  142. package/record-video/index.mjs +1 -1
  143. package/resize-observer/index.mjs +1 -1
  144. package/search/index.mjs +20 -22
  145. package/search-popover/index.mjs +1 -1
  146. package/sign/index.mjs +1 -1
  147. package/skeleton-panel/index.mjs +9 -10
  148. package/split-pane/index.mjs +36 -37
  149. package/static-pageable-table/index.mjs +11 -13
  150. package/sub-table/index.mjs +36 -49
  151. package/sub-table-plus/index.mjs +229 -18
  152. package/swiper/index.mjs +11 -12
  153. package/table-column/index.mjs +223 -3
  154. package/table-view/index.mjs +52 -60
  155. package/tabs-view/index.mjs +17 -19
  156. package/tag-render/index.mjs +16 -18
  157. package/text-ellipsis/index.mjs +9 -10
  158. package/toolbar/index.mjs +13 -14
  159. package/toolbar-button/index.mjs +13 -14
  160. package/verify/index.mjs +1 -1
  161. package/vue-cron/index.mjs +259 -267
  162. package/watermark/index.mjs +1 -1
  163. package/web-types.json +1 -1
  164. package/x-input-tag/index.mjs +21 -24
  165. package/chunks/FormItem.Bhsy_O2B.mjs +0 -372
  166. package/chunks/FyForm.DriwCJ7b.mjs +0 -765
  167. package/chunks/SignalAndMessage.BpjOoKhK.mjs +0 -92
  168. package/chunks/SubTablePlus.BH0IIv3X.mjs +0 -270
  169. package/chunks/TableColumn.BzivvXMF.mjs +0 -337
@@ -1,61 +1,20 @@
1
- import O from "../resize-observer/index.mjs";
2
- import b from "element-ui/lib/checkbox";
3
- import d from "element-ui/lib/table-column";
4
- import v from "element-ui/lib/table";
5
- import W from "element-ui/lib/drawer";
6
- import { n as _ } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
7
- import F from "element-ui/lib/pagination";
8
- import { T as f, g as V } from "../chunks/TableColumn.BzivvXMF.mjs";
9
- import { _ as w } from "../chunks/helper.BiMLcEEk.mjs";
1
+ import { copy as v, hasOwn as P } from "@web-utils/core";
2
+ import S from "element-ui/lib/message";
3
+ import { g as _, f as C, i as B, j as A } from "../chunks/index.B2TRddqf.mjs";
4
+ import { merge as f } from "@web-utils/integrations/lodash";
5
+ import { g as K } from "../chunks/dictionary.DGt59Ir7.mjs";
6
+ import { _ as T } from "../chunks/helper.BiMLcEEk.mjs";
10
7
  import "vue";
11
- import x from "element-ui/lib/radio";
12
- import D from "element-ui/lib/empty";
13
- import M from "element-ui/lib/button";
14
- import { copy as U, hasOwn as N } from "@web-utils/core";
15
- import T from "element-ui/lib/message";
16
- import { g as k, f as R, a as H, b as j } from "../chunks/index.Cn7aq-Et.mjs";
17
- import { merge as m } from "@web-utils/integrations/lodash";
18
- import { isEqual as Q } from "lodash-es";
19
- const q = {
20
- name: "TableColumnFilter",
21
- props: {
22
- columns: {
23
- type: Array,
24
- default: () => []
25
- },
26
- visible: Boolean
27
- }
28
- };
29
- var I = function() {
30
- var e = this, l = e._self._c;
31
- return l(W, { staticClass: "table-column-filter", attrs: { visible: e.visible, title: "表格设置", "append-to-body": "" }, on: { "update:visible": (s) => e.$emit("update:visible", s) } }, [l(v, { attrs: { data: e.columns, border: "" } }, [l(d, { attrs: { label: "列名" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
32
- return [e._v(" " + e._s(s.label) + " ")];
33
- } }]) }), l(d, { attrs: { label: "隐藏", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
34
- return [l(b, { model: { value: s.hide, callback: function(i) {
35
- e.$set(s, "hide", i);
36
- }, expression: "row.hide" } })];
37
- } }]) }), l(d, { attrs: { label: "冻结", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
38
- return [l(b, { model: { value: s.fixed, callback: function(i) {
39
- e.$set(s, "fixed", i);
40
- }, expression: "row.fixed" } })];
41
- } }]) }), l(d, { attrs: { label: "过滤", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
42
- return [l(b, { model: { value: s.filterable, callback: function(i) {
43
- e.$set(s, "filterable", i);
44
- }, expression: "row.filterable" } })];
45
- } }]) }), l(d, { attrs: { label: "排序", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
46
- return [l(b, { attrs: { title: s.allowSort ? null : "该列不支持排序!", disabled: !s.allowSort }, model: { value: s.sortable, callback: function(i) {
47
- e.$set(s, "sortable", i);
48
- }, expression: "row.sortable" } })];
49
- } }]) })], 1)], 1);
50
- }, J = [], X = /* @__PURE__ */ _(
51
- q,
52
- I,
53
- J,
54
- !1,
55
- null,
56
- null
57
- );
58
- const P = X.exports, G = {
8
+ import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
9
+ import { isEqual as L } from "lodash-es";
10
+ function F(t) {
11
+ v(
12
+ t,
13
+ () => _(S).success({ duration: 1e3, message: "复制成功!", type: "success" }),
14
+ () => _(S).error({ duration: 1e3, message: "复制失败!", type: "error" })
15
+ );
16
+ }
17
+ const z = {
59
18
  name: "TableColumnFilterable",
60
19
  functional: !0,
61
20
  /**
@@ -67,9 +26,9 @@ const P = X.exports, G = {
67
26
  render(t, e) {
68
27
  const {
69
28
  data: {
70
- key: l
29
+ key: s
71
30
  },
72
- props: s,
31
+ props: l,
73
32
  parent: {
74
33
  records: i
75
34
  },
@@ -78,53 +37,84 @@ const P = X.exports, G = {
78
37
  hide: o,
79
38
  isVNode: n,
80
39
  filterable: r,
81
- allowSort: S,
82
- autoUpdate: u,
83
- scopedSlots: E,
84
- prop: $,
85
- ...B
86
- } = s, C = `${l}-${r}${u ? `-${Math.random()}`.replace("0.", "") : ""}`, h = {
40
+ allowSort: g,
41
+ autoUpdate: d,
42
+ scopedSlots: x,
43
+ prop: m,
44
+ ...$
45
+ } = l, y = `${s}-${r}${d ? `-${Math.random()}`.replace("0.", "") : ""}`, u = {
87
46
  props: {
88
- prop: $,
89
- ...B
47
+ prop: m,
48
+ ...$
90
49
  }
91
50
  };
92
51
  if (r) {
93
- const A = [...new Set(i.map((p) => p[$]).filter((p) => p))].map((p) => ({
94
- text: p,
95
- value: p
52
+ const w = [...new Set(i.map((c) => c[m]).filter((c) => c))].map((c) => ({
53
+ text: c,
54
+ value: c
96
55
  }));
97
- h.props.filterMethod = (p, K, L) => {
98
- const z = L.property;
99
- return K[z] === p;
100
- }, h.props.filters = A;
56
+ u.props.filterMethod = (c, k, E) => {
57
+ const R = E.property;
58
+ return k[R] === c;
59
+ }, u.props.filters = w;
101
60
  }
102
- const g = E || a;
103
- return g != null && g.default ? t(d, w([{}, h, {
104
- scopedSlots: g,
105
- key: C
106
- }])) : t(f, w([{}, h, {
107
- key: C
61
+ const h = x || a;
62
+ return h != null && h.default ? t("ElTableColumn", T([{}, u, {
63
+ scopedSlots: h,
64
+ key: y
65
+ }])) : t("TableColumn", T([{}, u, {
66
+ key: y
108
67
  }]));
109
68
  }
110
- }, Y = null, Z = null;
111
- var ee = /* @__PURE__ */ _(
112
- G,
113
- Y,
114
- Z,
69
+ }, O = null, W = null;
70
+ var V = /* @__PURE__ */ b(
71
+ z,
72
+ O,
73
+ W,
115
74
  !1,
116
75
  null,
117
76
  null
118
77
  );
119
- const y = ee.exports;
120
- function te(t) {
121
- U(
122
- t,
123
- () => k(T).success({ duration: 1e3, message: "复制成功!", type: "success" }),
124
- () => k(T).error({ duration: 1e3, message: "复制失败!", type: "error" })
125
- );
126
- }
127
- const se = {
78
+ const D = V.exports, M = {
79
+ name: "TableColumnFilter",
80
+ props: {
81
+ columns: {
82
+ type: Array,
83
+ default: () => []
84
+ },
85
+ visible: Boolean
86
+ }
87
+ };
88
+ var U = function() {
89
+ var e = this, s = e._self._c;
90
+ return s("ElDrawer", { staticClass: "table-column-filter", attrs: { visible: e.visible, title: "表格设置", "append-to-body": "" }, on: { "update:visible": (l) => e.$emit("update:visible", l) } }, [s("ElTable", { attrs: { data: e.columns, border: "" } }, [s("ElTableColumn", { attrs: { label: "列名" }, scopedSlots: e._u([{ key: "default", fn: function({ row: l }) {
91
+ return [e._v(" " + e._s(l.label) + " ")];
92
+ } }]) }), s("ElTableColumn", { attrs: { label: "隐藏", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: l }) {
93
+ return [s("ElCheckbox", { model: { value: l.hide, callback: function(i) {
94
+ e.$set(l, "hide", i);
95
+ }, expression: "row.hide" } })];
96
+ } }]) }), s("ElTableColumn", { attrs: { label: "冻结", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: l }) {
97
+ return [s("ElCheckbox", { model: { value: l.fixed, callback: function(i) {
98
+ e.$set(l, "fixed", i);
99
+ }, expression: "row.fixed" } })];
100
+ } }]) }), s("ElTableColumn", { attrs: { label: "过滤", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: l }) {
101
+ return [s("ElCheckbox", { model: { value: l.filterable, callback: function(i) {
102
+ e.$set(l, "filterable", i);
103
+ }, expression: "row.filterable" } })];
104
+ } }]) }), s("ElTableColumn", { attrs: { label: "排序", align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: l }) {
105
+ return [s("ElCheckbox", { attrs: { title: l.allowSort ? null : "该列不支持排序!", disabled: !l.allowSort }, model: { value: l.sortable, callback: function(i) {
106
+ e.$set(l, "sortable", i);
107
+ }, expression: "row.sortable" } })];
108
+ } }]) })], 1)], 1);
109
+ }, N = [], j = /* @__PURE__ */ b(
110
+ M,
111
+ U,
112
+ N,
113
+ !1,
114
+ null,
115
+ null
116
+ );
117
+ const H = j.exports, Q = {
128
118
  props: {
129
119
  useVisibilityChange: Boolean
130
120
  },
@@ -141,32 +131,32 @@ const se = {
141
131
  }
142
132
  }
143
133
  };
144
- function le(t, e) {
145
- const l = t.map((i) => {
146
- const { hide: a, filterable: o, allowSort: n, sortable: r, fixed: S, ...u } = i;
147
- return u;
148
- }), s = e.map((i) => {
149
- const { hide: a, filterable: o, allowSort: n, sortable: r, fixed: S, ...u } = i;
150
- return u;
134
+ function q(t, e) {
135
+ const s = t.map((i) => {
136
+ const { hide: a, filterable: o, allowSort: n, sortable: r, fixed: g, ...d } = i;
137
+ return d;
138
+ }), l = e.map((i) => {
139
+ const { hide: a, filterable: o, allowSort: n, sortable: r, fixed: g, ...d } = i;
140
+ return d;
151
141
  });
152
- return Q(l, s);
142
+ return L(s, l);
153
143
  }
154
- function ae(t) {
144
+ function I(t) {
155
145
  let e = "";
156
- for (const l in t)
157
- e += `<TableColumn prop="${l}" label="${l}"/>
146
+ for (const s in t)
147
+ e += `<TableColumn prop="${s}" label="${s}"/>
158
148
  `;
159
149
  return e;
160
150
  }
161
- const c = {
151
+ const p = {
162
152
  loading: 1,
163
153
  error: -1,
164
154
  empty: 2,
165
155
  success: 0
166
- }, ie = {
156
+ }, J = {
167
157
  name: "PageableTable",
168
- components: { TableColumnFilter: P, TableColumnFilterable: y },
169
- mixins: [se],
158
+ components: { TableColumnFilter: H, TableColumnFilterable: D },
159
+ mixins: [Q],
170
160
  emits: ["page-loaded", "row-dblclick"],
171
161
  bus: {
172
162
  reloadTableView(t) {
@@ -243,8 +233,8 @@ const c = {
243
233
  data() {
244
234
  const t = this.pageSize;
245
235
  return {
246
- TABLE_STATUS: Object.freeze(c),
247
- tableStatus: c.empty,
236
+ TABLE_STATUS: Object.freeze(p),
237
+ tableStatus: p.empty,
248
238
  records: [],
249
239
  currentRow: null,
250
240
  showSettings: !1,
@@ -271,11 +261,11 @@ const c = {
271
261
  return t.length > 3 ? 60 + (t.length - 3) * 10 : 60;
272
262
  },
273
263
  mergeAttrs() {
274
- return m({}, this.$attrs, { height: this.autoHeight ? null : "auto" });
264
+ return f({}, this.$attrs, { height: this.autoHeight ? null : "auto" });
275
265
  },
276
266
  headers() {
277
267
  var t;
278
- return ((t = this.columns) == null ? void 0 : t.map(R)) || [];
268
+ return ((t = this.columns) == null ? void 0 : t.map(C)) || [];
279
269
  }
280
270
  },
281
271
  watch: {
@@ -288,13 +278,13 @@ const c = {
288
278
  () => ({ columns: this.columns, renderKey: this.renderKey }),
289
279
  (t) => {
290
280
  const e = [];
291
- let l = null;
281
+ let s = null;
292
282
  if (t) {
293
- const s = this.$slots.default, { columns: i } = t;
294
- s ? s.forEach((a) => {
283
+ const l = this.$slots.default, { columns: i } = t;
284
+ l ? l.forEach((a) => {
295
285
  if (!a.isComment && a.data) {
296
286
  const { attrs: o, props: n, scopedSlots: r } = a.data;
297
- a.data.props = a.data.props || {}, a.data.props.type === "expand" ? l = {
287
+ a.data.props = a.data.props || {}, a.data.props.type === "expand" ? s = {
298
288
  ...o,
299
289
  ...n,
300
290
  scopedSlots: r,
@@ -316,7 +306,7 @@ const c = {
316
306
  });
317
307
  }
318
308
  }) : i && i.forEach((a) => {
319
- a.type === "expand" ? l = {
309
+ a.type === "expand" ? s = {
320
310
  ...a,
321
311
  props: a,
322
312
  hide: !1,
@@ -333,7 +323,7 @@ const c = {
333
323
  sortable: !1,
334
324
  fixed: a.fixed
335
325
  });
336
- }), this.updateExpandColumn(l), this.updateColumns(e);
326
+ }), this.updateExpandColumn(s), this.updateColumns(e);
337
327
  }
338
328
  },
339
329
  { immediate: !0 }
@@ -352,34 +342,34 @@ const c = {
352
342
  rowDbClick(...t) {
353
343
  this.hideTooltip(), this.$emit("row-dblclick", ...t);
354
344
  },
355
- rowClick(t, e, l) {
345
+ rowClick(t, e, s) {
356
346
  if (this.clickRowSelect && this.selectable(t)) {
357
- const s = this.$refs.table;
347
+ const l = this.$refs.table;
358
348
  if (this.selectedRows.find((a) => a[this.rowKey] === t[this.rowKey])) {
359
- s.toggleRowSelection(t, !1);
349
+ l.toggleRowSelection(t, !1);
360
350
  return;
361
351
  }
362
- s.toggleRowSelection(t);
352
+ l.toggleRowSelection(t);
363
353
  }
364
354
  },
365
355
  hideTooltip() {
366
356
  var e;
367
- const t = this.$refs.table.$children.find((l) => {
368
- var s;
369
- return ((s = l.$options) == null ? void 0 : s.name) === "ElTableBody";
357
+ const t = this.$refs.table.$children.find((s) => {
358
+ var l;
359
+ return ((l = s.$options) == null ? void 0 : l.name) === "ElTableBody";
370
360
  });
371
361
  (e = t == null ? void 0 : t.$refs.tooltip) == null || e.hide();
372
362
  },
373
363
  updateTableScrollPosition() {
374
364
  this.$refs.table.bodyWrapper && this.scrollTo(this.tableScrollTop, this.tableScrollLeft);
375
365
  },
376
- filterTableProperties: j,
377
- filterTableEvents: H,
378
- filterTableColumnProperties: R,
366
+ filterTableProperties: A,
367
+ filterTableEvents: B,
368
+ filterTableColumnProperties: C,
379
369
  onTableScroll() {
380
370
  this.tableScrollTop = this.$refs.table.bodyWrapper.scrollTop, this.tableScrollLeft = this.$refs.table.bodyWrapper.scrollLeft;
381
371
  },
382
- copy: (t) => te(ae(t)),
372
+ copy: (t) => F(I(t)),
383
373
  onSortChange({ prop: t, order: e }) {
384
374
  this.payloadStyle !== "body" ? (this.page.ascs = e === "ascending" ? t : "", this.page.descs = e === "descending" ? t : "") : (this.page.ascs = e === "ascending" ? [t] : this.ascs, this.page.descs = e === "descending" ? [t] : this.descs);
385
375
  },
@@ -398,19 +388,19 @@ const c = {
398
388
  },
399
389
  async getPage(t) {
400
390
  var o;
401
- if (N(this.$attrs, "data") && this.$attrs.data !== !1) {
391
+ if (P(this.$attrs, "data") && this.$attrs.data !== !1) {
402
392
  this.records = this.$attrs.data, this.page.page = 1, this.page.total = (o = this.records) == null ? void 0 : o.length, this.page.limit = this.page.total;
403
393
  return;
404
394
  }
405
395
  t !== !1 && (this.records = []);
406
396
  let e;
407
- const l = this.getPageQuery();
397
+ const s = this.getPageQuery();
408
398
  if (this.api || this.url) {
409
- t !== !1 && (this.tableStatus = c.loading);
399
+ t !== !1 && (this.tableStatus = p.loading);
410
400
  try {
411
- this.api && (e = await this.api(l));
401
+ this.api && (e = await this.api(s));
412
402
  } catch {
413
- this.tableStatus = c.error;
403
+ this.tableStatus = p.error;
414
404
  return;
415
405
  }
416
406
  } else {
@@ -421,9 +411,9 @@ const c = {
421
411
  return;
422
412
  }
423
413
  const {
424
- data: { data: s }
425
- } = e || {}, { total: i, records: a } = s || {};
426
- this.page.total = Number(i), this.records = await this.mapRow(a), !a || !a.length ? this.tableStatus = c.empty : this.tableStatus = c.success, this.doLayout(), this.$emit("page-loaded", s);
414
+ data: { data: l }
415
+ } = e || {}, { total: i, records: a } = l || {};
416
+ this.page.total = Number(i), this.records = await this.mapRow(a), !a || !a.length ? this.tableStatus = p.empty : this.tableStatus = p.success, this.doLayout(), this.$emit("page-loaded", l);
427
417
  },
428
418
  doLayout() {
429
419
  var t;
@@ -442,9 +432,9 @@ const c = {
442
432
  this.$refs.table.toggleRowSelection(t, e);
443
433
  },
444
434
  mapRow(t) {
445
- return t.map((e) => (this.dicOptions.forEach(async (l) => {
446
- var s;
447
- e[`$${l.prop}`] = e[l.prop], l.dicData ? e[l.prop] = ((s = l.dicData.find((i) => i.value === e[l.prop])) == null ? void 0 : s.label) || e[l.prop] : e[l.prop] = await V(l.dicType, e[l.prop]);
435
+ return t.map((e) => (this.dicOptions.forEach(async (s) => {
436
+ var l;
437
+ e[`$${s.prop}`] = e[s.prop], s.dicData ? e[s.prop] = ((l = s.dicData.find((i) => i.value === e[s.prop])) == null ? void 0 : l.label) || e[s.prop] : e[s.prop] = await K(s.dicType, e[s.prop]);
448
438
  }), e));
449
439
  },
450
440
  toggleSettings() {
@@ -455,20 +445,20 @@ const c = {
455
445
  return !(t != null && t.disabled) && !((e = this.disabledRowKeys) != null && e.includes(t == null ? void 0 : t[this.rowKey]));
456
446
  },
457
447
  updateExpandColumn(t) {
458
- t && this.expandColumn ? m(this.expandColumn, t) : this.expandColumn = t;
448
+ t && this.expandColumn ? f(this.expandColumn, t) : this.expandColumn = t;
459
449
  },
460
450
  updateColumns(t) {
461
- if (!le(this.tableColumns, t)) {
451
+ if (!q(this.tableColumns, t)) {
462
452
  const e = {};
463
- this.tableColumns.forEach((l) => {
464
- e[l.prop] = l;
465
- }), t.map((l) => {
466
- const s = e[l.prop];
467
- if (s) {
468
- const { hide: i, filterable: a, allowSort: o, sortable: n, fixed: r } = s;
469
- return m(s, l), s.hide = i, s.filterable = a, s.allowSort = o, s.sortable = n, s.fixed = r, s;
453
+ this.tableColumns.forEach((s) => {
454
+ e[s.prop] = s;
455
+ }), t.map((s) => {
456
+ const l = e[s.prop];
457
+ if (l) {
458
+ const { hide: i, filterable: a, allowSort: o, sortable: n, fixed: r } = l;
459
+ return f(l, s), l.hide = i, l.filterable = a, l.allowSort = o, l.sortable = n, l.fixed = r, l;
470
460
  }
471
- return l;
461
+ return s;
472
462
  }), this.tableColumns = t;
473
463
  }
474
464
  },
@@ -477,46 +467,46 @@ const c = {
477
467
  }
478
468
  }
479
469
  };
480
- var oe = function() {
481
- var e = this, l = e._self._c;
482
- return l("div", { class: ["pageable-table", { "auto-height": e.autoHeight }] }, [l("div", { staticClass: "pageable-table-wrapper" }, [e._t("toolbar", null, { selectedRows: e.selectedRows }), l(v, e._g(e._b({ ref: "table", class: ["flex-item", { "header-bold": e.headerBold }], attrs: { data: e.records, border: e.border, stripe: "", size: "medium" }, on: { "hook:updated": e.updateTableScrollPosition, "sort-change": e.onSortChange, "row-dblclick": e.rowDbClick, "row-click": e.rowClick, "cell-click": e.hideTooltip, "current-change": e.onCurrentChange, "selection-change": e.handleSelectionChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
470
+ var X = function() {
471
+ var e = this, s = e._self._c;
472
+ return s("div", { class: ["pageable-table", { "auto-height": e.autoHeight }] }, [s("div", { staticClass: "pageable-table-wrapper" }, [e._t("toolbar", null, { selectedRows: e.selectedRows }), s("ElTable", e._g(e._b({ ref: "table", class: ["flex-item", { "header-bold": e.headerBold }], attrs: { data: e.records, border: e.border, stripe: "", size: "medium" }, on: { "hook:updated": e.updateTableScrollPosition, "sort-change": e.onSortChange, "row-dblclick": e.rowDbClick, "row-click": e.rowClick, "cell-click": e.hideTooltip, "current-change": e.onCurrentChange, "selection-change": e.handleSelectionChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
483
473
  return [e._t("empty", function() {
484
- return [e.tableStatus === e.TABLE_STATUS.loading ? [l("span", { staticClass: "pageable-table-loading" }, [l("i", { staticClass: "table-status-icon el-icon-loading" }), e._v(" 加载中... ")])] : e.tableStatus === e.TABLE_STATUS.error ? [l(M, { staticClass: "pageable-table-error", attrs: { icon: "table-status-icon el-icon-error" }, on: { click: e.refresh } }, [e._v("加载失败,点击重试!")])] : l(D)];
474
+ return [e.tableStatus === e.TABLE_STATUS.loading ? [s("span", { staticClass: "pageable-table-loading" }, [s("i", { staticClass: "table-status-icon el-icon-loading" }), e._v(" 加载中... ")])] : e.tableStatus === e.TABLE_STATUS.error ? [s("ElButton", { staticClass: "pageable-table-error", attrs: { icon: "table-status-icon el-icon-error" }, on: { click: e.refresh } }, [e._v("加载失败,点击重试!")])] : s("ElEmpty")];
485
475
  })];
486
476
  }, proxy: !0 }, { key: "append", fn: function() {
487
477
  return [e._t("append")];
488
- }, proxy: !0 }], null, !0) }, "ElTable", e.filterTableProperties(e.mergeAttrs), !1), e.filterTableEvents(e.$listeners)), [e.expandColumn ? l(y, e._b({}, "TableColumnFilterable", e.expandColumn, !1)) : e._e(), e.multiple && e.selection ? l(f, { key: "multiple", attrs: { type: "selection", selectable: e.selectable, width: e.selectionWidth, align: "center" } }) : e._e(), !e.multiple && e.selection ? l(f, { key: "single", attrs: { sortable: !1, type: "single-selection", "class-name": "single-select-column", width: e.selectionWidth, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function() {
489
- return [l(x, { attrs: { value: !!e.currentRow, label: !0 } }, [l("span")])];
490
- }, proxy: !0 }, { key: "default", fn: function({ row: s }) {
491
- return [l(x, { attrs: { label: !0, disabled: !e.selectable(s), value: e.currentRow && e.currentRow[e.$attrs["row-key"] || e.rowKey || "id"] === s[e.$attrs["row-key"] || e.rowKey || "id"] } }, [l("span")])];
492
- } }], null, !1, 1270221895) }) : e._e(), e.index ? l(f, { key: "order", attrs: { type: "index", label: "序号", width: e.indexWidth, align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ $index: s }) {
493
- return [e._v(" " + e._s((e.page.page - 1) * e.page.limit + s + 1 || s + 1) + " ")];
494
- } }], null, !1, 4238275121) }) : e._e(), e.tableColumns ? e._l(e.tableColumns.filter((s) => !s.hide), function(s, i) {
478
+ }, proxy: !0 }], null, !0) }, "ElTable", e.filterTableProperties(e.mergeAttrs), !1), e.filterTableEvents(e.$listeners)), [e.expandColumn ? s("TableColumnFilterable", e._b({}, "TableColumnFilterable", e.expandColumn, !1)) : e._e(), e.multiple && e.selection ? s("TableColumn", { key: "multiple", attrs: { type: "selection", selectable: e.selectable, width: e.selectionWidth, align: "center" } }) : e._e(), !e.multiple && e.selection ? s("TableColumn", { key: "single", attrs: { sortable: !1, type: "single-selection", "class-name": "single-select-column", width: e.selectionWidth, align: "center" }, scopedSlots: e._u([{ key: "header", fn: function() {
479
+ return [s("ElRadio", { attrs: { value: !!e.currentRow, label: !0 } }, [s("span")])];
480
+ }, proxy: !0 }, { key: "default", fn: function({ row: l }) {
481
+ return [s("ElRadio", { attrs: { label: !0, disabled: !e.selectable(l), value: e.currentRow && e.currentRow[e.$attrs["row-key"] || e.rowKey || "id"] === l[e.$attrs["row-key"] || e.rowKey || "id"] } }, [s("span")])];
482
+ } }], null, !1, 1270221895) }) : e._e(), e.index ? s("TableColumn", { key: "order", attrs: { type: "index", label: "序号", width: e.indexWidth, align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ $index: l }) {
483
+ return [e._v(" " + e._s((e.page.page - 1) * e.page.limit + l + 1 || l + 1) + " ")];
484
+ } }], null, !1, 4238275121) }) : e._e(), e.tableColumns ? e._l(e.tableColumns.filter((l) => !l.hide), function(l, i) {
495
485
  var a, o;
496
- return l(y, e._b({ key: `${((a = s.props) == null ? void 0 : a.prop) || s.prop}-${i}`, scopedSlots: e._u([e.$scopedSlots[((o = s.props) == null ? void 0 : o.prop) || s.prop] ? { key: "default", fn: function({ row: n }) {
486
+ return s("TableColumnFilterable", e._b({ key: `${((a = l.props) == null ? void 0 : a.prop) || l.prop}-${i}`, scopedSlots: e._u([e.$scopedSlots[((o = l.props) == null ? void 0 : o.prop) || l.prop] ? { key: "default", fn: function({ row: n }) {
497
487
  var r;
498
- return [e._t(((r = s.props) == null ? void 0 : r.prop) || s.prop, null, { row: n })];
499
- } } : null], null, !0) }, "TableColumnFilterable", s, !1));
500
- }) : [l(f, { attrs: { label: "点击表格行复制模板" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
501
- return [l("pre", { staticClass: "pointer", on: { click: function(i) {
502
- return e.copy(s);
503
- } } }, [e._v(e._s(JSON.stringify(s, null, " ")))])];
504
- } }]) })]], 2), e.paging ? l(F, { staticClass: "flex-not-shrink", attrs: { "current-page": e.page.page, "hide-on-single-page": e.hideOnSinglePage, "page-size": e.page.limit, total: e.page.total, "page-sizes": [10, 25, 50, 100, 500, 1e3, 2e3], background: "", layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": (s) => {
505
- e.page.limit = s;
506
- }, "current-change": (s) => {
507
- e.page.page = s;
508
- } } }) : e._e(), l(P, { attrs: { visible: e.showSettings, columns: e.tableColumns }, on: { "update:visible": function(s) {
509
- e.showSettings = s;
510
- } } })], 2), l(O, { on: { notify: e.doLayout } })], 1);
511
- }, re = [], ne = /* @__PURE__ */ _(
512
- ie,
513
- oe,
514
- re,
488
+ return [e._t(((r = l.props) == null ? void 0 : r.prop) || l.prop, null, { row: n })];
489
+ } } : null], null, !0) }, "TableColumnFilterable", l, !1));
490
+ }) : [s("TableColumn", { attrs: { label: "点击表格行复制模板" }, scopedSlots: e._u([{ key: "default", fn: function({ row: l }) {
491
+ return [s("pre", { staticClass: "pointer", on: { click: function(i) {
492
+ return e.copy(l);
493
+ } } }, [e._v(e._s(JSON.stringify(l, null, " ")))])];
494
+ } }]) })]], 2), e.paging ? s("ElPagination", { staticClass: "flex-not-shrink", attrs: { "current-page": e.page.page, "hide-on-single-page": e.hideOnSinglePage, "page-size": e.page.limit, total: e.page.total, "page-sizes": [10, 25, 50, 100, 500, 1e3, 2e3], background: "", layout: "total, sizes, prev, pager, next, jumper" }, on: { "size-change": (l) => {
495
+ e.page.limit = l;
496
+ }, "current-change": (l) => {
497
+ e.page.page = l;
498
+ } } }) : e._e(), s("TableColumnFilter", { attrs: { visible: e.showSettings, columns: e.tableColumns }, on: { "update:visible": function(l) {
499
+ e.showSettings = l;
500
+ } } })], 2), s("ResizeObserver", { on: { notify: e.doLayout } })], 1);
501
+ }, G = [], Y = /* @__PURE__ */ b(
502
+ J,
503
+ X,
504
+ G,
515
505
  !1,
516
506
  null,
517
507
  null
518
508
  );
519
- const Re = ne.exports;
509
+ const ne = Y.exports;
520
510
  export {
521
- Re as default
511
+ ne as default
522
512
  };
@@ -1,9 +1,8 @@
1
- import p from "element-ui/lib/pagination";
2
1
  import { cloneDeep as n, merge as g } from "@web-utils/integrations/lodash";
3
- import { hasOwn as f, copy as u } from "@web-utils/core";
4
- import { f as h, a as m, b } from "../chunks/index.Cn7aq-Et.mjs";
5
- import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
- function y(e) {
2
+ import { hasOwn as p, copy as f } from "@web-utils/core";
3
+ import { f as h, i as u, j as m } from "../chunks/index.B2TRddqf.mjs";
4
+ import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ function S(e) {
7
6
  let t = "";
8
7
  for (const s in e)
9
8
  t += `<ElTableColumn prop="${s}" label="${s}"/>
@@ -15,7 +14,7 @@ const i = {
15
14
  error: -1,
16
15
  empty: 2,
17
16
  success: 0
18
- }, v = {
17
+ }, y = {
19
18
  name: "PageableView",
20
19
  bus: {
21
20
  reloadTableView(e) {
@@ -156,13 +155,13 @@ const i = {
156
155
  updateTableScrollPosition() {
157
156
  this.$refs.scroller && this.scrollTo(this.tableScrollTop, this.tableScrollLeft);
158
157
  },
159
- filterTableProperties: b,
160
- filterTableEvents: m,
158
+ filterTableProperties: m,
159
+ filterTableEvents: u,
161
160
  filterTableColumnProperties: h,
162
161
  onTableScroll() {
163
162
  this.tableScrollTop = this.$refs.scroller.scrollTop, this.tableScrollLeft = this.$refs.scroller.scrollLeft;
164
163
  },
165
- copy: (e) => u(y(e)),
164
+ copy: (e) => f(S(e)),
166
165
  onSortChange({ prop: e, order: t }) {
167
166
  this.page.ascs = t === "ascending" ? e : "", this.page.descs = t === "descending" ? e : "";
168
167
  },
@@ -216,7 +215,7 @@ const i = {
216
215
  },
217
216
  async getPage() {
218
217
  var o;
219
- if (f(this.$attrs, "data")) {
218
+ if (p(this.$attrs, "data")) {
220
219
  this.records = this.$attrs.data, this.page.page = 1, this.page.total = this.records.length, this.page.limit = this.page.total;
221
220
  return;
222
221
  }
@@ -255,22 +254,22 @@ const i = {
255
254
  }
256
255
  }
257
256
  };
258
- var _ = function() {
257
+ var v = function() {
259
258
  var t = this, s = t._self._c;
260
259
  return s("div", { staticClass: "work", staticStyle: { height: "100%", "background-color": "#fff" } }, [s("div", { staticClass: "flex-column list-content", staticStyle: { height: "100%" } }, [s("div", { directives: [{ name: "loading", rawName: "v-loading", value: t.loading, expression: "loading" }], staticClass: "flex-item-relative", attrs: { "element-loading-text": "加载中...", "element-loading-background": "#fff" } }, [s("div", { ref: "scroller", staticClass: "scroll-wrapper" }, [s("div", { staticClass: "cards-block" }, [t._t("prepend"), t._l(t.records, function(l) {
261
260
  return [t._t("default", null, { item: l })];
262
- }), t._t("append")], 2)])]), s(p, { staticClass: "flex-not-shrink", staticStyle: { "border-top": "1px solid #ebeef5" }, attrs: { "current-page": t.page.page, "hide-on-single-page": t.hideOnSinglePage, "page-size": t.page.limit, total: t.page.total, background: "", layout: "total, prev, pager, next, jumper" }, on: { "current-change": (l) => {
261
+ }), t._t("append")], 2)])]), s("ElPagination", { staticClass: "flex-not-shrink", staticStyle: { "border-top": "1px solid #ebeef5" }, attrs: { "current-page": t.page.page, "hide-on-single-page": t.hideOnSinglePage, "page-size": t.page.limit, total: t.page.total, background: "", layout: "total, prev, pager, next, jumper" }, on: { "current-change": (l) => {
263
262
  t.page.page = l;
264
263
  } } })], 1)]);
265
- }, $ = [], T = /* @__PURE__ */ S(
264
+ }, $ = [], T = /* @__PURE__ */ b(
265
+ y,
266
266
  v,
267
- _,
268
267
  $,
269
268
  !1,
270
269
  null,
271
270
  null
272
271
  );
273
- const R = T.exports;
272
+ const x = T.exports;
274
273
  export {
275
- R as default
274
+ x as default
276
275
  };