@web-utils/component 3.0.6 → 3.1.0

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 (172) hide show
  1. package/address-input/index.mjs +20 -57
  2. package/affix/index.mjs +26 -47
  3. package/aside-menu/index.mjs +18 -43
  4. package/avatar/index.mjs +27 -49
  5. package/awesome-button/index.mjs +35 -43
  6. package/capsule-tab/index.mjs +16 -34
  7. package/card/index.mjs +21 -76
  8. package/carousel/index.mjs +14 -49
  9. package/chat/index.mjs +104 -414
  10. package/chunk-file-uploader/index.mjs +21 -38
  11. package/chunks/FormTemp.aa57efb4.mjs +125 -0
  12. package/code-mirror-editor/index.mjs +69 -79
  13. package/color-picker/index.mjs +29 -60
  14. package/comment/index.mjs +17 -48
  15. package/confirm-button/index.mjs +11 -19
  16. package/confirmable/index.mjs +12 -20
  17. package/context-menu/index.mjs +42 -144
  18. package/count-up/index.mjs +18 -25
  19. package/custom-scrollbar/index.mjs +13 -22
  20. package/data-box/index.mjs +15 -66
  21. package/data-card/index.mjs +16 -65
  22. package/data-cardtext/index.mjs +16 -52
  23. package/data-display/index.mjs +18 -62
  24. package/data-icons/index.mjs +16 -68
  25. package/data-imgtext/index.mjs +18 -79
  26. package/data-operatext/index.mjs +18 -75
  27. package/data-panel/index.mjs +16 -63
  28. package/data-pay/index.mjs +20 -122
  29. package/data-price/index.mjs +18 -60
  30. package/data-progress/index.mjs +16 -67
  31. package/data-rotate/index.mjs +16 -66
  32. package/data-table-picker/index.mjs +25 -88
  33. package/data-tabs/index.mjs +16 -64
  34. package/dialog-form/index.mjs +48 -94
  35. package/dynamic-table/index.mjs +43 -127
  36. package/e-charts/index.mjs +21 -34
  37. package/easy-popup/index.mjs +35 -61
  38. package/editable-progress/index.mjs +22 -77
  39. package/editable-tree/index.mjs +235 -546
  40. package/egd-collapse/index.mjs +13 -26
  41. package/egd-collapse-item/index.mjs +27 -87
  42. package/element-dialog/index.mjs +69 -133
  43. package/empty-view/index.mjs +13 -33
  44. package/error-view/index.mjs +14 -34
  45. package/flex-column/index.mjs +15 -23
  46. package/flex-item/index.mjs +18 -26
  47. package/flex-row/index.mjs +23 -31
  48. package/flex-scroller/index.mjs +16 -27
  49. package/flow/index.mjs +70 -110
  50. package/flow-designer/index.mjs +1215 -4804
  51. package/flow-node/index.mjs +15 -51
  52. package/flow-viewer/index.mjs +64 -89
  53. package/form-block/index.mjs +43 -62
  54. package/form-button/index.mjs +10 -18
  55. package/form-cascader/index.mjs +49 -100
  56. package/form-checkbox-group/index.mjs +43 -110
  57. package/form-date-picker/index.mjs +51 -97
  58. package/form-holder/index.mjs +25 -42
  59. package/form-input/index.mjs +40 -90
  60. package/form-input-email/index.mjs +35 -79
  61. package/form-input-id-card/index.mjs +40 -87
  62. package/form-input-number/index.mjs +42 -102
  63. package/form-input-phone-number/index.mjs +34 -75
  64. package/form-input-tag/index.mjs +31 -73
  65. package/form-input-time/index.mjs +42 -87
  66. package/form-item/index.mjs +70 -89
  67. package/form-item-config-provider/index.mjs +12 -20
  68. package/form-item-group/index.mjs +46 -65
  69. package/form-radio-group/index.mjs +50 -108
  70. package/form-select/index.mjs +44 -95
  71. package/form-switch/index.mjs +38 -85
  72. package/form-textarea/index.mjs +31 -75
  73. package/form-view/index.mjs +112 -260
  74. package/fy-array/index.mjs +35 -121
  75. package/fy-article/index.mjs +12 -43
  76. package/fy-cascader/index.mjs +26 -67
  77. package/fy-checkbox/index.mjs +27 -77
  78. package/fy-code/index.mjs +19 -33
  79. package/fy-curd/index.mjs +810 -2017
  80. package/fy-date/index.mjs +18 -59
  81. package/fy-draggable/index.mjs +81 -140
  82. package/fy-dynamic/index.mjs +85 -204
  83. package/fy-empty/index.mjs +14 -35
  84. package/fy-form/index.mjs +254 -571
  85. package/fy-form-design/index.mjs +1489 -6084
  86. package/fy-form-design/style.css +1 -1
  87. package/fy-input/index.mjs +34 -104
  88. package/fy-input-color/index.mjs +22 -67
  89. package/fy-input-icon/index.mjs +37 -122
  90. package/fy-input-map/index.mjs +57 -149
  91. package/fy-input-number/index.mjs +18 -53
  92. package/fy-input-table/index.mjs +36 -102
  93. package/fy-input-tree/index.mjs +51 -138
  94. package/fy-progress/index.mjs +12 -31
  95. package/fy-radio/index.mjs +20 -51
  96. package/fy-rate/index.mjs +18 -51
  97. package/fy-select/index.mjs +49 -134
  98. package/fy-slider/index.mjs +19 -52
  99. package/fy-switch/index.mjs +18 -48
  100. package/fy-tabs/index.mjs +19 -51
  101. package/fy-time/index.mjs +22 -62
  102. package/fy-title/index.mjs +14 -25
  103. package/fy-tree/index.mjs +74 -216
  104. package/fy-u-editor/index.mjs +50 -64
  105. package/fy-upload/index.mjs +167 -338
  106. package/guide-steps/index.mjs +33 -53
  107. package/highlight-j-s/index.mjs +13 -27
  108. package/icon-card/index.mjs +12 -36
  109. package/icon-temp/index.mjs +12 -34
  110. package/iframe-window/index.mjs +13 -40
  111. package/image-cropper/index.mjs +46 -171
  112. package/image-preview/index.mjs +54 -168
  113. package/image-viewer/index.mjs +24 -50
  114. package/index.css +1 -0
  115. package/index.mjs +3973 -501
  116. package/input-number/index.mjs +84 -173
  117. package/input-number-range/index.mjs +20 -70
  118. package/j-s-x-component/index.mjs +3 -3
  119. package/keep-view-alive/index.mjs +47 -55
  120. package/keyboard/index.mjs +100 -113
  121. package/license/index.mjs +34 -51
  122. package/loading-view/index.mjs +14 -34
  123. package/login/index.mjs +33 -161
  124. package/monaco-editor/index.mjs +13 -21
  125. package/name-avatar/index.mjs +13 -32
  126. package/nav-bar/index.mjs +12 -31
  127. package/not-implement/index.mjs +14 -25
  128. package/notice/index.mjs +32 -80
  129. package/package.json +1 -1
  130. package/page/index.mjs +11 -23
  131. package/page-header/index.mjs +16 -37
  132. package/page-index/index.mjs +42 -93
  133. package/page-index-top/index.mjs +42 -84
  134. package/page-skeleton/index.mjs +24 -39
  135. package/page-skeleton-new/index.mjs +21 -68
  136. package/pageable-table/index.mjs +105 -227
  137. package/pageable-view/index.mjs +30 -83
  138. package/photo-swipe/index.mjs +62 -87
  139. package/present-view/index.mjs +114 -267
  140. package/queue/index.mjs +14 -29
  141. package/record-video/index.mjs +29 -66
  142. package/resize-observer/index.mjs +18 -30
  143. package/search/index.mjs +47 -81
  144. package/search-popover/index.mjs +57 -329
  145. package/sign/index.mjs +43 -60
  146. package/sign-panel/index.mjs +40 -151
  147. package/skeleton/index.mjs +18 -44
  148. package/split-pane/index.mjs +45 -129
  149. package/stateful/index.mjs +18 -26
  150. package/static-pageable-table/index.mjs +18 -44
  151. package/swiper/index.mjs +53 -94
  152. package/tab/index.mjs +13 -39
  153. package/tab-item/index.mjs +23 -37
  154. package/table-column/index.mjs +27 -35
  155. package/table-view/index.mjs +89 -209
  156. package/tag-render/index.mjs +34 -69
  157. package/text-ellipsis/index.mjs +22 -47
  158. package/tinymce-editor/index.mjs +174 -285
  159. package/toolbar/index.mjs +21 -42
  160. package/toolbar-button/index.mjs +25 -54
  161. package/verify/index.mjs +16 -29
  162. package/vue-cron/index.mjs +272 -1089
  163. package/vue-qr-code/index.mjs +19 -27
  164. package/vue-quill-editor/index.mjs +15 -27
  165. package/vue-tags-input/index.mjs +104 -224
  166. package/vue-tree-select/index.mjs +595 -742
  167. package/vue-video-player/index.mjs +42 -57
  168. package/watermark/index.mjs +27 -35
  169. package/web-types.json +1 -1
  170. package/x-input-tag/index.mjs +50 -112
  171. package/chunks/FormTemp.7f91629d.mjs +0 -165
  172. /package/chunks/{vueComponentNormalizer.446f5dc4.mjs → _plugin-vue2_normalizer.446f5dc4.mjs} +0 -0
package/fy-curd/index.mjs CHANGED
@@ -1,16 +1,16 @@
1
- import { p as j } from "../chunks/packages.1fc9ccba.mjs";
2
- import { p as w } from "../chunks/permission.ce5d2121.mjs";
3
- import { i as R } from "../chunks/init.47f219b4.mjs";
4
- import { g as A, c as H, t as N, f as W } from "../chunks/dataformat.f995e2f9.mjs";
5
- import { o as m, j as x, d as a, u as z, i as K, a as b, k as U, l as G, s as q } from "../chunks/util.ae730cde.mjs";
1
+ import { p as $ } from "../chunks/packages.1fc9ccba.mjs";
2
+ import { p as x } from "../chunks/permission.ce5d2121.mjs";
3
+ import { i as O } from "../chunks/init.47f219b4.mjs";
4
+ import { g as F, c as k, t as I, f as E } from "../chunks/dataformat.f995e2f9.mjs";
5
+ import { o as h, j as C, d as a, u as B, i as P, a as b, k as D, l as T, s as z } from "../chunks/util.ae730cde.mjs";
6
6
  import { isBlank as c } from "@web-utils/core";
7
- import { s as X } from "../chunks/slot.4b391395.mjs";
8
- import { n as f } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
9
- import { F as J, d as L } from "../chunks/FormTemp.7f91629d.mjs";
10
- import { s as Q } from "../chunks/dic.eaac0823.mjs";
11
- import Y from "@web-utils/component/icon-temp";
7
+ import { s as M } from "../chunks/slot.4b391395.mjs";
8
+ import { n as f } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
9
+ import { F as L, d as w } from "../chunks/FormTemp.aa57efb4.mjs";
10
+ import { s as V } from "../chunks/dic.eaac0823.mjs";
11
+ import R from "@web-utils/component/icon-temp";
12
12
  import "@web-utils/component/icon-temp/style.css";
