@web-utils/component 4.0.13 → 4.0.15

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