@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,7 +1,5 @@
1
- import r from "element-ui/lib/pagination";
2
- import s from "element-ui/lib/table";
3
- import { chunk as o } from "@web-utils/integrations/lodash";
4
- import { n } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
1
+ import { chunk as r } from "@web-utils/integrations/lodash";
2
+ import { n as s } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
3
  const i = {
6
4
  name: "StaticPageableTable",
7
5
  props: {
@@ -41,26 +39,26 @@ const i = {
41
39
  },
42
40
  methods: {
43
41
  fetchData() {
44
- this.records = o(this.rows, this.page.limit)[this.page.page - 1];
42
+ this.records = r(this.rows, this.page.limit)[this.page.page - 1];
45
43
  }
46
44
  }
47
45
  };
48
- var p = function() {
46
+ var n = function() {
49
47
  var e = this, t = e._self._c;
50
- return t("div", { staticClass: "static-pageable-table" }, [t(s, e._g(e._b({ attrs: { size: "mini", data: e.records } }, "ElTable", e.$attrs, !1), e.$listeners), [e._t("default", function() {
48
+ return t("div", { staticClass: "static-pageable-table" }, [t("ElTable", e._g(e._b({ attrs: { size: "mini", data: e.records } }, "ElTable", e.$attrs, !1), e.$listeners), [e._t("default", function() {
51
49
  return [e._v("请添加表格列")];
52
- })], 2), t(r, { attrs: { "current-page": e.page.page, "hide-on-single-page": !0, "page-size": e.page.limit, total: e.page.total, background: "", layout: "total, prev, pager, next" }, on: { "current-change": (a) => {
50
+ })], 2), t("ElPagination", { attrs: { "current-page": e.page.page, "hide-on-single-page": !0, "page-size": e.page.limit, total: e.page.total, background: "", layout: "total, prev, pager, next" }, on: { "current-change": (a) => {
53
51
  e.page.page = a;
54
52
  } } })], 1);
55
- }, l = [], g = /* @__PURE__ */ n(
53
+ }, o = [], l = /* @__PURE__ */ s(
56
54
  i,
57
- p,
58
- l,
55
+ n,
56
+ o,
59
57
  !1,
60
58
  null,
61
59
  null
62
60
  );
63
- const d = g.exports;
61
+ const h = l.exports;
64
62
  export {
65
- d as default
63
+ h as default
66
64
  };
@@ -1,20 +1,7 @@
1
- import d from "../confirmable/index.mjs";
2
- import { T as u, _ as b } from "../chunks/TableColumn.BzivvXMF.mjs";
3
- import c from "../form-textarea/index.mjs";
4
- import f from "../form-input-number/index.mjs";
5
- import h from "../form-checkbox-group/index.mjs";
6
- import y from "../form-cascader/index.mjs";
7
- import g from "../form-date-picker/index.mjs";
8
- import _ from "../form-select/index.mjs";
9
- import v from "../form-input-phone-number/index.mjs";
10
- import I from "../form-input/index.mjs";
11
- import i from "element-ui/lib/button";
12
- import $ from "../confirm-button/index.mjs";
13
- import C from "../pageable-table/index.mjs";
14
- import { findTreeChildren as F, isFunction as A } from "@web-utils/core";
15
- import { cloneDeep as D } from "@web-utils/integrations/lodash";
16
- import { n as T } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
17
- const q = {
1
+ import { findTreeChildren as u, isFunction as d } from "@web-utils/core";
2
+ import { cloneDeep as i } from "@web-utils/integrations/lodash";
3
+ import { n as b } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
4
+ const c = {
18
5
  name: "SubTable",
19
6
  emits: ["add-row"],
20
7
  inject: {
@@ -98,7 +85,7 @@ const q = {
98
85
  },
99
86
  methods: {
100
87
  getCellType(n, e) {
101
- return A(e.getType) ? e.getType(n, e) : e.type;
88
+ return d(e.getType) ? e.getType(n, e) : e.type;
102
89
  },
103
90
  getInputAttr(n, e) {
104
91
  return { ...e.attrs, ...e.getAttrs ? e.getAttrs(n) : {} };
@@ -119,7 +106,7 @@ const q = {
119
106
  }
120
107
  },
121
108
  add(n, e) {
122
- const a = D(this.rowProps);
109
+ const a = i(this.rowProps);
123
110
  this.rows.splice(e + 1, 0, a);
124
111
  },
125
112
  addRow() {
@@ -152,24 +139,24 @@ const q = {
152
139
  getVal(n, e, a) {
153
140
  var t, r;
154
141
  if (a.type === "select" && ((t = a.attrs) != null && t.options)) {
155
- const p = a.attrs.options.find((s) => s.code === n[e.property]);
156
- if (p)
157
- return p.name;
142
+ const s = a.attrs.options.find((p) => p.code === n[e.property]);
143
+ if (s)
144
+ return s.name;
158
145
  }
159
146
  if (a.type === "cascader" && ((r = a.attrs) != null && r.options)) {
160
- const [p] = F(a.attrs.options, (s) => s[a.attrs.valueKey || "value"] === n[e.property]);
161
- if (p)
162
- return p[a.attrs.valueKey || "label"];
147
+ const [s] = u(a.attrs.options, (p) => p[a.attrs.valueKey || "value"] === n[e.property]);
148
+ if (s)
149
+ return s[a.attrs.valueKey || "label"];
163
150
  }
164
151
  return n[e.property];
165
152
  }
166
153
  }
167
154
  };
168
- var k = function() {
155
+ var h = function() {
169
156
  var e = this, a = e._self._c;
170
- return a(C, e._g(e._b({ ref: "table", staticClass: "sub-table", attrs: { "auto-height": "", data: e.rows, api: e.fetchApi, "show-summary": e.showSummary, "selection-width": e.selectionWidth, "hide-on-single-page": "", selection: e.enabled }, on: { "selection-change": e.onSelectionChange }, scopedSlots: e._u([e.editable ? null : { key: "toolbar", fn: function() {
157
+ return a("PageableTable", e._g(e._b({ ref: "table", staticClass: "sub-table", attrs: { "auto-height": "", data: e.rows, api: e.fetchApi, "show-summary": e.showSummary, "selection-width": e.selectionWidth, "hide-on-single-page": "", selection: e.enabled }, on: { "selection-change": e.onSelectionChange }, scopedSlots: e._u([e.editable ? null : { key: "toolbar", fn: function() {
171
158
  return [e.enabled || e.fetchApi ? a("div", { staticClass: "table-header" }, [e._t("toolbar", function() {
172
- return [e.enabled ? [a(i, { staticClass: "table-header-button add", attrs: { size: "mini", icon: "el-icon-circle-plus", type: "text" }, on: { click: e.addRow } }, [e._v("添加")]), a($, { staticClass: "table-header-button remove", attrs: { size: "mini", message: "您确定要删除选中的记录吗?", icon: "el-icon-error", type: "text" }, on: { click: e.delRow } }, [e._v(" 删除 ")])] : e._e(), e.fetchApi ? a(i, { staticClass: "table-header-button refresh", attrs: { size: "mini", icon: "el-icon-refresh-left", type: "text", disabled: !1 }, on: { click: e.refresh } }, [e._v(" 刷新 ")]) : e._e()];
159
+ return [e.enabled ? [a("ElButton", { staticClass: "table-header-button add", attrs: { size: "mini", icon: "el-icon-circle-plus", type: "text" }, on: { click: e.addRow } }, [e._v("添加")]), a("ConfirmButton", { staticClass: "table-header-button remove", attrs: { size: "mini", message: "您确定要删除选中的记录吗?", icon: "el-icon-error", type: "text" }, on: { click: e.delRow } }, [e._v(" 删除 ")])] : e._e(), e.fetchApi ? a("ElButton", { staticClass: "table-header-button refresh", attrs: { size: "mini", icon: "el-icon-refresh-left", type: "text", disabled: !1 }, on: { click: e.refresh } }, [e._v(" 刷新 ")]) : e._e()];
173
160
  }, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2) : e._e()];
174
161
  }, proxy: !0 }, e.allowEmpty && !e.inputDisabled && e.showEmptyAddButton ? { key: "empty", fn: function() {
175
162
  return [a("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
@@ -177,43 +164,43 @@ var k = function() {
177
164
  } } })];
178
165
  }, proxy: !0 } : null], null, !0) }, "PageableTable", e.$attrs, !1), e.$listeners), [e._t("columns", function() {
179
166
  return [e._l(e.columns, function(t) {
180
- return [t.label && !t.hide && !t.slot ? a(u, { key: `${t.prop}-${e.enabled}-${t.type}`, attrs: { label: t.label, width: t.width, align: t.align, prop: t.prop, options: t.options, "show-overflow-tooltip": !e.available && t.showOverflowTooltip }, scopedSlots: e._u([{ key: "header", fn: function() {
167
+ return [t.label && !t.hide && !t.slot ? a("TableColumn", { key: `${t.prop}-${e.enabled}-${t.type}`, attrs: { label: t.label, width: t.width, align: t.align, prop: t.prop, options: t.options, "show-overflow-tooltip": !e.available && t.showOverflowTooltip }, scopedSlots: e._u([{ key: "header", fn: function() {
181
168
  return [!e.inputDisabled && t.required ? a("span", { staticStyle: { color: "#f56c6c" } }, [e._v("*")]) : e._e(), e._v(" " + e._s(t.label) + " ")];
182
- }, proxy: !0 }, { key: "default", fn: function({ row: r, column: p, $index: s }) {
183
- return [e._t("tag", null, { row: r, column: p, index: s }), e._t(t.prop, function() {
169
+ }, proxy: !0 }, { key: "default", fn: function({ row: r, column: s, $index: p }) {
170
+ return [e._t("tag", null, { row: r, column: s, index: p }), e._t(t.prop, function() {
184
171
  var o;
185
- return [e.available && e.getCellType(r, t) === "input" ? [a(I, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInput", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "inputPhoneNumber" ? [a(v, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputPhoneNumber", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "user" ? [t.single ? a("FormInputUser", e._b({ attrs: { name: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { "update:name": function(l) {
186
- return e.$set(r, p.property, l);
187
- }, input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : a("FormInputUser", e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "department" ? [t.single ? a("FormInputDepartment", e._b({ attrs: { "ou-type": t.ouType, name: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { "update:name": function(l) {
188
- return e.$set(r, p.property, l);
189
- }, input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : a("FormInputDepartment", e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "select" ? [a(_, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, options: t.options, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormSelect", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "datePicker" ? [a(g, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required, start: r[t.start], end: r[t.end] }, on: { "update:start": function(l) {
172
+ return [e.available && e.getCellType(r, t) === "input" ? [a("FormInput", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInput", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "inputPhoneNumber" ? [a("FormInputPhoneNumber", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputPhoneNumber", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "user" ? [t.single ? a("FormInputUser", e._b({ attrs: { name: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { "update:name": function(l) {
173
+ return e.$set(r, s.property, l);
174
+ }, input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : a("FormInputUser", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputUser", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "department" ? [t.single ? a("FormInputDepartment", e._b({ attrs: { "ou-type": t.ouType, name: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { "update:name": function(l) {
175
+ return e.$set(r, s.property, l);
176
+ }, input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : a("FormInputDepartment", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "select" ? [a("FormSelect", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, options: t.options, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormSelect", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "datePicker" ? [a("FormDatePicker", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required, start: r[t.start], end: r[t.end] }, on: { "update:start": function(l) {
190
177
  return e.$set(r, t.start, l);
191
178
  }, "update:end": function(l) {
192
179
  return e.$set(r, t.end, l);
193
- }, input: (l) => e.onInput(r, l, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "cascader" ? [a(y, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required, "label-key": t.labelKey, "value-key": t.valueKey }, on: { input: (l) => e.onInput(r, l, t) } }, "FormCascader", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "checkbox" ? [a(h, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormCheckboxGroup", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "number" ? [a(f, e._b({ attrs: { value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputNumber", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "textarea" ? [a(c, e._b({ attrs: { rows: t.rows || "3", value: r[p.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${s}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormTextarea", e.getInputAttr(r, t), !1))] : t.dicType || (o = t.options) != null && o.length ? [a(b, { attrs: { "dict-type": t.dicType, "id-as-value": t.idAsValue, "label-as-value": t.labelAsValue, column: p, row: r, options: t.options } })] : [e._v(e._s(e.getVal(r, p, t)))]];
194
- }, { row: r, column: p, index: s })];
180
+ }, input: (l) => e.onInput(r, l, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "cascader" ? [a("FormCascader", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required, "label-key": t.labelKey, "value-key": t.valueKey }, on: { input: (l) => e.onInput(r, l, t) } }, "FormCascader", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "checkbox" ? [a("FormCheckboxGroup", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormCheckboxGroup", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "number" ? [a("FormInputNumber", e._b({ attrs: { value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormInputNumber", e.getInputAttr(r, t), !1))] : e.available && e.getCellType(r, t) === "textarea" ? [a("FormTextarea", e._b({ attrs: { rows: t.rows || "3", value: r[s.property], disabled: e.isInputDisabled(r, t), prop: `${e.prop}[${p}].${t.prop}`, required: t.required }, on: { input: (l) => e.onInput(r, l, t) } }, "FormTextarea", e.getInputAttr(r, t), !1))] : t.dicType || (o = t.options) != null && o.length ? [a("DictRender", { attrs: { "dict-type": t.dicType, "id-as-value": t.idAsValue, "label-as-value": t.labelAsValue, column: s, row: r, options: t.options } })] : [e._v(e._s(e.getVal(r, s, t)))]];
181
+ }, { row: r, column: s, index: p })];
195
182
  } }], null, !0) }) : t.slot ? e._t("default") : e._e()];
196
183
  })];
197
- }, { columns: e.columns }), e._t("handle", null, { add: e.add, remove: e.remove }), (!e.value || e.value.length < e.limit) && !e.inputDisabled && e.enabled && e.editable && e.handleColumn ? a(u, { attrs: { label: "操作", fixed: "right", width: "80", align: "center", prop: "menu" }, scopedSlots: e._u([{ key: "header", fn: function({ column: t, $index: r }) {
184
+ }, { columns: e.columns }), e._t("handle", null, { add: e.add, remove: e.remove }), (!e.value || e.value.length < e.limit) && !e.inputDisabled && e.enabled && e.editable && e.handleColumn ? a("TableColumn", { attrs: { label: "操作", fixed: "right", width: "80", align: "center", prop: "menu" }, scopedSlots: e._u([{ key: "header", fn: function({ column: t, $index: r }) {
198
185
  return [e._t("handle-column-header", function() {
199
186
  return [e._v(" " + e._s(t.label) + " ")];
200
187
  }, { column: t, index: r })];
201
188
  } }, { key: "default", fn: function({ row: t, $index: r }) {
202
- return [e.showHandleColumnAddButton && e.value.length < e.maxLimit ? a("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "margin-right": "5px", "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(p) {
203
- return p.stopPropagation(), e.add(t, r);
204
- } } }) : e._e(), e.value && e.value.length > 1 || e.allowEmpty ? a(d, { staticClass: "el-icon-error sub-table-handle-button table-button-remove", attrs: { title: "删除", message: "您确定要删除该行吗?" }, on: { click: function(p) {
205
- return p.stopPropagation(), e.remove(t, r);
189
+ return [e.showHandleColumnAddButton && e.value.length < e.maxLimit ? a("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "margin-right": "5px", "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(s) {
190
+ return s.stopPropagation(), e.add(t, r);
191
+ } } }) : e._e(), e.value && e.value.length > 1 || e.allowEmpty ? a("Confirmable", { staticClass: "el-icon-error sub-table-handle-button table-button-remove", attrs: { title: "删除", message: "您确定要删除该行吗?" }, on: { click: function(s) {
192
+ return s.stopPropagation(), e.remove(t, r);
206
193
  } } }) : e._e()];
207
194
  } }], null, !0) }) : e._e()], 2);
208
- }, S = [], R = /* @__PURE__ */ T(
209
- q,
210
- k,
211
- S,
195
+ }, f = [], y = /* @__PURE__ */ b(
196
+ c,
197
+ h,
198
+ f,
212
199
  !1,
213
200
  null,
214
201
  null
215
202
  );
216
- const J = R.exports;
203
+ const I = y.exports;
217
204
  export {
218
- J as default
205
+ I as default
219
206
  };
@@ -1,20 +1,231 @@
1
- import "../confirmable/index.mjs";
2
- import "../chunks/TableColumn.BzivvXMF.mjs";
3
- import "../form-input-number/index.mjs";
4
- import "../form-checkbox-group/index.mjs";
5
- import "../form-cascader/index.mjs";
6
- import "../form-date-picker/index.mjs";
7
- import "../form-select/index.mjs";
8
- import "../form-input-phone-number/index.mjs";
9
- import "../form-checkbox/index.mjs";
10
- import "../form-input/index.mjs";
11
- import "element-ui/lib/button";
12
- import "../confirm-button/index.mjs";
13
- import "../pageable-table/index.mjs";
14
- import "@web-utils/core";
15
- import "@web-utils/integrations/lodash";
16
- import { a as j } from "../chunks/SubTablePlus.BH0IIv3X.mjs";
17
- import "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
1
+ import { findTreeChildren as i, isFunction as c } from "@web-utils/core";
2
+ import { cloneDeep as b } from "@web-utils/integrations/lodash";
3
+ import { S as h } from "../chunks/sub-table-plus-props.BVsD71hT.mjs";
4
+ import { n as f } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const y = {
6
+ name: "SubTablePlus",
7
+ mixins: [h],
8
+ inject: {
9
+ elForm: {
10
+ default: ""
11
+ },
12
+ elFormItem: {
13
+ default: ""
14
+ }
15
+ },
16
+ props: {
17
+ onRowDbClick: Function,
18
+ showMessage: Boolean,
19
+ pageSize: Number
20
+ },
21
+ data() {
22
+ return {
23
+ rows: [],
24
+ selectedRows: []
25
+ };
26
+ },
27
+ computed: {
28
+ enabled() {
29
+ return !this.inputDisabled;
30
+ },
31
+ hasToolBarMenu() {
32
+ var s;
33
+ return (s = this.toolbarMenus) == null ? void 0 : s.length;
34
+ },
35
+ hasHandleMenus() {
36
+ var s;
37
+ return (s = this.handleMenus) == null ? void 0 : s.length;
38
+ },
39
+ rowProps() {
40
+ const s = {};
41
+ return this.columns && this.columns.map((e) => e.prop).forEach((e) => {
42
+ s[e] = null;
43
+ }), s;
44
+ },
45
+ inputDisabled() {
46
+ return this.disabled || (this.elForm || {}).disabled;
47
+ }
48
+ },
49
+ watch: {
50
+ value: {
51
+ deep: !0,
52
+ immediate: !0,
53
+ handler(s) {
54
+ this.rows = s || [];
55
+ }
56
+ },
57
+ rows: {
58
+ deep: !0,
59
+ immediate: !0,
60
+ handler(s) {
61
+ this.$emit("input", s);
62
+ }
63
+ }
64
+ },
65
+ methods: {
66
+ getCellType(s, e) {
67
+ return c(e.getType) ? e.getType(s, e) : e.type;
68
+ },
69
+ getInputAttr(s, e) {
70
+ return e.attrs && e.getAttrs ? { ...e.attrs, ...e.getAttrs(s) } : e.attrs ? e.attrs : e.getAttrs ? e.getAttrs(s) : {};
71
+ },
72
+ isInputDisabled(s, e) {
73
+ var l;
74
+ return (l = e.isDisabled) == null ? void 0 : l.call(e, s);
75
+ },
76
+ onInput(s, e, l) {
77
+ l.setValue ? l.setValue(s, e, l, this.rows) : l.setVal !== !1 && (s[l.prop] = e);
78
+ },
79
+ onBlur(s, e) {
80
+ e.onBlur && e.onBlur(s, e, this.rows);
81
+ },
82
+ onSelectionChange(s) {
83
+ this.selectedRows = s;
84
+ },
85
+ async remove(s, e) {
86
+ try {
87
+ if (this.delApi)
88
+ try {
89
+ await this.delApi([s.id]), this.$message.success("删除成功!"), this.refresh();
90
+ } catch {
91
+ this.$message.error("删除失败!");
92
+ }
93
+ else
94
+ this.rows.splice(e, 1);
95
+ } catch {
96
+ }
97
+ },
98
+ async add(s, e) {
99
+ var l;
100
+ if (this.fetchApi)
101
+ this.addRow();
102
+ else {
103
+ const o = b(this.rowProps), u = await ((l = this.initRow) == null ? void 0 : l.call(this, o, e));
104
+ e === -1 ? this.rows.push(u || o) : this.rows.splice(e + 1, 0, u || o);
105
+ }
106
+ },
107
+ addRow() {
108
+ this.$emit("add-row");
109
+ },
110
+ async delRow() {
111
+ if (!this.selectedRows.length) {
112
+ this.$message.warning("请选择要删除的记录!");
113
+ return;
114
+ }
115
+ try {
116
+ if (this.delApi)
117
+ try {
118
+ await this.delApi(this.selectedRows.map((s) => s.id)), this.$message.success("删除成功!"), this.refresh();
119
+ } catch {
120
+ this.$message.error("删除失败!");
121
+ }
122
+ else
123
+ this.$emit(
124
+ "input",
125
+ this.rows.filter((s) => !this.selectedRows.includes(s))
126
+ );
127
+ } catch {
128
+ }
129
+ },
130
+ refresh() {
131
+ this.$refs.table.getPage();
132
+ },
133
+ getVal(s, e, l) {
134
+ var o, u;
135
+ if (l.type === "select" && ((o = l.attrs) != null && o.options)) {
136
+ const t = l.attrs.options.find((r) => r.value === s[e.property] || r.code === s[e.property]);
137
+ if (t)
138
+ return t.label || t.name;
139
+ }
140
+ if (l.type === "checkbox1")
141
+ return s[e.property] === !0 || s[e.property] === "1" || s[e.property] === "Y" ? "是" : "否";
142
+ if (l.type === "cascader" && ((u = l.attrs) != null && u.options)) {
143
+ const [t] = i(l.attrs.options, (r) => r[l.attrs.valueKey || "value"] === s[e.property]);
144
+ if (t)
145
+ return t[l.attrs.valueKey || "label"];
146
+ }
147
+ return s[e.property];
148
+ },
149
+ reloadTable() {
150
+ var s;
151
+ (s = this.$refs.table) == null || s.reload();
152
+ },
153
+ async refreshTable() {
154
+ var s;
155
+ await ((s = this.$refs.table) == null ? void 0 : s.getPage());
156
+ },
157
+ removeSelectedRows() {
158
+ this.$emit(
159
+ "input",
160
+ this.value.filter((s) => !this.selectedRows.includes(s))
161
+ );
162
+ },
163
+ rowDbClick(...s) {
164
+ var e;
165
+ (e = this.onRowDbClick) == null || e.call(this, ...s);
166
+ }
167
+ }
168
+ };
169
+ var g = function() {
170
+ var o, u;
171
+ var e = this, l = e._self._c;
172
+ return l("div", { class: ["sub-table-plus", { "hide-message": !e.showMessage }] }, [l("PageableTable", e._g(e._b({ ref: "table", attrs: { "auto-height": "", data: e.fetchApi ? !1 : e.rows, api: e.fetchApi, "payload-style": "body", "show-summary": e.showSummary, descs: e.descs, ascs: e.ascs, "page-size": e.pageSize, "selection-width": e.selectionWidth, "hide-on-single-page": "", selection: e.selection, index: e.index }, on: { "selection-change": e.onSelectionChange }, scopedSlots: e._u([!e.inputDisabled || e.hasToolBarMenu ? { key: "toolbar", fn: function() {
173
+ return [l("div", { staticClass: "table-header flex-row" }, [e._t("toolbar", function() {
174
+ return [l("div", { staticClass: "flex-item" }, [e._t("toolbar-left", function() {
175
+ var t, r, n;
176
+ return [(t = e.toolbarMenus) != null && t.includes("add") ? l("ElButton", { staticClass: "table-header-button add", attrs: { size: "mini", icon: "el-icon-circle-plus", type: "text" }, on: { click: e.addRow } }, [e._v(" 添加 ")]) : e._e(), (r = e.toolbarMenus) != null && r.includes("delete") ? l("ConfirmButton", { staticClass: "table-header-button remove", attrs: { size: "mini", disabled: e.selectedRows.length <= 0, message: "您确定要删除选中的记录吗?", icon: "el-icon-error", type: "text" }, on: { click: e.delRow } }, [e._v(" 删除 ")]) : e._e(), (n = e.toolbarMenus) != null && n.includes("refresh") ? l("ElButton", { staticClass: "table-header-button refresh", attrs: { size: "mini", icon: "el-icon-refresh-left", type: "text", disabled: !1 }, on: { click: e.refresh } }, [e._v(" 刷新 ")]) : e._e()];
177
+ }, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh }), e._t("toolbar-left-append", null, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2), l("div", { staticClass: "flex-not-shrink" }, [e._t("toolbar-right", null, { removeSelectedRows: e.removeSelectedRows, selectedRows: e.selectedRows })], 2)];
178
+ }, { addRow: e.addRow, delRow: e.delRow, refresh: e.refresh })], 2)];
179
+ }, proxy: !0 } : null, e.bottomAddButton ? { key: "empty", fn: function() {
180
+ return [l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
181
+ var r;
182
+ return t.stopPropagation(), e.add(null, ((r = e.value) == null ? void 0 : r.length) ?? 0);
183
+ } } })];
184
+ }, proxy: !0 } : null], null, !0) }, "PageableTable", e.$attrs, !1), e.$listeners), [e._t("columns", function() {
185
+ return [e._l(e.columns, function(t) {
186
+ return [t.label && !t.hide && !t.slot ? l("TableColumn", { key: `${t.prop}-${e.enabled}${t.type ? `-${t.type}` : ""}${t.required ? `-${t.required}` : ""}`, attrs: { label: t.label, width: t.width, "dict-type": t.dictType, clickable: t.clickable, align: t.align, prop: t.prop, options: t.options, "show-overflow-tooltip": !t.editable && t.showOverflowTooltip }, scopedSlots: e._u([{ key: "header", fn: function() {
187
+ return [!e.inputDisabled && t.required ? l("span", { staticStyle: { color: "#f56c6c" } }, [e._v("*")]) : e._e(), l("span", { attrs: { title: t.label } }, [e._v(e._s(t.label))])];
188
+ }, proxy: !0 }, { key: "default", fn: function({ row: r, column: n, $index: p }) {
189
+ return [e._t("tag", null, { row: r, column: n, index: p }), e._t(t.prop, function() {
190
+ var d;
191
+ return [e.enabled && t.editable === !0 ? [e.getCellType(r, t) === "input" ? [l("FormInput", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { blur: () => e.onBlur(r, t), input: (a) => e.onInput(r, a, t) } }, "FormInput", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "checkbox1" ? [l("FormCheckbox", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCheckbox", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "inputPhoneNumber" ? [l("FormInputPhoneNumber", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputPhoneNumber", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "user" ? [t.single ? l("FormInputUser", e._b({ attrs: { id: r[n.idProp || `${n.property}Id`], "wrap-col": !1, name: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { "update:id": function(a) {
192
+ return e.$set(r, n.idProp || `${n.property}Id`, a);
193
+ }, "update:name": function(a) {
194
+ return e.$set(r, n.property, a);
195
+ }, input: (a) => e.onInput(r, a, t) } }, "FormInputUser", e.getInputAttr(r, t), !1)) : l("FormInputUser", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputUser", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "department" ? [t.single ? l("FormInputDepartment", e._b({ attrs: { "wrap-col": !1, "ou-type": t.ouType, name: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { "update:name": function(a) {
196
+ return e.$set(r, n.property, a);
197
+ }, input: (a) => e.onInput(r, a, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1)) : l("FormInputDepartment", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputDepartment", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "select" ? [l("FormSelect", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormSelect", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "datePicker" ? [l("FormDatePicker", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required, start: r[t.start], end: r[t.end] }, on: { "update:start": function(a) {
198
+ return e.$set(r, t.start, a);
199
+ }, "update:end": function(a) {
200
+ return e.$set(r, t.end, a);
201
+ }, input: (a) => e.onInput(r, a, t) } }, "FormDatePicker", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "cascader" ? [l("FormCascader", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required, "label-key": t.labelKey, "value-key": t.valueKey }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCascader", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "checkbox" ? [l("FormCheckboxGroup", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormCheckboxGroup", e.getInputAttr(r, t), !1))] : e.getCellType(r, t) === "number" ? [l("FormInputNumber", e._b({ attrs: { "wrap-col": !1, value: r[n.property], disabled: e.isInputDisabled(r, t), prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required }, on: { input: (a) => e.onInput(r, a, t) } }, "FormInputNumber", e.getInputAttr(r, t), !1))] : e._e()] : t.dictType || (d = t.options) != null && d.length ? [l("DictRender", { attrs: { "dict-type": t.dictType, "id-as-value": t.idAsValue, "label-as-value": t.labelAsValue, column: n, row: r, options: t.options } })] : [e._v(e._s(e.getVal(r, n, t)))]];
202
+ }, { row: r, column: n, wrapCol: !1, index: p, prop: e.prop ? `${e.prop}[${p}].${t.prop}` : null, required: t.required, editable: t.editable })];
203
+ } }], null, !0) }) : t.slot ? e._t(t.slot) : e._e()];
204
+ })];
205
+ }, { columns: e.columns }), e._t("handle", null, { add: e.add, remove: e.remove }), !e.inputDisabled && e.hasHandleMenus ? l("TableColumn", { attrs: { label: "操作", width: "80", align: "center", prop: "menu" }, scopedSlots: e._u([{ key: "header", fn: function({ column: t, $index: r }) {
206
+ return [e._t("handle-column-header", function() {
207
+ return [e._v(" " + e._s(t.label) + " ")];
208
+ }, { column: t, index: r })];
209
+ } }, { key: "default", fn: function({ row: t, $index: r }) {
210
+ var n, p, d;
211
+ return [(n = e.handleMenus) != null && n.includes("add") && ((p = e.value) == null ? void 0 : p.length) < e.limit ? l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "margin-right": "5px", "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(a) {
212
+ return a.stopPropagation(), e.add(t, r);
213
+ } } }) : e._e(), (d = e.handleMenus) != null && d.includes("delete") ? l("Confirmable", { staticClass: "el-icon-error sub-table-handle-button table-button-remove", attrs: { title: "删除", message: "您确定要删除该行吗?" }, on: { click: function(a) {
214
+ return a.stopPropagation(), e.remove(t, r);
215
+ } } }) : e._e()];
216
+ } }], null, !0) }) : e._e()], 2), !e.inputDisabled && e.bottomAddButton && ((o = e.value) == null ? void 0 : o.length) < e.limit && ((u = e.value) == null ? void 0 : u.length) > 0 ? l("div", { staticClass: "flex-row vertical-center horizon-center", staticStyle: { padding: "10px", border: "1px solid #ebeef5", "border-top": "none" } }, [l("i", { staticClass: "el-icon-circle-plus sub-table-handle-button table-button-add", staticStyle: { "font-size": "20px", cursor: "pointer" }, attrs: { title: "添加" }, on: { click: function(t) {
217
+ var r;
218
+ return t.stopPropagation(), e.add(null, ((r = e.value) == null ? void 0 : r.length) ?? 0);
219
+ } } })]) : e._e()], 1);
220
+ }, _ = [], I = /* @__PURE__ */ f(
221
+ y,
222
+ g,
223
+ _,
224
+ !1,
225
+ null,
226
+ null
227
+ );
228
+ const k = I.exports;
18
229
  export {
19
- j as default
230
+ k as default
20
231
  };
package/swiper/index.mjs CHANGED
@@ -1,9 +1,8 @@
1
+ import { getEleWidth as r } from "@web-utils/core";
1
2
  import a from "../resize-observer/index.mjs";
2
- import r from "element-ui/lib/button";
3
- import { getEleWidth as o } from "@web-utils/core";
4
3
  import "../resize-observer/style.css";
5
- import { n as h } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
6
- const l = {
4
+ import { n as o } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
5
+ const h = {
7
6
  name: "Swiper",
8
7
  components: {
9
8
  ResizeObserver: a
@@ -40,7 +39,7 @@ const l = {
40
39
  let e = 0;
41
40
  const t = [], { children: s } = this.$refs.swiperContent;
42
41
  Array.prototype.forEach.call(s, (i) => {
43
- const n = o(i);
42
+ const n = r(i);
44
43
  e += n, t.push(n);
45
44
  }), this.childrenWidth = t, this.swiperContentWidth = e;
46
45
  },
@@ -102,20 +101,20 @@ const l = {
102
101
  }
103
102
  }
104
103
  };
105
- var d = function() {
104
+ var l = function() {
106
105
  var t = this, s = t._self._c;
107
- return s("div", { staticClass: "egd-swiper" }, [s(r, { staticClass: "el-carousel__arrow el-carousel__arrow--left", attrs: { disabled: t.reachedLeft, icon: "el-icon-arrow-left" }, on: { click: t.clickLeft } }), s("div", { ref: "swiperBox", staticClass: "egd-swiper-box", on: { wheel: function(i) {
106
+ return s("div", { staticClass: "egd-swiper" }, [s("ElButton", { staticClass: "el-carousel__arrow el-carousel__arrow--left", attrs: { disabled: t.reachedLeft, icon: "el-icon-arrow-left" }, on: { click: t.clickLeft } }), s("div", { ref: "swiperBox", staticClass: "egd-swiper-box", on: { wheel: function(i) {
108
107
  return i.stopPropagation(), i.preventDefault(), t.onMouseWheel.apply(null, arguments);
109
- } } }, [s("div", { ref: "swiperContent", staticClass: "egd-swiper-content", style: t.swiperContentStyle }, [t._t("default")], 2)]), s(r, { staticClass: "el-carousel__arrow el-carousel__arrow--right", attrs: { disabled: t.reachedRight, icon: "el-icon-arrow-right" }, on: { click: t.clickRight } }), s(a, { on: { notify: t.resize } })], 1);
110
- }, c = [], p = /* @__PURE__ */ h(
108
+ } } }, [s("div", { ref: "swiperContent", staticClass: "egd-swiper-content", style: t.swiperContentStyle }, [t._t("default")], 2)]), s("ElButton", { staticClass: "el-carousel__arrow el-carousel__arrow--right", attrs: { disabled: t.reachedRight, icon: "el-icon-arrow-right" }, on: { click: t.clickRight } }), s("ResizeObserver", { on: { notify: t.resize } })], 1);
109
+ }, d = [], c = /* @__PURE__ */ o(
110
+ h,
111
111
  l,
112
112
  d,
113
- c,
114
113
  !1,
115
114
  null,
116
115
  null
117
116
  );
118
- const _ = p.exports;
117
+ const m = c.exports;
119
118
  export {
120
- _ as default
119
+ m as default
121
120
  };