@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-form/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var D = (e, i, r) => new Promise((s, p) => {
1
+ var D = (i, e, r) => new Promise((s, p) => {
2
2
  var t = (o) => {
3
3
  try {
4
4
  a(r.next(o));
@@ -12,143 +12,100 @@ var D = (e, i, r) => new Promise((s, p) => {
12
12
  p(d);
13
13
  }
14
14
  }, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(t, l);
15
- a((r = r.apply(e, i)).next());
15
+ a((r = r.apply(i, e)).next());
16
16
  });
17
- import { F as B, d as I } from "../chunks/FormTemp.7f91629d.mjs";
18
- import { i as M } from "../chunks/init.47f219b4.mjs";
19
- import { s as y, d as x, u as L, x as V, p as A, j as S, a as W, o as G, y as R } from "../chunks/util.ae730cde.mjs";
20
- import { d as H, c as U, a as q, b as K, f as J } from "../chunks/dataformat.f995e2f9.mjs";
21
- import { s as Q } from "../chunks/dic.eaac0823.mjs";
22
- import { p as X } from "../chunks/packages.1fc9ccba.mjs";
23
- import { isBlank as f } from "@web-utils/core";
24
- import { n as $ } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
25
- const Y = (e, i, r, s) => {
17
+ import { F as P, d as z } from "../chunks/FormTemp.aa57efb4.mjs";
18
+ import { i as B } from "../chunks/init.47f219b4.mjs";
19
+ import { s as v, d as x, u as j, x as I, p as L, j as S, a as V, o as M, y as A } from "../chunks/util.ae730cde.mjs";
20
+ import { d as W, c as G, a as R, b as H, f as U } from "../chunks/dataformat.f995e2f9.mjs";
21
+ import { s as q } from "../chunks/dic.eaac0823.mjs";
22
+ import { p as K } from "../chunks/packages.1fc9ccba.mjs";
23
+ import { isBlank as u } from "@web-utils/core";
24
+ import { n as g } from "../chunks/_plugin-vue2_normalizer.446f5dc4.mjs";
25
+ const J = (i, e, r, s) => {
26
26
  if (!s)
27
27
  return;
28
28
  if (!window.Mock) {
29
- X.logs("mock");
29
+ K.logs("mock");
30
30
  return;
31
31
  }
32
32
  const t = (window.Mock || {}).Random, l = {};
33
33
  function a({ en: c }) {
34
34
  return c ? t.name(!0) : t.cname();
35
35
  }
36
- function o({ max: c, min: n, precision: u }) {
37
- if (u) {
38
- const h = `${t.float(n, c, u)}`, m = h.indexOf(".") + 1;
39
- return Number(h.substring(0, m + u));
36
+ function o({ max: c, min: n, precision: f }) {
37
+ if (f) {
38
+ const h = `${t.float(n, c, f)}`, m = h.indexOf(".") + 1;
39
+ return Number(h.substring(0, m + f));
40
40
  } else
41
41
  return t.integer(n, c);
42
42
  }
43
43
  function d({ header: c }) {
44
44
  let n = t.url();
45
- const u = n.indexOf("://");
46
- return c === !1 ? n = n.substring(u + 3) : n = `http://${n.substring(u + 3)}`, n;
45
+ const f = n.indexOf("://");
46
+ return c === !1 ? n = n.substring(f + 3) : n = `http://${n.substring(f + 3)}`, n;
47
47
  }
48
- function w({ format: c, now: n }) {
48
+ function F({ format: c, now: n }) {
49
49
  return n ? t.now(c) : t.datetime(c);
50
50
  }
51
- function T({ min: c, max: n }) {
51
+ function C({ min: c, max: n }) {
52
52
  return t.csentence(c, n);
53
53
  }
54
- function N() {
54
+ function E() {
55
55
  return t.county(!0);
56
56
  }
57
- function P({ dic: c, props: n, columnType: u, multiple: h }) {
57
+ function w({ dic: c, props: n, columnType: f, multiple: h }) {
58
58
  const m = n.value || "value", b = c.length;
59
- if (["checkbox"].includes(u) || h) {
60
- const _ = o({ min: 1, max: b }), v = [];
61
- for (let g = 0; g < _; g++) {
59
+ if (["checkbox"].includes(f) || h) {
60
+ const _ = o({ min: 1, max: b }), y = [];
61
+ for (let $ = 0; $ < _; $++) {
62
62
  let O = !0;
63
63
  for (; O; ) {
64
- const j = o({ min: 0, max: b - 1 }), k = c[j][m];
65
- v.includes(k) || (v.push(k), O = !1);
64
+ const N = o({ min: 0, max: b - 1 }), k = c[N][m];
65
+ y.includes(k) || (y.push(k), O = !1);
66
66
  }
67
67
  }
68
- return v;
68
+ return y;
69
69
  } else {
70
70
  const _ = o({ min: 0, max: b - 1 });
71
71
  return c[_][m];
72
72
  }
73
73
  }
74
- function z() {
75
- Object.keys(e).forEach((c) => {
76
- const n = e[c];
74
+ function T() {
75
+ Object.keys(i).forEach((c) => {
76
+ const n = i[c];
77
77
  if (n.mock && typeof n.mock == "object") {
78
- const u = n.mock;
79
- switch (u.dic = typeof n.dicData == "string" ? i[n.dicData] : n.dicData || [], u.props = n.props || {}, u.columnType = n.type, u.multiple = n.multiple, u.type) {
78
+ const f = n.mock;
79
+ switch (f.dic = typeof n.dicData == "string" ? e[n.dicData] : n.dicData || [], f.props = n.props || {}, f.columnType = n.type, f.multiple = n.multiple, f.type) {
80
80
  case "name":
81
- l[n.prop] = a(u);
81
+ l[n.prop] = a(f);
82
82
  break;
83
83
  case "number":
84
- l[n.prop] = o(u);
84
+ l[n.prop] = o(f);
85
85
  break;
86
86
  case "datetime":
87
- l[n.prop] = w(u);
87
+ l[n.prop] = F(f);
88
88
  break;
89
89
  case "word":
90
- l[n.prop] = T(u);
90
+ l[n.prop] = C(f);
91
91
  break;
92
92
  case "url":
93
- l[n.prop] = d(u);
93
+ l[n.prop] = d(f);
94
94
  break;
95
95
  case "county":
96
- l[n.prop] = N();
96
+ l[n.prop] = E();
97
97
  break;
98
98
  case "dic":
99
- l[n.prop] = P(u);
99
+ l[n.prop] = w(f);
100
100
  break;
101
101
  }
102
102
  } else
103
103
  n.mock instanceof Function && (l[n.prop] = n.mock(r));
104
104
  });
105
105
  }
106
- return z(), l;
106
+ return T(), l;
107
107
  };
108
- var Z = function() {
109
- var e = this, i = e.$createElement, r = e._self._c || i;
110
- return e.display ? r("div", {
111
- class: ["avue-group", {
112
- "avue-group--header": !e.isHeader,
113
- "avue-group__arrow": !e.arrow
114
- }]
115
- }, [e._t("tabs"), r("ElCollapse", {
116
- attrs: {
117
- value: e.text
118
- },
119
- on: {
120
- change: e.handleChange
121
- },
122
- model: {
123
- value: e.activeName,
124
- callback: function(s) {
125
- e.activeName = s;
126
- },
127
- expression: "activeName"
128
- }
129
- }, [r("ElCollapseItem", {
130
- attrs: {
131
- name: 1,
132
- disabled: !e.arrow
133
- },
134
- scopedSlots: e._u([{
135
- key: "title",
136
- fn: function() {
137
- return [r("div", {
138
- staticClass: "avue-group__header"
139
- }, [e._t("header", function() {
140
- return [e.icon ? r("i", {
141
- class: [e.icon, "avue-group__icon"]
142
- }) : e._e(), e.label ? r("h1", {
143
- staticClass: "avue-group__title"
144
- }, [e._v(" " + e._s(e.label) + " ")]) : e._e()];
145
- })], 2)];
146
- },
147
- proxy: !0
148
- }], null, !0)
149
- }, [e._t("default")], 2)], 1)], 2) : e._e();
150
- }, ee = [];
151
- const te = {
108
+ const Q = {
152
109
  name: "FormGroup",
153
110
  props: {
154
111
  arrow: {
@@ -188,97 +145,39 @@ const te = {
188
145
  }
189
146
  },
190
147
  watch: {
191
- text(e) {
192
- this.activeName = [e];
148
+ text(i) {
149
+ this.activeName = [i];
193
150
  }
194
151
  },
195
152
  created() {
196
153
  this.activeName = [this.text];
197
154
  },
198
155
  methods: {
199
- handleChange(e) {
200
- this.$emit("change", e);
156
+ handleChange(i) {
157
+ this.$emit("change", i);
201
158
  }
202
159
  }
203
- }, F = {};
204
- var ie = /* @__PURE__ */ $(
205
- te,
206
- Z,
207
- ee,
160
+ };
161
+ var X = function() {
162
+ var e = this, r = e._self._c;
163
+ return e.display ? r("div", { class: ["avue-group", { "avue-group--header": !e.isHeader, "avue-group__arrow": !e.arrow }] }, [e._t("tabs"), r("ElCollapse", { attrs: { value: e.text }, on: { change: e.handleChange }, model: { value: e.activeName, callback: function(s) {
164
+ e.activeName = s;
165
+ }, expression: "activeName" } }, [r("ElCollapseItem", { attrs: { name: 1, disabled: !e.arrow }, scopedSlots: e._u([{ key: "title", fn: function() {
166
+ return [r("div", { staticClass: "avue-group__header" }, [e._t("header", function() {
167
+ return [e.icon ? r("i", { class: [e.icon, "avue-group__icon"] }) : e._e(), e.label ? r("h1", { staticClass: "avue-group__title" }, [e._v(" " + e._s(e.label) + " ")]) : e._e()];
168
+ })], 2)];
169
+ }, proxy: !0 }], null, !0) }, [e._t("default")], 2)], 1)], 2) : e._e();
170
+ }, Y = [], Z = /* @__PURE__ */ g(
171
+ Q,
172
+ X,
173
+ Y,
208
174
  !1,
209
- re,
175
+ null,
210
176
  null,
211
177
  null,
212
178
  null
213
179
  );
214
- function re(e) {
215
- for (let i in F)
216
- this[i] = F[i];
217
- }
218
- const se = /* @__PURE__ */ function() {
219
- return ie.exports;
220
- }();
221
- var ae = function() {
222
- var e = this, i = e.$createElement, r = e._self._c || i;
223
- return e.formSafe.parentOption.menuBtn !== !1 ? r("ElCol", {
224
- class: ["menu", e.formSafe.menuPosition, "no-print"],
225
- style: e.styleName,
226
- attrs: {
227
- span: e.menuSpan,
228
- md: e.menuSpan
229
- }
230
- }, [r("ElFormItem", {
231
- staticStyle: {
232
- "text-align": "center"
233
- },
234
- attrs: {
235
- "label-width": "0px"
236
- }
237
- }, [e.formSafe.isMock ? r("ElButton", {
238
- attrs: {
239
- type: "primary",
240
- size: e.formSafe.controlSize,
241
- icon: "el-icon-edit-outline",
242
- disabled: e.formSafe.allDisabled
243
- },
244
- on: {
245
- click: e.formSafe.handleMock
246
- }
247
- }, [e._v(" " + e._s(e.formSafe.parentOption.mockText || "模拟") + " ")]) : e._e(), e.formSafe.isPrint ? r("ElButton", {
248
- attrs: {
249
- type: "primary",
250
- size: e.formSafe.controlSize,
251
- icon: "el-icon-printer",
252
- disabled: e.formSafe.allDisabled
253
- },
254
- on: {
255
- click: e.formSafe.handlePrint
256
- }
257
- }, [e._v(" " + e._s(e.formSafe.parentOption.printText || "打印") + " ")]) : e._e(), e.formSafe.parentOption.submitBtn !== !1 ? r("ElButton", {
258
- attrs: {
259
- type: "primary",
260
- size: e.formSafe.controlSize,
261
- icon: e.formSafe.parentOption.submitIcon || "el-icon-check",
262
- loading: e.formSafe.allDisabled
263
- },
264
- on: {
265
- click: e.formSafe.submit
266
- }
267
- }, [e._v(" " + e._s(e.formSafe.parentOption.submitText || "提交") + " ")]) : e._e(), e.formSafe.parentOption.emptyBtn !== !1 ? r("ElButton", {
268
- attrs: {
269
- icon: e.formSafe.parentOption.emptyIcon || "el-icon-delete",
270
- size: e.formSafe.controlSize,
271
- disabled: e.formSafe.allDisabled
272
- },
273
- on: {
274
- click: e.formSafe.resetForm
275
- }
276
- }, [e._v(" " + e._s(e.formSafe.parentOption.emptyText || "清空") + " ")]) : e._e(), e._t("menuForm", null, {
277
- disabled: e.formSafe.allDisabled,
278
- size: e.formSafe.controlSize
279
- })], 2)], 1) : e._e();
280
- }, oe = [];
281
- const ne = {
180
+ const ee = Z.exports, te = {
282
181
  name: "FyFormMenu",
283
182
  inject: ["formSafe"],
284
183
  computed: {
@@ -291,294 +190,25 @@ const ne = {
291
190
  } : {};
292
191
  }
293
192
  }
294
- }, C = {};
295
- var le = /* @__PURE__ */ $(
296
- ne,
297
- ae,
298
- oe,
193
+ };
194
+ var ie = function() {
195
+ var e = this, r = e._self._c;
196
+ return e.formSafe.parentOption.menuBtn !== !1 ? r("ElCol", { class: ["menu", e.formSafe.menuPosition, "no-print"], style: e.styleName, attrs: { span: e.menuSpan, md: e.menuSpan } }, [r("ElFormItem", { staticStyle: { "text-align": "center" }, attrs: { "label-width": "0px" } }, [e.formSafe.isMock ? r("ElButton", { attrs: { type: "primary", size: e.formSafe.controlSize, icon: "el-icon-edit-outline", disabled: e.formSafe.allDisabled }, on: { click: e.formSafe.handleMock } }, [e._v(" " + e._s(e.formSafe.parentOption.mockText || "模拟") + " ")]) : e._e(), e.formSafe.isPrint ? r("ElButton", { attrs: { type: "primary", size: e.formSafe.controlSize, icon: "el-icon-printer", disabled: e.formSafe.allDisabled }, on: { click: e.formSafe.handlePrint } }, [e._v(" " + e._s(e.formSafe.parentOption.printText || "打印") + " ")]) : e._e(), e.formSafe.parentOption.submitBtn !== !1 ? r("ElButton", { attrs: { type: "primary", size: e.formSafe.controlSize, icon: e.formSafe.parentOption.submitIcon || "el-icon-check", loading: e.formSafe.allDisabled }, on: { click: e.formSafe.submit } }, [e._v(" " + e._s(e.formSafe.parentOption.submitText || "提交") + " ")]) : e._e(), e.formSafe.parentOption.emptyBtn !== !1 ? r("ElButton", { attrs: { icon: e.formSafe.parentOption.emptyIcon || "el-icon-delete", size: e.formSafe.controlSize, disabled: e.formSafe.allDisabled }, on: { click: e.formSafe.resetForm } }, [e._v(" " + e._s(e.formSafe.parentOption.emptyText || "清空") + " ")]) : e._e(), e._t("menuForm", null, { disabled: e.formSafe.allDisabled, size: e.formSafe.controlSize })], 2)], 1) : e._e();
197
+ }, re = [], se = /* @__PURE__ */ g(
198
+ te,
199
+ ie,
200
+ re,
299
201
  !1,
300
- pe,
202
+ null,
301
203
  null,
302
204
  null,
303
205
  null
304
206
  );
305
- function pe(e) {
306
- for (let i in C)
307
- this[i] = C[i];
308
- }
309
- const ue = /* @__PURE__ */ function() {
310
- return le.exports;
311
- }();
312
- var fe = function() {
313
- var e = this, i = e.$createElement, r = e._self._c || i;
314
- return r("div", {
315
- class: ["avue-form", {
316
- "avue--detail": e.isDetail
317
- }],
318
- style: {
319
- width: e.setPx(e.parentOption.formWidth, "100%")
320
- }
321
- }, [r("ElForm", {
322
- ref: "form",
323
- attrs: {
324
- "status-icon": e.parentOption.statusIcon,
325
- model: e.form,
326
- "label-suffix": e.labelSuffix,
327
- size: e.$AVUE.formSize || e.controlSize,
328
- "label-position": e.parentOption.labelPosition,
329
- "label-width": e.setPx(e.parentOption.labelWidth, e.labelWidth)
330
- },
331
- nativeOn: {
332
- submit: function(s) {
333
- s.preventDefault();
334
- }
335
- }
336
- }, [r("ElRow", {
337
- class: {
338
- "avue-form__tabs": e.isTabs
339
- },
340
- attrs: {
341
- span: 24
342
- }
343
- }, [e._l(e.columnOption, function(s, p) {
344
- return r("FormGroup", {
345
- key: s.prop,
346
- attrs: {
347
- tabs: e.isTabs,
348
- arrow: s.arrow,
349
- collapse: s.collapse,
350
- display: e.vaildDisplay(s),
351
- icon: s.icon,
352
- index: p,
353
- header: !e.isTabs,
354
- active: e.activeName,
355
- label: s.label
356
- },
357
- on: {
358
- change: e.handleGroupClick
359
- },
360
- scopedSlots: e._u([{
361
- key: "tabs",
362
- fn: function() {
363
- return [e.isTabs && p === 1 ? r("ElTabs", {
364
- staticClass: "avue-form__tabs",
365
- attrs: {
366
- type: e.tabsType
367
- },
368
- on: {
369
- "tab-click": e.handleTabClick
370
- },
371
- model: {
372
- value: e.activeName,
373
- callback: function(t) {
374
- e.activeName = t;
375
- },
376
- expression: "activeName"
377
- }
378
- }, [e._l(e.columnOption, function(t, l) {
379
- return [e.vaildDisplay(t) && l !== 0 ? r("ElTabPane", {
380
- key: l,
381
- attrs: {
382
- name: `${l}`
383
- },
384
- scopedSlots: e._u([{
385
- key: "label",
386
- fn: function() {
387
- return [r("span", [e.getSlotName(t, "H", e.$scopedSlots) ? e._t(e.getSlotName(t, "H"), null, {
388
- column: e.column
389
- }) : [r("i", {
390
- class: t.icon
391
- }, [e._v(" ")]), e._v(" " + e._s(t.label) + " ")]], 2)];
392
- },
393
- proxy: !0
394
- }], null, !0)
395
- }) : e._e()];
396
- })], 2) : e._e()];
397
- },
398
- proxy: !0
399
- }, e.getSlotName(s, "H", e.$scopedSlots) ? {
400
- key: "header",
401
- fn: function() {
402
- return [e._t(e.getSlotName(s, "H"), null, {
403
- column: s
404
- })];
405
- },
406
- proxy: !0
407
- } : null], null, !0)
408
- }, [r("div", {
409
- directives: [{
410
- name: "show",
411
- rawName: "v-show",
412
- value: e.isGroupShow(s, p),
413
- expression: "isGroupShow(item, index)"
414
- }],
415
- class: ["avue-form__group", {
416
- "avue-form__group--flex": s.flex === !1
417
- }]
418
- }, [e._l(s.column, function(t, l) {
419
- return [e.vaildDisplay(t) ? r("ElCol", {
420
- key: l,
421
- class: ["avue-form__row", {
422
- "avue--detail avue--detail__column": e.vaildDetail(t)
423
- }, t.className],
424
- style: {
425
- paddingLeft: e.gutter,
426
- paddingRight: e.gutter
427
- },
428
- attrs: {
429
- span: e.getSpan(t),
430
- md: e.getSpan(t),
431
- sm: t.smSpan || s.smSpan || 12,
432
- xs: t.xsSpan || s.xmSpan || 24,
433
- offset: t.offset || s.offset,
434
- push: t.push || s.push,
435
- pull: t.pull || s.pull
436
- }
437
- }, [r("ElFormItem", {
438
- class: `avue-form__item--${t.labelPosition || s.labelPosition || ""}`,
439
- attrs: {
440
- prop: t.prop,
441
- label: t.label,
442
- rules: t.rules,
443
- "label-position": t.labelPosition || s.labelPosition || e.parentOption.labelPosition,
444
- "label-width": e.getLabelWidth(t, s)
445
- },
446
- scopedSlots: e._u([e.getSlotName(t, "L", e.$scopedSlots) ? {
447
- key: "label",
448
- fn: function() {
449
- return [e._t(e.getSlotName(t, "L"), null, {
450
- column: t,
451
- value: e.form[t.prop],
452
- readonly: t.readonly || e.readonly,
453
- disabled: e.getDisabled(t),
454
- size: t.size || e.controlSize,
455
- dic: e.DIC[t.prop]
456
- })];
457
- },
458
- proxy: !0
459
- } : t.labelTip ? {
460
- key: "label",
461
- fn: function() {
462
- return [r("ElTooltip", {
463
- staticClass: "item",
464
- attrs: {
465
- effect: "dark",
466
- placement: t.labelTipPlacement || "top-start"
467
- },
468
- scopedSlots: e._u([{
469
- key: "content",
470
- fn: function() {
471
- return [r("div", {
472
- domProps: {
473
- innerHTML: e._s(t.labelTip)
474
- }
475
- })];
476
- },
477
- proxy: !0
478
- }], null, !0)
479
- }, [r("i", {
480
- staticClass: "el-icon-info"
481
- })]), r("span", [e._v(" " + e._s(t.label) + e._s(e.labelSuffix))])];
482
- },
483
- proxy: !0
484
- } : null, e.getSlotName(t, "E", e.$scopedSlots) ? {
485
- key: "error",
486
- fn: function(a) {
487
- return [e._t(e.getSlotName(t, "E"), null, null, Object.assign(a, {
488
- column: t,
489
- value: e.form[t.prop],
490
- readonly: e.readonly || t.readonly,
491
- disabled: e.getDisabled(t),
492
- size: t.size || e.controlSize,
493
- dic: e.DIC[t.prop]
494
- }))];
495
- }
496
- } : null], null, !0)
497
- }, [r(e.validTip(t) ? "div" : "elTooltip", {
498
- tag: "Component",
499
- attrs: {
500
- disabled: e.validTip(t),
501
- content: t.tip || e.getPlaceholder(t),
502
- placement: t.tipPlacement
503
- }
504
- }, [e.$scopedSlots[t.prop] ? e._t(t.prop, null, {
505
- value: e.form[t.prop],
506
- column: t,
507
- label: e.form[`$${t.prop}`],
508
- size: t.size || e.controlSize,
509
- readonly: e.readonly || t.readonly,
510
- disabled: e.getDisabled(t),
511
- dic: e.DIC[t.prop]
512
- }) : r("FormTemp", e._b({
513
- ref: t.prop,
514
- refInFor: !0,
515
- attrs: {
516
- column: t,
517
- dic: e.DIC[t.prop],
518
- props: e.parentOption.props,
519
- "props-http": e.parentOption.propsHttp,
520
- disabled: e.getDisabled(t),
521
- readonly: t.readonly || e.readonly,
522
- enter: e.parentOption.enter,
523
- size: t.size || e.controlSize,
524
- "column-slot": e.columnSlot
525
- },
526
- on: {
527
- enter: e.submit,
528
- change: function(a) {
529
- return e.propChange(s.column, t);
530
- }
531
- },
532
- scopedSlots: e._u([e._l(e.getSlotName(t, "T", e.$scopedSlots) ? [t] : [], function(a) {
533
- return {
534
- key: e.getSlotName(t, "T"),
535
- fn: function(o) {
536
- return [e._t(e.getSlotName(a, "T"), null, null, o)];
537
- }
538
- };
539
- }), e._l(e.columnSlot, function(a) {
540
- return {
541
- key: a,
542
- fn: function(o) {
543
- return [e._t(a, null, null, o)];
544
- }
545
- };
546
- })], null, !0),
547
- model: {
548
- value: e.form[t.prop],
549
- callback: function(a) {
550
- e.$set(e.form, t.prop, a);
551
- },
552
- expression: "form[column.prop]"
553
- }
554
- }, "FormTemp", e.uploadFun(t), !1))], 2)], 1)], 1) : e._e(), e.vaildDisplay(t) && t.row && t.span !== 24 && t.count ? r("div", {
555
- key: `line${l}`,
556
- staticClass: "avue-form__line",
557
- style: {
558
- width: `${t.count / 24 * 100}%`
559
- }
560
- }) : e._e()];
561
- }), !e.isDetail && !e.isMenu ? r("FyFormMenu", {
562
- scopedSlots: e._u([{
563
- key: "menuForm",
564
- fn: function(t) {
565
- return [e._t("menuForm", null, null, t)];
566
- }
567
- }], null, !0)
568
- }) : e._e()], 2)]);
569
- }), !e.isDetail && e.isMenu ? r("FyFormMenu", {
570
- scopedSlots: e._u([{
571
- key: "menuForm",
572
- fn: function(s) {
573
- return [e._t("menuForm", null, null, s)];
574
- }
575
- }], null, !0)
576
- }) : e._e()], 2)], 1)], 1);
577
- }, ce = [];
578
- const de = {
207
+ const ae = se.exports;
208
+ const oe = {
579
209
  name: "FyForm",
580
- components: { FormTemp: B, FyFormMenu: ue, FormGroup: se },
581
- mixins: [M],
210
+ components: { FormTemp: P, FyFormMenu: ae, FormGroup: ee },
211
+ mixins: [B],
582
212
  provide() {
583
213
  return {
584
214
  formSafe: this
@@ -622,7 +252,7 @@ const de = {
622
252
  },
623
253
  computed: {
624
254
  columnSlot() {
625
- return Object.keys(this.$scopedSlots).filter((e) => !this.propOption.map((i) => i.prop).includes(e));
255
+ return Object.keys(this.$scopedSlots).filter((i) => !this.propOption.map((e) => e.prop).includes(i));
626
256
  },
627
257
  labelSuffix() {
628
258
  return this.parentOption.labelSuffix || ":";
@@ -646,7 +276,7 @@ const de = {
646
276
  return this.boxType === "view";
647
277
  },
648
278
  gutter() {
649
- return y((this.parentOption.gutter || 10) / 2);
279
+ return v((this.parentOption.gutter || 10) / 2);
650
280
  },
651
281
  detail() {
652
282
  return this.parentOption.detail;
@@ -664,35 +294,35 @@ const de = {
664
294
  return this.columnOption.length;
665
295
  },
666
296
  dynamicOption() {
667
- const e = [];
668
- return this.propOption.forEach((i) => {
669
- i.type === "dynamic" && this.vaildDisplay(i) && e.push(i);
670
- }), e;
297
+ const i = [];
298
+ return this.propOption.forEach((e) => {
299
+ e.type === "dynamic" && this.vaildDisplay(e) && i.push(e);
300
+ }), i;
671
301
  },
672
302
  propOption() {
673
- const e = [];
674
- return this.columnOption.forEach((i) => {
675
- i.display !== !1 && i.column.forEach((r) => {
676
- e.push(r);
303
+ const i = [];
304
+ return this.columnOption.forEach((e) => {
305
+ e.display !== !1 && e.column.forEach((r) => {
306
+ i.push(r);
677
307
  });
678
- }), e;
308
+ }), i;
679
309
  },
680
310
  parentOption() {
681
311
  return this.tableOption || {};
682
312
  },
683
313
  columnOption() {
684
- const e = this.tableOption.column || [], i = x(this.tableOption.group) || [], r = this.tableOption.footer || [];
685
- return i.unshift({
314
+ const i = this.tableOption.column || [], e = x(this.tableOption.group) || [], r = this.tableOption.footer || [];
315
+ return e.unshift({
686
316
  header: !1,
687
- column: e
688
- }), r.length !== 0 && i.push({
317
+ column: i
318
+ }), r.length !== 0 && e.push({
689
319
  header: !1,
690
320
  column: r
691
- }), i.forEach((s) => {
321
+ }), e.forEach((s) => {
692
322
  s.column = s.column || [], s.column.forEach((p, t) => {
693
- p.display !== !1 && !this.isMobile && (p = H(p, this.itemSpanDefault, t === 0));
694
- }), s.column = U(s.column), s.column = s.column.sort((p, t) => (t.order || 0) - (p.order || 0));
695
- }), i;
323
+ p.display !== !1 && !this.isMobile && (p = W(p, this.itemSpanDefault, t === 0));
324
+ }), s.column = G(s.column), s.column = s.column.sort((p, t) => (t.order || 0) - (p.order || 0));
325
+ }), e;
696
326
  },
697
327
  menuPosition: function() {
698
328
  return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
@@ -737,8 +367,8 @@ const de = {
737
367
  immediate: !0
738
368
  },
739
369
  allDisabled: {
740
- handler(e) {
741
- this.$emit("update:status", e);
370
+ handler(i) {
371
+ this.$emit("update:status", i);
742
372
  },
743
373
  deep: !0,
744
374
  immediate: !0
@@ -750,118 +380,118 @@ const de = {
750
380
  });
751
381
  },
752
382
  beforeDestroy() {
753
- Object.keys(this.formBind).forEach((e) => {
754
- this.formBind[e].forEach((i) => {
755
- i();
383
+ Object.keys(this.formBind).forEach((i) => {
384
+ this.formBind[i].forEach((e) => {
385
+ e();
756
386
  });
757
387
  });
758
388
  },
759
389
  methods: {
760
- setPx: y,
390
+ setPx: v,
761
391
  deepClone: x,
762
- getComponent: q,
763
- getPlaceholder: K,
764
- uploadFun: L,
765
- getDisabled(e) {
766
- return this.vaildDetail(e) || this.isDetail || this.vaildDisabled(e) || this.allDisabled;
392
+ getComponent: R,
393
+ getPlaceholder: H,
394
+ uploadFun: j,
395
+ getDisabled(i) {
396
+ return this.vaildDetail(i) || this.isDetail || this.vaildDisabled(i) || this.allDisabled;
767
397
  },
768
- getSpan(e) {
769
- return e.span || this.parentOption.span || this.itemSpanDefault;
398
+ getSpan(i) {
399
+ return i.span || this.parentOption.span || this.itemSpanDefault;
770
400
  },
771
- isGroupShow(e, i) {
772
- return this.isTabs ? `${i}` === this.activeName || i === 0 : !0;
401
+ isGroupShow(i, e) {
402
+ return this.isTabs ? `${e}` === this.activeName || e === 0 : !0;
773
403
  },
774
404
  // 初始化表单
775
405
  dataFormat() {
776
- const e = J(this.propOption).tableForm, i = this.value, r = {};
777
- Object.entries(Object.assign(e, i)).forEach((s) => {
406
+ const i = U(this.propOption).tableForm, e = this.value, r = {};
407
+ Object.entries(Object.assign(i, e)).forEach((s) => {
778
408
  const p = s[0], t = s[1];
779
- f(i[p]) ? r[p] = t : r[p] = i[p];
409
+ u(e[p]) ? r[p] = t : r[p] = e[p];
780
410
  }), this.$set(this, "form", r), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
781
411
  this.formCreate = !0, this.clearValidate();
782
412
  });
783
413
  },
784
414
  setControl() {
785
- this.propOption.forEach((e) => {
786
- const i = e.prop, r = e.bind, s = e.control;
787
- if (!this.formBind[i]) {
415
+ this.propOption.forEach((i) => {
416
+ const e = i.prop, r = i.bind, s = i.control;
417
+ if (!this.formBind[e]) {
788
418
  const p = [];
789
419
  if (r) {
790
- const t = this.$watch(`form.${i}`, (a, o) => {
791
- a !== o && V(this.form, r, a);
420
+ const t = this.$watch(`form.${e}`, (a, o) => {
421
+ a !== o && I(this.form, r, a);
792
422
  }), l = this.$watch(`form.${r}`, (a, o) => {
793
- a !== o && this.$set(this.form, i, a);
423
+ a !== o && this.$set(this.form, e, a);
794
424
  });
795
- p.push(t), p.push(l), this.$set(this.form, i, A(this.form, r));
425
+ p.push(t), p.push(l), this.$set(this.form, e, L(this.form, r));
796
426
  }
797
427
  if (s) {
798
428
  const t = () => {
799
- const a = s(this.form[e.prop], this.form) || {};
429
+ const a = s(this.form[i.prop], this.form) || {};
800
430
  Object.keys(a).forEach((o) => {
801
431
  const d = Object.assign(this.objectOption[o] || {}, a[o]);
802
432
  this.$set(this.objectOption, o, d), a[o].dicData && (this.DIC[o] = a[o].dicData);
803
433
  });
804
- }, l = this.$watch(`form.${i}`, () => {
434
+ }, l = this.$watch(`form.${e}`, () => {
805
435
  t();
806
436
  });
807
437
  p.push(l), t();
808
438
  }
809
- this.formBind[i] = p;
439
+ this.formBind[e] = p;
810
440
  }
811
441
  });
812
442
  },
813
443
  setForm() {
814
- Object.keys(this.value).forEach((e) => {
815
- this.$set(this.form, e, this.value[e]);
444
+ Object.keys(this.value).forEach((i) => {
445
+ this.$set(this.form, i, this.value[i]);
816
446
  });
817
447
  },
818
448
  setVal() {
819
449
  this.$emit("input", this.form), this.$emit("change", this.form);
820
450
  },
821
451
  setLabel() {
822
- this.tableOption.filterNull === !0 && (this.form = S(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = S(this.form, ["$"], !1) : this.propOption.forEach((e) => {
823
- const i = this.DIC[e.prop];
824
- if (f(i))
452
+ this.tableOption.filterNull === !0 && (this.form = S(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = S(this.form, ["$"], !1) : this.propOption.forEach((i) => {
453
+ const e = this.DIC[i.prop];
454
+ if (u(e))
825
455
  return;
826
- const r = I(this.form, e, this.tableOption, i);
827
- r ? this.$set(this.form, `$${e.prop}`, r) : this.$delete(this.form, `$${e.prop}`);
456
+ const r = z(this.form, i, this.tableOption, e);
457
+ r ? this.$set(this.form, `$${i.prop}`, r) : this.$delete(this.form, `$${i.prop}`);
828
458
  });
829
459
  },
830
- handleGroupClick(e) {
831
- this.$emit("tab-click", e);
460
+ handleGroupClick(i) {
461
+ this.$emit("tab-click", i);
832
462
  },
833
- handleTabClick(e, i) {
834
- this.$emit("tab-click", e, i);
463
+ handleTabClick(i, e) {
464
+ this.$emit("tab-click", i, e);
835
465
  },
836
- getLabelWidth(e, i) {
466
+ getLabelWidth(i, e) {
837
467
  let r;
838
- return f(e.labelWidth) ? f(i.labelWidth) ? r = this.parentOption.labelWidth : r = i.labelWidth : r = e.labelWidth, y(r, this.labelWidth);
468
+ return u(i.labelWidth) ? u(e.labelWidth) ? r = this.parentOption.labelWidth : r = e.labelWidth : r = i.labelWidth, v(r, this.labelWidth);
839
469
  },
840
470
  // 对部分表单字段进行校验的方法
841
- validateField(e) {
842
- return this.$refs.form.validateField(e);
471
+ validateField(i) {
472
+ return this.$refs.form.validateField(i);
843
473
  },
844
- validTip(e) {
845
- return !e.tip || e.type === "upload";
474
+ validTip(i) {
475
+ return !i.tip || i.type === "upload";
846
476
  },
847
- getPropRef(e) {
848
- return this.$refs[e][0];
477
+ getPropRef(i) {
478
+ return this.$refs[i][0];
849
479
  },
850
- handleChange(e, i) {
480
+ handleChange(i, e) {
851
481
  this.$nextTick(() => {
852
- const r = i.cascader, s = r.join(",");
482
+ const r = e.cascader, s = r.join(",");
853
483
  r.forEach((p) => {
854
- const t = p, l = this.form[i.prop], a = this.findObject(e, t);
855
- f(a) || (this.formList.includes(s) && r.forEach((o) => {
484
+ const t = p, l = this.form[e.prop], a = this.findObject(i, t);
485
+ u(a) || (this.formList.includes(s) && r.forEach((o) => {
856
486
  this.form[o] = "", this.$set(this.DIC, o, []);
857
- }), !(f(r) || f(l) || f(a)) && Q({
487
+ }), !(u(r) || u(l) || u(a)) && q({
858
488
  column: a,
859
489
  value: l,
860
490
  form: this.form
861
491
  }).then((o) => {
862
492
  this.formList.includes(s) || this.formList.push(s);
863
493
  const d = o || [];
864
- this.$set(this.DIC, t, d), !f(d) && !f(d) && !f(a.cascaderIndex) && f(this.form[t]) && (this.form[t] = d[a.cascaderIndex][(a.props || {}).value || W.value]);
494
+ this.$set(this.DIC, t, d), !u(d) && !u(d) && !u(a.cascaderIndex) && u(this.form[t]) && (this.form[t] = d[a.cascaderIndex][(a.props || {}).value || V.value]);
865
495
  }));
866
496
  });
867
497
  });
@@ -869,87 +499,87 @@ const de = {
869
499
  handlePrint() {
870
500
  this.$Print(this.$el);
871
501
  },
872
- propChange(e, i) {
873
- i.cascader && this.handleChange(e, i);
502
+ propChange(i, e) {
503
+ e.cascader && this.handleChange(i, e);
874
504
  },
875
505
  handleMock() {
876
- this.isMock && (this.columnOption.forEach((e) => {
877
- const i = Y(e.column, this.DIC, this.form, this.isMock);
878
- f(i) || Object.keys(i).forEach((r) => {
879
- this.form[r] = i[r];
506
+ this.isMock && (this.columnOption.forEach((i) => {
507
+ const e = J(i.column, this.DIC, this.form, this.isMock);
508
+ u(e) || Object.keys(e).forEach((r) => {
509
+ this.form[r] = e[r];
880
510
  });
881
511
  }), this.$nextTick(() => {
882
512
  this.clearValidate(), this.$emit("mock-change", this.form);
883
513
  }));
884
514
  },
885
- vaildDetail(e) {
886
- let i;
515
+ vaildDetail(i) {
516
+ let e;
887
517
  if (this.detail)
888
518
  return !1;
889
- if (!f(e.detail))
890
- i = "detail";
519
+ if (!u(i.detail))
520
+ e = "detail";
891
521
  else if (this.isAdd)
892
- i = "addDetail";
522
+ e = "addDetail";
893
523
  else if (this.isEdit)
894
- i = "editDetail";
524
+ e = "editDetail";
895
525
  else if (this.isView)
896
526
  return !1;
897
- return i ? e[i] === !0 : !1;
527
+ return e ? i[e] === !0 : !1;
898
528
  },
899
529
  // 验证表单是否禁止
900
- vaildDisabled(e) {
901
- let i;
530
+ vaildDisabled(i) {
531
+ let e;
902
532
  if (this.disabled)
903
533
  return !0;
904
- if (!f(e.disabled))
905
- i = "disabled";
534
+ if (!u(i.disabled))
535
+ e = "disabled";
906
536
  else if (this.isAdd)
907
- i = "addDisabled";
537
+ e = "addDisabled";
908
538
  else if (this.isEdit)
909
- i = "editDisabled";
539
+ e = "editDisabled";
910
540
  else if (this.isView)
911
541
  return !0;
912
- return i ? e[i] === !0 : !1;
542
+ return e ? i[e] === !0 : !1;
913
543
  },
914
544
  // 验证表单是否显隐
915
- vaildDisplay(e) {
916
- let i;
917
- return f(e.display) ? this.isAdd ? i = "addDisplay" : this.isEdit ? i = "editDisplay" : this.isView && (i = "viewDisplay") : i = "display", i ? G(e[i], !0) : !0;
545
+ vaildDisplay(i) {
546
+ let e;
547
+ return u(i.display) ? this.isAdd ? e = "addDisplay" : this.isEdit ? e = "editDisplay" : this.isView && (e = "viewDisplay") : e = "display", e ? M(i[e], !0) : !0;
918
548
  },
919
- clearValidate(e) {
549
+ clearValidate(i) {
920
550
  return D(this, null, function* () {
921
- var i;
922
- (i = this.$refs.form) == null || i.clearValidate(e);
551
+ var e;
552
+ (e = this.$refs.form) == null || e.clearValidate(i);
923
553
  });
924
554
  },
925
555
  validateCellForm() {
926
- return new Promise((e) => {
927
- this.$refs.form.validate((i, r) => {
928
- e(r);
556
+ return new Promise((i) => {
557
+ this.$refs.form.validate((e, r) => {
558
+ i(r);
929
559
  });
930
560
  });
931
561
  },
932
- validate(e) {
933
- this.$refs.form.validate((i, r) => {
562
+ validate(i) {
563
+ this.$refs.form.validate((e, r) => {
934
564
  const s = [], p = [], t = {};
935
565
  this.dynamicOption.forEach((l) => {
936
566
  const a = l.children.type === "form";
937
- p.push(l.prop), a ? f(this.$refs[l.prop][0].$refs.temp.$refs.main) || this.$refs[l.prop][0].$refs.temp.$refs.main.forEach((o) => {
567
+ p.push(l.prop), a ? u(this.$refs[l.prop][0].$refs.temp.$refs.main) || this.$refs[l.prop][0].$refs.temp.$refs.main.forEach((o) => {
938
568
  s.push(o.validateCellForm());
939
569
  }) : s.push(this.$refs[l.prop][0].$refs.temp.$refs.main.validateCellForm());
940
570
  }), Promise.all(s).then((l) => {
941
571
  l.forEach((o, d) => {
942
- f(o) || (t[p[d]] = o);
572
+ u(o) || (t[p[d]] = o);
943
573
  });
944
574
  const a = Object.assign(t, r);
945
- f(a) ? (this.show(), e(!0, this.hide)) : e(!1, this.hide, a);
575
+ u(a) ? (this.show(), i(!0, this.hide)) : i(!1, this.hide, a);
946
576
  });
947
577
  });
948
578
  },
949
- resetForm(e = !0) {
950
- if (e) {
951
- const i = this.propOption.map((r) => r.prop);
952
- this.form = R(this.form, i, (this.tableOption.filterParams || []).concat([this.rowKey]));
579
+ resetForm(i = !0) {
580
+ if (i) {
581
+ const e = this.propOption.map((r) => r.prop);
582
+ this.form = A(this.form, e, (this.tableOption.filterParams || []).concat([this.rowKey]));
953
583
  }
954
584
  this.$nextTick(() => {
955
585
  this.clearValidate(), this.$emit("reset-change");
@@ -965,29 +595,82 @@ const de = {
965
595
  this.allDisabled = !1;
966
596
  },
967
597
  submit() {
968
- this.validate((e, i) => {
969
- e ? this.$emit("submit", S(this.form, ["$"]), this.hide) : this.$emit("error", i);
598
+ this.validate((i, e) => {
599
+ i ? this.$emit("submit", S(this.form, ["$"]), this.hide) : this.$emit("error", e);
970
600
  });
971
601
  }
972
602
  }
973
- }, E = {};
974
- var he = /* @__PURE__ */ $(
975
- de,
976
- fe,
977
- ce,
603
+ };
604
+ var ne = function() {
605
+ var e = this, r = e._self._c;
606
+ return r("div", { class: ["avue-form", { "avue--detail": e.isDetail }], style: { width: e.setPx(e.parentOption.formWidth, "100%") } }, [r("ElForm", { ref: "form", attrs: { "status-icon": e.parentOption.statusIcon, model: e.form, "label-suffix": e.labelSuffix, size: e.$AVUE.formSize || e.controlSize, "label-position": e.parentOption.labelPosition, "label-width": e.setPx(e.parentOption.labelWidth, e.labelWidth) }, nativeOn: { submit: function(s) {
607
+ s.preventDefault();
608
+ } } }, [r("ElRow", { class: { "avue-form__tabs": e.isTabs }, attrs: { span: 24 } }, [e._l(e.columnOption, function(s, p) {
609
+ return r("FormGroup", { key: s.prop, attrs: { tabs: e.isTabs, arrow: s.arrow, collapse: s.collapse, display: e.vaildDisplay(s), icon: s.icon, index: p, header: !e.isTabs, active: e.activeName, label: s.label }, on: { change: e.handleGroupClick }, scopedSlots: e._u([{ key: "tabs", fn: function() {
610
+ return [e.isTabs && p === 1 ? r("ElTabs", { staticClass: "avue-form__tabs", attrs: { type: e.tabsType }, on: { "tab-click": e.handleTabClick }, model: { value: e.activeName, callback: function(t) {
611
+ e.activeName = t;
612
+ }, expression: "activeName" } }, [e._l(e.columnOption, function(t, l) {
613
+ return [e.vaildDisplay(t) && l !== 0 ? r("ElTabPane", { key: l, attrs: { name: `${l}` }, scopedSlots: e._u([{ key: "label", fn: function() {
614
+ return [r("span", [e.getSlotName(t, "H", e.$scopedSlots) ? e._t(e.getSlotName(t, "H"), null, { column: e.column }) : [r("i", { class: t.icon }, [e._v(" ")]), e._v(" " + e._s(t.label) + " ")]], 2)];
615
+ }, proxy: !0 }], null, !0) }) : e._e()];
616
+ })], 2) : e._e()];
617
+ }, proxy: !0 }, e.getSlotName(s, "H", e.$scopedSlots) ? { key: "header", fn: function() {
618
+ return [e._t(e.getSlotName(s, "H"), null, { column: s })];
619
+ }, proxy: !0 } : null], null, !0) }, [r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isGroupShow(s, p), expression: "isGroupShow(item, index)" }], class: ["avue-form__group", { "avue-form__group--flex": s.flex === !1 }] }, [e._l(s.column, function(t, l) {
620
+ return [e.vaildDisplay(t) ? r("ElCol", { key: l, class: [
621
+ "avue-form__row",
622
+ { "avue--detail avue--detail__column": e.vaildDetail(t) },
623
+ t.className
624
+ ], style: { paddingLeft: e.gutter, paddingRight: e.gutter }, attrs: { span: e.getSpan(t), md: e.getSpan(t), sm: t.smSpan || s.smSpan || 12, xs: t.xsSpan || s.xmSpan || 24, offset: t.offset || s.offset, push: t.push || s.push, pull: t.pull || s.pull } }, [r("ElFormItem", { class: `avue-form__item--${t.labelPosition || s.labelPosition || ""}`, attrs: { prop: t.prop, label: t.label, rules: t.rules, "label-position": t.labelPosition || s.labelPosition || e.parentOption.labelPosition, "label-width": e.getLabelWidth(t, s) }, scopedSlots: e._u([e.getSlotName(t, "L", e.$scopedSlots) ? { key: "label", fn: function() {
625
+ return [e._t(e.getSlotName(t, "L"), null, { column: t, value: e.form[t.prop], readonly: t.readonly || e.readonly, disabled: e.getDisabled(t), size: t.size || e.controlSize, dic: e.DIC[t.prop] })];
626
+ }, proxy: !0 } : t.labelTip ? { key: "label", fn: function() {
627
+ return [r("ElTooltip", { staticClass: "item", attrs: { effect: "dark", placement: t.labelTipPlacement || "top-start" }, scopedSlots: e._u([{ key: "content", fn: function() {
628
+ return [r("div", { domProps: { innerHTML: e._s(t.labelTip) } })];
629
+ }, proxy: !0 }], null, !0) }, [r("i", { staticClass: "el-icon-info" })]), r("span", [e._v(" " + e._s(t.label) + e._s(e.labelSuffix))])];
630
+ }, proxy: !0 } : null, e.getSlotName(t, "E", e.$scopedSlots) ? { key: "error", fn: function(a) {
631
+ return [e._t(
632
+ e.getSlotName(t, "E"),
633
+ null,
634
+ null,
635
+ Object.assign(a, {
636
+ column: t,
637
+ value: e.form[t.prop],
638
+ readonly: e.readonly || t.readonly,
639
+ disabled: e.getDisabled(t),
640
+ size: t.size || e.controlSize,
641
+ dic: e.DIC[t.prop]
642
+ })
643
+ )];
644
+ } } : null], null, !0) }, [r(e.validTip(t) ? "div" : "elTooltip", { tag: "Component", attrs: { disabled: e.validTip(t), content: t.tip || e.getPlaceholder(t), placement: t.tipPlacement } }, [e.$scopedSlots[t.prop] ? e._t(t.prop, null, { value: e.form[t.prop], column: t, label: e.form[`$${t.prop}`], size: t.size || e.controlSize, readonly: e.readonly || t.readonly, disabled: e.getDisabled(t), dic: e.DIC[t.prop] }) : r("FormTemp", e._b({ ref: t.prop, refInFor: !0, attrs: { column: t, dic: e.DIC[t.prop], props: e.parentOption.props, "props-http": e.parentOption.propsHttp, disabled: e.getDisabled(t), readonly: t.readonly || e.readonly, enter: e.parentOption.enter, size: t.size || e.controlSize, "column-slot": e.columnSlot }, on: { enter: e.submit, change: function(a) {
645
+ return e.propChange(s.column, t);
646
+ } }, scopedSlots: e._u([e._l(e.getSlotName(t, "T", e.$scopedSlots) ? [t] : [], function(a) {
647
+ return { key: e.getSlotName(t, "T"), fn: function(o) {
648
+ return [e._t(e.getSlotName(a, "T"), null, null, o)];
649
+ } };
650
+ }), e._l(e.columnSlot, function(a) {
651
+ return { key: a, fn: function(o) {
652
+ return [e._t(a, null, null, o)];
653
+ } };
654
+ })], null, !0), model: { value: e.form[t.prop], callback: function(a) {
655
+ e.$set(e.form, t.prop, a);
656
+ }, expression: "form[column.prop]" } }, "FormTemp", e.uploadFun(t), !1))], 2)], 1)], 1) : e._e(), e.vaildDisplay(t) && t.row && t.span !== 24 && t.count ? r("div", { key: `line${l}`, staticClass: "avue-form__line", style: { width: `${t.count / 24 * 100}%` } }) : e._e()];
657
+ }), !e.isDetail && !e.isMenu ? r("FyFormMenu", { scopedSlots: e._u([{ key: "menuForm", fn: function(t) {
658
+ return [e._t("menuForm", null, null, t)];
659
+ } }], null, !0) }) : e._e()], 2)]);
660
+ }), !e.isDetail && e.isMenu ? r("FyFormMenu", { scopedSlots: e._u([{ key: "menuForm", fn: function(s) {
661
+ return [e._t("menuForm", null, null, s)];
662
+ } }], null, !0) }) : e._e()], 2)], 1)], 1);
663
+ }, le = [], pe = /* @__PURE__ */ g(
664
+ oe,
665
+ ne,
666
+ le,
978
667
  !1,
979
- me,
668
+ null,
980
669
  null,
981
670
  null,
982
671
  null
983
672
  );
984
- function me(e) {
985
- for (let i in E)
986
- this[i] = E[i];
987
- }
988
- const De = /* @__PURE__ */ function() {
989
- return he.exports;
990
- }();
673
+ const ve = pe.exports;
991
674
  export {
992
- De as default
675
+ ve as default
993
676
  };