@web-utils/component 2.8.7 → 2.8.9
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/chat/index.mjs +1 -1
- package/chunk-file-uploader/index.mjs +5 -3
- package/chunks/FormTemp.a77c73c4.mjs +163 -0
- package/{icon-temp/index.mjs → chunks/IconTemp.a10129a6.mjs} +2 -2
- package/chunks/{dataformat.ab62230f.mjs → dataformat.4100726d.mjs} +8 -8
- package/chunks/{dic.7f13b573.mjs → dic.9e90e2a4.mjs} +1 -1
- package/chunks/{event.1ac32f1d.mjs → event.ebd9a3a6.mjs} +2 -2
- package/chunks/{init.47ce5ed9.mjs → init.27f6a0c4.mjs} +2 -2
- package/chunks/{util.505913d9.mjs → util.d691afb6.mjs} +17 -17
- package/dialog-form/index.mjs +1 -1
- package/egd-collapse-item/index.mjs +14 -12
- package/flow/index.mjs +1 -1
- package/flow-node/index.mjs +1 -1
- package/flow-viewer/index.mjs +33 -29
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +2504 -140
- package/fy-curd/style.css +1 -1
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +2 -2
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +538 -333
- package/fy-form/style.css +1 -1
- package/fy-form-design/index.mjs +21 -21
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +1 -1
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +14 -12
- package/fy-input-map/index.mjs +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +1 -1
- package/fy-input-tree/index.mjs +1 -1
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +1 -1
- package/fy-select/index.mjs +3 -3
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/image-cropper/index.mjs +1 -1
- package/image-preview/index.mjs +1 -1
- package/index.mjs +475 -552
- package/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/package.json +1 -1
- package/process-palette/index.mjs +190 -0
- package/process-palette/style.css +1 -0
- package/record-video/index.mjs +1 -1
- package/search/index.mjs +2 -2
- package/search-popover/index.mjs +1 -1
- package/sign/index.mjs +1 -1
- package/split-pane/index.mjs +104 -34
- package/text-ellipsis/index.mjs +1 -1
- package/tinymce-editor/index.mjs +846 -44
- package/tinymce-editor/style.css +1 -1
- package/verify/index.mjs +1 -1
- package/web-types.json +28 -658
- package/chunk-file-uploader-button/index.mjs +0 -60
- package/chunk-file-uploader-button/style.css +0 -1
- package/chunk-file-uploader-drop/index.mjs +0 -83
- package/chunk-file-uploader-drop/style.css +0 -1
- package/chunk-file-uploader-file/index.mjs +0 -311
- package/chunk-file-uploader-file/style.css +0 -1
- package/chunk-file-uploader-files/index.mjs +0 -49
- package/chunk-file-uploader-files/style.css +0 -1
- package/chunk-file-uploader-list/index.mjs +0 -50
- package/chunk-file-uploader-list/style.css +0 -1
- package/chunk-file-uploader-un-support/index.mjs +0 -51
- package/chunk-file-uploader-un-support/style.css +0 -1
- package/chunks/config.46422d7f.mjs +0 -73
- package/chunks/detail.6e46de33.mjs +0 -29
- package/chunks/mixins.5a78e0db.mjs +0 -16
- package/chunks/utils.97652d86.mjs +0 -26
- package/column/index.mjs +0 -115
- package/column-default/index.mjs +0 -106
- package/column-dynamic/index.mjs +0 -93
- package/column-menu/index.mjs +0 -288
- package/column-slot/index.mjs +0 -267
- package/dialog-column/index.mjs +0 -139
- package/dialog-excel/index.mjs +0 -211
- package/dialog-filter/index.mjs +0 -248
- package/form-group/index.mjs +0 -117
- package/form-group/style.css +0 -1
- package/form-temp/index.mjs +0 -137
- package/fy-dialog-form/index.mjs +0 -272
- package/fy-form-menu/index.mjs +0 -95
- package/header-menu/index.mjs +0 -238
- package/header-search/index.mjs +0 -255
- package/table-page/index.mjs +0 -130
- package/tinymce-wrapper/index.mjs +0 -821
- package/tinymce-wrapper/style.css +0 -1
- package/trigger/index.mjs +0 -71
package/fy-form/index.mjs
CHANGED
|
@@ -1,379 +1,584 @@
|
|
|
1
|
-
var D = (
|
|
2
|
-
var
|
|
1
|
+
var D = (e, i, r) => new Promise((s, p) => {
|
|
2
|
+
var t = (o) => {
|
|
3
3
|
try {
|
|
4
|
-
a(
|
|
5
|
-
} catch (
|
|
6
|
-
p(
|
|
4
|
+
a(r.next(o));
|
|
5
|
+
} catch (d) {
|
|
6
|
+
p(d);
|
|
7
7
|
}
|
|
8
8
|
}, l = (o) => {
|
|
9
9
|
try {
|
|
10
|
-
a(
|
|
11
|
-
} catch (
|
|
12
|
-
p(
|
|
10
|
+
a(r.throw(o));
|
|
11
|
+
} catch (d) {
|
|
12
|
+
p(d);
|
|
13
13
|
}
|
|
14
|
-
}, a = (o) => o.done ?
|
|
15
|
-
a((
|
|
14
|
+
}, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(t, l);
|
|
15
|
+
a((r = r.apply(e, i)).next());
|
|
16
16
|
});
|
|
17
|
-
import { d as
|
|
18
|
-
import { i as
|
|
19
|
-
import { s as
|
|
20
|
-
import {
|
|
21
|
-
import { s as
|
|
22
|
-
import { p as
|
|
23
|
-
import { isBlank as
|
|
24
|
-
import { n as
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
17
|
+
import { F as B, d as I } from "../chunks/FormTemp.a77c73c4.mjs";
|
|
18
|
+
import { i as M } from "../chunks/init.27f6a0c4.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.d691afb6.mjs";
|
|
20
|
+
import { d as H, c as U, a as q, b as K, f as J } from "../chunks/dataformat.4100726d.mjs";
|
|
21
|
+
import { s as Q } from "../chunks/dic.9e90e2a4.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
27
|
return;
|
|
28
28
|
if (!window.Mock) {
|
|
29
|
-
|
|
29
|
+
X.logs("mock");
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function a({ en:
|
|
34
|
-
return
|
|
32
|
+
const t = (window.Mock || {}).Random, l = {};
|
|
33
|
+
function a({ en: c }) {
|
|
34
|
+
return c ? t.name(!0) : t.cname();
|
|
35
35
|
}
|
|
36
|
-
function o({ max:
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
return Number(
|
|
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
40
|
} else
|
|
41
|
-
return
|
|
41
|
+
return t.integer(n, c);
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
let n =
|
|
45
|
-
const
|
|
46
|
-
return
|
|
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
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return n ?
|
|
48
|
+
function w({ format: c, now: n }) {
|
|
49
|
+
return n ? t.now(c) : t.datetime(c);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
51
|
+
function T({ min: c, max: n }) {
|
|
52
|
+
return t.csentence(c, n);
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
54
|
+
function N() {
|
|
55
|
+
return t.county(!0);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const m = n.value || "value", b =
|
|
59
|
-
if (["checkbox"].includes(
|
|
60
|
-
const
|
|
61
|
-
for (let
|
|
62
|
-
let
|
|
63
|
-
for (;
|
|
64
|
-
const
|
|
65
|
-
v.includes(k) || (v.push(k),
|
|
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
66
|
}
|
|
67
67
|
}
|
|
68
68
|
return v;
|
|
69
69
|
} else {
|
|
70
|
-
const
|
|
71
|
-
return
|
|
70
|
+
const _ = o({ min: 0, max: b - 1 });
|
|
71
|
+
return c[_][m];
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
function
|
|
75
|
-
Object.keys(
|
|
76
|
-
const n =
|
|
74
|
+
function z() {
|
|
75
|
+
Object.keys(e).forEach((c) => {
|
|
76
|
+
const n = e[c];
|
|
77
77
|
if (n.mock && typeof n.mock == "object") {
|
|
78
|
-
const
|
|
79
|
-
switch (
|
|
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
80
|
case "name":
|
|
81
|
-
l[n.prop] = a(
|
|
81
|
+
l[n.prop] = a(u);
|
|
82
82
|
break;
|
|
83
83
|
case "number":
|
|
84
|
-
l[n.prop] = o(
|
|
84
|
+
l[n.prop] = o(u);
|
|
85
85
|
break;
|
|
86
86
|
case "datetime":
|
|
87
|
-
l[n.prop] =
|
|
87
|
+
l[n.prop] = w(u);
|
|
88
88
|
break;
|
|
89
89
|
case "word":
|
|
90
|
-
l[n.prop] =
|
|
90
|
+
l[n.prop] = T(u);
|
|
91
91
|
break;
|
|
92
92
|
case "url":
|
|
93
|
-
l[n.prop] =
|
|
93
|
+
l[n.prop] = d(u);
|
|
94
94
|
break;
|
|
95
95
|
case "county":
|
|
96
|
-
l[n.prop] =
|
|
96
|
+
l[n.prop] = N();
|
|
97
97
|
break;
|
|
98
98
|
case "dic":
|
|
99
|
-
l[n.prop] =
|
|
99
|
+
l[n.prop] = P(u);
|
|
100
100
|
break;
|
|
101
101
|
}
|
|
102
102
|
} else
|
|
103
|
-
n.mock instanceof Function && (l[n.prop] = n.mock(
|
|
103
|
+
n.mock instanceof Function && (l[n.prop] = n.mock(r));
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
return
|
|
106
|
+
return z(), l;
|
|
107
107
|
};
|
|
108
|
-
var
|
|
109
|
-
var
|
|
110
|
-
return
|
|
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", {
|
|
111
315
|
class: ["avue-form", {
|
|
112
|
-
"avue--detail":
|
|
316
|
+
"avue--detail": e.isDetail
|
|
113
317
|
}],
|
|
114
318
|
style: {
|
|
115
|
-
width:
|
|
319
|
+
width: e.setPx(e.parentOption.formWidth, "100%")
|
|
116
320
|
}
|
|
117
|
-
}, [
|
|
321
|
+
}, [r("ElForm", {
|
|
118
322
|
ref: "form",
|
|
119
323
|
attrs: {
|
|
120
|
-
"status-icon":
|
|
121
|
-
model:
|
|
122
|
-
"label-suffix":
|
|
123
|
-
size:
|
|
124
|
-
"label-position":
|
|
125
|
-
"label-width":
|
|
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)
|
|
126
330
|
},
|
|
127
331
|
nativeOn: {
|
|
128
|
-
submit: function(
|
|
129
|
-
|
|
332
|
+
submit: function(s) {
|
|
333
|
+
s.preventDefault();
|
|
130
334
|
}
|
|
131
335
|
}
|
|
132
|
-
}, [
|
|
336
|
+
}, [r("ElRow", {
|
|
133
337
|
class: {
|
|
134
|
-
"avue-form__tabs":
|
|
338
|
+
"avue-form__tabs": e.isTabs
|
|
135
339
|
},
|
|
136
340
|
attrs: {
|
|
137
341
|
span: 24
|
|
138
342
|
}
|
|
139
|
-
}, [
|
|
140
|
-
return
|
|
141
|
-
key:
|
|
343
|
+
}, [e._l(e.columnOption, function(s, p) {
|
|
344
|
+
return r("FormGroup", {
|
|
345
|
+
key: s.prop,
|
|
142
346
|
attrs: {
|
|
143
|
-
tabs:
|
|
144
|
-
arrow:
|
|
145
|
-
collapse:
|
|
146
|
-
display:
|
|
147
|
-
icon:
|
|
347
|
+
tabs: e.isTabs,
|
|
348
|
+
arrow: s.arrow,
|
|
349
|
+
collapse: s.collapse,
|
|
350
|
+
display: e.vaildDisplay(s),
|
|
351
|
+
icon: s.icon,
|
|
148
352
|
index: p,
|
|
149
|
-
header: !
|
|
150
|
-
active:
|
|
151
|
-
label:
|
|
353
|
+
header: !e.isTabs,
|
|
354
|
+
active: e.activeName,
|
|
355
|
+
label: s.label
|
|
152
356
|
},
|
|
153
357
|
on: {
|
|
154
|
-
change:
|
|
358
|
+
change: e.handleGroupClick
|
|
155
359
|
},
|
|
156
|
-
scopedSlots:
|
|
360
|
+
scopedSlots: e._u([{
|
|
157
361
|
key: "tabs",
|
|
158
362
|
fn: function() {
|
|
159
|
-
return [
|
|
363
|
+
return [e.isTabs && p === 1 ? r("ElTabs", {
|
|
160
364
|
staticClass: "avue-form__tabs",
|
|
161
365
|
attrs: {
|
|
162
|
-
type:
|
|
366
|
+
type: e.tabsType
|
|
163
367
|
},
|
|
164
368
|
on: {
|
|
165
|
-
"tab-click":
|
|
369
|
+
"tab-click": e.handleTabClick
|
|
166
370
|
},
|
|
167
371
|
model: {
|
|
168
|
-
value:
|
|
169
|
-
callback: function(
|
|
170
|
-
|
|
372
|
+
value: e.activeName,
|
|
373
|
+
callback: function(t) {
|
|
374
|
+
e.activeName = t;
|
|
171
375
|
},
|
|
172
376
|
expression: "activeName"
|
|
173
377
|
}
|
|
174
|
-
}, [
|
|
175
|
-
return [
|
|
378
|
+
}, [e._l(e.columnOption, function(t, l) {
|
|
379
|
+
return [e.vaildDisplay(t) && l !== 0 ? r("ElTabPane", {
|
|
176
380
|
key: l,
|
|
177
381
|
attrs: {
|
|
178
382
|
name: `${l}`
|
|
179
383
|
},
|
|
180
|
-
scopedSlots:
|
|
384
|
+
scopedSlots: e._u([{
|
|
181
385
|
key: "label",
|
|
182
386
|
fn: function() {
|
|
183
|
-
return [
|
|
184
|
-
column:
|
|
185
|
-
}) : [
|
|
186
|
-
class:
|
|
187
|
-
}, [
|
|
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)];
|
|
188
392
|
},
|
|
189
393
|
proxy: !0
|
|
190
394
|
}], null, !0)
|
|
191
|
-
}) :
|
|
192
|
-
})], 2) :
|
|
395
|
+
}) : e._e()];
|
|
396
|
+
})], 2) : e._e()];
|
|
193
397
|
},
|
|
194
398
|
proxy: !0
|
|
195
|
-
},
|
|
399
|
+
}, e.getSlotName(s, "H", e.$scopedSlots) ? {
|
|
196
400
|
key: "header",
|
|
197
401
|
fn: function() {
|
|
198
|
-
return [
|
|
199
|
-
column:
|
|
402
|
+
return [e._t(e.getSlotName(s, "H"), null, {
|
|
403
|
+
column: s
|
|
200
404
|
})];
|
|
201
405
|
},
|
|
202
406
|
proxy: !0
|
|
203
407
|
} : null], null, !0)
|
|
204
|
-
}, [
|
|
408
|
+
}, [r("div", {
|
|
205
409
|
directives: [{
|
|
206
410
|
name: "show",
|
|
207
411
|
rawName: "v-show",
|
|
208
|
-
value:
|
|
412
|
+
value: e.isGroupShow(s, p),
|
|
209
413
|
expression: "isGroupShow(item, index)"
|
|
210
414
|
}],
|
|
211
415
|
class: ["avue-form__group", {
|
|
212
|
-
"avue-form__group--flex":
|
|
416
|
+
"avue-form__group--flex": s.flex === !1
|
|
213
417
|
}]
|
|
214
|
-
}, [
|
|
215
|
-
return [
|
|
418
|
+
}, [e._l(s.column, function(t, l) {
|
|
419
|
+
return [e.vaildDisplay(t) ? r("ElCol", {
|
|
216
420
|
key: l,
|
|
217
421
|
class: ["avue-form__row", {
|
|
218
|
-
"avue--detail avue--detail__column":
|
|
219
|
-
},
|
|
422
|
+
"avue--detail avue--detail__column": e.vaildDetail(t)
|
|
423
|
+
}, t.className],
|
|
220
424
|
style: {
|
|
221
|
-
paddingLeft:
|
|
222
|
-
paddingRight:
|
|
425
|
+
paddingLeft: e.gutter,
|
|
426
|
+
paddingRight: e.gutter
|
|
223
427
|
},
|
|
224
428
|
attrs: {
|
|
225
|
-
span:
|
|
226
|
-
md:
|
|
227
|
-
sm:
|
|
228
|
-
xs:
|
|
229
|
-
offset:
|
|
230
|
-
push:
|
|
231
|
-
pull:
|
|
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
|
|
232
436
|
}
|
|
233
|
-
}, [
|
|
234
|
-
class: `avue-form__item--${
|
|
437
|
+
}, [r("ElFormItem", {
|
|
438
|
+
class: `avue-form__item--${t.labelPosition || s.labelPosition || ""}`,
|
|
235
439
|
attrs: {
|
|
236
|
-
prop:
|
|
237
|
-
label:
|
|
238
|
-
rules:
|
|
239
|
-
"label-position":
|
|
240
|
-
"label-width":
|
|
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)
|
|
241
445
|
},
|
|
242
|
-
scopedSlots:
|
|
446
|
+
scopedSlots: e._u([e.getSlotName(t, "L", e.$scopedSlots) ? {
|
|
243
447
|
key: "label",
|
|
244
448
|
fn: function() {
|
|
245
|
-
return [
|
|
246
|
-
column:
|
|
247
|
-
value:
|
|
248
|
-
readonly:
|
|
249
|
-
disabled:
|
|
250
|
-
size:
|
|
251
|
-
dic:
|
|
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]
|
|
252
456
|
})];
|
|
253
457
|
},
|
|
254
458
|
proxy: !0
|
|
255
|
-
} :
|
|
459
|
+
} : t.labelTip ? {
|
|
256
460
|
key: "label",
|
|
257
461
|
fn: function() {
|
|
258
|
-
return [
|
|
462
|
+
return [r("ElTooltip", {
|
|
259
463
|
staticClass: "item",
|
|
260
464
|
attrs: {
|
|
261
465
|
effect: "dark",
|
|
262
|
-
placement:
|
|
466
|
+
placement: t.labelTipPlacement || "top-start"
|
|
263
467
|
},
|
|
264
|
-
scopedSlots:
|
|
468
|
+
scopedSlots: e._u([{
|
|
265
469
|
key: "content",
|
|
266
470
|
fn: function() {
|
|
267
|
-
return [
|
|
471
|
+
return [r("div", {
|
|
268
472
|
domProps: {
|
|
269
|
-
innerHTML:
|
|
473
|
+
innerHTML: e._s(t.labelTip)
|
|
270
474
|
}
|
|
271
475
|
})];
|
|
272
476
|
},
|
|
273
477
|
proxy: !0
|
|
274
478
|
}], null, !0)
|
|
275
|
-
}, [
|
|
479
|
+
}, [r("i", {
|
|
276
480
|
staticClass: "el-icon-info"
|
|
277
|
-
})]),
|
|
481
|
+
})]), r("span", [e._v(" " + e._s(t.label) + e._s(e.labelSuffix))])];
|
|
278
482
|
},
|
|
279
483
|
proxy: !0
|
|
280
|
-
} : null,
|
|
484
|
+
} : null, e.getSlotName(t, "E", e.$scopedSlots) ? {
|
|
281
485
|
key: "error",
|
|
282
486
|
fn: function(a) {
|
|
283
|
-
return [
|
|
284
|
-
column:
|
|
285
|
-
value:
|
|
286
|
-
readonly:
|
|
287
|
-
disabled:
|
|
288
|
-
size:
|
|
289
|
-
dic:
|
|
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]
|
|
290
494
|
}))];
|
|
291
495
|
}
|
|
292
496
|
} : null], null, !0)
|
|
293
|
-
}, [
|
|
497
|
+
}, [r(e.validTip(t) ? "div" : "elTooltip", {
|
|
294
498
|
tag: "Component",
|
|
295
499
|
attrs: {
|
|
296
|
-
disabled:
|
|
297
|
-
content:
|
|
298
|
-
placement:
|
|
500
|
+
disabled: e.validTip(t),
|
|
501
|
+
content: t.tip || e.getPlaceholder(t),
|
|
502
|
+
placement: t.tipPlacement
|
|
299
503
|
}
|
|
300
|
-
}, [
|
|
301
|
-
value:
|
|
302
|
-
column:
|
|
303
|
-
label:
|
|
304
|
-
size:
|
|
305
|
-
readonly:
|
|
306
|
-
disabled:
|
|
307
|
-
dic:
|
|
308
|
-
}) :
|
|
309
|
-
ref:
|
|
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,
|
|
310
514
|
refInFor: !0,
|
|
311
515
|
attrs: {
|
|
312
|
-
column:
|
|
313
|
-
dic:
|
|
314
|
-
props:
|
|
315
|
-
"props-http":
|
|
316
|
-
disabled:
|
|
317
|
-
readonly:
|
|
318
|
-
enter:
|
|
319
|
-
size:
|
|
320
|
-
"column-slot":
|
|
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
|
|
321
525
|
},
|
|
322
526
|
on: {
|
|
323
|
-
enter:
|
|
527
|
+
enter: e.submit,
|
|
324
528
|
change: function(a) {
|
|
325
|
-
return
|
|
529
|
+
return e.propChange(s.column, t);
|
|
326
530
|
}
|
|
327
531
|
},
|
|
328
|
-
scopedSlots:
|
|
532
|
+
scopedSlots: e._u([e._l(e.getSlotName(t, "T", e.$scopedSlots) ? [t] : [], function(a) {
|
|
329
533
|
return {
|
|
330
|
-
key:
|
|
534
|
+
key: e.getSlotName(t, "T"),
|
|
331
535
|
fn: function(o) {
|
|
332
|
-
return [
|
|
536
|
+
return [e._t(e.getSlotName(a, "T"), null, null, o)];
|
|
333
537
|
}
|
|
334
538
|
};
|
|
335
|
-
}),
|
|
539
|
+
}), e._l(e.columnSlot, function(a) {
|
|
336
540
|
return {
|
|
337
541
|
key: a,
|
|
338
542
|
fn: function(o) {
|
|
339
|
-
return [
|
|
543
|
+
return [e._t(a, null, null, o)];
|
|
340
544
|
}
|
|
341
545
|
};
|
|
342
546
|
})], null, !0),
|
|
343
547
|
model: {
|
|
344
|
-
value:
|
|
548
|
+
value: e.form[t.prop],
|
|
345
549
|
callback: function(a) {
|
|
346
|
-
|
|
550
|
+
e.$set(e.form, t.prop, a);
|
|
347
551
|
},
|
|
348
552
|
expression: "form[column.prop]"
|
|
349
553
|
}
|
|
350
|
-
}, "FormTemp",
|
|
554
|
+
}, "FormTemp", e.uploadFun(t), !1))], 2)], 1)], 1) : e._e(), e.vaildDisplay(t) && t.row && t.span !== 24 && t.count ? r("div", {
|
|
351
555
|
key: `line${l}`,
|
|
352
556
|
staticClass: "avue-form__line",
|
|
353
557
|
style: {
|
|
354
|
-
width: `${
|
|
558
|
+
width: `${t.count / 24 * 100}%`
|
|
355
559
|
}
|
|
356
|
-
}) :
|
|
357
|
-
}), !
|
|
358
|
-
scopedSlots:
|
|
560
|
+
}) : e._e()];
|
|
561
|
+
}), !e.isDetail && !e.isMenu ? r("FyFormMenu", {
|
|
562
|
+
scopedSlots: e._u([{
|
|
359
563
|
key: "menuForm",
|
|
360
|
-
fn: function(
|
|
361
|
-
return [
|
|
564
|
+
fn: function(t) {
|
|
565
|
+
return [e._t("menuForm", null, null, t)];
|
|
362
566
|
}
|
|
363
567
|
}], null, !0)
|
|
364
|
-
}) :
|
|
365
|
-
}), !
|
|
366
|
-
scopedSlots:
|
|
568
|
+
}) : e._e()], 2)]);
|
|
569
|
+
}), !e.isDetail && e.isMenu ? r("FyFormMenu", {
|
|
570
|
+
scopedSlots: e._u([{
|
|
367
571
|
key: "menuForm",
|
|
368
|
-
fn: function(
|
|
369
|
-
return [
|
|
572
|
+
fn: function(s) {
|
|
573
|
+
return [e._t("menuForm", null, null, s)];
|
|
370
574
|
}
|
|
371
575
|
}], null, !0)
|
|
372
|
-
}) :
|
|
373
|
-
},
|
|
374
|
-
const
|
|
576
|
+
}) : e._e()], 2)], 1)], 1);
|
|
577
|
+
}, ce = [];
|
|
578
|
+
const de = {
|
|
375
579
|
name: "FyForm",
|
|
376
|
-
|
|
580
|
+
components: { FormTemp: B, FyFormMenu: ue, FormGroup: se },
|
|
581
|
+
mixins: [M],
|
|
377
582
|
provide() {
|
|
378
583
|
return {
|
|
379
584
|
formSafe: this
|
|
@@ -417,7 +622,7 @@ const Y = {
|
|
|
417
622
|
},
|
|
418
623
|
computed: {
|
|
419
624
|
columnSlot() {
|
|
420
|
-
return Object.keys(this.$scopedSlots).filter((
|
|
625
|
+
return Object.keys(this.$scopedSlots).filter((e) => !this.propOption.map((i) => i.prop).includes(e));
|
|
421
626
|
},
|
|
422
627
|
labelSuffix() {
|
|
423
628
|
return this.parentOption.labelSuffix || ":";
|
|
@@ -441,7 +646,7 @@ const Y = {
|
|
|
441
646
|
return this.boxType === "view";
|
|
442
647
|
},
|
|
443
648
|
gutter() {
|
|
444
|
-
return
|
|
649
|
+
return y((this.parentOption.gutter || 10) / 2);
|
|
445
650
|
},
|
|
446
651
|
detail() {
|
|
447
652
|
return this.parentOption.detail;
|
|
@@ -459,34 +664,34 @@ const Y = {
|
|
|
459
664
|
return this.columnOption.length;
|
|
460
665
|
},
|
|
461
666
|
dynamicOption() {
|
|
462
|
-
const
|
|
667
|
+
const e = [];
|
|
463
668
|
return this.propOption.forEach((i) => {
|
|
464
|
-
i.type === "dynamic" && this.vaildDisplay(i) &&
|
|
465
|
-
}),
|
|
669
|
+
i.type === "dynamic" && this.vaildDisplay(i) && e.push(i);
|
|
670
|
+
}), e;
|
|
466
671
|
},
|
|
467
672
|
propOption() {
|
|
468
|
-
const
|
|
673
|
+
const e = [];
|
|
469
674
|
return this.columnOption.forEach((i) => {
|
|
470
|
-
i.display !== !1 && i.column.forEach((
|
|
471
|
-
|
|
675
|
+
i.display !== !1 && i.column.forEach((r) => {
|
|
676
|
+
e.push(r);
|
|
472
677
|
});
|
|
473
|
-
}),
|
|
678
|
+
}), e;
|
|
474
679
|
},
|
|
475
680
|
parentOption() {
|
|
476
681
|
return this.tableOption || {};
|
|
477
682
|
},
|
|
478
683
|
columnOption() {
|
|
479
|
-
const
|
|
684
|
+
const e = this.tableOption.column || [], i = x(this.tableOption.group) || [], r = this.tableOption.footer || [];
|
|
480
685
|
return i.unshift({
|
|
481
686
|
header: !1,
|
|
482
|
-
column:
|
|
483
|
-
}),
|
|
687
|
+
column: e
|
|
688
|
+
}), r.length !== 0 && i.push({
|
|
484
689
|
header: !1,
|
|
485
|
-
column:
|
|
486
|
-
}), i.forEach((
|
|
487
|
-
|
|
488
|
-
p.display !== !1 && !this.isMobile && (p =
|
|
489
|
-
}),
|
|
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));
|
|
490
695
|
}), i;
|
|
491
696
|
},
|
|
492
697
|
menuPosition: function() {
|
|
@@ -532,8 +737,8 @@ const Y = {
|
|
|
532
737
|
immediate: !0
|
|
533
738
|
},
|
|
534
739
|
allDisabled: {
|
|
535
|
-
handler(
|
|
536
|
-
this.$emit("update:status",
|
|
740
|
+
handler(e) {
|
|
741
|
+
this.$emit("update:status", e);
|
|
537
742
|
},
|
|
538
743
|
deep: !0,
|
|
539
744
|
immediate: !0
|
|
@@ -545,118 +750,118 @@ const Y = {
|
|
|
545
750
|
});
|
|
546
751
|
},
|
|
547
752
|
beforeDestroy() {
|
|
548
|
-
Object.keys(this.formBind).forEach((
|
|
549
|
-
this.formBind[
|
|
753
|
+
Object.keys(this.formBind).forEach((e) => {
|
|
754
|
+
this.formBind[e].forEach((i) => {
|
|
550
755
|
i();
|
|
551
756
|
});
|
|
552
757
|
});
|
|
553
758
|
},
|
|
554
759
|
methods: {
|
|
555
|
-
setPx:
|
|
556
|
-
deepClone:
|
|
557
|
-
getComponent:
|
|
558
|
-
getPlaceholder:
|
|
760
|
+
setPx: y,
|
|
761
|
+
deepClone: x,
|
|
762
|
+
getComponent: q,
|
|
763
|
+
getPlaceholder: K,
|
|
559
764
|
uploadFun: L,
|
|
560
|
-
getDisabled(
|
|
561
|
-
return this.vaildDetail(
|
|
765
|
+
getDisabled(e) {
|
|
766
|
+
return this.vaildDetail(e) || this.isDetail || this.vaildDisabled(e) || this.allDisabled;
|
|
562
767
|
},
|
|
563
|
-
getSpan(
|
|
564
|
-
return
|
|
768
|
+
getSpan(e) {
|
|
769
|
+
return e.span || this.parentOption.span || this.itemSpanDefault;
|
|
565
770
|
},
|
|
566
|
-
isGroupShow(
|
|
771
|
+
isGroupShow(e, i) {
|
|
567
772
|
return this.isTabs ? `${i}` === this.activeName || i === 0 : !0;
|
|
568
773
|
},
|
|
569
774
|
// 初始化表单
|
|
570
775
|
dataFormat() {
|
|
571
|
-
const
|
|
572
|
-
Object.entries(Object.assign(
|
|
573
|
-
const p =
|
|
574
|
-
|
|
575
|
-
}), this.$set(this, "form",
|
|
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(() => {
|
|
576
781
|
this.formCreate = !0, this.clearValidate();
|
|
577
782
|
});
|
|
578
783
|
},
|
|
579
784
|
setControl() {
|
|
580
|
-
this.propOption.forEach((
|
|
581
|
-
const i =
|
|
785
|
+
this.propOption.forEach((e) => {
|
|
786
|
+
const i = e.prop, r = e.bind, s = e.control;
|
|
582
787
|
if (!this.formBind[i]) {
|
|
583
788
|
const p = [];
|
|
584
|
-
if (
|
|
585
|
-
const
|
|
586
|
-
a !== o && V(this.form,
|
|
587
|
-
}), l = this.$watch(`form.${
|
|
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) => {
|
|
588
793
|
a !== o && this.$set(this.form, i, a);
|
|
589
794
|
});
|
|
590
|
-
p.push(
|
|
795
|
+
p.push(t), p.push(l), this.$set(this.form, i, A(this.form, r));
|
|
591
796
|
}
|
|
592
|
-
if (
|
|
593
|
-
const
|
|
594
|
-
const a =
|
|
797
|
+
if (s) {
|
|
798
|
+
const t = () => {
|
|
799
|
+
const a = s(this.form[e.prop], this.form) || {};
|
|
595
800
|
Object.keys(a).forEach((o) => {
|
|
596
|
-
const
|
|
597
|
-
this.$set(this.objectOption, 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);
|
|
598
803
|
});
|
|
599
804
|
}, l = this.$watch(`form.${i}`, () => {
|
|
600
|
-
|
|
805
|
+
t();
|
|
601
806
|
});
|
|
602
|
-
p.push(l),
|
|
807
|
+
p.push(l), t();
|
|
603
808
|
}
|
|
604
809
|
this.formBind[i] = p;
|
|
605
810
|
}
|
|
606
811
|
});
|
|
607
812
|
},
|
|
608
813
|
setForm() {
|
|
609
|
-
Object.keys(this.value).forEach((
|
|
610
|
-
this.$set(this.form,
|
|
814
|
+
Object.keys(this.value).forEach((e) => {
|
|
815
|
+
this.$set(this.form, e, this.value[e]);
|
|
611
816
|
});
|
|
612
817
|
},
|
|
613
818
|
setVal() {
|
|
614
819
|
this.$emit("input", this.form), this.$emit("change", this.form);
|
|
615
820
|
},
|
|
616
821
|
setLabel() {
|
|
617
|
-
this.tableOption.filterNull === !0 && (this.form =
|
|
618
|
-
const i = this.DIC[
|
|
619
|
-
if (
|
|
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))
|
|
620
825
|
return;
|
|
621
|
-
const
|
|
622
|
-
|
|
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}`);
|
|
623
828
|
});
|
|
624
829
|
},
|
|
625
|
-
handleGroupClick(
|
|
626
|
-
this.$emit("tab-click",
|
|
830
|
+
handleGroupClick(e) {
|
|
831
|
+
this.$emit("tab-click", e);
|
|
627
832
|
},
|
|
628
|
-
handleTabClick(
|
|
629
|
-
this.$emit("tab-click",
|
|
833
|
+
handleTabClick(e, i) {
|
|
834
|
+
this.$emit("tab-click", e, i);
|
|
630
835
|
},
|
|
631
|
-
getLabelWidth(
|
|
632
|
-
let
|
|
633
|
-
return
|
|
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);
|
|
634
839
|
},
|
|
635
840
|
// 对部分表单字段进行校验的方法
|
|
636
|
-
validateField(
|
|
637
|
-
return this.$refs.form.validateField(
|
|
841
|
+
validateField(e) {
|
|
842
|
+
return this.$refs.form.validateField(e);
|
|
638
843
|
},
|
|
639
|
-
validTip(
|
|
640
|
-
return !
|
|
844
|
+
validTip(e) {
|
|
845
|
+
return !e.tip || e.type === "upload";
|
|
641
846
|
},
|
|
642
|
-
getPropRef(
|
|
643
|
-
return this.$refs[
|
|
847
|
+
getPropRef(e) {
|
|
848
|
+
return this.$refs[e][0];
|
|
644
849
|
},
|
|
645
|
-
handleChange(
|
|
850
|
+
handleChange(e, i) {
|
|
646
851
|
this.$nextTick(() => {
|
|
647
|
-
const
|
|
648
|
-
|
|
649
|
-
const
|
|
650
|
-
|
|
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) => {
|
|
651
856
|
this.form[o] = "", this.$set(this.DIC, o, []);
|
|
652
|
-
}), !(
|
|
857
|
+
}), !(f(r) || f(l) || f(a)) && Q({
|
|
653
858
|
column: a,
|
|
654
859
|
value: l,
|
|
655
860
|
form: this.form
|
|
656
861
|
}).then((o) => {
|
|
657
|
-
this.formList.includes(
|
|
658
|
-
const
|
|
659
|
-
this.$set(this.DIC,
|
|
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]);
|
|
660
865
|
}));
|
|
661
866
|
});
|
|
662
867
|
});
|
|
@@ -664,24 +869,24 @@ const Y = {
|
|
|
664
869
|
handlePrint() {
|
|
665
870
|
this.$Print(this.$el);
|
|
666
871
|
},
|
|
667
|
-
propChange(
|
|
668
|
-
i.cascader && this.handleChange(
|
|
872
|
+
propChange(e, i) {
|
|
873
|
+
i.cascader && this.handleChange(e, i);
|
|
669
874
|
},
|
|
670
875
|
handleMock() {
|
|
671
|
-
this.isMock && (this.columnOption.forEach((
|
|
672
|
-
const i =
|
|
673
|
-
|
|
674
|
-
this.form[
|
|
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];
|
|
675
880
|
});
|
|
676
881
|
}), this.$nextTick(() => {
|
|
677
882
|
this.clearValidate(), this.$emit("mock-change", this.form);
|
|
678
883
|
}));
|
|
679
884
|
},
|
|
680
|
-
vaildDetail(
|
|
885
|
+
vaildDetail(e) {
|
|
681
886
|
let i;
|
|
682
887
|
if (this.detail)
|
|
683
888
|
return !1;
|
|
684
|
-
if (!
|
|
889
|
+
if (!f(e.detail))
|
|
685
890
|
i = "detail";
|
|
686
891
|
else if (this.isAdd)
|
|
687
892
|
i = "addDetail";
|
|
@@ -689,14 +894,14 @@ const Y = {
|
|
|
689
894
|
i = "editDetail";
|
|
690
895
|
else if (this.isView)
|
|
691
896
|
return !1;
|
|
692
|
-
return i ?
|
|
897
|
+
return i ? e[i] === !0 : !1;
|
|
693
898
|
},
|
|
694
899
|
// 验证表单是否禁止
|
|
695
|
-
vaildDisabled(
|
|
900
|
+
vaildDisabled(e) {
|
|
696
901
|
let i;
|
|
697
902
|
if (this.disabled)
|
|
698
903
|
return !0;
|
|
699
|
-
if (!
|
|
904
|
+
if (!f(e.disabled))
|
|
700
905
|
i = "disabled";
|
|
701
906
|
else if (this.isAdd)
|
|
702
907
|
i = "addDisabled";
|
|
@@ -704,47 +909,47 @@ const Y = {
|
|
|
704
909
|
i = "editDisabled";
|
|
705
910
|
else if (this.isView)
|
|
706
911
|
return !0;
|
|
707
|
-
return i ?
|
|
912
|
+
return i ? e[i] === !0 : !1;
|
|
708
913
|
},
|
|
709
914
|
// 验证表单是否显隐
|
|
710
|
-
vaildDisplay(
|
|
915
|
+
vaildDisplay(e) {
|
|
711
916
|
let i;
|
|
712
|
-
return
|
|
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;
|
|
713
918
|
},
|
|
714
|
-
clearValidate(
|
|
919
|
+
clearValidate(e) {
|
|
715
920
|
return D(this, null, function* () {
|
|
716
921
|
var i;
|
|
717
|
-
(i = this.$refs.form) == null || i.clearValidate(
|
|
922
|
+
(i = this.$refs.form) == null || i.clearValidate(e);
|
|
718
923
|
});
|
|
719
924
|
},
|
|
720
925
|
validateCellForm() {
|
|
721
|
-
return new Promise((
|
|
722
|
-
this.$refs.form.validate((i,
|
|
723
|
-
|
|
926
|
+
return new Promise((e) => {
|
|
927
|
+
this.$refs.form.validate((i, r) => {
|
|
928
|
+
e(r);
|
|
724
929
|
});
|
|
725
930
|
});
|
|
726
931
|
},
|
|
727
|
-
validate(
|
|
728
|
-
this.$refs.form.validate((i,
|
|
729
|
-
const
|
|
932
|
+
validate(e) {
|
|
933
|
+
this.$refs.form.validate((i, r) => {
|
|
934
|
+
const s = [], p = [], t = {};
|
|
730
935
|
this.dynamicOption.forEach((l) => {
|
|
731
936
|
const a = l.children.type === "form";
|
|
732
|
-
p.push(l.prop), a ?
|
|
733
|
-
|
|
734
|
-
}) :
|
|
735
|
-
}), Promise.all(
|
|
736
|
-
l.forEach((o,
|
|
737
|
-
|
|
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);
|
|
738
943
|
});
|
|
739
|
-
const a = Object.assign(
|
|
740
|
-
|
|
944
|
+
const a = Object.assign(t, r);
|
|
945
|
+
f(a) ? (this.show(), e(!0, this.hide)) : e(!1, this.hide, a);
|
|
741
946
|
});
|
|
742
947
|
});
|
|
743
948
|
},
|
|
744
|
-
resetForm(
|
|
745
|
-
if (
|
|
746
|
-
const i = this.propOption.map((
|
|
747
|
-
this.form =
|
|
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]));
|
|
748
953
|
}
|
|
749
954
|
this.$nextTick(() => {
|
|
750
955
|
this.clearValidate(), this.$emit("reset-change");
|
|
@@ -760,29 +965,29 @@ const Y = {
|
|
|
760
965
|
this.allDisabled = !1;
|
|
761
966
|
},
|
|
762
967
|
submit() {
|
|
763
|
-
this.validate((
|
|
764
|
-
|
|
968
|
+
this.validate((e, i) => {
|
|
969
|
+
e ? this.$emit("submit", S(this.form, ["$"]), this.hide) : this.$emit("error", i);
|
|
765
970
|
});
|
|
766
971
|
}
|
|
767
972
|
}
|
|
768
|
-
},
|
|
769
|
-
var
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
973
|
+
}, E = {};
|
|
974
|
+
var he = /* @__PURE__ */ $(
|
|
975
|
+
de,
|
|
976
|
+
fe,
|
|
977
|
+
ce,
|
|
773
978
|
!1,
|
|
774
|
-
|
|
979
|
+
me,
|
|
775
980
|
null,
|
|
776
981
|
null,
|
|
777
982
|
null
|
|
778
983
|
);
|
|
779
|
-
function
|
|
780
|
-
for (let i in
|
|
781
|
-
this[i] =
|
|
984
|
+
function me(e) {
|
|
985
|
+
for (let i in E)
|
|
986
|
+
this[i] = E[i];
|
|
782
987
|
}
|
|
783
|
-
const
|
|
784
|
-
return
|
|
988
|
+
const De = /* @__PURE__ */ function() {
|
|
989
|
+
return he.exports;
|
|
785
990
|
}();
|
|
786
991
|
export {
|
|
787
|
-
|
|
992
|
+
De as default
|
|
788
993
|
};
|