13
- const h = {
13
+ const p = {
14
14
  menuWidth: 220,
15
15
  menuFixed: "right",
16
16
  menuXsWidth: 100,
@@ -79,84 +79,9 @@ const h = {
79
79
  dropRowClass: ".el-table__body-wrapper > table > tbody",
80
80
  dropColClass: ".el-table__header-wrapper tr",
81
81
  ghostClass: "avue-crud__ghost"
82
- };
83
- var Z = function() {
84
- var e = this, t = e.$createElement, n = e._self._c || t;
85
- return e.searchFlag ? n("ElCard", {
86
- directives: [{
87
- name: "show",
88
- rawName: "v-show",
89
- value: e.searchShow && e.searchFlag,
90
- expression: "searchShow && searchFlag"
91
- }],
92
- staticClass: "avue-crud__search",
93
- attrs: {
94
- shadow: e.crud.isCard
95
- }
96
- }, [e._t("search", null, {
97
- row: e.searchForm,
98
- search: e.searchForm,
99
- size: e.crud.controlSize
100
- }), n("FyForm", {
101
- ref: "form",
102
- attrs: {
103
- option: e.option
104
- },
105
- on: {
106
- submit: e.searchChange,
107
- "reset-change": e.resetChange
108
- },
109
- scopedSlots: e._u([{
110
- key: "menuForm",
111
- fn: function(i) {
112
- return [e._t("searchMenu", null, null, Object.assign(i, {
113
- search: e.searchForm,
114
- row: e.searchForm
115
- })), e.isSearchIcon ? [e.show === !1 ? n("ElButton", {
116
- attrs: {
117
- type: "text",
118
- icon: "el-icon-arrow-down"
119
- },
120
- on: {
121
- click: function(r) {
122
- e.show = !0;
123
- }
124
- }
125
- }, [e._v(" 展 开 ")]) : e._e(), e.show === !0 ? n("ElButton", {
126
- attrs: {
127
- type: "text",
128
- icon: "el-icon-arrow-up"
129
- },
130
- on: {
131
- click: function(r) {
132
- e.show = !1;
133
- }
134
- }
135
- }, [e._v(" 收 缩 ")]) : e._e()] : e._e()];
136
- }
137
- }, e._l(e.crud.searchSlot, function(i) {
138
- return {
139
- key: e.getSlotName(i),
140
- fn: function(r) {
141
- return [e._t(i, null, null, Object.assign(r, {
142
- search: e.searchForm,
143
- row: e.searchForm
144
- }))];
145
- }
146
- };
147
- })], null, !0),
148
- model: {
149
- value: e.searchForm,
150
- callback: function(i) {
151
- e.searchForm = i;
152
- },
153
- expression: "searchForm"
154
- }
155
- })], 2) : e._e();
156
- }, ee = [];
157
- const te = {
82
+ }, A = {
158
83
  name: "HeaderSearch",
159
- mixins: [X],
84
+ mixins: [M],
160
85
  inject: ["crud"],
161
86
  props: {
162
87
  search: Object
@@ -173,81 +98,81 @@ const te = {
173
98
  get() {
174
99
  return this.crud.search;
175
100
  },
176
- set(e) {
177
- this.crud.$emit("update:search", e);
101
+ set(t) {
102
+ this.crud.$emit("update:search", t);
178
103
  }
179
104
  },
180
105
  option() {
181
- const e = this.crud.option, t = (i = []) => {
182
- i = a(i);
106
+ const t = this.crud.option, e = (n = []) => {
107
+ n = a(n);
183
108
  const r = [];
184
- let o = 0;
185
- return i = i.sort((s, l) => (l.searchOrder || 0) - (s.searchOrder || 0)), i.forEach((s) => {
186
- if (s.search) {
187
- const l = o < this.searchIndex, u = {};
188
- Object.keys(s).forEach((d) => {
109
+ let s = 0;
110
+ return n = n.sort((l, o) => (o.searchOrder || 0) - (l.searchOrder || 0)), n.forEach((l) => {
111
+ if (l.search) {
112
+ const o = s < this.searchIndex, m = {};
113
+ Object.keys(l).forEach((u) => {
189
114
  const g = "search";
190
- if (d !== "searchProp" && d.includes(g)) {
191
- let p = d.replace(g, "");
192
- if (p.length === 0)
115
+ if (u !== "searchProp" && u.includes(g)) {
116
+ let d = u.replace(g, "");
117
+ if (d.length === 0)
193
118
  return;
194
- p = p.replace(p[0], p[0].toLowerCase()), u[p] = s[d];
119
+ d = d.replace(d[0], d[0].toLowerCase()), m[d] = l[u];
195
120
  }
196
- }), s = Object.assign(s, u, {
197
- type: A(s),
121
+ }), l = Object.assign(l, m, {
122
+ type: F(l),
198
123
  detail: !1,
199
- dicFlag: s.cascader ? !0 : m(s.dicFlag, !1),
200
- span: s.searchSpan || e.searchSpan || h.searchSpan,
201
- control: s.searchControl,
202
- gutter: s.searchGutter || e.searchGutter || h.searchGutter,
203
- labelWidth: s.searchLabelWidth || e.searchLabelWidth || h.searchLabelWidth,
204
- labelPosition: s.searchLabelPosition || e.searchLabelPosition,
205
- size: s.searchSize || e.searchSize,
206
- value: s.searchValue,
207
- rules: s.searchRules,
208
- row: s.searchRow,
209
- bind: s.searchBin,
210
- disabled: s.searchDisabled,
211
- readonly: s.searchReadonly,
212
- display: this.isSearchIcon ? this.show ? !0 : l : !0
213
- }), r.push(s), o = o + 1;
124
+ dicFlag: l.cascader ? !0 : h(l.dicFlag, !1),
125
+ span: l.searchSpan || t.searchSpan || p.searchSpan,
126
+ control: l.searchControl,
127
+ gutter: l.searchGutter || t.searchGutter || p.searchGutter,
128
+ labelWidth: l.searchLabelWidth || t.searchLabelWidth || p.searchLabelWidth,
129
+ labelPosition: l.searchLabelPosition || t.searchLabelPosition,
130
+ size: l.searchSize || t.searchSize,
131
+ value: l.searchValue,
132
+ rules: l.searchRules,
133
+ row: l.searchRow,
134
+ bind: l.searchBin,
135
+ disabled: l.searchDisabled,
136
+ readonly: l.searchReadonly,
137
+ display: this.isSearchIcon ? this.show ? !0 : o : !0
138
+ }), r.push(l), s = s + 1;
214
139
  }
215
140
  }), r;
216
141
  };
217
- return ((i) => {
218
- let r = a(i);
219
- return r.column = t(this.crud.propOption), r = Object.assign(r, {
220
- rowKey: e.searchRowKey || "null",
142
+ return ((n) => {
143
+ let r = a(n);
144
+ return r.column = e(this.crud.propOption), r = Object.assign(r, {
145
+ rowKey: t.searchRowKey || "null",
221
146
  tabs: !1,
222
147
  group: !1,
223
148
  printBtn: !1,
224
149
  mockBtn: !1,
225
- filterDic: e.searchFilterDic,
226
- filterNull: e.searchFilterNull,
227
- filterParam: e.searchFilterParam,
228
- enter: e.searchEnter,
229
- size: e.searchSize,
230
- submitText: e.searchBtnText || "搜 索",
231
- submitBtn: m(e.searchBtn, h.searchSubBtn),
150
+ filterDic: t.searchFilterDic,
151
+ filterNull: t.searchFilterNull,
152
+ filterParam: t.searchFilterParam,
153
+ enter: t.searchEnter,
154
+ size: t.searchSize,
155
+ submitText: t.searchBtnText || "搜 索",
156
+ submitBtn: h(t.searchBtn, p.searchSubBtn),
232
157
  submitIcon: this.crud.getBtnIcon("searchBtn"),
233
- emptyText: e.emptyBtnText || "清 空",
234
- emptyBtn: m(e.emptyBtn, h.emptyBtn),
158
+ emptyText: t.emptyBtnText || "清 空",
159
+ emptyBtn: h(t.emptyBtn, p.emptyBtn),
235
160
  emptyIcon: this.crud.getBtnIcon("emptyBtn"),
236
- menuSpan: (() => this.show || !this.isSearchIcon || e.searchMenuSpan < 6 ? e.searchMenuSpan : 6)(),
237
- menuPosition: e.searchMenuPosition || "center",
161
+ menuSpan: (() => this.show || !this.isSearchIcon || t.searchMenuSpan < 6 ? t.searchMenuSpan : 6)(),
162
+ menuPosition: t.searchMenuPosition || "center",
238
163
  dicFlag: !1,
239
164
  dicData: this.crud.DIC
240
165
  }), r;
241
- })(e);
166
+ })(t);
242
167
  },
243
168
  isSearchIcon() {
244
- return m(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
169
+ return h(this.crud.option.searchIcon, this.$AVUE.searchIcon) && this.searchLen > this.searchIndex;
245
170
  },
246
171
  searchLen() {
247
- let e = 0;
248
- return this.crud.propOption.forEach((t) => {
249
- t.search && e++;
250
- }), e;
172
+ let t = 0;
173
+ return this.crud.propOption.forEach((e) => {
174
+ e.search && t++;
175
+ }), t;
251
176
  },
252
177
  searchFlag() {
253
178
  return !!this.crud.$scopedSlots.search || this.searchLen !== 0;
@@ -270,8 +195,8 @@ const te = {
270
195
  immediate: !0,
271
196
  deep: !0,
272
197
  handler() {
273
- var e;
274
- this.searchIndex = ((e = this.option) == null ? void 0 : e.searchIndex) || 2;
198
+ var t;
199
+ this.searchIndex = ((t = this.option) == null ? void 0 : t.searchIndex) || 2;
275
200
  }
276
201
  }
277
202
  },
@@ -280,18 +205,18 @@ const te = {
280
205
  },
281
206
  methods: {
282
207
  initFun() {
283
- ["searchReset", "searchChange"].forEach((e) => {
284
- this.crud[e] = this[e];
208
+ ["searchReset", "searchChange"].forEach((t) => {
209
+ this.crud[t] = this[t];
285
210
  });
286
211
  },
287
- getSlotName(e) {
288
- return e.replace("Search", "");
212
+ getSlotName(t) {
213
+ return t.replace("Search", "");
289
214
  },
290
215
  // 搜索回调
291
- searchChange(e, t) {
292
- e = x(e), this.crud.propOption.forEach((n) => {
293
- n.searchProp && (e[n.searchProp] = e[n.prop], delete e[n.prop]);
294
- }), this.crud.$emit("search-change", e, t);
216
+ searchChange(t, e) {
217
+ t = C(t), this.crud.propOption.forEach((i) => {
218
+ i.searchProp && (t[i.searchProp] = t[i.prop], delete t[i.prop]);
219
+ }), this.crud.$emit("search-change", t, e);
295
220
  },
296
221
  // 搜索清空
297
222
  resetChange() {
@@ -305,181 +230,56 @@ const te = {
305
230
  this.searchShow = !this.searchShow;
306
231
  },
307
232
  dataFormat() {
308
- const e = this.crud.option;
309
- this.searchShow = m(e.searchShow, h.searchShow);
233
+ const t = this.crud.option;
234
+ this.searchShow = h(t.searchShow, p.searchShow);
310
235
  }
311
236
  }
312
- }, $ = {};
313
- var ne = /* @__PURE__ */ f(
314
- te,
315
- Z,
316
- ee,
237
+ };
238
+ var H = function() {
239
+ var e = this, i = e._self._c;
240
+ return e.searchFlag ? i("ElCard", { directives: [{ name: "show", rawName: "v-show", value: e.searchShow && e.searchFlag, expression: "searchShow && searchFlag" }], staticClass: "avue-crud__search", attrs: { shadow: e.crud.isCard } }, [e._t("search", null, { row: e.searchForm, search: e.searchForm, size: e.crud.controlSize }), i("FyForm", { ref: "form", attrs: { option: e.option }, on: { submit: e.searchChange, "reset-change": e.resetChange }, scopedSlots: e._u([{ key: "menuForm", fn: function(n) {
241
+ return [e._t(
242
+ "searchMenu",
243
+ null,
244
+ null,
245
+ Object.assign(n, {
246
+ search: e.searchForm,
247
+ row: e.searchForm
248
+ })
249
+ ), e.isSearchIcon ? [e.show === !1 ? i("ElButton", { attrs: { type: "text", icon: "el-icon-arrow-down" }, on: { click: function(r) {
250
+ e.show = !0;
251
+ } } }, [e._v(" 展 开 ")]) : e._e(), e.show === !0 ? i("ElButton", { attrs: { type: "text", icon: "el-icon-arrow-up" }, on: { click: function(r) {
252
+ e.show = !1;
253
+ } } }, [e._v(" 收 缩 ")]) : e._e()] : e._e()];
254
+ } }, e._l(e.crud.searchSlot, function(n) {
255
+ return { key: e.getSlotName(n), fn: function(r) {
256
+ return [e._t(
257
+ n,
258
+ null,
259
+ null,
260
+ Object.assign(r, {
261
+ search: e.searchForm,
262
+ row: e.searchForm
263
+ })
264
+ )];
265
+ } };
266
+ })], null, !0), model: { value: e.searchForm, callback: function(n) {
267
+ e.searchForm = n;
268
+ }, expression: "searchForm" } })], 2) : e._e();
269
+ }, N = [], j = /* @__PURE__ */ f(
270
+ A,
271
+ H,
272
+ N,
317
273
  !1,
318
- ie,
274
+ null,
319
275
  null,
320
276
  null,
321
277
  null
322
278
  );
323
- function ie(e) {
324
- for (let t in $)
325
- this[t] = $[t];
326
- }
327
- const re = /* @__PURE__ */ function() {
328
- return ne.exports;
329
- }();
330
- var se = function() {
331
- var e = this, t = e.$createElement, n = e._self._c || t;
332
- return n("div", {
333
- staticClass: "avue-crud__menu"
334
- }, [e.optVal(e.crud.tableOption.menuLeft, !0) ? n("div", {
335
- staticClass: "avue-crud__left"
336
- }, [e.optVal(e.crud.tableOption.addBtn, e.config.addBtn) ? n("ElButton", {
337
- directives: [{
338
- name: "permission",
339
- rawName: "v-permission",
340
- value: e.crud.getPermission("addBtn"),
341
- expression: "crud.getPermission('addBtn')"
342
- }],
343
- attrs: {
344
- type: "primary",
345
- icon: e.crud.getBtnIcon("addBtn"),
346
- size: e.crud.isMediumSize
347
- },
348
- on: {
349
- click: e.crud.rowAdd
350
- }
351
- }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.addRowBtn, e.config.addRowBtn) ? n("ElButton", {
352
- directives: [{
353
- name: "permission",
354
- rawName: "v-permission",
355
- value: e.crud.getPermission("addRowBtn"),
356
- expression: "crud.getPermission('addRowBtn')"
357
- }],
358
- attrs: {
359
- type: "primary",
360
- icon: e.crud.getBtnIcon("addBtn"),
361
- size: e.crud.isMediumSize
362
- },
363
- on: {
364
- click: e.crud.rowCellAdd
365
- }
366
- }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e._t("menuLeft", null, {
367
- size: e.crud.isMediumSize
368
- })], 2) : e._e(), e.optVal(e.crud.tableOption.menuRight, !0) ? n("div", {
369
- staticClass: "avue-crud__right"
370
- }, [e.optVal(e.crud.tableOption.dateBtn, e.config.dateBtn) ? n("FyDate", {
371
- staticStyle: {
372
- display: "inline-block",
373
- "margin-right": "20px"
374
- },
375
- attrs: {
376
- type: "datetimerange",
377
- "value-format": "yyyy-MM-dd HH:mm:ss",
378
- format: "yyyy-MM-dd HH:mm:ss",
379
- "picker-options": e.pickerOptions,
380
- size: e.crud.isMediumSize
381
- },
382
- on: {
383
- change: e.dateChange
384
- }
385
- }) : e._e(), e._t("menuRight", null, {
386
- size: e.crud.isMediumSize
387
- }), e.optVal(e.crud.tableOption.excelBtn, e.config.excelBtn) ? n("ElButton", {
388
- directives: [{
389
- name: "permission",
390
- rawName: "v-permission",
391
- value: e.crud.getPermission("excelBtn"),
392
- expression: "crud.getPermission('excelBtn')"
393
- }],
394
- attrs: {
395
- icon: e.crud.getBtnIcon("excelBtn"),
396
- circle: "",
397
- size: e.crud.isMediumSize
398
- },
399
- on: {
400
- click: e.rowExcel
401
- }
402
- }) : e._e(), e.optVal(e.crud.tableOption.printBtn, e.config.printBtn) ? n("ElButton", {
403
- directives: [{
404
- name: "permission",
405
- rawName: "v-permission",
406
- value: e.crud.getPermission("printBtn"),
407
- expression: "crud.getPermission('printBtn')"
408
- }],
409
- attrs: {
410
- icon: e.crud.getBtnIcon("printBtn"),
411
- circle: "",
412
- size: e.crud.isMediumSize
413
- },
414
- on: {
415
- click: e.rowPrint
416
- }
417
- }) : e._e(), e.optVal(e.crud.tableOption.refreshBtn, e.config.refreshBtn) ? n("ElButton", {
418
- directives: [{
419
- name: "permission",
420
- rawName: "v-permission",
421
- value: e.crud.getPermission("refreshBtn"),
422
- expression: "crud.getPermission('refreshBtn')"
423
- }],
424
- attrs: {
425
- icon: e.crud.getBtnIcon("refreshBtn"),
426
- circle: "",
427
- size: e.crud.isMediumSize
428
- },
429
- on: {
430
- click: e.crud.refreshChange
431
- }
432
- }) : e._e(), e.optVal(e.crud.tableOption.columnBtn, e.config.columnBtn) ? n("ElButton", {
433
- directives: [{
434
- name: "permission",
435
- rawName: "v-permission",
436
- value: e.crud.getPermission("columnBtn"),
437
- expression: "crud.getPermission('columnBtn')"
438
- }],
439
- attrs: {
440
- icon: e.crud.getBtnIcon("columnBtn"),
441
- circle: "",
442
- size: e.crud.isMediumSize
443
- },
444
- on: {
445
- click: function(i) {
446
- return e.crud.$refs.dialogColumn.handleShow();
447
- }
448
- }
449
- }) : e._e(), (e.crud.$refs.headerSearch || {}).searchFlag && e.optVal(e.crud.tableOption.searchShowBtn, !0) ? n("ElButton", {
450
- attrs: {
451
- icon: e.crud.getBtnIcon("searchBtn"),
452
- circle: "",
453
- size: e.crud.isMediumSize
454
- },
455
- on: {
456
- click: function(i) {
457
- return e.crud.$refs.headerSearch.handleSearchShow();
458
- }
459
- }
460
- }) : e._e(), e.optVal(e.crud.tableOption.filterBtn, e.config.filterBtn) ? n("ElButton", {
461
- directives: [{
462
- name: "permission",
463
- rawName: "v-permission",
464
- value: e.crud.getPermission("filterBtn"),
465
- expression: "crud.getPermission('filterBtn')"
466
- }],
467
- attrs: {
468
- icon: e.crud.getBtnIcon("filterBtn"),
469
- circle: "",
470
- size: e.crud.isMediumSize
471
- },
472
- on: {
473
- click: function(i) {
474
- return e.crud.$refs.dialogFilter.handleShow();
475
- }
476
- }
477
- }) : e._e()], 2) : e._e()]);
478
- }, oe = [];
479
- const le = {
279
+ const W = j.exports, K = {
480
280
  name: "HeaderMenu",
481
281
  directives: {
482
- permission: w
282
+ permission: x
483
283
  },
484
284
  inject: ["crud"],
485
285
  data() {
@@ -489,52 +289,52 @@ const le = {
489
289
  shortcuts: [
490
290
  {
491
291
  text: "今日",
492
- onClick(e) {
493
- const t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
494
- n.setTime(n.getTime()), e.$emit("pick", [n, t]);
292
+ onClick(t) {
293
+ const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
294
+ i.setTime(i.getTime()), t.$emit("pick", [i, e]);
495
295
  }
496
296
  },
497
297
  {
498
298
  text: "昨日",
499
- onClick(e) {
500
- const t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
501
- n.setTime(n.getTime() - 3600 * 1e3 * 24 * 1), e.$emit("pick", [n, t]);
299
+ onClick(t) {
300
+ const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
301
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 1), t.$emit("pick", [i, e]);
502
302
  }
503
303
  },
504
304
  {
505
305
  text: "最近一周",
506
- onClick(e) {
507
- const t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
508
- n.setTime(n.getTime() - 3600 * 1e3 * 24 * 7), e.$emit("pick", [n, t]);
306
+ onClick(t) {
307
+ const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
308
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 7), t.$emit("pick", [i, e]);
509
309
  }
510
310
  },
511
311
  {
512
312
  text: "最近一个月",
513
- onClick(e) {
514
- const t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
515
- n.setTime(n.getTime() - 3600 * 1e3 * 24 * 30), e.$emit("pick", [n, t]);
313
+ onClick(t) {
314
+ const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
315
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 30), t.$emit("pick", [i, e]);
516
316
  }
517
317
  },
518
318
  {
519
319
  text: "最近三个月",
520
- onClick(e) {
521
- const t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
522
- n.setTime(n.getTime() - 3600 * 1e3 * 24 * 90), e.$emit("pick", [n, t]);
320
+ onClick(t) {
321
+ const e = /* @__PURE__ */ new Date(), i = /* @__PURE__ */ new Date();
322
+ i.setTime(i.getTime() - 3600 * 1e3 * 24 * 90), t.$emit("pick", [i, e]);
523
323
  }
524
324
  }
525
325
  ]
526
326
  },
527
- config: h
327
+ config: p
528
328
  };
529
329
  },
530
330
  created() {
531
331
  this.initFun();
532
332
  },
533
333
  methods: {
534
- optVal: m,
334
+ optVal: h,
535
335
  // 日期组件回调
536
- dateChange(e) {
537
- this.dateCreate ? this.crud.$emit("date-change", e) : this.dateCreate = !0;
336
+ dateChange(t) {
337
+ this.dateCreate ? this.crud.$emit("date-change", t) : this.dateCreate = !0;
538
338
  },
539
339
  initFun() {
540
340
  this.crud.rowExcel = this.rowExcel, this.crud.rowPrint = this.rowPrint;
@@ -546,401 +346,182 @@ const le = {
546
346
  this.$Print(this.crud.$refs.table);
547
347
  }
548
348
  }
549
- }, C = {};
550
- var ae = /* @__PURE__ */ f(
551
- le,
552
- se,
553
- oe,
349
+ };
350
+ var U = function() {
351
+ var e = this, i = e._self._c;
352
+ return i("div", { staticClass: "avue-crud__menu" }, [e.optVal(e.crud.tableOption.menuLeft, !0) ? i("div", { staticClass: "avue-crud__left" }, [e.optVal(e.crud.tableOption.addBtn, e.config.addBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("addBtn"), expression: "crud.getPermission('addBtn')" }], attrs: { type: "primary", icon: e.crud.getBtnIcon("addBtn"), size: e.crud.isMediumSize }, on: { click: e.crud.rowAdd } }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.addRowBtn, e.config.addRowBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("addRowBtn"), expression: "crud.getPermission('addRowBtn')" }], attrs: { type: "primary", icon: e.crud.getBtnIcon("addBtn"), size: e.crud.isMediumSize }, on: { click: e.crud.rowCellAdd } }, [e.crud.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("addBtn")) + " ")]], 2) : e._e(), e._t("menuLeft", null, { size: e.crud.isMediumSize })], 2) : e._e(), e.optVal(e.crud.tableOption.menuRight, !0) ? i("div", { staticClass: "avue-crud__right" }, [e.optVal(e.crud.tableOption.dateBtn, e.config.dateBtn) ? i("FyDate", { staticStyle: { display: "inline-block", "margin-right": "20px" }, attrs: { type: "datetimerange", "value-format": "yyyy-MM-dd HH:mm:ss", format: "yyyy-MM-dd HH:mm:ss", "picker-options": e.pickerOptions, size: e.crud.isMediumSize }, on: { change: e.dateChange } }) : e._e(), e._t("menuRight", null, { size: e.crud.isMediumSize }), e.optVal(e.crud.tableOption.excelBtn, e.config.excelBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("excelBtn"), expression: "crud.getPermission('excelBtn')" }], attrs: { icon: e.crud.getBtnIcon("excelBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: e.rowExcel } }) : e._e(), e.optVal(e.crud.tableOption.printBtn, e.config.printBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("printBtn"), expression: "crud.getPermission('printBtn')" }], attrs: { icon: e.crud.getBtnIcon("printBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: e.rowPrint } }) : e._e(), e.optVal(e.crud.tableOption.refreshBtn, e.config.refreshBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("refreshBtn"), expression: "crud.getPermission('refreshBtn')" }], attrs: { icon: e.crud.getBtnIcon("refreshBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: e.crud.refreshChange } }) : e._e(), e.optVal(e.crud.tableOption.columnBtn, e.config.columnBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("columnBtn"), expression: "crud.getPermission('columnBtn')" }], attrs: { icon: e.crud.getBtnIcon("columnBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: function(n) {
353
+ return e.crud.$refs.dialogColumn.handleShow();
354
+ } } }) : e._e(), (e.crud.$refs.headerSearch || {}).searchFlag && e.optVal(e.crud.tableOption.searchShowBtn, !0) ? i("ElButton", { attrs: { icon: e.crud.getBtnIcon("searchBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: function(n) {
355
+ return e.crud.$refs.headerSearch.handleSearchShow();
356
+ } } }) : e._e(), e.optVal(e.crud.tableOption.filterBtn, e.config.filterBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("filterBtn"), expression: "crud.getPermission('filterBtn')" }], attrs: { icon: e.crud.getBtnIcon("filterBtn"), circle: "", size: e.crud.isMediumSize }, on: { click: function(n) {
357
+ return e.crud.$refs.dialogFilter.handleShow();
358
+ } } }) : e._e()], 2) : e._e()]);
359
+ }, G = [], q = /* @__PURE__ */ f(
360
+ K,
361
+ U,
362
+ G,
554
363
  !1,
555
- ce,
364
+ null,
556
365
  null,
557
366
  null,
558
367
  null
559
368
  );
560
- function ce(e) {
561
- for (let t in C)
562
- this[t] = C[t];
563
- }
564
- const ue = /* @__PURE__ */ function() {
565
- return ae.exports;
566
- }();
567
- var de = function() {
568
- var e = this, t = e.$createElement, n = e._self._c || t;
569
- return e.getColumnProp(e.column, "hide") ? n("ElTableColumn", {
570
- key: e.column.prop,
571
- attrs: {
572
- prop: e.column.prop,
573
- label: e.column.label,
574
- "column-key": e.column.prop,
575
- "filter-placement": "bottom-end",
576
- filters: e.getColumnProp(e.column, "filters"),
577
- "filter-method": e.getColumnProp(e.column, "filterMethod") ? e.handleFilterMethod : void 0,
578
- "filter-multiple": e.optVal(e.column.filterMultiple, !0),
579
- "show-overflow-tooltip": e.column.overHidden,
580
- "min-width": e.column.minWidth,
581
- sortable: e.getColumnProp(e.column, "sortable"),
582
- "sort-method": e.column.sortMethod,
583
- "sort-orders": e.column.sortOrders,
584
- "sort-by": e.column.sortBy,
585
- resizable: e.column.resizable,
586
- "render-header": e.column.renderHeader,
587
- align: e.column.align || e.crud.tableOption.align,
588
- "header-align": e.column.headerAlign || e.crud.tableOption.headerAlign,
589
- width: e.getColumnProp(e.column, "width"),
590
- fixed: e.getColumnProp(e.column, "fixed")
591
- },
592
- scopedSlots: e._u([{
593
- key: "header",
594
- fn: function(i) {
595
- var r = i.$index;
596
- return [e.crud.getSlotName(e.column, "H", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "H"), null, null, {
597
- column: e.column,
598
- $index: r
599
- }) : n("span", [e._v(e._s(e.column.label))])];
600
- }
601
- }, {
602
- key: "default",
603
- fn: function(i) {
604
- var r = i.row, o = i.$index;
605
- return [r.$cellEdit && e.column.cell ? n("ElFormItem", {
606
- attrs: {
607
- prop: e.crud.isTree ? "" : `list.${o}.${e.column.prop}`,
608
- label: e.vaildLabel(e.column, r, " "),
609
- "label-width": e.vaildLabel(e.column, r, "1px"),
610
- rules: e.column.rules
611
- }
612
- }, [n("ElTooltip", {
613
- attrs: {
614
- content: (e.crud.listError[`list.${o}.${e.column.prop}`] || {}).msg,
615
- disabled: !(e.crud.listError[`list.${o}.${e.column.prop}`] || {}).valid,
616
- placement: "top"
617
- }
618
- }, [e.crud.getSlotName(e.column, "F", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "F"), null, null, {
619
- row: r,
620
- dic: e.crud.DIC[e.column.prop],
621
- size: e.crud.isMediumSize,
622
- index: o,
623
- disabled: e.crud.btnDisabledList[o],
624
- label: e.handleDetail(r, e.column),
625
- $cell: r.$cellEdit
626
- }) : n("FormTemp", e._b({
627
- attrs: {
628
- column: e.column,
629
- size: e.crud.isMediumSize,
630
- "table-data": {
631
- index: o,
632
- row: r,
633
- label: e.handleDetail(r, e.column)
634
- },
635
- dic: (e.crud.cascaderDIC[o] || {})[e.column.prop] || e.crud.DIC[e.column.prop],
636
- props: e.column.props || e.crud.tableOption.props,
637
- readonly: e.column.readonly,
638
- disabled: e.crud.disabled || e.crud.tableOption.disabled || e.column.disabled || e.crud.btnDisabledList[o],
639
- clearable: e.optVal(e.column.clearable, !1),
640
- "column-slot": e.crud.mainSlot
641
- },
642
- on: {
643
- change: function(s) {
644
- return e.columnChange(r, e.column, o);
645
- }
646
- },
647
- scopedSlots: e._u([e._l(e.crud.mainSlot, function(s) {
648
- return {
649
- key: s,
650
- fn: function(l) {
651
- return [e._t(s, null, null, l)];
652
- }
653
- };
654
- })], null, !0),
655
- model: {
656
- value: r[e.column.prop],
657
- callback: function(s) {
658
- e.$set(r, e.column.prop, s);
659
- },
660
- expression: "row[column.prop]"
661
- }
662
- }, "FormTemp", e.uploadFun(e.column, e.crud), !1))], 2)], 1) : e.crud.$scopedSlots[e.column.prop] ? e._t(e.column.prop, null, {
663
- row: r,
664
- index: o,
665
- dic: e.crud.DIC[e.column.prop],
666
- size: e.crud.isMediumSize,
667
- label: e.handleDetail(r, e.column)
668
- }) : [["img", "upload"].includes(e.column.type) ? n("span", {
669
- staticClass: "avue-crud__img"
670
- }, [e._l(e.getImgList(r, e.column), function(s, l) {
671
- return [e.isMediaType(s, e.column.fileType) ? n(e.isMediaType(s, e.column.fileType), {
672
- key: l,
673
- tag: "Component",
674
- attrs: {
675
- src: s
676
- },
677
- on: {
678
- click: function(u) {
679
- return u.stopPropagation(), e.openImg(r, e.column, l);
680
- }
681
- }
682
- }) : n("i", {
683
- key: l,
684
- staticClass: "el-icon-document",
685
- attrs: {
686
- src: s
687
- },
688
- on: {
689
- click: function(u) {
690
- return u.stopPropagation(), e.openImg(r, e.column, l);
691
- }
692
- }
693
- })];
694
- })], 2) : e.column.type === "url" ? n("span", e._l(e.corArray(r, e.column), function(s, l) {
695
- return n("ElLink", {
696
- key: l,
697
- attrs: {
698
- type: "primary",
699
- href: s,
700
- target: e.column.target || "_blank"
701
- }
702
- }, [e._v(e._s(s))]);
703
- }), 1) : e.column.type === "rate" ? n("span", [n("FyRate", {
704
- attrs: {
705
- disabled: ""
706
- },
707
- model: {
708
- value: r[e.column.prop],
709
- callback: function(s) {
710
- e.$set(r, e.column.prop, s);
711
- },
712
- expression: "row[column.prop]"
713
- }
714
- })], 1) : e.column.type === "color" ? n("i", {
715
- staticClass: "avue-crud__color",
716
- style: {
717
- backgroundColor: r[e.column.prop]
718
- }
719
- }) : e.column.type === "icon" ? n("IconTemp", {
720
- attrs: {
721
- text: r[e.column.prop]
722
- }
723
- }) : e.column.html ? n("span", {
724
- domProps: {
725
- innerHTML: e._s(e.handleDetail(r, e.column))
726
- }
727
- }) : n("span", {
728
- domProps: {
729
- textContent: e._s(e.handleDetail(r, e.column))
730
- }
731
- })]];
732
- }
733
- }], null, !0)
734
- }) : e._e();
735
- }, pe = [];
736
- const y = {}, he = {
369
+ const X = q.exports, y = {}, J = {
737
370
  name: "ColumnSlot",
738
- components: { IconTemp: Y, FormTemp: J },
371
+ components: { IconTemp: R, FormTemp: L },
739
372
  inject: ["dynamic", "crud"],
740
373
  props: {
741
374
  column: Object,
742
375
  columnOption: Array
743
376
  },
744
377
  created() {
745
- const e = ["getColumnProp", "handleFilterMethod", "handleFilters"];
746
- Object.keys(this.dynamic).forEach((t) => {
747
- e.includes(t) && (this[t] = this.dynamic[t]);
378
+ const t = ["getColumnProp", "handleFilterMethod", "handleFilters"];
379
+ Object.keys(this.dynamic).forEach((e) => {
380
+ t.includes(e) && (this[e] = this.dynamic[e]);
748
381
  });
749
382
  },
750
383
  methods: {
751
384
  isBlank: c,
752
- optVal: m,
753
- uploadFun: z,
754
- isMediaType(e, t) {
755
- return K(e, t);
756
- },
757
- vaildLabel(e, t, n) {
758
- if (e.rules && t.$cellEdit)
759
- return n;
760
- },
761
- columnChange(e, t, n) {
762
- const i = `${n}-${t.prop}`;
763
- y[i] || (this.handleChange(t, e), typeof t.change == "function" && t.cell === !0 && t.change({ row: e, column: t, index: n, value: e[t.prop] })), y[i] = !0, this.$nextTick(() => {
764
- y[i] = !1;
385
+ optVal: h,
386
+ uploadFun: B,
387
+ isMediaType(t, e) {
388
+ return P(t, e);
389
+ },
390
+ vaildLabel(t, e, i) {
391
+ if (t.rules && e.$cellEdit)
392
+ return i;
393
+ },
394
+ columnChange(t, e, i) {
395
+ const n = `${i}-${e.prop}`;
396
+ y[n] || (this.handleChange(e, t), typeof e.change == "function" && e.cell === !0 && e.change({ row: t, column: e, index: i, value: t[e.prop] })), y[n] = !0, this.$nextTick(() => {
397
+ y[n] = !1;
765
398
  });
766
399
  },
767
- handleChange(e, t) {
768
- e.cascader && this.$nextTick(() => {
769
- const n = e.cascader;
770
- n.forEach((i) => {
771
- const r = i, o = t[e.prop], s = t.$index, l = this.findObject(this.columnOption, r);
772
- c(l) || (c(this.crud.cascaderDIC[s]) && this.$set(this.crud.cascaderDIC, s, {}), this.crud.cascaderIndexList.includes(s) && n.forEach((u) => {
773
- this.$set(this.crud.cascaderDIC[s], u.prop, []), n.forEach((d) => t[d] = "");
774
- }), !(c(n) || c(o) || c(l)) && Q({
775
- column: l,
776
- value: o,
777
- form: t
778
- }).then((u) => {
779
- const d = u || [];
780
- this.crud.cascaderIndexList.includes(s) || this.crud.cascaderIndexList.push(s), this.crud.cascaderDicList[s] || this.$set(this.crud.cascaderDicList, s, {}), this.crud.cascaderDicList[s][r] || this.$set(this.crud.cascaderDicList[s], r, d), this.$set(this.crud.cascaderDIC[s], r, d), !c(d[l.cascaderIndex]) && !c(d) && !c(l.cascaderIndex) && (t[r] = d[l.cascaderIndex][(l.props || {}).value || b.value]);
400
+ handleChange(t, e) {
401
+ t.cascader && this.$nextTick(() => {
402
+ const i = t.cascader;
403
+ i.forEach((n) => {
404
+ const r = n, s = e[t.prop], l = e.$index, o = this.findObject(this.columnOption, r);
405
+ c(o) || (c(this.crud.cascaderDIC[l]) && this.$set(this.crud.cascaderDIC, l, {}), this.crud.cascaderIndexList.includes(l) && i.forEach((m) => {
406
+ this.$set(this.crud.cascaderDIC[l], m.prop, []), i.forEach((u) => e[u] = "");
407
+ }), !(c(i) || c(s) || c(o)) && V({
408
+ column: o,
409
+ value: s,
410
+ form: e
411
+ }).then((m) => {
412
+ const u = m || [];
413
+ this.crud.cascaderIndexList.includes(l) || this.crud.cascaderIndexList.push(l), this.crud.cascaderDicList[l] || this.$set(this.crud.cascaderDicList, l, {}), this.crud.cascaderDicList[l][r] || this.$set(this.crud.cascaderDicList[l], r, u), this.$set(this.crud.cascaderDIC[l], r, u), !c(u[o.cascaderIndex]) && !c(u) && !c(o.cascaderIndex) && (e[r] = u[o.cascaderIndex][(o.props || {}).value || b.value]);
781
414
  }));
782
415
  });
783
416
  });
784
417
  },
785
- handleDetail(e, t) {
786
- const n = t.parentProp ? (this.crud.cascaderDIC[e.$index] || {})[t.prop] : this.crud.DIC[t.prop], i = L(e, t, this.crud.tableOption, n);
787
- return !c(n) && this.crud.tableOption.filterDic !== !0 && (e[`$${t.prop}`] = i), i;
418
+ handleDetail(t, e) {
419
+ const i = e.parentProp ? (this.crud.cascaderDIC[t.$index] || {})[e.prop] : this.crud.DIC[e.prop], n = w(t, e, this.crud.tableOption, i);
420
+ return !c(i) && this.crud.tableOption.filterDic !== !0 && (t[`$${e.prop}`] = n), n;
788
421
  },
789
- corArray(e, t) {
790
- let n = this.handleDetail(e, t);
791
- return Array.isArray(n) || (n = c(n) ? [] : n.split(U)), a(n);
422
+ corArray(t, e) {
423
+ let i = this.handleDetail(t, e);
424
+ return Array.isArray(i) || (i = c(i) ? [] : i.split(D)), a(i);
792
425
  },
793
- openImg(e, t, n) {
794
- let i = this.getImgList(e, t);
795
- i = i.map((r) => ({ thumbUrl: r, url: r, type: t.fileType })), this.$ImagePreview(i, n);
426
+ openImg(t, e, i) {
427
+ let n = this.getImgList(t, e);
428
+ n = n.map((r) => ({ thumbUrl: r, url: r, type: e.fileType })), this.$ImagePreview(n, i);
796
429
  },
797
- getImgList(e, t) {
798
- var o, s;
799
- const n = ((o = t.propsHttp) == null ? void 0 : o.home) || "", i = ((s = t.props) == null ? void 0 : s.value) || b.value, r = this.corArray(e, t);
800
- return r.forEach((l, u) => {
801
- r[u] = n + (l[i] ? l[i] : l);
430
+ getImgList(t, e) {
431
+ var s, l;
432
+ const i = ((s = e.propsHttp) == null ? void 0 : s.home) || "", n = ((l = e.props) == null ? void 0 : l.value) || b.value, r = this.corArray(t, e);
433
+ return r.forEach((o, m) => {
434
+ r[m] = i + (o[n] ? o[n] : o);
802
435
  }), r;
803
436
  }
804
437
  }
805
- }, B = {};
806
- var me = /* @__PURE__ */ f(
807
- he,
808
- de,
809
- pe,
438
+ };
439
+ var Q = function() {
440
+ var e = this, i = e._self._c;
441
+ return e.getColumnProp(e.column, "hide") ? i("ElTableColumn", { key: e.column.prop, attrs: { prop: e.column.prop, label: e.column.label, "column-key": e.column.prop, "filter-placement": "bottom-end", filters: e.getColumnProp(e.column, "filters"), "filter-method": e.getColumnProp(e.column, "filterMethod") ? e.handleFilterMethod : void 0, "filter-multiple": e.optVal(e.column.filterMultiple, !0), "show-overflow-tooltip": e.column.overHidden, "min-width": e.column.minWidth, sortable: e.getColumnProp(e.column, "sortable"), "sort-method": e.column.sortMethod, "sort-orders": e.column.sortOrders, "sort-by": e.column.sortBy, resizable: e.column.resizable, "render-header": e.column.renderHeader, align: e.column.align || e.crud.tableOption.align, "header-align": e.column.headerAlign || e.crud.tableOption.headerAlign, width: e.getColumnProp(e.column, "width"), fixed: e.getColumnProp(e.column, "fixed") }, scopedSlots: e._u([{ key: "header", fn: function({ $index: n }) {
442
+ return [e.crud.getSlotName(e.column, "H", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "H"), null, null, { column: e.column, $index: n }) : i("span", [e._v(e._s(e.column.label))])];
443
+ } }, { key: "default", fn: function({ row: n, $index: r }) {
444
+ return [n.$cellEdit && e.column.cell ? i("ElFormItem", { attrs: { prop: e.crud.isTree ? "" : `list.${r}.${e.column.prop}`, label: e.vaildLabel(e.column, n, " "), "label-width": e.vaildLabel(e.column, n, "1px"), rules: e.column.rules } }, [i("ElTooltip", { attrs: { content: (e.crud.listError[`list.${r}.${e.column.prop}`] || {}).msg, disabled: !(e.crud.listError[`list.${r}.${e.column.prop}`] || {}).valid, placement: "top" } }, [e.crud.getSlotName(e.column, "F", e.crud.$scopedSlots) ? e._t(e.crud.getSlotName(e.column, "F"), null, null, {
445
+ row: n,
446
+ dic: e.crud.DIC[e.column.prop],
447
+ size: e.crud.isMediumSize,
448
+ index: r,
449
+ disabled: e.crud.btnDisabledList[r],
450
+ label: e.handleDetail(n, e.column),
451
+ $cell: n.$cellEdit
452
+ }) : i("FormTemp", e._b({ attrs: { column: e.column, size: e.crud.isMediumSize, "table-data": { index: r, row: n, label: e.handleDetail(n, e.column) }, dic: (e.crud.cascaderDIC[r] || {})[e.column.prop] || e.crud.DIC[e.column.prop], props: e.column.props || e.crud.tableOption.props, readonly: e.column.readonly, disabled: e.crud.disabled || e.crud.tableOption.disabled || e.column.disabled || e.crud.btnDisabledList[r], clearable: e.optVal(e.column.clearable, !1), "column-slot": e.crud.mainSlot }, on: { change: function(s) {
453
+ return e.columnChange(n, e.column, r);
454
+ } }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(s) {
455
+ return { key: s, fn: function(l) {
456
+ return [e._t(s, null, null, l)];
457
+ } };
458
+ })], null, !0), model: { value: n[e.column.prop], callback: function(s) {
459
+ e.$set(n, e.column.prop, s);
460
+ }, expression: "row[column.prop]" } }, "FormTemp", e.uploadFun(e.column, e.crud), !1))], 2)], 1) : e.crud.$scopedSlots[e.column.prop] ? e._t(e.column.prop, null, { row: n, index: r, dic: e.crud.DIC[e.column.prop], size: e.crud.isMediumSize, label: e.handleDetail(n, e.column) }) : [["img", "upload"].includes(e.column.type) ? i("span", { staticClass: "avue-crud__img" }, [e._l(e.getImgList(n, e.column), function(s, l) {
461
+ return [e.isMediaType(s, e.column.fileType) ? i(e.isMediaType(s, e.column.fileType), { key: l, tag: "Component", attrs: { src: s }, on: { click: function(o) {
462
+ return o.stopPropagation(), e.openImg(n, e.column, l);
463
+ } } }) : i("i", { key: l, staticClass: "el-icon-document", attrs: { src: s }, on: { click: function(o) {
464
+ return o.stopPropagation(), e.openImg(n, e.column, l);
465
+ } } })];
466
+ })], 2) : e.column.type === "url" ? i("span", e._l(e.corArray(n, e.column), function(s, l) {
467
+ return i("ElLink", { key: l, attrs: { type: "primary", href: s, target: e.column.target || "_blank" } }, [e._v(e._s(s))]);
468
+ }), 1) : e.column.type === "rate" ? i("span", [i("FyRate", { attrs: { disabled: "" }, model: { value: n[e.column.prop], callback: function(s) {
469
+ e.$set(n, e.column.prop, s);
470
+ }, expression: "row[column.prop]" } })], 1) : e.column.type === "color" ? i("i", { staticClass: "avue-crud__color", style: { backgroundColor: n[e.column.prop] } }) : e.column.type === "icon" ? i("IconTemp", { attrs: { text: n[e.column.prop] } }) : e.column.html ? i("span", { domProps: { innerHTML: e._s(e.handleDetail(n, e.column)) } }) : i("span", { domProps: { textContent: e._s(e.handleDetail(n, e.column)) } })]];
471
+ } }], null, !0) }) : e._e();
472
+ }, Y = [], Z = /* @__PURE__ */ f(
473
+ J,
474
+ Q,
475
+ Y,
810
476
  !1,
811
- fe,
477
+ null,
812
478
  null,
813
479
  null,
814
480
  null
815
481
  );
816
- function fe(e) {
817
- for (let t in B)
818
- this[t] = B[t];
819
- }
820
- const V = /* @__PURE__ */ function() {
821
- return me.exports;
822
- }();
823
- var be = function() {
824
- var e = this, t = e.$createElement, n = e._self._c || t;
825
- return e.getColumnProp(e.columnOption, "hide") ? n("ElTableColumn", {
826
- key: e.columnOption.prop,
827
- attrs: {
828
- prop: e.columnOption.prop,
829
- label: e.columnOption.label,
830
- "filter-placement": "bottom-end",
831
- filters: e.getColumnProp(e.columnOption, "filters"),
832
- "filter-method": e.getColumnProp(e.columnOption, "filterMethod") ? e.handleFilterMethod : void 0,
833
- "filter-multiple": e.optVal(e.columnOption.filterMultiple, !0),
834
- "show-overflow-tooltip": e.columnOption.overHidden,
835
- "min-width": e.columnOption.minWidth,
836
- sortable: e.getColumnProp(e.columnOption, "sortable"),
837
- "render-header": e.columnOption.renderHeader,
838
- align: e.columnOption.align || e.crud.tableOption.align,
839
- "header-align": e.columnOption.headerAlign || e.crud.tableOption.headerAlign,
840
- width: e.getColumnProp(e.columnOption, "width"),
841
- fixed: e.getColumnProp(e.columnOption, "fixed")
842
- }
843
- }, [e._l(e.columnOption.children, function(i) {
844
- return [i.children && i.children.length > 0 ? n("ColumnDynamic", {
845
- key: i.prop,
846
- attrs: {
847
- "column-option": i
848
- },
849
- scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
850
- return {
851
- key: r,
852
- fn: function(o) {
853
- return [e._t(r, null, null, o)];
854
- }
855
- };
856
- })], null, !0)
857
- }) : n("ColumnSlot", {
858
- key: i.prop,
859
- attrs: {
860
- column: i,
861
- "column-option": e.columnOption.children
862
- },
863
- scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
864
- return {
865
- key: r,
866
- fn: function(o) {
867
- return [e._t(r, null, null, o)];
868
- }
869
- };
870
- })], null, !0)
871
- })];
872
- })], 2) : e._e();
873
- }, ge = [];
874
- const _e = {
482
+ const S = Z.exports, ee = {
875
483
  name: "ColumnDynamic",
876
- components: { ColumnSlot: V },
484
+ components: { ColumnSlot: S },
877
485
  inject: ["dynamic", "crud"],
878
486
  props: {
879
487
  columnOption: Object
880
488
  },
881
489
  created() {
882
- const e = ["getColumnProp", "handleFilterMethod", "handleFilters"];
883
- Object.keys(this.dynamic).forEach((t) => {
884
- e.includes(t) && (this[t] = this.dynamic[t]);
490
+ const t = ["getColumnProp", "handleFilterMethod", "handleFilters"];
491
+ Object.keys(this.dynamic).forEach((e) => {
492
+ t.includes(e) && (this[e] = this.dynamic[e]);
885
493
  });
886
494
  },
887
495
  methods: {
888
- optVal: m
496
+ optVal: h
889
497
  }
890
- }, S = {};
891
- var ve = /* @__PURE__ */ f(
892
- _e,
893
- be,
894
- ge,
498
+ };
499
+ var te = function() {
500
+ var e = this, i = e._self._c;
501
+ return e.getColumnProp(e.columnOption, "hide") ? i("ElTableColumn", { key: e.columnOption.prop, attrs: { prop: e.columnOption.prop, label: e.columnOption.label, "filter-placement": "bottom-end", filters: e.getColumnProp(e.columnOption, "filters"), "filter-method": e.getColumnProp(e.columnOption, "filterMethod") ? e.handleFilterMethod : void 0, "filter-multiple": e.optVal(e.columnOption.filterMultiple, !0), "show-overflow-tooltip": e.columnOption.overHidden, "min-width": e.columnOption.minWidth, sortable: e.getColumnProp(e.columnOption, "sortable"), "render-header": e.columnOption.renderHeader, align: e.columnOption.align || e.crud.tableOption.align, "header-align": e.columnOption.headerAlign || e.crud.tableOption.headerAlign, width: e.getColumnProp(e.columnOption, "width"), fixed: e.getColumnProp(e.columnOption, "fixed") } }, [e._l(e.columnOption.children, function(n) {
502
+ return [n.children && n.children.length > 0 ? i("ColumnDynamic", { key: n.prop, attrs: { "column-option": n }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
503
+ return { key: r, fn: function(s) {
504
+ return [e._t(r, null, null, s)];
505
+ } };
506
+ })], null, !0) }) : i("ColumnSlot", { key: n.prop, attrs: { column: n, "column-option": e.columnOption.children }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
507
+ return { key: r, fn: function(s) {
508
+ return [e._t(r, null, null, s)];
509
+ } };
510
+ })], null, !0) })];
511
+ })], 2) : e._e();
512
+ }, ie = [], ne = /* @__PURE__ */ f(
513
+ ee,
514
+ te,
515
+ ie,
895
516
  !1,
896
- ye,
517
+ null,
897
518
  null,
898
519
  null,
899
520
  null
900
521
  );
901
- function ye(e) {
902
- for (let t in S)
903
- this[t] = S[t];
904
- }
905
- const xe = /* @__PURE__ */ function() {
906
- return ve.exports;
907
- }();
908
- var we = function() {
909
- var e = this, t = e.$createElement, n = e._self._c || t;
910
- return n("div", [e._t("header"), e._l(e.list, function(i) {
911
- return [i.children && i.children.length > 0 ? n("ColumnDynamic", {
912
- key: i.pop,
913
- attrs: {
914
- "column-option": i
915
- },
916
- scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
917
- return {
918
- key: r,
919
- fn: function(o) {
920
- return [e._t(r, null, null, o)];
921
- }
922
- };
923
- })], null, !0)
924
- }) : n("ColumnSlot", {
925
- key: i.prop,
926
- attrs: {
927
- column: i,
928
- "column-option": e.columnOption
929
- },
930
- scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
931
- return {
932
- key: r,
933
- fn: function(o) {
934
- return [e._t(r, null, null, o)];
935
- }
936
- };
937
- })], null, !0)
938
- })];
939
- }), e._t("footer")], 2);
940
- }, $e = [];
941
- const Ce = {
522
+ const re = ne.exports, se = {
942
523
  name: "Column",
943
- components: { ColumnDynamic: xe, ColumnSlot: V },
524
+ components: { ColumnDynamic: re, ColumnSlot: S },
944
525
  inject: ["crud"],
945
526
  provide() {
946
527
  return {
@@ -953,411 +534,137 @@ const Ce = {
953
534
  },
954
535
  computed: {
955
536
  list() {
956
- let e = [...this.columnOption];
957
- return e = G(
958
- e,
537
+ let t = [...this.columnOption];
538
+ return t = T(
539
+ t,
959
540
  "index",
960
- (t, n) => {
961
- var i, r;
962
- return ((i = this.crud.objectOption[t.prop]) == null ? void 0 : i.index) - ((r = this.crud.objectOption[n.prop]) == null ? void 0 : r.index);
541
+ (e, i) => {
542
+ var n, r;
543
+ return ((n = this.crud.objectOption[e.prop]) == null ? void 0 : n.index) - ((r = this.crud.objectOption[i.prop]) == null ? void 0 : r.index);
963
544
  }
964
- ), e;
545
+ ), t;
965
546
  }
966
547
  },
967
548
  methods: {
968
549
  // 表格筛选逻辑
969
- handleFilterMethod(e, t, n) {
970
- const i = this.columnOption.filter((r) => r.prop === n.property)[0];
971
- return typeof i.filterMethod == "function" ? i.filterMethod(e, t, i) : t[i.prop] === e;
550
+ handleFilterMethod(t, e, i) {
551
+ const n = this.columnOption.filter((r) => r.prop === i.property)[0];
552
+ return typeof n.filterMethod == "function" ? n.filterMethod(t, e, n) : e[n.prop] === t;
972
553
  },
973
554
  // 表格筛选字典
974
- handleFilters(e, t) {
975
- if (t !== !0)
555
+ handleFilters(t, e) {
556
+ if (e !== !0)
976
557
  return;
977
- const n = this.crud.DIC[e.prop] || [], i = [];
978
- return c(n) ? this.crud.cellForm.list.forEach((r) => {
979
- i.map((o) => o.text).includes(r[e.prop]) || i.push({
980
- text: r[e.prop],
981
- value: r[e.prop]
558
+ const i = this.crud.DIC[t.prop] || [], n = [];
559
+ return c(i) ? this.crud.cellForm.list.forEach((r) => {
560
+ n.map((s) => s.text).includes(r[t.prop]) || n.push({
561
+ text: r[t.prop],
562
+ value: r[t.prop]
982
563
  });
983
- }) : n.forEach((r) => {
984
- const o = e.props || this.crud.tableOption.props || {};
985
- i.push({
986
- text: r[o.label || b.label],
987
- value: r[o.value || b.value]
564
+ }) : i.forEach((r) => {
565
+ const s = t.props || this.crud.tableOption.props || {};
566
+ n.push({
567
+ text: r[s.label || b.label],
568
+ value: r[s.value || b.value]
988
569
  });
989
- }), i;
570
+ }), n;
990
571
  },
991
- getColumnProp(e, t) {
992
- const n = this.crud.objectOption[e.prop] || {};
993
- if (t === "filterMethod")
994
- return n == null ? void 0 : n.filters;
995
- if (this.crud.isMobile && ["fixed"].includes(t))
572
+ getColumnProp(t, e) {
573
+ const i = this.crud.objectOption[t.prop] || {};
574
+ if (e === "filterMethod")
575
+ return i == null ? void 0 : i.filters;
576
+ if (this.crud.isMobile && ["fixed"].includes(e))
996
577
  return !1;
997
- const i = n == null ? void 0 : n[t];
998
- if (!(t === "width" && i === 0))
999
- return t === "filters" ? this.handleFilters(e, i) : t === "hide" ? (n == null ? void 0 : n.hide) !== !0 : i;
578
+ const n = i == null ? void 0 : i[e];
579
+ if (!(e === "width" && n === 0))
580
+ return e === "filters" ? this.handleFilters(t, n) : e === "hide" ? (i == null ? void 0 : i.hide) !== !0 : n;
1000
581
  }
1001
582
  }
1002
- }, O = {};
1003
- var Be = /* @__PURE__ */ f(
1004
- Ce,
1005
- we,
1006
- $e,
583
+ };
584
+ var le = function() {
585
+ var e = this, i = e._self._c;
586
+ return i("div", [e._t("header"), e._l(e.list, function(n) {
587
+ return [n.children && n.children.length > 0 ? i("ColumnDynamic", { key: n.pop, attrs: { "column-option": n }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
588
+ return { key: r, fn: function(s) {
589
+ return [e._t(r, null, null, s)];
590
+ } };
591
+ })], null, !0) }) : i("ColumnSlot", { key: n.prop, attrs: { column: n, "column-option": e.columnOption }, scopedSlots: e._u([e._l(e.crud.mainSlot, function(r) {
592
+ return { key: r, fn: function(s) {
593
+ return [e._t(r, null, null, s)];
594
+ } };
595
+ })], null, !0) })];
596
+ }), e._t("footer")], 2);
597
+ }, oe = [], ae = /* @__PURE__ */ f(
598
+ se,
599
+ le,
600
+ oe,
1007
601
  !1,
1008
- Se,
602
+ null,
1009
603
  null,
1010
604
  null,
1011
605
  null
1012
606
  );
1013
- function Se(e) {
1014
- for (let t in O)
1015
- this[t] = O[t];
1016
- }
1017
- const Oe = /* @__PURE__ */ function() {
1018
- return Be.exports;
1019
- }();
1020
- var Fe = function() {
1021
- var e = this, t = e.$createElement, n = e._self._c || t;
1022
- return n("div", [n("ElTableColumn", {
1023
- attrs: {
1024
- width: "1px"
1025
- }
1026
- }), e.crud.tableOption.expand ? n("ElTableColumn", {
1027
- key: "expand",
1028
- attrs: {
1029
- type: "expand",
1030
- width: e.crud.tableOption.expandWidth || e.config.expandWidth,
1031
- fixed: e.optVal(e.crud.tableOption.expandFixed, e.config.expandFixed),
1032
- align: "center"
1033
- },
1034
- scopedSlots: e._u([{
1035
- key: "default",
1036
- fn: function(i) {
1037
- var r = i.row;
1038
- return [e._t("expand", null, {
1039
- row: r,
1040
- index: r.$index
1041
- })];
1042
- }
1043
- }], null, !0)
1044
- }) : e._e(), e.crud.tableOption.selection ? n("ElTableColumn", {
1045
- key: "selection",
1046
- attrs: {
1047
- fixed: e.optVal(e.crud.tableOption.selectionFixed, e.config.selectionFixed),
1048
- type: "selection",
1049
- selectable: e.crud.tableOption.selectable,
1050
- "reserve-selection": e.optVal(e.crud.tableOption.reserveSelection),
1051
- width: e.crud.tableOption.selectionWidth || e.config.selectionWidth,
1052
- align: "center"
1053
- }
1054
- }) : e._e(), e.optVal(e.crud.tableOption.index) ? n("ElTableColumn", {
1055
- key: "index",
1056
- attrs: {
1057
- fixed: e.optVal(e.crud.tableOption.indexFixed, e.config.indexFixed),
1058
- label: e.crud.tableOption.indexLabel || e.config.indexLabel,
1059
- type: "index",
1060
- width: e.crud.tableOption.indexWidth || e.config.indexWidth,
1061
- index: e.indexMethod,
1062
- align: "center"
1063
- }
1064
- }) : e._e()], 1);
1065
- }, ke = [];
1066
- const Ee = {
607
+ const ce = ae.exports, ue = {
1067
608
  name: "ColumnDefault",
1068
609
  inject: ["crud"],
1069
610
  data() {
1070
611
  return {
1071
- config: h
612
+ config: p
1072
613
  };
1073
614
  },
1074
615
  mounted() {
1075
616
  this.setSort();
1076
617
  },
1077
618
  methods: {
1078
- optVal: m,
1079
- indexMethod(e) {
1080
- return e + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
619
+ optVal: h,
620
+ indexMethod(t) {
621
+ return t + 1 + ((this.crud.page.currentPage || 1) - 1) * (this.crud.page.pageSize || 10);
1081
622
  },
1082
623
  setSort() {
1083
624
  this.rowDrop(), this.columnDrop();
1084
625
  },
1085
626
  rowDrop() {
1086
- const e = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
1087
- this.crud.tableDrop("row", e, (t) => {
1088
- const n = t.oldIndex, i = t.newIndex, r = this.crud.list.splice(n, 1)[0];
1089
- this.crud.list.splice(i, 0, r), this.crud.$emit("sortable-change", n, i), this.crud.refreshTable(() => this.rowDrop());
627
+ const t = this.crud.$refs.table.$el.querySelectorAll(this.config.dropRowClass)[0];
628
+ this.crud.tableDrop("row", t, (e) => {
629
+ const i = e.oldIndex, n = e.newIndex, r = this.crud.list.splice(i, 1)[0];
630
+ this.crud.list.splice(n, 0, r), this.crud.$emit("sortable-change", i, n), this.crud.refreshTable(() => this.rowDrop());
1090
631
  });
1091
632
  },
1092
633
  columnDrop() {
1093
- const e = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);
1094
- let t = 0;
1095
- ["selection", "index", "expand"].forEach((n) => {
1096
- this.crud.tableOption[n] && (t += 1);
1097
- }), this.crud.tableDrop("column", e, (n) => {
1098
- this.crud.headerSort(n.oldIndex - t, n.newIndex - t), this.columnDrop();
634
+ const t = this.crud.$refs.table.$el.querySelector(this.config.dropColClass);
635
+ let e = 0;
636
+ ["selection", "index", "expand"].forEach((i) => {
637
+ this.crud.tableOption[i] && (e += 1);
638
+ }), this.crud.tableDrop("column", t, (i) => {
639
+ this.crud.headerSort(i.oldIndex - e, i.newIndex - e), this.columnDrop();
1099
640
  });
1100
641
  }
1101
642
  }
1102
- }, F = {};
1103
- var Ie = /* @__PURE__ */ f(
1104
- Ee,
1105
- Fe,
1106
- ke,
643
+ };
644
+ var de = function() {
645
+ var e = this, i = e._self._c;
646
+ return i("div", [i("ElTableColumn", { attrs: { width: "1px" } }), e.crud.tableOption.expand ? i("ElTableColumn", { key: "expand", attrs: { type: "expand", width: e.crud.tableOption.expandWidth || e.config.expandWidth, fixed: e.optVal(e.crud.tableOption.expandFixed, e.config.expandFixed), align: "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: n }) {
647
+ return [e._t("expand", null, { row: n, index: n.$index })];
648
+ } }], null, !0) }) : e._e(), e.crud.tableOption.selection ? i("ElTableColumn", { key: "selection", attrs: { fixed: e.optVal(e.crud.tableOption.selectionFixed, e.config.selectionFixed), type: "selection", selectable: e.crud.tableOption.selectable, "reserve-selection": e.optVal(e.crud.tableOption.reserveSelection), width: e.crud.tableOption.selectionWidth || e.config.selectionWidth, align: "center" } }) : e._e(), e.optVal(e.crud.tableOption.index) ? i("ElTableColumn", { key: "index", attrs: { fixed: e.optVal(e.crud.tableOption.indexFixed, e.config.indexFixed), label: e.crud.tableOption.indexLabel || e.config.indexLabel, type: "index", width: e.crud.tableOption.indexWidth || e.config.indexWidth, index: e.indexMethod, align: "center" } }) : e._e()], 1);
649
+ }, pe = [], he = /* @__PURE__ */ f(
650
+ ue,
651
+ de,
652
+ pe,
1107
653
  !1,
1108
- Pe,
654
+ null,
1109
655
  null,
1110
656
  null,
1111
657
  null
1112
658
  );
1113
- function Pe(e) {
1114
- for (let t in F)
1115
- this[t] = F[t];
1116
- }
1117
- const De = /* @__PURE__ */ function() {
1118
- return Ie.exports;
1119
- }();
1120
- var Me = function() {
1121
- var e = this, t = e.$createElement, n = e._self._c || t;
1122
- return e.optVal(e.crud.tableOption.menu, e.config.menu) && e.crud.getPermission("menu") ? n("ElTableColumn", {
1123
- key: "menu",
1124
- staticClass: "avue-crud__btn",
1125
- attrs: {
1126
- prop: "menu",
1127
- fixed: e.optVal(e.crud.tableOption.menuFixed, e.config.menuFixed),
1128
- label: e.crud.tableOption.menuTitle || "操作",
1129
- align: e.crud.tableOption.menuAlign || e.config.menuAlign,
1130
- "header-align": e.crud.tableOption.menuHeaderAlign || e.config.menuHeaderAlign,
1131
- width: e.crud.isMobile ? e.crud.tableOption.menuXsWidth || e.config.menuXsWidth : e.crud.tableOption.menuWidth || e.config.menuWidth
1132
- },
1133
- scopedSlots: e._u([{
1134
- key: "default",
1135
- fn: function(i) {
1136
- var r = i.row, o = i.$index;
1137
- return [e.isMenu ? n("ElDropdown", {
1138
- attrs: {
1139
- size: e.crud.isMediumSize
1140
- },
1141
- scopedSlots: e._u([{
1142
- key: "dropdown",
1143
- fn: function() {
1144
- return [n("ElDropdownMenu", [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? n("ElDropdownItem", {
1145
- directives: [{
1146
- name: "permission",
1147
- rawName: "v-permission",
1148
- value: e.crud.getPermission("viewBtn", r, o),
1149
- expression: "crud.getPermission('viewBtn', row, $index)"
1150
- }],
1151
- attrs: {
1152
- icon: e.crud.getBtnIcon("viewBtn")
1153
- },
1154
- nativeOn: {
1155
- click: function(s) {
1156
- return e.crud.rowView(r, o);
1157
- }
1158
- }
1159
- }, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? n("ElDropdownItem", {
1160
- directives: [{
1161
- name: "permission",
1162
- rawName: "v-permission",
1163
- value: e.crud.getPermission("editBtn", r, o),
1164
- expression: "crud.getPermission('editBtn', row, $index)"
1165
- }],
1166
- attrs: {
1167
- icon: e.crud.getBtnIcon("editBtn")
1168
- },
1169
- nativeOn: {
1170
- click: function(s) {
1171
- return e.crud.rowEdit(r, o);
1172
- }
1173
- }
1174
- }, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? n("ElDropdownItem", {
1175
- directives: [{
1176
- name: "permission",
1177
- rawName: "v-permission",
1178
- value: e.crud.getPermission("copyBtn", r, o),
1179
- expression: "crud.getPermission('copyBtn', row, $index)"
1180
- }],
1181
- attrs: {
1182
- icon: e.crud.getBtnIcon("copyBtn")
1183
- },
1184
- nativeOn: {
1185
- click: function(s) {
1186
- return e.crud.rowCopy(r);
1187
- }
1188
- }
1189
- }, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? n("ElDropdownItem", {
1190
- directives: [{
1191
- name: "permission",
1192
- rawName: "v-permission",
1193
- value: e.crud.getPermission("delBtn", r, o),
1194
- expression: "crud.getPermission('delBtn', row, $index)"
1195
- }],
1196
- attrs: {
1197
- icon: e.crud.getBtnIcon("delBtn")
1198
- },
1199
- nativeOn: {
1200
- click: function(s) {
1201
- return e.crud.rowDel(r, o);
1202
- }
1203
- }
1204
- }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, {
1205
- row: r,
1206
- type: e.menuText("primary"),
1207
- disabled: e.crud.btnDisabled,
1208
- size: e.crud.isMediumSize,
1209
- index: o
1210
- })], 2)];
1211
- },
1212
- proxy: !0
1213
- }], null, !0)
1214
- }, [n("ElButton", {
1215
- attrs: {
1216
- type: "text",
1217
- size: e.crud.isMediumSize
1218
- }
1219
- }, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), n("i", {
1220
- staticClass: "el-icon-arrow-down el-icon--right"
1221
- })])], 1) : ["button", "text", "icon"].includes(e.menuType) ? [e.optVal(e.crud.tableOption.cellBtn, e.config.cellBtn) ? [e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !r.$cellEdit ? n("ElButton", {
1222
- directives: [{
1223
- name: "permission",
1224
- rawName: "v-permission",
1225
- value: e.crud.getPermission("editBtn", r, o),
1226
- expression: "crud.getPermission('editBtn', row, $index)"
1227
- }],
1228
- attrs: {
1229
- type: e.menuText("primary"),
1230
- icon: e.crud.getBtnIcon("editBtn"),
1231
- size: e.crud.isMediumSize,
1232
- disabled: e.crud.btnDisabledList[o]
1233
- },
1234
- on: {
1235
- click: function(s) {
1236
- return s.stopPropagation(), e.crud.rowCell(r, o);
1237
- }
1238
- }
1239
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e.optVal(e.crud.tableOption.saveBtn, e.config.saveBtn) && r.$cellEdit ? n("ElButton", {
1240
- directives: [{
1241
- name: "permission",
1242
- rawName: "v-permission",
1243
- value: e.crud.getPermission("saveBtn", r, o),
1244
- expression: "crud.getPermission('saveBtn', row, $index)"
1245
- }],
1246
- attrs: {
1247
- type: e.menuText("primary"),
1248
- icon: e.crud.getBtnIcon("saveBtn"),
1249
- size: e.crud.isMediumSize,
1250
- disabled: e.crud.btnDisabledList[o]
1251
- },
1252
- on: {
1253
- click: function(s) {
1254
- return s.stopPropagation(), e.crud.rowCell(r, o);
1255
- }
1256
- }
1257
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("saveBtn")) + " ")]], 2) : e._e(), r.$cellEdit ? n("ElButton", {
1258
- attrs: {
1259
- type: e.menuText("danger"),
1260
- icon: e.crud.getBtnIcon("cancelBtn"),
1261
- size: e.crud.isMediumSize,
1262
- disabled: e.crud.btnDisabledList[o]
1263
- },
1264
- on: {
1265
- click: function(s) {
1266
- return s.stopPropagation(), e.crud.rowCancel(r, o);
1267
- }
1268
- }
1269
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("cancelBtn")) + " ")]], 2) : e._e()] : e._e(), e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? n("ElButton", {
1270
- directives: [{
1271
- name: "permission",
1272
- rawName: "v-permission",
1273
- value: e.crud.getPermission("viewBtn", r, o),
1274
- expression: "crud.getPermission('viewBtn', row, $index)"
1275
- }],
1276
- attrs: {
1277
- type: e.menuText("success"),
1278
- icon: e.crud.getBtnIcon("viewBtn"),
1279
- size: e.crud.isMediumSize,
1280
- disabled: e.btnDisabled
1281
- },
1282
- on: {
1283
- click: function(s) {
1284
- return s.stopPropagation(), e.crud.rowView(r, o);
1285
- }
1286
- }
1287
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !e.crud.tableOption.cellBtn ? n("ElButton", {
1288
- directives: [{
1289
- name: "permission",
1290
- rawName: "v-permission",
1291
- value: e.crud.getPermission("editBtn", r, o),
1292
- expression: "crud.getPermission('editBtn', row, $index)"
1293
- }],
1294
- attrs: {
1295
- type: e.menuText("primary"),
1296
- icon: e.crud.getBtnIcon("editBtn"),
1297
- size: e.crud.isMediumSize,
1298
- disabled: e.btnDisabled
1299
- },
1300
- on: {
1301
- click: function(s) {
1302
- return s.stopPropagation(), e.crud.rowEdit(r, o);
1303
- }
1304
- }
1305
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? n("ElButton", {
1306
- directives: [{
1307
- name: "permission",
1308
- rawName: "v-permission",
1309
- value: e.crud.getPermission("copyBtn", r, o),
1310
- expression: "crud.getPermission('copyBtn', row, $index)"
1311
- }],
1312
- attrs: {
1313
- type: e.menuText("primary"),
1314
- icon: e.crud.getBtnIcon("copyBtn"),
1315
- size: e.crud.isMediumSize,
1316
- disabled: e.btnDisabled
1317
- },
1318
- on: {
1319
- click: function(s) {
1320
- return s.stopPropagation(), e.crud.rowCopy(r);
1321
- }
1322
- }
1323
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) && !r.$cellEdit ? n("ElButton", {
1324
- directives: [{
1325
- name: "permission",
1326
- rawName: "v-permission",
1327
- value: e.crud.getPermission("delBtn", r, o),
1328
- expression: "crud.getPermission('delBtn', row, $index)"
1329
- }],
1330
- attrs: {
1331
- type: e.menuText("danger"),
1332
- icon: e.crud.getBtnIcon("delBtn"),
1333
- size: e.crud.isMediumSize,
1334
- disabled: e.btnDisabled
1335
- },
1336
- on: {
1337
- click: function(s) {
1338
- return s.stopPropagation(), e.crud.rowDel(r, o);
1339
- }
1340
- }
1341
- }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]], 2) : e._e()] : e._e(), e._t("menu", null, {
1342
- row: r,
1343
- type: e.menuText("primary"),
1344
- disabled: e.crud.btnDisabled,
1345
- size: e.crud.isMediumSize,
1346
- index: o
1347
- })];
1348
- }
1349
- }], null, !0)
1350
- }) : e._e();
1351
- }, Te = [];
1352
- const ze = {
659
+ const me = he.exports, fe = {
1353
660
  name: "ColumnMenu",
1354
661
  directives: {
1355
- permission: w
662
+ permission: x
1356
663
  },
1357
664
  inject: ["crud"],
1358
665
  data() {
1359
666
  return {
1360
- config: h
667
+ config: p
1361
668
  };
1362
669
  },
1363
670
  computed: {
@@ -1375,67 +682,52 @@ const ze = {
1375
682
  }
1376
683
  },
1377
684
  methods: {
1378
- optVal: m,
1379
- menuText(e) {
1380
- return ["text", "menu"].includes(this.menuType) ? "text" : e;
685
+ optVal: h,
686
+ menuText(t) {
687
+ return ["text", "menu"].includes(this.menuType) ? "text" : t;
1381
688
  }
1382
689
  }
1383
- }, k = {};
1384
- var Le = /* @__PURE__ */ f(
1385
- ze,
1386
- Me,
1387
- Te,
690
+ };
691
+ var be = function() {
692
+ var e = this, i = e._self._c;
693
+ return e.optVal(e.crud.tableOption.menu, e.config.menu) && e.crud.getPermission("menu") ? i("ElTableColumn", { key: "menu", staticClass: "avue-crud__btn", attrs: { prop: "menu", fixed: e.optVal(e.crud.tableOption.menuFixed, e.config.menuFixed), label: e.crud.tableOption.menuTitle || "操作", align: e.crud.tableOption.menuAlign || e.config.menuAlign, "header-align": e.crud.tableOption.menuHeaderAlign || e.config.menuHeaderAlign, width: e.crud.isMobile ? e.crud.tableOption.menuXsWidth || e.config.menuXsWidth : e.crud.tableOption.menuWidth || e.config.menuWidth }, scopedSlots: e._u([{ key: "default", fn: function({ row: n, $index: r }) {
694
+ return [e.isMenu ? i("ElDropdown", { attrs: { size: e.crud.isMediumSize }, scopedSlots: e._u([{ key: "dropdown", fn: function() {
695
+ return [i("ElDropdownMenu", [e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("viewBtn", n, r), expression: "crud.getPermission('viewBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("viewBtn") }, nativeOn: { click: function(s) {
696
+ return e.crud.rowView(n, r);
697
+ } } }, [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("editBtn") }, nativeOn: { click: function(s) {
698
+ return e.crud.rowEdit(n, r);
699
+ } } }, [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("copyBtn", n, r), expression: "crud.getPermission('copyBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("copyBtn") }, nativeOn: { click: function(s) {
700
+ return e.crud.rowCopy(n);
701
+ } } }, [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) ? i("ElDropdownItem", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("delBtn", n, r), expression: "crud.getPermission('delBtn', row, $index)" }], attrs: { icon: e.crud.getBtnIcon("delBtn") }, nativeOn: { click: function(s) {
702
+ return e.crud.rowDel(n, r);
703
+ } } }, [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]) : e._e(), e._t("menuBtn", null, { row: n, type: e.menuText("primary"), disabled: e.crud.btnDisabled, size: e.crud.isMediumSize, index: r })], 2)];
704
+ }, proxy: !0 }], null, !0) }, [i("ElButton", { attrs: { type: "text", size: e.crud.isMediumSize } }, [e._v(" " + e._s(e.crud.tableOption.menuBtnTitle || "按钮") + " "), i("i", { staticClass: "el-icon-arrow-down el-icon--right" })])], 1) : ["button", "text", "icon"].includes(e.menuType) ? [e.optVal(e.crud.tableOption.cellBtn, e.config.cellBtn) ? [e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !n.$cellEdit ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("editBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
705
+ return s.stopPropagation(), e.crud.rowCell(n, r);
706
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e.optVal(e.crud.tableOption.saveBtn, e.config.saveBtn) && n.$cellEdit ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("saveBtn", n, r), expression: "crud.getPermission('saveBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("saveBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
707
+ return s.stopPropagation(), e.crud.rowCell(n, r);
708
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("saveBtn")) + " ")]], 2) : e._e(), n.$cellEdit ? i("ElButton", { attrs: { type: e.menuText("danger"), icon: e.crud.getBtnIcon("cancelBtn"), size: e.crud.isMediumSize, disabled: e.crud.btnDisabledList[r] }, on: { click: function(s) {
709
+ return s.stopPropagation(), e.crud.rowCancel(n, r);
710
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("cancelBtn")) + " ")]], 2) : e._e()] : e._e(), e.optVal(e.crud.tableOption.viewBtn, e.config.viewBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("viewBtn", n, r), expression: "crud.getPermission('viewBtn', row, $index)" }], attrs: { type: e.menuText("success"), icon: e.crud.getBtnIcon("viewBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
711
+ return s.stopPropagation(), e.crud.rowView(n, r);
712
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("viewBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.editBtn, e.config.editBtn) && !e.crud.tableOption.cellBtn ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("editBtn", n, r), expression: "crud.getPermission('editBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("editBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
713
+ return s.stopPropagation(), e.crud.rowEdit(n, r);
714
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("editBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.copyBtn, e.config.copyBtn) ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("copyBtn", n, r), expression: "crud.getPermission('copyBtn', row, $index)" }], attrs: { type: e.menuText("primary"), icon: e.crud.getBtnIcon("copyBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
715
+ return s.stopPropagation(), e.crud.rowCopy(n);
716
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("copyBtn")) + " ")]], 2) : e._e(), e.optVal(e.crud.tableOption.delBtn, e.config.delBtn) && !n.$cellEdit ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.crud.getPermission("delBtn", n, r), expression: "crud.getPermission('delBtn', row, $index)" }], attrs: { type: e.menuText("danger"), icon: e.crud.getBtnIcon("delBtn"), size: e.crud.isMediumSize, disabled: e.btnDisabled }, on: { click: function(s) {
717
+ return s.stopPropagation(), e.crud.rowDel(n, r);
718
+ } } }, [e.isIconMenu ? e._e() : [e._v(" " + e._s(e.crud.menuIcon("delBtn")) + " ")]], 2) : e._e()] : e._e(), e._t("menu", null, { row: n, type: e.menuText("primary"), disabled: e.crud.btnDisabled, size: e.crud.isMediumSize, index: r })];
719
+ } }], null, !0) }) : e._e();
720
+ }, ge = [], _e = /* @__PURE__ */ f(
721
+ fe,
722
+ be,
723
+ ge,
1388
724
  !1,
1389
- Ve,
725
+ null,
1390
726
  null,
1391
727
  null,
1392
728
  null
1393
729
  );
