@web-utils/component 2.70.0 → 3.0.1

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 (189) hide show
  1. package/address-input/index.mjs +16 -14
  2. package/awesome-button/index.mjs +30 -29
  3. package/card/index.mjs +42 -40
  4. package/carousel/index.mjs +27 -25
  5. package/chat/index.mjs +70 -59
  6. package/chunk-file-uploader/index.mjs +594 -35
  7. package/chunk-file-uploader/style.css +1 -1
  8. package/chunks/CountUp.f1a19f35.mjs +124 -0
  9. package/chunks/CountUp.vue_vue_type_template_lang.1f68c96e.mjs +8 -0
  10. package/chunks/EasyPopup.vue_vue_type_style_index_0_lang.89350bda.mjs +32 -0
  11. package/chunks/EditableTree.vue_vue_type_style_index_0_lang.5dba9f89.mjs +356 -0
  12. package/chunks/ElementDialog.d8f3105c.mjs +211 -0
  13. package/chunks/ElementDialog.vue_vue_type_style_index_0_lang.57cb8e07.mjs +95 -0
  14. package/chunks/EmptyView.e2430422.mjs +51 -0
  15. package/chunks/EmptyView.vue_vue_type_style_index_0_lang.ffa84770.mjs +23 -0
  16. package/chunks/FlowNode.vue_vue_type_template_lang.662bdcfa.mjs +37 -0
  17. package/chunks/FormInput.vue_vue_type_template_lang.3cb79386.mjs +65 -0
  18. package/chunks/FormItem.2920ac0c.mjs +45 -0
  19. package/chunks/FormItem.vue_vue_type_style_index_0_lang.970bd712.mjs +258 -0
  20. package/chunks/FormItemGroup.41daddb6.mjs +64 -0
  21. package/chunks/FormItemGroup.vue_vue_type_style_index_0_lang.b588a8ea.mjs +155 -0
  22. package/chunks/FyCurd.8acd2983.mjs +548 -0
  23. package/chunks/FyCurd.vue_vue_type_style_index_0_lang.4fbd4b30.mjs +2945 -0
  24. package/chunks/FyDate.vue_vue_type_style_index_0_lang.429c03e3.mjs +47 -0
  25. package/chunks/FyDynamic.vue_vue_type_style_index_0_lang.304417ce.mjs +151 -0
  26. package/chunks/FyEmpty.vue_vue_type_style_index_0_lang.fc8bd24c.mjs +22 -0
  27. package/chunks/FyForm.0294e494.mjs +439 -0
  28. package/chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs +737 -0
  29. package/chunks/FyInput.vue_vue_type_template_lang.d2c56811.mjs +93 -0
  30. package/chunks/FyInputColor.vue_vue_type_template_lang.6eca0ddd.mjs +56 -0
  31. package/chunks/FyInputIcon.vue_vue_type_style_index_0_lang.11a6a221.mjs +158 -0
  32. package/chunks/FyRate.vue_vue_type_style_index_0_lang.82174185.mjs +39 -0
  33. package/chunks/FySelect.vue_vue_type_style_index_0_lang.5f0f3244.mjs +102 -0
  34. package/chunks/FyTabs.vue_vue_type_template_lang.66af5ac9.mjs +41 -0
  35. package/chunks/HighlightJS.vue_vue_type_style_index_0_lang.fefeaa3b.mjs +15 -0
  36. package/chunks/IconTemp.42c48e1f.mjs +32 -0
  37. package/chunks/IconTemp.vue_vue_type_style_index_0_lang.a0777b31.mjs +23 -0
  38. package/chunks/InputNumber.vue_vue_type_style_index_0_lang.18046bd3.mjs +172 -0
  39. package/chunks/LoadingView.vue_vue_type_style_index_0_lang.4c3fff2a.mjs +23 -0
  40. package/chunks/NavBar.vue_vue_type_style_index_0_lang.e21b57f3.mjs +21 -0
  41. package/chunks/Page.81f4b8d9.mjs +32 -0
  42. package/chunks/Page.vue_vue_type_style_index_0_lang.cb4f9bf2.mjs +13 -0
  43. package/chunks/PageHeader.vue_vue_type_style_index_0_lang.3bcca5aa.mjs +26 -0
  44. package/chunks/PageSkeleton.vue_vue_type_style_index_0_lang.8621381f.mjs +88 -0
  45. package/chunks/PageableTable.333cbdc1.mjs +335 -0
  46. package/chunks/PageableTable.vue_vue_type_style_index_0_lang.fd89fb43.mjs +148 -0
  47. package/chunks/ResizeObserver.60f728f0.mjs +54 -0
  48. package/chunks/ResizeObserver.vue_vue_type_style_index_0_lang.7079029c.mjs +13 -0
  49. package/chunks/TableColumn.8503272e.mjs +106 -0
  50. package/chunks/Toolbar.5c539dbb.mjs +24 -0
  51. package/chunks/Toolbar.vue_vue_type_style_index_0_lang.7594243c.mjs +275 -0
  52. package/chunks/ToolbarButton.vue_vue_type_style_index_0_lang.e2cb14ba.mjs +31 -0
  53. package/chunks/XInputTag.vue_vue_type_style_index_0_lang.7ad045b3.mjs +74 -0
  54. package/chunks/confirmable-mixin.26e1d0e0.mjs +197 -0
  55. package/chunks/{dataformat.f995e2f9.mjs → dataformat.816df805.mjs} +5 -5
  56. package/chunks/{dic.eaac0823.mjs → dic.3b4ba802.mjs} +40 -40
  57. package/chunks/{event.b5d855dd.mjs → event.4377230d.mjs} +2 -2
  58. package/chunks/{index.57f871af.mjs → index.d91bd77a.mjs} +7 -7
  59. package/chunks/{init.47f219b4.mjs → init.f0a03127.mjs} +2 -2
  60. package/chunks/{util.ae730cde.mjs → util.7844e2c2.mjs} +21 -21
  61. package/color-picker/index.mjs +200 -32
  62. package/confirm-button/index.mjs +1 -1
  63. package/confirmable/index.mjs +1 -1
  64. package/count-up/index.mjs +14 -17
  65. package/data-box/index.mjs +36 -33
  66. package/data-card/index.mjs +35 -33
  67. package/data-cardtext/index.mjs +29 -27
  68. package/data-display/index.mjs +37 -34
  69. package/data-icons/index.mjs +32 -29
  70. package/data-imgtext/index.mjs +30 -27
  71. package/data-operatext/index.mjs +41 -39
  72. package/data-panel/index.mjs +39 -36
  73. package/data-pay/index.mjs +26 -22
  74. package/data-price/index.mjs +34 -32
  75. package/data-progress/index.mjs +32 -28
  76. package/data-rotate/index.mjs +38 -35
  77. package/data-table-picker/index.mjs +25 -22
  78. package/data-tabs/index.mjs +35 -32
  79. package/dialog-form/index.mjs +41 -32
  80. package/dynamic-table/index.mjs +47 -42
  81. package/easy-popup/index.mjs +29 -56
  82. package/editable-progress/index.mjs +16 -14
  83. package/editable-tree/index.mjs +129 -476
  84. package/egd-collapse-item/index.mjs +1 -2
  85. package/element-dialog/index.mjs +37 -126
  86. package/empty-view/index.mjs +13 -31
  87. package/flex-column/index.mjs +1 -1
  88. package/flex-item/index.mjs +1 -1
  89. package/flex-row/index.mjs +1 -1
  90. package/flow/index.mjs +105 -40
  91. package/flow-designer/index.mjs +1190 -1114
  92. package/flow-node/index.mjs +15 -47
  93. package/flow-viewer/index.mjs +167 -78
  94. package/form-block/index.mjs +24 -22
  95. package/form-cascader/index.mjs +29 -29
  96. package/form-checkbox-group/index.mjs +76 -31
  97. package/form-date-picker/index.mjs +21 -20
  98. package/form-holder/index.mjs +16 -15
  99. package/form-input/index.mjs +30 -88
  100. package/form-input-email/index.mjs +28 -28
  101. package/form-input-id-card/index.mjs +37 -37
  102. package/form-input-number/index.mjs +219 -59
  103. package/form-input-phone-number/index.mjs +25 -25
  104. package/form-input-tag/index.mjs +160 -38
  105. package/form-input-time/index.mjs +23 -23
  106. package/form-item/index.mjs +15 -144
  107. package/form-item-group/index.mjs +15 -163
  108. package/form-radio-group/index.mjs +39 -38
  109. package/form-select/index.mjs +33 -32
  110. package/form-switch/index.mjs +26 -26
  111. package/form-textarea/index.mjs +26 -26
  112. package/form-view/index.mjs +46 -42
  113. package/fy-array/index.mjs +65 -61
  114. package/fy-cascader/index.mjs +14 -13
  115. package/fy-checkbox/index.mjs +37 -32
  116. package/fy-code/index.mjs +11 -14
  117. package/fy-curd/index.mjs +206 -2795
  118. package/fy-date/index.mjs +16 -57
  119. package/fy-draggable/index.mjs +21 -20
  120. package/fy-dynamic/index.mjs +64 -207
  121. package/fy-empty/index.mjs +12 -29
  122. package/fy-form/index.mjs +178 -732
  123. package/fy-form-design/index.mjs +1738 -1179
  124. package/fy-input/index.mjs +15 -101
  125. package/fy-input-color/index.mjs +17 -66
  126. package/fy-input-icon/index.mjs +21 -116
  127. package/fy-input-map/index.mjs +27 -24
  128. package/fy-input-number/index.mjs +23 -22
  129. package/fy-input-table/index.mjs +22 -18
  130. package/fy-input-tree/index.mjs +32 -28
  131. package/fy-progress/index.mjs +24 -23
  132. package/fy-radio/index.mjs +23 -18
  133. package/fy-rate/index.mjs +16 -49
  134. package/fy-select/index.mjs +29 -122
  135. package/fy-slider/index.mjs +18 -17
  136. package/fy-switch/index.mjs +21 -20
  137. package/fy-tabs/index.mjs +14 -48
  138. package/fy-time/index.mjs +20 -14
  139. package/fy-title/index.mjs +1 -1
  140. package/fy-tree/index.mjs +26 -20
  141. package/fy-u-editor/index.mjs +1 -1
  142. package/fy-upload/index.mjs +76 -74
  143. package/guide-steps/index.mjs +24 -22
  144. package/highlight-j-s/index.mjs +19 -29
  145. package/icon-temp/index.mjs +12 -30
  146. package/iframe-window/index.mjs +19 -18
  147. package/image-cropper/index.mjs +53 -51
  148. package/image-preview/index.mjs +27 -25
  149. package/input-number/index.mjs +63 -172
  150. package/input-number-range/index.mjs +24 -23
  151. package/license/index.mjs +1 -1
  152. package/loading-view/index.mjs +15 -33
  153. package/login/index.mjs +40 -35
  154. package/nav-bar/index.mjs +15 -30
  155. package/notice/index.mjs +19 -18
  156. package/package.json +1 -1
  157. package/page/index.mjs +12 -20
  158. package/page-header/index.mjs +13 -34
  159. package/page-index/index.mjs +34 -33
  160. package/page-index-top/index.mjs +100 -51
  161. package/page-skeleton/index.mjs +18 -35
  162. package/page-skeleton-new/index.mjs +16 -15
  163. package/pageable-table/index.mjs +85 -223
  164. package/pageable-view/index.mjs +34 -33
  165. package/present-view/index.mjs +75 -71
  166. package/record-video/index.mjs +1 -1
  167. package/resize-observer/index.mjs +21 -29
  168. package/search/index.mjs +29 -27
  169. package/search-popover/index.mjs +1 -1
  170. package/sign/index.mjs +1 -1
  171. package/split-pane/index.mjs +40 -45
  172. package/static-pageable-table/index.mjs +20 -18
  173. package/swiper/index.mjs +27 -25
  174. package/table-view/index.mjs +627 -89
  175. package/tag-render/index.mjs +21 -19
  176. package/text-ellipsis/index.mjs +13 -12
  177. package/tinymce-editor/index.mjs +73 -72
  178. package/toolbar/index.mjs +15 -208
  179. package/toolbar-button/index.mjs +32 -57
  180. package/verify/index.mjs +1 -1
  181. package/vue-cron/index.mjs +112 -104
  182. package/watermark/index.mjs +1 -1
  183. package/web-types.json +1 -1
  184. package/x-input-tag/index.mjs +51 -117
  185. package/chunks/FormTemp.7f91629d.mjs +0 -165
  186. package/chunks/confirmable-mixin.817b542f.mjs +0 -116
  187. package/chunks/form-input-mixin.4632ad36.mjs +0 -24
  188. package/chunks/form-item-mixin.ad148e7b.mjs +0 -140
  189. package/chunks/input-number-mixin.41a066be.mjs +0 -60
