@web-utils/component 3.8.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/card/index.mjs +13 -13
- package/chat/index.mjs +2 -2
- package/chunks/{FormTemp.BSpnNput.mjs → FormTemp.Bu2VCxUh.mjs} +2 -2
- package/chunks/{dataformat.B9UvztrQ.mjs → dataformat.CpqOeGBl.mjs} +2 -2
- package/chunks/{dic.CET0XdKP.mjs → dic.Dkl-leRW.mjs} +43 -43
- package/chunks/{event.BT1F_1vF.mjs → event.9aDS6jcw.mjs} +2 -2
- package/chunks/{init.ofpxEyAI.mjs → init.DAsXSoLW.mjs} +2 -2
- package/chunks/{packages.CWPkeLu9.mjs → packages.ByyangTp.mjs} +3 -3
- package/chunks/{util.CoahLDYn.mjs → util.DqFv_pWg.mjs} +54 -55
- package/dialog-form/index.mjs +6 -6
- package/flow/index.mjs +30 -32
- package/flow-designer/index.mjs +1 -1
- package/flow-node/index.mjs +1 -1
- package/form-holder/index.mjs +18 -36
- package/form-view/index.mjs +21 -23
- 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 +141 -137
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +27 -19
- package/fy-dynamic/index.mjs +64 -57
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +117 -136
- package/fy-form-design/index.mjs +15 -16
- package/fy-form-design/style.css +1 -1
- package/fy-input/index.mjs +2 -2
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +1 -1
- package/fy-input-map/index.mjs +56 -51
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +46 -38
- 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 +4 -4
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-tabs/index.mjs +0 -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 +3 -3
- package/highlight-j-s/index.mjs +1 -1
- package/image-cropper/index.mjs +1 -1
- package/image-preview/index.mjs +1 -1
- package/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/monaco-editor/index.mjs +10 -12
- package/package.json +17 -17
- package/pageable-table/index.mjs +33 -37
- package/pageable-view/index.mjs +53 -57
- 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 +3 -3
- package/table-view/index.mjs +1 -3
- package/text-ellipsis/index.mjs +1 -1
- package/verify/index.mjs +1 -1
- package/vue-cron/index.mjs +117 -97
- package/vue-quill-editor/index.mjs +24 -13
- package/vue-tags-input/index.mjs +21 -10
- package/vue-video-player/index.mjs +10 -12
- package/web-types.json +2 -5
package/fy-form/index.mjs
CHANGED
|
@@ -1,108 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
}, l = (o) => {
|
|
9
|
-
try {
|
|
10
|
-
a(r.throw(o));
|
|
11
|
-
} catch (d) {
|
|
12
|
-
p(d);
|
|
13
|
-
}
|
|
14
|
-
}, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(t, l);
|
|
15
|
-
a((r = r.apply(i, e)).next());
|
|
16
|
-
});
|
|
17
|
-
import { F as P, d as z } from "../chunks/FormTemp.BSpnNput.mjs";
|
|
18
|
-
import { i as B } from "../chunks/init.ofpxEyAI.mjs";
|
|
19
|
-
import { u as j, d as x, s as v, j as S, x as I, o as L, D as V, y as M, p as A } from "../chunks/util.CoahLDYn.mjs";
|
|
20
|
-
import { a as W, b as R, f as G, d as H, c as U } from "../chunks/dataformat.B9UvztrQ.mjs";
|
|
21
|
-
import { s as q } from "../chunks/dic.CET0XdKP.mjs";
|
|
22
|
-
import { p as K } from "../chunks/packages.CWPkeLu9.mjs";
|
|
1
|
+
import { F as N, d as P } from "../chunks/FormTemp.Bu2VCxUh.mjs";
|
|
2
|
+
import { i as z } from "../chunks/init.DAsXSoLW.mjs";
|
|
3
|
+
import { u as B, d as D, s as v, j as S, x as j, o as I, D as L, y as V, p as M } from "../chunks/util.DqFv_pWg.mjs";
|
|
4
|
+
import { a as A, b as W, f as R, d as G, c as H } from "../chunks/dataformat.CpqOeGBl.mjs";
|
|
5
|
+
import { s as U } from "../chunks/dic.Dkl-leRW.mjs";
|
|
6
|
+
import { p as K } from "../chunks/packages.ByyangTp.mjs";
|
|
23
7
|
import { isBlank as u } from "@web-utils/core";
|
|
24
8
|
import { n as $ } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
25
|
-
const
|
|
9
|
+
const q = (i, e, r, s) => {
|
|
26
10
|
if (!s) return;
|
|
27
11
|
if (!window.Mock) {
|
|
28
12
|
K.logs("mock");
|
|
29
13
|
return;
|
|
30
14
|
}
|
|
31
|
-
const t = (window.Mock || {}).Random,
|
|
32
|
-
function
|
|
15
|
+
const t = (window.Mock || {}).Random, n = {};
|
|
16
|
+
function o({ en: c }) {
|
|
33
17
|
return c ? t.name(!0) : t.cname();
|
|
34
18
|
}
|
|
35
|
-
function
|
|
19
|
+
function l({ max: c, min: a, precision: f }) {
|
|
36
20
|
if (f) {
|
|
37
|
-
const h = `${t.float(
|
|
21
|
+
const h = `${t.float(a, c, f)}`, m = h.indexOf(".") + 1;
|
|
38
22
|
return Number(h.substring(0, m + f));
|
|
39
23
|
} else
|
|
40
|
-
return t.integer(
|
|
24
|
+
return t.integer(a, c);
|
|
41
25
|
}
|
|
42
26
|
function d({ header: c }) {
|
|
43
|
-
let
|
|
44
|
-
const f =
|
|
45
|
-
return c === !1 ?
|
|
27
|
+
let a = t.url();
|
|
28
|
+
const f = a.indexOf("://");
|
|
29
|
+
return c === !1 ? a = a.substring(f + 3) : a = `http://${a.substring(f + 3)}`, a;
|
|
46
30
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
31
|
+
function x({ format: c, now: a }) {
|
|
32
|
+
return a ? t.now(c) : t.datetime(c);
|
|
49
33
|
}
|
|
50
|
-
function
|
|
51
|
-
return t.csentence(c,
|
|
34
|
+
function F({ min: c, max: a }) {
|
|
35
|
+
return t.csentence(c, a);
|
|
52
36
|
}
|
|
53
|
-
function
|
|
37
|
+
function C() {
|
|
54
38
|
return t.county(!0);
|
|
55
39
|
}
|
|
56
|
-
function
|
|
57
|
-
const m =
|
|
40
|
+
function E({ dic: c, props: a, columnType: f, multiple: h }) {
|
|
41
|
+
const m = a.value || "value", b = c.length;
|
|
58
42
|
if (["checkbox"].includes(f) || h) {
|
|
59
|
-
const _ =
|
|
43
|
+
const _ = l({ min: 1, max: b }), y = [];
|
|
60
44
|
for (let g = 0; g < _; g++) {
|
|
61
45
|
let O = !0;
|
|
62
46
|
for (; O; ) {
|
|
63
|
-
const
|
|
47
|
+
const T = l({ min: 0, max: b - 1 }), k = c[T][m];
|
|
64
48
|
y.includes(k) || (y.push(k), O = !1);
|
|
65
49
|
}
|
|
66
50
|
}
|
|
67
51
|
return y;
|
|
68
52
|
} else {
|
|
69
|
-
const _ =
|
|
53
|
+
const _ = l({ min: 0, max: b - 1 });
|
|
70
54
|
return c[_][m];
|
|
71
55
|
}
|
|
72
56
|
}
|
|
73
|
-
function
|
|
57
|
+
function w() {
|
|
74
58
|
Object.keys(i).forEach((c) => {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
const f =
|
|
78
|
-
switch (f.dic = typeof
|
|
59
|
+
const a = i[c];
|
|
60
|
+
if (a.mock && typeof a.mock == "object") {
|
|
61
|
+
const f = a.mock;
|
|
62
|
+
switch (f.dic = typeof a.dicData == "string" ? e[a.dicData] : a.dicData || [], f.props = a.props || {}, f.columnType = a.type, f.multiple = a.multiple, f.type) {
|
|
79
63
|
case "name":
|
|
80
|
-
|
|
64
|
+
n[a.prop] = o(f);
|
|
81
65
|
break;
|
|
82
66
|
case "number":
|
|
83
|
-
|
|
67
|
+
n[a.prop] = l(f);
|
|
84
68
|
break;
|
|
85
69
|
case "datetime":
|
|
86
|
-
|
|
70
|
+
n[a.prop] = x(f);
|
|
87
71
|
break;
|
|
88
72
|
case "word":
|
|
89
|
-
|
|
73
|
+
n[a.prop] = F(f);
|
|
90
74
|
break;
|
|
91
75
|
case "url":
|
|
92
|
-
|
|
76
|
+
n[a.prop] = d(f);
|
|
93
77
|
break;
|
|
94
78
|
case "county":
|
|
95
|
-
|
|
79
|
+
n[a.prop] = C();
|
|
96
80
|
break;
|
|
97
81
|
case "dic":
|
|
98
|
-
|
|
82
|
+
n[a.prop] = E(f);
|
|
99
83
|
break;
|
|
100
84
|
}
|
|
101
|
-
} else
|
|
85
|
+
} else a.mock instanceof Function && (n[a.prop] = a.mock(r));
|
|
102
86
|
});
|
|
103
87
|
}
|
|
104
|
-
return
|
|
105
|
-
},
|
|
88
|
+
return w(), n;
|
|
89
|
+
}, J = {
|
|
106
90
|
name: "FormGroup",
|
|
107
91
|
props: {
|
|
108
92
|
arrow: {
|
|
@@ -155,7 +139,7 @@ const J = (i, e, r, s) => {
|
|
|
155
139
|
}
|
|
156
140
|
}
|
|
157
141
|
};
|
|
158
|
-
var
|
|
142
|
+
var Q = function() {
|
|
159
143
|
var e = this, r = e._self._c;
|
|
160
144
|
return e.display ? r("div", { class: ["avue-group", { "avue-group--header": !e.isHeader, "avue-group__arrow": !e.arrow }] }, [e._t("tabs"), r("ElCollapse", { attrs: { value: e.text }, on: { change: e.handleChange }, model: { value: e.activeName, callback: function(s) {
|
|
161
145
|
e.activeName = s;
|
|
@@ -164,15 +148,15 @@ var X = function() {
|
|
|
164
148
|
return [e.icon ? r("i", { class: [e.icon, "avue-group__icon"] }) : e._e(), e.label ? r("h1", { staticClass: "avue-group__title" }, [e._v(" " + e._s(e.label) + " ")]) : e._e()];
|
|
165
149
|
})], 2)];
|
|
166
150
|
}, proxy: !0 }], null, !0) }, [e._t("default")], 2)], 1)], 2) : e._e();
|
|
167
|
-
},
|
|
151
|
+
}, X = [], Y = /* @__PURE__ */ $(
|
|
152
|
+
J,
|
|
168
153
|
Q,
|
|
169
154
|
X,
|
|
170
|
-
Y,
|
|
171
155
|
!1,
|
|
172
156
|
null,
|
|
173
157
|
null
|
|
174
158
|
);
|
|
175
|
-
const
|
|
159
|
+
const Z = Y.exports, ee = {
|
|
176
160
|
name: "FyFormMenu",
|
|
177
161
|
inject: ["formSafe"],
|
|
178
162
|
computed: {
|
|
@@ -186,21 +170,21 @@ const ee = Z.exports, te = {
|
|
|
186
170
|
}
|
|
187
171
|
}
|
|
188
172
|
};
|
|
189
|
-
var
|
|
173
|
+
var te = function() {
|
|
190
174
|
var e = this, r = e._self._c;
|
|
191
175
|
return e.formSafe.parentOption.menuBtn !== !1 ? r("ElCol", { class: ["menu", e.formSafe.menuPosition, "no-print"], style: e.styleName, attrs: { span: e.menuSpan, md: e.menuSpan } }, [r("ElFormItem", { staticStyle: { "text-align": "center" }, attrs: { "label-width": "0px" } }, [e.formSafe.isMock ? r("ElButton", { attrs: { type: "primary", size: e.formSafe.controlSize, icon: "el-icon-edit-outline", disabled: e.formSafe.allDisabled }, on: { click: e.formSafe.handleMock } }, [e._v(" " + e._s(e.formSafe.parentOption.mockText || "模拟") + " ")]) : e._e(), e.formSafe.isPrint ? r("ElButton", { attrs: { type: "primary", size: e.formSafe.controlSize, icon: "el-icon-printer", disabled: e.formSafe.allDisabled }, on: { click: e.formSafe.handlePrint } }, [e._v(" " + e._s(e.formSafe.parentOption.printText || "打印") + " ")]) : e._e(), e.formSafe.parentOption.submitBtn !== !1 ? r("ElButton", { attrs: { type: "primary", size: e.formSafe.controlSize, icon: e.formSafe.parentOption.submitIcon || "el-icon-check", loading: e.formSafe.allDisabled }, on: { click: e.formSafe.submit } }, [e._v(" " + e._s(e.formSafe.parentOption.submitText || "提交") + " ")]) : e._e(), e.formSafe.parentOption.emptyBtn !== !1 ? r("ElButton", { attrs: { icon: e.formSafe.parentOption.emptyIcon || "el-icon-delete", size: e.formSafe.controlSize, disabled: e.formSafe.allDisabled }, on: { click: e.formSafe.resetForm } }, [e._v(" " + e._s(e.formSafe.parentOption.emptyText || "清空") + " ")]) : e._e(), e._t("menuForm", null, { disabled: e.formSafe.allDisabled, size: e.formSafe.controlSize })], 2)], 1) : e._e();
|
|
192
|
-
},
|
|
176
|
+
}, ie = [], re = /* @__PURE__ */ $(
|
|
177
|
+
ee,
|
|
193
178
|
te,
|
|
194
179
|
ie,
|
|
195
|
-
re,
|
|
196
180
|
!1,
|
|
197
181
|
null,
|
|
198
182
|
null
|
|
199
183
|
);
|
|
200
|
-
const
|
|
184
|
+
const se = re.exports, ae = {
|
|
201
185
|
name: "FyForm",
|
|
202
|
-
components: { FormTemp:
|
|
203
|
-
mixins: [
|
|
186
|
+
components: { FormTemp: N, FyFormMenu: se, FormGroup: Z },
|
|
187
|
+
mixins: [z],
|
|
204
188
|
provide() {
|
|
205
189
|
return {
|
|
206
190
|
formSafe: this
|
|
@@ -223,7 +207,6 @@ const ae = se.exports, oe = {
|
|
|
223
207
|
},
|
|
224
208
|
value: {
|
|
225
209
|
type: Object,
|
|
226
|
-
required: !0,
|
|
227
210
|
default: () => ({})
|
|
228
211
|
}
|
|
229
212
|
},
|
|
@@ -303,7 +286,7 @@ const ae = se.exports, oe = {
|
|
|
303
286
|
return this.tableOption || {};
|
|
304
287
|
},
|
|
305
288
|
columnOption() {
|
|
306
|
-
const i = this.tableOption.column || [], e =
|
|
289
|
+
const i = this.tableOption.column || [], e = D(this.tableOption.group) || [], r = this.tableOption.footer || [];
|
|
307
290
|
return e.unshift({
|
|
308
291
|
header: !1,
|
|
309
292
|
column: i
|
|
@@ -312,14 +295,14 @@ const ae = se.exports, oe = {
|
|
|
312
295
|
column: r
|
|
313
296
|
}), e.forEach((s) => {
|
|
314
297
|
s.column = s.column || [], s.column.forEach((p, t) => {
|
|
315
|
-
p.display !== !1 && !this.isMobile && (p =
|
|
316
|
-
}), s.column =
|
|
298
|
+
p.display !== !1 && !this.isMobile && (p = G(p, this.itemSpanDefault, t === 0));
|
|
299
|
+
}), s.column = H(s.column), s.column = s.column.sort((p, t) => (t.order || 0) - (p.order || 0));
|
|
317
300
|
}), e;
|
|
318
301
|
},
|
|
319
|
-
menuPosition
|
|
302
|
+
menuPosition() {
|
|
320
303
|
return this.parentOption.menuPosition ? this.parentOption.menuPosition : "center";
|
|
321
304
|
},
|
|
322
|
-
boxType
|
|
305
|
+
boxType() {
|
|
323
306
|
return this.parentOption.boxType;
|
|
324
307
|
},
|
|
325
308
|
isPrint() {
|
|
@@ -380,10 +363,10 @@ const ae = se.exports, oe = {
|
|
|
380
363
|
},
|
|
381
364
|
methods: {
|
|
382
365
|
setPx: v,
|
|
383
|
-
deepClone:
|
|
384
|
-
getComponent:
|
|
385
|
-
getPlaceholder:
|
|
386
|
-
uploadFun:
|
|
366
|
+
deepClone: D,
|
|
367
|
+
getComponent: W,
|
|
368
|
+
getPlaceholder: A,
|
|
369
|
+
uploadFun: B,
|
|
387
370
|
getDisabled(i) {
|
|
388
371
|
return this.vaildDetail(i) || this.isDetail || this.vaildDisabled(i) || this.allDisabled;
|
|
389
372
|
},
|
|
@@ -395,7 +378,7 @@ const ae = se.exports, oe = {
|
|
|
395
378
|
},
|
|
396
379
|
// 初始化表单
|
|
397
380
|
dataFormat() {
|
|
398
|
-
const i =
|
|
381
|
+
const i = R(this.propOption).tableForm, e = this.value, r = {};
|
|
399
382
|
Object.entries(Object.assign(i, e)).forEach((s) => {
|
|
400
383
|
const p = s[0], t = s[1];
|
|
401
384
|
u(e[p]) ? r[p] = t : r[p] = e[p];
|
|
@@ -409,24 +392,24 @@ const ae = se.exports, oe = {
|
|
|
409
392
|
if (!this.formBind[e]) {
|
|
410
393
|
const p = [];
|
|
411
394
|
if (r) {
|
|
412
|
-
const t = this.$watch(`form.${e}`, (
|
|
413
|
-
|
|
414
|
-
}),
|
|
415
|
-
|
|
395
|
+
const t = this.$watch(`form.${e}`, (o, l) => {
|
|
396
|
+
o !== l && V(this.form, r, o);
|
|
397
|
+
}), n = this.$watch(`form.${r}`, (o, l) => {
|
|
398
|
+
o !== l && this.$set(this.form, e, o);
|
|
416
399
|
});
|
|
417
|
-
p.push(t), p.push(
|
|
400
|
+
p.push(t), p.push(n), this.$set(this.form, e, M(this.form, r));
|
|
418
401
|
}
|
|
419
402
|
if (s) {
|
|
420
403
|
const t = () => {
|
|
421
|
-
const
|
|
422
|
-
Object.keys(
|
|
423
|
-
const d = Object.assign(this.objectOption[
|
|
424
|
-
this.$set(this.objectOption,
|
|
404
|
+
const o = s(this.form[i.prop], this.form) || {};
|
|
405
|
+
Object.keys(o).forEach((l) => {
|
|
406
|
+
const d = Object.assign(this.objectOption[l] || {}, o[l]);
|
|
407
|
+
this.$set(this.objectOption, l, d), o[l].dicData && (this.DIC[l] = o[l].dicData);
|
|
425
408
|
});
|
|
426
|
-
},
|
|
409
|
+
}, n = this.$watch(`form.${e}`, () => {
|
|
427
410
|
t();
|
|
428
411
|
});
|
|
429
|
-
p.push(
|
|
412
|
+
p.push(n), t();
|
|
430
413
|
}
|
|
431
414
|
this.formBind[e] = p;
|
|
432
415
|
}
|
|
@@ -444,7 +427,7 @@ const ae = se.exports, oe = {
|
|
|
444
427
|
this.tableOption.filterNull === !0 && (this.form = S(this.form, [""], !1)), this.tableOption.filterDic === !0 ? this.form = S(this.form, ["$"], !1) : this.propOption.forEach((i) => {
|
|
445
428
|
const e = this.DIC[i.prop];
|
|
446
429
|
if (u(e)) return;
|
|
447
|
-
const r =
|
|
430
|
+
const r = P(this.form, i, this.tableOption, e);
|
|
448
431
|
r ? this.$set(this.form, `$${i.prop}`, r) : this.$delete(this.form, `$${i.prop}`);
|
|
449
432
|
});
|
|
450
433
|
},
|
|
@@ -472,17 +455,17 @@ const ae = se.exports, oe = {
|
|
|
472
455
|
this.$nextTick(() => {
|
|
473
456
|
const r = e.cascader, s = r.join(",");
|
|
474
457
|
r.forEach((p) => {
|
|
475
|
-
const t = p,
|
|
476
|
-
u(
|
|
477
|
-
this.form[
|
|
478
|
-
}), !(u(r) || u(
|
|
479
|
-
column:
|
|
480
|
-
value:
|
|
458
|
+
const t = p, n = this.form[e.prop], o = this.findObject(i, t);
|
|
459
|
+
u(o) || (this.formList.includes(s) && r.forEach((l) => {
|
|
460
|
+
this.form[l] = "", this.$set(this.DIC, l, []);
|
|
461
|
+
}), !(u(r) || u(n) || u(o)) && U({
|
|
462
|
+
column: o,
|
|
463
|
+
value: n,
|
|
481
464
|
form: this.form
|
|
482
|
-
}).then((
|
|
465
|
+
}).then((l) => {
|
|
483
466
|
this.formList.includes(s) || this.formList.push(s);
|
|
484
|
-
const d =
|
|
485
|
-
this.$set(this.DIC, t, d), !u(d) && !u(d) && !u(
|
|
467
|
+
const d = l || [];
|
|
468
|
+
this.$set(this.DIC, t, d), !u(d) && !u(d) && !u(o.cascaderIndex) && u(this.form[t]) && (this.form[t] = d[o.cascaderIndex][(o.props || {}).value || L.value]);
|
|
486
469
|
}));
|
|
487
470
|
});
|
|
488
471
|
});
|
|
@@ -495,7 +478,7 @@ const ae = se.exports, oe = {
|
|
|
495
478
|
},
|
|
496
479
|
handleMock() {
|
|
497
480
|
this.isMock && (this.columnOption.forEach((i) => {
|
|
498
|
-
const e =
|
|
481
|
+
const e = q(i.column, this.DIC, this.form, this.isMock);
|
|
499
482
|
u(e) || Object.keys(e).forEach((r) => {
|
|
500
483
|
this.form[r] = e[r];
|
|
501
484
|
});
|
|
@@ -533,13 +516,11 @@ const ae = se.exports, oe = {
|
|
|
533
516
|
// 验证表单是否显隐
|
|
534
517
|
vaildDisplay(i) {
|
|
535
518
|
let e;
|
|
536
|
-
return u(i.display) ? this.isAdd ? e = "addDisplay" : this.isEdit ? e = "editDisplay" : this.isView && (e = "viewDisplay") : e = "display", e ?
|
|
519
|
+
return u(i.display) ? this.isAdd ? e = "addDisplay" : this.isEdit ? e = "editDisplay" : this.isView && (e = "viewDisplay") : e = "display", e ? I(i[e], !0) : !0;
|
|
537
520
|
},
|
|
538
521
|
clearValidate(i) {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
(e = this.$refs.form) == null || e.clearValidate(i);
|
|
542
|
-
});
|
|
522
|
+
var e;
|
|
523
|
+
(e = this.$refs.form) == null || e.clearValidate(i);
|
|
543
524
|
},
|
|
544
525
|
validateCellForm() {
|
|
545
526
|
return new Promise((i) => {
|
|
@@ -551,24 +532,24 @@ const ae = se.exports, oe = {
|
|
|
551
532
|
validate(i) {
|
|
552
533
|
this.$refs.form.validate((e, r) => {
|
|
553
534
|
const s = [], p = [], t = {};
|
|
554
|
-
this.dynamicOption.forEach((
|
|
555
|
-
const
|
|
556
|
-
p.push(
|
|
557
|
-
s.push(
|
|
558
|
-
}) : s.push(this.$refs[
|
|
559
|
-
}), Promise.all(s).then((
|
|
560
|
-
|
|
561
|
-
u(
|
|
535
|
+
this.dynamicOption.forEach((n) => {
|
|
536
|
+
const o = n.children.type === "form";
|
|
537
|
+
p.push(n.prop), o ? u(this.$refs[n.prop][0].$refs.temp.$refs.main) || this.$refs[n.prop][0].$refs.temp.$refs.main.forEach((l) => {
|
|
538
|
+
s.push(l.validateCellForm());
|
|
539
|
+
}) : s.push(this.$refs[n.prop][0].$refs.temp.$refs.main.validateCellForm());
|
|
540
|
+
}), Promise.all(s).then((n) => {
|
|
541
|
+
n.forEach((l, d) => {
|
|
542
|
+
u(l) || (t[p[d]] = l);
|
|
562
543
|
});
|
|
563
|
-
const
|
|
564
|
-
u(
|
|
544
|
+
const o = Object.assign(t, r);
|
|
545
|
+
u(o) ? (this.show(), i(!0, this.hide)) : i(!1, this.hide, o);
|
|
565
546
|
});
|
|
566
547
|
});
|
|
567
548
|
},
|
|
568
549
|
resetForm(i = !0) {
|
|
569
550
|
if (i) {
|
|
570
551
|
const e = this.propOption.map((r) => r.prop);
|
|
571
|
-
this.form =
|
|
552
|
+
this.form = j(this.form, e, (this.tableOption.filterParams || []).concat([this.rowKey]));
|
|
572
553
|
}
|
|
573
554
|
this.$nextTick(() => {
|
|
574
555
|
this.clearValidate(), this.$emit("reset-change");
|
|
@@ -590,7 +571,7 @@ const ae = se.exports, oe = {
|
|
|
590
571
|
}
|
|
591
572
|
}
|
|
592
573
|
};
|
|
593
|
-
var
|
|
574
|
+
var oe = function() {
|
|
594
575
|
var e = this, r = e._self._c;
|
|
595
576
|
return r("div", { class: ["avue-form", { "avue--detail": e.isDetail }], style: { width: e.setPx(e.parentOption.formWidth, "100%") } }, [r("ElForm", { ref: "form", attrs: { "status-icon": e.parentOption.statusIcon, model: e.form, "label-suffix": e.labelSuffix, size: e.$AVUE.formSize || e.controlSize, "label-position": e.parentOption.labelPosition, "label-width": e.setPx(e.parentOption.labelWidth, e.labelWidth) }, nativeOn: { submit: function(s) {
|
|
596
577
|
s.preventDefault();
|
|
@@ -598,26 +579,26 @@ var ne = function() {
|
|
|
598
579
|
return r("FormGroup", { key: s.prop, attrs: { tabs: e.isTabs, arrow: s.arrow, collapse: s.collapse, display: e.vaildDisplay(s), icon: s.icon, index: p, header: !e.isTabs, active: e.activeName, label: s.label }, on: { change: e.handleGroupClick }, scopedSlots: e._u([{ key: "tabs", fn: function() {
|
|
599
580
|
return [e.isTabs && p === 1 ? r("ElTabs", { staticClass: "avue-form__tabs", attrs: { type: e.tabsType }, on: { "tab-click": e.handleTabClick }, model: { value: e.activeName, callback: function(t) {
|
|
600
581
|
e.activeName = t;
|
|
601
|
-
}, expression: "activeName" } }, [e._l(e.columnOption, function(t,
|
|
602
|
-
return [e.vaildDisplay(t) &&
|
|
582
|
+
}, expression: "activeName" } }, [e._l(e.columnOption, function(t, n) {
|
|
583
|
+
return [e.vaildDisplay(t) && n !== 0 ? r("ElTabPane", { key: n, attrs: { name: `${n}` }, scopedSlots: e._u([{ key: "label", fn: function() {
|
|
603
584
|
return [r("span", [e.getSlotName(t, "H", e.$scopedSlots) ? e._t(e.getSlotName(t, "H"), null, { column: e.column }) : [r("i", { class: t.icon }, [e._v(" ")]), e._v(" " + e._s(t.label) + " ")]], 2)];
|
|
604
585
|
}, proxy: !0 }], null, !0) }) : e._e()];
|
|
605
586
|
})], 2) : e._e()];
|
|
606
587
|
}, proxy: !0 }, e.getSlotName(s, "H", e.$scopedSlots) ? { key: "header", fn: function() {
|
|
607
588
|
return [e._t(e.getSlotName(s, "H"), null, { column: s })];
|
|
608
|
-
}, proxy: !0 } : null], null, !0) }, [r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isGroupShow(s, p), expression: "isGroupShow(item, index)" }], class: ["avue-form__group", { "avue-form__group--flex": s.flex === !1 }] }, [e._l(s.column, function(t,
|
|
609
|
-
return [e.vaildDisplay(t) ? r("ElCol", { key:
|
|
589
|
+
}, proxy: !0 } : null], null, !0) }, [r("div", { directives: [{ name: "show", rawName: "v-show", value: e.isGroupShow(s, p), expression: "isGroupShow(item, index)" }], class: ["avue-form__group", { "avue-form__group--flex": s.flex === !1 }] }, [e._l(s.column, function(t, n) {
|
|
590
|
+
return [e.vaildDisplay(t) ? r("ElCol", { key: n, class: ["avue-form__row", { "avue--detail avue--detail__column": e.vaildDetail(t) }, t.className], style: { paddingLeft: e.gutter, paddingRight: e.gutter }, attrs: { span: e.getSpan(t), md: e.getSpan(t), sm: t.smSpan || s.smSpan || 12, xs: t.xsSpan || s.xmSpan || 24, offset: t.offset || s.offset, push: t.push || s.push, pull: t.pull || s.pull } }, [r("ElFormItem", { class: `avue-form__item--${t.labelPosition || s.labelPosition || ""}`, attrs: { prop: t.prop, label: t.label, rules: t.rules, "label-position": t.labelPosition || s.labelPosition || e.parentOption.labelPosition, "label-width": e.getLabelWidth(t, s) }, scopedSlots: e._u([e.getSlotName(t, "L", e.$scopedSlots) ? { key: "label", fn: function() {
|
|
610
591
|
return [e._t(e.getSlotName(t, "L"), null, { column: t, value: e.form[t.prop], readonly: t.readonly || e.readonly, disabled: e.getDisabled(t), size: t.size || e.controlSize, dic: e.DIC[t.prop] })];
|
|
611
592
|
}, proxy: !0 } : t.labelTip ? { key: "label", fn: function() {
|
|
612
593
|
return [r("ElTooltip", { staticClass: "item", attrs: { effect: "dark", placement: t.labelTipPlacement || "top-start" }, scopedSlots: e._u([{ key: "content", fn: function() {
|
|
613
594
|
return [r("div", { domProps: { innerHTML: e._s(t.labelTip) } })];
|
|
614
595
|
}, proxy: !0 }], null, !0) }, [r("i", { staticClass: "el-icon-info" })]), r("span", [e._v(" " + e._s(t.label) + e._s(e.labelSuffix))])];
|
|
615
|
-
}, proxy: !0 } : null, e.getSlotName(t, "E", e.$scopedSlots) ? { key: "error", fn: function(
|
|
596
|
+
}, proxy: !0 } : null, e.getSlotName(t, "E", e.$scopedSlots) ? { key: "error", fn: function(o) {
|
|
616
597
|
return [e._t(
|
|
617
598
|
e.getSlotName(t, "E"),
|
|
618
599
|
null,
|
|
619
600
|
null,
|
|
620
|
-
Object.assign(
|
|
601
|
+
Object.assign(o, {
|
|
621
602
|
column: t,
|
|
622
603
|
value: e.form[t.prop],
|
|
623
604
|
readonly: e.readonly || t.readonly,
|
|
@@ -626,34 +607,34 @@ var ne = function() {
|
|
|
626
607
|
dic: e.DIC[t.prop]
|
|
627
608
|
})
|
|
628
609
|
)];
|
|
629
|
-
} } : null], null, !0) }, [r(e.validTip(t) ? "div" : "elTooltip", { tag: "Component", attrs: { disabled: e.validTip(t), content: t.tip || e.getPlaceholder(t), placement: t.tipPlacement } }, [e.$scopedSlots[t.prop] ? e._t(t.prop, null, { value: e.form[t.prop], column: t, label: e.form[`$${t.prop}`], size: t.size || e.controlSize, readonly: e.readonly || t.readonly, disabled: e.getDisabled(t), dic: e.DIC[t.prop] }) : r("FormTemp", e._b({ ref: t.prop, refInFor: !0, attrs: { column: t, dic: e.DIC[t.prop], props: e.parentOption.props, "props-http": e.parentOption.propsHttp, disabled: e.getDisabled(t), readonly: t.readonly || e.readonly, enter: e.parentOption.enter, size: t.size || e.controlSize, "column-slot": e.columnSlot }, on: { enter: e.submit, change: function(
|
|
610
|
+
} } : null], null, !0) }, [r(e.validTip(t) ? "div" : "elTooltip", { tag: "Component", attrs: { disabled: e.validTip(t), content: t.tip || e.getPlaceholder(t), placement: t.tipPlacement } }, [e.$scopedSlots[t.prop] ? e._t(t.prop, null, { value: e.form[t.prop], column: t, label: e.form[`$${t.prop}`], size: t.size || e.controlSize, readonly: e.readonly || t.readonly, disabled: e.getDisabled(t), dic: e.DIC[t.prop] }) : r("FormTemp", e._b({ ref: t.prop, refInFor: !0, attrs: { column: t, dic: e.DIC[t.prop], props: e.parentOption.props, "props-http": e.parentOption.propsHttp, disabled: e.getDisabled(t), readonly: t.readonly || e.readonly, enter: e.parentOption.enter, size: t.size || e.controlSize, "column-slot": e.columnSlot }, on: { enter: e.submit, change: function(o) {
|
|
630
611
|
return e.propChange(s.column, t);
|
|
631
|
-
} }, scopedSlots: e._u([e._l(e.getSlotName(t, "T", e.$scopedSlots) ? [t] : [], function(
|
|
632
|
-
return { key: e.getSlotName(t, "T"), fn: function(
|
|
633
|
-
return [e._t(e.getSlotName(
|
|
612
|
+
} }, scopedSlots: e._u([e._l(e.getSlotName(t, "T", e.$scopedSlots) ? [t] : [], function(o) {
|
|
613
|
+
return { key: e.getSlotName(t, "T"), fn: function(l) {
|
|
614
|
+
return [e._t(e.getSlotName(o, "T"), null, null, l)];
|
|
634
615
|
} };
|
|
635
|
-
}), e._l(e.columnSlot, function(
|
|
636
|
-
return { key:
|
|
637
|
-
return [e._t(
|
|
616
|
+
}), e._l(e.columnSlot, function(o) {
|
|
617
|
+
return { key: o, fn: function(l) {
|
|
618
|
+
return [e._t(o, null, null, l)];
|
|
638
619
|
} };
|
|
639
|
-
})], null, !0), model: { value: e.form[t.prop], callback: function(
|
|
640
|
-
e.$set(e.form, t.prop,
|
|
641
|
-
}, expression: "form[column.prop]" } }, "FormTemp", e.uploadFun(t), !1))], 2)], 1)], 1) : e._e(), e.vaildDisplay(t) && t.row && t.span !== 24 && t.count ? r("div", { key: `line${
|
|
620
|
+
})], null, !0), model: { value: e.form[t.prop], callback: function(o) {
|
|
621
|
+
e.$set(e.form, t.prop, o);
|
|
622
|
+
}, expression: "form[column.prop]" } }, "FormTemp", e.uploadFun(t), !1))], 2)], 1)], 1) : e._e(), e.vaildDisplay(t) && t.row && t.span !== 24 && t.count ? r("div", { key: `line${n}`, staticClass: "avue-form__line", style: { width: `${t.count / 24 * 100}%` } }) : e._e()];
|
|
642
623
|
}), !e.isDetail && !e.isMenu ? r("FyFormMenu", { scopedSlots: e._u([{ key: "menuForm", fn: function(t) {
|
|
643
624
|
return [e._t("menuForm", null, null, t)];
|
|
644
625
|
} }], null, !0) }) : e._e()], 2)]);
|
|
645
626
|
}), !e.isDetail && e.isMenu ? r("FyFormMenu", { scopedSlots: e._u([{ key: "menuForm", fn: function(s) {
|
|
646
627
|
return [e._t("menuForm", null, null, s)];
|
|
647
628
|
} }], null, !0) }) : e._e()], 2)], 1)], 1);
|
|
648
|
-
},
|
|
629
|
+
}, ne = [], le = /* @__PURE__ */ $(
|
|
630
|
+
ae,
|
|
649
631
|
oe,
|
|
650
632
|
ne,
|
|
651
|
-
le,
|
|
652
633
|
!1,
|
|
653
634
|
null,
|
|
654
635
|
null
|
|
655
636
|
);
|
|
656
|
-
const
|
|
637
|
+
const _e = le.exports;
|
|
657
638
|
export {
|
|
658
|
-
|
|
639
|
+
_e as default
|
|
659
640
|
};
|
package/fy-form-design/index.mjs
CHANGED
|
@@ -30,7 +30,7 @@ import b from "../monaco-editor/index.mjs";
|
|
|
30
30
|
import "../monaco-editor/style.css";
|
|
31
31
|
import g from "vuedraggable";
|
|
32
32
|
import { c as _ } from "../chunks/json-beautifier.Bp3GslGm.mjs";
|
|
33
|
-
import { d as m, z as h } from "../chunks/util.
|
|
33
|
+
import { d as m, z as h } from "../chunks/util.DqFv_pWg.mjs";
|
|
34
34
|
import { cloneDeep as v } from "@web-utils/integrations/lodash";
|
|
35
35
|
import "../fy-u-editor/style.css";
|
|
36
36
|
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
@@ -569,9 +569,8 @@ const E = [
|
|
|
569
569
|
},
|
|
570
570
|
methods: {
|
|
571
571
|
getComponent(l, e) {
|
|
572
|
-
const t = "fy-";
|
|
573
572
|
let a = "input";
|
|
574
|
-
return e || (["array", "img", "url"].includes(l) ? a = "array" : l === "select" ? a = "select" : l === "radio" ? a = "radio" : l === "checkbox" ? a = "checkbox" : ["time", "timerange"].includes(l) ? a = "time" : ["dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year"].includes(l) ? a = "date" : l === "cascader" ? a = "cascader" : l === "number" ? a = "input-number" : l === "password" ? a = "input" : l === "switch" ? a = "switch" : l === "rate" ? a = "rate" : l === "upload" ? a = "upload" : l === "slider" ? a = "slider" : l === "dynamic" ? a = "dynamic" : l === "icon" ? a = "input-icon" : l === "color" ? a = "input-color" : l === "map" && (a = "input-map"),
|
|
573
|
+
return e || (["array", "img", "url"].includes(l) ? a = "array" : l === "select" ? a = "select" : l === "radio" ? a = "radio" : l === "checkbox" ? a = "checkbox" : ["time", "timerange"].includes(l) ? a = "time" : ["dates", "date", "datetime", "datetimerange", "daterange", "week", "month", "year"].includes(l) ? a = "date" : l === "cascader" ? a = "cascader" : l === "number" ? a = "input-number" : l === "password" ? a = "input" : l === "switch" ? a = "switch" : l === "rate" ? a = "rate" : l === "upload" ? a = "upload" : l === "slider" ? a = "slider" : l === "dynamic" ? a = "dynamic" : l === "icon" ? a = "input-icon" : l === "color" ? a = "input-color" : l === "map" && (a = "input-map"), "fy-" + a);
|
|
575
574
|
},
|
|
576
575
|
getPlaceholder(l) {
|
|
577
576
|
const e = l.label;
|
|
@@ -701,7 +700,7 @@ var M = function() {
|
|
|
701
700
|
} } }, [t("i", { staticClass: "iconfont icon-clear" })]) : e._e(), e.selectWidget.prop === e.column.prop ? t("ElButton", { staticClass: "widget-action-clone", attrs: { title: "复制", circle: "", plain: "", size: "small", type: "primary" }, on: { click: function(a) {
|
|
702
701
|
return a.stopPropagation(), e.handleWidgetCloneTable(e.index);
|
|
703
702
|
} } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1);
|
|
704
|
-
}, Q = [],
|
|
703
|
+
}, Q = [], K = /* @__PURE__ */ c(
|
|
705
704
|
D,
|
|
706
705
|
M,
|
|
707
706
|
Q,
|
|
@@ -709,7 +708,7 @@ var M = function() {
|
|
|
709
708
|
null,
|
|
710
709
|
null
|
|
711
710
|
);
|
|
712
|
-
const w =
|
|
711
|
+
const w = K.exports, j = {
|
|
713
712
|
name: "WidgetFormGroup",
|
|
714
713
|
components: { WidgetFormItem: x, WidgetFormTable: w, Draggable: g },
|
|
715
714
|
props: {
|
|
@@ -808,7 +807,7 @@ var N = function() {
|
|
|
808
807
|
return a.stopPropagation(), e.handleWidgetCloneTable(e.index);
|
|
809
808
|
} } }, [t("i", { staticClass: "iconfont icon-copy" })]) : e._e()], 1);
|
|
810
809
|
}, V = [], q = /* @__PURE__ */ c(
|
|
811
|
-
|
|
810
|
+
j,
|
|
812
811
|
N,
|
|
813
812
|
V,
|
|
814
813
|
!1,
|
|
@@ -1235,7 +1234,7 @@ var Me = function() {
|
|
|
1235
1234
|
}, expression: "data.showInput" } })], 1), t("ElFormItem", { attrs: { label: "范围" } }, [t("ElSwitch", { model: { value: e.data.range, callback: function(a) {
|
|
1236
1235
|
e.$set(e.data, "range", a);
|
|
1237
1236
|
}, expression: "data.range" } })], 1)], 1);
|
|
1238
|
-
}, Qe = [],
|
|
1237
|
+
}, Qe = [], Ke = /* @__PURE__ */ c(
|
|
1239
1238
|
De,
|
|
1240
1239
|
Me,
|
|
1241
1240
|
Qe,
|
|
@@ -1243,7 +1242,7 @@ var Me = function() {
|
|
|
1243
1242
|
null,
|
|
1244
1243
|
null
|
|
1245
1244
|
);
|
|
1246
|
-
const
|
|
1245
|
+
const je = Ke.exports, Ne = {
|
|
1247
1246
|
name: "ConfigColor",
|
|
1248
1247
|
props: {
|
|
1249
1248
|
data: Object
|
|
@@ -1565,7 +1564,7 @@ var et = function() {
|
|
|
1565
1564
|
tt,
|
|
1566
1565
|
!1,
|
|
1567
1566
|
null,
|
|
1568
|
-
"
|
|
1567
|
+
"8d588d56"
|
|
1569
1568
|
);
|
|
1570
1569
|
const lt = at.exports, it = {
|
|
1571
1570
|
name: "ConfigDate",
|
|
@@ -1625,9 +1624,9 @@ const rt = nt.exports, ct = {
|
|
|
1625
1624
|
},
|
|
1626
1625
|
immediate: !0
|
|
1627
1626
|
},
|
|
1628
|
-
"data.drag"
|
|
1627
|
+
"data.drag"() {
|
|
1629
1628
|
},
|
|
1630
|
-
"data.dragFile"
|
|
1629
|
+
"data.dragFile"(l) {
|
|
1631
1630
|
l && this.$delete(this.data, "listType");
|
|
1632
1631
|
},
|
|
1633
1632
|
"data.showCanvas"(l) {
|
|
@@ -1708,7 +1707,7 @@ const mt = ut.exports, ht = {
|
|
|
1708
1707
|
data: Object
|
|
1709
1708
|
},
|
|
1710
1709
|
watch: {
|
|
1711
|
-
"data.options.oss"
|
|
1710
|
+
"data.options.oss"(l) {
|
|
1712
1711
|
l === "ali" ? this.data.options.qiniu = {} : l === "qiniu" && (this.data.options.ali = {});
|
|
1713
1712
|
}
|
|
1714
1713
|
}
|
|
@@ -1918,15 +1917,15 @@ var Qt = function() {
|
|
|
1918
1917
|
}, expression: "focus" } })], 1)]), t("div", { staticClass: "el-form-item el-form-item--small el-form--label-top" }, [t("label", { staticClass: "el-form-item__label", staticStyle: { padding: "0" } }, [e._v("blur:")]), t("div", { staticClass: "el-form-item__content" }, [t("MonacoEditor", { attrs: { height: "200", "key-index": `event-blur-${e.data.prop}`, options: e.options }, model: { value: e.blur, callback: function(a) {
|
|
1919
1918
|
e.blur = a;
|
|
1920
1919
|
}, expression: "blur" } })], 1)])]);
|
|
1921
|
-
},
|
|
1920
|
+
}, Kt = [], jt = /* @__PURE__ */ c(
|
|
1922
1921
|
Mt,
|
|
1923
1922
|
Qt,
|
|
1924
|
-
|
|
1923
|
+
Kt,
|
|
1925
1924
|
!1,
|
|
1926
1925
|
null,
|
|
1927
1926
|
null
|
|
1928
1927
|
);
|
|
1929
|
-
const Nt =
|
|
1928
|
+
const Nt = jt.exports, Vt = [
|
|
1930
1929
|
{
|
|
1931
1930
|
label: "输入框",
|
|
1932
1931
|
value: "input"
|
|
@@ -2249,7 +2248,7 @@ const ea = Zt.exports, ta = ["year", "month", "week", "date", "datetime", "time"
|
|
|
2249
2248
|
ConfigDynamic: Ie,
|
|
2250
2249
|
ConfigSwitch: Be,
|
|
2251
2250
|
ConfigRate: Pe,
|
|
2252
|
-
ConfigSlider:
|
|
2251
|
+
ConfigSlider: je,
|
|
2253
2252
|
ConfigColor: Ge,
|
|
2254
2253
|
ConfigSelect: Xe,
|
|
2255
2254
|
ConfigTree: lt,
|