@web-utils/component 2.7.12 → 2.7.14
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.
- package/dist/chunks/{ConfigSelect.vue_vue_type_template_lang.e7a9d5b7.js → ConfigSelect.vue_vue_type_template_lang.dfc91f07.js} +20 -15
- package/dist/chunks/{ConfigTable.vue_vue_type_template_lang.e9060616.js → ConfigTable.vue_vue_type_template_lang.b27540fd.js} +1 -1
- package/dist/chunks/{ConfigUpload.vue_vue_type_template_lang.48dd814b.js → ConfigUpload.vue_vue_type_template_lang.129c0ced.js} +18 -13
- package/dist/chunks/{WidgetConfig.vue_vue_type_template_lang.d3cd0479.js → WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js} +16 -16
- package/dist/chunks/{WidgetForm.vue_vue_type_template_lang.fbb7d6b7.js → WidgetForm.vue_vue_type_template_lang.d4b05679.js} +10 -10
- package/dist/chunks/{WidgetFormGroup.vue_vue_type_template_lang.47789aae.js → WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js} +13 -13
- package/dist/chunks/{WidgetFormTable.vue_vue_type_template_lang.30625146.js → WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js} +4 -3
- package/dist/chunks/{dataformat.d3fd2d1b.js → dataformat.65b92bfe.js} +36 -35
- package/dist/chunks/detail.d67573b1.js +28 -0
- package/dist/chunks/dic.70feb9b4.js +135 -0
- package/dist/chunks/{event.43b42228.js → event.dd6f522d.js} +3 -3
- package/dist/chunks/{init.3b47bb80.js → init.7c58eb34.js} +10 -10
- package/dist/chunks/{monaco.1dbdc960.js → monaco.cefcb9f5.js} +92 -85
- package/dist/chunks/{packages.6f252850.js → packages.1fc9ccba.js} +1 -1
- package/dist/chunks/slot.4b391395.js +27 -0
- package/dist/chunks/util.23fe58fb.js +261 -0
- package/dist/components/afd-column/index.js +1 -1
- package/dist/components/affix/index.js +2 -2
- package/dist/components/base.css +1 -1
- package/dist/components/carousel/index.js +2 -2
- package/dist/components/chat/index.js +9 -9
- package/dist/components/column/index.js +25 -25
- package/dist/components/column-default/index.js +3 -2
- package/dist/components/column-dynamic/index.js +1 -1
- package/dist/components/column-menu/index.js +11 -11
- package/dist/components/column-slot/index.js +54 -53
- package/dist/components/config-custom/index.js +3 -3
- package/dist/components/config-event/index.js +5 -5
- package/dist/components/config-rate/index.js +1 -1
- package/dist/components/config-rate/style.css +1 -1
- package/dist/components/config-select/index.js +3 -3
- package/dist/components/config-switch/index.js +5 -5
- package/dist/components/config-switch/style.css +1 -1
- package/dist/components/config-table/index.js +3 -3
- package/dist/components/config-tree/index.js +3 -3
- package/dist/components/config-tree/style.css +1 -1
- package/dist/components/config-upload/index.js +1 -1
- package/dist/components/dialog-excel/index.js +37 -40
- package/dist/components/dialog-filter/index.js +19 -19
- package/dist/components/dialog-form/index.js +1 -1
- package/dist/components/element-dialog/index.js +2 -2
- package/dist/components/element-dialog/style.css +1 -1
- package/dist/components/flow/index.js +17 -18
- package/dist/components/flow-node/index.js +1 -1
- package/dist/components/form-temp/index.js +3 -3
- package/dist/components/fy-array/index.js +2 -2
- package/dist/components/fy-cascader/index.js +13 -13
- package/dist/components/fy-checkbox/index.js +4 -4
- package/dist/components/fy-code/index.js +1 -1
- package/dist/components/fy-curd/index.js +68 -69
- package/dist/components/fy-date/index.js +1 -1
- package/dist/components/fy-dialog-form/index.js +11 -11
- package/dist/components/fy-draggable/index.js +5 -7
- package/dist/components/fy-dynamic/index.js +32 -28
- package/dist/components/fy-empty/index.js +1 -1
- package/dist/components/fy-form/index.js +153 -141
- package/dist/components/fy-form-design/index.js +31 -31
- package/dist/components/fy-input/index.js +60 -46
- package/dist/components/fy-input-color/index.js +34 -29
- package/dist/components/fy-input-icon/index.js +1 -1
- package/dist/components/fy-input-map/index.js +14 -14
- package/dist/components/fy-input-number/index.js +1 -1
- package/dist/components/fy-input-table/index.js +2 -2
- package/dist/components/fy-input-tree/index.js +12 -12
- package/dist/components/fy-radio/index.js +1 -1
- package/dist/components/fy-rate/index.js +1 -1
- package/dist/components/fy-select/index.js +3 -3
- package/dist/components/fy-slider/index.js +2 -2
- package/dist/components/fy-switch/index.js +1 -1
- package/dist/components/fy-tabs/index.js +2 -2
- package/dist/components/fy-time/index.js +2 -2
- package/dist/components/fy-title/index.js +1 -1
- package/dist/components/fy-tree/index.js +3 -3
- package/dist/components/fy-u-editor/index.js +26 -24
- package/dist/components/fy-upload/index.js +198 -312
- package/dist/components/header-menu/index.js +2 -2
- package/dist/components/header-search/index.js +16 -15
- package/dist/components/image-cropper/index.js +299 -0
- package/dist/components/image-cropper/style.css +1 -0
- package/dist/components/image-preview/index.js +346 -0
- package/dist/components/image-preview/style.css +1 -0
- package/dist/components/keyboard/index.js +58 -63
- package/dist/components/license/index.js +7 -7
- package/dist/components/login/index.js +37 -32
- package/dist/components/name-avatar/index.js +1 -1
- package/dist/components/pageable-table/index.js +1 -1
- package/dist/components/pageable-view/index.js +26 -26
- package/dist/components/photo-swipe/index.js +71 -166
- package/dist/components/queue/index.js +6 -6
- package/dist/components/record-video/index.js +18 -18
- package/dist/components/search/index.js +3 -3
- package/dist/components/sign/index.js +64 -59
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/table-page/index.js +5 -5
- package/dist/components/text-ellipsis/index.js +11 -10
- package/dist/components/verify/index.js +25 -25
- package/dist/components/widget-config/index.js +8 -8
- package/dist/components/widget-form/index.js +7 -7
- package/dist/components/widget-form-group/index.js +8 -8
- package/dist/components/widget-form-item/index.js +14 -13
- package/dist/components/widget-form-table/index.js +14 -14
- package/dist/index.css +109 -40
- package/dist/index.es.js +4069 -3731
- package/package.json +6 -56
- package/web-types.json +28 -10
- package/dist/chunks/detail.ac4d421a.js +0 -28
- package/dist/chunks/dic.79d9f595.js +0 -133
- package/dist/chunks/slot.1b8d2b1b.js +0 -27
- package/dist/chunks/util.80e28481.js +0 -250
- package/dist/components/photo-swipe/style.css +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as P } from "../../chunks/detail.
|
|
2
|
-
import { i as N } from "../../chunks/init.
|
|
3
|
-
import { s as _, d as
|
|
4
|
-
import { c as A, b as B, g as W, a as R, f as G } from "../../chunks/dataformat.
|
|
5
|
-
import { s as H } from "../../chunks/dic.
|
|
6
|
-
import { p as U } from "../../chunks/packages.
|
|
7
|
-
import { isBlank as
|
|
1
|
+
import { d as P } from "../../chunks/detail.d67573b1.js";
|
|
2
|
+
import { i as N } from "../../chunks/init.7c58eb34.js";
|
|
3
|
+
import { s as _, d as D, u as j, h as L, i as V, j as $, k as z, o as I, l as M } from "../../chunks/util.23fe58fb.js";
|
|
4
|
+
import { c as A, b as B, g as W, a as R, f as G } from "../../chunks/dataformat.65b92bfe.js";
|
|
5
|
+
import { s as H } from "../../chunks/dic.70feb9b4.js";
|
|
6
|
+
import { p as U } from "../../chunks/packages.1fc9ccba.js";
|
|
7
|
+
import { isBlank as u } from "@web-utils/core";
|
|
8
8
|
import { n as q } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
|
|
9
9
|
const K = (t, i, s, r) => {
|
|
10
10
|
if (!r)
|
|
@@ -13,88 +13,87 @@ const K = (t, i, s, r) => {
|
|
|
13
13
|
U.logs("mock");
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
function a({ en:
|
|
18
|
-
return
|
|
16
|
+
const e = (window.Mock || {}).Random, o = {};
|
|
17
|
+
function a({ en: h }) {
|
|
18
|
+
return h ? e.name(!0) : e.cname();
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function n({ max: h, min: l, precision: f }) {
|
|
21
21
|
if (f) {
|
|
22
|
-
const c = e.float(
|
|
22
|
+
const c = `${e.float(l, h, f)}`, m = c.indexOf(".") + 1;
|
|
23
23
|
return Number(c.substring(0, m + f));
|
|
24
24
|
} else
|
|
25
|
-
return e.integer(
|
|
25
|
+
return e.integer(l, h);
|
|
26
26
|
}
|
|
27
|
-
function d({ header:
|
|
27
|
+
function d({ header: h, footer: l }) {
|
|
28
28
|
let f = e.url();
|
|
29
29
|
const c = f.indexOf("://");
|
|
30
|
-
return
|
|
30
|
+
return h === !1 ? f = f.substring(c + 3) : f = `http://${f.substring(c + 3)}`, f;
|
|
31
31
|
}
|
|
32
|
-
function F({ format:
|
|
33
|
-
return
|
|
32
|
+
function F({ format: h, now: l }) {
|
|
33
|
+
return l ? e.now(h) : e.datetime(h);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return e.csentence(
|
|
35
|
+
function x({ min: h, max: l }) {
|
|
36
|
+
return e.csentence(h, l);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function C() {
|
|
39
39
|
return e.county(!0);
|
|
40
40
|
}
|
|
41
|
-
function T({ dic:
|
|
42
|
-
const m =
|
|
41
|
+
function T({ dic: h, props: l, columnType: f, multiple: c }) {
|
|
42
|
+
const m = l.value || "value", b = h.length;
|
|
43
43
|
if (["checkbox"].includes(f) || c) {
|
|
44
|
-
const v =
|
|
44
|
+
const v = n({
|
|
45
45
|
min: 1,
|
|
46
46
|
max: b
|
|
47
|
-
});
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const E = l({
|
|
47
|
+
}), y = [];
|
|
48
|
+
for (let O = 0; O < v; O++) {
|
|
49
|
+
let g = !0;
|
|
50
|
+
for (; g; ) {
|
|
51
|
+
const E = n({
|
|
53
52
|
min: 0,
|
|
54
53
|
max: b - 1
|
|
55
|
-
}), k =
|
|
56
|
-
y.includes(k) || (y.push(k),
|
|
54
|
+
}), k = h[E][m];
|
|
55
|
+
y.includes(k) || (y.push(k), g = !1);
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
return y;
|
|
60
59
|
} else {
|
|
61
|
-
const v =
|
|
60
|
+
const v = n({
|
|
62
61
|
min: 0,
|
|
63
62
|
max: b - 1
|
|
64
63
|
});
|
|
65
|
-
return
|
|
64
|
+
return h[v][m];
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
67
|
function w() {
|
|
69
|
-
Object.keys(t).forEach((
|
|
70
|
-
const
|
|
71
|
-
if (
|
|
72
|
-
|
|
73
|
-
switch (f.dic = typeof
|
|
68
|
+
Object.keys(t).forEach((h) => {
|
|
69
|
+
const l = t[h];
|
|
70
|
+
if (l.mock && typeof l.mock == "object") {
|
|
71
|
+
const f = l.mock;
|
|
72
|
+
switch (f.dic = typeof l.dicData == "string" ? i[l.dicData] : l.dicData || [], f.props = l.props || {}, f.columnType = l.type, f.multiple = l.multiple, f.type) {
|
|
74
73
|
case "name":
|
|
75
|
-
o[
|
|
74
|
+
o[l.prop] = a(f);
|
|
76
75
|
break;
|
|
77
76
|
case "number":
|
|
78
|
-
o[
|
|
77
|
+
o[l.prop] = n(f);
|
|
79
78
|
break;
|
|
80
79
|
case "datetime":
|
|
81
|
-
o[
|
|
80
|
+
o[l.prop] = F(f);
|
|
82
81
|
break;
|
|
83
82
|
case "word":
|
|
84
|
-
o[
|
|
83
|
+
o[l.prop] = x(f);
|
|
85
84
|
break;
|
|
86
85
|
case "url":
|
|
87
|
-
o[
|
|
86
|
+
o[l.prop] = d(f);
|
|
88
87
|
break;
|
|
89
88
|
case "county":
|
|
90
|
-
o[
|
|
89
|
+
o[l.prop] = C();
|
|
91
90
|
break;
|
|
92
91
|
case "dic":
|
|
93
|
-
o[
|
|
92
|
+
o[l.prop] = T(f);
|
|
94
93
|
break;
|
|
95
94
|
}
|
|
96
95
|
} else
|
|
97
|
-
|
|
96
|
+
l.mock instanceof Function && (o[l.prop] = l.mock(s));
|
|
98
97
|
});
|
|
99
98
|
}
|
|
100
99
|
return w(), o;
|
|
@@ -146,7 +145,16 @@ var J = function() {
|
|
|
146
145
|
},
|
|
147
146
|
on: {
|
|
148
147
|
change: t.handleGroupClick
|
|
149
|
-
}
|
|
148
|
+
},
|
|
149
|
+
scopedSlots: t._u([t.getSlotName(r, "H", t.$scopedSlots) ? {
|
|
150
|
+
key: "header",
|
|
151
|
+
fn: function() {
|
|
152
|
+
return [t._t(t.getSlotName(r, "H"), null, {
|
|
153
|
+
column: r
|
|
154
|
+
})];
|
|
155
|
+
},
|
|
156
|
+
proxy: !0
|
|
157
|
+
} : null], null, !0)
|
|
150
158
|
}, [t.isTabs && p === 1 ? s("ElTabs", {
|
|
151
159
|
staticClass: "avue-form__tabs",
|
|
152
160
|
attrs: {
|
|
@@ -168,7 +176,7 @@ var J = function() {
|
|
|
168
176
|
return [t.vaildDisplay(e) && o !== 0 ? s("ElTabPane", {
|
|
169
177
|
key: o,
|
|
170
178
|
attrs: {
|
|
171
|
-
name: o
|
|
179
|
+
name: `${o}`
|
|
172
180
|
}
|
|
173
181
|
}, [s("span", {
|
|
174
182
|
attrs: {
|
|
@@ -180,16 +188,12 @@ var J = function() {
|
|
|
180
188
|
}) : [s("i", {
|
|
181
189
|
class: e.icon
|
|
182
190
|
}, [t._v(" ")]), t._v(" " + t._s(e.label) + " ")]], 2)]) : t._e()];
|
|
183
|
-
})], 2) : t._e(), t.getSlotName(r, "H", t.$scopedSlots) ? s("template", {
|
|
184
|
-
slot: "header"
|
|
185
|
-
}, [t._t(t.getSlotName(r, "H"), null, {
|
|
186
|
-
column: r
|
|
187
191
|
})], 2) : t._e(), s("div", {
|
|
188
192
|
directives: [{
|
|
189
193
|
name: "show",
|
|
190
194
|
rawName: "v-show",
|
|
191
195
|
value: t.isGroupShow(r, p),
|
|
192
|
-
expression: "isGroupShow(item,index)"
|
|
196
|
+
expression: "isGroupShow(item, index)"
|
|
193
197
|
}],
|
|
194
198
|
class: ["avue-form__group", {
|
|
195
199
|
"avue-form__group--flex": r.flex === !1
|
|
@@ -214,7 +218,7 @@ var J = function() {
|
|
|
214
218
|
pull: e.pull || r.pull
|
|
215
219
|
}
|
|
216
220
|
}, [s("ElFormItem", {
|
|
217
|
-
class:
|
|
221
|
+
class: `avue-form__item--${e.labelPosition || r.labelPosition || ""}`,
|
|
218
222
|
attrs: {
|
|
219
223
|
prop: e.prop,
|
|
220
224
|
label: e.label,
|
|
@@ -222,47 +226,55 @@ var J = function() {
|
|
|
222
226
|
"label-position": e.labelPosition || r.labelPosition || t.parentOption.labelPosition,
|
|
223
227
|
"label-width": t.getLabelWidth(e, r)
|
|
224
228
|
},
|
|
225
|
-
scopedSlots: t._u([{
|
|
229
|
+
scopedSlots: t._u([t.getSlotName(e, "L", t.$scopedSlots) ? {
|
|
230
|
+
key: "label",
|
|
231
|
+
fn: function() {
|
|
232
|
+
return [t._t(t.getSlotName(e, "L"), null, {
|
|
233
|
+
column: e,
|
|
234
|
+
value: t.form[e.prop],
|
|
235
|
+
readonly: e.readonly || t.readonly,
|
|
236
|
+
disabled: t.getDisabled(e),
|
|
237
|
+
size: e.size || t.controlSize,
|
|
238
|
+
dic: t.DIC[e.prop]
|
|
239
|
+
})];
|
|
240
|
+
},
|
|
241
|
+
proxy: !0
|
|
242
|
+
} : e.labelTip ? {
|
|
243
|
+
key: "label",
|
|
244
|
+
fn: function() {
|
|
245
|
+
return [s("ElTooltip", {
|
|
246
|
+
staticClass: "item",
|
|
247
|
+
attrs: {
|
|
248
|
+
effect: "dark",
|
|
249
|
+
placement: e.labelTipPlacement || "top-start"
|
|
250
|
+
}
|
|
251
|
+
}, [s("div", {
|
|
252
|
+
attrs: {
|
|
253
|
+
slot: "content"
|
|
254
|
+
},
|
|
255
|
+
domProps: {
|
|
256
|
+
innerHTML: t._s(e.labelTip)
|
|
257
|
+
},
|
|
258
|
+
slot: "content"
|
|
259
|
+
}), s("i", {
|
|
260
|
+
staticClass: "el-icon-info"
|
|
261
|
+
})]), s("span", [t._v(" " + t._s(e.label) + t._s(t.labelSuffix))])];
|
|
262
|
+
},
|
|
263
|
+
proxy: !0
|
|
264
|
+
} : null, t.getSlotName(e, "E", t.$scopedSlots) ? {
|
|
226
265
|
key: "error",
|
|
227
266
|
fn: function(a) {
|
|
228
|
-
return
|
|
267
|
+
return [t._t(t.getSlotName(e, "E"), null, null, Object.assign(a, {
|
|
229
268
|
column: e,
|
|
230
269
|
value: t.form[e.prop],
|
|
231
270
|
readonly: t.readonly || e.readonly,
|
|
232
271
|
disabled: t.getDisabled(e),
|
|
233
272
|
size: e.size || t.controlSize,
|
|
234
273
|
dic: t.DIC[e.prop]
|
|
235
|
-
}))]
|
|
274
|
+
}))];
|
|
236
275
|
}
|
|
237
|
-
}], null, !0)
|
|
238
|
-
}, [t.
|
|
239
|
-
slot: "label"
|
|
240
|
-
}, [t._t(t.getSlotName(e, "L"), null, {
|
|
241
|
-
column: e,
|
|
242
|
-
value: t.form[e.prop],
|
|
243
|
-
readonly: e.readonly || t.readonly,
|
|
244
|
-
disabled: t.getDisabled(e),
|
|
245
|
-
size: e.size || t.controlSize,
|
|
246
|
-
dic: t.DIC[e.prop]
|
|
247
|
-
})], 2) : e.labelTip ? s("template", {
|
|
248
|
-
slot: "label"
|
|
249
|
-
}, [s("ElTooltip", {
|
|
250
|
-
staticClass: "item",
|
|
251
|
-
attrs: {
|
|
252
|
-
effect: "dark",
|
|
253
|
-
placement: e.labelTipPlacement || "top-start"
|
|
254
|
-
}
|
|
255
|
-
}, [s("div", {
|
|
256
|
-
attrs: {
|
|
257
|
-
slot: "content"
|
|
258
|
-
},
|
|
259
|
-
domProps: {
|
|
260
|
-
innerHTML: t._s(e.labelTip)
|
|
261
|
-
},
|
|
262
|
-
slot: "content"
|
|
263
|
-
}), s("i", {
|
|
264
|
-
staticClass: "el-icon-info"
|
|
265
|
-
})]), s("span", [t._v(" " + t._s(e.label) + t._s(t.labelSuffix))])], 1) : t._e(), s(t.validTip(e) ? "div" : "elTooltip", {
|
|
276
|
+
} : null], null, !0)
|
|
277
|
+
}, [s(t.validTip(e) ? "div" : "elTooltip", {
|
|
266
278
|
tag: "Component",
|
|
267
279
|
attrs: {
|
|
268
280
|
disabled: t.validTip(e),
|
|
@@ -272,7 +284,7 @@ var J = function() {
|
|
|
272
284
|
}, [t.$scopedSlots[e.prop] ? t._t(e.prop, null, {
|
|
273
285
|
value: t.form[e.prop],
|
|
274
286
|
column: e,
|
|
275
|
-
label: t.form[
|
|
287
|
+
label: t.form[`$${e.prop}`],
|
|
276
288
|
size: e.size || t.controlSize,
|
|
277
289
|
readonly: t.readonly || e.readonly,
|
|
278
290
|
disabled: t.getDisabled(e),
|
|
@@ -300,15 +312,15 @@ var J = function() {
|
|
|
300
312
|
scopedSlots: t._u([t._l(t.getSlotName(e, "T", t.$scopedSlots) ? [e] : [], function(a) {
|
|
301
313
|
return {
|
|
302
314
|
key: t.getSlotName(e, "T"),
|
|
303
|
-
fn: function(
|
|
304
|
-
return [t._t(t.getSlotName(a, "T"), null, null,
|
|
315
|
+
fn: function(n) {
|
|
316
|
+
return [t._t(t.getSlotName(a, "T"), null, null, n)];
|
|
305
317
|
}
|
|
306
318
|
};
|
|
307
319
|
}), t._l(t.columnSlot, function(a) {
|
|
308
320
|
return {
|
|
309
321
|
key: a,
|
|
310
|
-
fn: function(
|
|
311
|
-
return [t._t(a, null, null,
|
|
322
|
+
fn: function(n) {
|
|
323
|
+
return [t._t(a, null, null, n)];
|
|
312
324
|
}
|
|
313
325
|
};
|
|
314
326
|
})], null, !0),
|
|
@@ -319,11 +331,11 @@ var J = function() {
|
|
|
319
331
|
},
|
|
320
332
|
expression: "form[column.prop]"
|
|
321
333
|
}
|
|
322
|
-
}, "FormTemp", t.uploadFun(e), !1))], 2)],
|
|
334
|
+
}, "FormTemp", t.uploadFun(e), !1))], 2)], 1)], 1) : t._e(), t.vaildDisplay(e) && e.row && e.span !== 24 && e.count ? s("div", {
|
|
323
335
|
key: `line${o}`,
|
|
324
336
|
staticClass: "avue-form__line",
|
|
325
337
|
style: {
|
|
326
|
-
width: e.count / 24 * 100
|
|
338
|
+
width: `${e.count / 24 * 100}%`
|
|
327
339
|
}
|
|
328
340
|
}) : t._e()];
|
|
329
341
|
}), !t.isDetail && !t.isMenu ? s("FyFormMenu", {
|
|
@@ -333,7 +345,7 @@ var J = function() {
|
|
|
333
345
|
return [t._t("menuForm", null, null, e)];
|
|
334
346
|
}
|
|
335
347
|
}], null, !0)
|
|
336
|
-
}) : t._e()], 2)],
|
|
348
|
+
}) : t._e()], 2)], 1);
|
|
337
349
|
}), !t.isDetail && t.isMenu ? s("FyFormMenu", {
|
|
338
350
|
scopedSlots: t._u([{
|
|
339
351
|
key: "menuForm",
|
|
@@ -431,13 +443,13 @@ const X = {
|
|
|
431
443
|
return this.columnOption.length;
|
|
432
444
|
},
|
|
433
445
|
dynamicOption() {
|
|
434
|
-
|
|
446
|
+
const t = [];
|
|
435
447
|
return this.propOption.forEach((i) => {
|
|
436
448
|
i.type === "dynamic" && this.vaildDisplay(i) && t.push(i);
|
|
437
449
|
}), t;
|
|
438
450
|
},
|
|
439
451
|
propOption() {
|
|
440
|
-
|
|
452
|
+
const t = [];
|
|
441
453
|
return this.columnOption.forEach((i) => {
|
|
442
454
|
i.display !== !1 && i.column.forEach((s) => {
|
|
443
455
|
t.push(s);
|
|
@@ -448,7 +460,7 @@ const X = {
|
|
|
448
460
|
return this.tableOption || {};
|
|
449
461
|
},
|
|
450
462
|
columnOption() {
|
|
451
|
-
|
|
463
|
+
const t = this.tableOption.column || [], i = D(this.tableOption.group) || [], s = this.tableOption.footer || [];
|
|
452
464
|
return i.unshift({
|
|
453
465
|
header: !1,
|
|
454
466
|
column: t
|
|
@@ -525,7 +537,7 @@ const X = {
|
|
|
525
537
|
},
|
|
526
538
|
methods: {
|
|
527
539
|
setPx: _,
|
|
528
|
-
deepClone:
|
|
540
|
+
deepClone: D,
|
|
529
541
|
getComponent: W,
|
|
530
542
|
getPlaceholder: R,
|
|
531
543
|
uploadFun: j,
|
|
@@ -538,38 +550,37 @@ const X = {
|
|
|
538
550
|
isGroupShow(t, i) {
|
|
539
551
|
return this.isTabs ? i == this.activeName || i == 0 : !0;
|
|
540
552
|
},
|
|
541
|
-
|
|
553
|
+
// 初始化表单
|
|
542
554
|
dataFormat() {
|
|
543
|
-
|
|
555
|
+
const t = G(this.propOption).tableForm, i = this.value, s = {};
|
|
544
556
|
Object.entries(Object.assign(t, i)).forEach((r) => {
|
|
545
|
-
|
|
546
|
-
|
|
557
|
+
const p = r[0], e = r[1];
|
|
558
|
+
u(i[p]) ? s[p] = e : s[p] = i[p];
|
|
547
559
|
}), this.$set(this, "form", s), this.setLabel(), this.setControl(), this.setVal(), setTimeout(() => {
|
|
548
560
|
this.formCreate = !0, this.clearValidate();
|
|
549
561
|
});
|
|
550
562
|
},
|
|
551
563
|
setControl() {
|
|
552
564
|
this.propOption.forEach((t) => {
|
|
553
|
-
|
|
565
|
+
const i = t.prop, s = t.bind, r = t.control;
|
|
554
566
|
if (!this.formBind[i]) {
|
|
555
|
-
|
|
567
|
+
const p = [];
|
|
556
568
|
if (s) {
|
|
557
|
-
|
|
558
|
-
a !=
|
|
559
|
-
}), o = this.$watch(
|
|
560
|
-
a !=
|
|
569
|
+
const e = this.$watch(`form.${i}`, (a, n) => {
|
|
570
|
+
a != n && L(this.form, s, a);
|
|
571
|
+
}), o = this.$watch(`form.${s}`, (a, n) => {
|
|
572
|
+
a != n && this.$set(this.form, i, a);
|
|
561
573
|
});
|
|
562
574
|
p.push(e), p.push(o), this.$set(this.form, i, V(this.form, s));
|
|
563
575
|
}
|
|
564
576
|
if (r) {
|
|
565
577
|
const e = () => {
|
|
566
|
-
|
|
567
|
-
Object.keys(a).forEach((
|
|
568
|
-
|
|
569
|
-
this.$set(this.objectOption,
|
|
578
|
+
const a = r(this.form[t.prop], this.form) || {};
|
|
579
|
+
Object.keys(a).forEach((n) => {
|
|
580
|
+
const d = Object.assign(this.objectOption[n] || {}, a[n]);
|
|
581
|
+
this.$set(this.objectOption, n, d), a[n].dicData && (this.DIC[n] = a[n].dicData);
|
|
570
582
|
});
|
|
571
|
-
}
|
|
572
|
-
let o = this.$watch("form." + i, () => {
|
|
583
|
+
}, o = this.$watch(`form.${i}`, () => {
|
|
573
584
|
e();
|
|
574
585
|
});
|
|
575
586
|
p.push(o), e();
|
|
@@ -587,9 +598,10 @@ const X = {
|
|
|
587
598
|
this.$emit("input", this.form), this.$emit("change", this.form);
|
|
588
599
|
},
|
|
589
600
|
setLabel() {
|
|
590
|
-
this.tableOption.filterNull === !0 && (this.form =
|
|
591
|
-
let i
|
|
592
|
-
|
|
601
|
+
this.tableOption.filterNull === !0 && (this.form = $(this.form, [""], !1)), this.tableOption.filterDic == !0 ? this.form = $(this.form, ["$"], !1) : this.propOption.forEach((t) => {
|
|
602
|
+
let i;
|
|
603
|
+
const s = this.DIC[t.prop];
|
|
604
|
+
u(s) || (i = P(this.form, t, this.tableOption, s), i ? this.$set(this.form, `$${t.prop}`, i) : this.$delete(this.form, `$${t.prop}`));
|
|
593
605
|
});
|
|
594
606
|
},
|
|
595
607
|
handleGroupClick(t) {
|
|
@@ -600,9 +612,9 @@ const X = {
|
|
|
600
612
|
},
|
|
601
613
|
getLabelWidth(t, i) {
|
|
602
614
|
let s;
|
|
603
|
-
return
|
|
615
|
+
return u(t.labelWidth) ? u(i.labelWidth) ? s = this.parentOption.labelWidth : s = i.labelWidth : s = t.labelWidth, _(s, this.labelWidth);
|
|
604
616
|
},
|
|
605
|
-
|
|
617
|
+
// 对部分表单字段进行校验的方法
|
|
606
618
|
validateField(t) {
|
|
607
619
|
return this.$refs.form.validateField(t);
|
|
608
620
|
},
|
|
@@ -617,16 +629,16 @@ const X = {
|
|
|
617
629
|
const s = i.cascader, r = s.join(",");
|
|
618
630
|
s.forEach((p) => {
|
|
619
631
|
const e = p, o = this.form[i.prop], a = this.findObject(t, e);
|
|
620
|
-
|
|
621
|
-
this.form[
|
|
622
|
-
}), !(
|
|
632
|
+
u(a) || (this.formList.includes(r) && s.forEach((n) => {
|
|
633
|
+
this.form[n] = "", this.$set(this.DIC, n, []);
|
|
634
|
+
}), !(u(s) || u(o) || u(a)) && H({
|
|
623
635
|
column: a,
|
|
624
636
|
value: o,
|
|
625
637
|
form: this.form
|
|
626
|
-
}).then((
|
|
638
|
+
}).then((n) => {
|
|
627
639
|
this.formList.includes(r) || this.formList.push(r);
|
|
628
|
-
const d =
|
|
629
|
-
this.$set(this.DIC, e, d), !
|
|
640
|
+
const d = n || [];
|
|
641
|
+
this.$set(this.DIC, e, d), !u(d) && !u(d) && !u(a.cascaderIndex) && u(this.form[e]) && (this.form[e] = d[a.cascaderIndex][(a.props || {}).value || z.value]);
|
|
630
642
|
}));
|
|
631
643
|
});
|
|
632
644
|
});
|
|
@@ -640,7 +652,7 @@ const X = {
|
|
|
640
652
|
handleMock() {
|
|
641
653
|
this.isMock && (this.columnOption.forEach((t) => {
|
|
642
654
|
const i = K(t.column, this.DIC, this.form, this.isMock);
|
|
643
|
-
|
|
655
|
+
u(i) || Object.keys(i).forEach((s) => {
|
|
644
656
|
this.form[s] = i[s];
|
|
645
657
|
});
|
|
646
658
|
}), this.$nextTick(() => {
|
|
@@ -651,7 +663,7 @@ const X = {
|
|
|
651
663
|
let i;
|
|
652
664
|
if (this.detail)
|
|
653
665
|
return !1;
|
|
654
|
-
if (!
|
|
666
|
+
if (!u(t.detail))
|
|
655
667
|
i = "detail";
|
|
656
668
|
else if (this.isAdd)
|
|
657
669
|
i = "addDetail";
|
|
@@ -666,7 +678,7 @@ const X = {
|
|
|
666
678
|
let i;
|
|
667
679
|
if (this.disabled)
|
|
668
680
|
return !0;
|
|
669
|
-
if (!
|
|
681
|
+
if (!u(t.disabled))
|
|
670
682
|
i = "disabled";
|
|
671
683
|
else if (this.isAdd)
|
|
672
684
|
i = "addDisabled";
|
|
@@ -679,7 +691,7 @@ const X = {
|
|
|
679
691
|
// 验证表单是否显隐
|
|
680
692
|
vaildDisplay(t) {
|
|
681
693
|
let i;
|
|
682
|
-
return
|
|
694
|
+
return u(t.display) ? this.isAdd ? i = "addDisplay" : this.isEdit ? i = "editDisplay" : this.isView && (i = "viewDisplay") : i = "display", i ? I(t[i], !0) : !0;
|
|
683
695
|
},
|
|
684
696
|
async clearValidate(t) {
|
|
685
697
|
var i;
|
|
@@ -694,24 +706,24 @@ const X = {
|
|
|
694
706
|
},
|
|
695
707
|
validate(t) {
|
|
696
708
|
this.$refs.form.validate((i, s) => {
|
|
697
|
-
|
|
709
|
+
const r = [], p = [], e = {};
|
|
698
710
|
this.dynamicOption.forEach((o) => {
|
|
699
|
-
|
|
700
|
-
p.push(o.prop), a ?
|
|
701
|
-
r.push(
|
|
711
|
+
const a = o.children.type === "form";
|
|
712
|
+
p.push(o.prop), a ? u(this.$refs[o.prop][0].$refs.temp.$refs.main) || this.$refs[o.prop][0].$refs.temp.$refs.main.forEach((n) => {
|
|
713
|
+
r.push(n.validateCellForm());
|
|
702
714
|
}) : r.push(this.$refs[o.prop][0].$refs.temp.$refs.main.validateCellForm());
|
|
703
715
|
}), Promise.all(r).then((o) => {
|
|
704
|
-
o.forEach((
|
|
705
|
-
|
|
716
|
+
o.forEach((n, d) => {
|
|
717
|
+
u(n) || (e[p[d]] = n);
|
|
706
718
|
});
|
|
707
|
-
|
|
708
|
-
|
|
719
|
+
const a = Object.assign(e, s);
|
|
720
|
+
u(a) ? (this.show(), t(!0, this.hide)) : t(!1, this.hide, a);
|
|
709
721
|
});
|
|
710
722
|
});
|
|
711
723
|
},
|
|
712
724
|
resetForm(t = !0) {
|
|
713
725
|
if (t) {
|
|
714
|
-
|
|
726
|
+
const i = this.propOption.map((s) => s.prop);
|
|
715
727
|
this.form = M(this.form, i, (this.tableOption.filterParams || []).concat([this.rowKey]));
|
|
716
728
|
}
|
|
717
729
|
this.$nextTick(() => {
|
|
@@ -729,7 +741,7 @@ const X = {
|
|
|
729
741
|
},
|
|
730
742
|
submit() {
|
|
731
743
|
this.validate((t, i) => {
|
|
732
|
-
t ? this.$emit("submit",
|
|
744
|
+
t ? this.$emit("submit", $(this.form, ["$"]), this.hide) : this.$emit("error", i);
|
|
733
745
|
});
|
|
734
746
|
}
|
|
735
747
|
}
|
|
@@ -748,9 +760,9 @@ function Z(t) {
|
|
|
748
760
|
for (let i in S)
|
|
749
761
|
this[i] = S[i];
|
|
750
762
|
}
|
|
751
|
-
const
|
|
763
|
+
const lt = /* @__PURE__ */ function() {
|
|
752
764
|
return Y.exports;
|
|
753
765
|
}();
|
|
754
766
|
export {
|
|
755
|
-
|
|
767
|
+
lt as default
|
|
756
768
|
};
|