package/fy-form/index.mjs CHANGED
@@ -1,584 +1,30 @@
1
- var D = (e, i, r) => new Promise((s, p) => {
2
- var t = (o) => {
1
+ var c = (i, t, e) => new Promise((a, o) => {
2
+ var n = (s) => {
3
3
  try {
4
- a(r.next(o));
5
- } catch (d) {
6
- p(d);
4
+ r(e.next(s));
5
+ } catch (f) {
6
+ o(f);
7
7
  }
8
- }, l = (o) => {
8
+ }, h = (s) => {
9
9
  try {
10
- a(r.throw(o));
11
- } catch (d) {
12
- p(d);
10
+ r(e.throw(s));
11
+ } catch (f) {
12
+ o(f);
13
13
  }
14
- }, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(t, l);
15
- a((r = r.apply(e, i)).next());
14
+ }, r = (s) => s.done ? a(s.value) : Promise.resolve(s.value).then(n, h);
15
+ r((e = e.apply(i, t)).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) => {
26
- if (!s)
27
- return;
28
- if (!window.Mock) {
29
- X.logs("mock");
30
- return;
31
- }
32
- const t = (window.Mock || {}).Random, l = {};
33
- function a({ en: c }) {
34
- return c ? t.name(!0) : t.cname();
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));
40
- } else
41
- return t.integer(n, c);
42
- }
43
- function d({ header: c }) {
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;
47
- }
48
- function w({ format: c, now: n }) {
49
- return n ? t.now(c) : t.datetime(c);
50
- }
51
- function T({ min: c, max: n }) {
52
- return t.csentence(c, n);
53
- }
54
- function N() {
55
- return t.county(!0);
56
- }
57
- function P({ dic: c, props: n, columnType: u, multiple: h }) {
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++) {
62
- let O = !0;
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);
66
- }
67
- }
68
- return v;
69
- } else {
70
- const _ = o({ min: 0, max: b - 1 });
71
- return c[_][m];
72
- }
73
- }
74
- function z() {
75
- Object.keys(e).forEach((c) => {
76
- const n = e[c];
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) {
80
- case "name":
81
- l[n.prop] = a(u);
82
- break;
83
- case "number":
84
- l[n.prop] = o(u);
85
- break;
86
- case "datetime":
87
- l[n.prop] = w(u);
88
- break;
89
- case "word":
90
- l[n.prop] = T(u);
91
- break;
92
- case "url":
93
- l[n.prop] = d(u);
94
- break;
95
- case "county":
96
- l[n.prop] = N();
97
- break;
98
- case "dic":
99
- l[n.prop] = P(u);
100
- break;
101
- }
102
- } else
103
- n.mock instanceof Function && (l[n.prop] = n.mock(r));
104
- });
105
- }
106
- return z(), l;
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 = {
152
- name: "FormGroup",
153
- props: {
154
- arrow: {
155
- type: Boolean,
156
- default: !0
157
- },
158
- collapse: {
159
- type: Boolean,
160
- default: !0
161
- },
162
- header: {
163
- type: Boolean,
164
- default: !0
165
- },
166
- icon: {
167
- type: String
168
- },
169
- display: {
170
- type: Boolean,
171
- default: !0
172
- },
173
- label: {
174
- type: String
175
- }
176
- },
177
- data() {
178
- return {
179
- activeName: ""
180
- };
181
- },
182
- computed: {
183
- text() {
184
- return this.collapse ? 1 : 0;
185
- },
186
- isHeader() {
187
- return this.$slots.header && this.header || (this.label || this.icon) && this.header;
188
- }
189
- },
190
- watch: {
191
- text(e) {
192
- this.activeName = [e];
193
- }
194
- },
195
- created() {
196
- this.activeName = [this.text];
197
- },
198
- methods: {
199
- handleChange(e) {
200
- this.$emit("change", e);
201
- }
202
- }
203
- }, F = {};
204
- var ie = /* @__PURE__ */ $(
205
- te,
206
- Z,
207
- ee,
208
- !1,
209
- re,
210
- null,
211
- null,
212
- null
213
- );
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 = {
282
- name: "FyFormMenu",
283
- inject: ["formSafe"],
284
- computed: {
285
- menuSpan() {
286
- return this.formSafe.parentOption.menuSpan || 24;
287
- },
288
- styleName() {
289
- return this.menuSpan !== 24 ? {
290
- padding: 0
291
- } : {};
292
- }
293
- }
294
- }, C = {};
295
- var le = /* @__PURE__ */ $(
296
- ne,
297
- ae,
298
- oe,
299
- !1,
300
- pe,
301
- null,
302
- null,
303
- null
304
- );
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 = {
17
+ import { s as b, r as O, F as $, a as y, b as D, d as v, m as F } from "../chunks/FyForm.vue_vue_type_style_index_0_lang.6e64daee.mjs";
18
+ import { i as C } from "../chunks/init.f0a03127.mjs";
19
+ import { s as p, d as u, u as E, a as g, g as k, f as d, D as x, o as P, c as V } from "../chunks/util.7844e2c2.mjs";
20
+ import { c as T, a as w, g as j, b as L, f as _ } from "../chunks/dataformat.816df805.mjs";
21
+ import { s as B } from "../chunks/dic.3b4ba802.mjs";
22
+ import { isBlank as l } from "@web-utils/core";
23
+ import { n as I } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
24
+ const S = {
579
25
  name: "FyForm",
580
- components: { FormTemp: B, FyFormMenu: ue, FormGroup: se },
581
- mixins: [M],
26
+ components: { FormTemp: $, FyFormMenu: y, FormGroup: D },
27
+ mixins: [C],
582
28
  provide() {
583
29
  return {
584
30
  formSafe: this
@@ -622,7 +68,7 @@ const de = {
622
68
  },
623
69
  computed: {
624
70
  columnSlot() {
625
- return Object.keys(this.$scopedSlots).filter((e) => !this.propOption.map((i) => i.prop).includes(e));
71
+ return Object.keys(this.$scopedSlots).filter((i) => !this.propOption.map((t) => t.prop).includes(i));
626
72
  },
627
73
  labelSuffix() {
628
74
  return this.parentOption.labelSuffix || ":";
@@ -646,7 +92,7 @@ const de = {
646
92
  return this.boxType === "view";
647
93
  },
648
94
  gutter() {
649
- return y((this.parentOption.gutter || 10) / 2);
95
+ return p((this.parentOption.gutter || 10) / 2);
650
96
  },
651
97
  detail() {
652
98
  return this.parentOption.detail;
@@ -664,35 +110,35 @@ const de = {
664
110
  return this.columnOption.length;
665
111
  },
666
112
  dynamicOption() {
667
- const e = [];
668
- return this.propOption.forEach((i) => {
669
- i.type === "dynamic" && this.vaildDisplay(i) && e.push(i);
670
- }), e;
113
+ const i = [];
114
+ return this.propOption.forEach((t) => {
115
+ t.type === "dynamic" && this.vaildDisplay(t) && i.push(t);
116
+ }), i;
671
117
  },
672
118
  propOption() {
673
- const e = [];
674
- return this.columnOption.forEach((i) => {
675
- i.display !== !1 && i.column.forEach((r) => {
676
- e.push(r);
119
+ const i = [];
120
+ return this.columnOption.forEach((t) => {
121
+ t.display !== !1 && t.column.forEach((e) => {
122
+ i.push(e);
677
123
  });
678
- }), e;
124
+ }), i;
679
125
  },
680
126
  parentOption() {
681
127
  return this.tableOption || {};
682
128
  },
683
129
  columnOption() {
684
- const e = this.tableOption.column || [], i = x(this.tableOption.group) || [], r = this.tableOption.footer || [];
685
- return i.unshift({
130
+ const i = this.tableOption.column || [], t = u(this.tableOption.group) || [], e = this.tableOption.footer || [];
131
+ return t.unshift({
686
132
  header: !1,
687
- column: e
688
- }), r.length !== 0 && i.push({
133
+ column: i
134
+ }), e.length !== 0 && t.push({
689
135
  header: !1,
690
- column: r
691
- }), i.forEach((s) => {
692
- 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;
136
+ column: e
137
+ }), t.forEach((a) => {
138
+ a.column = a.column || [], a.column.forEach((o, n) => {
139
+ o.display !== !1 && !this.isMobile && (o = T(o, this.itemSpanDefault, n === 0));
140
+ }), a.column = w(a.column), a.column = a.column.sort((o, n) => (n.order || 0) - (o.order || 0));
141
+ }), t;
696
142
  },
697
143
  menuPosition: function() {
698
144
  return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
@@ -737,8 +183,8 @@ const de = {
737
183
  immediate: !0
738
184
  },
739
185
  allDisabled: {
740
- handler(e) {
741
- this.$emit("update:status", e);
186
+ handler(i) {
187
+ this.$emit("update:status", i);
742
188
  },
743
189
  deep: !0,
744
190
  immediate: !0
@@ -750,118 +196,118 @@ const de = {
750
196
  });
751
197
  },
752
198
  beforeDestroy() {
753
- Object.keys(this.formBind).forEach((e) => {
754
- this.formBind[e].forEach((i) => {
755
- i();
199
+ Object.keys(this.formBind).forEach((i) => {
200
+ this.formBind[i].forEach((t) => {
201
+ t();
756
202
  });
757
203
  });
758
204
  },
759
205
  methods: {
760
- setPx: y,
761
- 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;
206
+ setPx: p,
207
+ deepClone: u,
208
+ getComponent: j,
209
+ getPlaceholder: L,
210
+ uploadFun: E,
211
+ getDisabled(i) {
212
+ return this.vaildDetail(i) || this.isDetail || this.vaildDisabled(i) || this.allDisabled;
767
213
  },
768
- getSpan(e) {
769
- return e.span || this.parentOption.span || this.itemSpanDefault;
214
+ getSpan(i) {
215
+ return i.span || this.parentOption.span || this.itemSpanDefault;
770
216
  },
771
- isGroupShow(e, i) {
772
- return this.isTabs ? `${i}` === this.activeName || i === 0 : !0;
217
+ isGroupShow(i, t) {
218
+ return this.isTabs ? `${t}` === this.activeName || t === 0 : !0;
773
219
  },
774
220
  // 初始化表单
775
221
  dataFormat() {
776
- const e = J(this.propOption).tableForm, i = this.value, r = {};
777
- Object.entries(Object.assign(e, i)).forEach((s) => {
778
- const p = s[0], t = s[1];
779
- f(i[p]) ? r[p] = t : r[p] = i[p];
780
- }), this.$set(this, "form", r), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
222
+ const i = _(this.propOption).tableForm, t = this.value, e = {};
223
+ Object.entries(Object.assign(i, t)).forEach((a) => {
224
+ const o = a[0], n = a[1];
225
+ l(t[o]) ? e[o] = n : e[o] = t[o];
226
+ }), this.$set(this, "form", e), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
781
227
  this.formCreate = !0, this.clearValidate();
782
228
  });
783
229
  },
784
230
  setControl() {
785
- this.propOption.forEach((e) => {
786
- const i = e.prop, r = e.bind, s = e.control;
787
- if (!this.formBind[i]) {
788
- const p = [];
789
- if (r) {
790
- const t = this.$watch(`form.${i}`, (a, o) => {
791
- a !== o && V(this.form, r, a);
792
- }), l = this.$watch(`form.${r}`, (a, o) => {
793
- a !== o && this.$set(this.form, i, a);
231
+ this.propOption.forEach((i) => {
232
+ const t = i.prop, e = i.bind, a = i.control;
233
+ if (!this.formBind[t]) {
234
+ const o = [];
235
+ if (e) {
236
+ const n = this.$watch(`form.${t}`, (r, s) => {
237
+ r !== s && g(this.form, e, r);
238
+ }), h = this.$watch(`form.${e}`, (r, s) => {
239
+ r !== s && this.$set(this.form, t, r);
794
240
  });
795
- p.push(t), p.push(l), this.$set(this.form, i, A(this.form, r));
241
+ o.push(n), o.push(h), this.$set(this.form, t, k(this.form, e));
796
242
  }
797
- if (s) {
798
- const t = () => {
799
- const a = s(this.form[e.prop], this.form) || {};
800
- Object.keys(a).forEach((o) => {
801
- const d = Object.assign(this.objectOption[o] || {}, a[o]);
802
- this.$set(this.objectOption, o, d), a[o].dicData && (this.DIC[o] = a[o].dicData);
243
+ if (a) {
244
+ const n = () => {
245
+ const r = a(this.form[i.prop], this.form) || {};
246
+ Object.keys(r).forEach((s) => {
247
+ const f = Object.assign(this.objectOption[s] || {}, r[s]);
248
+ this.$set(this.objectOption, s, f), r[s].dicData && (this.DIC[s] = r[s].dicData);
803
249
  });
804
- }, l = this.$watch(`form.${i}`, () => {
805
- t();
250
+ }, h = this.$watch(`form.${t}`, () => {
251
+ n();
806
252
  });
807
- p.push(l), t();
253
+ o.push(h), n();
808
254
  }
809
- this.formBind[i] = p;
255
+ this.formBind[t] = o;
810
256
  }
811
257
  });
812
258
  },
813
259
  setForm() {
814
- Object.keys(this.value).forEach((e) => {
815
- this.$set(this.form, e, this.value[e]);
260
+ Object.keys(this.value).forEach((i) => {
261
+ this.$set(this.form, i, this.value[i]);
816
262
  });
817
263
  },
818
264
  setVal() {
819
265
  this.$emit("input", this.form), this.$emit("change", this.form);
820
266
  },
821
267
  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))
268
+ this.tableOption.filterNull === !0 && (this.form = d(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = d(this.form, ["$"], !1) : this.propOption.forEach((i) => {
269
+ const t = this.DIC[i.prop];
270
+ if (l(t))
825
271
  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}`);
272
+ const e = v(this.form, i, this.tableOption, t);
273
+ e ? this.$set(this.form, `$${i.prop}`, e) : this.$delete(this.form, `$${i.prop}`);
828
274
  });
829
275
  },
830
- handleGroupClick(e) {
831
- this.$emit("tab-click", e);
276
+ handleGroupClick(i) {
277
+ this.$emit("tab-click", i);
832
278
  },
833
- handleTabClick(e, i) {
834
- this.$emit("tab-click", e, i);
279
+ handleTabClick(i, t) {
280
+ this.$emit("tab-click", i, t);
835
281
  },
836
- getLabelWidth(e, i) {
837
- let r;
838
- return f(e.labelWidth) ? f(i.labelWidth) ? r = this.parentOption.labelWidth : r = i.labelWidth : r = e.labelWidth, y(r, this.labelWidth);
282
+ getLabelWidth(i, t) {
283
+ let e;
284
+ return l(i.labelWidth) ? l(t.labelWidth) ? e = this.parentOption.labelWidth : e = t.labelWidth : e = i.labelWidth, p(e, this.labelWidth);
839
285
  },
840
286
  // 对部分表单字段进行校验的方法
841
- validateField(e) {
842
- return this.$refs.form.validateField(e);
287
+ validateField(i) {
288
+ return this.$refs.form.validateField(i);
843
289
  },
844
- validTip(e) {
845
- return !e.tip || e.type === "upload";
290
+ validTip(i) {
291
+ return !i.tip || i.type === "upload";
846
292
  },
847
- getPropRef(e) {
848
- return this.$refs[e][0];
293
+ getPropRef(i) {
294
+ return this.$refs[i][0];
849
295
  },
850
- handleChange(e, i) {
296
+ handleChange(i, t) {
851
297
  this.$nextTick(() => {
852
- const r = i.cascader, s = r.join(",");
853
- 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) => {
856
- this.form[o] = "", this.$set(this.DIC, o, []);
857
- }), !(f(r) || f(l) || f(a)) && Q({
858
- column: a,
859
- value: l,
298
+ const e = t.cascader, a = e.join(",");
299
+ e.forEach((o) => {
300
+ const n = o, h = this.form[t.prop], r = this.findObject(i, n);
301
+ l(r) || (this.formList.includes(a) && e.forEach((s) => {
302
+ this.form[s] = "", this.$set(this.DIC, s, []);
303
+ }), !(l(e) || l(h) || l(r)) && B({
304
+ column: r,
305
+ value: h,
860
306
  form: this.form
861
- }).then((o) => {
862
- this.formList.includes(s) || this.formList.push(s);
863
- 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]);
307
+ }).then((s) => {
308
+ this.formList.includes(a) || this.formList.push(a);
309
+ const f = s || [];
310
+ this.$set(this.DIC, n, f), !l(f) && !l(f) && !l(r.cascaderIndex) && l(this.form[n]) && (this.form[n] = f[r.cascaderIndex][(r.props || {}).value || x.value]);
865
311
  }));
866
312
  });
867
313
  });
@@ -869,87 +315,87 @@ const de = {
869
315
  handlePrint() {
870
316
  this.$Print(this.$el);
871
317
  },
872
- propChange(e, i) {
873
- i.cascader && this.handleChange(e, i);
318
+ propChange(i, t) {
319
+ t.cascader && this.handleChange(i, t);
874
320
  },
875
321
  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];
322
+ this.isMock && (this.columnOption.forEach((i) => {
323
+ const t = F(i.column, this.DIC, this.form, this.isMock);
324
+ l(t) || Object.keys(t).forEach((e) => {
325
+ this.form[e] = t[e];
880
326
  });
881
327
  }), this.$nextTick(() => {
882
328
  this.clearValidate(), this.$emit("mock-change", this.form);
883
329
  }));
884
330
  },
885
- vaildDetail(e) {
886
- let i;
331
+ vaildDetail(i) {
332
+ let t;
887
333
  if (this.detail)
888
334
  return !1;
889
- if (!f(e.detail))
890
- i = "detail";
335
+ if (!l(i.detail))
336
+ t = "detail";
891
337
  else if (this.isAdd)
892
- i = "addDetail";
338
+ t = "addDetail";
893
339
  else if (this.isEdit)
894
- i = "editDetail";
340
+ t = "editDetail";
895
341
  else if (this.isView)
896
342
  return !1;
897
- return i ? e[i] === !0 : !1;
343
+ return t ? i[t] === !0 : !1;
898
344
  },
899
345
  // 验证表单是否禁止
900
- vaildDisabled(e) {
901
- let i;
346
+ vaildDisabled(i) {
347
+ let t;
902
348
  if (this.disabled)
903
349
  return !0;
904
- if (!f(e.disabled))
905
- i = "disabled";
350
+ if (!l(i.disabled))
351
+ t = "disabled";
906
352
  else if (this.isAdd)
907
- i = "addDisabled";
353
+ t = "addDisabled";
908
354
  else if (this.isEdit)
909
- i = "editDisabled";
355
+ t = "editDisabled";
910
356
  else if (this.isView)
911
357
  return !0;
912
- return i ? e[i] === !0 : !1;
358
+ return t ? i[t] === !0 : !1;
913
359
  },
914
360
  // 验证表单是否显隐
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;
918
- },
919
- clearValidate(e) {
920
- return D(this, null, function* () {
921
- var i;
922
- (i = this.$refs.form) == null || i.clearValidate(e);
361
+ vaildDisplay(i) {
362
+ let t;
363
+ return l(i.display) ? this.isAdd ? t = "addDisplay" : this.isEdit ? t = "editDisplay" : this.isView && (t = "viewDisplay") : t = "display", t ? P(i[t], !0) : !0;
364
+ },
365
+ clearValidate(i) {
366
+ return c(this, null, function* () {
367
+ var t;
368
+ (t = this.$refs.form) == null || t.clearValidate(i);
923
369
  });
924
370
  },
925
371
  validateCellForm() {
926
- return new Promise((e) => {
927
- this.$refs.form.validate((i, r) => {
928
- e(r);
372
+ return new Promise((i) => {
373
+ this.$refs.form.validate((t, e) => {
374
+ i(e);
929
375
  });
930
376
  });
931
377
  },
932
- validate(e) {
933
- this.$refs.form.validate((i, r) => {
934
- const s = [], p = [], t = {};
935
- this.dynamicOption.forEach((l) => {
936
- 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) => {
938
- s.push(o.validateCellForm());
939
- }) : s.push(this.$refs[l.prop][0].$refs.temp.$refs.main.validateCellForm());
940
- }), Promise.all(s).then((l) => {
941
- l.forEach((o, d) => {
942
- f(o) || (t[p[d]] = o);
378
+ validate(i) {
379
+ this.$refs.form.validate((t, e) => {
380
+ const a = [], o = [], n = {};
381
+ this.dynamicOption.forEach((h) => {
382
+ const r = h.children.type === "form";
383
+ o.push(h.prop), r ? l(this.$refs[h.prop][0].$refs.temp.$refs.main) || this.$refs[h.prop][0].$refs.temp.$refs.main.forEach((s) => {
384
+ a.push(s.validateCellForm());
385
+ }) : a.push(this.$refs[h.prop][0].$refs.temp.$refs.main.validateCellForm());
386
+ }), Promise.all(a).then((h) => {
387
+ h.forEach((s, f) => {
388
+ l(s) || (n[o[f]] = s);
943
389
  });
944
- const a = Object.assign(t, r);
945
- f(a) ? (this.show(), e(!0, this.hide)) : e(!1, this.hide, a);
390
+ const r = Object.assign(n, e);
391
+ l(r) ? (this.show(), i(!0, this.hide)) : i(!1, this.hide, r);
946
392
  });
947
393
  });
948
394
  },
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]));
395
+ resetForm(i = !0) {
396
+ if (i) {
397
+ const t = this.propOption.map((e) => e.prop);
398
+ this.form = V(this.form, t, (this.tableOption.filterParams || []).concat([this.rowKey]));
953
399
  }
954
400
  this.$nextTick(() => {
955
401
  this.clearValidate(), this.$emit("reset-change");
@@ -965,29 +411,29 @@ const de = {
965
411
  this.allDisabled = !1;
966
412
  },
967
413
  submit() {
968
- this.validate((e, i) => {
969
- e ? this.$emit("submit", S(this.form, ["$"]), this.hide) : this.$emit("error", i);
414
+ this.validate((i, t) => {
415
+ i ? this.$emit("submit", d(this.form, ["$"]), this.hide) : this.$emit("error", t);
970
416
  });
971
417
  }
972
418
  }
973
- }, E = {};
974
- var he = /* @__PURE__ */ $(
975
- de,
976
- fe,
977
- ce,
419
+ }, m = {};
420
+ var A = /* @__PURE__ */ I(
421
+ S,
422
+ O,
423
+ b,
978
424
  !1,
979
- me,
425
+ M,
980
426
  null,
981
427
  null,
982
428
  null
983
429
  );
984
- function me(e) {
985
- for (let i in E)
986
- this[i] = E[i];
430
+ function M(i) {
431
+ for (let t in m)
432
+ this[t] = m[t];
987
433
  }
988
- const De = /* @__PURE__ */ function() {
989
- return he.exports;
434
+ const J = /* @__PURE__ */ function() {
435
+ return A.exports;
990
436
  }();
991
437
  export {
992
- De as default
438
+ J as default
993
439
  };