1394
- function Ve(e) {
1395
- for (let t in k)
1396
- this[t] = k[t];
1397
- }
1398
- const je = /* @__PURE__ */ function() {
1399
- return Le.exports;
1400
- }();
1401
- var Re = function() {
1402
- var e = this, t = e.$createElement, n = e._self._c || t;
1403
- return e.pageFlag && e.optVal(e.crud.tableOption.page, !0) ? n("ElCard", {
1404
- staticClass: "avue-pagination",
1405
- attrs: {
1406
- shadow: e.crud.isCard
1407
- }
1408
- }, [e._t("page"), n("ElPagination", {
1409
- staticStyle: {
1410
- "margin-top": "25px"
1411
- },
1412
- attrs: {
1413
- small: e.crud.size === "mini",
1414
- disabled: e.defaultPage.disabled,
1415
- "hide-on-single-page": e.defaultPage.single,
1416
- "pager-count": e.defaultPage.pagerCount,
1417
- "current-page": e.defaultPage.currentPage,
1418
- background: e.defaultPage.background,
1419
- "page-size": e.defaultPage.pageSize,
1420
- "page-sizes": e.defaultPage.pageSizes,
1421
- layout: e.defaultPage.layout,
1422
- total: e.defaultPage.total
1423
- },
1424
- on: {
1425
- "update:currentPage": function(i) {
1426
- return e.$set(e.defaultPage, "currentPage", i);
1427
- },
1428
- "update:current-page": function(i) {
1429
- return e.$set(e.defaultPage, "currentPage", i);
1430
- },
1431
- "size-change": e.sizeChange,
1432
- "prev-click": e.prevClick,
1433
- "next-click": e.nextClick,
1434
- "current-change": e.currentChange
1435
- }
1436
- })], 2) : e._e();
1437
- }, Ae = [];
1438
- const He = {
730
+ const ve = _e.exports, ye = {
1439
731
  name: "TablePage",
1440
732
  inject: ["crud"],
1441
733
  data() {
@@ -1481,7 +773,7 @@ const He = {
1481
773
  this.crud.isMobile && (this.defaultPage.layout = "total, sizes, prev, pager, next"), this.pageInit(), this.crud.$emit("on-load", this.defaultPage);
1482
774
  },
1483
775
  methods: {
1484
- optVal: m,
776
+ optVal: h,
1485
777
  pageInit() {
1486
778
  this.defaultPage = Object.assign(this.defaultPage, this.crud.page), this.updateValue();
1487
779
  },
@@ -1489,130 +781,42 @@ const He = {
1489
781
  this.crud.$emit("update:page", this.defaultPage);
1490
782
  },
1491
783
  // 下一页事件
1492
- nextClick(e) {
1493
- this.crud.$emit("next-click", e);
784
+ nextClick(t) {
785
+ this.crud.$emit("next-click", t);
1494
786
  },
1495
787
  // 上一页事件
1496
- prevClick(e) {
1497
- this.crud.$emit("prev-click", e);
788
+ prevClick(t) {
789
+ this.crud.$emit("prev-click", t);
1498
790
  },
1499
791
  // 页大小回调
1500
- sizeChange(e) {
1501
- this.defaultPage.currentPage = 1, this.defaultPage.pageSize = e, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", e);
792
+ sizeChange(t) {
793
+ this.defaultPage.currentPage = 1, this.defaultPage.pageSize = t, this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("size-change", t);
1502
794
  },
1503
795
  // 页码回调
1504
- currentChange(e) {
1505
- this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", e);
796
+ currentChange(t) {
797
+ this.updateValue(), this.crud.$emit("on-load", this.defaultPage), this.crud.$emit("current-change", t);
1506
798
  }
1507
799
  }
1508
- }, E = {};
1509
- var Ne = /* @__PURE__ */ f(
1510
- He,
1511
- Re,
1512
- Ae,
800
+ };
801
+ var Ce = function() {
802
+ var e = this, i = e._self._c;
803
+ return e.pageFlag && e.optVal(e.crud.tableOption.page, !0) ? i("ElCard", { staticClass: "avue-pagination", attrs: { shadow: e.crud.isCard } }, [e._t("page"), i("ElPagination", { staticStyle: { "margin-top": "25px" }, attrs: { small: e.crud.size === "mini", disabled: e.defaultPage.disabled, "hide-on-single-page": e.defaultPage.single, "pager-count": e.defaultPage.pagerCount, "current-page": e.defaultPage.currentPage, background: e.defaultPage.background, "page-size": e.defaultPage.pageSize, "page-sizes": e.defaultPage.pageSizes, layout: e.defaultPage.layout, total: e.defaultPage.total }, on: { "update:currentPage": function(n) {
804
+ return e.$set(e.defaultPage, "currentPage", n);
805
+ }, "update:current-page": function(n) {
806
+ return e.$set(e.defaultPage, "currentPage", n);
807
+ }, "size-change": e.sizeChange, "prev-click": e.prevClick, "next-click": e.nextClick, "current-change": e.currentChange } })], 2) : e._e();
808
+ }, xe = [], Be = /* @__PURE__ */ f(
809
+ ye,
810
+ Ce,
811
+ xe,
1513
812
  !1,
1514
- We,
813
+ null,
1515
814
  null,
1516
815
  null,
1517
816
  null
1518
817
  );
1519
- function We(e) {
1520
- for (let t in E)
1521
- this[t] = E[t];
1522
- }
1523
- const Ke = /* @__PURE__ */ function() {
1524
- return Ne.exports;
1525
- }();
1526
- var Ue = function() {
1527
- var e = this, t = e.$createElement, n = e._self._c || t;
1528
- return e.boxVisible ? n(e.dialogType, e._b({
1529
- tag: "Component",
1530
- staticClass: "dialog-form",
1531
- attrs: {
1532
- "lock-scroll": "",
1533
- "show-full-screen": "",
1534
- "destroy-on-close": e.crud.tableOption.dialogDestroy,
1535
- "wrapper-closable": e.crud.tableOption.dialogClickModal,
1536
- direction: e.direction,
1537
- "custom-class": e.crud.tableOption.dialogCustomClass,
1538
- "modal-append-to-body": "",
1539
- "append-to-body": "",
1540
- top: e.dialogTop,
1541
- title: e.dialogTitle,
1542
- "close-on-press-escape": e.crud.tableOption.dialogEscape,
1543
- "close-on-click-modal": e.optVal(e.crud.tableOption.dialogClickModal, !1),
1544
- modal: e.crud.tableOption.dialogModal,
1545
- "show-close": e.crud.tableOption.dialogCloseBtn,
1546
- visible: e.boxVisible,
1547
- "before-close": e.hide
1548
- },
1549
- on: {
1550
- "update:visible": function(i) {
1551
- e.boxVisible = i;
1552
- }
1553
- }
1554
- }, "Component", e.params, !1), [n("FyForm", e._b({
1555
- ref: "tableForm",
1556
- attrs: {
1557
- status: e.disabled,
1558
- option: e.option
1559
- },
1560
- on: {
1561
- "update:status": function(i) {
1562
- e.disabled = i;
1563
- },
1564
- change: e.handleChange,
1565
- submit: e.handleSubmit,
1566
- "reset-change": e.hide,
1567
- "tab-click": e.handleTabClick,
1568
- error: e.handleError
1569
- },
1570
- scopedSlots: e._u([e._l(e.crud.formSlot, function(i) {
1571
- return {
1572
- key: e.getSlotName(i),
1573
- fn: function(r) {
1574
- return [e._t(i, null, null, Object.assign(r, {
1575
- type: e.boxType
1576
- }))];
1577
- }
1578
- };
1579
- })], null, !0),
1580
- model: {
1581
- value: e.crud.tableForm,
1582
- callback: function(i) {
1583
- e.$set(e.crud, "tableForm", i);
1584
- },
1585
- expression: "crud.tableForm"
1586
- }
1587
- }, "FyForm", e.uploadFun({}, e.crud), !1)), n("span", {
1588
- staticClass: "avue-dialog__footer",
1589
- class: `avue-dialog__footer--${e.dialogMenuPosition}`
1590
- }, [e.optVal(e.option.submitBtn, !0) && !e.isView ? n("ElButton", {
1591
- attrs: {
1592
- loading: e.disabled,
1593
- size: e.crud.controlSize,
1594
- icon: e.option.submitIcon,
1595
- type: "primary"
1596
- },
1597
- on: {
1598
- click: e.submit
1599
- }
1600
- }, [e._v(" " + e._s(e.option.submitText) + " ")]) : e._e(), e.optVal(e.option.emptyBtn, !0) && !e.isView ? n("ElButton", {
1601
- attrs: {
1602
- disabled: e.disabled,
1603
- size: e.crud.controlSize,
1604
- icon: e.option.emptyIcon
1605
- },
1606
- on: {
1607
- click: e.reset
1608
- }
1609
- }, [e._v(" " + e._s(e.option.emptyText) + " ")]) : e._e(), e._t("menuForm", null, {
1610
- disabled: e.disabled,
1611
- size: e.crud.controlSize,
1612
- type: e.boxType
1613
- })], 2)], 1) : e._e();
1614
- }, Ge = [];
1615
- const qe = {
818
+ const we = Be.exports;
819
+ const Se = {
1616
820
  name: "FyDialogForm",
1617
821
  inject: ["crud"],
1618
822
  data() {
@@ -1626,10 +830,10 @@ const qe = {
1626
830
  },
1627
831
  computed: {
1628
832
  option() {
1629
- const e = a(this.crud.tableOption);
1630
- return e.boxType = this.boxType, e.column = a(this.crud.propOption), e.menuBtn = !1, this.isAdd ? (e.submitBtn = e.saveBtn, e.submitText = this.crud.menuIcon("saveBtn"), e.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (e.submitBtn = e.updateBtn, e.submitText = this.crud.menuIcon("updateBtn"), e.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (e.detail = !0), e.emptyBtn = e.cancelBtn, e.emptyText = this.crud.menuIcon("cancelBtn"), e.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (e.dicFlag = !1, e.dicData = this.crud.DIC), c(e.dicFlag) || e.column.forEach((t) => {
1631
- t.boxType = this.boxType, t.dicFlag = t.dicFlag || e.dicFlag;
1632
- }), e;
833
+ const t = a(this.crud.tableOption);
834
+ return t.boxType = this.boxType, t.column = a(this.crud.propOption), t.menuBtn = !1, this.isAdd ? (t.submitBtn = t.saveBtn, t.submitText = this.crud.menuIcon("saveBtn"), t.submitIcon = this.crud.getBtnIcon("saveBtn")) : this.isEdit ? (t.submitBtn = t.updateBtn, t.submitText = this.crud.menuIcon("updateBtn"), t.submitIcon = this.crud.getBtnIcon("updateBtn")) : this.isView && (t.detail = !0), t.emptyBtn = t.cancelBtn, t.emptyText = this.crud.menuIcon("cancelBtn"), t.emptyIcon = this.crud.getBtnIcon("cancelBtn"), this.crud.isGroup || (t.dicFlag = !1, t.dicData = this.crud.DIC), c(t.dicFlag) || t.column.forEach((e) => {
835
+ e.boxType = this.boxType, e.dicFlag = e.dicFlag || t.dicFlag;
836
+ }), t;
1633
837
  },
1634
838
  isView() {
1635
839
  return this.boxType === "view";
@@ -1644,7 +848,7 @@ const qe = {
1644
848
  return this.crud.tableOption.dialogDirection;
1645
849
  },
1646
850
  width() {
1647
- return m(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${h.dialogWidth}`);
851
+ return h(`${this.crud.tableOption.dialogWidth}`, this.crud.isMobile ? "100%" : `${p.dialogWidth}`);
1648
852
  },
1649
853
  dialogType() {
1650
854
  return this.isDrawer ? "ElDrawer" : "ElementDialog";
@@ -1665,9 +869,9 @@ const qe = {
1665
869
  };
1666
870
  },
1667
871
  dialogTitle() {
1668
- const e = `${this.boxType}`;
872
+ const t = `${this.boxType}`;
1669
873
  if (!c(this.boxType)) {
1670
- const t = {
874
+ const e = {
1671
875
  tipStartTitle: "当前表格已选择",
1672
876
  tipEndTitle: "项",
1673
877
  editTitle: "编 辑",
@@ -1677,7 +881,7 @@ const qe = {
1677
881
  filterTitle: "过滤条件",
1678
882
  showTitle: "列显隐"
1679
883
  };
1680
- return this.crud.tableOption[`${e}Title`] || t[`${e}Title`];
884
+ return this.crud.tableOption[`${t}Title`] || e[`${t}Title`];
1681
885
  }
1682
886
  return "";
1683
887
  },
@@ -1686,167 +890,108 @@ const qe = {
1686
890
  }
1687
891
  },
1688
892
  methods: {
1689
- optVal: m,
1690
- uploadFun: z,
893
+ optVal: h,
894
+ uploadFun: B,
1691
895
  submit() {
1692
896
  this.$refs.tableForm.submit();
1693
897
  },
1694
898
  reset() {
1695
899
  this.$refs.tableForm.resetForm(!1);
1696
900
  },
1697
- getSlotName(e) {
1698
- return e.replace("Form", "");
901
+ getSlotName(t) {
902
+ return t.replace("Form", "");
1699
903
  },
1700
904
  initFun() {
1701
- ["clearValidate", "validate", "resetForm", "validateField"].forEach((e) => {
1702
- this.crud[e] = this.$refs.tableForm[e];
905
+ ["clearValidate", "validate", "resetForm", "validateField"].forEach((t) => {
906
+ this.crud[t] = this.$refs.tableForm[t];
1703
907
  });
1704
908
  },
1705
909
  handleChange() {
1706
910
  this.crud.setVal();
1707
911
  },
1708
- handleTabClick(e, t) {
1709
- this.crud.$emit("tab-click", e, t);
912
+ handleTabClick(t, e) {
913
+ this.crud.$emit("tab-click", t, e);
1710
914
  },
1711
915
  handleFullScreen() {
1712
916
  this.isDrawer && (c(this.size) ? this.size = "100%" : this.size = ""), this.fullscreen = !this.fullscreen;
1713
917
  },
1714
- handleError(e) {
1715
- this.crud.$emit("error", e);
918
+ handleError(t) {
919
+ this.crud.$emit("error", t);
1716
920
  },
1717
- handleSubmit(e, t) {
1718
- this.isAdd ? this.rowSave(t) : this.isEdit && this.rowUpdate(t);
921
+ handleSubmit(t, e) {
922
+ this.isAdd ? this.rowSave(e) : this.isEdit && this.rowUpdate(e);
1719
923
  },
1720
924
  // 保存
1721
- rowSave(e) {
1722
- this.crud.$emit("row-save", x(this.crud.tableForm, ["$"]), this.closeDialog, e);
925
+ rowSave(t) {
926
+ this.crud.$emit("row-save", C(this.crud.tableForm, ["$"]), this.closeDialog, t);
1723
927
  },
1724
928
  // 更新
1725
- rowUpdate(e) {
929
+ rowUpdate(t) {
1726
930
  this.crud.$emit(
1727
931
  "row-update",
1728
- x(this.crud.tableForm, ["$"]),
932
+ C(this.crud.tableForm, ["$"]),
1729
933
  this.crud.tableIndex,
1730
934
  this.closeDialog,
1731
- e
935
+ t
1732
936
  );
1733
937
  },
1734
- closeDialog(e) {
1735
- e = a(e), e && (() => {
938
+ closeDialog(t) {
939
+ t = a(t), t && (() => {
1736
940
  if (this.isEdit) {
1737
- const { parentList: n, index: i } = this.crud.findData(e[this.crud.rowKey]);
1738
- if (n) {
1739
- const r = n.splice(i, 1)[0];
1740
- e[this.crud.childrenKey] = r[this.crud.childrenKey], n.splice(i, 0, e);
941
+ const { parentList: i, index: n } = this.crud.findData(t[this.crud.rowKey]);
942
+ if (i) {
943
+ const r = i.splice(n, 1)[0];
944
+ t[this.crud.childrenKey] = r[this.crud.childrenKey], i.splice(n, 0, t);
1741
945
  }
1742
946
  } else if (this.isAdd) {
1743
- const { item: n } = this.crud.findData(e[this.crud.rowParentKey]);
1744
- n ? (n[this.crud.childrenKey] || this.$set(n, this.crud.childrenKey, []), this.crud.tableOption.lazy && this.$set(n, this.crud.hasChildrenKey, !0), n[this.crud.childrenKey].push(e)) : this.crud.list.push(e);
947
+ const { item: i } = this.crud.findData(t[this.crud.rowParentKey]);
948
+ i ? (i[this.crud.childrenKey] || this.$set(i, this.crud.childrenKey, []), this.crud.tableOption.lazy && this.$set(i, this.crud.hasChildrenKey, !0), i[this.crud.childrenKey].push(t)) : this.crud.list.push(t);
1745
949
  }
1746
950
  })(), this.hide();
1747
951
  },
1748
952
  // 隐藏表单
1749
- hide(e) {
1750
- const t = () => {
1751
- e && e(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
953
+ hide(t) {
954
+ const e = () => {
955
+ t && t(), this.crud.tableIndex = -1, this.crud.tableForm = {}, this.crud.setVal(), this.boxVisible = !1;
1752
956
  };
1753
- typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(t, this.boxType) : t();
957
+ typeof this.crud.beforeClose == "function" ? this.crud.beforeClose(e, this.boxType) : e();
1754
958
  },
1755
959
  // 显示表单
1756
- show(e) {
1757
- this.boxType = e;
1758
- const t = () => {
960
+ show(t) {
961
+ this.boxType = t;
962
+ const e = () => {
1759
963
  this.fullscreen = this.crud.tableOption.dialogFullscreen, this.boxVisible = !0, this.$nextTick(() => {
1760
964
  this.initFun();
1761
965
  });
1762
966
  };
1763
- typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(t, this.boxType) : t();
967
+ typeof this.crud.beforeOpen == "function" ? this.crud.beforeOpen(e, this.boxType) : e();
1764
968
  }
1765
969
  }
1766
- }, I = {};
1767
- var Xe = /* @__PURE__ */ f(
1768
- qe,
1769
- Ue,
1770
- Ge,
970
+ };
971
+ var $e = function() {
972
+ var e = this, i = e._self._c;
973
+ return e.boxVisible ? i(e.dialogType, e._b({ tag: "Component", staticClass: "dialog-form", attrs: { "lock-scroll": "", "show-full-screen": "", "destroy-on-close": e.crud.tableOption.dialogDestroy, "wrapper-closable": e.crud.tableOption.dialogClickModal, direction: e.direction, "custom-class": e.crud.tableOption.dialogCustomClass, "modal-append-to-body": "", "append-to-body": "", top: e.dialogTop, title: e.dialogTitle, "close-on-press-escape": e.crud.tableOption.dialogEscape, "close-on-click-modal": e.optVal(e.crud.tableOption.dialogClickModal, !1), modal: e.crud.tableOption.dialogModal, "show-close": e.crud.tableOption.dialogCloseBtn, visible: e.boxVisible, "before-close": e.hide }, on: { "update:visible": function(n) {
974
+ e.boxVisible = n;
975
+ } } }, "Component", e.params, !1), [i("FyForm", e._b({ ref: "tableForm", attrs: { status: e.disabled, option: e.option }, on: { "update:status": function(n) {
976
+ e.disabled = n;
977
+ }, change: e.handleChange, submit: e.handleSubmit, "reset-change": e.hide, "tab-click": e.handleTabClick, error: e.handleError }, scopedSlots: e._u([e._l(e.crud.formSlot, function(n) {
978
+ return { key: e.getSlotName(n), fn: function(r) {
979
+ return [e._t(n, null, null, Object.assign(r, { type: e.boxType }))];
980
+ } };
981
+ })], null, !0), model: { value: e.crud.tableForm, callback: function(n) {
982
+ e.$set(e.crud, "tableForm", n);
983
+ }, expression: "crud.tableForm" } }, "FyForm", e.uploadFun({}, e.crud), !1)), i("span", { staticClass: "avue-dialog__footer", class: `avue-dialog__footer--${e.dialogMenuPosition}` }, [e.optVal(e.option.submitBtn, !0) && !e.isView ? i("ElButton", { attrs: { loading: e.disabled, size: e.crud.controlSize, icon: e.option.submitIcon, type: "primary" }, on: { click: e.submit } }, [e._v(" " + e._s(e.option.submitText) + " ")]) : e._e(), e.optVal(e.option.emptyBtn, !0) && !e.isView ? i("ElButton", { attrs: { disabled: e.disabled, size: e.crud.controlSize, icon: e.option.emptyIcon }, on: { click: e.reset } }, [e._v(" " + e._s(e.option.emptyText) + " ")]) : e._e(), e._t("menuForm", null, { disabled: e.disabled, size: e.crud.controlSize, type: e.boxType })], 2)], 1) : e._e();
984
+ }, Oe = [], Fe = /* @__PURE__ */ f(
985
+ Se,
986
+ $e,
987
+ Oe,
1771
988
  !1,
1772
- Je,
989
+ null,
1773
990
  null,
1774
991
  null,
1775
992
  null
1776
993
  );
1777
- function Je(e) {
1778
- for (let t in I)
1779
- this[t] = I[t];
1780
- }
1781
- const Qe = /* @__PURE__ */ function() {
1782
- return Xe.exports;
1783
- }();
1784
- var Ye = function() {
1785
- var e = this, t = e.$createElement, n = e._self._c || t;
1786
- return e.columnBox ? n("div", [n("ElDrawer", {
1787
- staticClass: "avue-crud__dialog avue-crud__column avue-dialog",
1788
- attrs: {
1789
- "lock-scroll": "",
1790
- "append-to-body": "",
1791
- title: "列显隐",
1792
- size: e.crud.isMobile ? "100%" : "40%",
1793
- visible: e.columnBox
1794
- },
1795
- on: {
1796
- "update:visible": function(i) {
1797
- e.columnBox = i;
1798
- }
1799
- }
1800
- }, [n("ElTable", {
1801
- ref: "table",
1802
- attrs: {
1803
- data: e.data,
1804
- height: "100%",
1805
- size: "small",
1806
- border: ""
1807
- }
1808
- }, [n("ElTableColumn", {
1809
- key: "label",
1810
- attrs: {
1811
- align: "center",
1812
- width: "100",
1813
- "header-align": "center",
1814
- prop: "label",
1815
- label: "列名"
1816
- }
1817
- }), e._l(e.defaultColumn, function(i, r) {
1818
- return [i.hide !== !0 ? n("ElTableColumn", {
1819
- key: r,
1820
- attrs: {
1821
- label: i.label,
1822
- prop: i.prop,
1823
- align: "center",
1824
- "header-align": "center"
1825
- },
1826
- scopedSlots: e._u([{
1827
- key: "default",
1828
- fn: function(o) {
1829
- var s = o.row;
1830
- return [n("ElCheckbox", {
1831
- on: {
1832
- change: function(l) {
1833
- return e.handleChange(i.prop);
1834
- }
1835
- },
1836
- model: {
1837
- value: e.crud.objectOption[s.prop][i.prop],
1838
- callback: function(l) {
1839
- e.$set(e.crud.objectOption[s.prop], i.prop, l);
1840
- },
1841
- expression: "crud.objectOption[row.prop][item.prop]"
1842
- }
1843
- })];
1844
- }
1845
- }], null, !0)
1846
- }) : e._e()];
1847
- })], 2)], 1)], 1) : e._e();
1848
- }, Ze = [];
1849
- const et = {
994
+ const ke = Fe.exports, Ie = {
1850
995
  name: "DialogColumn",
1851
996
  inject: ["crud"],
1852
997
  data() {
@@ -1889,94 +1034,46 @@ const et = {
1889
1034
  },
1890
1035
  methods: {
1891
1036
  handleShow() {
1892
- this.data = [], this.crud.propOption.forEach((e) => {
1893
- e.showColumn !== !1 && this.data.push(e);
1037
+ this.data = [], this.crud.propOption.forEach((t) => {
1038
+ t.showColumn !== !1 && this.data.push(t);
1894
1039
  }), this.columnBox = !0, this.$nextTick(() => this.rowDrop());
1895
1040
  },
1896
- handleChange(e) {
1897
- ["hide", "filters"].includes(e) && this.crud.refreshTable();
1041
+ handleChange(t) {
1042
+ ["hide", "filters"].includes(t) && this.crud.refreshTable();
1898
1043
  },
1899
1044
  rowDrop() {
1900
- const e = this.$refs.table.$el.querySelectorAll(h.dropRowClass)[0];
1901
- this.crud.tableDrop("column", e, (t) => {
1902
- const n = t.oldIndex, i = t.newIndex;
1903
- this.crud.headerSort(n, i), this.crud.refreshTable(() => this.rowDrop());
1045
+ const t = this.$refs.table.$el.querySelectorAll(p.dropRowClass)[0];
1046
+ this.crud.tableDrop("column", t, (e) => {
1047
+ const i = e.oldIndex, n = e.newIndex;
1048
+ this.crud.headerSort(i, n), this.crud.refreshTable(() => this.rowDrop());
1904
1049
  });
1905
1050
  }
1906
1051
  }
1907
- }, P = {};
1908
- var tt = /* @__PURE__ */ f(
1909
- et,
1910
- Ye,
1911
- Ze,
1052
+ };
1053
+ var Ee = function() {
1054
+ var e = this, i = e._self._c;
1055
+ return e.columnBox ? i("div", [i("ElDrawer", { staticClass: "avue-crud__dialog avue-crud__column avue-dialog", attrs: { "lock-scroll": "", "append-to-body": "", title: "列显隐", size: e.crud.isMobile ? "100%" : "40%", visible: e.columnBox }, on: { "update:visible": function(n) {
1056
+ e.columnBox = n;
1057
+ } } }, [i("ElTable", { ref: "table", attrs: { data: e.data, height: "100%", size: "small", border: "" } }, [i("ElTableColumn", { key: "label", attrs: { align: "center", width: "100", "header-align": "center", prop: "label", label: "列名" } }), e._l(e.defaultColumn, function(n, r) {
1058
+ return [n.hide !== !0 ? i("ElTableColumn", { key: r, attrs: { label: n.label, prop: n.prop, align: "center", "header-align": "center" }, scopedSlots: e._u([{ key: "default", fn: function({ row: s }) {
1059
+ return [i("ElCheckbox", { on: { change: function(l) {
1060
+ return e.handleChange(n.prop);
1061
+ } }, model: { value: e.crud.objectOption[s.prop][n.prop], callback: function(l) {
1062
+ e.$set(e.crud.objectOption[s.prop], n.prop, l);
1063
+ }, expression: "crud.objectOption[row.prop][item.prop]" } })];
1064
+ } }], null, !0) }) : e._e()];
1065
+ })], 2)], 1)], 1) : e._e();
1066
+ }, Pe = [], De = /* @__PURE__ */ f(
1067
+ Ie,
1068
+ Ee,
1069
+ Pe,
1912
1070
  !1,
1913
- nt,
1071
+ null,
1914
1072
  null,
1915
1073
  null,
1916
1074
  null
1917
1075
  );
1918
- function nt(e) {
1919
- for (let t in P)
1920
- this[t] = P[t];
1921
- }
1922
- const it = /* @__PURE__ */ function() {
1923
- return tt.exports;
1924
- }();
1925
- var rt = function() {
1926
- var e = this, t = e.$createElement, n = e._self._c || t;
1927
- return e.box ? n("div", [n("ElementDialog", {
1928
- staticClass: "avue-dialog",
1929
- attrs: {
1930
- title: "导出",
1931
- "lock-scroll": "",
1932
- visible: e.box,
1933
- width: e.crud.isMobile ? "100%" : "30%"
1934
- },
1935
- on: {
1936
- "update:visible": function(i) {
1937
- e.box = i;
1938
- }
1939
- },
1940
- scopedSlots: e._u([{
1941
- key: "footer",
1942
- fn: function() {
1943
- return [n("span", {
1944
- staticClass: "dialog-footer"
1945
- }, [n("ElButton", {
1946
- attrs: {
1947
- type: "primary",
1948
- size: e.crud.isMediumSize
1949
- },
1950
- on: {
1951
- click: e.handleSubmit
1952
- }
1953
- }, [e._v("确定")]), n("ElButton", {
1954
- attrs: {
1955
- size: e.crud.isMediumSize
1956
- },
1957
- on: {
1958
- click: function(i) {
1959
- e.box = !1;
1960
- }
1961
- }
1962
- }, [e._v("取消")])], 1)];
1963
- },
1964
- proxy: !0
1965
- }], null, !1, 2375905330)
1966
- }, [n("FyForm", {
1967
- attrs: {
1968
- option: e.option
1969
- },
1970
- model: {
1971
- value: e.form,
1972
- callback: function(i) {
1973
- e.form = i;
1974
- },
1975
- expression: "form"
1976
- }
1977
- })], 1)], 1) : e._e();
1978
- }, st = [];
1979
- const ot = {
1076
+ const Te = De.exports, ze = {
1980
1077
  name: "DialogExcel",
1981
1078
  inject: ["crud"],
1982
1079
  data() {
@@ -2002,14 +1099,14 @@ const ot = {
2002
1099
  },
2003
1100
  // 计算统计
2004
1101
  handleSum() {
2005
- const e = this.crud.tableOption, t = this.crud.propOption, n = this.form.type ? this.crud.list : this.crud.tableSelect, i = [];
2006
- return this.form.params.includes("data") && n.forEach((r) => {
2007
- const o = a(r);
2008
- t.forEach((s) => {
2009
- const l = s.parentProp ? (this.crud.cascaderDIC[s.$index] || {})[s.prop] : this.crud.DIC[s.prop];
2010
- o[s.prop] = L(o, s, e, l);
2011
- }), i.push(o);
2012
- }), this.form.params.includes("sum") && e.showSummary && i.push(this.crud.sumsList), i;
1102
+ const t = this.crud.tableOption, e = this.crud.propOption, i = this.form.type ? this.crud.list : this.crud.tableSelect, n = [];
1103
+ return this.form.params.includes("data") && i.forEach((r) => {
1104
+ const s = a(r);
1105
+ e.forEach((l) => {
1106
+ const o = l.parentProp ? (this.crud.cascaderDIC[l.$index] || {})[l.prop] : this.crud.DIC[l.prop];
1107
+ s[l.prop] = w(s, l, t, o);
1108
+ }), n.push(s);
1109
+ }), this.form.params.includes("sum") && t.showSummary && n.push(this.crud.sumsList), n;
2013
1110
  },
2014
1111
  getOption() {
2015
1112
  this.option = {
@@ -2057,8 +1154,8 @@ const ot = {
2057
1154
  span: 24,
2058
1155
  value: ["header", "data"].concat(
2059
1156
  (() => {
2060
- const e = [];
2061
- return this.crud.isHeader && e.push("headers"), this.crud.isShowSummary && e.push("sum"), e;
1157
+ const t = [];
1158
+ return this.crud.isHeader && t.push("headers"), this.crud.isShowSummary && t.push("sum"), t;
2062
1159
  })()
2063
1160
  ),
2064
1161
  dicData: [
@@ -2073,16 +1170,16 @@ const ot = {
2073
1170
  }
2074
1171
  ].concat(
2075
1172
  (() => {
2076
- const e = [];
2077
- return e.push({
1173
+ const t = [];
1174
+ return t.push({
2078
1175
  label: "复杂表头",
2079
1176
  value: "headers",
2080
1177
  disabled: !this.crud.isHeader
2081
- }), e.push({
1178
+ }), t.push({
2082
1179
  label: "合计统计",
2083
1180
  value: "sum",
2084
1181
  disabled: !this.crud.isShowSummary
2085
- }), e;
1182
+ }), t;
2086
1183
  })()
2087
1184
  )
2088
1185
  }
@@ -2090,193 +1187,58 @@ const ot = {
2090
1187
  }, this.form.type = this.crud.selectLen === 0;
2091
1188
  },
2092
1189
  getColumnOption() {
2093
- const e = a(this.crud.columnOption), t = [], n = (i = []) => {
2094
- i.forEach((r, o) => {
2095
- const s = r.children;
2096
- s && !Array.isArray(s) ? delete r.children : r.showColumn === !1 ? i.splice(o, 1) : (t.push(r.prop), r.children && n(s));
1190
+ const t = a(this.crud.columnOption), e = [], i = (n = []) => {
1191
+ n.forEach((r, s) => {
1192
+ const l = r.children;
1193
+ l && !Array.isArray(l) ? delete r.children : r.showColumn === !1 ? n.splice(s, 1) : (e.push(r.prop), r.children && i(l));
2097
1194
  });
2098
1195
  };
2099
- n(e), this.columnOption = e, this.form.prop = t;
1196
+ i(t), this.columnOption = t, this.form.prop = e;
2100
1197
  },
2101
1198
  getColumn() {
2102
- const e = a(this.columnOption), t = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
1199
+ const t = a(this.columnOption), e = this.$refs.form.getPropRef("prop").$refs.temp.getHalfList();
2103
1200
  if (!this.form.params)
2104
1201
  return [];
2105
1202
  if (this.form.params.includes("headers")) {
2106
- const n = (i = []) => {
2107
- i.forEach((r, o) => {
2108
- t.includes(r.prop) ? r.children && n(r.children) : i.splice(o, 1);
1203
+ const i = (n = []) => {
1204
+ n.forEach((r, s) => {
1205
+ e.includes(r.prop) ? r.children && i(r.children) : n.splice(s, 1);
2109
1206
  });
2110
1207
  };
2111
- return n(e), e;
1208
+ return i(t), t;
2112
1209
  } else {
2113
- const n = [], i = (r = []) => {
2114
- r.forEach((o) => {
2115
- o.children ? i(o.children) : t.includes(o.prop) && n.push(o);
1210
+ const i = [], n = (r = []) => {
1211
+ r.forEach((s) => {
1212
+ s.children ? n(s.children) : e.includes(s.prop) && i.push(s);
2116
1213
  });
2117
1214
  };
2118
- return i(e), n;
1215
+ return n(t), i;
2119
1216
  }
2120
1217
  }
2121
1218
  }
2122
- }, D = {};
2123
- var lt = /* @__PURE__ */ f(
2124
- ot,
2125
- rt,
2126
- st,
1219
+ };
1220
+ var Me = function() {
1221
+ var e = this, i = e._self._c;
1222
+ return e.box ? i("div", [i("ElementDialog", { staticClass: "avue-dialog", attrs: { title: "导出", "lock-scroll": "", visible: e.box, width: e.crud.isMobile ? "100%" : "30%" }, on: { "update:visible": function(n) {
1223
+ e.box = n;
1224
+ } }, scopedSlots: e._u([{ key: "footer", fn: function() {
1225
+ return [i("span", { staticClass: "dialog-footer" }, [i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleSubmit } }, [e._v("确定")]), i("ElButton", { attrs: { size: e.crud.isMediumSize }, on: { click: function(n) {
1226
+ e.box = !1;
1227
+ } } }, [e._v("取消")])], 1)];
1228
+ }, proxy: !0 }], null, !1, 2375905330) }, [i("FyForm", { attrs: { option: e.option }, model: { value: e.form, callback: function(n) {
1229
+ e.form = n;
1230
+ }, expression: "form" } })], 1)], 1) : e._e();
1231
+ }, Le = [], Ve = /* @__PURE__ */ f(
1232
+ ze,
1233
+ Me,
1234
+ Le,
2127
1235
  !1,
2128
- at,
1236
+ null,
2129
1237
  null,
2130
1238
  null,
2131
1239
  null
2132
1240
  );
2133
- function at(e) {
2134
- for (let t in D)
2135
- this[t] = D[t];
2136
- }
2137
- const ct = /* @__PURE__ */ function() {
2138
- return lt.exports;
2139
- }();
2140
- var ut = function() {
2141
- var e = this, t = e.$createElement, n = e._self._c || t;
2142
- return e.box ? n("div", [n("ElDrawer", {
2143
- staticClass: "avue-dialog",
2144
- class: ["avue-crud__dialog", "avue-crud__filter"],
2145
- attrs: {
2146
- "lock-scroll": "",
2147
- "append-to-body": "",
2148
- title: "过滤条件",
2149
- size: e.crud.isMobile ? "100%" : "60%",
2150
- visible: e.box
2151
- },
2152
- on: {
2153
- "update:visible": function(i) {
2154
- e.box = i;
2155
- }
2156
- }
2157
- }, [n("ElRow", {
2158
- attrs: {
2159
- span: 24
2160
- }
2161
- }, [n("div", {
2162
- staticClass: "avue-crud__filter-menu"
2163
- }, [n("ElButtonGroup", [n("ElButton", {
2164
- attrs: {
2165
- type: "primary",
2166
- size: e.crud.isMediumSize
2167
- },
2168
- on: {
2169
- click: e.handleAdd
2170
- }
2171
- }, [e._v(" 新增条件 ")]), n("ElButton", {
2172
- attrs: {
2173
- type: "primary",
2174
- size: e.crud.isMediumSize
2175
- },
2176
- on: {
2177
- click: e.handleClear
2178
- }
2179
- }, [e._v(" 清空条件 ")]), n("ElButton", {
2180
- attrs: {
2181
- type: "primary",
2182
- size: e.crud.isMediumSize
2183
- },
2184
- on: {
2185
- click: e.handleValueClear
2186
- }
2187
- }, [e._v(" 清空数据 ")])], 1)], 1), e._l(e.list, function(i, r) {
2188
- return n("ElCol", {
2189
- key: r,
2190
- staticClass: "avue-crud__filter-item",
2191
- attrs: {
2192
- md: 12,
2193
- xs: 24,
2194
- sm: 12
2195
- }
2196
- }, [n("FySelect", {
2197
- staticClass: "avue-crud__filter-label",
2198
- attrs: {
2199
- dic: e.columnOption,
2200
- clearable: !1,
2201
- size: e.crud.isMediumSize
2202
- },
2203
- on: {
2204
- change: function(o) {
2205
- return e.handleChange(r);
2206
- }
2207
- },
2208
- model: {
2209
- value: i.text,
2210
- callback: function(o) {
2211
- e.$set(i, "text", o);
2212
- },
2213
- expression: "column.text"
2214
- }
2215
- }), n("FySelect", {
2216
- staticClass: "avue-crud__filter-symbol",
2217
- attrs: {
2218
- dic: e.symbolDic,
2219
- clearable: !1,
2220
- size: e.crud.isMediumSize
2221
- },
2222
- model: {
2223
- value: i.symbol,
2224
- callback: function(o) {
2225
- e.$set(i, "symbol", o);
2226
- },
2227
- expression: "column.symbol"
2228
- }
2229
- }), n("FyInput", {
2230
- staticClass: "avue-crud__filter-value",
2231
- attrs: {
2232
- size: e.crud.isMediumSize
2233
- },
2234
- model: {
2235
- value: i.value,
2236
- callback: function(o) {
2237
- e.$set(i, "value", o);
2238
- },
2239
- expression: "column.value"
2240
- }
2241
- }), n("ElButton", {
2242
- staticClass: "avue-crud__filter-icon",
2243
- attrs: {
2244
- type: "danger",
2245
- size: "mini",
2246
- circle: "",
2247
- icon: "el-icon-minus"
2248
- },
2249
- on: {
2250
- click: function(o) {
2251
- return e.handleDelete(r);
2252
- }
2253
- }
2254
- })], 1);
2255
- }), n("ElCol", {
2256
- staticClass: "avue-form__menu avue-form__menu--right",
2257
- attrs: {
2258
- span: 24
2259
- }
2260
- }, [n("ElButton", {
2261
- attrs: {
2262
- type: "primary",
2263
- size: e.crud.isMediumSize
2264
- },
2265
- on: {
2266
- click: e.handleSubmit
2267
- }
2268
- }, [e._v(" 确 定 ")]), n("ElButton", {
2269
- attrs: {
2270
- size: e.crud.isMediumSize
2271
- },
2272
- on: {
2273
- click: function(i) {
2274
- e.box = !1;
2275
- }
2276
- }
2277
- }, [e._v(" 取 消 ")])], 1)], 2)], 1)], 1) : e._e();
2278
- }, dt = [];
2279
- const pt = {
1241
+ const Re = Ve.exports, Ae = {
2280
1242
  name: "DialogFilter",
2281
1243
  inject: ["crud"],
2282
1244
  data() {
@@ -2326,293 +1288,93 @@ const pt = {
2326
1288
  this.getColumnOption(), this.box = !0;
2327
1289
  },
2328
1290
  getColumnOption() {
2329
- const e = [];
2330
- a(this.crud.propOption).forEach((n) => {
2331
- n.showColumn !== !1 && e.push(
2332
- Object.assign(n, {
2333
- value: n.prop
1291
+ const t = [];
1292
+ a(this.crud.propOption).forEach((i) => {
1293
+ i.showColumn !== !1 && t.push(
1294
+ Object.assign(i, {
1295
+ value: i.prop
2334
1296
  })
2335
1297
  );
2336
- }), this.columnOption = e, this.columnObj = this.columnOption[0];
1298
+ }), this.columnOption = t, this.columnObj = this.columnOption[0];
2337
1299
  },
2338
- handleDelete(e) {
2339
- this.list.splice(e, 1);
1300
+ handleDelete(t) {
1301
+ this.list.splice(t, 1);
2340
1302
  },
2341
1303
  handleClear() {
2342
1304
  this.list = [];
2343
1305
  },
2344
1306
  handleValueClear() {
2345
- this.list.forEach((e) => {
2346
- e.value = "";
1307
+ this.list.forEach((t) => {
1308
+ t.value = "";
2347
1309
  });
2348
1310
  },
2349
1311
  handleSubmit() {
2350
- const e = [];
2351
- this.list.forEach((t) => {
2352
- e.push([t.text, t.symbol, t.value]);
2353
- }), this.crud.$emit("filter", e), this.box = !1;
1312
+ const t = [];
1313
+ this.list.forEach((e) => {
1314
+ t.push([e.text, e.symbol, e.value]);
1315
+ }), this.crud.$emit("filter", t), this.box = !1;
2354
1316
  },
2355
- handleChange(e) {
2356
- this.list[e].value = "";
1317
+ handleChange(t) {
1318
+ this.list[t].value = "";
2357
1319
  },
2358
1320
  handleAdd() {
2359
- const e = this.columnObj.prop;
1321
+ const t = this.columnObj.prop;
2360
1322
  this.list.push({
2361
- text: e,
1323
+ text: t,
2362
1324
  value: "",
2363
1325
  symbol: this.symbolDic[0].value
2364
1326
  });
2365
1327
  }
2366
1328
  }
2367
- }, M = {};
2368
- var ht = /* @__PURE__ */ f(
2369
- pt,
2370
- ut,
2371
- dt,
1329
+ };
1330
+ var He = function() {
1331
+ var e = this, i = e._self._c;
1332
+ return e.box ? i("div", [i("ElDrawer", { staticClass: "avue-dialog", class: ["avue-crud__dialog", "avue-crud__filter"], attrs: { "lock-scroll": "", "append-to-body": "", title: "过滤条件", size: e.crud.isMobile ? "100%" : "60%", visible: e.box }, on: { "update:visible": function(n) {
1333
+ e.box = n;
1334
+ } } }, [i("ElRow", { attrs: { span: 24 } }, [i("div", { staticClass: "avue-crud__filter-menu" }, [i("ElButtonGroup", [i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleAdd } }, [e._v(" 新增条件 ")]), i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleClear } }, [e._v(" 清空条件 ")]), i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleValueClear } }, [e._v(" 清空数据 ")])], 1)], 1), e._l(e.list, function(n, r) {
1335
+ return i("ElCol", { key: r, staticClass: "avue-crud__filter-item", attrs: { md: 12, xs: 24, sm: 12 } }, [i("FySelect", { staticClass: "avue-crud__filter-label", attrs: { dic: e.columnOption, clearable: !1, size: e.crud.isMediumSize }, on: { change: function(s) {
1336
+ return e.handleChange(r);
1337
+ } }, model: { value: n.text, callback: function(s) {
1338
+ e.$set(n, "text", s);
1339
+ }, expression: "column.text" } }), i("FySelect", { staticClass: "avue-crud__filter-symbol", attrs: { dic: e.symbolDic, clearable: !1, size: e.crud.isMediumSize }, model: { value: n.symbol, callback: function(s) {
1340
+ e.$set(n, "symbol", s);
1341
+ }, expression: "column.symbol" } }), i("FyInput", { staticClass: "avue-crud__filter-value", attrs: { size: e.crud.isMediumSize }, model: { value: n.value, callback: function(s) {
1342
+ e.$set(n, "value", s);
1343
+ }, expression: "column.value" } }), i("ElButton", { staticClass: "avue-crud__filter-icon", attrs: { type: "danger", size: "mini", circle: "", icon: "el-icon-minus" }, on: { click: function(s) {
1344
+ return e.handleDelete(r);
1345
+ } } })], 1);
1346
+ }), i("ElCol", { staticClass: "avue-form__menu avue-form__menu--right", attrs: { span: 24 } }, [i("ElButton", { attrs: { type: "primary", size: e.crud.isMediumSize }, on: { click: e.handleSubmit } }, [e._v(" 确 定 ")]), i("ElButton", { attrs: { size: e.crud.isMediumSize }, on: { click: function(n) {
1347
+ e.box = !1;
1348
+ } } }, [e._v(" 取 消 ")])], 1)], 2)], 1)], 1) : e._e();
1349
+ }, Ne = [], je = /* @__PURE__ */ f(
1350
+ Ae,
1351
+ He,
1352
+ Ne,
2372
1353
  !1,
2373
- mt,
1354
+ null,
2374
1355
  null,
2375
1356
  null,
2376
1357
  null
2377
1358
  );
2378
- function mt(e) {
2379
- for (let t in M)
2380
- this[t] = M[t];
2381
- }
2382
- const ft = /* @__PURE__ */ function() {
2383
- return ht.exports;
2384
- }();
2385
- var bt = function() {
2386
- var e = this, t = e.$createElement, n = e._self._c || t;
2387
- return n("div", {
2388
- staticClass: "avue-crud avue-crud--card"
2389
- }, [e.tableOption.title ? n(e.tableOption.titleSize || "h2", {
2390
- tag: "Component",
2391
- style: e.tableOption.titleStyle
2392
- }, [e._v(" " + e._s(e.tableOption.title) + " ")]) : e._e(), n("HeaderSearch", {
2393
- ref: "headerSearch",
2394
- scopedSlots: e._u([{
2395
- key: "search",
2396
- fn: function(i) {
2397
- return [e._t("search", null, null, i)];
2398
- }
2399
- }, {
2400
- key: "searchMenu",
2401
- fn: function(i) {
2402
- return [e._t("searchMenu", null, null, i)];
2403
- }
2404
- }, e._l(e.searchSlot, function(i) {
2405
- return {
2406
- key: i,
2407
- fn: function(r) {
2408
- return [e._t(i, null, null, r)];
2409
- }
2410
- };
2411
- })], null, !0)
2412
- }), e.optVal(e.tableOption.header, !0) ? n("HeaderMenu", {
2413
- ref: "headerMenu",
2414
- scopedSlots: e._u([{
2415
- key: "menuLeft",
2416
- fn: function(i) {
2417
- return [e._t("menuLeft", null, null, i)];
2418
- }
2419
- }, {
2420
- key: "menuRight",
2421
- fn: function(i) {
2422
- return [e._t("menuRight", null, null, i)];
2423
- }
2424
- }], null, !0)
2425
- }) : e._e(), e.optVal(e.tableOption.tip, e.config.tip) && e.tableOption.selection ? n("ElTag", {
2426
- staticClass: "avue-crud__tip"
2427
- }, [n("span", {
2428
- staticClass: "avue-crud__tip-name"
2429
- }, [e._v(" 当前表格已选择 "), n("span", {
2430
- staticClass: "avue-crud__tip-count"
2431
- }, [e._v(e._s(e.selectLen))]), e._v(" 项 ")]), e.optVal(e.tableOption.selectClearBtn, e.config.selectClearBtn) && e.tableOption.selection ? n("ElButton", {
2432
- directives: [{
2433
- name: "permission",
2434
- rawName: "v-permission",
2435
- value: e.getPermission("selectClearBtn"),
2436
- expression: "getPermission('selectClearBtn')"
2437
- }],
2438
- attrs: {
2439
- type: "text",
2440
- size: "small"
2441
- },
2442
- on: {
2443
- click: e.selectClear
2444
- }
2445
- }, [e._v(" 清 空 ")]) : e._e(), e._t("tip")], 2) : e._e(), e._t("header"), n("ElForm", {
2446
- ref: "cellForm",
2447
- attrs: {
2448
- model: e.cellForm,
2449
- "show-message": !1
2450
- },
2451
- on: {
2452
- validate: e.handleValidate
2453
- }
2454
- }, [n("ElTable", {
2455
- directives: [{
2456
- name: "loading",
2457
- rawName: "v-loading",
2458
- value: e.tableLoading,
2459
- expression: "tableLoading"
2460
- }],
2461
- key: e.reload,
2462
- ref: "table",
2463
- class: {
2464
- "avue-crud--indeterminate": e.optVal(e.tableOption.indeterminate, !1)
2465
- },
2466
- attrs: {
2467
- data: e.cellForm.list,
2468
- "row-key": e.rowKey,
2469
- size: e.$AVUE.tableSize || e.controlSize,
2470
- lazy: e.optVal(e.tableOption.lazy, !1),
2471
- load: e.treeLoad,
2472
- "tree-props": e.treeProps,
2473
- "expand-row-keys": e.tableOption.expandRowKeys,
2474
- "default-expand-all": e.tableOption.defaultExpandAll,
2475
- "highlight-current-row": e.tableOption.highlightCurrentRow,
2476
- "show-summary": e.tableOption.showSummary,
2477
- "summary-method": e.tableSummaryMethod,
2478
- "span-method": e.tableSpanMethod,
2479
- stripe: e.tableOption.stripe,
2480
- "show-header": e.tableOption.showHeader,
2481
- "default-sort": e.tableOption.defaultSort,
2482
- "row-class-name": e.rowClassName,
2483
- "cell-class-name": e.cellClassName,
2484
- "row-style": e.rowStyle,
2485
- "cell-style": e.cellStyle,
2486
- fit: e.tableOption.fit,
2487
- "header-cell-class-name": e.headerCellClassName,
2488
- "max-height": e.isAutoHeight ? e.tableHeight : e.tableOption.maxHeight,
2489
- height: e.tableHeight,
2490
- width: e.setPx(e.tableOption.width, e.config.width),
2491
- border: e.tableOption.border
2492
- },
2493
- on: {
2494
- "current-change": e.currentRowChange,
2495
- "expand-change": e.expandChange,
2496
- "header-dragend": e.headerDragend,
2497
- "row-click": e.rowClick,
2498
- "row-dblclick": e.rowDblclick,
2499
- "cell-mouse-enter": e.cellMouseEnter,
2500
- "cell-mouse-leave": e.cellMouseLeave,
2501
- "cell-click": e.cellClick,
2502
- "header-click": e.headerClick,
2503
- "row-contextmenu": e.rowContextmenu,
2504
- "header-contextmenu": e.headerContextmenu,
2505
- "cell-dblclick": e.cellDblclick,
2506
- "filter-change": e.filterChange,
2507
- "selection-change": e.selectionChange,
2508
- select: e.select,
2509
- "select-all": e.selectAll,
2510
- "sort-change": e.sortChange
2511
- },
2512
- scopedSlots: e._u([{
2513
- key: "empty",
2514
- fn: function() {
2515
- return [e.$slots.empty ? e._t("empty") : n("ElEmpty", {
2516
- staticClass: "avue-crud__empty",
2517
- attrs: {
2518
- "image-size": 100,
2519
- description: e.tableOption.emptyText
2520
- }
2521
- })];
2522
- },
2523
- proxy: !0
2524
- }], null, !0)
2525
- }, [n("Column", {
2526
- attrs: {
2527
- "column-option": e.columnOption
2528
- },
2529
- scopedSlots: e._u([{
2530
- key: "header",
2531
- fn: function() {
2532
- return [n("ColumnDefault", {
2533
- ref: "columnDefault",
2534
- scopedSlots: e._u([{
2535
- key: "expand",
2536
- fn: function(i) {
2537
- var r = i.row, o = i.index;
2538
- return [e._t("expand", null, {
2539
- row: r,
2540
- index: o
2541
- })];
2542
- }
2543
- }], null, !0)
2544
- })];
2545
- },
2546
- proxy: !0
2547
- }, e._l(e.mainSlot, function(i) {
2548
- return {
2549
- key: i,
2550
- fn: function(r) {
2551
- return [e._t(i, null, null, r)];
2552
- }
2553
- };
2554
- }), {
2555
- key: "footer",
2556
- fn: function() {
2557
- return [n("ColumnMenu", {
2558
- scopedSlots: e._u([{
2559
- key: "menu",
2560
- fn: function(i) {
2561
- return [e._t("menu", null, null, i)];
2562
- }
2563
- }, {
2564
- key: "menuBtn",
2565
- fn: function(i) {
2566
- return [e._t("menuBtn", null, null, i)];
2567
- }
2568
- }], null, !0)
2569
- })];
2570
- },
2571
- proxy: !0
2572
- }], null, !0)
2573
- })], 1)], 1), e._t("footer"), n("TablePage", {
2574
- ref: "tablePage"
2575
- }), n("FyDialogForm", {
2576
- ref: "dialogForm",
2577
- scopedSlots: e._u([e._l(e.formSlot, function(i) {
2578
- return {
2579
- key: i,
2580
- fn: function(r) {
2581
- return [e._t(i, null, null, r)];
2582
- }
2583
- };
2584
- }), {
2585
- key: "menuForm",
2586
- fn: function(i) {
2587
- return [e._t("menuForm", null, null, i)];
2588
- }
2589
- }], null, !0)
2590
- }), n("DialogColumn", {
2591
- ref: "dialogColumn"
2592
- }), n("DialogExcel", {
2593
- ref: "dialogExcel"
2594
- }), n("DialogFilter", {
2595
- ref: "dialogFilter"
2596
- })], 2);
2597
- }, gt = [];
2598
- const _t = {
1359
+ const We = je.exports;
1360
+ const Ke = {
2599
1361
  name: "FyCurd",
2600
1362
  components: {
2601
- DialogFilter: ft,
2602
- DialogExcel: ct,
2603
- DialogColumn: it,
2604
- FyDialogForm: Qe,
2605
- TablePage: Ke,
2606
- ColumnMenu: je,
2607
- ColumnDefault: De,
2608
- Column: Oe,
2609
- HeaderMenu: ue,
2610
- HeaderSearch: re
1363
+ DialogFilter: We,
1364
+ DialogExcel: Re,
1365
+ DialogColumn: Te,
1366
+ FyDialogForm: ke,
1367
+ TablePage: we,
1368
+ ColumnMenu: ve,
1369
+ ColumnDefault: me,
1370
+ Column: ce,
1371
+ HeaderMenu: X,
1372
+ HeaderSearch: W
2611
1373
  },
2612
1374
  directives: {
2613
- permission: w
1375
+ permission: x
2614
1376
  },
2615
- mixins: [R],
1377
+ mixins: [O],
2616
1378
  provide() {
2617
1379
  return {
2618
1380
  crud: this
@@ -2674,7 +1436,7 @@ const _t = {
2674
1436
  cellForm: {
2675
1437
  list: []
2676
1438
  },
2677
- config: h,
1439
+ config: p,
2678
1440
  list: [],
2679
1441
  listError: {},
2680
1442
  tableForm: {},
@@ -2725,37 +1487,37 @@ const _t = {
2725
1487
  return this.getSlotList(["Search"], this.$scopedSlots, this.propOption);
2726
1488
  },
2727
1489
  mainSlot() {
2728
- const e = [];
2729
- return this.propOption.forEach((t) => {
2730
- this.$scopedSlots[t.prop] && e.push(t.prop);
2731
- }), this.getSlotList(["Header", "Form"], this.$scopedSlots, this.propOption).concat(e);
1490
+ const t = [];
1491
+ return this.propOption.forEach((e) => {
1492
+ this.$scopedSlots[e.prop] && t.push(e.prop);
1493
+ }), this.getSlotList(["Header", "Form"], this.$scopedSlots, this.propOption).concat(t);
2732
1494
  },
2733
1495
  calcHeight() {
2734
1496
  return (this.tableOption.calcHeight || 0) + this.$AVUE.calcHeight;
2735
1497
  },
2736
1498
  propOption() {
2737
- let e = [];
2738
- function t(n = []) {
2739
- Array.isArray(n) && n.forEach((i) => {
2740
- Array.isArray(i.children) ? t(i.children) : e.push(i);
1499
+ let t = [];
1500
+ function e(i = []) {
1501
+ Array.isArray(i) && i.forEach((n) => {
1502
+ Array.isArray(n.children) ? e(n.children) : t.push(n);
2741
1503
  });
2742
1504
  }
2743
- return t(this.columnOption), e = H(e), e;
1505
+ return e(this.columnOption), t = k(t), t;
2744
1506
  },
2745
1507
  isShowSummary() {
2746
1508
  return this.option.showSummary;
2747
1509
  },
2748
1510
  isHeader() {
2749
- let e = !1;
2750
- return this.columnOption.forEach((t) => {
2751
- t.children && (e = !0);
2752
- }), e;
1511
+ let t = !1;
1512
+ return this.columnOption.forEach((e) => {
1513
+ e.children && (t = !0);
1514
+ }), t;
2753
1515
  },
2754
1516
  isTree() {
2755
- let e = !1;
2756
- return this.data.forEach((t) => {
2757
- t.children && (e = !0);
2758
- }), e;
1517
+ let t = !1;
1518
+ return this.data.forEach((e) => {
1519
+ e.children && (t = !0);
1520
+ }), t;
2759
1521
  },
2760
1522
  isCard() {
2761
1523
  return this.option.card ? "always" : "never";
@@ -2804,206 +1566,206 @@ const _t = {
2804
1566
  this.dataInit(), this.getTableHeight(), this.refreshTable();
2805
1567
  },
2806
1568
  methods: {
2807
- setPx: q,
2808
- optVal: m,
2809
- handleValidate(e, t, n) {
2810
- this.listError[e] || this.$set(this.listError, e, { valid: !1, msg: "" }), this.listError[e].valid = !t, this.listError[e].msg = n;
1569
+ setPx: z,
1570
+ optVal: h,
1571
+ handleValidate(t, e, i) {
1572
+ this.listError[t] || this.$set(this.listError, t, { valid: !1, msg: "" }), this.listError[t].valid = !e, this.listError[t].msg = i;
2811
1573
  },
2812
- getPermission(e, t, n) {
2813
- return typeof this.permission == "function" ? this.permission(e, t, n) : c(this.permission[e]) ? !0 : this.permission[e];
1574
+ getPermission(t, e, i) {
1575
+ return typeof this.permission == "function" ? this.permission(t, e, i) : c(this.permission[t]) ? !0 : this.permission[t];
2814
1576
  },
2815
1577
  getTableHeight() {
2816
1578
  this.isAutoHeight ? this.$nextTick(() => {
2817
- const e = this.$refs.table, t = this.$refs.tablePage;
2818
- if (!e)
1579
+ const t = this.$refs.table, e = this.$refs.tablePage;
1580
+ if (!t)
2819
1581
  return;
2820
- const n = e.$el, i = t.$el.offsetHeight || 20;
2821
- this.tableHeight = document.documentElement.clientHeight - n.offsetTop - i - this.calcHeight;
1582
+ const i = t.$el, n = e.$el.offsetHeight || 20;
1583
+ this.tableHeight = document.documentElement.clientHeight - i.offsetTop - n - this.calcHeight;
2822
1584
  }) : this.tableHeight = this.tableOption.height;
2823
1585
  },
2824
1586
  doLayout() {
2825
1587
  this.$refs.table.doLayout();
2826
1588
  },
2827
- refreshTable(e) {
1589
+ refreshTable(t) {
2828
1590
  this.reload = Math.random(), this.$nextTick(() => {
2829
- e && e();
1591
+ t && t();
2830
1592
  });
2831
1593
  },
2832
1594
  // 树懒加载
2833
- treeLoad(e, t, n) {
2834
- this.$emit("tree-load", e, t, (i) => {
2835
- e.children = i, n(i);
1595
+ treeLoad(t, e, i) {
1596
+ this.$emit("tree-load", t, e, (n) => {
1597
+ t.children = n, i(n);
2836
1598
  });
2837
1599
  },
2838
- menuIcon(e) {
2839
- return m(this.tableOption[`${e}Text`], N(`crud.${e}`));
1600
+ menuIcon(t) {
1601
+ return h(this.tableOption[`${t}Text`], I(`crud.${t}`));
2840
1602
  },
2841
- getBtnIcon(e) {
2842
- const t = `${e}Icon`;
2843
- return this.tableOption[t] || h[t];
1603
+ getBtnIcon(t) {
1604
+ const e = `${t}Icon`;
1605
+ return this.tableOption[e] || p[e];
2844
1606
  },
2845
1607
  // 对部分表单字段进行校验的方法
2846
- validateField(e) {
2847
- return this.$refs.dialogForm.$refs.tableForm.validateField(e);
1608
+ validateField(t) {
1609
+ return this.$refs.dialogForm.$refs.tableForm.validateField(t);
2848
1610
  },
2849
1611
  selectClear() {
2850
1612
  this.$emit("selection-clear", a(this.tableSelect)), this.$refs.table.clearSelection();
2851
1613
  },
2852
- toggleRowSelection(e, t) {
2853
- this.$refs.table.toggleRowSelection(e, t);
1614
+ toggleRowSelection(t, e) {
1615
+ this.$refs.table.toggleRowSelection(t, e);
2854
1616
  },
2855
- toggleRowExpansion(e, t) {
2856
- this.$refs.table.toggleRowExpansion(e, t);
1617
+ toggleRowExpansion(t, e) {
1618
+ this.$refs.table.toggleRowExpansion(t, e);
2857
1619
  },
2858
- setCurrentRow(e) {
2859
- this.$refs.table.setCurrentRow(e);
1620
+ setCurrentRow(t) {
1621
+ this.$refs.table.setCurrentRow(t);
2860
1622
  },
2861
1623
  dataInit() {
2862
- this.list = this.data, this.list.forEach((e, t) => {
2863
- e.$cellEdit && !this.cascaderFormList[t] && (this.cascaderFormList[t] = a(e)), this.$set(e, "$cellEdit", e.$cellEdit || !1), this.$set(e, "$index", t);
1624
+ this.list = this.data, this.list.forEach((t, e) => {
1625
+ t.$cellEdit && !this.cascaderFormList[e] && (this.cascaderFormList[e] = a(t)), this.$set(t, "$cellEdit", t.$cellEdit || !1), this.$set(t, "$index", e);
2864
1626
  });
2865
1627
  },
2866
1628
  // 拖动表头事件
2867
- headerDragend(e, t, n, i) {
2868
- this.objectOption[n.property] && this.$set(this.objectOption[n.property], "width", e), this.$emit("header-dragend", e, t, n, i);
1629
+ headerDragend(t, e, i, n) {
1630
+ this.objectOption[i.property] && this.$set(this.objectOption[i.property], "width", t), this.$emit("header-dragend", t, e, i, n);
2869
1631
  },
2870
- headerSort(e, t) {
2871
- const n = this.columnOption, i = n.splice(e, 1)[0];
2872
- n.splice(t, 0, i), this.refreshTable();
1632
+ headerSort(t, e) {
1633
+ const i = this.columnOption, n = i.splice(t, 1)[0];
1634
+ i.splice(e, 0, n), this.refreshTable();
2873
1635
  },
2874
1636
  // 清除过滤器执行函数
2875
- clearFilter(e) {
2876
- this.$refs.table.clearFilter(e);
1637
+ clearFilter(t) {
1638
+ this.$refs.table.clearFilter(t);
2877
1639
  },
2878
1640
  // 展开或则关闭
2879
- expandChange(e, t) {
2880
- this.$emit("expand-change", e, t);
1641
+ expandChange(t, e) {
1642
+ this.$emit("expand-change", t, e);
2881
1643
  },
2882
1644
  // 设置单选
2883
- currentRowChange(e, t) {
2884
- this.$emit("current-row-change", e, t);
1645
+ currentRowChange(t, e) {
1646
+ this.$emit("current-row-change", t, e);
2885
1647
  },
2886
1648
  // 刷新事件
2887
1649
  refreshChange() {
2888
1650
  this.$emit("refresh-change");
2889
1651
  },
2890
1652
  // 选中实例
2891
- toggleSelection(e) {
2892
- e ? e.forEach((t) => {
2893
- this.$refs.table.toggleRowSelection(t);
1653
+ toggleSelection(t) {
1654
+ t ? t.forEach((e) => {
1655
+ this.$refs.table.toggleRowSelection(e);
2894
1656
  }) : this.$refs.table.clearSelection();
2895
1657
  },
2896
1658
  // 选择回调
2897
- selectionChange(e) {
2898
- this.tableSelect = e, this.$emit("selection-change", this.tableSelect);
1659
+ selectionChange(t) {
1660
+ this.tableSelect = t, this.$emit("selection-change", this.tableSelect);
2899
1661
  },
2900
1662
  // 单个选择回调
2901
- select(e, t) {
2902
- this.$emit("select", e, t);
1663
+ select(t, e) {
1664
+ this.$emit("select", t, e);
2903
1665
  },
2904
1666
  // 点击勾选全选 Checkbox
2905
- selectAll(e) {
2906
- this.$emit("select-all", e);
1667
+ selectAll(t) {
1668
+ this.$emit("select-all", t);
2907
1669
  },
2908
1670
  // 筛选回调用
2909
- filterChange(e) {
2910
- this.$emit("filter-change", e);
1671
+ filterChange(t) {
1672
+ this.$emit("filter-change", t);
2911
1673
  },
2912
1674
  // 排序回调
2913
- sortChange(e) {
2914
- this.$emit("sort-change", e);
1675
+ sortChange(t) {
1676
+ this.$emit("sort-change", t);
2915
1677
  },
2916
1678
  // 行双击
2917
- rowDblclick(e, t) {
2918
- this.$emit("row-dblclick", e, t);
1679
+ rowDblclick(t, e) {
1680
+ this.$emit("row-dblclick", t, e);
2919
1681
  },
2920
1682
  // 行单机
2921
- rowClick(e, t, n) {
2922
- this.$emit("row-click", e, t, n);
1683
+ rowClick(t, e, i) {
1684
+ this.$emit("row-click", t, e, i);
2923
1685
  },
2924
1686
  // 清空排序
2925
1687
  clearSort() {
2926
1688
  this.$refs.table.clearSort();
2927
1689
  },
2928
1690
  // 当单元格 hover 进入时会触发该事件
2929
- cellMouseEnter(e, t, n, i) {
2930
- this.$emit("cell-mouse-enter", e, t, n, i);
1691
+ cellMouseEnter(t, e, i, n) {
1692
+ this.$emit("cell-mouse-enter", t, e, i, n);
2931
1693
  },
2932
1694
  // 当单元格 hover 退出时会触发该事件
2933
- cellMouseLeave(e, t, n, i) {
2934
- this.$emit("cell-mouse-leave", e, t, n, i);
1695
+ cellMouseLeave(t, e, i, n) {
1696
+ this.$emit("cell-mouse-leave", t, e, i, n);
2935
1697
  },
2936
1698
  // 当某个单元格被点击时会触发该事件
2937
- cellClick(e, t, n, i) {
2938
- this.$emit("cell-click", e, t, n, i);
1699
+ cellClick(t, e, i, n) {
1700
+ this.$emit("cell-click", t, e, i, n);
2939
1701
  },
2940
1702
  // 当某一列的表头被点击时会触发该事件
2941
- headerClick(e, t) {
2942
- this.$emit("header-click", e, t);
1703
+ headerClick(t, e) {
1704
+ this.$emit("header-click", t, e);
2943
1705
  },
2944
1706
  // 当某一行被鼠标右键点击时会触发该事件
2945
- rowContextmenu(e, t, n) {
2946
- this.$emit("row-contextmenu", e, t, n);
1707
+ rowContextmenu(t, e, i) {
1708
+ this.$emit("row-contextmenu", t, e, i);
2947
1709
  },
2948
1710
  // 当某一列的表头被鼠标右键点击时触发该事件
2949
- headerContextmenu(e, t) {
2950
- this.$emit("header-contextmenu", e, t);
1711
+ headerContextmenu(t, e) {
1712
+ this.$emit("header-contextmenu", t, e);
2951
1713
  },
2952
1714
  // 当某个单元格被双击击时会触发该事件
2953
- cellDblclick(e, t, n, i) {
2954
- this.$emit("cell-dblclick", e, t, n, i);
1715
+ cellDblclick(t, e, i, n) {
1716
+ this.$emit("cell-dblclick", t, e, i, n);
2955
1717
  },
2956
1718
  // 单元格新增
2957
- rowCellAdd(e = {}) {
2958
- const t = this.list.length, n = W(this.propOption).tableForm;
2959
- e = a(
1719
+ rowCellAdd(t = {}) {
1720
+ const e = this.list.length, i = E(this.propOption).tableForm;
1721
+ t = a(
2960
1722
  Object.assign(
2961
1723
  {
2962
1724
  $cellEdit: !0,
2963
- $index: t
1725
+ $index: e
2964
1726
  },
2965
- n,
2966
- e
1727
+ i,
1728
+ t
2967
1729
  )
2968
- ), this.list.push(e);
1730
+ ), this.list.push(t);
2969
1731
  },
2970
1732
  // 行取消
2971
- rowCancel(e, t) {
2972
- c(e[this.rowKey]) ? (this.list.splice(t, 1), delete this.cascaderDIC[t]) : (this.cascaderFormList[t].$cellEdit = !1, this.$set(this.cascaderDIC, t, this.cascaderDicList[t]), this.$set(this.list, t, this.cascaderFormList[t])), delete this.cascaderDicList[t], delete this.cascaderFormList[t], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1);
1733
+ rowCancel(t, e) {
1734
+ c(t[this.rowKey]) ? (this.list.splice(e, 1), delete this.cascaderDIC[e]) : (this.cascaderFormList[e].$cellEdit = !1, this.$set(this.cascaderDIC, e, this.cascaderDicList[e]), this.$set(this.list, e, this.cascaderFormList[e])), delete this.cascaderDicList[e], delete this.cascaderFormList[e], this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1);
2973
1735
  },
2974
1736
  // 行编辑点击
2975
- rowCell(e, t) {
2976
- e.$cellEdit ? this.rowCellUpdate(e, t) : this.rowCellEdit(e, t);
1737
+ rowCell(t, e) {
1738
+ t.$cellEdit ? this.rowCellUpdate(t, e) : this.rowCellEdit(t, e);
2977
1739
  },
2978
- rowCellUpdate(e, t) {
2979
- e = a(e);
2980
- const n = this.validateCellField(t), i = () => {
2981
- this.btnDisabledList[t] = !1, this.btnDisabled = !1, this.list[t].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(t), 1), delete this.cascaderFormList[t];
1740
+ rowCellUpdate(t, e) {
1741
+ t = a(t);
1742
+ const i = this.validateCellField(e), n = () => {
1743
+ this.btnDisabledList[e] = !1, this.btnDisabled = !1, this.list[e].$cellEdit = !1, this.cascaderIndexList.splice(this.cascaderIndexList.indexOf(e), 1), delete this.cascaderFormList[e];
2982
1744
  }, r = () => {
2983
- this.btnDisabledList[t] = !1, this.btnDisabled = !1;
1745
+ this.btnDisabledList[e] = !1, this.btnDisabled = !1;
2984
1746
  };
2985
- n && (this.btnDisabledList[t] = !0, this.btnDisabled = !0, c(e[this.rowKey]) ? this.$emit("row-save", e, i, r) : this.$emit("row-update", e, t, i, r));
1747
+ i && (this.btnDisabledList[e] = !0, this.btnDisabled = !0, c(t[this.rowKey]) ? this.$emit("row-save", t, n, r) : this.$emit("row-update", t, e, n, r));
2986
1748
  },
2987
1749
  // 单元格编辑
2988
- rowCellEdit(e, t) {
2989
- e.$cellEdit = !0, this.cascaderFormList[t] = a(e), this.cascaderDicList[t] = a(this.cascaderDIC[t]);
1750
+ rowCellEdit(t, e) {
1751
+ t.$cellEdit = !0, this.cascaderFormList[e] = a(t), this.cascaderDicList[e] = a(this.cascaderDIC[e]);
2990
1752
  },
2991
1753
  // 对部分表单字段进行校验
2992
1754
  validateCellForm() {
2993
- return new Promise((e) => {
2994
- this.$refs.cellForm.validate((t, n) => {
2995
- e(n);
1755
+ return new Promise((t) => {
1756
+ this.$refs.cellForm.validate((e, i) => {
1757
+ t(i);
2996
1758
  });
2997
1759
  });
2998
1760
  },
2999
- validateCellField(e) {
3000
- let t = !0;
3001
- for (const n of this.$refs.cellForm.fields)
3002
- if (n.prop.split(".")[1] === `${e}` && this.$refs.cellForm.validateField(n.prop, (i) => {
3003
- i && (t = !1);
3004
- }), !t)
1761
+ validateCellField(t) {
1762
+ let e = !0;
1763
+ for (const i of this.$refs.cellForm.fields)
1764
+ if (i.prop.split(".")[1] === `${t}` && this.$refs.cellForm.validateField(i.prop, (n) => {
1765
+ n && (e = !1);
1766
+ }), !e)
3005
1767
  break;
3006
- return t;
1768
+ return e;
3007
1769
  },
3008
1770
  rowAdd() {
3009
1771
  this.$refs.dialogForm.show("add");
@@ -3017,121 +1779,152 @@ const _t = {
3017
1779
  closeDialog() {
3018
1780
  return this.$refs.dialogForm.closeDialog();
3019
1781
  },
3020
- getPropRef(e) {
3021
- return this.$refs.dialogForm.$refs.tableForm.getPropRef(e);
1782
+ getPropRef(t) {
1783
+ return this.$refs.dialogForm.$refs.tableForm.getPropRef(t);
3022
1784
  },
3023
1785
  setVal() {
3024
1786
  this.$emit("input", this.tableForm), this.$emit("change", this.tableForm);
3025
1787
  },
3026
1788
  // 编辑
3027
- rowEdit(e, t) {
3028
- this.tableForm = a(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("edit");
1789
+ rowEdit(t, e) {
1790
+ this.tableForm = a(t), this.tableIndex = e, this.setVal(), this.$refs.dialogForm.show("edit");
3029
1791
  },
3030
1792
  // 复制
3031
- rowCopy(e) {
3032
- this.tableForm = a(e), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
1793
+ rowCopy(t) {
1794
+ this.tableForm = a(t), delete this.tableForm[this.rowKey], this.tableIndex = -1, this.setVal(), this.$refs.dialogForm.show("add");
3033
1795
  },
3034
1796
  // 查看
3035
- rowView(e, t) {
3036
- this.tableForm = a(e), this.tableIndex = t, this.setVal(), this.$refs.dialogForm.show("view");
1797
+ rowView(t, e) {
1798
+ this.tableForm = a(t), this.tableIndex = e, this.setVal(), this.$refs.dialogForm.show("view");
3037
1799
  },
3038
1800
  // 删除
3039
- rowDel(e, t) {
3040
- this.$emit("row-del", e, t, () => {
3041
- const { parentList: n, index: i } = this.findData(e[this.rowKey]);
3042
- n && n.splice(i, 1);
1801
+ rowDel(t, e) {
1802
+ this.$emit("row-del", t, e, () => {
1803
+ const { parentList: i, index: n } = this.findData(t[this.rowKey]);
1804
+ i && i.splice(n, 1);
3043
1805
  });
3044
1806
  },
3045
1807
  // 合并行
3046
- tableSpanMethod(e) {
1808
+ tableSpanMethod(t) {
3047
1809
  if (typeof this.spanMethod == "function")
3048
- return this.spanMethod(e);
1810
+ return this.spanMethod(t);
3049
1811
  },
3050
1812
  // 合集统计逻辑
3051
- tableSummaryMethod(e) {
3052
- const t = {};
1813
+ tableSummaryMethod(t) {
1814
+ const e = {};
3053
1815
  if (typeof this.summaryMethod == "function")
3054
- return this.summaryMethod(e);
3055
- const { columns: n, data: i } = e, r = [];
3056
- return n.length > 0 && n.forEach((o, s) => {
3057
- const l = this.sumColumnList.find((u) => u.name === o.property);
3058
- if (l) {
3059
- const u = l.decimals || 2, d = l.label || "";
1816
+ return this.summaryMethod(t);
1817
+ const { columns: i, data: n } = t, r = [];
1818
+ return i.length > 0 && i.forEach((s, l) => {
1819
+ const o = this.sumColumnList.find((m) => m.name === s.property);
1820
+ if (o) {
1821
+ const m = o.decimals || 2, u = o.label || "";
3060
1822
  let g = 1;
3061
- switch (l.type) {
1823
+ switch (o.type) {
3062
1824
  case "count":
3063
- r[s] = d + i.length;
1825
+ r[l] = u + n.length;
3064
1826
  break;
3065
1827
  case "avg":
3066
- r[s] = i.map((p) => Number(p[o.property])).reduce((p, _) => {
1828
+ r[l] = n.map((d) => Number(d[s.property])).reduce((d, _) => {
3067
1829
  const v = Number(_);
3068
- return isNaN(v) ? p : (p * (g - 1) + _) / g++;
3069
- }, 0), r[s] = d + r[s].toFixed(u);
1830
+ return isNaN(v) ? d : (d * (g - 1) + _) / g++;
1831
+ }, 0), r[l] = u + r[l].toFixed(m);
3070
1832
  break;
3071
1833
  case "sum":
3072
- r[s] = i.map((p) => Number(p[o.property])).reduce((p, _) => {
1834
+ r[l] = n.map((d) => Number(d[s.property])).reduce((d, _) => {
3073
1835
  const v = Number(_);
3074
- return isNaN(v) ? p : p + _;
3075
- }, 0), r[s] = d + r[s].toFixed(u);
1836
+ return isNaN(v) ? d : d + _;
1837
+ }, 0), r[l] = u + r[l].toFixed(m);
3076
1838
  break;
3077
1839
  }
3078
- t[o.property] = r[s];
1840
+ e[s.property] = r[l];
3079
1841
  } else
3080
- r[s] = "";
3081
- }), this.sumsList = t, r;
1842
+ r[l] = "";
1843
+ }), this.sumsList = e, r;
3082
1844
  },
3083
- tableDrop(e, t, n) {
1845
+ tableDrop(t, e, i) {
3084
1846
  if (this.isSortable !== !0) {
3085
- if (e === "row" && !this.isRowSort)
1847
+ if (t === "row" && !this.isRowSort)
3086
1848
  return;
3087
- if (e === "column" && !this.isColumnSort)
1849
+ if (t === "column" && !this.isColumnSort)
3088
1850
  return;
3089
1851
  }
3090
1852
  if (!window.Sortable) {
3091
- j.logs("Sortable");
1853
+ $.logs("Sortable");
3092
1854
  return;
3093
1855
  }
3094
- window.Sortable.create(t, {
3095
- ghostClass: h.ghostClass,
3096
- chosenClass: h.ghostClass,
1856
+ window.Sortable.create(e, {
1857
+ ghostClass: p.ghostClass,
1858
+ chosenClass: p.ghostClass,
3097
1859
  animation: 500,
3098
1860
  delay: 0,
3099
- onEnd: (i) => n(i)
1861
+ onEnd: (n) => i(n)
3100
1862
  });
3101
1863
  },
3102
- findData(e) {
3103
- let t = {};
3104
- const n = (i, r) => {
3105
- i.forEach((o, s) => {
3106
- o[this.rowKey] === e && (t = {
3107
- item: o,
3108
- index: s,
3109
- parentList: i,
1864
+ findData(t) {
1865
+ let e = {};
1866
+ const i = (n, r) => {
1867
+ n.forEach((s, l) => {
1868
+ s[this.rowKey] === t && (e = {
1869
+ item: s,
1870
+ index: l,
1871
+ parentList: n,
3110
1872
  parent: r
3111
- }), o[this.childrenKey] && n(o[this.childrenKey], o);
1873
+ }), s[this.childrenKey] && i(s[this.childrenKey], s);
3112
1874
  });
3113
1875
  };
3114
- return n(this.list), t;
1876
+ return i(this.list), e;
3115
1877
  }
3116
1878
  }
3117
- }, T = {};
3118
- var vt = /* @__PURE__ */ f(
3119
- _t,
3120
- bt,
3121
- gt,
1879
+ };
1880
+ var Ue = function() {
1881
+ var e = this, i = e._self._c;
1882
+ return i("div", { staticClass: "avue-crud avue-crud--card" }, [e.tableOption.title ? i(e.tableOption.titleSize || "h2", { tag: "Component", style: e.tableOption.titleStyle }, [e._v(" " + e._s(e.tableOption.title) + " ")]) : e._e(), i("HeaderSearch", { ref: "headerSearch", scopedSlots: e._u([{ key: "search", fn: function(n) {
1883
+ return [e._t("search", null, null, n)];
1884
+ } }, { key: "searchMenu", fn: function(n) {
1885
+ return [e._t("searchMenu", null, null, n)];
1886
+ } }, e._l(e.searchSlot, function(n) {
1887
+ return { key: n, fn: function(r) {
1888
+ return [e._t(n, null, null, r)];
1889
+ } };
1890
+ })], null, !0) }), e.optVal(e.tableOption.header, !0) ? i("HeaderMenu", { ref: "headerMenu", scopedSlots: e._u([{ key: "menuLeft", fn: function(n) {
1891
+ return [e._t("menuLeft", null, null, n)];
1892
+ } }, { key: "menuRight", fn: function(n) {
1893
+ return [e._t("menuRight", null, null, n)];
1894
+ } }], null, !0) }) : e._e(), e.optVal(e.tableOption.tip, e.config.tip) && e.tableOption.selection ? i("ElTag", { staticClass: "avue-crud__tip" }, [i("span", { staticClass: "avue-crud__tip-name" }, [e._v(" 当前表格已选择 "), i("span", { staticClass: "avue-crud__tip-count" }, [e._v(e._s(e.selectLen))]), e._v(" 项 ")]), e.optVal(e.tableOption.selectClearBtn, e.config.selectClearBtn) && e.tableOption.selection ? i("ElButton", { directives: [{ name: "permission", rawName: "v-permission", value: e.getPermission("selectClearBtn"), expression: "getPermission('selectClearBtn')" }], attrs: { type: "text", size: "small" }, on: { click: e.selectClear } }, [e._v(" 清 空 ")]) : e._e(), e._t("tip")], 2) : e._e(), e._t("header"), i("ElForm", { ref: "cellForm", attrs: { model: e.cellForm, "show-message": !1 }, on: { validate: e.handleValidate } }, [i("ElTable", { directives: [{ name: "loading", rawName: "v-loading", value: e.tableLoading, expression: "tableLoading" }], key: e.reload, ref: "table", class: { "avue-crud--indeterminate": e.optVal(e.tableOption.indeterminate, !1) }, attrs: { data: e.cellForm.list, "row-key": e.rowKey, size: e.$AVUE.tableSize || e.controlSize, lazy: e.optVal(e.tableOption.lazy, !1), load: e.treeLoad, "tree-props": e.treeProps, "expand-row-keys": e.tableOption.expandRowKeys, "default-expand-all": e.tableOption.defaultExpandAll, "highlight-current-row": e.tableOption.highlightCurrentRow, "show-summary": e.tableOption.showSummary, "summary-method": e.tableSummaryMethod, "span-method": e.tableSpanMethod, stripe: e.tableOption.stripe, "show-header": e.tableOption.showHeader, "default-sort": e.tableOption.defaultSort, "row-class-name": e.rowClassName, "cell-class-name": e.cellClassName, "row-style": e.rowStyle, "cell-style": e.cellStyle, fit: e.tableOption.fit, "header-cell-class-name": e.headerCellClassName, "max-height": e.isAutoHeight ? e.tableHeight : e.tableOption.maxHeight, height: e.tableHeight, width: e.setPx(e.tableOption.width, e.config.width), border: e.tableOption.border }, on: { "current-change": e.currentRowChange, "expand-change": e.expandChange, "header-dragend": e.headerDragend, "row-click": e.rowClick, "row-dblclick": e.rowDblclick, "cell-mouse-enter": e.cellMouseEnter, "cell-mouse-leave": e.cellMouseLeave, "cell-click": e.cellClick, "header-click": e.headerClick, "row-contextmenu": e.rowContextmenu, "header-contextmenu": e.headerContextmenu, "cell-dblclick": e.cellDblclick, "filter-change": e.filterChange, "selection-change": e.selectionChange, select: e.select, "select-all": e.selectAll, "sort-change": e.sortChange }, scopedSlots: e._u([{ key: "empty", fn: function() {
1895
+ return [e.$slots.empty ? e._t("empty") : i("ElEmpty", { staticClass: "avue-crud__empty", attrs: { "image-size": 100, description: e.tableOption.emptyText } })];
1896
+ }, proxy: !0 }], null, !0) }, [i("Column", { attrs: { "column-option": e.columnOption }, scopedSlots: e._u([{ key: "header", fn: function() {
1897
+ return [i("ColumnDefault", { ref: "columnDefault", scopedSlots: e._u([{ key: "expand", fn: function({ row: n, index: r }) {
1898
+ return [e._t("expand", null, { row: n, index: r })];
1899
+ } }], null, !0) })];
1900
+ }, proxy: !0 }, e._l(e.mainSlot, function(n) {
1901
+ return { key: n, fn: function(r) {
1902
+ return [e._t(n, null, null, r)];
1903
+ } };
1904
+ }), { key: "footer", fn: function() {
1905
+ return [i("ColumnMenu", { scopedSlots: e._u([{ key: "menu", fn: function(n) {
1906
+ return [e._t("menu", null, null, n)];
1907
+ } }, { key: "menuBtn", fn: function(n) {
1908
+ return [e._t("menuBtn", null, null, n)];
1909
+ } }], null, !0) })];
1910
+ }, proxy: !0 }], null, !0) })], 1)], 1), e._t("footer"), i("TablePage", { ref: "tablePage" }), i("FyDialogForm", { ref: "dialogForm", scopedSlots: e._u([e._l(e.formSlot, function(n) {
1911
+ return { key: n, fn: function(r) {
1912
+ return [e._t(n, null, null, r)];
1913
+ } };
1914
+ }), { key: "menuForm", fn: function(n) {
1915
+ return [e._t("menuForm", null, null, n)];
1916
+ } }], null, !0) }), i("DialogColumn", { ref: "dialogColumn" }), i("DialogExcel", { ref: "dialogExcel" }), i("DialogFilter", { ref: "dialogFilter" })], 2);
1917
+ }, Ge = [], qe = /* @__PURE__ */ f(
1918
+ Ke,
1919
+ Ue,
1920
+ Ge,
3122
1921
  !1,
3123
- yt,
1922
+ null,
3124
1923
  null,
3125
1924
  null,
3126
1925
  null
3127
1926
  );
3128
- function yt(e) {
3129
- for (let t in T)
3130
- this[t] = T[t];
3131
- }
3132
- const Dt = /* @__PURE__ */ function() {
3133
- return vt.exports;
3134
- }();
1927
+ const ot = qe.exports;
3135
1928
  export {
3136
- Dt as default
1929
+ ot as default
3137
1930
  };