@form-create/view-design 2.7.1 → 2.7.3
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/form-create.esm.js +940 -849
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +4 -4
package/dist/form-create.esm.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/view-design v2.7.
|
|
3
|
+
* @form-create/view-design v2.7.3
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
9
9
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .ivu-upload-list{margin-top:0}._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn,._fc-frame .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .ivu-upload-list{margin-top:0}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .ivu-form-item{margin-bottom:24px}.form-create .form-create .ivu-form-item .ivu-form-item{margin-bottom:0}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
var ir = Object.defineProperty, nr = Object.defineProperties;
|
|
11
|
+
var sr = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var ot = Object.getOwnPropertySymbols;
|
|
13
|
+
var or = Object.prototype.hasOwnProperty, ar = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var at = (t, e, r) => e in t ? ir(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
|
|
16
|
+
or.call(e, r) && at(t, r, e[r]);
|
|
17
|
+
if (ot)
|
|
18
|
+
for (var r of ot(e))
|
|
19
|
+
ar.call(e, r) && at(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
}, U = (t, e) =>
|
|
22
|
-
import
|
|
23
|
-
function
|
|
21
|
+
}, U = (t, e) => nr(t, sr(e));
|
|
22
|
+
import me, { getCurrentInstance as lr, provide as ur, inject as fr, toRefs as lt, reactive as re, onBeforeMount as cr, watch as L, onMounted as hr, onBeforeUnmount as dr, onUpdated as pr, nextTick as P, markRaw as de, computed as pe, toRef as Ee, ref as mr } from "vue";
|
|
23
|
+
function gr(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
26
26
|
function He() {
|
|
@@ -29,33 +29,33 @@ function He() {
|
|
|
29
29
|
return t;
|
|
30
30
|
}, He.apply(this, arguments);
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var yr = ["attrs", "props", "domProps"], $r = ["class", "style", "directives"], vr = ["on", "nativeOn"], br = function(t) {
|
|
33
33
|
return t.reduce(function(e, r) {
|
|
34
34
|
for (var i in r) if (!e[i]) e[i] = r[i];
|
|
35
|
-
else if (
|
|
36
|
-
else if (
|
|
35
|
+
else if (yr.indexOf(i) !== -1) e[i] = He({}, e[i], r[i]);
|
|
36
|
+
else if ($r.indexOf(i) !== -1) {
|
|
37
37
|
var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
|
|
38
38
|
e[i] = [].concat(s, n);
|
|
39
|
-
} else if (
|
|
39
|
+
} else if (vr.indexOf(i) !== -1)
|
|
40
40
|
for (var o in r[i]) if (e[i][o]) {
|
|
41
41
|
var a = e[i][o] instanceof Array ? e[i][o] : [e[i][o]], l = r[i][o] instanceof Array ? r[i][o] : [r[i][o]];
|
|
42
42
|
e[i][o] = [].concat(a, l);
|
|
43
43
|
} else e[i][o] = r[i][o];
|
|
44
|
-
else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ?
|
|
44
|
+
else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? _r(e[i][u], r[i][u]) : r[i][u];
|
|
45
45
|
else e[i] = r[i];
|
|
46
46
|
return e;
|
|
47
47
|
}, {});
|
|
48
|
-
},
|
|
48
|
+
}, _r = function(t, e) {
|
|
49
49
|
return function() {
|
|
50
50
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
51
51
|
};
|
|
52
|
-
},
|
|
53
|
-
const
|
|
54
|
-
function
|
|
52
|
+
}, Cr = br;
|
|
53
|
+
const j = /* @__PURE__ */ gr(Cr);
|
|
54
|
+
function je(t, e) {
|
|
55
55
|
return Object.keys(t).reduce((r, i) => ((!e || e.indexOf(i) === -1) && r.push(t[i]), r), []);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
name:
|
|
57
|
+
const wr = "fcCheckbox", Or = {
|
|
58
|
+
name: wr,
|
|
59
59
|
props: {
|
|
60
60
|
formCreateInject: {
|
|
61
61
|
type: Object,
|
|
@@ -100,7 +100,7 @@ const Cr = "fcCheckbox", wr = {
|
|
|
100
100
|
},
|
|
101
101
|
render() {
|
|
102
102
|
const t = arguments[0];
|
|
103
|
-
return t("CheckboxGroup",
|
|
103
|
+
return t("CheckboxGroup", j([{}, this.formCreateInject.prop, {
|
|
104
104
|
ref: "el"
|
|
105
105
|
}, {
|
|
106
106
|
props: {
|
|
@@ -112,12 +112,12 @@ const Cr = "fcCheckbox", wr = {
|
|
|
112
112
|
}
|
|
113
113
|
}]), [this.options().map((e, r) => {
|
|
114
114
|
const i = b({}, e);
|
|
115
|
-
return delete i.value, t("Checkbox",
|
|
115
|
+
return delete i.value, t("Checkbox", j([{}, {
|
|
116
116
|
props: i
|
|
117
117
|
}, {
|
|
118
118
|
key: "" + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), je(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -126,10 +126,10 @@ const Cr = "fcCheckbox", wr = {
|
|
|
126
126
|
function G(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const Sr = "fcFrame";
|
|
130
|
+
function Ot(t) {
|
|
131
131
|
return {
|
|
132
|
-
name:
|
|
132
|
+
name: Sr,
|
|
133
133
|
props: {
|
|
134
134
|
formCreateInject: {
|
|
135
135
|
type: Object,
|
|
@@ -170,11 +170,11 @@ function wt(t) {
|
|
|
170
170
|
},
|
|
171
171
|
okBtnText: {
|
|
172
172
|
type: String,
|
|
173
|
-
default: "
|
|
173
|
+
default: ""
|
|
174
174
|
},
|
|
175
175
|
closeBtnText: {
|
|
176
176
|
type: String,
|
|
177
|
-
default: "
|
|
177
|
+
default: ""
|
|
178
178
|
},
|
|
179
179
|
modalTitle: String,
|
|
180
180
|
handleIcon: {
|
|
@@ -286,7 +286,7 @@ function wt(t) {
|
|
|
286
286
|
readonly: !0,
|
|
287
287
|
clearable: !1
|
|
288
288
|
};
|
|
289
|
-
return e("Input",
|
|
289
|
+
return e("Input", j([{}, {
|
|
290
290
|
props: r
|
|
291
291
|
}, {}, {
|
|
292
292
|
on: {
|
|
@@ -325,7 +325,7 @@ function wt(t) {
|
|
|
325
325
|
},
|
|
326
326
|
makeHandleIcon(e, r) {
|
|
327
327
|
const i = this.$createElement;
|
|
328
|
-
return i("icon",
|
|
328
|
+
return i("icon", j([{}, {
|
|
329
329
|
props: {
|
|
330
330
|
type: this.handleIcon === !0 || this.handleIcon === void 0 ? "ios-eye-outline" : this.handleIcon
|
|
331
331
|
}
|
|
@@ -338,7 +338,7 @@ function wt(t) {
|
|
|
338
338
|
},
|
|
339
339
|
makeRemoveIcon(e, r) {
|
|
340
340
|
const i = this.$createElement;
|
|
341
|
-
return i("icon",
|
|
341
|
+
return i("icon", j([{}, {
|
|
342
342
|
props: {
|
|
343
343
|
type: "ios-trash-outline"
|
|
344
344
|
}
|
|
@@ -351,7 +351,7 @@ function wt(t) {
|
|
|
351
351
|
},
|
|
352
352
|
makeFiles() {
|
|
353
353
|
const e = this.$createElement;
|
|
354
|
-
return this.makeGroup(this.fileList.map((r, i) => this.makeItem(i, [e("icon",
|
|
354
|
+
return this.makeGroup(this.fileList.map((r, i) => this.makeItem(i, [e("icon", j([{}, {
|
|
355
355
|
props: {
|
|
356
356
|
type: t.fileIcon,
|
|
357
357
|
size: 40
|
|
@@ -378,7 +378,7 @@ function wt(t) {
|
|
|
378
378
|
click: () => this.showModel()
|
|
379
379
|
},
|
|
380
380
|
key: this.key("btn")
|
|
381
|
-
}, [e("icon",
|
|
381
|
+
}, [e("icon", j([{}, {
|
|
382
382
|
props: {
|
|
383
383
|
type: this.icon,
|
|
384
384
|
size: 20
|
|
@@ -425,14 +425,14 @@ function wt(t) {
|
|
|
425
425
|
on: {
|
|
426
426
|
click: () => this.onCancel() !== !1 && this.closeModel(!0)
|
|
427
427
|
}
|
|
428
|
-
}, [i])), n && a.push(e("Button", {
|
|
428
|
+
}, [i || this.formCreateInject.t("close") || "关闭"])), n && a.push(e("Button", {
|
|
429
429
|
attrs: {
|
|
430
430
|
type: "primary"
|
|
431
431
|
},
|
|
432
432
|
on: {
|
|
433
433
|
click: () => this.onOk() !== !1 && this.closeModel()
|
|
434
434
|
}
|
|
435
|
-
}, [r]))), a;
|
|
435
|
+
}, [r || this.formCreateInject.t("ok") || "确定"]))), a;
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
render() {
|
|
@@ -450,7 +450,7 @@ function wt(t) {
|
|
|
450
450
|
this.$refs.frame && this.frameLoad(this.$refs.frame.contentWindow || {});
|
|
451
451
|
}), e("div", {
|
|
452
452
|
class: "_fc-frame"
|
|
453
|
-
}, [i, e("Modal",
|
|
453
|
+
}, [i, e("Modal", j([{}, {
|
|
454
454
|
props: {
|
|
455
455
|
mask: this.previewMask,
|
|
456
456
|
title: l,
|
|
@@ -468,7 +468,7 @@ function wt(t) {
|
|
|
468
468
|
attrs: {
|
|
469
469
|
src: this.previewImage
|
|
470
470
|
}
|
|
471
|
-
})]), e("Modal",
|
|
471
|
+
})]), e("Modal", j([{}, {
|
|
472
472
|
props: b({
|
|
473
473
|
width: s,
|
|
474
474
|
title: a
|
|
@@ -503,15 +503,15 @@ function wt(t) {
|
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const St = Ot({
|
|
507
507
|
fileIcon: "md-document",
|
|
508
508
|
fileUpIcon: "ios-folder-open"
|
|
509
509
|
});
|
|
510
|
-
|
|
510
|
+
St.v2 = Ot({
|
|
511
511
|
fileIcon: "document-text",
|
|
512
512
|
fileUpIcon: "folder"
|
|
513
513
|
});
|
|
514
|
-
const Fr = "fcRadio",
|
|
514
|
+
const Fr = "fcRadio", Rr = {
|
|
515
515
|
name: Fr,
|
|
516
516
|
props: {
|
|
517
517
|
formCreateInject: {
|
|
@@ -553,7 +553,7 @@ const Fr = "fcRadio", kr = {
|
|
|
553
553
|
},
|
|
554
554
|
render() {
|
|
555
555
|
const t = arguments[0];
|
|
556
|
-
return t("RadioGroup",
|
|
556
|
+
return t("RadioGroup", j([{}, this.formCreateInject.prop, {}, {
|
|
557
557
|
props: {
|
|
558
558
|
value: this.trueValue
|
|
559
559
|
}
|
|
@@ -564,12 +564,12 @@ const Fr = "fcRadio", kr = {
|
|
|
564
564
|
}
|
|
565
565
|
}]), [this.options().map((e, r) => {
|
|
566
566
|
const i = b({}, e);
|
|
567
|
-
return delete i.value, t("Radio",
|
|
567
|
+
return delete i.value, t("Radio", j([{}, {
|
|
568
568
|
props: i
|
|
569
569
|
}, {
|
|
570
570
|
key: "" + r + "-" + e.value
|
|
571
571
|
}]));
|
|
572
|
-
}),
|
|
572
|
+
}), je(this.$slots)]);
|
|
573
573
|
},
|
|
574
574
|
mounted() {
|
|
575
575
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -604,11 +604,11 @@ const Fr = "fcRadio", kr = {
|
|
|
604
604
|
return h.type(e, t);
|
|
605
605
|
};
|
|
606
606
|
});
|
|
607
|
-
function
|
|
607
|
+
function k(t, e) {
|
|
608
608
|
return {}.hasOwnProperty.call(t, e);
|
|
609
609
|
}
|
|
610
|
-
const
|
|
611
|
-
name:
|
|
610
|
+
const kr = "fcSelect", Er = {
|
|
611
|
+
name: kr,
|
|
612
612
|
functional: !0,
|
|
613
613
|
props: {
|
|
614
614
|
formCreateInject: {
|
|
@@ -619,7 +619,7 @@ const Rr = "fcSelect", Sr = {
|
|
|
619
619
|
render(t, e) {
|
|
620
620
|
const r = (n, o) => {
|
|
621
621
|
const a = n.slot;
|
|
622
|
-
return t("Option",
|
|
622
|
+
return t("Option", j([{}, {
|
|
623
623
|
props: n
|
|
624
624
|
}, {
|
|
625
625
|
key: "" + o + "-" + n.value
|
|
@@ -632,15 +632,15 @@ const Rr = "fcSelect", Sr = {
|
|
|
632
632
|
},
|
|
633
633
|
key: "" + o + "-" + n.label
|
|
634
634
|
}, [h.trueArray(n.options) && n.options.map((a, l) => r(a, l))]), s = e.props.formCreateInject.options;
|
|
635
|
-
return t("Select",
|
|
635
|
+
return t("Select", j([{}, e.data, {
|
|
636
636
|
ref: "el"
|
|
637
|
-
}]), [(Array.isArray(s) ? s : []).map((n, o) =>
|
|
637
|
+
}]), [(Array.isArray(s) ? s : []).map((n, o) => k(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
|
|
638
638
|
},
|
|
639
639
|
mounted() {
|
|
640
640
|
this.$emit("fc.el", this.$refs.el);
|
|
641
641
|
}
|
|
642
|
-
},
|
|
643
|
-
name:
|
|
642
|
+
}, Dr = "fcTree", jr = {
|
|
643
|
+
name: Dr,
|
|
644
644
|
props: {
|
|
645
645
|
formCreateInject: {
|
|
646
646
|
type: Object,
|
|
@@ -684,36 +684,36 @@ const Rr = "fcSelect", Sr = {
|
|
|
684
684
|
},
|
|
685
685
|
render() {
|
|
686
686
|
const t = arguments[0], e = {};
|
|
687
|
-
return this.type === "selected" ? e["on-select-change"] = this.onInput : e["on-check-change"] = this.onInput, t("Tree",
|
|
687
|
+
return this.type === "selected" ? e["on-select-change"] = this.onInput : e["on-check-change"] = this.onInput, t("Tree", j([{}, this.formCreateInject.prop, {
|
|
688
688
|
ref: "tree"
|
|
689
689
|
}, {
|
|
690
690
|
on: e
|
|
691
|
-
}]), [
|
|
691
|
+
}]), [je(this.$slots)]);
|
|
692
692
|
},
|
|
693
693
|
mounted() {
|
|
694
694
|
this.$emit("fc.el", this.$refs.tree);
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
-
function
|
|
697
|
+
function ut(t) {
|
|
698
698
|
return typeof t == "object" ? t : {
|
|
699
699
|
url: t,
|
|
700
700
|
is_string: !0,
|
|
701
|
-
name:
|
|
701
|
+
name: Ir(t)
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function ft(t) {
|
|
705
705
|
return U(b({}, t), {
|
|
706
706
|
file: t,
|
|
707
707
|
value: t
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Ir(t) {
|
|
711
711
|
return ("" + t).split("/").pop();
|
|
712
712
|
}
|
|
713
|
-
const
|
|
713
|
+
const Ar = "fcUpload";
|
|
714
714
|
function Ft(t) {
|
|
715
715
|
return {
|
|
716
|
-
name:
|
|
716
|
+
name: Ar,
|
|
717
717
|
props: {
|
|
718
718
|
formCreateInject: {
|
|
719
719
|
type: Object,
|
|
@@ -754,11 +754,11 @@ function Ft(t) {
|
|
|
754
754
|
};
|
|
755
755
|
},
|
|
756
756
|
created() {
|
|
757
|
-
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = G(this.value).map(
|
|
757
|
+
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = G(this.value).map(ut).map(ft);
|
|
758
758
|
},
|
|
759
759
|
watch: {
|
|
760
760
|
value(e) {
|
|
761
|
-
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = G(e).map(
|
|
761
|
+
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = G(e).map(ut).map(ft), this.uploadList = this.$refs.upload.fileList);
|
|
762
762
|
},
|
|
763
763
|
maxLength(e, r) {
|
|
764
764
|
(r === 1 || e === 1) && this.update();
|
|
@@ -784,7 +784,7 @@ function Ft(t) {
|
|
|
784
784
|
src: e.url
|
|
785
785
|
},
|
|
786
786
|
key: this.key("img" + r)
|
|
787
|
-
}) : i("icon",
|
|
787
|
+
}) : i("icon", j([{}, {
|
|
788
788
|
props: {
|
|
789
789
|
type: t.fileIcon,
|
|
790
790
|
size: 40
|
|
@@ -819,7 +819,7 @@ function Ft(t) {
|
|
|
819
819
|
},
|
|
820
820
|
makeProgress(e, r) {
|
|
821
821
|
const i = this.$createElement;
|
|
822
|
-
return i("Progress",
|
|
822
|
+
return i("Progress", j([{}, {
|
|
823
823
|
props: {
|
|
824
824
|
percent: e.percentage,
|
|
825
825
|
hideInfo: !0
|
|
@@ -849,7 +849,7 @@ function Ft(t) {
|
|
|
849
849
|
},
|
|
850
850
|
makeUpload() {
|
|
851
851
|
const e = this.$createElement, r = !this.maxLength || this.maxLength > this.uploadList.length;
|
|
852
|
-
return e("Upload",
|
|
852
|
+
return e("Upload", j([{}, this.formCreateInject.prop, {}, {
|
|
853
853
|
style: {
|
|
854
854
|
display: "inline-block"
|
|
855
855
|
},
|
|
@@ -859,12 +859,12 @@ function Ft(t) {
|
|
|
859
859
|
slot: "default"
|
|
860
860
|
}, [this.$slots.default || e("div", {
|
|
861
861
|
class: "fc-upload-btn"
|
|
862
|
-
}, [e("icon",
|
|
862
|
+
}, [e("icon", j([{}, {
|
|
863
863
|
props: {
|
|
864
864
|
type: this.uploadType === "file" ? "ios-cloud-upload-outline" : t.imgUpIcon,
|
|
865
865
|
size: 20
|
|
866
866
|
}
|
|
867
|
-
}]))])]) : null,
|
|
867
|
+
}]))])]) : null, je(this.$slots, ["default"])]);
|
|
868
868
|
},
|
|
869
869
|
update() {
|
|
870
870
|
let e = this.$refs.upload.fileList.map((r) => r.is_string ? r.url : r.value || r.url).filter((r) => r !== void 0);
|
|
@@ -878,7 +878,7 @@ function Ft(t) {
|
|
|
878
878
|
const e = arguments[0];
|
|
879
879
|
return this.$refs.upload && (this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = this.$refs.upload.showUploadList), this.formCreateInject.prop.props.defaultFileList = this.$refs.upload.defaultFileList), e("div", {
|
|
880
880
|
class: "_fc-upload"
|
|
881
|
-
}, [[this.formCreateInject.prop.props.showUploadList ? [] : this.makeFiles(), this.makeUpload()], e("Modal",
|
|
881
|
+
}, [[this.formCreateInject.prop.props.showUploadList ? [] : this.makeFiles(), this.makeUpload()], e("Modal", j([{}, {
|
|
882
882
|
props: {
|
|
883
883
|
title: this.modalTitle,
|
|
884
884
|
footerHide: !0
|
|
@@ -907,21 +907,21 @@ function Ft(t) {
|
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
const
|
|
910
|
+
const Rt = Ft({
|
|
911
911
|
fileIcon: "md-document",
|
|
912
912
|
imgUpIcon: "md-images"
|
|
913
913
|
});
|
|
914
|
-
|
|
914
|
+
Rt.v2 = Ft({
|
|
915
915
|
fileIcon: "document-text",
|
|
916
916
|
imgUpIcon: "image"
|
|
917
917
|
});
|
|
918
|
-
function
|
|
919
|
-
|
|
918
|
+
function F(t, e, r) {
|
|
919
|
+
me.set(t, e, r);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
(
|
|
921
|
+
function te(t, e) {
|
|
922
|
+
(me.del || me.delete)(t, e);
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function $e(t, e = {}, r) {
|
|
925
925
|
let i = !1;
|
|
926
926
|
for (let s in e)
|
|
927
927
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
@@ -929,39 +929,39 @@ function ye(t, e = {}, r) {
|
|
|
929
929
|
if ((i = Array.isArray(n)) || h.Object(n)) {
|
|
930
930
|
let o = t[s] === void 0;
|
|
931
931
|
if (i)
|
|
932
|
-
i = !1, o &&
|
|
932
|
+
i = !1, o && F(t, s, []);
|
|
933
933
|
else if (n._clone && r !== void 0)
|
|
934
934
|
if (r)
|
|
935
|
-
n = n.getRule(), o &&
|
|
935
|
+
n = n.getRule(), o && F(t, s, {});
|
|
936
936
|
else {
|
|
937
|
-
|
|
937
|
+
F(t, s, n._clone());
|
|
938
938
|
continue;
|
|
939
939
|
}
|
|
940
940
|
else
|
|
941
|
-
o &&
|
|
942
|
-
t[s] =
|
|
941
|
+
o && F(t, s, {});
|
|
942
|
+
t[s] = $e(t[s], n, r);
|
|
943
943
|
} else
|
|
944
|
-
|
|
944
|
+
F(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
945
945
|
}
|
|
946
946
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
947
947
|
}
|
|
948
948
|
function J(t) {
|
|
949
|
-
return
|
|
949
|
+
return $e({}, { value: t }).value;
|
|
950
950
|
}
|
|
951
|
-
const
|
|
951
|
+
const Vr = Object.assign || function(t) {
|
|
952
952
|
for (let e, r = 1; r < arguments.length; r++)
|
|
953
953
|
for (let i in e = arguments[r], e)
|
|
954
|
-
Object.prototype.hasOwnProperty.call(e, i) &&
|
|
954
|
+
Object.prototype.hasOwnProperty.call(e, i) && F(t, i, e[i]);
|
|
955
955
|
return t;
|
|
956
956
|
};
|
|
957
957
|
function _() {
|
|
958
|
-
return
|
|
958
|
+
return Vr.apply(this, arguments);
|
|
959
959
|
}
|
|
960
960
|
function Je(t) {
|
|
961
961
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : b({}, t);
|
|
962
962
|
}
|
|
963
|
-
const
|
|
964
|
-
name:
|
|
963
|
+
const Pr = "fcGroup", Br = {
|
|
964
|
+
name: Pr,
|
|
965
965
|
props: {
|
|
966
966
|
field: String,
|
|
967
967
|
rule: [Array, Object],
|
|
@@ -1042,7 +1042,7 @@ const Vr = "fcGroup", Pr = {
|
|
|
1042
1042
|
const s = i.$f.formData();
|
|
1043
1043
|
if (t === e)
|
|
1044
1044
|
i.$f.deferSyncValue(() => {
|
|
1045
|
-
|
|
1045
|
+
$e(i.rule, t), i.$f.setValue(s);
|
|
1046
1046
|
}, !0);
|
|
1047
1047
|
else {
|
|
1048
1048
|
const n = i.$f.formData();
|
|
@@ -1069,10 +1069,12 @@ const Vr = "fcGroup", Pr = {
|
|
|
1069
1069
|
for (let n = 0; n < i; n++)
|
|
1070
1070
|
this.setValue(r[n], t[n]);
|
|
1071
1071
|
} else {
|
|
1072
|
-
if (s > 0)
|
|
1072
|
+
if (s > 0) {
|
|
1073
1073
|
for (let n = 0; n < s; n++)
|
|
1074
1074
|
this.removeRule(r[i - n - 1]);
|
|
1075
|
-
|
|
1075
|
+
this.sort = Object.keys(this.cacheRule);
|
|
1076
|
+
}
|
|
1077
|
+
t.forEach((n, o) => {
|
|
1076
1078
|
this.setValue(r[o], t[o]);
|
|
1077
1079
|
});
|
|
1078
1080
|
}
|
|
@@ -1080,7 +1082,7 @@ const Vr = "fcGroup", Pr = {
|
|
|
1080
1082
|
},
|
|
1081
1083
|
methods: {
|
|
1082
1084
|
_value(t) {
|
|
1083
|
-
return t &&
|
|
1085
|
+
return t && k(t, this.field) ? t[this.field] : t;
|
|
1084
1086
|
},
|
|
1085
1087
|
cache(t, e) {
|
|
1086
1088
|
this.cacheValue[t] = JSON.stringify(e);
|
|
@@ -1230,13 +1232,13 @@ const Vr = "fcGroup", Pr = {
|
|
|
1230
1232
|
return t("div", {
|
|
1231
1233
|
class: "_fc-group-container",
|
|
1232
1234
|
key: o
|
|
1233
|
-
}, [t(i,
|
|
1235
|
+
}, [t(i, j([{
|
|
1234
1236
|
key: o
|
|
1235
1237
|
}, {
|
|
1236
1238
|
on: {
|
|
1237
|
-
"update:value": (
|
|
1238
|
-
"emit-event": (
|
|
1239
|
-
input: (
|
|
1239
|
+
"update:value": (d) => this.formData(o, d),
|
|
1240
|
+
"emit-event": (d, ...m) => this.emitEvent(d, m, a, o),
|
|
1241
|
+
input: (d) => this.add$f(a, o, d)
|
|
1240
1242
|
}
|
|
1241
1243
|
}, {}, {
|
|
1242
1244
|
props: {
|
|
@@ -1260,8 +1262,8 @@ const Vr = "fcGroup", Pr = {
|
|
|
1260
1262
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1261
1263
|
}, [n]);
|
|
1262
1264
|
}
|
|
1263
|
-
},
|
|
1264
|
-
name:
|
|
1265
|
+
}, Lr = "fcSubForm", Tr = {
|
|
1266
|
+
name: Lr,
|
|
1265
1267
|
props: {
|
|
1266
1268
|
rule: Array,
|
|
1267
1269
|
options: Object,
|
|
@@ -1329,7 +1331,7 @@ const Vr = "fcGroup", Pr = {
|
|
|
1329
1331
|
rule: e,
|
|
1330
1332
|
options: r
|
|
1331
1333
|
} = this.cacheRule, i = this.type;
|
|
1332
|
-
return t(i,
|
|
1334
|
+
return t(i, j([{}, {
|
|
1333
1335
|
on: {
|
|
1334
1336
|
"update:value": this.formData,
|
|
1335
1337
|
"emit-event": this.emitEvent,
|
|
@@ -1344,35 +1346,35 @@ const Vr = "fcGroup", Pr = {
|
|
|
1344
1346
|
}
|
|
1345
1347
|
}]));
|
|
1346
1348
|
}
|
|
1347
|
-
},
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1349
|
+
}, Nr = [
|
|
1350
|
+
Or,
|
|
1351
|
+
Rr,
|
|
1352
|
+
Er,
|
|
1353
|
+
jr,
|
|
1354
|
+
Tr,
|
|
1355
|
+
St,
|
|
1356
|
+
Rt,
|
|
1357
|
+
Br
|
|
1356
1358
|
];
|
|
1357
|
-
function
|
|
1359
|
+
function ce(t, e) {
|
|
1358
1360
|
var r = null;
|
|
1359
1361
|
return function(...i) {
|
|
1360
1362
|
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1361
1363
|
};
|
|
1362
1364
|
}
|
|
1363
|
-
function
|
|
1365
|
+
function ye(t) {
|
|
1364
1366
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1365
1367
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1366
1368
|
}
|
|
1367
|
-
const
|
|
1369
|
+
const Re = (t, e) => {
|
|
1368
1370
|
if (!(!t || t === e || !t.$props)) {
|
|
1369
1371
|
if (t.$props.formCreateInject)
|
|
1370
1372
|
return t.$props.formCreateInject;
|
|
1371
1373
|
if (t.$parent)
|
|
1372
|
-
return
|
|
1374
|
+
return Re(t.$parent, e);
|
|
1373
1375
|
}
|
|
1374
1376
|
};
|
|
1375
|
-
function
|
|
1377
|
+
function Mr(t, e, r) {
|
|
1376
1378
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1377
1379
|
return {
|
|
1378
1380
|
name: i,
|
|
@@ -1423,100 +1425,100 @@ function Nr(t, e, r) {
|
|
|
1423
1425
|
return this.fc.render();
|
|
1424
1426
|
},
|
|
1425
1427
|
setup(s) {
|
|
1426
|
-
const n =
|
|
1427
|
-
|
|
1428
|
-
const o =
|
|
1428
|
+
const n = lr().proxy;
|
|
1429
|
+
ur("parentFC", n);
|
|
1430
|
+
const o = fr("parentFC", null);
|
|
1429
1431
|
let a = o;
|
|
1430
1432
|
if (o)
|
|
1431
1433
|
for (; a.parent; )
|
|
1432
1434
|
a = a.parent;
|
|
1433
1435
|
else
|
|
1434
1436
|
a = n;
|
|
1435
|
-
const { rule: l, value: u, subForm: f, inFor:
|
|
1437
|
+
const { rule: l, value: u, subForm: f, inFor: d } = lt(s), m = re({
|
|
1436
1438
|
ctxInject: {},
|
|
1437
1439
|
destroyed: !1,
|
|
1438
1440
|
isShow: !0,
|
|
1439
1441
|
unique: 1,
|
|
1440
1442
|
renderRule: [...l.value || []],
|
|
1441
1443
|
updateValue: JSON.stringify(u.value || {})
|
|
1442
|
-
}),
|
|
1444
|
+
}), g = new t(n), v = g.api(), w = d.value, I = () => {
|
|
1443
1445
|
if (o) {
|
|
1444
|
-
const
|
|
1445
|
-
if (
|
|
1446
|
-
let
|
|
1447
|
-
w ? (
|
|
1446
|
+
const S = Re(n, o);
|
|
1447
|
+
if (S) {
|
|
1448
|
+
let D;
|
|
1449
|
+
w ? (D = G(S.getSubForm()), D.push(v)) : D = v, S.subForm(D);
|
|
1448
1450
|
}
|
|
1449
1451
|
}
|
|
1450
|
-
},
|
|
1451
|
-
const
|
|
1452
|
-
if (
|
|
1452
|
+
}, x = () => {
|
|
1453
|
+
const S = Re(n, o);
|
|
1454
|
+
if (S)
|
|
1453
1455
|
if (w) {
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1456
|
+
const D = G(S.getSubForm()), B = D.indexOf(v);
|
|
1457
|
+
B > -1 && D.splice(B, 1);
|
|
1456
1458
|
} else
|
|
1457
|
-
|
|
1459
|
+
S.subForm();
|
|
1458
1460
|
};
|
|
1459
1461
|
let V = null;
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
let
|
|
1463
|
-
const
|
|
1464
|
-
Object.keys(
|
|
1465
|
-
let
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
}),
|
|
1469
|
-
}), s.option && s.option.style && (
|
|
1462
|
+
cr(() => {
|
|
1463
|
+
L(() => {
|
|
1464
|
+
let S = "";
|
|
1465
|
+
const D = s.option && s.option.globalClass || {};
|
|
1466
|
+
Object.keys(D).forEach((B) => {
|
|
1467
|
+
let se = "";
|
|
1468
|
+
D[B].style && Object.keys(D[B].style).forEach((be) => {
|
|
1469
|
+
se += ye(be) + ":" + D[B].style[be] + ";";
|
|
1470
|
+
}), D[B].content && (se += D[B].content + ";"), se && (S += `.${B}{${se}}`);
|
|
1471
|
+
}), s.option && s.option.style && (S += s.option.style), V || (V = document.createElement("style"), V.type = "text/css", document.head.appendChild(V)), V.innerHTML = S || "";
|
|
1470
1472
|
}, () => {
|
|
1471
1473
|
});
|
|
1472
1474
|
});
|
|
1473
|
-
const
|
|
1474
|
-
|
|
1475
|
-
}, 100),
|
|
1476
|
-
|
|
1477
|
-
}, 100),
|
|
1478
|
-
|
|
1475
|
+
const N = ce(() => {
|
|
1476
|
+
g.bus.$emit("$loadData.$topForm");
|
|
1477
|
+
}, 100), Ae = ce(() => {
|
|
1478
|
+
g.bus.$emit("$loadData.$form");
|
|
1479
|
+
}, 100), ve = (S) => {
|
|
1480
|
+
g.bus.$emit("change-$form." + S);
|
|
1479
1481
|
};
|
|
1480
|
-
return
|
|
1481
|
-
o && (v.top.bus.$on("$loadData.$form",
|
|
1482
|
-
}), hr(() => {
|
|
1483
|
-
o && (v.top.bus.$off("$loadData.$form", L), v.top.bus.$off("change", $e)), V && document.head.removeChild(V), Z(), m.destroyed = !0, y.unmount();
|
|
1482
|
+
return hr(() => {
|
|
1483
|
+
o && (v.top.bus.$on("$loadData.$form", N), v.top.bus.$on("change", ve)), g.mounted();
|
|
1484
1484
|
}), dr(() => {
|
|
1485
|
-
|
|
1486
|
-
}),
|
|
1487
|
-
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
}),
|
|
1491
|
-
|
|
1492
|
-
}
|
|
1485
|
+
o && (v.top.bus.$off("$loadData.$form", N), v.top.bus.$off("change", ve)), V && document.head.removeChild(V), x(), m.destroyed = !0, g.unmount();
|
|
1486
|
+
}), pr(() => {
|
|
1487
|
+
g.updated();
|
|
1488
|
+
}), L(f, (S) => {
|
|
1489
|
+
S ? I() : x();
|
|
1490
|
+
}, { immediate: !0 }), L(() => [...l.value], (S) => {
|
|
1491
|
+
g.$handle.isBreakWatch() || S.length === m.renderRule.length && S.every((D) => m.renderRule.indexOf(D) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
|
|
1492
|
+
}), L(() => s.option, () => {
|
|
1493
|
+
g.initOptions(), v.refresh();
|
|
1494
|
+
}, { deep: !0 }), L(() => [s.disabled, s.preview], () => {
|
|
1493
1495
|
v.refresh();
|
|
1494
|
-
}),
|
|
1495
|
-
JSON.stringify(
|
|
1496
|
-
}, { deep: !0, flush: "post" }),
|
|
1497
|
-
v.coverValue({}),
|
|
1498
|
-
|
|
1496
|
+
}), L(u, (S) => {
|
|
1497
|
+
JSON.stringify(S || {}) !== m.updateValue && (v.config.forceCoverValue ? v.coverValue(S || {}) : v.setValue(S || {}));
|
|
1498
|
+
}, { deep: !0, flush: "post" }), L(() => s.index, () => {
|
|
1499
|
+
v.coverValue({}), g.$handle.updateAppendData(), P(() => {
|
|
1500
|
+
P(() => {
|
|
1499
1501
|
v.clearValidateState();
|
|
1500
1502
|
});
|
|
1501
1503
|
});
|
|
1502
1504
|
}, { flush: "sync" }), U(b({
|
|
1503
|
-
fc:
|
|
1504
|
-
parent: o &&
|
|
1505
|
-
top:
|
|
1506
|
-
fapi:
|
|
1507
|
-
},
|
|
1508
|
-
getGroupInject: () =>
|
|
1505
|
+
fc: de(g),
|
|
1506
|
+
parent: o && de(o),
|
|
1507
|
+
top: de(a),
|
|
1508
|
+
fapi: de(v)
|
|
1509
|
+
}, lt(m)), {
|
|
1510
|
+
getGroupInject: () => Re(n, o),
|
|
1509
1511
|
refresh() {
|
|
1510
1512
|
++m.unique;
|
|
1511
1513
|
},
|
|
1512
1514
|
renderRule() {
|
|
1513
1515
|
m.renderRule = [...l.value || []];
|
|
1514
1516
|
},
|
|
1515
|
-
updateValue(
|
|
1517
|
+
updateValue(S) {
|
|
1516
1518
|
if (m.destroyed) return;
|
|
1517
|
-
const
|
|
1518
|
-
m.updateValue !==
|
|
1519
|
-
|
|
1519
|
+
const D = JSON.stringify(S);
|
|
1520
|
+
m.updateValue !== D && (m.updateValue = D, n.$emit("update:value", S), P(() => {
|
|
1521
|
+
Ae(), o || N();
|
|
1520
1522
|
}));
|
|
1521
1523
|
}
|
|
1522
1524
|
});
|
|
@@ -1526,55 +1528,55 @@ function Nr(t, e, r) {
|
|
|
1526
1528
|
}
|
|
1527
1529
|
};
|
|
1528
1530
|
}
|
|
1529
|
-
const
|
|
1530
|
-
const i = [...
|
|
1531
|
+
const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], Dt = ["on", "nativeOn", "hook"], Z = (t, e = {}, r = {}) => {
|
|
1532
|
+
const i = [...kt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...Dt, ...r.functional || []], o = r.props || [];
|
|
1531
1533
|
return t.reduce((a, l) => {
|
|
1532
1534
|
for (const u in l)
|
|
1533
1535
|
if (a[u])
|
|
1534
1536
|
if (o.indexOf(u) > -1)
|
|
1535
|
-
a[u] =
|
|
1537
|
+
a[u] = Z([l[u]], a[u]);
|
|
1536
1538
|
else if (i.indexOf(u) > -1)
|
|
1537
1539
|
a[u] = b(b({}, a[u]), l[u]);
|
|
1538
1540
|
else if (s.indexOf(u) > -1) {
|
|
1539
|
-
const f = a[u] instanceof Array ? a[u] : [a[u]],
|
|
1540
|
-
a[u] = [...f, ...
|
|
1541
|
+
const f = a[u] instanceof Array ? a[u] : [a[u]], d = l[u] instanceof Array ? l[u] : [l[u]];
|
|
1542
|
+
a[u] = [...f, ...d];
|
|
1541
1543
|
} else if (n.indexOf(u) > -1)
|
|
1542
1544
|
for (const f in l[u])
|
|
1543
1545
|
if (a[u][f]) {
|
|
1544
|
-
const
|
|
1545
|
-
a[u][f] = [...
|
|
1546
|
+
const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], m = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
|
|
1547
|
+
a[u][f] = [...d, ...m];
|
|
1546
1548
|
} else
|
|
1547
1549
|
a[u][f] = l[u][f];
|
|
1548
1550
|
else if (u === "hook")
|
|
1549
1551
|
for (let f in l[u])
|
|
1550
|
-
a[u][f] ? a[u][f] =
|
|
1552
|
+
a[u][f] ? a[u][f] = Ur(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1551
1553
|
else
|
|
1552
1554
|
a[u] = l[u];
|
|
1553
1555
|
else
|
|
1554
1556
|
i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = b({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? b({}, l[u]) : l[u] : a[u] = l[u];
|
|
1555
1557
|
return a;
|
|
1556
1558
|
}, e);
|
|
1557
|
-
},
|
|
1559
|
+
}, Ur = (t, e) => function() {
|
|
1558
1560
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1559
|
-
},
|
|
1560
|
-
function
|
|
1561
|
-
return [...
|
|
1561
|
+
}, jt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ze = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
|
|
1562
|
+
function It() {
|
|
1563
|
+
return [...jt, ...kt, ...Et, ...Dt, ...Ze, ...Ye];
|
|
1562
1564
|
}
|
|
1563
|
-
function
|
|
1565
|
+
function At(t, e, r) {
|
|
1564
1566
|
return `[form-create ${t}]: ${e}`;
|
|
1565
1567
|
}
|
|
1566
1568
|
function xe(t, e) {
|
|
1567
|
-
console.error(
|
|
1569
|
+
console.error(At("err", t));
|
|
1568
1570
|
}
|
|
1569
|
-
function
|
|
1571
|
+
function qr(t) {
|
|
1570
1572
|
xe(t.toString()), console.error(t);
|
|
1571
1573
|
}
|
|
1572
|
-
function
|
|
1574
|
+
function Gr(t) {
|
|
1573
1575
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1574
1576
|
}
|
|
1575
1577
|
const We = "[[FORM-CREATE-PREFIX-", ze = "-FORM-CREATE-SUFFIX]]";
|
|
1576
1578
|
function et(t, e) {
|
|
1577
|
-
return JSON.stringify(
|
|
1579
|
+
return JSON.stringify($e(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1578
1580
|
if (!(i && i._isVue === !0)) {
|
|
1579
1581
|
if (typeof i != "function")
|
|
1580
1582
|
return i;
|
|
@@ -1585,7 +1587,7 @@ function et(t, e) {
|
|
|
1585
1587
|
}
|
|
1586
1588
|
}, e);
|
|
1587
1589
|
}
|
|
1588
|
-
function
|
|
1590
|
+
function Le(t) {
|
|
1589
1591
|
return new Function("return " + t)();
|
|
1590
1592
|
}
|
|
1591
1593
|
function W(t, e) {
|
|
@@ -1607,15 +1609,15 @@ function W(t, e) {
|
|
|
1607
1609
|
}, r.__json = t, r.__inject = !0, r;
|
|
1608
1610
|
} else {
|
|
1609
1611
|
if (r.indexOf("$FNX:") === 0)
|
|
1610
|
-
return r =
|
|
1612
|
+
return r = Le("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
|
|
1611
1613
|
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1612
1614
|
}
|
|
1613
1615
|
if (!i) return t;
|
|
1614
1616
|
let s;
|
|
1615
1617
|
try {
|
|
1616
|
-
s =
|
|
1618
|
+
s = Le(r);
|
|
1617
1619
|
} catch (n) {
|
|
1618
|
-
s =
|
|
1620
|
+
s = Le("function " + r);
|
|
1619
1621
|
}
|
|
1620
1622
|
return s.__json = t, s;
|
|
1621
1623
|
} catch (s) {
|
|
@@ -1627,21 +1629,21 @@ err: ${s}`);
|
|
|
1627
1629
|
}
|
|
1628
1630
|
return t;
|
|
1629
1631
|
}
|
|
1630
|
-
function
|
|
1632
|
+
function Vt(t, e) {
|
|
1631
1633
|
return JSON.parse(t, function(r, i) {
|
|
1632
1634
|
return h.Undef(i) || !i.indexOf ? i : W(i, e);
|
|
1633
1635
|
});
|
|
1634
1636
|
}
|
|
1635
|
-
let
|
|
1636
|
-
function
|
|
1637
|
-
const t = 370 + ++
|
|
1637
|
+
let Hr = 0;
|
|
1638
|
+
function Ie() {
|
|
1639
|
+
const t = 370 + ++Hr;
|
|
1638
1640
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1639
1641
|
}
|
|
1640
|
-
function
|
|
1642
|
+
function ie(t, e, r) {
|
|
1641
1643
|
let i = t, s;
|
|
1642
1644
|
return (e || "").split(".").forEach((n) => {
|
|
1643
|
-
s && ((!i[s] || typeof i[s] != "object") &&
|
|
1644
|
-
}),
|
|
1645
|
+
s && ((!i[s] || typeof i[s] != "object") && F(i, s, {}), i = i[s]), s = n;
|
|
1646
|
+
}), F(i, s, r), i;
|
|
1645
1647
|
}
|
|
1646
1648
|
function Ke(t, e) {
|
|
1647
1649
|
return {
|
|
@@ -1651,39 +1653,39 @@ function Ke(t, e) {
|
|
|
1651
1653
|
writable: !!e
|
|
1652
1654
|
};
|
|
1653
1655
|
}
|
|
1654
|
-
function Vt(t, e) {
|
|
1655
|
-
return Pt([t], e || !1)[0];
|
|
1656
|
-
}
|
|
1657
1656
|
function Pt(t, e) {
|
|
1658
|
-
return
|
|
1657
|
+
return Bt([t], e || !1)[0];
|
|
1659
1658
|
}
|
|
1660
|
-
function
|
|
1661
|
-
return
|
|
1659
|
+
function Bt(t, e) {
|
|
1660
|
+
return $e([], [...t], e || !1);
|
|
1662
1661
|
}
|
|
1663
|
-
function
|
|
1662
|
+
function Y(t, e) {
|
|
1663
|
+
return Z(Array.isArray(e) ? e : [e], t, { array: Ze, normal: Ye }), t;
|
|
1664
|
+
}
|
|
1665
|
+
function ct(t) {
|
|
1664
1666
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1665
1667
|
return e.type || (e.type = "input"), e;
|
|
1666
1668
|
}
|
|
1667
|
-
function
|
|
1669
|
+
function Jr(t, e) {
|
|
1668
1670
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1669
|
-
e[r] && (t[r] =
|
|
1671
|
+
e[r] && (t[r] = Y(t[r] || {}, e[r]));
|
|
1670
1672
|
}), t) : e;
|
|
1671
1673
|
}
|
|
1672
|
-
function
|
|
1674
|
+
function Lt(t, e) {
|
|
1673
1675
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1674
1676
|
get() {
|
|
1675
1677
|
return e[i]();
|
|
1676
1678
|
}
|
|
1677
1679
|
}, r), {}));
|
|
1678
1680
|
}
|
|
1679
|
-
function
|
|
1681
|
+
function Q(t) {
|
|
1680
1682
|
return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
|
|
1681
1683
|
}
|
|
1682
|
-
function
|
|
1684
|
+
function O(t, e) {
|
|
1683
1685
|
try {
|
|
1684
1686
|
e = t();
|
|
1685
1687
|
} catch (r) {
|
|
1686
|
-
|
|
1688
|
+
qr(r);
|
|
1687
1689
|
}
|
|
1688
1690
|
return e;
|
|
1689
1691
|
}
|
|
@@ -1695,7 +1697,7 @@ function Xe(t, e) {
|
|
|
1695
1697
|
});
|
|
1696
1698
|
}), r;
|
|
1697
1699
|
}
|
|
1698
|
-
function
|
|
1700
|
+
function Wr(t, e) {
|
|
1699
1701
|
if (h.Object(t)) {
|
|
1700
1702
|
const r = {};
|
|
1701
1703
|
return Object.keys(t).forEach((i) => {
|
|
@@ -1704,7 +1706,7 @@ function Jr(t, e) {
|
|
|
1704
1706
|
} else
|
|
1705
1707
|
return Xe(t, e);
|
|
1706
1708
|
}
|
|
1707
|
-
function
|
|
1709
|
+
function Oe() {
|
|
1708
1710
|
const t = {}, e = (r) => r || "default";
|
|
1709
1711
|
return {
|
|
1710
1712
|
setSlot(r, i) {
|
|
@@ -1720,7 +1722,7 @@ function Le() {
|
|
|
1720
1722
|
const n = s();
|
|
1721
1723
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1722
1724
|
} else h.Undef(s) || i.push(s);
|
|
1723
|
-
}),
|
|
1725
|
+
}), Wr(i, r);
|
|
1724
1726
|
},
|
|
1725
1727
|
getSlots() {
|
|
1726
1728
|
let r = [];
|
|
@@ -1740,27 +1742,27 @@ function Le() {
|
|
|
1740
1742
|
}
|
|
1741
1743
|
};
|
|
1742
1744
|
}
|
|
1743
|
-
function
|
|
1745
|
+
function Se(t, e) {
|
|
1744
1746
|
return Object.setPrototypeOf(t, e), t;
|
|
1745
1747
|
}
|
|
1746
|
-
const
|
|
1747
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1748
|
-
"!=": (t, e) => !
|
|
1748
|
+
const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
|
|
1749
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
|
|
1750
|
+
"!=": (t, e) => !fe["=="](t, e),
|
|
1749
1751
|
">": (t, e) => t > e,
|
|
1750
1752
|
">=": (t, e) => t >= e,
|
|
1751
1753
|
"<": (t, e) => t < e,
|
|
1752
1754
|
"<=": (t, e) => t <= e,
|
|
1753
1755
|
on(t, e) {
|
|
1754
|
-
return t && t.indexOf && t.indexOf(
|
|
1756
|
+
return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
|
|
1755
1757
|
},
|
|
1756
1758
|
notOn(t, e) {
|
|
1757
|
-
return !
|
|
1759
|
+
return !fe.on(t, e);
|
|
1758
1760
|
},
|
|
1759
1761
|
in(t, e) {
|
|
1760
1762
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1761
1763
|
},
|
|
1762
1764
|
notIn(t, e) {
|
|
1763
|
-
return !
|
|
1765
|
+
return !fe.in(t, e);
|
|
1764
1766
|
},
|
|
1765
1767
|
between(t, e) {
|
|
1766
1768
|
return t > e[0] && t < e[1];
|
|
@@ -1778,12 +1780,12 @@ const ct = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
|
|
|
1778
1780
|
return new RegExp(e, "g").test(t);
|
|
1779
1781
|
}
|
|
1780
1782
|
};
|
|
1781
|
-
function
|
|
1783
|
+
function T(t, e) {
|
|
1782
1784
|
return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
|
|
1783
1785
|
t != null && (t = t[r]);
|
|
1784
1786
|
}), t;
|
|
1785
1787
|
}
|
|
1786
|
-
function
|
|
1788
|
+
function zr(t) {
|
|
1787
1789
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1788
1790
|
let r;
|
|
1789
1791
|
const i = {};
|
|
@@ -1791,13 +1793,13 @@ function Wr(t) {
|
|
|
1791
1793
|
r[1] && (i[r[1]] = !0);
|
|
1792
1794
|
return Object.keys(i);
|
|
1793
1795
|
}
|
|
1794
|
-
function
|
|
1796
|
+
function dt(t) {
|
|
1795
1797
|
let e = t.split("."), r = [], i = "";
|
|
1796
1798
|
return e.forEach((s, n) => {
|
|
1797
1799
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1798
1800
|
}), r.join(" && ");
|
|
1799
1801
|
}
|
|
1800
|
-
function
|
|
1802
|
+
function Tt() {
|
|
1801
1803
|
return {
|
|
1802
1804
|
props: {},
|
|
1803
1805
|
on: {},
|
|
@@ -1816,50 +1818,50 @@ function A(t, e) {
|
|
|
1816
1818
|
};
|
|
1817
1819
|
}
|
|
1818
1820
|
function tt(t, e, r, i, s) {
|
|
1819
|
-
this._data = _(
|
|
1821
|
+
this._data = _(Tt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1820
1822
|
}
|
|
1821
1823
|
_(tt.prototype, {
|
|
1822
1824
|
getRule() {
|
|
1823
1825
|
return this._data;
|
|
1824
1826
|
},
|
|
1825
1827
|
setProp(t, e) {
|
|
1826
|
-
return
|
|
1828
|
+
return F(this._data, t, e), this;
|
|
1827
1829
|
},
|
|
1828
1830
|
_clone() {
|
|
1829
1831
|
const t = new this.constructor();
|
|
1830
|
-
return t._data =
|
|
1832
|
+
return t._data = Pt(this._data), t;
|
|
1831
1833
|
}
|
|
1832
1834
|
});
|
|
1833
|
-
function
|
|
1835
|
+
function Nt(t) {
|
|
1834
1836
|
t.forEach((e) => {
|
|
1835
1837
|
tt.prototype[e] = function(r) {
|
|
1836
|
-
return
|
|
1838
|
+
return Y(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1837
1839
|
};
|
|
1838
1840
|
});
|
|
1839
1841
|
}
|
|
1840
|
-
|
|
1841
|
-
const
|
|
1842
|
-
function
|
|
1843
|
-
let i =
|
|
1842
|
+
Nt(It());
|
|
1843
|
+
const Mt = A("");
|
|
1844
|
+
function Kr(t, e, r) {
|
|
1845
|
+
let i = Mt("", e);
|
|
1844
1846
|
return i._data.type = t, i._data.title = r, i;
|
|
1845
1847
|
}
|
|
1846
|
-
function
|
|
1847
|
-
let s =
|
|
1848
|
+
function pt(t, e, r, i) {
|
|
1849
|
+
let s = Mt("", r);
|
|
1848
1850
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1849
1851
|
}
|
|
1850
|
-
function
|
|
1852
|
+
function Xr() {
|
|
1851
1853
|
return {
|
|
1852
|
-
create:
|
|
1853
|
-
createTmp:
|
|
1854
|
-
template:
|
|
1854
|
+
create: Kr,
|
|
1855
|
+
createTmp: pt,
|
|
1856
|
+
template: pt,
|
|
1855
1857
|
factory: A
|
|
1856
1858
|
};
|
|
1857
1859
|
}
|
|
1858
|
-
function
|
|
1860
|
+
function Qr(t, e, r) {
|
|
1859
1861
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1860
1862
|
return s.status = r.status, s.url = t, s;
|
|
1861
1863
|
}
|
|
1862
|
-
function
|
|
1864
|
+
function mt(t) {
|
|
1863
1865
|
const e = t.responseText || t.response;
|
|
1864
1866
|
if (!e)
|
|
1865
1867
|
return e;
|
|
@@ -1869,38 +1871,40 @@ function pt(t) {
|
|
|
1869
1871
|
return e;
|
|
1870
1872
|
}
|
|
1871
1873
|
}
|
|
1872
|
-
function
|
|
1874
|
+
function Ut(t) {
|
|
1873
1875
|
if (typeof XMLHttpRequest == "undefined")
|
|
1874
1876
|
return;
|
|
1875
1877
|
const e = new XMLHttpRequest();
|
|
1876
1878
|
let r = t.action || "";
|
|
1877
|
-
if (t.
|
|
1879
|
+
if (e.upload && t.onProgress && e.upload.addEventListener("progress", (n) => {
|
|
1880
|
+
n.percent = n.total > 0 ? n.loaded / n.total * 100 : 0, t.onProgress(n);
|
|
1881
|
+
}), t.query) {
|
|
1878
1882
|
const n = new URLSearchParams(t.query).toString();
|
|
1879
|
-
r.includes("?") ? r += `&${n}` : r += `?${n}
|
|
1883
|
+
n && (r.includes("?") ? r += `&${n}` : r += `?${n}`);
|
|
1880
1884
|
}
|
|
1881
1885
|
e.onerror = function(o) {
|
|
1882
1886
|
t.onError(o);
|
|
1883
1887
|
}, e.onload = function() {
|
|
1884
1888
|
if (e.status < 200 || e.status >= 300)
|
|
1885
|
-
return t.onError(
|
|
1886
|
-
t.onSuccess(
|
|
1889
|
+
return t.onError(Qr(r, t, e), mt(e));
|
|
1890
|
+
t.onSuccess(mt(e));
|
|
1887
1891
|
}, e.open(t.method || "get", r, !0);
|
|
1888
1892
|
let i;
|
|
1889
|
-
t.data && ((t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data).map((n) => {
|
|
1893
|
+
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
1890
1894
|
i.append(n, t.data[n]);
|
|
1891
|
-
})) : (i = JSON.stringify(t.data), e.setRequestHeader("content-type", "application/json"))), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0);
|
|
1895
|
+
})) : (i = JSON.stringify(t.data || {}), e.setRequestHeader("content-type", "application/json"))), t.file && i.append(t.filename, t.file, t.file.name), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0);
|
|
1892
1896
|
const s = t.headers || {};
|
|
1893
1897
|
Object.keys(s).forEach((n) => {
|
|
1894
1898
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1895
1899
|
}), e.send(i);
|
|
1896
1900
|
}
|
|
1897
|
-
function
|
|
1901
|
+
function gt(t, e, r) {
|
|
1898
1902
|
return new Promise((i, s) => {
|
|
1899
|
-
(e ||
|
|
1903
|
+
(e || Ut)(U(b({}, t), {
|
|
1900
1904
|
onSuccess(n) {
|
|
1901
1905
|
let o = (l) => l;
|
|
1902
1906
|
const a = W(t.parse);
|
|
1903
|
-
h.Function(a) ? o = a : a && h.String(a) && (o = (l) =>
|
|
1907
|
+
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => T(l, a)), i(o(n, void 0, r));
|
|
1904
1908
|
},
|
|
1905
1909
|
onError(n) {
|
|
1906
1910
|
s(n);
|
|
@@ -1908,17 +1912,17 @@ function mt(t, e, r) {
|
|
|
1908
1912
|
}));
|
|
1909
1913
|
});
|
|
1910
1914
|
}
|
|
1911
|
-
function
|
|
1915
|
+
function ge(t) {
|
|
1912
1916
|
return J(t);
|
|
1913
1917
|
}
|
|
1914
|
-
function
|
|
1918
|
+
function Zr(t) {
|
|
1915
1919
|
function e(n) {
|
|
1916
1920
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1917
1921
|
}
|
|
1918
1922
|
function r(n, o, a) {
|
|
1919
1923
|
e(n).forEach((l) => {
|
|
1920
1924
|
t.getCtxs(l).forEach((u) => {
|
|
1921
|
-
|
|
1925
|
+
F(u.rule, o, a), t.$render.clearCache(u);
|
|
1922
1926
|
});
|
|
1923
1927
|
});
|
|
1924
1928
|
}
|
|
@@ -1976,14 +1980,14 @@ function Qr(t) {
|
|
|
1976
1980
|
if (n == null) {
|
|
1977
1981
|
const o = {};
|
|
1978
1982
|
return Object.keys(t.form).forEach((a) => {
|
|
1979
|
-
t.ignoreFields.indexOf(a) === -1 && (o[a] =
|
|
1983
|
+
t.ignoreFields.indexOf(a) === -1 && (o[a] = ge(t.form[a]));
|
|
1980
1984
|
}), o;
|
|
1981
1985
|
} else
|
|
1982
1986
|
return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
|
|
1983
1987
|
},
|
|
1984
1988
|
getValue(n) {
|
|
1985
1989
|
const o = t.getFieldCtx(n);
|
|
1986
|
-
return o ?
|
|
1990
|
+
return o ? ge(o.rule.value) : t.options.appendValue !== !1 && k(t.appendData, n) ? ge(t.appendData[n]) : void 0;
|
|
1987
1991
|
},
|
|
1988
1992
|
coverValue(n) {
|
|
1989
1993
|
const o = b({}, n || {});
|
|
@@ -1991,7 +1995,7 @@ function Qr(t) {
|
|
|
1991
1995
|
t.appendData = {}, s.fields().forEach((a) => {
|
|
1992
1996
|
const l = t.fieldCtx[a];
|
|
1993
1997
|
if (l) {
|
|
1994
|
-
const u =
|
|
1998
|
+
const u = k(n, a);
|
|
1995
1999
|
l.forEach((f) => {
|
|
1996
2000
|
f.rule.value = u ? n[a] : void 0;
|
|
1997
2001
|
}), delete o[a];
|
|
@@ -2020,7 +2024,7 @@ function Qr(t) {
|
|
|
2020
2024
|
}, !0), o ? o.origin : void 0;
|
|
2021
2025
|
},
|
|
2022
2026
|
removeRule(n) {
|
|
2023
|
-
const o = n &&
|
|
2027
|
+
const o = n && Q(n);
|
|
2024
2028
|
if (o)
|
|
2025
2029
|
return o.rm(), o.origin;
|
|
2026
2030
|
},
|
|
@@ -2070,7 +2074,7 @@ function Qr(t) {
|
|
|
2070
2074
|
disabled(n, o) {
|
|
2071
2075
|
e(o).forEach((a) => {
|
|
2072
2076
|
t.getCtxs(a).forEach((l) => {
|
|
2073
|
-
|
|
2077
|
+
F(l.rule.props, "disabled", !!n);
|
|
2074
2078
|
});
|
|
2075
2079
|
}), t.refresh();
|
|
2076
2080
|
},
|
|
@@ -2109,7 +2113,7 @@ function Qr(t) {
|
|
|
2109
2113
|
n.forEach((a) => s.sync(a));
|
|
2110
2114
|
return;
|
|
2111
2115
|
}
|
|
2112
|
-
let o = h.Object(n) ?
|
|
2116
|
+
let o = h.Object(n) ? Q(n) : t.getCtxs(n);
|
|
2113
2117
|
o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
|
|
2114
2118
|
if (!a.deleted) {
|
|
2115
2119
|
const l = t.subForm[a.id];
|
|
@@ -2128,7 +2132,7 @@ function Qr(t) {
|
|
|
2128
2132
|
t.$manager.updateOptions(t.options), s.refresh();
|
|
2129
2133
|
},
|
|
2130
2134
|
hideForm: (n) => {
|
|
2131
|
-
|
|
2135
|
+
F(t.vm, "isShow", !n);
|
|
2132
2136
|
},
|
|
2133
2137
|
changeStatus: () => t.changeStatus,
|
|
2134
2138
|
clearChangeStatus: () => {
|
|
@@ -2146,7 +2150,7 @@ function Qr(t) {
|
|
|
2146
2150
|
},
|
|
2147
2151
|
mergeRule: (n, o) => {
|
|
2148
2152
|
t.getCtxs(n).forEach((a) => {
|
|
2149
|
-
|
|
2153
|
+
Y(a.rule, o);
|
|
2150
2154
|
});
|
|
2151
2155
|
},
|
|
2152
2156
|
mergeRules(n) {
|
|
@@ -2173,7 +2177,7 @@ function Qr(t) {
|
|
|
2173
2177
|
},
|
|
2174
2178
|
setEffect(n, o, a) {
|
|
2175
2179
|
const l = t.getCtx(n);
|
|
2176
|
-
l && o && (o[0] === "$" && (o = o.substr(1)),
|
|
2180
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), k(l.rule, "$" + o) && F(l.rule, "$" + o, a), k(l.rule, "effect") || F(l.rule, "effect", {}), F(l.rule.effect, o, a));
|
|
2177
2181
|
},
|
|
2178
2182
|
clearEffectData(n, o) {
|
|
2179
2183
|
const a = t.getCtx(n);
|
|
@@ -2193,20 +2197,24 @@ function Qr(t) {
|
|
|
2193
2197
|
resetFields(n) {
|
|
2194
2198
|
e(n).forEach((o) => {
|
|
2195
2199
|
t.getCtxs(o).forEach((a) => {
|
|
2196
|
-
t.$render.clearCache(a), a.rule.value =
|
|
2200
|
+
t.$render.clearCache(a), a.rule.value = ge(a.defaultValue);
|
|
2197
2201
|
});
|
|
2198
|
-
}),
|
|
2199
|
-
|
|
2200
|
-
|
|
2202
|
+
}), P(() => {
|
|
2203
|
+
P(() => {
|
|
2204
|
+
P(() => {
|
|
2205
|
+
s.clearValidateState(n);
|
|
2206
|
+
});
|
|
2207
|
+
});
|
|
2208
|
+
}), n == null && (h.Function(t.options.onReset) && O(() => t.options.onReset(s)), t.vm.$emit("reset", s));
|
|
2201
2209
|
},
|
|
2202
2210
|
method(n, o) {
|
|
2203
2211
|
const a = s.el(n);
|
|
2204
2212
|
if (!a || !a[o])
|
|
2205
|
-
throw new Error(
|
|
2213
|
+
throw new Error(At("err", `${o} 方法不存在`));
|
|
2206
2214
|
return (...l) => a[o](...l);
|
|
2207
2215
|
},
|
|
2208
2216
|
exec(n, o, ...a) {
|
|
2209
|
-
return
|
|
2217
|
+
return O(() => s.method(n, o)(...a));
|
|
2210
2218
|
},
|
|
2211
2219
|
toJson(n) {
|
|
2212
2220
|
return et(s.rule, n);
|
|
@@ -2228,21 +2236,21 @@ function Qr(t) {
|
|
|
2228
2236
|
return o ? t.subForm[o.id] : void 0;
|
|
2229
2237
|
},
|
|
2230
2238
|
getChildrenRuleList(n) {
|
|
2231
|
-
const o = typeof n == "object", a = o ?
|
|
2239
|
+
const o = typeof n == "object", a = o ? Q(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
|
|
2232
2240
|
if (!l)
|
|
2233
2241
|
return [];
|
|
2234
2242
|
const u = [];
|
|
2235
|
-
return ((
|
|
2236
|
-
|
|
2243
|
+
return ((d) => {
|
|
2244
|
+
d && d.forEach((m) => {
|
|
2237
2245
|
typeof m == "object" && (m.field && u.push(m), u.push(...s.getChildrenRuleList(m)));
|
|
2238
2246
|
});
|
|
2239
2247
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2240
2248
|
},
|
|
2241
2249
|
getParentRule(n) {
|
|
2242
|
-
return (typeof n == "object" ?
|
|
2250
|
+
return (typeof n == "object" ? Q(n) : t.getCtx(n)).parent.rule;
|
|
2243
2251
|
},
|
|
2244
2252
|
getParentSubRule(n) {
|
|
2245
|
-
const a = typeof n == "object" ?
|
|
2253
|
+
const a = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2246
2254
|
if (a) {
|
|
2247
2255
|
const l = a.getParentGroup();
|
|
2248
2256
|
if (l)
|
|
@@ -2250,13 +2258,13 @@ function Qr(t) {
|
|
|
2250
2258
|
}
|
|
2251
2259
|
},
|
|
2252
2260
|
getChildrenFormData(n) {
|
|
2253
|
-
return s.getChildrenRuleList(n).reduce((a, l) => (a[l.field] =
|
|
2261
|
+
return s.getChildrenRuleList(n).reduce((a, l) => (a[l.field] = ge(l.value), a), {});
|
|
2254
2262
|
},
|
|
2255
2263
|
setChildrenFormData(n, o, a) {
|
|
2256
2264
|
const l = s.getChildrenRuleList(n);
|
|
2257
2265
|
t.deferSyncValue(() => {
|
|
2258
2266
|
l.forEach((u) => {
|
|
2259
|
-
|
|
2267
|
+
k(o, u.field) ? u.value = o[u.field] : a && (u.value = void 0);
|
|
2260
2268
|
});
|
|
2261
2269
|
});
|
|
2262
2270
|
},
|
|
@@ -2273,11 +2281,19 @@ function Qr(t) {
|
|
|
2273
2281
|
}).catch(a) : o(l.data);
|
|
2274
2282
|
});
|
|
2275
2283
|
},
|
|
2284
|
+
renderRule(n, o, a) {
|
|
2285
|
+
const u = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2286
|
+
return u ? t.$render.createRuleVnode(u, o, a) : void 0;
|
|
2287
|
+
},
|
|
2288
|
+
renderChildren(n, o, a) {
|
|
2289
|
+
const u = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2290
|
+
return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
|
|
2291
|
+
},
|
|
2276
2292
|
nextTick(n) {
|
|
2277
2293
|
t.bus.$once("next-tick", n), t.refresh();
|
|
2278
2294
|
},
|
|
2279
2295
|
nextRefresh(n) {
|
|
2280
|
-
t.nextRefresh(), n &&
|
|
2296
|
+
t.nextRefresh(), n && O(n);
|
|
2281
2297
|
},
|
|
2282
2298
|
emit(n, ...o) {
|
|
2283
2299
|
t.vm.$emit(n, ...o);
|
|
@@ -2288,20 +2304,20 @@ function Qr(t) {
|
|
|
2288
2304
|
bus: t.bus,
|
|
2289
2305
|
fetch(n) {
|
|
2290
2306
|
return new Promise((o, a) => {
|
|
2291
|
-
n = J(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2292
|
-
|
|
2307
|
+
n = J(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
|
|
2308
|
+
O(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2293
2309
|
}).catch((l) => {
|
|
2294
|
-
|
|
2310
|
+
O(() => n.onError && n.onError(l)), a(l);
|
|
2295
2311
|
}));
|
|
2296
2312
|
});
|
|
2297
2313
|
},
|
|
2298
2314
|
watchFetch(n, o, a, l) {
|
|
2299
2315
|
return t.fc.watchLoadData((u, f) => {
|
|
2300
|
-
let
|
|
2301
|
-
|
|
2302
|
-
|
|
2316
|
+
let d = J(n);
|
|
2317
|
+
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => gt(d, t.fc.create.fetch, s).then((m) => {
|
|
2318
|
+
O(() => d.onSuccess && d.onSuccess(m)), o && o(m, f);
|
|
2303
2319
|
}).catch((m) => {
|
|
2304
|
-
|
|
2320
|
+
O(() => d.onError && d.onError(m)), a && a(m);
|
|
2305
2321
|
}));
|
|
2306
2322
|
}, n.wait == null ? 1e3 : n.wait);
|
|
2307
2323
|
},
|
|
@@ -2331,7 +2347,7 @@ function Qr(t) {
|
|
|
2331
2347
|
};
|
|
2332
2348
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2333
2349
|
}
|
|
2334
|
-
function
|
|
2350
|
+
function Yr(t) {
|
|
2335
2351
|
_(t.prototype, {
|
|
2336
2352
|
initCache() {
|
|
2337
2353
|
this.clearCacheAll();
|
|
@@ -2367,12 +2383,12 @@ function q(t) {
|
|
|
2367
2383
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2368
2384
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2369
2385
|
});
|
|
2370
|
-
return
|
|
2386
|
+
return qt(e);
|
|
2371
2387
|
}
|
|
2372
|
-
function
|
|
2388
|
+
function qt(t) {
|
|
2373
2389
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2374
2390
|
}
|
|
2375
|
-
function
|
|
2391
|
+
function xr(t) {
|
|
2376
2392
|
_(t.prototype, {
|
|
2377
2393
|
initRender() {
|
|
2378
2394
|
this.cacheConfig = {};
|
|
@@ -2381,7 +2397,7 @@ function Yr(t) {
|
|
|
2381
2397
|
const r = (i) => {
|
|
2382
2398
|
if (i) {
|
|
2383
2399
|
let s;
|
|
2384
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2400
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + ye(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + ye(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2385
2401
|
}
|
|
2386
2402
|
};
|
|
2387
2403
|
return r(this.vm);
|
|
@@ -2390,7 +2406,7 @@ function Yr(t) {
|
|
|
2390
2406
|
if (!this.vm.isShow)
|
|
2391
2407
|
return;
|
|
2392
2408
|
this.$manager.beforeRender();
|
|
2393
|
-
const e =
|
|
2409
|
+
const e = Oe();
|
|
2394
2410
|
return this.sort.forEach((r) => {
|
|
2395
2411
|
this.renderSlot(e, this.$handle.ctxs[r]);
|
|
2396
2412
|
}), this.$manager.render(e);
|
|
@@ -2401,23 +2417,23 @@ function Yr(t) {
|
|
|
2401
2417
|
})) : e.setSlot(r.rule.slot, this.renderCtx(r, i));
|
|
2402
2418
|
},
|
|
2403
2419
|
mergeGlobal(e) {
|
|
2404
|
-
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] =
|
|
2420
|
+
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = pe(() => {
|
|
2405
2421
|
const i = this.$handle.options.global;
|
|
2406
|
-
return
|
|
2407
|
-
})), e.prop =
|
|
2422
|
+
return Y({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2423
|
+
})), e.prop = Y({}, [this.cacheConfig[e.trueType].value, e.prop]));
|
|
2408
2424
|
},
|
|
2409
2425
|
setOptions(e) {
|
|
2410
2426
|
const r = e.loadPending({ key: "options", origin: e.prop.options, def: [] });
|
|
2411
|
-
e.prop.options = r, e.prop.optionsTo && r &&
|
|
2427
|
+
e.prop.options = r, e.prop.optionsTo && r && ie(e.prop, e.prop.optionsTo, r);
|
|
2412
2428
|
},
|
|
2413
2429
|
deepSet(e) {
|
|
2414
2430
|
const r = e.rule.deep;
|
|
2415
2431
|
r && Object.keys(r).sort((i, s) => i.length < s.length ? -1 : 1).forEach((i) => {
|
|
2416
|
-
|
|
2432
|
+
ie(e.prop, i, r[i]);
|
|
2417
2433
|
});
|
|
2418
2434
|
},
|
|
2419
2435
|
parseSide(e, r) {
|
|
2420
|
-
return h.Object(e) ?
|
|
2436
|
+
return h.Object(e) ? Y({ props: { formCreateInject: r.prop.props.formCreateInject } }, e) : e;
|
|
2421
2437
|
},
|
|
2422
2438
|
renderSides(e, r, i) {
|
|
2423
2439
|
const s = r[i ? "rule" : "prop"];
|
|
@@ -2431,7 +2447,7 @@ function Yr(t) {
|
|
|
2431
2447
|
try {
|
|
2432
2448
|
if (e.type === "hidden") return;
|
|
2433
2449
|
const i = e.rule;
|
|
2434
|
-
if (!this.cache[e.id] || this.cache[e.id].slot !== i.slot) {
|
|
2450
|
+
if (this.force || !this.cache[e.id] || this.cache[e.id].slot !== i.slot) {
|
|
2435
2451
|
let s;
|
|
2436
2452
|
e.initProp(), this.mergeGlobal(e), e.initNone(), this.$manager.tidyRule(e), this.deepSet(e), this.setOptions(e), this.ctxProp(e);
|
|
2437
2453
|
let n = e.prop;
|
|
@@ -2451,13 +2467,23 @@ function Yr(t) {
|
|
|
2451
2467
|
model: n.model || {},
|
|
2452
2468
|
slotValue: l
|
|
2453
2469
|
};
|
|
2454
|
-
l.length && i.slotUpdate &&
|
|
2455
|
-
let f =
|
|
2456
|
-
const
|
|
2457
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(
|
|
2470
|
+
l.length && i.slotUpdate && O(() => i.slotUpdate(u));
|
|
2471
|
+
let f = [];
|
|
2472
|
+
const d = e.loadChildrenPending();
|
|
2473
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((v) => {
|
|
2474
|
+
f.push(this.renderRule({
|
|
2475
|
+
type: "template",
|
|
2476
|
+
slot: v
|
|
2477
|
+
}, (() => {
|
|
2478
|
+
if (h.Function(n.renderSlots[v]))
|
|
2479
|
+
return O(() => n.renderSlots[v]());
|
|
2480
|
+
const w = this.parseSide(n.renderSlots[v], e);
|
|
2481
|
+
return this.renderRule(w);
|
|
2482
|
+
})()));
|
|
2483
|
+
});
|
|
2458
2484
|
const m = this.getTypeSlot(e);
|
|
2459
|
-
let
|
|
2460
|
-
return m ? (u.children = f,
|
|
2485
|
+
let g;
|
|
2486
|
+
return m ? (u.children = f, g = m(u)) : g = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map((v) => !v || !v.tag ? v : this.none(v)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
|
|
2461
2487
|
}, this.setCache(e, s, r);
|
|
2462
2488
|
}
|
|
2463
2489
|
return (...s) => {
|
|
@@ -2514,6 +2540,7 @@ function Yr(t) {
|
|
|
2514
2540
|
field: e.field,
|
|
2515
2541
|
rule: e.rule,
|
|
2516
2542
|
input: e.input,
|
|
2543
|
+
t: (...s) => this.$handle.api.t(...s),
|
|
2517
2544
|
updateValue: (s) => {
|
|
2518
2545
|
this.$handle.onUpdateValue(e, s);
|
|
2519
2546
|
}
|
|
@@ -2550,17 +2577,21 @@ function Yr(t) {
|
|
|
2550
2577
|
}
|
|
2551
2578
|
}
|
|
2552
2579
|
];
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
this.
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2580
|
+
if (e.input) {
|
|
2581
|
+
const o = this.tmpInput;
|
|
2582
|
+
this.vm.$props.disabled === !0 && (e.prop.props.disabled = !0), e.prop.model = {
|
|
2583
|
+
value: this.$handle.getFormData(e),
|
|
2584
|
+
callback: (a) => {
|
|
2585
|
+
o && o(e.field, a, e.rule), this.onInput(e, a);
|
|
2586
|
+
},
|
|
2587
|
+
expression: `formData.${e.id}`
|
|
2588
|
+
}, e.prop.modelEmit && n.push({
|
|
2589
|
+
on: {
|
|
2590
|
+
[e.prop.modelEmit]: () => this.onEmitInput(e)
|
|
2591
|
+
}
|
|
2592
|
+
});
|
|
2593
|
+
}
|
|
2594
|
+
return Z(n, e.prop), e.prop;
|
|
2564
2595
|
},
|
|
2565
2596
|
onMounted(e) {
|
|
2566
2597
|
e.el = this.vm.$refs[e.ref], e.el && ((e.el.$el || e.el).__rule__ = e.rule), e.parser.mounted(e), this.$handle.effect(e, "mounted"), this.$handle.targetHook(e, "mounted");
|
|
@@ -2577,7 +2608,7 @@ function Yr(t) {
|
|
|
2577
2608
|
},
|
|
2578
2609
|
renderChildren(e, r, i) {
|
|
2579
2610
|
if (!h.trueArray(e)) return [];
|
|
2580
|
-
const s =
|
|
2611
|
+
const s = Oe();
|
|
2581
2612
|
return e.map((n) => {
|
|
2582
2613
|
if (n) {
|
|
2583
2614
|
if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
|
|
@@ -2586,7 +2617,7 @@ function Yr(t) {
|
|
|
2586
2617
|
}) : n);
|
|
2587
2618
|
if (n.__fc__)
|
|
2588
2619
|
return this.renderSlot(s, n.__fc__, r);
|
|
2589
|
-
n.type &&
|
|
2620
|
+
n.type && P(() => {
|
|
2590
2621
|
this.$handle.loadChildren(e, r), this.$handle.refresh();
|
|
2591
2622
|
});
|
|
2592
2623
|
}
|
|
@@ -2594,7 +2625,17 @@ function Yr(t) {
|
|
|
2594
2625
|
},
|
|
2595
2626
|
defaultRender(e, r) {
|
|
2596
2627
|
const i = e.prop;
|
|
2597
|
-
return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[e.type] ? this.vNode[e.type](i, r) : this.vNode[e.originType] ? this.vNode[e.originType](i, r) : this.vNode.make(
|
|
2628
|
+
return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[e.type] ? this.vNode[e.type](i, r) : this.vNode[e.originType] ? this.vNode[e.originType](i, r) : this.vNode.make(qt(i.type), i, r);
|
|
2629
|
+
},
|
|
2630
|
+
createChildrenVnodes(e, r, i) {
|
|
2631
|
+
this.force = i !== !1, this.tmpInput = r;
|
|
2632
|
+
const s = this.renderChildren(e.rule.children, e);
|
|
2633
|
+
return this.force = !1, this.tmpInput = null, s;
|
|
2634
|
+
},
|
|
2635
|
+
createRuleVnode(e, r, i) {
|
|
2636
|
+
this.force = i !== !1, this.tmpInput = r;
|
|
2637
|
+
const s = Oe();
|
|
2638
|
+
return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
|
|
2598
2639
|
},
|
|
2599
2640
|
renderRule(e, r, i) {
|
|
2600
2641
|
if (!e) return;
|
|
@@ -2608,7 +2649,7 @@ function Yr(t) {
|
|
|
2608
2649
|
a && (s = q(a));
|
|
2609
2650
|
}
|
|
2610
2651
|
if (!s) return;
|
|
2611
|
-
const n =
|
|
2652
|
+
const n = Oe();
|
|
2612
2653
|
h.trueArray(e.children) && e.children.forEach((a) => {
|
|
2613
2654
|
a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2614
2655
|
});
|
|
@@ -2617,7 +2658,7 @@ function Yr(t) {
|
|
|
2617
2658
|
}
|
|
2618
2659
|
});
|
|
2619
2660
|
}
|
|
2620
|
-
let
|
|
2661
|
+
let ei = 1;
|
|
2621
2662
|
function rt(t) {
|
|
2622
2663
|
_(this, {
|
|
2623
2664
|
$handle: t,
|
|
@@ -2625,8 +2666,10 @@ function rt(t) {
|
|
|
2625
2666
|
vm: t.vm,
|
|
2626
2667
|
$manager: t.$manager,
|
|
2627
2668
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2628
|
-
|
|
2629
|
-
|
|
2669
|
+
force: !1,
|
|
2670
|
+
tmpInput: null,
|
|
2671
|
+
id: ei++
|
|
2672
|
+
}), Lt(this, {
|
|
2630
2673
|
options() {
|
|
2631
2674
|
return t.options;
|
|
2632
2675
|
},
|
|
@@ -2635,9 +2678,9 @@ function rt(t) {
|
|
|
2635
2678
|
}
|
|
2636
2679
|
}), this.initCache(), this.initRender();
|
|
2637
2680
|
}
|
|
2638
|
-
Zr(rt);
|
|
2639
2681
|
Yr(rt);
|
|
2640
|
-
|
|
2682
|
+
xr(rt);
|
|
2683
|
+
function ti(t) {
|
|
2641
2684
|
_(t.prototype, {
|
|
2642
2685
|
parseInjectEvent(e, r) {
|
|
2643
2686
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2664,16 +2707,16 @@ function ei(t) {
|
|
|
2664
2707
|
let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
|
|
2665
2708
|
return h.trueArray(u) && u.forEach((f) => {
|
|
2666
2709
|
if (!f) return;
|
|
2667
|
-
let
|
|
2668
|
-
if (h.Object(f) && (
|
|
2710
|
+
let d, m = n || o || a;
|
|
2711
|
+
if (h.Object(f) && (d = f.inject, f = f.name, m = f.prefix || m), m) {
|
|
2669
2712
|
r || (m = `native-${m}`);
|
|
2670
|
-
const
|
|
2671
|
-
this.vm.$emit(
|
|
2713
|
+
const g = ye(`${m}-${f}`), v = (...w) => {
|
|
2714
|
+
this.vm.$emit(g, ...w), this.vm.$emit("emit-event", g, ...w), this.bus.$emit(g, ...w);
|
|
2672
2715
|
};
|
|
2673
|
-
if (v.__emit = !0, !
|
|
2716
|
+
if (v.__emit = !0, !d && l === !1)
|
|
2674
2717
|
i[f] = v;
|
|
2675
2718
|
else {
|
|
2676
|
-
let w =
|
|
2719
|
+
let w = d || l || this.options.injectEvent;
|
|
2677
2720
|
i[f] = h.Undef(w) ? v : this.inject(s, v, w);
|
|
2678
2721
|
}
|
|
2679
2722
|
}
|
|
@@ -2702,41 +2745,51 @@ function ei(t) {
|
|
|
2702
2745
|
};
|
|
2703
2746
|
return n.__origin = r, n.__json = r.__json, n;
|
|
2704
2747
|
},
|
|
2705
|
-
loadStrVar(e, r) {
|
|
2748
|
+
loadStrVar(e, r, i) {
|
|
2706
2749
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2707
|
-
const
|
|
2708
|
-
let
|
|
2709
|
-
if (
|
|
2710
|
-
const
|
|
2711
|
-
if (
|
|
2712
|
-
const
|
|
2713
|
-
|
|
2750
|
+
const s = e, n = zr(e);
|
|
2751
|
+
let o;
|
|
2752
|
+
if (n.forEach((a) => {
|
|
2753
|
+
const l = a.split("||"), u = l[0].trim();
|
|
2754
|
+
if (u) {
|
|
2755
|
+
const f = (l[1] || "").trim();
|
|
2756
|
+
let d, m = !1;
|
|
2757
|
+
if (i && u.indexOf("$form.") === 0) {
|
|
2758
|
+
const g = u.split(".");
|
|
2759
|
+
g.shift(), k(i.value, g[0]) && (m = !0, d = r ? r({
|
|
2760
|
+
id: "$form." + g[0] + "_" + i.rule.__fc__.id,
|
|
2761
|
+
getValue: () => T(i.value, g)
|
|
2762
|
+
}) : T(i.value, g));
|
|
2763
|
+
}
|
|
2764
|
+
m || (d = r ? r(u, f) : this.fc.getLoadData(u, f)), o = d, e = e.replaceAll(`{{${a}}}`, d == null ? "" : d);
|
|
2714
2765
|
}
|
|
2715
|
-
}),
|
|
2716
|
-
return
|
|
2766
|
+
}), n.length === 1 && s === `{{${n[0]}}}`)
|
|
2767
|
+
return o;
|
|
2717
2768
|
}
|
|
2718
2769
|
return e;
|
|
2719
2770
|
},
|
|
2720
|
-
loadFetchVar(e, r) {
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2771
|
+
loadFetchVar(e, r, i) {
|
|
2772
|
+
let s;
|
|
2773
|
+
i && i.__fc__ && (s = i.__fc__.getParentGroup());
|
|
2774
|
+
const n = (o) => this.loadStrVar(o, r, s ? { rule: i, value: this.subRuleData[s.id] || {} } : null);
|
|
2775
|
+
return e.action = n(e.action || ""), ["headers", "data", "query"].forEach((o) => {
|
|
2776
|
+
if (e[o]) {
|
|
2777
|
+
const a = {};
|
|
2778
|
+
Object.keys(e[o]).forEach((l) => {
|
|
2779
|
+
a[n(l)] = n(e[o][l]);
|
|
2780
|
+
}), e[o] = a;
|
|
2728
2781
|
}
|
|
2729
2782
|
}), e;
|
|
2730
2783
|
}
|
|
2731
2784
|
});
|
|
2732
2785
|
}
|
|
2733
|
-
const
|
|
2734
|
-
function
|
|
2786
|
+
const yt = ["hook:updated", "hook:mounted"];
|
|
2787
|
+
function ri(t) {
|
|
2735
2788
|
_(t.prototype, {
|
|
2736
2789
|
usePage() {
|
|
2737
2790
|
const e = this.options.page;
|
|
2738
2791
|
if (!e) return;
|
|
2739
|
-
let r = 25, i =
|
|
2792
|
+
let r = 25, i = ii(this.rules);
|
|
2740
2793
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), _(this, {
|
|
2741
2794
|
first: r,
|
|
2742
2795
|
limit: i,
|
|
@@ -2745,16 +2798,16 @@ function ti(t) {
|
|
|
2745
2798
|
},
|
|
2746
2799
|
pageLoad() {
|
|
2747
2800
|
const e = () => {
|
|
2748
|
-
this.pageEnd ? (this.vm.$off(
|
|
2801
|
+
this.pageEnd ? (this.vm.$off(yt, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2749
2802
|
};
|
|
2750
|
-
this.vm.$on(
|
|
2803
|
+
this.vm.$on(yt, e);
|
|
2751
2804
|
}
|
|
2752
2805
|
});
|
|
2753
2806
|
}
|
|
2754
|
-
function
|
|
2807
|
+
function ii(t) {
|
|
2755
2808
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2756
2809
|
}
|
|
2757
|
-
function
|
|
2810
|
+
function ni(t) {
|
|
2758
2811
|
_(t.prototype, {
|
|
2759
2812
|
clearNextTick() {
|
|
2760
2813
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2769,15 +2822,15 @@ function ii(t) {
|
|
|
2769
2822
|
}
|
|
2770
2823
|
});
|
|
2771
2824
|
}
|
|
2772
|
-
function
|
|
2825
|
+
function si(t) {
|
|
2773
2826
|
Object.defineProperties(t.origin, {
|
|
2774
|
-
__fc__: Ke(
|
|
2827
|
+
__fc__: Ke(de(t), !0)
|
|
2775
2828
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2776
|
-
__fc__: Ke(
|
|
2829
|
+
__fc__: Ke(de(t), !0)
|
|
2777
2830
|
});
|
|
2778
2831
|
}
|
|
2779
|
-
function
|
|
2780
|
-
const i =
|
|
2832
|
+
function Gt(t, e, r) {
|
|
2833
|
+
const i = Ie(), s = !!e.field;
|
|
2781
2834
|
_(this, {
|
|
2782
2835
|
id: i,
|
|
2783
2836
|
ref: i,
|
|
@@ -2804,9 +2857,9 @@ function qt(t, e, r) {
|
|
|
2804
2857
|
exportEl: void 0,
|
|
2805
2858
|
defaultValue: s ? J(r) : void 0,
|
|
2806
2859
|
field: e.field || void 0
|
|
2807
|
-
}), this.updateKey(),
|
|
2860
|
+
}), this.updateKey(), si(this), this.update(t, !0);
|
|
2808
2861
|
}
|
|
2809
|
-
_(
|
|
2862
|
+
_(Gt.prototype, {
|
|
2810
2863
|
getParentGroup() {
|
|
2811
2864
|
let t = this.parent;
|
|
2812
2865
|
for (; t; ) {
|
|
@@ -2839,12 +2892,12 @@ _(qt.prototype, {
|
|
|
2839
2892
|
delete this.pending[e];
|
|
2840
2893
|
let a = r;
|
|
2841
2894
|
if (h.Function(r)) {
|
|
2842
|
-
let l =
|
|
2895
|
+
let l = O(() => r({
|
|
2843
2896
|
rule: this.rule,
|
|
2844
2897
|
api: this.$api,
|
|
2845
2898
|
update: (u) => {
|
|
2846
|
-
const f = u || i,
|
|
2847
|
-
this.setPending(e, r, f), o && o(f,
|
|
2899
|
+
const f = u || i, d = this.getPending(e, i);
|
|
2900
|
+
this.setPending(e, r, f), o && o(f, d);
|
|
2848
2901
|
},
|
|
2849
2902
|
reload: () => {
|
|
2850
2903
|
const u = this.getPending(e, i);
|
|
@@ -2866,7 +2919,7 @@ _(qt.prototype, {
|
|
|
2866
2919
|
setPending(t, e, r) {
|
|
2867
2920
|
this.pending[t] = {
|
|
2868
2921
|
origin: e,
|
|
2869
|
-
value:
|
|
2922
|
+
value: re(r)
|
|
2870
2923
|
};
|
|
2871
2924
|
},
|
|
2872
2925
|
effectData(t) {
|
|
@@ -2876,7 +2929,7 @@ _(qt.prototype, {
|
|
|
2876
2929
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2877
2930
|
},
|
|
2878
2931
|
updateKey(t) {
|
|
2879
|
-
this.key =
|
|
2932
|
+
this.key = Ie(), t && this.parent && this.parent.updateKey(t);
|
|
2880
2933
|
},
|
|
2881
2934
|
updateType() {
|
|
2882
2935
|
this.originType = this.rule.type, this.type = q(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -2885,8 +2938,9 @@ _(qt.prototype, {
|
|
|
2885
2938
|
this.parser = t, t.init(this);
|
|
2886
2939
|
},
|
|
2887
2940
|
initProp() {
|
|
2941
|
+
var e, r;
|
|
2888
2942
|
const t = b({}, this.rule);
|
|
2889
|
-
delete t.children, delete t.validate, this.prop =
|
|
2943
|
+
delete t.children, delete t.validate, this.prop = Y({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
|
|
2890
2944
|
},
|
|
2891
2945
|
initNone() {
|
|
2892
2946
|
this.none = !(h.Undef(this.prop.display) || this.prop.display);
|
|
@@ -2952,19 +3006,19 @@ _(qt.prototype, {
|
|
|
2952
3006
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
2953
3007
|
}
|
|
2954
3008
|
});
|
|
2955
|
-
function
|
|
3009
|
+
function oi(t) {
|
|
2956
3010
|
_(t.prototype, {
|
|
2957
3011
|
nextRefresh(e) {
|
|
2958
3012
|
const r = this.loadedId;
|
|
2959
|
-
|
|
3013
|
+
P(() => {
|
|
2960
3014
|
r === this.loadedId && (e ? e() : this.refresh());
|
|
2961
3015
|
});
|
|
2962
3016
|
},
|
|
2963
3017
|
parseRule(e) {
|
|
2964
|
-
const r =
|
|
3018
|
+
const r = ct(e);
|
|
2965
3019
|
return Object.defineProperties(r, {
|
|
2966
3020
|
__origin__: Ke(e, !0)
|
|
2967
|
-
}),
|
|
3021
|
+
}), ai(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
2968
3022
|
i && this.loadFn(i, r);
|
|
2969
3023
|
}), this.loadCtrl(r), r.update && (r.update = W(r.update)), r;
|
|
2970
3024
|
},
|
|
@@ -2980,7 +3034,7 @@ function si(t) {
|
|
|
2980
3034
|
},
|
|
2981
3035
|
syncProp(e) {
|
|
2982
3036
|
const r = e.rule;
|
|
2983
|
-
h.trueArray(r.sync) &&
|
|
3037
|
+
h.trueArray(r.sync) && Z([{
|
|
2984
3038
|
on: r.sync.reduce((i, s) => (i[typeof s == "object" && s.event || `update:${s}`] = (n) => {
|
|
2985
3039
|
r.props[typeof s == "object" && s.prop || s] = n, this.vm.$emit("sync", s, n, r, this.fapi);
|
|
2986
3040
|
}, i), {})
|
|
@@ -3011,32 +3065,32 @@ function si(t) {
|
|
|
3011
3065
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3012
3066
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3013
3067
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3014
|
-
let l =
|
|
3068
|
+
let l = ct(o);
|
|
3015
3069
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3016
3070
|
this.fc.targetFormDriver("loadRule", { rule: l, api: this.api }, this.fc), this.ruleEffect(l, "init", { repeat: u() }), u() && this.vm.$emit("repeat-field", o, this.api);
|
|
3017
|
-
let f,
|
|
3071
|
+
let f, d = !1, m = !!o.__fc__, g = l.value;
|
|
3018
3072
|
if (m) {
|
|
3019
|
-
if (f = o.__fc__,
|
|
3020
|
-
if (
|
|
3073
|
+
if (f = o.__fc__, g = f.defaultValue, f.deleted) {
|
|
3074
|
+
if ($t(f))
|
|
3021
3075
|
return;
|
|
3022
3076
|
f.update(this);
|
|
3023
3077
|
} else if (!f.check(this)) {
|
|
3024
|
-
if (
|
|
3078
|
+
if ($t(f))
|
|
3025
3079
|
return;
|
|
3026
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3080
|
+
e[a] = o = o._clone ? o._clone() : Vt(et(o)), f = null, d = !0;
|
|
3027
3081
|
}
|
|
3028
3082
|
}
|
|
3029
3083
|
if (f)
|
|
3030
3084
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3031
3085
|
else {
|
|
3032
|
-
const
|
|
3033
|
-
f = new
|
|
3086
|
+
const I = this.parseRule(o);
|
|
3087
|
+
f = new Gt(this, I, g), this.bindParser(f);
|
|
3034
3088
|
}
|
|
3035
|
-
[!1, !0].forEach((
|
|
3089
|
+
[!1, !0].forEach((I) => this.parseEmit(f, I)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !m && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3036
3090
|
const v = f.loadChildrenPending();
|
|
3037
3091
|
if (f.parser.loadChildren === !1 || s(v, f), !r) {
|
|
3038
|
-
const
|
|
3039
|
-
|
|
3092
|
+
const I = i(a);
|
|
3093
|
+
I > -1 || !a ? this.sort.splice(I + 1, 0, f.id) : this.sort.push(f.id);
|
|
3040
3094
|
}
|
|
3041
3095
|
const w = f.rule;
|
|
3042
3096
|
return f.updated || (f.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
|
|
@@ -3049,16 +3103,16 @@ function si(t) {
|
|
|
3049
3103
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3050
3104
|
},
|
|
3051
3105
|
useCtrl(e) {
|
|
3052
|
-
const r =
|
|
3106
|
+
const r = li(e), i = [], s = this.api;
|
|
3053
3107
|
if (!r.length) return !1;
|
|
3054
3108
|
for (let a = 0; a < r.length; a++) {
|
|
3055
|
-
const l = r[a], u = l.handle || function(
|
|
3056
|
-
return (
|
|
3109
|
+
const l = r[a], u = l.handle || function(d) {
|
|
3110
|
+
return (fe[l.condition || "=="] || fe["=="])(d, l.value);
|
|
3057
3111
|
};
|
|
3058
3112
|
if (!h.trueArray(l.rule)) continue;
|
|
3059
3113
|
const f = U(b({}, l), {
|
|
3060
|
-
valid:
|
|
3061
|
-
ctrl:
|
|
3114
|
+
valid: O(() => u(e.rule.value, s)),
|
|
3115
|
+
ctrl: ui(e, l.rule),
|
|
3062
3116
|
isHidden: h.String(l.rule[0])
|
|
3063
3117
|
});
|
|
3064
3118
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3067,13 +3121,13 @@ function si(t) {
|
|
|
3067
3121
|
const n = [];
|
|
3068
3122
|
let o = !1;
|
|
3069
3123
|
return this.deferSyncValue(() => {
|
|
3070
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append:
|
|
3124
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: m, ctrl: g, method: v }) => {
|
|
3071
3125
|
if (a) {
|
|
3072
3126
|
l ? e.ctrlRule.push({
|
|
3073
3127
|
__ctrl: !0,
|
|
3074
3128
|
children: u,
|
|
3075
3129
|
valid: l
|
|
3076
|
-
}) :
|
|
3130
|
+
}) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3077
3131
|
v === "disabled" || v === "enabled" ? this.api.disabled(!l, u) : v === "display" ? this.api.display(l, u) : v === "required" ? (u.forEach((w) => {
|
|
3078
3132
|
this.api.setEffect(w, "required", l);
|
|
3079
3133
|
}), l || this.api.clearValidateState(u)) : this.api.hidden(!l, u);
|
|
@@ -3089,17 +3143,17 @@ function si(t) {
|
|
|
3089
3143
|
children: u
|
|
3090
3144
|
};
|
|
3091
3145
|
e.ctrlRule.push(w), this.bus.$once("load-start", () => {
|
|
3092
|
-
f ? s.prepend(w, f, m) :
|
|
3146
|
+
f ? s.prepend(w, f, m) : d || m ? s.append(w, d || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
|
|
3093
3147
|
});
|
|
3094
3148
|
} else {
|
|
3095
|
-
e.ctrlRule.splice(e.ctrlRule.indexOf(
|
|
3096
|
-
const w =
|
|
3149
|
+
e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
|
|
3150
|
+
const w = Q(g);
|
|
3097
3151
|
w && w.rm();
|
|
3098
3152
|
}
|
|
3099
3153
|
});
|
|
3100
3154
|
}), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
|
|
3101
3155
|
n.forEach((a) => a());
|
|
3102
|
-
}) : n.length &&
|
|
3156
|
+
}) : n.length && P(() => {
|
|
3103
3157
|
n.forEach((a) => a());
|
|
3104
3158
|
})), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
|
|
3105
3159
|
},
|
|
@@ -3121,33 +3175,39 @@ function si(t) {
|
|
|
3121
3175
|
}
|
|
3122
3176
|
});
|
|
3123
3177
|
}
|
|
3124
|
-
function
|
|
3125
|
-
const e =
|
|
3178
|
+
function ai(t) {
|
|
3179
|
+
const e = Tt();
|
|
3126
3180
|
return Object.keys(e).forEach((r) => {
|
|
3127
|
-
|
|
3181
|
+
k(t, r) || F(t, r, e[r]);
|
|
3128
3182
|
}), t;
|
|
3129
3183
|
}
|
|
3130
|
-
function
|
|
3184
|
+
function li(t) {
|
|
3131
3185
|
const e = t.rule.control || [];
|
|
3132
3186
|
return h.Object(e) ? [e] : e;
|
|
3133
3187
|
}
|
|
3134
|
-
function
|
|
3188
|
+
function ui(t, e) {
|
|
3135
3189
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3136
3190
|
const i = t.ctrlRule[r];
|
|
3137
3191
|
if (i.children === e)
|
|
3138
3192
|
return i;
|
|
3139
3193
|
}
|
|
3140
3194
|
}
|
|
3141
|
-
function
|
|
3195
|
+
function $t(t) {
|
|
3142
3196
|
return !!t.rule.__ctrl;
|
|
3143
3197
|
}
|
|
3144
|
-
function
|
|
3198
|
+
function fi(t) {
|
|
3145
3199
|
_(t.prototype, {
|
|
3146
3200
|
setValue(e, r, i, s) {
|
|
3147
3201
|
e.deleted || (e.rule.value = r, this.changeStatus = !0, this.nextRefresh(), this.$render.clearCache(e), this.setFormData(e, i), this.syncValue(), this.valueChange(e, r), this.vm.$emit("change", e.field, r, e.origin, this.api, s || !1), this.effect(e, "value"), this.targetHook(e, "value", { value: r }), this.emitEvent("change", e.field, r, {
|
|
3148
3202
|
rule: e.origin,
|
|
3149
3203
|
api: this.api,
|
|
3150
3204
|
setFlag: s || !1
|
|
3205
|
+
}), s && P(() => {
|
|
3206
|
+
P(() => {
|
|
3207
|
+
P(() => {
|
|
3208
|
+
this.api.clearValidateState(e.id);
|
|
3209
|
+
});
|
|
3210
|
+
});
|
|
3151
3211
|
}));
|
|
3152
3212
|
},
|
|
3153
3213
|
onInput(e, r) {
|
|
@@ -3158,7 +3218,7 @@ function ui(t) {
|
|
|
3158
3218
|
this.deferSyncValue(() => {
|
|
3159
3219
|
const i = e.getParentGroup(), s = i ? this.subRuleData[i.id] : null, n = {};
|
|
3160
3220
|
Object.keys(r || {}).forEach((o) => {
|
|
3161
|
-
s &&
|
|
3221
|
+
s && k(s, o) ? n[o] = r[o] : k(this.api.form, o) ? this.api.form[o] = r[o] : this.api.top !== this.api && k(this.api.top.form, o) && (this.api.top.form[o] = r[o]);
|
|
3162
3222
|
}), Object.keys(n).length && this.api.setChildrenFormData(i.rule, n);
|
|
3163
3223
|
});
|
|
3164
3224
|
},
|
|
@@ -3168,33 +3228,33 @@ function ui(t) {
|
|
|
3168
3228
|
setFormData(e, r) {
|
|
3169
3229
|
e.modelValue = r;
|
|
3170
3230
|
const i = e.getParentGroup();
|
|
3171
|
-
i && (this.subRuleData[i.id] ||
|
|
3231
|
+
i && (this.subRuleData[i.id] || F(this.subRuleData, i.id, {}), F(this.subRuleData[i.id], e.field, e.rule.value)), F(this.formData, e.id, r);
|
|
3172
3232
|
},
|
|
3173
3233
|
rmSubRuleData(e) {
|
|
3174
3234
|
const r = e.getParentGroup();
|
|
3175
|
-
r && this.subRuleData[r.id] &&
|
|
3235
|
+
r && this.subRuleData[r.id] && te(this.subRuleData[r.id], e.field);
|
|
3176
3236
|
},
|
|
3177
3237
|
getFormData(e) {
|
|
3178
3238
|
return this.formData[e.id];
|
|
3179
3239
|
},
|
|
3180
3240
|
syncForm() {
|
|
3181
3241
|
const e = {}, r = this.fields(), i = [];
|
|
3182
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] =
|
|
3242
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Ee(this.appendData, n)), s), e), r.reduce((s, n) => {
|
|
3183
3243
|
const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
|
|
3184
|
-
return this.isIgnore(o.rule) && i.push(n), s[n] =
|
|
3185
|
-
}, e), this.form =
|
|
3244
|
+
return this.isIgnore(o.rule) && i.push(n), s[n] = Ee(o.rule, "value"), s;
|
|
3245
|
+
}, e), this.form = re(e), this.ignoreFields = i, this.syncValue();
|
|
3186
3246
|
},
|
|
3187
3247
|
isIgnore(e) {
|
|
3188
3248
|
return e.ignore === !0 || e.ignore === "hidden" && e.hidden || this.options.ignoreHiddenFields && e.hidden;
|
|
3189
3249
|
},
|
|
3190
3250
|
appendValue(e) {
|
|
3191
|
-
(!e.field || !
|
|
3251
|
+
(!e.field || !k(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3192
3252
|
},
|
|
3193
3253
|
addSubForm(e, r) {
|
|
3194
3254
|
this.subForm[e.id] = r;
|
|
3195
3255
|
},
|
|
3196
3256
|
deferSyncValue(e, r) {
|
|
3197
|
-
this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r),
|
|
3257
|
+
this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), O(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
|
|
3198
3258
|
},
|
|
3199
3259
|
syncValue() {
|
|
3200
3260
|
if (this.deferSyncFn)
|
|
@@ -3205,14 +3265,14 @@ function ui(t) {
|
|
|
3205
3265
|
}), this.vm.updateValue(e);
|
|
3206
3266
|
},
|
|
3207
3267
|
isChange(e, r) {
|
|
3208
|
-
return JSON.stringify(this.getFormData(e),
|
|
3268
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3209
3269
|
},
|
|
3210
3270
|
isQuote(e, r) {
|
|
3211
3271
|
return (h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
3212
3272
|
},
|
|
3213
3273
|
refreshUpdate(e, r, i, s) {
|
|
3214
3274
|
if (h.Function(e.rule.update)) {
|
|
3215
|
-
const n =
|
|
3275
|
+
const n = O(() => e.rule.update(r, e.origin, this.api, {
|
|
3216
3276
|
origin: i || "change",
|
|
3217
3277
|
linkField: s
|
|
3218
3278
|
}));
|
|
@@ -3238,7 +3298,7 @@ function ui(t) {
|
|
|
3238
3298
|
}
|
|
3239
3299
|
});
|
|
3240
3300
|
}
|
|
3241
|
-
function
|
|
3301
|
+
function vt(t, e) {
|
|
3242
3302
|
return typeof e == "function" ? "" + e : e;
|
|
3243
3303
|
}
|
|
3244
3304
|
const ke = {
|
|
@@ -3260,8 +3320,8 @@ const ke = {
|
|
|
3260
3320
|
},
|
|
3261
3321
|
mergeProp(t) {
|
|
3262
3322
|
}
|
|
3263
|
-
},
|
|
3264
|
-
function
|
|
3323
|
+
}, ci = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
|
|
3324
|
+
function hi(t) {
|
|
3265
3325
|
_(t.prototype, {
|
|
3266
3326
|
getCtx(e) {
|
|
3267
3327
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3306,21 +3366,21 @@ function ci(t) {
|
|
|
3306
3366
|
return q(i);
|
|
3307
3367
|
},
|
|
3308
3368
|
noWatch(e) {
|
|
3309
|
-
this.noWatchFn || (this.noWatchFn = e),
|
|
3369
|
+
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3310
3370
|
},
|
|
3311
3371
|
watchCtx(e) {
|
|
3312
|
-
if (
|
|
3313
|
-
const s =
|
|
3314
|
-
e.refRule[i] = s, e.watch.push(
|
|
3372
|
+
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
|
|
3373
|
+
const s = Ee(e.rule, i), n = i === "children";
|
|
3374
|
+
e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3315
3375
|
let l = s.value;
|
|
3316
3376
|
if (!this.isBreakWatch()) {
|
|
3317
3377
|
if (n && e.parser.loadChildren === !1) {
|
|
3318
3378
|
this.$render.clearCache(e), this.nextRefresh();
|
|
3319
3379
|
return;
|
|
3320
3380
|
}
|
|
3321
|
-
if (this.watching = !0,
|
|
3381
|
+
if (this.watching = !0, P(() => {
|
|
3322
3382
|
this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
|
|
3323
|
-
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(),
|
|
3383
|
+
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), P(() => {
|
|
3324
3384
|
this.targetHook(e, "hidden", { value: l });
|
|
3325
3385
|
})), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
|
|
3326
3386
|
this.syncForm();
|
|
@@ -3331,21 +3391,21 @@ function ci(t) {
|
|
|
3331
3391
|
this.$render.clearCache(e), this.refresh(), this.watching = !1;
|
|
3332
3392
|
}
|
|
3333
3393
|
}, { deep: !n, sync: n }));
|
|
3334
|
-
}), e.refRule.__$title =
|
|
3394
|
+
}), e.refRule.__$title = pe(() => {
|
|
3335
3395
|
let i = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
|
|
3336
3396
|
if (i) {
|
|
3337
3397
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3338
3398
|
s && (i = this.api.t(s[1]));
|
|
3339
3399
|
}
|
|
3340
3400
|
return i;
|
|
3341
|
-
}), e.refRule.__$info =
|
|
3401
|
+
}), e.refRule.__$info = pe(() => {
|
|
3342
3402
|
let i = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
|
|
3343
3403
|
if (i) {
|
|
3344
3404
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3345
3405
|
s && (i = this.api.t(s[1]));
|
|
3346
3406
|
}
|
|
3347
3407
|
return i;
|
|
3348
|
-
}), e.refRule.__$validate =
|
|
3408
|
+
}), e.refRule.__$validate = pe(() => G(e.rule.validate).map((i) => {
|
|
3349
3409
|
const s = b({}, i);
|
|
3350
3410
|
if (s.message) {
|
|
3351
3411
|
const n = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
@@ -3365,8 +3425,8 @@ function ci(t) {
|
|
|
3365
3425
|
}
|
|
3366
3426
|
return s;
|
|
3367
3427
|
})), e.input) {
|
|
3368
|
-
const i =
|
|
3369
|
-
e.watch.push(
|
|
3428
|
+
const i = Ee(e.rule, "value");
|
|
3429
|
+
e.watch.push(L(() => i.value, () => {
|
|
3370
3430
|
let s = e.parser.toFormValue(i.value, e);
|
|
3371
3431
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
3372
3432
|
}));
|
|
@@ -3375,15 +3435,15 @@ function ci(t) {
|
|
|
3375
3435
|
let i = e.rule.computed;
|
|
3376
3436
|
i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
|
|
3377
3437
|
let n;
|
|
3378
|
-
const o =
|
|
3438
|
+
const o = pe(() => {
|
|
3379
3439
|
const l = i[s];
|
|
3380
3440
|
if (!l) return;
|
|
3381
3441
|
const u = this.compute(e, l);
|
|
3382
3442
|
return l.linkage && u === void 0 ? n : u;
|
|
3383
3443
|
}), a = (l) => {
|
|
3384
|
-
s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) :
|
|
3444
|
+
s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : ie(e.rule, s, l);
|
|
3385
3445
|
};
|
|
3386
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !==
|
|
3446
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== T(e.rule, s)) && a(o.value), e.watch.push(L(o, (l) => {
|
|
3387
3447
|
n = l, setTimeout(() => {
|
|
3388
3448
|
a(l);
|
|
3389
3449
|
});
|
|
@@ -3400,30 +3460,30 @@ function ci(t) {
|
|
|
3400
3460
|
const l = a.mode === "OR";
|
|
3401
3461
|
let u = !0;
|
|
3402
3462
|
for (let f = 0; f < a.group.length; f++) {
|
|
3403
|
-
const
|
|
3404
|
-
let m,
|
|
3405
|
-
if (
|
|
3406
|
-
|
|
3407
|
-
else if (
|
|
3408
|
-
|
|
3463
|
+
const d = a.group[f];
|
|
3464
|
+
let m, g = null;
|
|
3465
|
+
if (d.variable)
|
|
3466
|
+
g = JSON.stringify(this.fc.getLoadData(d.variable) || "");
|
|
3467
|
+
else if (d.field)
|
|
3468
|
+
g = dt(d.field || "");
|
|
3409
3469
|
else
|
|
3410
3470
|
return !0;
|
|
3411
|
-
let v =
|
|
3412
|
-
if (v && (v =
|
|
3471
|
+
let v = d.compare;
|
|
3472
|
+
if (v && (v = dt(v || "")), d.mode ? m = n(d) : fe[d.condition] ? h.Function(d.handler) ? m = O(() => d.handler(this.api, e.rule)) : m = O(() => new Function("$condition", "$val", "$form", "$group", "$rule", `with($form){with(this){with($group){ return $condition['${d.condition}'](${g}, ${v || "$val"}); }}}`).call(this.api.form, fe, d.value, this.api.top.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : m = !1, l && m)
|
|
3413
3473
|
return !0;
|
|
3414
3474
|
l || (u = u && m);
|
|
3415
3475
|
}
|
|
3416
3476
|
return l ? !1 : u;
|
|
3417
3477
|
};
|
|
3418
3478
|
let o = n(r);
|
|
3419
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ?
|
|
3479
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : void 0 : o;
|
|
3420
3480
|
} else if (h.Function(r))
|
|
3421
3481
|
i = () => r(this.api.form, this.api);
|
|
3422
3482
|
else {
|
|
3423
3483
|
const s = e.getParentGroup();
|
|
3424
3484
|
i = () => this.computeValue(r, e, s);
|
|
3425
3485
|
}
|
|
3426
|
-
return
|
|
3486
|
+
return O(i, void 0);
|
|
3427
3487
|
},
|
|
3428
3488
|
computeValue(e, r, i) {
|
|
3429
3489
|
const s = this, n = Object.keys(this.fc.formulas).reduce((o, a) => (o[a] = function(...l) {
|
|
@@ -3451,9 +3511,9 @@ function ci(t) {
|
|
|
3451
3511
|
rmCtx(e) {
|
|
3452
3512
|
if (e.deleted) return;
|
|
3453
3513
|
const { id: r, field: i, input: s, name: n } = e;
|
|
3454
|
-
|
|
3514
|
+
te(this.ctxs, r), te(this.formData, r), te(this.subForm, r), te(this.vm.ctxInject, r);
|
|
3455
3515
|
const o = e.getParentGroup();
|
|
3456
|
-
o && this.subRuleData[o.id] &&
|
|
3516
|
+
o && this.subRuleData[o.id] && te(this.subRuleData[o.id], i), e.group && te(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !k(this.fieldCtx, i) && te(this.form, i), this.deferSyncValue(() => {
|
|
3457
3517
|
if (!this.reloading) {
|
|
3458
3518
|
if (e.parser.loadChildren !== !1) {
|
|
3459
3519
|
const l = e.getPending("children", e.rule.children);
|
|
@@ -3467,7 +3527,7 @@ function ci(t) {
|
|
|
3467
3527
|
}
|
|
3468
3528
|
});
|
|
3469
3529
|
}
|
|
3470
|
-
function
|
|
3530
|
+
function di(t) {
|
|
3471
3531
|
_(t.prototype, {
|
|
3472
3532
|
mounted() {
|
|
3473
3533
|
const e = () => {
|
|
@@ -3482,7 +3542,7 @@ function hi(t) {
|
|
|
3482
3542
|
const i = this.options[e] || this.options[q("on-" + e)];
|
|
3483
3543
|
if (i) {
|
|
3484
3544
|
const s = W(i);
|
|
3485
|
-
h.Function(s) &&
|
|
3545
|
+
h.Function(s) && O(() => s(...r));
|
|
3486
3546
|
}
|
|
3487
3547
|
this.bus.$emit(e, ...r);
|
|
3488
3548
|
},
|
|
@@ -3490,18 +3550,18 @@ function hi(t) {
|
|
|
3490
3550
|
var n, o;
|
|
3491
3551
|
let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
|
|
3492
3552
|
s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
|
|
3493
|
-
|
|
3553
|
+
O(() => a(U(b({}, i || {}), { rule: e.rule, api: this.api })));
|
|
3494
3554
|
}));
|
|
3495
3555
|
}
|
|
3496
3556
|
});
|
|
3497
3557
|
}
|
|
3498
|
-
function
|
|
3558
|
+
function pi(t) {
|
|
3499
3559
|
_(t.prototype, {
|
|
3500
3560
|
useProvider() {
|
|
3501
3561
|
const e = this.fc.providers;
|
|
3502
3562
|
Object.keys(e).forEach((r) => {
|
|
3503
3563
|
let i = e[r];
|
|
3504
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3564
|
+
h.Function(i) && (i = i(this.fc)), i._c = gi(i), this.onEffect(i), this.providers[r] = i;
|
|
3505
3565
|
});
|
|
3506
3566
|
},
|
|
3507
3567
|
onEffect(e) {
|
|
@@ -3517,7 +3577,7 @@ function di(t) {
|
|
|
3517
3577
|
let r = {
|
|
3518
3578
|
required: () => {
|
|
3519
3579
|
var i, s;
|
|
3520
|
-
return (
|
|
3580
|
+
return (k(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
|
|
3521
3581
|
}
|
|
3522
3582
|
};
|
|
3523
3583
|
Object.keys(e.rule.effect || {}).forEach((i) => {
|
|
@@ -3525,7 +3585,7 @@ function di(t) {
|
|
|
3525
3585
|
}), Object.keys(e.rule).forEach((i) => {
|
|
3526
3586
|
i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
|
|
3527
3587
|
}), Object.keys(r).forEach((i) => {
|
|
3528
|
-
e.watch.push(
|
|
3588
|
+
e.watch.push(L(r[i], (s) => {
|
|
3529
3589
|
this.effect(e, "watch", { [i]: s });
|
|
3530
3590
|
}, { deep: !0 }));
|
|
3531
3591
|
});
|
|
@@ -3547,9 +3607,9 @@ function di(t) {
|
|
|
3547
3607
|
}, r);
|
|
3548
3608
|
},
|
|
3549
3609
|
getEffect(e, r) {
|
|
3550
|
-
if (
|
|
3610
|
+
if (k(e, "$" + r))
|
|
3551
3611
|
return e["$" + r];
|
|
3552
|
-
if (
|
|
3612
|
+
if (k(e, "effect") && k(e.effect, r))
|
|
3553
3613
|
return e.effect[r];
|
|
3554
3614
|
},
|
|
3555
3615
|
emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
|
|
@@ -3558,33 +3618,33 @@ function di(t) {
|
|
|
3558
3618
|
Object.keys(l).forEach((u) => {
|
|
3559
3619
|
const f = this.providers[u];
|
|
3560
3620
|
if (!f || f.input && !i) return;
|
|
3561
|
-
let
|
|
3621
|
+
let d;
|
|
3562
3622
|
if (!f._c)
|
|
3563
|
-
|
|
3623
|
+
d = "*";
|
|
3564
3624
|
else if (f._used.indexOf(s) > -1)
|
|
3565
|
-
|
|
3625
|
+
d = s;
|
|
3566
3626
|
else
|
|
3567
3627
|
return;
|
|
3568
3628
|
const m = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3569
|
-
e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (
|
|
3629
|
+
e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => Y(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [m, r, this.api]);
|
|
3570
3630
|
});
|
|
3571
3631
|
}
|
|
3572
3632
|
});
|
|
3573
3633
|
}
|
|
3574
|
-
function
|
|
3634
|
+
function mi(t) {
|
|
3575
3635
|
return t.filter(function(e, r, i) {
|
|
3576
3636
|
return i.indexOf(e, 0) === r;
|
|
3577
3637
|
});
|
|
3578
3638
|
}
|
|
3579
|
-
function
|
|
3639
|
+
function gi(t) {
|
|
3580
3640
|
const e = t.components;
|
|
3581
3641
|
if (Array.isArray(e)) {
|
|
3582
|
-
const r =
|
|
3642
|
+
const r = mi(e.filter((i) => i !== "*"));
|
|
3583
3643
|
return r.length ? r : !1;
|
|
3584
3644
|
} else return h.String(e) ? [e] : !1;
|
|
3585
3645
|
}
|
|
3586
3646
|
function z(t) {
|
|
3587
|
-
|
|
3647
|
+
Lt(this, {
|
|
3588
3648
|
options() {
|
|
3589
3649
|
return t.options.value || {};
|
|
3590
3650
|
},
|
|
@@ -3603,10 +3663,10 @@ function z(t) {
|
|
|
3603
3663
|
noWatchFn: null,
|
|
3604
3664
|
deferSyncFn: null,
|
|
3605
3665
|
isMounted: !1,
|
|
3606
|
-
formData:
|
|
3607
|
-
subRuleData:
|
|
3666
|
+
formData: re({}),
|
|
3667
|
+
subRuleData: re({}),
|
|
3608
3668
|
subForm: {},
|
|
3609
|
-
form:
|
|
3669
|
+
form: re({}),
|
|
3610
3670
|
appendData: {},
|
|
3611
3671
|
ignoreFields: [],
|
|
3612
3672
|
providers: {},
|
|
@@ -3619,9 +3679,9 @@ function z(t) {
|
|
|
3619
3679
|
this.lifecycle("reload");
|
|
3620
3680
|
}
|
|
3621
3681
|
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new rt(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3622
|
-
const i =
|
|
3682
|
+
const i = O(() => r(e, this));
|
|
3623
3683
|
return i && i !== e && _(e, i), e;
|
|
3624
|
-
},
|
|
3684
|
+
}, Zr(this));
|
|
3625
3685
|
}
|
|
3626
3686
|
_(z.prototype, {
|
|
3627
3687
|
initData(t) {
|
|
@@ -3644,31 +3704,31 @@ _(z.prototype, {
|
|
|
3644
3704
|
},
|
|
3645
3705
|
beforeFetch(t) {
|
|
3646
3706
|
return new Promise((e) => {
|
|
3647
|
-
const r = this.options.beforeFetch &&
|
|
3707
|
+
const r = this.options.beforeFetch && O(() => this.options.beforeFetch(t, { api: this.api }));
|
|
3648
3708
|
r && h.Function(r.then) ? r.then(e) : e();
|
|
3649
3709
|
});
|
|
3650
3710
|
}
|
|
3651
3711
|
});
|
|
3652
|
-
ei(z);
|
|
3653
3712
|
ti(z);
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3713
|
+
ri(z);
|
|
3714
|
+
ni(z);
|
|
3715
|
+
oi(z);
|
|
3716
|
+
fi(z);
|
|
3658
3717
|
hi(z);
|
|
3659
3718
|
di(z);
|
|
3660
|
-
|
|
3661
|
-
|
|
3719
|
+
pi(z);
|
|
3720
|
+
const yi = "fcFragment", Te = {
|
|
3721
|
+
name: yi,
|
|
3662
3722
|
functional: !0,
|
|
3663
3723
|
props: ["vnode"],
|
|
3664
3724
|
render(t, e) {
|
|
3665
3725
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3666
3726
|
}
|
|
3667
3727
|
};
|
|
3668
|
-
function
|
|
3728
|
+
function $i(t) {
|
|
3669
3729
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3670
3730
|
}
|
|
3671
|
-
function
|
|
3731
|
+
function vi() {
|
|
3672
3732
|
const t = {};
|
|
3673
3733
|
function e(r) {
|
|
3674
3734
|
r && this.setVm(r);
|
|
@@ -3679,10 +3739,17 @@ function $i() {
|
|
|
3679
3739
|
},
|
|
3680
3740
|
make(r, i, s) {
|
|
3681
3741
|
var n, o, a;
|
|
3682
|
-
return (
|
|
3742
|
+
return (me.isReservedTag ? me.isReservedTag(r) : (o = (n = me) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
|
|
3683
3743
|
},
|
|
3684
3744
|
makeComponent(r, i, s) {
|
|
3685
|
-
|
|
3745
|
+
var o;
|
|
3746
|
+
let n = this.$h(r, $i(i), s || []);
|
|
3747
|
+
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3748
|
+
const a = Object.keys(n.componentOptions.propsData);
|
|
3749
|
+
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
3750
|
+
n.data.attrs[l] == null && a.indexOf(l) === -1 && ["string", "number", "boolean"].indexOf(typeof i.props[l]) > -1 && (n.data.attrs[l] = i.props[l]);
|
|
3751
|
+
});
|
|
3752
|
+
}
|
|
3686
3753
|
return n.context = this.vm, n;
|
|
3687
3754
|
},
|
|
3688
3755
|
aliasMap: t
|
|
@@ -3693,7 +3760,7 @@ function $i() {
|
|
|
3693
3760
|
},
|
|
3694
3761
|
use(r) {
|
|
3695
3762
|
Object.keys(r).forEach((i) => {
|
|
3696
|
-
const s =
|
|
3763
|
+
const s = ye(i), n = Gr(i).toLocaleLowerCase(), o = r[i];
|
|
3697
3764
|
[i, s, n].forEach((a) => {
|
|
3698
3765
|
e.alias(i, o), e.prototype[a] = function(l, u) {
|
|
3699
3766
|
return this.make(o, l, u);
|
|
@@ -3703,12 +3770,12 @@ function $i() {
|
|
|
3703
3770
|
}
|
|
3704
3771
|
}), e;
|
|
3705
3772
|
}
|
|
3706
|
-
function
|
|
3707
|
-
class e extends
|
|
3773
|
+
function bi(t) {
|
|
3774
|
+
class e extends Ht {
|
|
3708
3775
|
}
|
|
3709
3776
|
return Object.assign(e.prototype, t), e;
|
|
3710
3777
|
}
|
|
3711
|
-
function
|
|
3778
|
+
function Ht(t) {
|
|
3712
3779
|
_(this, {
|
|
3713
3780
|
$handle: t,
|
|
3714
3781
|
vm: t.vm,
|
|
@@ -3719,12 +3786,12 @@ function Gt(t) {
|
|
|
3719
3786
|
}
|
|
3720
3787
|
}), this.updateKey(), this.init();
|
|
3721
3788
|
}
|
|
3722
|
-
_(
|
|
3789
|
+
_(Ht.prototype, {
|
|
3723
3790
|
__init() {
|
|
3724
3791
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
3725
3792
|
},
|
|
3726
3793
|
updateKey() {
|
|
3727
|
-
this.key =
|
|
3794
|
+
this.key = Ie();
|
|
3728
3795
|
},
|
|
3729
3796
|
//TODO interface
|
|
3730
3797
|
init() {
|
|
@@ -3746,7 +3813,7 @@ _(Gt.prototype, {
|
|
|
3746
3813
|
return e(this.vm);
|
|
3747
3814
|
},
|
|
3748
3815
|
mergeOptions(t, e) {
|
|
3749
|
-
return
|
|
3816
|
+
return Z(t.map((r) => this.tidyOptions(r)), e, this.mergeOptionsRule);
|
|
3750
3817
|
},
|
|
3751
3818
|
updateOptions(t) {
|
|
3752
3819
|
this.$handle.fc.targetFormDriver("updateOptions", t, { handle: this.$handle, api: this.$handle.api }), this.options = this.mergeOptions([t], this.getDefaultOptions()), this.update();
|
|
@@ -3764,24 +3831,24 @@ _(Gt.prototype, {
|
|
|
3764
3831
|
render(t) {
|
|
3765
3832
|
}
|
|
3766
3833
|
});
|
|
3767
|
-
const
|
|
3834
|
+
const _i = function(t) {
|
|
3768
3835
|
const e = {
|
|
3769
3836
|
name: "loadData",
|
|
3770
3837
|
_fn: [],
|
|
3771
|
-
|
|
3838
|
+
loaded(r, i, s) {
|
|
3772
3839
|
this.deleted(r);
|
|
3773
3840
|
let n = G(r.getValue());
|
|
3774
3841
|
const o = [];
|
|
3775
3842
|
n.forEach((a) => {
|
|
3776
3843
|
if (a && (a.attr || a.template)) {
|
|
3777
|
-
let l = (
|
|
3844
|
+
let l = (d) => {
|
|
3778
3845
|
let m;
|
|
3779
|
-
a.template ? m = t.$handle.loadStrVar(a.template,
|
|
3780
|
-
const
|
|
3781
|
-
a.to === "child" ?
|
|
3782
|
-
}, u = (
|
|
3846
|
+
a.template ? m = t.$handle.loadStrVar(a.template, d) : a.handler && h.Function(a.handler) ? m = a.handler(d, i, s) : m = d(a.attr, a.default), a.copy !== !1 && (m = J(m));
|
|
3847
|
+
const g = a.modify ? i : r.getProp();
|
|
3848
|
+
a.to === "child" ? g.children ? F(g.children, 0, m) : F(g, "children", [m]) : ie(g, a.to || "options", m), s.sync(i);
|
|
3849
|
+
}, u = (d) => l(d);
|
|
3783
3850
|
const f = t.watchLoadData(u);
|
|
3784
|
-
l =
|
|
3851
|
+
l = ce(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
3785
3852
|
}
|
|
3786
3853
|
}), this._fn[r.id] = o;
|
|
3787
3854
|
},
|
|
@@ -3792,7 +3859,7 @@ const bi = function(t) {
|
|
|
3792
3859
|
}
|
|
3793
3860
|
};
|
|
3794
3861
|
return e.watch = e.mounted, e;
|
|
3795
|
-
},
|
|
3862
|
+
}, Ci = function(t) {
|
|
3796
3863
|
const e = {
|
|
3797
3864
|
name: "t",
|
|
3798
3865
|
_fn: [],
|
|
@@ -3804,13 +3871,13 @@ const bi = function(t) {
|
|
|
3804
3871
|
const l = n[a];
|
|
3805
3872
|
if (l) {
|
|
3806
3873
|
const u = typeof l == "object";
|
|
3807
|
-
let f = (
|
|
3808
|
-
let v = t.t(u ? l.attr : l, u ? l.params : null,
|
|
3874
|
+
let f = (g) => {
|
|
3875
|
+
let v = t.t(u ? l.attr : l, u ? l.params : null, g);
|
|
3809
3876
|
const w = u && l.modify ? i : r.getProp();
|
|
3810
|
-
a === "child" ? w.children ?
|
|
3811
|
-
},
|
|
3812
|
-
const m = t.watchLoadData(
|
|
3813
|
-
f =
|
|
3877
|
+
a === "child" ? w.children ? F(w.children, 0, v) : F(w, "children", [v]) : ie(w, a, v), s.sync(i);
|
|
3878
|
+
}, d = (g) => f(g);
|
|
3879
|
+
const m = t.watchLoadData(d);
|
|
3880
|
+
f = ce(f, l.wait || 300), l.watch !== !1 ? o.push(m) : m();
|
|
3814
3881
|
}
|
|
3815
3882
|
}), this._fn[r.id] = o;
|
|
3816
3883
|
},
|
|
@@ -3821,7 +3888,7 @@ const bi = function(t) {
|
|
|
3821
3888
|
}
|
|
3822
3889
|
};
|
|
3823
3890
|
return e.watch = e.loaded, e;
|
|
3824
|
-
},
|
|
3891
|
+
}, Jt = {
|
|
3825
3892
|
name: "componentValidate",
|
|
3826
3893
|
load(t, e, r) {
|
|
3827
3894
|
let i = t.getValue();
|
|
@@ -3832,7 +3899,7 @@ const bi = function(t) {
|
|
|
3832
3899
|
const s = i.method;
|
|
3833
3900
|
delete i.method, t.getProp().validate = [U(b({}, i), {
|
|
3834
3901
|
validator(...n) {
|
|
3835
|
-
const o =
|
|
3902
|
+
const o = Q(e);
|
|
3836
3903
|
if (o)
|
|
3837
3904
|
return r.exec(o.id, h.String(s) ? s : "formCreateValidate", ...n, {
|
|
3838
3905
|
attr: t,
|
|
@@ -3844,9 +3911,9 @@ const bi = function(t) {
|
|
|
3844
3911
|
}
|
|
3845
3912
|
},
|
|
3846
3913
|
watch(...t) {
|
|
3847
|
-
|
|
3914
|
+
Jt.load(...t);
|
|
3848
3915
|
}
|
|
3849
|
-
},
|
|
3916
|
+
}, wi = function(t) {
|
|
3850
3917
|
function e(s) {
|
|
3851
3918
|
return h.String(s) && (s = {
|
|
3852
3919
|
action: s,
|
|
@@ -3856,62 +3923,62 @@ const bi = function(t) {
|
|
|
3856
3923
|
function r(s, n, o) {
|
|
3857
3924
|
let a = s.value;
|
|
3858
3925
|
i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
|
|
3859
|
-
const l = (
|
|
3860
|
-
|
|
3926
|
+
const l = (d) => {
|
|
3927
|
+
d === void 0 ? s.clearProp() : ie(s.getProp(), a.to || "options", d), o.sync(n);
|
|
3861
3928
|
};
|
|
3862
3929
|
if (!a || !a.action && !a.key) {
|
|
3863
3930
|
l(void 0);
|
|
3864
3931
|
return;
|
|
3865
3932
|
}
|
|
3866
3933
|
if (a = J(a), a.to || (a.to = "options"), a.key) {
|
|
3867
|
-
const
|
|
3868
|
-
if (!
|
|
3934
|
+
const d = t.$handle.options.globalData[a.key];
|
|
3935
|
+
if (!d) {
|
|
3869
3936
|
l(void 0);
|
|
3870
3937
|
return;
|
|
3871
3938
|
}
|
|
3872
|
-
if (
|
|
3873
|
-
l(
|
|
3939
|
+
if (d.type === "static") {
|
|
3940
|
+
l(d.data);
|
|
3874
3941
|
return;
|
|
3875
3942
|
} else
|
|
3876
|
-
a = b(b({}, a),
|
|
3943
|
+
a = b(b({}, a), d);
|
|
3877
3944
|
}
|
|
3878
3945
|
const u = a.onError, f = () => {
|
|
3879
3946
|
if (!s.getValue())
|
|
3880
3947
|
return s.clearProp(), o.sync(n), !0;
|
|
3881
3948
|
};
|
|
3882
|
-
i._fn[s.id] = t.watchLoadData(
|
|
3949
|
+
i._fn[s.id] = t.watchLoadData(ce((d, m) => {
|
|
3883
3950
|
if (m && a.watch === !1)
|
|
3884
3951
|
return i._fn[s.id]();
|
|
3885
|
-
const
|
|
3952
|
+
const g = t.$handle.loadFetchVar(J(a), d, n), v = U(b({
|
|
3886
3953
|
headers: {}
|
|
3887
|
-
},
|
|
3888
|
-
onSuccess(w,
|
|
3954
|
+
}, g), {
|
|
3955
|
+
onSuccess(w, I) {
|
|
3889
3956
|
if (f()) return;
|
|
3890
|
-
let
|
|
3891
|
-
const V = W(
|
|
3892
|
-
h.Function(V) ?
|
|
3957
|
+
let x = (N) => I ? N : k(N, "data") ? N.data : N;
|
|
3958
|
+
const V = W(g.parse);
|
|
3959
|
+
h.Function(V) ? x = V : V && h.String(V) && (x = (N) => T(N, V)), l(x(w, n, o)), o.sync(n);
|
|
3893
3960
|
},
|
|
3894
3961
|
onError(w) {
|
|
3895
|
-
l(void 0), !f() && (u || ((
|
|
3962
|
+
l(void 0), !f() && (u || ((I) => xe(I.message || "fetch fail " + g.action)))(w, n, o);
|
|
3896
3963
|
}
|
|
3897
3964
|
});
|
|
3898
3965
|
t.$handle.beforeFetch(v, { rule: n, api: o }).then(() => {
|
|
3899
|
-
if (h.Function(
|
|
3900
|
-
|
|
3966
|
+
if (h.Function(g.action)) {
|
|
3967
|
+
g.action(n, o).then((w) => {
|
|
3901
3968
|
v.onSuccess(w, !0);
|
|
3902
3969
|
}).catch((w) => {
|
|
3903
3970
|
v.onError(w);
|
|
3904
3971
|
});
|
|
3905
3972
|
return;
|
|
3906
3973
|
}
|
|
3907
|
-
|
|
3974
|
+
O(() => t.create.fetch(v, { inject: s, rule: n, api: o }));
|
|
3908
3975
|
});
|
|
3909
3976
|
}, a.wait || 600));
|
|
3910
3977
|
}
|
|
3911
3978
|
const i = {
|
|
3912
3979
|
name: "fetch",
|
|
3913
3980
|
_fn: [],
|
|
3914
|
-
|
|
3981
|
+
loaded(...s) {
|
|
3915
3982
|
r(...s);
|
|
3916
3983
|
},
|
|
3917
3984
|
watch(...s) {
|
|
@@ -3922,13 +3989,13 @@ const bi = function(t) {
|
|
|
3922
3989
|
}
|
|
3923
3990
|
};
|
|
3924
3991
|
return i;
|
|
3925
|
-
},
|
|
3926
|
-
fetch:
|
|
3927
|
-
loadData:
|
|
3928
|
-
t:
|
|
3929
|
-
componentValidate:
|
|
3992
|
+
}, Oi = {
|
|
3993
|
+
fetch: wi,
|
|
3994
|
+
loadData: _i,
|
|
3995
|
+
t: Ci,
|
|
3996
|
+
componentValidate: Jt
|
|
3930
3997
|
};
|
|
3931
|
-
function
|
|
3998
|
+
function Si(t) {
|
|
3932
3999
|
t = t || /* @__PURE__ */ new Map();
|
|
3933
4000
|
const e = {
|
|
3934
4001
|
$on(r, i) {
|
|
@@ -3952,7 +4019,7 @@ function Oi(t) {
|
|
|
3952
4019
|
};
|
|
3953
4020
|
return e;
|
|
3954
4021
|
}
|
|
3955
|
-
const Fi = "html",
|
|
4022
|
+
const Fi = "html", Ri = {
|
|
3956
4023
|
name: Fi,
|
|
3957
4024
|
loadChildren: !1,
|
|
3958
4025
|
render(t, e) {
|
|
@@ -3962,7 +4029,7 @@ const Fi = "html", ki = {
|
|
|
3962
4029
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
3963
4030
|
}
|
|
3964
4031
|
};
|
|
3965
|
-
function
|
|
4032
|
+
function ki(t) {
|
|
3966
4033
|
t = t + "=";
|
|
3967
4034
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
3968
4035
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -3980,7 +4047,7 @@ function Ri(t) {
|
|
|
3980
4047
|
}
|
|
3981
4048
|
return null;
|
|
3982
4049
|
}
|
|
3983
|
-
function
|
|
4050
|
+
function Ei(t) {
|
|
3984
4051
|
const e = localStorage.getItem(t);
|
|
3985
4052
|
if (e)
|
|
3986
4053
|
try {
|
|
@@ -3990,30 +4057,43 @@ function Si(t) {
|
|
|
3990
4057
|
}
|
|
3991
4058
|
return null;
|
|
3992
4059
|
}
|
|
3993
|
-
function
|
|
4060
|
+
function Di(t) {
|
|
4061
|
+
const e = sessionStorage.getItem(t);
|
|
4062
|
+
if (e)
|
|
4063
|
+
try {
|
|
4064
|
+
return JSON.parse(e);
|
|
4065
|
+
} catch (r) {
|
|
4066
|
+
return e;
|
|
4067
|
+
}
|
|
4068
|
+
return null;
|
|
4069
|
+
}
|
|
4070
|
+
function it(t, e) {
|
|
3994
4071
|
if (!e)
|
|
3995
4072
|
return null;
|
|
3996
4073
|
const r = e.split(".");
|
|
3997
4074
|
let i = t(r.shift());
|
|
3998
|
-
return r.length ? i == null ? null :
|
|
4075
|
+
return r.length ? i == null ? null : T(i, r) : i;
|
|
3999
4076
|
}
|
|
4000
|
-
function
|
|
4001
|
-
return
|
|
4077
|
+
function ji(t) {
|
|
4078
|
+
return it(ki, t);
|
|
4002
4079
|
}
|
|
4003
|
-
function
|
|
4004
|
-
return
|
|
4080
|
+
function Ii(t) {
|
|
4081
|
+
return it(Ei, t);
|
|
4082
|
+
}
|
|
4083
|
+
function Ai(t) {
|
|
4084
|
+
return it(Di, t);
|
|
4005
4085
|
}
|
|
4006
|
-
function
|
|
4086
|
+
function Vi(t, e) {
|
|
4007
4087
|
let r;
|
|
4008
4088
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4009
4089
|
}
|
|
4010
4090
|
function Ne() {
|
|
4011
|
-
return
|
|
4091
|
+
return Vi("name", ...arguments);
|
|
4012
4092
|
}
|
|
4013
|
-
function
|
|
4093
|
+
function Pi(t) {
|
|
4014
4094
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4015
4095
|
}
|
|
4016
|
-
function
|
|
4096
|
+
function Bi(t, e) {
|
|
4017
4097
|
const r = new Vue({
|
|
4018
4098
|
data() {
|
|
4019
4099
|
return { rule: t, option: e || {} };
|
|
@@ -4024,79 +4104,81 @@ function Ai(t, e) {
|
|
|
4024
4104
|
});
|
|
4025
4105
|
return r.$mount(), r;
|
|
4026
4106
|
}
|
|
4027
|
-
function
|
|
4107
|
+
function Li(t) {
|
|
4028
4108
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4029
|
-
|
|
4109
|
+
jt.push(...e), Ze.push(...r), Ye.push(...i), Nt([...e, ...r, ...i]);
|
|
4030
4110
|
}
|
|
4031
|
-
let
|
|
4032
|
-
const
|
|
4111
|
+
let Ti = 1;
|
|
4112
|
+
const M = {}, Fe = Symbol("defValue");
|
|
4033
4113
|
function Wt(t) {
|
|
4034
4114
|
const e = {
|
|
4035
4115
|
[Te.name]: Te
|
|
4036
4116
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4037
4117
|
t.extendApi
|
|
4038
|
-
], u = b({},
|
|
4039
|
-
let
|
|
4040
|
-
const m =
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
if (
|
|
4047
|
-
return
|
|
4118
|
+
], u = b({}, Oi), f = Xr();
|
|
4119
|
+
let d = { global: {} };
|
|
4120
|
+
const m = t.isMobile === !0, g = re({
|
|
4121
|
+
$mobile: m
|
|
4122
|
+
}), v = vi(), w = {}, I = {};
|
|
4123
|
+
Li(t.attrs || {});
|
|
4124
|
+
function x(c) {
|
|
4125
|
+
const p = M[c];
|
|
4126
|
+
if (Array.isArray(p))
|
|
4127
|
+
return p.map((y) => y.api());
|
|
4128
|
+
if (p)
|
|
4129
|
+
return p.api();
|
|
4048
4130
|
}
|
|
4049
4131
|
function V(c) {
|
|
4050
4132
|
o.push(c);
|
|
4051
4133
|
}
|
|
4052
|
-
function
|
|
4134
|
+
function N() {
|
|
4053
4135
|
const c = Ne(...arguments);
|
|
4054
4136
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4055
4137
|
}
|
|
4056
|
-
function
|
|
4138
|
+
function Ae() {
|
|
4057
4139
|
const c = Ne(...arguments);
|
|
4058
4140
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : U(b({}, c.prop), {
|
|
4059
4141
|
name: c.id
|
|
4060
4142
|
}));
|
|
4061
4143
|
}
|
|
4062
|
-
function
|
|
4063
|
-
|
|
4144
|
+
function ve(c) {
|
|
4145
|
+
v.use(c);
|
|
4064
4146
|
}
|
|
4065
|
-
function
|
|
4147
|
+
function S() {
|
|
4066
4148
|
const c = Ne(...arguments);
|
|
4067
4149
|
if (!c.id || !c.prop) return ke;
|
|
4068
|
-
const
|
|
4069
|
-
r[
|
|
4150
|
+
const p = q(c.id), y = c.prop, $ = y.merge === !0 ? r[p] : void 0;
|
|
4151
|
+
r[p] = Se(y, $ || ke), f[p] = A(p), y.maker && _(f, y.maker);
|
|
4070
4152
|
}
|
|
4071
|
-
function
|
|
4072
|
-
let
|
|
4153
|
+
function D(c, p) {
|
|
4154
|
+
let y;
|
|
4073
4155
|
if (h.String(c)) {
|
|
4074
|
-
if (
|
|
4075
|
-
return ["form-create", "formcreate"].indexOf(
|
|
4156
|
+
if (y = c, p === void 0)
|
|
4157
|
+
return ["form-create", "formcreate"].indexOf(y) > -1 ? B() : e[y];
|
|
4076
4158
|
} else
|
|
4077
|
-
|
|
4078
|
-
if (!
|
|
4079
|
-
const $ = q(
|
|
4080
|
-
e[
|
|
4159
|
+
y = q(c.name), p = c;
|
|
4160
|
+
if (!y || !p) return;
|
|
4161
|
+
const $ = q(y);
|
|
4162
|
+
e[y] = p, e[$] = p, delete v.aliasMap[y], delete v.aliasMap[$], delete r[y], delete r[$], p.formCreateParser && S(y, p.formCreateParser);
|
|
4081
4163
|
}
|
|
4082
|
-
function
|
|
4083
|
-
return
|
|
4164
|
+
function B() {
|
|
4165
|
+
return Mr(Pe, e, i);
|
|
4084
4166
|
}
|
|
4085
|
-
function
|
|
4167
|
+
function se() {
|
|
4086
4168
|
return Te;
|
|
4087
4169
|
}
|
|
4088
|
-
function
|
|
4089
|
-
return h.Function(c.install) ? c.install(
|
|
4170
|
+
function be(c, p) {
|
|
4171
|
+
return h.Function(c.install) ? c.install(oe, p) : h.Function(c) && c(oe, p), this;
|
|
4090
4172
|
}
|
|
4091
|
-
function
|
|
4092
|
-
let $ =
|
|
4173
|
+
function oe(c, p, y) {
|
|
4174
|
+
let $ = Bi(c, p || {});
|
|
4093
4175
|
const C = $.$refs.fc.formCreate;
|
|
4094
|
-
return C.$parent =
|
|
4176
|
+
return C.$parent = y, Pi(C.options).appendChild($.$el), C.api();
|
|
4095
4177
|
}
|
|
4096
|
-
|
|
4178
|
+
Se(oe, I);
|
|
4097
4179
|
function Kt(c) {
|
|
4098
|
-
let
|
|
4099
|
-
return c ?
|
|
4180
|
+
let p = b({}, t);
|
|
4181
|
+
return c ? p.inherit = {
|
|
4100
4182
|
components: e,
|
|
4101
4183
|
parsers: r,
|
|
4102
4184
|
directives: i,
|
|
@@ -4104,68 +4186,68 @@ function Wt(t) {
|
|
|
4104
4186
|
providers: u,
|
|
4105
4187
|
useApps: o,
|
|
4106
4188
|
maker: f,
|
|
4107
|
-
formulas:
|
|
4108
|
-
loadData:
|
|
4109
|
-
} : delete
|
|
4189
|
+
formulas: w,
|
|
4190
|
+
loadData: g
|
|
4191
|
+
} : delete p.inherit, Wt(p);
|
|
4110
4192
|
}
|
|
4111
|
-
function Xt(c,
|
|
4112
|
-
s[c] =
|
|
4193
|
+
function Xt(c, p) {
|
|
4194
|
+
s[c] = p;
|
|
4113
4195
|
}
|
|
4114
|
-
function Qt(c,
|
|
4115
|
-
|
|
4196
|
+
function Qt(c, p) {
|
|
4197
|
+
w[c] = p;
|
|
4116
4198
|
}
|
|
4117
|
-
function Zt(c,
|
|
4118
|
-
const
|
|
4119
|
-
|
|
4120
|
-
$[C] =
|
|
4121
|
-
}),
|
|
4199
|
+
function Zt(c, p) {
|
|
4200
|
+
const y = n[c] || {}, $ = y.parsers || {};
|
|
4201
|
+
p.parsers && Object.keys(p.parsers).forEach((C) => {
|
|
4202
|
+
$[C] = Se(p.parsers[C], ke);
|
|
4203
|
+
}), p.name = c, n[c] = U(b(b({}, y), p), { parsers: $ });
|
|
4122
4204
|
}
|
|
4123
|
-
function
|
|
4124
|
-
c && Object.keys(
|
|
4125
|
-
(Array.isArray(
|
|
4205
|
+
function _e(c) {
|
|
4206
|
+
c && Object.keys(M).forEach((p) => {
|
|
4207
|
+
(Array.isArray(M[p]) ? M[p] : [M[p]]).forEach(($) => {
|
|
4126
4208
|
$.bus.$emit("$loadData." + c);
|
|
4127
4209
|
});
|
|
4128
4210
|
});
|
|
4129
4211
|
}
|
|
4130
|
-
function
|
|
4131
|
-
|
|
4212
|
+
function Ve(c, p) {
|
|
4213
|
+
ie(g, c, p), _e(c);
|
|
4132
4214
|
}
|
|
4133
|
-
function
|
|
4134
|
-
const
|
|
4135
|
-
|
|
4215
|
+
function Ce(c, p) {
|
|
4216
|
+
const y = (...$) => O(() => p(...$));
|
|
4217
|
+
y._driver = !0, Ve(c, y);
|
|
4136
4218
|
}
|
|
4137
|
-
function
|
|
4138
|
-
const
|
|
4139
|
-
c =
|
|
4140
|
-
const $ =
|
|
4141
|
-
if (
|
|
4142
|
-
let C =
|
|
4143
|
-
return C && C._driver ? C = C($) :
|
|
4219
|
+
function nt(c, p) {
|
|
4220
|
+
const y = (c || "").split(".");
|
|
4221
|
+
c = y.shift();
|
|
4222
|
+
const $ = y.join(".");
|
|
4223
|
+
if (k(g, c) || F(g, c, Fe), g[c] !== Fe) {
|
|
4224
|
+
let C = g[c];
|
|
4225
|
+
return C && C._driver ? C = C($) : y.length && (C = T(C, y)), C == null || C === "" ? p : C;
|
|
4144
4226
|
} else
|
|
4145
|
-
return
|
|
4227
|
+
return p;
|
|
4146
4228
|
}
|
|
4147
4229
|
function Yt(c) {
|
|
4148
4230
|
l.push(c);
|
|
4149
4231
|
}
|
|
4150
4232
|
function xt(c) {
|
|
4151
|
-
delete
|
|
4233
|
+
delete g[c], _e(c);
|
|
4152
4234
|
}
|
|
4153
|
-
function er(c,
|
|
4154
|
-
a.push({ name: c, callback:
|
|
4235
|
+
function er(c, p) {
|
|
4236
|
+
a.push({ name: c, callback: p });
|
|
4155
4237
|
}
|
|
4156
|
-
function
|
|
4238
|
+
function Pe(c) {
|
|
4157
4239
|
_(this, {
|
|
4158
|
-
id:
|
|
4159
|
-
create:
|
|
4240
|
+
id: Ti++,
|
|
4241
|
+
create: oe,
|
|
4160
4242
|
vm: c,
|
|
4161
|
-
manager:
|
|
4243
|
+
manager: bi(t.manager),
|
|
4162
4244
|
parsers: r,
|
|
4163
4245
|
providers: u,
|
|
4164
4246
|
modelFields: s,
|
|
4165
|
-
formulas:
|
|
4166
|
-
isMobile:
|
|
4247
|
+
formulas: w,
|
|
4248
|
+
isMobile: m,
|
|
4167
4249
|
rules: c.$options.propsData.rule,
|
|
4168
|
-
name: c.$options.propsData.name ||
|
|
4250
|
+
name: c.$options.propsData.name || Ie(),
|
|
4169
4251
|
inFor: c.$options.propsData.inFor,
|
|
4170
4252
|
prop: {
|
|
4171
4253
|
components: e,
|
|
@@ -4173,77 +4255,76 @@ function Wt(t) {
|
|
|
4173
4255
|
},
|
|
4174
4256
|
drivers: n,
|
|
4175
4257
|
renderDriver: null,
|
|
4176
|
-
|
|
4177
|
-
|
|
4178
|
-
|
|
4179
|
-
|
|
4180
|
-
bus: new Oi(),
|
|
4258
|
+
refreshData: _e,
|
|
4259
|
+
loadData: g,
|
|
4260
|
+
CreateNode: v,
|
|
4261
|
+
bus: new Si(),
|
|
4181
4262
|
unwatch: [],
|
|
4182
|
-
options:
|
|
4263
|
+
options: mr({}),
|
|
4183
4264
|
extendApiFn: l,
|
|
4184
4265
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4185
|
-
tmpData:
|
|
4186
|
-
}), a.forEach((
|
|
4187
|
-
this.bus.$on(
|
|
4188
|
-
}),
|
|
4189
|
-
|
|
4266
|
+
tmpData: re({})
|
|
4267
|
+
}), a.forEach((p) => {
|
|
4268
|
+
this.bus.$on(p.name, p.callback);
|
|
4269
|
+
}), P(() => {
|
|
4270
|
+
L(this.options, () => {
|
|
4190
4271
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4191
4272
|
}, { deep: !0 });
|
|
4192
|
-
}), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new z(this), this.name && (this.inFor ? (
|
|
4273
|
+
}), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new z(this), this.name && (this.inFor ? (M[this.name] || (M[this.name] = []), M[this.name].push(this)) : M[this.name] = this);
|
|
4193
4274
|
}
|
|
4194
|
-
|
|
4275
|
+
Pe.isMobile = m, _(Pe.prototype, {
|
|
4195
4276
|
init() {
|
|
4196
|
-
this.isSub() && this.unwatch.push(
|
|
4277
|
+
this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
|
|
4197
4278
|
this.initOptions(), this.$handle.api.refresh();
|
|
4198
4279
|
}, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4199
4280
|
},
|
|
4200
|
-
targetFormDriver(c, ...
|
|
4281
|
+
targetFormDriver(c, ...p) {
|
|
4201
4282
|
if (this.renderDriver && this.renderDriver[c])
|
|
4202
|
-
return
|
|
4283
|
+
return O(() => this.renderDriver[c](...p));
|
|
4203
4284
|
},
|
|
4204
|
-
t(c,
|
|
4205
|
-
let $ =
|
|
4206
|
-
return $ == null && ($ = ""), $ &&
|
|
4207
|
-
const
|
|
4208
|
-
$ = $.replace(
|
|
4285
|
+
t(c, p, y) {
|
|
4286
|
+
let $ = y ? y("$t." + c) : this.globalLanguageDriver(c);
|
|
4287
|
+
return $ == null && ($ = ""), $ && p && Object.keys(p).forEach((C) => {
|
|
4288
|
+
const E = new RegExp(`{${C}}`, "g");
|
|
4289
|
+
$ = $.replace(E, p[C]);
|
|
4209
4290
|
}), $;
|
|
4210
4291
|
},
|
|
4211
4292
|
globalDataDriver(c) {
|
|
4212
|
-
let
|
|
4213
|
-
const
|
|
4293
|
+
let p = c.split(".");
|
|
4294
|
+
const y = p.shift(), $ = this.options.value.globalData && this.options.value.globalData[y];
|
|
4214
4295
|
if ($) {
|
|
4215
4296
|
if ($.type === "static")
|
|
4216
|
-
return
|
|
4297
|
+
return T($.data, p);
|
|
4217
4298
|
{
|
|
4218
4299
|
let C;
|
|
4219
|
-
const
|
|
4220
|
-
if (
|
|
4221
|
-
if (
|
|
4300
|
+
const E = this.fetchCache.get($);
|
|
4301
|
+
if (E) {
|
|
4302
|
+
if (E.status && (C = T(E.data, p)), !E.loading)
|
|
4222
4303
|
return C;
|
|
4223
|
-
|
|
4304
|
+
E.loading = !1, this.fetchCache.set($, E);
|
|
4224
4305
|
} else
|
|
4225
4306
|
this.fetchCache.set($, { status: !1 });
|
|
4226
|
-
const
|
|
4227
|
-
|
|
4228
|
-
const
|
|
4229
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (
|
|
4230
|
-
}, $.wait || 600),
|
|
4231
|
-
this.fetchCache.set($, { status: !0, data:
|
|
4232
|
-
},
|
|
4233
|
-
if (
|
|
4234
|
-
return
|
|
4235
|
-
if (
|
|
4236
|
-
|
|
4307
|
+
const R = ce(() => {
|
|
4308
|
+
le();
|
|
4309
|
+
const H = this.fetchCache.get($);
|
|
4310
|
+
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (H && (H.loading = !0, this.fetchCache.set($, H)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete($);
|
|
4311
|
+
}, $.wait || 600), ae = (H) => {
|
|
4312
|
+
this.fetchCache.set($, { status: !0, data: H }), this.bus.$emit("$loadData.$globalData." + y);
|
|
4313
|
+
}, K = (H, ue) => {
|
|
4314
|
+
if (ue && $.watch === !1)
|
|
4315
|
+
return le();
|
|
4316
|
+
if (ue) {
|
|
4317
|
+
R();
|
|
4237
4318
|
return;
|
|
4238
4319
|
}
|
|
4239
|
-
const
|
|
4240
|
-
this.$handle.api.fetch(
|
|
4241
|
-
|
|
4242
|
-
}).catch((
|
|
4243
|
-
|
|
4320
|
+
const he = this.$handle.loadFetchVar(Je($), H);
|
|
4321
|
+
this.$handle.api.fetch(he).then((ee) => {
|
|
4322
|
+
ae(ee);
|
|
4323
|
+
}).catch((ee) => {
|
|
4324
|
+
ae(null);
|
|
4244
4325
|
});
|
|
4245
|
-
},
|
|
4246
|
-
return this.unwatch.push(
|
|
4326
|
+
}, le = this.watchLoadData(K);
|
|
4327
|
+
return this.unwatch.push(le), C;
|
|
4247
4328
|
}
|
|
4248
4329
|
}
|
|
4249
4330
|
},
|
|
@@ -4252,81 +4333,90 @@ function Wt(t) {
|
|
|
4252
4333
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4253
4334
|
},
|
|
4254
4335
|
globalLanguageDriver(c) {
|
|
4255
|
-
let
|
|
4256
|
-
if (
|
|
4336
|
+
let p = this.vm.top.$props.locale, y;
|
|
4337
|
+
if (p && typeof p == "object" && (y = T(p, c)), y == null) {
|
|
4257
4338
|
const $ = this.options.value.language || {}, C = this.getLocale();
|
|
4258
|
-
|
|
4339
|
+
y = T($[C], c);
|
|
4259
4340
|
}
|
|
4260
|
-
return
|
|
4341
|
+
return y;
|
|
4261
4342
|
},
|
|
4262
4343
|
globalVarDriver(c) {
|
|
4263
|
-
|
|
4264
|
-
const g = d.shift(), $ = this.options.value.globalVariable && this.options.value.globalVariable[g];
|
|
4344
|
+
const y = c.split(".").shift(), $ = this.options.value.globalVariable && this.options.value.globalVariable[y];
|
|
4265
4345
|
if ($) {
|
|
4266
4346
|
const C = h.Function($) ? $ : W($.handle);
|
|
4267
|
-
if (C)
|
|
4268
|
-
|
|
4347
|
+
if (C) {
|
|
4348
|
+
let E;
|
|
4349
|
+
const R = this.watchLoadData((ae, K) => {
|
|
4350
|
+
K ? (this.bus.$emit("$loadData.$var." + y), R()) : E = C(ae, this.$handle.api);
|
|
4351
|
+
});
|
|
4352
|
+
return this.unwatch.push(R), E;
|
|
4353
|
+
}
|
|
4269
4354
|
}
|
|
4270
4355
|
},
|
|
4271
|
-
setData(c,
|
|
4272
|
-
|
|
4356
|
+
setData(c, p, y) {
|
|
4357
|
+
y ? Ve(c, p) : (ie(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
|
|
4273
4358
|
},
|
|
4274
|
-
getLoadData(c,
|
|
4275
|
-
let
|
|
4359
|
+
getLoadData(c, p) {
|
|
4360
|
+
let y = null;
|
|
4276
4361
|
if (c != null) {
|
|
4277
4362
|
let $ = c.split(".");
|
|
4278
4363
|
const C = $.shift();
|
|
4279
4364
|
if (C === "$topForm")
|
|
4280
|
-
|
|
4365
|
+
y = this.$handle.api.top.formData();
|
|
4281
4366
|
else if (C === "$form")
|
|
4282
|
-
|
|
4367
|
+
y = this.$handle.api.formData();
|
|
4283
4368
|
else if (C === "$options")
|
|
4284
|
-
|
|
4369
|
+
y = this.options.value;
|
|
4285
4370
|
else if (C === "$globalData")
|
|
4286
|
-
|
|
4371
|
+
y = this.globalDataDriver($.join(".")), $ = [];
|
|
4287
4372
|
else if (C === "$var")
|
|
4288
|
-
|
|
4373
|
+
y = this.globalVarDriver($.join(".")), $ = [];
|
|
4289
4374
|
else if (C === "$locale")
|
|
4290
|
-
|
|
4375
|
+
y = this.getLocale(), $ = [];
|
|
4291
4376
|
else if (C === "$t")
|
|
4292
|
-
|
|
4377
|
+
y = this.globalLanguageDriver($.join(".")), $ = [];
|
|
4293
4378
|
else {
|
|
4294
|
-
|
|
4295
|
-
|
|
4379
|
+
if (C === "$preview")
|
|
4380
|
+
return this.$handle.preview;
|
|
4381
|
+
{
|
|
4382
|
+
const E = this.vm.top.fc.tmpData;
|
|
4383
|
+
k(E, C) || F(E, C, Fe), y = E[C] !== Fe ? T(E, c) : nt(c), $ = [];
|
|
4384
|
+
}
|
|
4296
4385
|
}
|
|
4297
|
-
|
|
4386
|
+
y && $.length && (y = T(y, $));
|
|
4298
4387
|
}
|
|
4299
|
-
return
|
|
4300
|
-
},
|
|
4301
|
-
watchLoadData(c,
|
|
4302
|
-
let
|
|
4303
|
-
const $ = (
|
|
4304
|
-
|
|
4305
|
-
c(C,
|
|
4306
|
-
})
|
|
4307
|
-
}, C = (
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4388
|
+
return y == null || y === "" ? p : y;
|
|
4389
|
+
},
|
|
4390
|
+
watchLoadData(c, p) {
|
|
4391
|
+
let y = {};
|
|
4392
|
+
const $ = (R) => {
|
|
4393
|
+
O(() => {
|
|
4394
|
+
c(C, R);
|
|
4395
|
+
});
|
|
4396
|
+
}, C = (R, ae) => {
|
|
4397
|
+
let K;
|
|
4398
|
+
if (typeof R == "object" && (K = R.getValue, R = R.id), y[R])
|
|
4399
|
+
return y[R].val;
|
|
4400
|
+
const le = pe(() => K ? K() : this.getLoadData(R, ae)), H = R.split("."), ue = H.shift(), he = H.shift() || "", ee = ce(() => {
|
|
4401
|
+
const Be = K ? K() : this.getLoadData(R, ae);
|
|
4402
|
+
if (y[R])
|
|
4403
|
+
JSON.stringify(Be) !== JSON.stringify(y[R].val) && (y[R].val = Be, $(!0));
|
|
4314
4404
|
else return;
|
|
4315
|
-
},
|
|
4316
|
-
|
|
4405
|
+
}, p || 0), rr = L(le, (Be) => {
|
|
4406
|
+
ee();
|
|
4317
4407
|
});
|
|
4318
|
-
return this.bus.$on("$loadData." +
|
|
4408
|
+
return this.bus.$on("$loadData." + ue, ee), he && this.bus.$on("$loadData." + ue + "." + he, ee), y[R] = {
|
|
4319
4409
|
fn: () => {
|
|
4320
|
-
this.bus.$off("$loadData." +
|
|
4410
|
+
this.bus.$off("$loadData." + ue, ee), he && this.bus.$off("$loadData." + ue + "." + he, ee), rr();
|
|
4321
4411
|
},
|
|
4322
|
-
val:
|
|
4323
|
-
},
|
|
4412
|
+
val: le.value
|
|
4413
|
+
}, le.value;
|
|
4324
4414
|
};
|
|
4325
4415
|
$(!1);
|
|
4326
|
-
const
|
|
4327
|
-
Object.keys(
|
|
4416
|
+
const E = () => {
|
|
4417
|
+
Object.keys(y).forEach((R) => y[R].fn()), y = {};
|
|
4328
4418
|
};
|
|
4329
|
-
return this.unwatch.push(
|
|
4419
|
+
return this.unwatch.push(E), E;
|
|
4330
4420
|
},
|
|
4331
4421
|
isSub() {
|
|
4332
4422
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4339,13 +4429,13 @@ function Wt(t) {
|
|
|
4339
4429
|
resetBtn: {},
|
|
4340
4430
|
globalEvent: {},
|
|
4341
4431
|
globalData: {}
|
|
4342
|
-
}, J(
|
|
4432
|
+
}, J(d));
|
|
4343
4433
|
this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
|
|
4344
4434
|
},
|
|
4345
|
-
mergeOptions(c,
|
|
4346
|
-
return
|
|
4347
|
-
delete
|
|
4348
|
-
}),
|
|
4435
|
+
mergeOptions(c, p, y) {
|
|
4436
|
+
return p = b({}, p || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach(($) => {
|
|
4437
|
+
delete p[$];
|
|
4438
|
+
}), p.global && (c.global = Jr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
|
|
4349
4439
|
},
|
|
4350
4440
|
updateOptions(c) {
|
|
4351
4441
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4362,10 +4452,10 @@ function Wt(t) {
|
|
|
4362
4452
|
unmount() {
|
|
4363
4453
|
if (this.name)
|
|
4364
4454
|
if (this.inFor) {
|
|
4365
|
-
const c =
|
|
4366
|
-
|
|
4455
|
+
const c = M[this.name].indexOf(this);
|
|
4456
|
+
M[this.name].splice(c, 1);
|
|
4367
4457
|
} else
|
|
4368
|
-
delete
|
|
4458
|
+
delete M[this.name];
|
|
4369
4459
|
a.forEach((c) => {
|
|
4370
4460
|
this.bus.$off(c.name, c.callback);
|
|
4371
4461
|
}), this.tmpData = {}, this.unwatch.forEach((c) => c()), this.unwatch = [], this.$handle.reloadRule([]);
|
|
@@ -4374,74 +4464,74 @@ function Wt(t) {
|
|
|
4374
4464
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4375
4465
|
}
|
|
4376
4466
|
});
|
|
4377
|
-
function
|
|
4467
|
+
function st(c) {
|
|
4378
4468
|
_(c, {
|
|
4379
4469
|
version: t.version,
|
|
4380
4470
|
ui: t.ui,
|
|
4381
|
-
isMobile:
|
|
4471
|
+
isMobile: m,
|
|
4382
4472
|
extendApi: Yt,
|
|
4383
|
-
getData:
|
|
4384
|
-
setDataDriver:
|
|
4385
|
-
setData:
|
|
4473
|
+
getData: nt,
|
|
4474
|
+
setDataDriver: Ce,
|
|
4475
|
+
setData: Ve,
|
|
4386
4476
|
removeData: xt,
|
|
4387
|
-
refreshData:
|
|
4477
|
+
refreshData: _e,
|
|
4388
4478
|
maker: f,
|
|
4389
|
-
component:
|
|
4390
|
-
directive:
|
|
4479
|
+
component: D,
|
|
4480
|
+
directive: N,
|
|
4391
4481
|
setModelField: Xt,
|
|
4392
4482
|
setFormula: Qt,
|
|
4393
4483
|
setDriver: Zt,
|
|
4394
|
-
register:
|
|
4395
|
-
$vnode:
|
|
4396
|
-
parser:
|
|
4397
|
-
use:
|
|
4484
|
+
register: Ae,
|
|
4485
|
+
$vnode: se,
|
|
4486
|
+
parser: S,
|
|
4487
|
+
use: be,
|
|
4398
4488
|
factory: Kt,
|
|
4399
|
-
componentAlias:
|
|
4400
|
-
copyRule:
|
|
4401
|
-
copyRules:
|
|
4402
|
-
mergeRule:
|
|
4403
|
-
fetch:
|
|
4404
|
-
$form:
|
|
4489
|
+
componentAlias: ve,
|
|
4490
|
+
copyRule: Pt,
|
|
4491
|
+
copyRules: Bt,
|
|
4492
|
+
mergeRule: Y,
|
|
4493
|
+
fetch: Ut,
|
|
4494
|
+
$form: B,
|
|
4405
4495
|
parseFn: W,
|
|
4406
|
-
parseJson:
|
|
4496
|
+
parseJson: Vt,
|
|
4407
4497
|
toJson: et,
|
|
4408
4498
|
useApp: V,
|
|
4409
|
-
getApi:
|
|
4499
|
+
getApi: x,
|
|
4410
4500
|
on: er
|
|
4411
4501
|
});
|
|
4412
4502
|
}
|
|
4413
4503
|
function tr(c) {
|
|
4414
4504
|
_(c, {
|
|
4415
|
-
create:
|
|
4416
|
-
install(
|
|
4417
|
-
if (
|
|
4418
|
-
|
|
4419
|
-
const $ = function(
|
|
4420
|
-
return
|
|
4505
|
+
create: oe,
|
|
4506
|
+
install(p, y) {
|
|
4507
|
+
if (d = b(b({}, d), y || {}), p._installedFormCreate === !0) return;
|
|
4508
|
+
p._installedFormCreate = !0;
|
|
4509
|
+
const $ = function(E, R = {}) {
|
|
4510
|
+
return oe(E, R, this);
|
|
4421
4511
|
};
|
|
4422
|
-
|
|
4423
|
-
const C =
|
|
4424
|
-
|
|
4425
|
-
|
|
4512
|
+
st($), p.prototype.$formCreate = $;
|
|
4513
|
+
const C = B();
|
|
4514
|
+
p.component(C.name, C), p.component("FcFragment", se()), o.forEach((E) => {
|
|
4515
|
+
O(() => E(c, p));
|
|
4426
4516
|
});
|
|
4427
4517
|
}
|
|
4428
4518
|
});
|
|
4429
4519
|
}
|
|
4430
|
-
if (
|
|
4520
|
+
if (st(I), tr(I), Ce("$cookie", ji), Ce("$localStorage", Ii), Ce("$sessionStorage", Ai), v.use({ fragment: "fcFragment" }), t.install && oe.use(t), S(Ri), t.inherit) {
|
|
4431
4521
|
const c = t.inherit;
|
|
4432
|
-
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(
|
|
4522
|
+
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(g, c.loadData), c.formulas && _(w, c.formulas);
|
|
4433
4523
|
}
|
|
4434
|
-
const
|
|
4435
|
-
return we
|
|
4524
|
+
const we = B();
|
|
4525
|
+
return Se(we, I), Object.defineProperties(we, {
|
|
4436
4526
|
fetch: {
|
|
4437
4527
|
get() {
|
|
4438
|
-
return
|
|
4528
|
+
return I.fetch;
|
|
4439
4529
|
},
|
|
4440
4530
|
set(c) {
|
|
4441
|
-
|
|
4531
|
+
I.fetch = c;
|
|
4442
4532
|
}
|
|
4443
4533
|
}
|
|
4444
|
-
}),
|
|
4534
|
+
}), we.util = I, we;
|
|
4445
4535
|
}
|
|
4446
4536
|
function Me(t) {
|
|
4447
4537
|
if (h.Date(t))
|
|
@@ -4451,10 +4541,10 @@ function Me(t) {
|
|
|
4451
4541
|
return e.toString() === "Invalid Date" ? t : e;
|
|
4452
4542
|
}
|
|
4453
4543
|
}
|
|
4454
|
-
const
|
|
4455
|
-
name:
|
|
4544
|
+
const bt = "datePicker", Ni = {
|
|
4545
|
+
name: bt,
|
|
4456
4546
|
maker: function() {
|
|
4457
|
-
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = A(
|
|
4547
|
+
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = A(bt, { type: e.toLowerCase() }), t), {});
|
|
4458
4548
|
}(),
|
|
4459
4549
|
mergeProp(t) {
|
|
4460
4550
|
let e = t.prop.props;
|
|
@@ -4483,7 +4573,7 @@ const vt = "datePicker", Bi = {
|
|
|
4483
4573
|
mounted(t) {
|
|
4484
4574
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
4485
4575
|
}
|
|
4486
|
-
}, Ue = "hidden",
|
|
4576
|
+
}, Ue = "hidden", Mi = {
|
|
4487
4577
|
name: Ue,
|
|
4488
4578
|
maker: {
|
|
4489
4579
|
[Ue]: (t, e) => A(Ue)("", t, e)
|
|
@@ -4491,7 +4581,7 @@ const vt = "datePicker", Bi = {
|
|
|
4491
4581
|
render() {
|
|
4492
4582
|
return [];
|
|
4493
4583
|
}
|
|
4494
|
-
}, qe = "input",
|
|
4584
|
+
}, qe = "input", Ui = {
|
|
4495
4585
|
name: qe,
|
|
4496
4586
|
maker: function() {
|
|
4497
4587
|
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = A(qe, { type: r }), e), {});
|
|
@@ -4501,36 +4591,36 @@ const vt = "datePicker", Bi = {
|
|
|
4501
4591
|
let { props: e } = t.prop;
|
|
4502
4592
|
e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4503
4593
|
}
|
|
4504
|
-
},
|
|
4505
|
-
name:
|
|
4594
|
+
}, _t = "slider", qi = {
|
|
4595
|
+
name: _t,
|
|
4506
4596
|
maker: {
|
|
4507
|
-
sliderRange: A(
|
|
4597
|
+
sliderRange: A(_t, { range: !0 })
|
|
4508
4598
|
},
|
|
4509
4599
|
toFormValue(t, e) {
|
|
4510
4600
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4511
4601
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4512
4602
|
}
|
|
4513
|
-
},
|
|
4603
|
+
}, Gi = {
|
|
4514
4604
|
name: "switch",
|
|
4515
4605
|
mergeProp(t) {
|
|
4516
4606
|
const e = t.prop.props.slot || {}, r = t.prop.scopedSlots || {};
|
|
4517
4607
|
e.open && (r.open = () => e.open), e.close && (r.close = () => e.close), t.prop.scopedSlots = r;
|
|
4518
4608
|
}
|
|
4519
|
-
},
|
|
4609
|
+
}, Hi = {
|
|
4520
4610
|
name: "FcRow",
|
|
4521
4611
|
render(t, e) {
|
|
4522
4612
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4523
4613
|
e.vNode.row(e.prop, t)
|
|
4524
4614
|
]);
|
|
4525
4615
|
}
|
|
4526
|
-
},
|
|
4527
|
-
Bi,
|
|
4528
|
-
Li,
|
|
4529
|
-
Ti,
|
|
4616
|
+
}, Ji = [
|
|
4530
4617
|
Ni,
|
|
4531
4618
|
Mi,
|
|
4532
|
-
Ui
|
|
4533
|
-
|
|
4619
|
+
Ui,
|
|
4620
|
+
qi,
|
|
4621
|
+
Gi,
|
|
4622
|
+
Hi
|
|
4623
|
+
], Wi = {
|
|
4534
4624
|
button: "iButton",
|
|
4535
4625
|
icon: "Icon",
|
|
4536
4626
|
slider: "Slider",
|
|
@@ -4557,21 +4647,21 @@ const vt = "datePicker", Bi = {
|
|
|
4557
4647
|
array: "fcGroup",
|
|
4558
4648
|
subForm: "fcSubForm",
|
|
4559
4649
|
object: "fcSubForm"
|
|
4560
|
-
},
|
|
4650
|
+
}, De = {
|
|
4561
4651
|
resetBtnType: "default",
|
|
4562
4652
|
resetBtnIcon: "md-refresh",
|
|
4563
4653
|
infoIcon: "ios-information-circle-outline"
|
|
4564
4654
|
};
|
|
4565
|
-
function
|
|
4655
|
+
function zi() {
|
|
4566
4656
|
return {
|
|
4567
4657
|
type: "poptip",
|
|
4568
4658
|
trigger: "hover",
|
|
4569
4659
|
placement: "top-start",
|
|
4570
4660
|
wordWrap: !0,
|
|
4571
|
-
icon:
|
|
4661
|
+
icon: De.infoIcon
|
|
4572
4662
|
};
|
|
4573
4663
|
}
|
|
4574
|
-
function
|
|
4664
|
+
function Ki() {
|
|
4575
4665
|
return {
|
|
4576
4666
|
form: {
|
|
4577
4667
|
inline: !1,
|
|
@@ -4587,36 +4677,36 @@ function Ji() {
|
|
|
4587
4677
|
submitBtn: {
|
|
4588
4678
|
type: "primary",
|
|
4589
4679
|
disabled: !1,
|
|
4590
|
-
innerText: "
|
|
4680
|
+
innerText: "",
|
|
4591
4681
|
loading: !1,
|
|
4592
4682
|
show: !0,
|
|
4593
4683
|
click: void 0
|
|
4594
4684
|
},
|
|
4595
4685
|
resetBtn: {
|
|
4596
|
-
type:
|
|
4686
|
+
type: De.resetBtnType,
|
|
4597
4687
|
disabled: !1,
|
|
4598
|
-
icon:
|
|
4599
|
-
innerText: "
|
|
4688
|
+
icon: De.resetBtnIcon,
|
|
4689
|
+
innerText: "",
|
|
4600
4690
|
loading: !1,
|
|
4601
4691
|
show: !1,
|
|
4602
4692
|
click: void 0
|
|
4603
4693
|
}
|
|
4604
4694
|
};
|
|
4605
4695
|
}
|
|
4606
|
-
function
|
|
4607
|
-
|
|
4696
|
+
function Ct(t, e) {
|
|
4697
|
+
k(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4608
4698
|
}
|
|
4609
|
-
function
|
|
4699
|
+
function X(t) {
|
|
4610
4700
|
return t === !1;
|
|
4611
4701
|
}
|
|
4612
|
-
function
|
|
4613
|
-
|
|
4702
|
+
function Xi(t, e) {
|
|
4703
|
+
k(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4614
4704
|
}
|
|
4615
4705
|
function Ge(t) {
|
|
4616
4706
|
const e = b({}, t);
|
|
4617
4707
|
return delete e.children, e;
|
|
4618
4708
|
}
|
|
4619
|
-
const
|
|
4709
|
+
const Qi = {
|
|
4620
4710
|
validate() {
|
|
4621
4711
|
const t = this.form();
|
|
4622
4712
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4635,28 +4725,28 @@ const zi = {
|
|
|
4635
4725
|
},
|
|
4636
4726
|
tidyOptions(t) {
|
|
4637
4727
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4638
|
-
|
|
4728
|
+
Xi(t, e);
|
|
4639
4729
|
}), t;
|
|
4640
4730
|
},
|
|
4641
4731
|
tidyRule({ prop: t }) {
|
|
4642
|
-
return
|
|
4732
|
+
return Ct(t, "title"), Ct(t, "info"), t;
|
|
4643
4733
|
},
|
|
4644
4734
|
mergeProp(t) {
|
|
4645
4735
|
const e = {
|
|
4646
|
-
info:
|
|
4736
|
+
info: zi(),
|
|
4647
4737
|
title: {},
|
|
4648
4738
|
col: { span: 24 },
|
|
4649
4739
|
wrap: {}
|
|
4650
4740
|
};
|
|
4651
4741
|
["info", "wrap", "col", "title"].forEach((r) => {
|
|
4652
|
-
t.prop[r] =
|
|
4742
|
+
t.prop[r] = Z([this.options[r] || {}, t.prop[r] || {}], e[r]);
|
|
4653
4743
|
}), this.setSize(t.prop.props);
|
|
4654
4744
|
},
|
|
4655
4745
|
setSize(t) {
|
|
4656
4746
|
!t.size && this.options.form.size && (t.size = this.options.form.size);
|
|
4657
4747
|
},
|
|
4658
4748
|
getDefaultOptions() {
|
|
4659
|
-
return
|
|
4749
|
+
return Ki();
|
|
4660
4750
|
},
|
|
4661
4751
|
update() {
|
|
4662
4752
|
const t = this.options.form;
|
|
@@ -4679,12 +4769,12 @@ const zi = {
|
|
|
4679
4769
|
});
|
|
4680
4770
|
},
|
|
4681
4771
|
render(t) {
|
|
4682
|
-
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule,
|
|
4772
|
+
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, X(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
|
|
4683
4773
|
},
|
|
4684
4774
|
makeWrap(t, e) {
|
|
4685
4775
|
const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props;
|
|
4686
4776
|
delete r.wrap.title;
|
|
4687
|
-
const u =
|
|
4777
|
+
const u = X(r.wrap.show) ? e : this.$r(Z([r.wrap, {
|
|
4688
4778
|
props: U(b({
|
|
4689
4779
|
labelWidth: o
|
|
4690
4780
|
}, Ge(r.wrap || {})), {
|
|
@@ -4696,38 +4786,39 @@ const zi = {
|
|
|
4696
4786
|
ref: t.wrapRef,
|
|
4697
4787
|
type: "formItem"
|
|
4698
4788
|
}]), b({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
|
|
4699
|
-
return a === !0 ||
|
|
4789
|
+
return a === !0 || X(l) || X(s.show) ? u : this.makeCol(r, i, [u]);
|
|
4700
4790
|
},
|
|
4701
4791
|
isTitle(t) {
|
|
4702
4792
|
if (this.options.form.title === !1) return !1;
|
|
4703
4793
|
const e = t.title;
|
|
4704
|
-
return !(!e.title && !e.native ||
|
|
4794
|
+
return !(!e.title && !e.native || X(e.show));
|
|
4705
4795
|
},
|
|
4706
4796
|
makeInfo(t, e, r) {
|
|
4797
|
+
var u, f, d;
|
|
4707
4798
|
const i = b({}, t.title), s = b({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
|
|
4708
|
-
title: r.refRule.__$title.value,
|
|
4799
|
+
title: (u = r.refRule) == null ? void 0 : u.__$title.value,
|
|
4709
4800
|
rule: r.rule,
|
|
4710
4801
|
options: this.options
|
|
4711
|
-
}) : r.refRule.__$title.value + (n.labelSuffix || n["label-suffix"] || "")];
|
|
4712
|
-
if (!
|
|
4713
|
-
const
|
|
4802
|
+
}) : ((f = r.refRule) == null ? void 0 : f.__$title.value) + (n.labelSuffix || n["label-suffix"] || "")];
|
|
4803
|
+
if (!X(s.show) && (s.info || s.native) && !X(s.icon)) {
|
|
4804
|
+
const m = {
|
|
4714
4805
|
type: s.type || "poptip",
|
|
4715
4806
|
props: Ge(s),
|
|
4716
4807
|
key: `${e}pop`,
|
|
4717
4808
|
slot: "label"
|
|
4718
4809
|
};
|
|
4719
|
-
delete
|
|
4720
|
-
const
|
|
4721
|
-
s.info && !
|
|
4810
|
+
delete m.props.icon, delete m.props.show, delete m.props.info, delete m.props.align, delete m.props.native;
|
|
4811
|
+
const g = "content";
|
|
4812
|
+
s.info && !k(m.props, g) && (m.props[g] = (d = r.refRule) == null ? void 0 : d.__$info.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(Z([s, m]), [
|
|
4722
4813
|
this.$r({
|
|
4723
4814
|
type: "icon",
|
|
4724
|
-
props: { type: s.icon === !0 ?
|
|
4815
|
+
props: { type: s.icon === !0 ? De.infoIcon : s.icon, size: 16 },
|
|
4725
4816
|
style: "margin-top: -1px",
|
|
4726
4817
|
key: `${e}i`
|
|
4727
4818
|
})
|
|
4728
4819
|
]));
|
|
4729
4820
|
}
|
|
4730
|
-
const l =
|
|
4821
|
+
const l = Z([i, {
|
|
4731
4822
|
props: Ge(i),
|
|
4732
4823
|
key: `${e}tit`,
|
|
4733
4824
|
class: "fc-form-title",
|
|
@@ -4756,7 +4847,7 @@ const zi = {
|
|
|
4756
4847
|
},
|
|
4757
4848
|
makeFormBtn() {
|
|
4758
4849
|
let t = [];
|
|
4759
|
-
if (
|
|
4850
|
+
if (X(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), X(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
|
|
4760
4851
|
return;
|
|
4761
4852
|
const e = this.$r({
|
|
4762
4853
|
type: "formItem",
|
|
@@ -4771,7 +4862,7 @@ const zi = {
|
|
|
4771
4862
|
}, [e]);
|
|
4772
4863
|
},
|
|
4773
4864
|
makeResetBtn() {
|
|
4774
|
-
const t = b({}, this.options.resetBtn), e = t.innerText;
|
|
4865
|
+
const t = b({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
|
|
4775
4866
|
return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
|
|
4776
4867
|
type: "button",
|
|
4777
4868
|
props: t,
|
|
@@ -4787,7 +4878,7 @@ const zi = {
|
|
|
4787
4878
|
}, [e]);
|
|
4788
4879
|
},
|
|
4789
4880
|
makeSubmitBtn() {
|
|
4790
|
-
const t = b({}, this.options.submitBtn), e = t.innerText;
|
|
4881
|
+
const t = b({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
|
|
4791
4882
|
return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
|
|
4792
4883
|
type: "button",
|
|
4793
4884
|
props: t,
|
|
@@ -4803,13 +4894,13 @@ const zi = {
|
|
|
4803
4894
|
key: `${this.key}b1`
|
|
4804
4895
|
}, [e]);
|
|
4805
4896
|
}
|
|
4806
|
-
},
|
|
4807
|
-
function
|
|
4808
|
-
|
|
4897
|
+
}, ne = {}, Zi = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
|
|
4898
|
+
function Yi(t) {
|
|
4899
|
+
Zi.forEach((e) => {
|
|
4809
4900
|
t[e] = A(e);
|
|
4810
4901
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
4811
4902
|
}
|
|
4812
|
-
function
|
|
4903
|
+
function xi(t) {
|
|
4813
4904
|
const e = "upload", r = {
|
|
4814
4905
|
image: ["image", 0],
|
|
4815
4906
|
file: ["file", 0],
|
|
@@ -4818,19 +4909,19 @@ function Qi(t) {
|
|
|
4818
4909
|
};
|
|
4819
4910
|
Object.keys(r).reduce((i, s) => (i[s] = A(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
4820
4911
|
}
|
|
4821
|
-
function
|
|
4912
|
+
function en(t) {
|
|
4822
4913
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
4823
4914
|
Object.keys(r).reduce((i, s) => (i[s] = A(e, { type: r[s] }), i), t);
|
|
4824
4915
|
}
|
|
4825
|
-
function
|
|
4916
|
+
function tn(t) {
|
|
4826
4917
|
const e = "timePicker";
|
|
4827
4918
|
t.time = A(e, { type: "time" }), t.timeRange = A(e, { type: "timerange" });
|
|
4828
4919
|
}
|
|
4829
|
-
function
|
|
4920
|
+
function rn(t) {
|
|
4830
4921
|
const e = "select";
|
|
4831
4922
|
t.selectMultiple = A(e, { multiple: !0 }), t.selectOne = A(e, { multiple: !1 });
|
|
4832
4923
|
}
|
|
4833
|
-
function
|
|
4924
|
+
function nn(t) {
|
|
4834
4925
|
const e = "frame", r = {
|
|
4835
4926
|
frameInputs: ["input", 0],
|
|
4836
4927
|
frameFiles: ["file", 0],
|
|
@@ -4841,16 +4932,16 @@ function en(t) {
|
|
|
4841
4932
|
};
|
|
4842
4933
|
Object.keys(r).reduce((i, s) => (i[s] = A(e, (n) => n.props({ type: r[s][0], maxLength: r[s][1] })), i), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages;
|
|
4843
4934
|
}
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
function
|
|
4935
|
+
Yi(ne);
|
|
4936
|
+
xi(ne);
|
|
4937
|
+
en(ne);
|
|
4938
|
+
rn(ne);
|
|
4939
|
+
nn(ne);
|
|
4940
|
+
tn(ne);
|
|
4941
|
+
function wt(t, e) {
|
|
4851
4942
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
4852
4943
|
}
|
|
4853
|
-
function
|
|
4944
|
+
function sn(t, e) {
|
|
4854
4945
|
return {
|
|
4855
4946
|
formEl() {
|
|
4856
4947
|
return e.$manager.form();
|
|
@@ -4926,20 +5017,20 @@ function tn(t, e) {
|
|
|
4926
5017
|
}
|
|
4927
5018
|
},
|
|
4928
5019
|
submitBtnProps: (r = {}) => {
|
|
4929
|
-
let i =
|
|
5020
|
+
let i = wt(e.options.submitBtn, !0);
|
|
4930
5021
|
_(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
4931
5022
|
},
|
|
4932
5023
|
resetBtnProps: (r = {}) => {
|
|
4933
|
-
let i =
|
|
5024
|
+
let i = wt(e.options.resetBtn, !1);
|
|
4934
5025
|
_(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
4935
5026
|
},
|
|
4936
5027
|
submit(r, i) {
|
|
4937
5028
|
return new Promise((s, n) => {
|
|
4938
5029
|
t.validate().then(() => {
|
|
4939
5030
|
let o = t.formData();
|
|
4940
|
-
h.Function(r) &&
|
|
5031
|
+
h.Function(r) && O(() => r(o, t)), h.Function(e.options.onSubmit) && O(() => e.options.onSubmit(o, t)), e.vm.emit("submit", o, t), s(o);
|
|
4941
5032
|
}).catch((...o) => {
|
|
4942
|
-
h.Function(i) &&
|
|
5033
|
+
h.Function(i) && O(() => i(t, ...o)), n(...o);
|
|
4943
5034
|
});
|
|
4944
5035
|
});
|
|
4945
5036
|
}
|
|
@@ -4948,21 +5039,21 @@ function tn(t, e) {
|
|
|
4948
5039
|
const zt = {
|
|
4949
5040
|
name: "required",
|
|
4950
5041
|
load(t, e, r) {
|
|
4951
|
-
const i =
|
|
5042
|
+
const i = on(t.getValue());
|
|
4952
5043
|
if (i.required === !1)
|
|
4953
5044
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
4954
5045
|
else {
|
|
4955
5046
|
const s = b({
|
|
4956
5047
|
required: !0,
|
|
4957
|
-
validator(
|
|
4958
|
-
h.empty(
|
|
5048
|
+
validator(o, a, l) {
|
|
5049
|
+
h.empty(a) ? l(s.message) : l();
|
|
4959
5050
|
}
|
|
4960
|
-
}, i);
|
|
5051
|
+
}, i), n = e.__fc__.refRule.__$title.value;
|
|
4961
5052
|
if (!s.message)
|
|
4962
|
-
s.message =
|
|
5053
|
+
s.message = r.t("required", { title: n }) || n + (r.getLocale() === "en" ? " is required" : "不能为空");
|
|
4963
5054
|
else {
|
|
4964
|
-
const
|
|
4965
|
-
|
|
5055
|
+
const o = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
5056
|
+
o && (s.message = r.t(o[1], { title: n }));
|
|
4966
5057
|
}
|
|
4967
5058
|
t.getProp().validate = [s];
|
|
4968
5059
|
}
|
|
@@ -4972,25 +5063,25 @@ const zt = {
|
|
|
4972
5063
|
zt.load(...t);
|
|
4973
5064
|
}
|
|
4974
5065
|
};
|
|
4975
|
-
function
|
|
5066
|
+
function on(t) {
|
|
4976
5067
|
return h.Boolean(t) ? { required: t } : h.String(t) ? { message: t } : h.Undef(t) ? { required: !1 } : h.Function(t) ? { validator: t } : h.Object(t) ? t : {};
|
|
4977
5068
|
}
|
|
4978
|
-
function
|
|
4979
|
-
t.componentAlias(
|
|
5069
|
+
function an(t) {
|
|
5070
|
+
t.componentAlias(Wi), Nr.forEach((e) => {
|
|
4980
5071
|
t.component(e.name, e);
|
|
4981
|
-
}), t.register(zt),
|
|
5072
|
+
}), t.register(zt), Ji.forEach((e) => {
|
|
4982
5073
|
t.parser(e);
|
|
4983
|
-
}), Object.keys(
|
|
4984
|
-
t.maker[e] =
|
|
5074
|
+
}), Object.keys(ne).forEach((e) => {
|
|
5075
|
+
t.maker[e] = ne[e];
|
|
4985
5076
|
});
|
|
4986
5077
|
}
|
|
4987
|
-
function
|
|
5078
|
+
function ln() {
|
|
4988
5079
|
return Wt({
|
|
4989
5080
|
ui: "view-design",
|
|
4990
|
-
version: "2.7.
|
|
4991
|
-
manager:
|
|
4992
|
-
install:
|
|
4993
|
-
extendApi:
|
|
5081
|
+
version: "2.7.3",
|
|
5082
|
+
manager: Qi,
|
|
5083
|
+
install: an,
|
|
5084
|
+
extendApi: sn,
|
|
4994
5085
|
attrs: {
|
|
4995
5086
|
normal: ["col", "wrap"],
|
|
4996
5087
|
array: ["className"],
|
|
@@ -4998,10 +5089,10 @@ function sn() {
|
|
|
4998
5089
|
}
|
|
4999
5090
|
});
|
|
5000
5091
|
}
|
|
5001
|
-
const Qe =
|
|
5092
|
+
const Qe = ln();
|
|
5002
5093
|
typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
|
|
5003
|
-
const
|
|
5094
|
+
const cn = Qe.maker;
|
|
5004
5095
|
export {
|
|
5005
5096
|
Qe as default,
|
|
5006
|
-
|
|
5097
|
+
cn as maker
|
|
5007
5098
|
};
|