@form-create/element-ui 2.7.7 → 2.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-create.esm.js +869 -835
- package/dist/form-create.js +5 -3
- package/dist/form-create.min.js +5 -3
- package/package.json +11 -11
package/dist/form-create.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/element-ui v2.7.
|
|
3
|
+
* @form-create/element-ui v2.7.9
|
|
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-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;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 .el-upload{display:block}._fc-frame .fc-upload-btn,.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;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;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 .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;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;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 .el-form-item{margin-bottom:22px}.form-create{width:100%}.fc-form-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.fc-wrap-top.el-form-item>.el-form-item__content{margin-left:0!important}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
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 at = Object.getOwnPropertySymbols;
|
|
13
|
+
var or = Object.prototype.hasOwnProperty, ar = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var lt = (t, e, r) => e in t ? ir(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, v = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
|
|
16
|
+
or.call(e, r) && lt(t, r, e[r]);
|
|
17
|
+
if (at)
|
|
18
|
+
for (var r of at(e))
|
|
19
|
+
ar.call(e, r) && lt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
}, q = (t, e) =>
|
|
22
|
-
import
|
|
23
|
-
function
|
|
21
|
+
}, q = (t, e) => nr(t, sr(e));
|
|
22
|
+
import be, { getCurrentInstance as lr, provide as ur, inject as fr, toRefs as ut, reactive as ne, onBeforeMount as cr, watch as L, onMounted as hr, onBeforeUnmount as dr, onUpdated as pr, nextTick as P, markRaw as ye, computed as $e, toRef as Ve, 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
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function Je() {
|
|
27
|
+
return Je = Object.assign ? Object.assign.bind() : function(t) {
|
|
28
28
|
for (var e, r = 1; r < arguments.length; r++) for (var i in e = arguments[r], e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
|
|
29
29
|
return t;
|
|
30
|
-
},
|
|
30
|
+
}, Je.apply(this, arguments);
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var yr = ["attrs", "props", "domProps"], $r = ["class", "style", "directives"], br = ["on", "nativeOn"], vr = 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] = Je({}, 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 (br.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 = vr;
|
|
53
|
+
const I = /* @__PURE__ */ gr(Cr);
|
|
54
|
+
function Qe(t, e) {
|
|
55
55
|
return Object.keys(t).reduce((r, i) => (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,
|
|
@@ -101,7 +101,7 @@ const _r = "fcCheckbox", Cr = {
|
|
|
101
101
|
},
|
|
102
102
|
render() {
|
|
103
103
|
const t = arguments[0];
|
|
104
|
-
return t("ElCheckboxGroup",
|
|
104
|
+
return t("ElCheckboxGroup", I([{}, this.formCreateInject.prop, {}, {
|
|
105
105
|
props: {
|
|
106
106
|
value: this.trueValue
|
|
107
107
|
}
|
|
@@ -112,12 +112,12 @@ const _r = "fcCheckbox", Cr = {
|
|
|
112
112
|
}
|
|
113
113
|
}]), [this.options().map((e, r) => {
|
|
114
114
|
const i = v({}, e), s = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox";
|
|
115
|
-
return delete i.value, t(s,
|
|
115
|
+
return delete i.value, t(s, I([{}, {
|
|
116
116
|
props: i
|
|
117
117
|
}, {
|
|
118
118
|
key: s + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), Qe(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -126,8 +126,8 @@ const _r = "fcCheckbox", Cr = {
|
|
|
126
126
|
function H(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
name:
|
|
129
|
+
const Fr = "fcFrame", kr = {
|
|
130
|
+
name: Fr,
|
|
131
131
|
props: {
|
|
132
132
|
formCreateInject: {
|
|
133
133
|
type: Object,
|
|
@@ -285,7 +285,7 @@ const wr = "fcFrame", Fr = {
|
|
|
285
285
|
value: this.fileList.map((r) => this.getSrc(r)).toString(),
|
|
286
286
|
readonly: !0
|
|
287
287
|
};
|
|
288
|
-
return t("ElInput",
|
|
288
|
+
return t("ElInput", I([{}, {
|
|
289
289
|
props: e
|
|
290
290
|
}, {
|
|
291
291
|
key: this.key("input")
|
|
@@ -295,7 +295,7 @@ const wr = "fcFrame", Fr = {
|
|
|
295
295
|
on: {
|
|
296
296
|
click: () => this.fileList = []
|
|
297
297
|
}
|
|
298
|
-
}) : null, t("ElButton",
|
|
298
|
+
}) : null, t("ElButton", I([{
|
|
299
299
|
attrs: {
|
|
300
300
|
icon: this.icon
|
|
301
301
|
}
|
|
@@ -452,7 +452,7 @@ const wr = "fcFrame", Fr = {
|
|
|
452
452
|
this.$refs.frame && this.frameLoad(this.$refs.frame.contentWindow || {});
|
|
453
453
|
}), t("div", {
|
|
454
454
|
class: "_fc-frame"
|
|
455
|
-
}, [r, t("el-dialog",
|
|
455
|
+
}, [r, t("el-dialog", I([{}, {
|
|
456
456
|
props: {
|
|
457
457
|
appendToBody: !0,
|
|
458
458
|
modal: this.previewMask,
|
|
@@ -468,7 +468,7 @@ const wr = "fcFrame", Fr = {
|
|
|
468
468
|
attrs: {
|
|
469
469
|
src: this.previewImage
|
|
470
470
|
}
|
|
471
|
-
})]), t("el-dialog",
|
|
471
|
+
})]), t("el-dialog", I([{}, {
|
|
472
472
|
props: q(v({
|
|
473
473
|
width: i,
|
|
474
474
|
title: o,
|
|
@@ -496,8 +496,8 @@ const wr = "fcFrame", Fr = {
|
|
|
496
496
|
mounted() {
|
|
497
497
|
this.$on("fc.closeModal", this.closeModal);
|
|
498
498
|
}
|
|
499
|
-
},
|
|
500
|
-
name:
|
|
499
|
+
}, Er = "fcRadio", Sr = {
|
|
500
|
+
name: Er,
|
|
501
501
|
props: {
|
|
502
502
|
formCreateInject: {
|
|
503
503
|
type: Object,
|
|
@@ -539,7 +539,7 @@ const wr = "fcFrame", Fr = {
|
|
|
539
539
|
},
|
|
540
540
|
render() {
|
|
541
541
|
const t = arguments[0];
|
|
542
|
-
return t("ElRadioGroup",
|
|
542
|
+
return t("ElRadioGroup", I([{}, this.formCreateInject.prop, {
|
|
543
543
|
ref: "el"
|
|
544
544
|
}, {
|
|
545
545
|
props: {
|
|
@@ -551,12 +551,12 @@ const wr = "fcFrame", Fr = {
|
|
|
551
551
|
}
|
|
552
552
|
}]), [this.options().map((e, r) => {
|
|
553
553
|
const i = v({}, e), s = this.type === "button" ? "ElRadioButton" : "ElRadio";
|
|
554
|
-
return delete i.value, t(s,
|
|
554
|
+
return delete i.value, t(s, I([{}, {
|
|
555
555
|
props: i
|
|
556
556
|
}, {
|
|
557
557
|
key: s + r + "-" + e.value
|
|
558
558
|
}]));
|
|
559
|
-
}),
|
|
559
|
+
}), Qe(this.$slots)]);
|
|
560
560
|
},
|
|
561
561
|
mounted() {
|
|
562
562
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -594,8 +594,8 @@ const wr = "fcFrame", Fr = {
|
|
|
594
594
|
function D(t, e) {
|
|
595
595
|
return {}.hasOwnProperty.call(t, e);
|
|
596
596
|
}
|
|
597
|
-
const
|
|
598
|
-
name:
|
|
597
|
+
const Rr = "fcSelect", Dr = {
|
|
598
|
+
name: Rr,
|
|
599
599
|
functional: !0,
|
|
600
600
|
props: {
|
|
601
601
|
formCreateInject: {
|
|
@@ -606,7 +606,7 @@ const Er = "fcSelect", Sr = {
|
|
|
606
606
|
render(t, e) {
|
|
607
607
|
const r = (n, o) => {
|
|
608
608
|
const a = n.slot;
|
|
609
|
-
return t("ElOption",
|
|
609
|
+
return t("ElOption", I([{}, {
|
|
610
610
|
props: n
|
|
611
611
|
}, {
|
|
612
612
|
key: "" + o + "-" + n.value
|
|
@@ -619,15 +619,15 @@ const Er = "fcSelect", Sr = {
|
|
|
619
619
|
},
|
|
620
620
|
key: "" + o + "-" + n.label
|
|
621
621
|
}, [h.trueArray(n.options) && n.options.map((a, l) => r(a, l))]), s = e.props.formCreateInject.options;
|
|
622
|
-
return t("ElSelect",
|
|
622
|
+
return t("ElSelect", I([{}, e.data, {
|
|
623
623
|
ref: "el"
|
|
624
624
|
}]), [(Array.isArray(s) ? s : []).map((n, o) => D(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
|
|
625
625
|
},
|
|
626
626
|
mounted() {
|
|
627
627
|
this.$emit("fc.el", this.$refs.el);
|
|
628
628
|
}
|
|
629
|
-
},
|
|
630
|
-
name:
|
|
629
|
+
}, jr = "fcTree", Ar = {
|
|
630
|
+
name: jr,
|
|
631
631
|
formCreateParser: {
|
|
632
632
|
mergeProp(t) {
|
|
633
633
|
const e = t.prop.props;
|
|
@@ -671,37 +671,37 @@ const Er = "fcSelect", Sr = {
|
|
|
671
671
|
},
|
|
672
672
|
render() {
|
|
673
673
|
const t = arguments[0];
|
|
674
|
-
return t("ElTree",
|
|
674
|
+
return t("ElTree", I([{}, this.formCreateInject.prop, {
|
|
675
675
|
ref: "tree",
|
|
676
676
|
on: {
|
|
677
677
|
check: () => this.updateValue(),
|
|
678
678
|
"node-click": () => this.updateValue()
|
|
679
679
|
}
|
|
680
|
-
}]), [
|
|
680
|
+
}]), [Qe(this.$slots)]);
|
|
681
681
|
},
|
|
682
682
|
mounted() {
|
|
683
683
|
this.setValue(), this.$emit("fc.el", this.$refs.tree);
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
|
-
function
|
|
686
|
+
function ft(t, e) {
|
|
687
687
|
return typeof t == "object" ? t : {
|
|
688
688
|
url: t,
|
|
689
689
|
is_string: !0,
|
|
690
|
-
name:
|
|
690
|
+
name: Vr(t),
|
|
691
691
|
uid: e
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function ct(t) {
|
|
695
695
|
return q(v({}, t), {
|
|
696
696
|
file: t,
|
|
697
697
|
value: t
|
|
698
698
|
});
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function Vr(t) {
|
|
701
701
|
return ("" + t).split("/").pop();
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
name:
|
|
703
|
+
const Ir = "fcUpload", Pr = {
|
|
704
|
+
name: Ir,
|
|
705
705
|
props: {
|
|
706
706
|
formCreateInject: {
|
|
707
707
|
type: Object,
|
|
@@ -749,11 +749,11 @@ const Ar = "fcUpload", Vr = {
|
|
|
749
749
|
};
|
|
750
750
|
},
|
|
751
751
|
created() {
|
|
752
|
-
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(
|
|
752
|
+
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ft).map(ct);
|
|
753
753
|
},
|
|
754
754
|
watch: {
|
|
755
755
|
value(t) {
|
|
756
|
-
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(
|
|
756
|
+
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ft).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
|
|
757
757
|
},
|
|
758
758
|
limit(t, e) {
|
|
759
759
|
(e === 1 || t === 1) && this.update();
|
|
@@ -806,7 +806,7 @@ const Ar = "fcUpload", Vr = {
|
|
|
806
806
|
},
|
|
807
807
|
makeProgress(t, e) {
|
|
808
808
|
const r = this.$createElement;
|
|
809
|
-
return r("ElProgress",
|
|
809
|
+
return r("ElProgress", I([{}, {
|
|
810
810
|
props: {
|
|
811
811
|
percentage: t.percentage,
|
|
812
812
|
type: "circle",
|
|
@@ -852,7 +852,7 @@ const Ar = "fcUpload", Vr = {
|
|
|
852
852
|
},
|
|
853
853
|
makeUpload() {
|
|
854
854
|
const t = this.$createElement, e = !this.limit || this.limit > this.uploadList.length;
|
|
855
|
-
return t("ElUpload",
|
|
855
|
+
return t("ElUpload", I([{}, this.formCreateInject.prop, {}, {
|
|
856
856
|
props: {
|
|
857
857
|
listType: this.listType,
|
|
858
858
|
showFileList: this.listType !== "picture",
|
|
@@ -884,7 +884,7 @@ const Ar = "fcUpload", Vr = {
|
|
|
884
884
|
const t = arguments[0];
|
|
885
885
|
return this.$refs.upload && (this.formCreateInject.prop.props.fileList = this.$refs.upload.fileList), t("div", {
|
|
886
886
|
class: "_fc-upload"
|
|
887
|
-
}, [[this.makeFiles(), this.makeUpload()], t("el-dialog",
|
|
887
|
+
}, [[this.makeFiles(), this.makeUpload()], t("el-dialog", I([{}, {
|
|
888
888
|
props: {
|
|
889
889
|
appendToBody: !0,
|
|
890
890
|
modal: this.previewMask,
|
|
@@ -911,13 +911,13 @@ const Ar = "fcUpload", Vr = {
|
|
|
911
911
|
}), this.$emit("fc.el", this.$refs.upload);
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
|
-
function
|
|
915
|
-
|
|
914
|
+
function k(t, e, r) {
|
|
915
|
+
be.set(t, e, r);
|
|
916
916
|
}
|
|
917
917
|
function ie(t, e) {
|
|
918
|
-
(
|
|
918
|
+
(be.del || be.delete)(t, e);
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function we(t, e = {}, r) {
|
|
921
921
|
let i = !1;
|
|
922
922
|
for (let s in e)
|
|
923
923
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
@@ -925,39 +925,39 @@ function Ce(t, e = {}, r) {
|
|
|
925
925
|
if ((i = Array.isArray(n)) || h.Object(n)) {
|
|
926
926
|
let o = t[s] === void 0;
|
|
927
927
|
if (i)
|
|
928
|
-
i = !1, o &&
|
|
928
|
+
i = !1, o && k(t, s, []);
|
|
929
929
|
else if (n._clone && r !== void 0)
|
|
930
930
|
if (r)
|
|
931
|
-
n = n.getRule(), o &&
|
|
931
|
+
n = n.getRule(), o && k(t, s, {});
|
|
932
932
|
else {
|
|
933
|
-
|
|
933
|
+
k(t, s, n._clone());
|
|
934
934
|
continue;
|
|
935
935
|
}
|
|
936
936
|
else
|
|
937
|
-
o &&
|
|
938
|
-
t[s] =
|
|
937
|
+
o && k(t, s, {});
|
|
938
|
+
t[s] = we(t[s], n, r);
|
|
939
939
|
} else
|
|
940
|
-
|
|
940
|
+
k(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
941
941
|
}
|
|
942
942
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
943
943
|
}
|
|
944
944
|
function K(t) {
|
|
945
|
-
return
|
|
945
|
+
return we({}, { value: t }).value;
|
|
946
946
|
}
|
|
947
|
-
const
|
|
947
|
+
const Tr = Object.assign || function(t) {
|
|
948
948
|
for (let e, r = 1; r < arguments.length; r++)
|
|
949
949
|
for (let i in e = arguments[r], e)
|
|
950
|
-
Object.prototype.hasOwnProperty.call(e, i) &&
|
|
950
|
+
Object.prototype.hasOwnProperty.call(e, i) && k(t, i, e[i]);
|
|
951
951
|
return t;
|
|
952
952
|
};
|
|
953
953
|
function _() {
|
|
954
|
-
return
|
|
954
|
+
return Tr.apply(this, arguments);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Ke(t) {
|
|
957
957
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
|
|
958
958
|
}
|
|
959
|
-
const
|
|
960
|
-
name:
|
|
959
|
+
const Br = "fcGroup", Lr = {
|
|
960
|
+
name: Br,
|
|
961
961
|
props: {
|
|
962
962
|
field: String,
|
|
963
963
|
rule: [Array, Object],
|
|
@@ -1038,7 +1038,7 @@ const Pr = "fcGroup", Tr = {
|
|
|
1038
1038
|
const s = i.$f.formData();
|
|
1039
1039
|
if (t === e)
|
|
1040
1040
|
i.$f.deferSyncValue(() => {
|
|
1041
|
-
|
|
1041
|
+
we(i.rule, t), i.$f.setValue(s);
|
|
1042
1042
|
}, !0);
|
|
1043
1043
|
else {
|
|
1044
1044
|
const n = i.$f.formData();
|
|
@@ -1231,12 +1231,12 @@ const Pr = "fcGroup", Tr = {
|
|
|
1231
1231
|
return t("div", {
|
|
1232
1232
|
class: "_fc-group-container",
|
|
1233
1233
|
key: o
|
|
1234
|
-
}, [t(i,
|
|
1234
|
+
}, [t(i, I([{
|
|
1235
1235
|
key: o
|
|
1236
1236
|
}, {
|
|
1237
1237
|
on: {
|
|
1238
1238
|
"update:value": (d) => this.formData(o, d),
|
|
1239
|
-
"emit-event": (d, ...
|
|
1239
|
+
"emit-event": (d, ...p) => this.emitEvent(d, p, a, o),
|
|
1240
1240
|
input: (d) => this.add$f(a, o, d)
|
|
1241
1241
|
}
|
|
1242
1242
|
}, {}, {
|
|
@@ -1261,8 +1261,8 @@ const Pr = "fcGroup", Tr = {
|
|
|
1261
1261
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1262
1262
|
}, [n]);
|
|
1263
1263
|
}
|
|
1264
|
-
},
|
|
1265
|
-
name:
|
|
1264
|
+
}, Nr = "fcSubForm", Mr = {
|
|
1265
|
+
name: Nr,
|
|
1266
1266
|
props: {
|
|
1267
1267
|
rule: Array,
|
|
1268
1268
|
options: Object,
|
|
@@ -1330,7 +1330,7 @@ const Pr = "fcGroup", Tr = {
|
|
|
1330
1330
|
rule: e,
|
|
1331
1331
|
options: r
|
|
1332
1332
|
} = this.cacheRule, i = this.type;
|
|
1333
|
-
return t(i,
|
|
1333
|
+
return t(i, I([{}, {
|
|
1334
1334
|
on: {
|
|
1335
1335
|
"update:value": this.formData,
|
|
1336
1336
|
"emit-event": this.emitEvent,
|
|
@@ -1345,15 +1345,15 @@ const Pr = "fcGroup", Tr = {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
}]));
|
|
1347
1347
|
}
|
|
1348
|
-
},
|
|
1349
|
-
|
|
1350
|
-
Fr,
|
|
1348
|
+
}, qr = [
|
|
1349
|
+
Or,
|
|
1351
1350
|
kr,
|
|
1352
1351
|
Sr,
|
|
1353
1352
|
Dr,
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
Lr
|
|
1353
|
+
Ar,
|
|
1354
|
+
Pr,
|
|
1355
|
+
Lr,
|
|
1356
|
+
Mr
|
|
1357
1357
|
];
|
|
1358
1358
|
function se(t, e) {
|
|
1359
1359
|
var r = null;
|
|
@@ -1361,12 +1361,12 @@ function se(t, e) {
|
|
|
1361
1361
|
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1362
1362
|
};
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function ve(t) {
|
|
1365
1365
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1366
1366
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
const i = [...
|
|
1368
|
+
const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], St = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
|
|
1369
|
+
const i = [...kt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...St, ...r.functional || []], o = r.props || [];
|
|
1370
1370
|
return t.reduce((a, l) => {
|
|
1371
1371
|
for (const u in l)
|
|
1372
1372
|
if (a[u])
|
|
@@ -1380,59 +1380,59 @@ const Ot = ["attrs", "props", "domProps", "scopedSlots"], kt = ["class", "style"
|
|
|
1380
1380
|
} else if (n.indexOf(u) > -1)
|
|
1381
1381
|
for (const f in l[u])
|
|
1382
1382
|
if (a[u][f]) {
|
|
1383
|
-
const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]],
|
|
1384
|
-
a[u][f] = [...d, ...
|
|
1383
|
+
const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], p = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
|
|
1384
|
+
a[u][f] = [...d, ...p];
|
|
1385
1385
|
} else
|
|
1386
1386
|
a[u][f] = l[u][f];
|
|
1387
1387
|
else if (u === "hook")
|
|
1388
1388
|
for (let f in l[u])
|
|
1389
|
-
a[u][f] ? a[u][f] =
|
|
1389
|
+
a[u][f] ? a[u][f] = Ur(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1390
1390
|
else
|
|
1391
1391
|
a[u] = l[u];
|
|
1392
1392
|
else
|
|
1393
1393
|
i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = v({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? v({}, l[u]) : l[u] : a[u] = l[u];
|
|
1394
1394
|
return a;
|
|
1395
1395
|
}, e);
|
|
1396
|
-
},
|
|
1396
|
+
}, Ur = (t, e) => function() {
|
|
1397
1397
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1398
|
-
},
|
|
1399
|
-
function
|
|
1400
|
-
return [...
|
|
1398
|
+
}, Rt = ["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"], Ye = ["validate", "children", "control"], et = ["effect", "deep", "renderSlots"];
|
|
1399
|
+
function Dt() {
|
|
1400
|
+
return [...Rt, ...kt, ...Et, ...St, ...Ye, ...et];
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function jt(t, e, r) {
|
|
1403
1403
|
return `[form-create ${t}]: ${e}`;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
console.error(
|
|
1405
|
+
function tt(t, e) {
|
|
1406
|
+
console.error(jt("err", t));
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
|
|
1408
|
+
function Hr(t) {
|
|
1409
|
+
tt(t.toString()), console.error(t);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function At(t) {
|
|
1412
1412
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1413
1413
|
}
|
|
1414
|
-
const
|
|
1415
|
-
function
|
|
1416
|
-
return JSON.stringify(
|
|
1414
|
+
const We = "[[FORM-CREATE-PREFIX-", ze = "-FORM-CREATE-SUFFIX]]";
|
|
1415
|
+
function Ce(t, e) {
|
|
1416
|
+
return JSON.stringify(we(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1417
1417
|
if (!(i && i._isVue === !0)) {
|
|
1418
1418
|
if (typeof i != "function")
|
|
1419
1419
|
return i;
|
|
1420
1420
|
if (i.__json)
|
|
1421
1421
|
return i.__json;
|
|
1422
1422
|
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1423
|
-
return
|
|
1423
|
+
return We + i + ze;
|
|
1424
1424
|
}
|
|
1425
1425
|
}, e);
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function Le(t) {
|
|
1428
1428
|
return new Function("return " + t)();
|
|
1429
1429
|
}
|
|
1430
1430
|
function x(t, e) {
|
|
1431
1431
|
if (t && h.String(t) && t.length > 4) {
|
|
1432
1432
|
let r = t.trim(), i = !1;
|
|
1433
1433
|
try {
|
|
1434
|
-
if (r.indexOf(
|
|
1435
|
-
r = r.replace(
|
|
1434
|
+
if (r.indexOf(ze) > 0 && r.indexOf(We) === 0)
|
|
1435
|
+
r = r.replace(ze, "").replace(We, ""), i = !0;
|
|
1436
1436
|
else if (r.indexOf("$FN:") === 0)
|
|
1437
1437
|
r = r.substring(4), i = !0;
|
|
1438
1438
|
else if (r.indexOf("$EXEC:") === 0)
|
|
@@ -1446,19 +1446,21 @@ function x(t, e) {
|
|
|
1446
1446
|
}, r.__json = t, r.__inject = !0, r;
|
|
1447
1447
|
} else {
|
|
1448
1448
|
if (r.indexOf("$FNX:") === 0)
|
|
1449
|
-
return r =
|
|
1449
|
+
return r = Le(`function($inject){
|
|
1450
|
+
` + r.substring(5) + `
|
|
1451
|
+
}`), r.__json = t, r.__inject = !0, r;
|
|
1450
1452
|
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1451
1453
|
}
|
|
1452
1454
|
if (!i) return t;
|
|
1453
1455
|
let s;
|
|
1454
1456
|
try {
|
|
1455
|
-
s =
|
|
1457
|
+
s = Le(r);
|
|
1456
1458
|
} catch (n) {
|
|
1457
|
-
s =
|
|
1459
|
+
s = Le("function " + r);
|
|
1458
1460
|
}
|
|
1459
1461
|
return s.__json = t, s;
|
|
1460
1462
|
} catch (s) {
|
|
1461
|
-
|
|
1463
|
+
tt(`解析失败:${r}
|
|
1462
1464
|
|
|
1463
1465
|
err: ${s}`);
|
|
1464
1466
|
return;
|
|
@@ -1466,23 +1468,23 @@ err: ${s}`);
|
|
|
1466
1468
|
}
|
|
1467
1469
|
return t;
|
|
1468
1470
|
}
|
|
1469
|
-
function
|
|
1471
|
+
function Vt(t, e) {
|
|
1470
1472
|
return JSON.parse(t, function(r, i) {
|
|
1471
1473
|
return h.Undef(i) || !i.indexOf ? i : x(i, e);
|
|
1472
1474
|
});
|
|
1473
1475
|
}
|
|
1474
|
-
let
|
|
1475
|
-
function
|
|
1476
|
-
const t = 370 + ++
|
|
1476
|
+
let Gr = 0;
|
|
1477
|
+
function Ie() {
|
|
1478
|
+
const t = 370 + ++Gr;
|
|
1477
1479
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1478
1480
|
}
|
|
1479
1481
|
function oe(t, e, r) {
|
|
1480
1482
|
let i = t, s;
|
|
1481
1483
|
return (e || "").split(".").forEach((n) => {
|
|
1482
|
-
s && ((!i[s] || typeof i[s] != "object") &&
|
|
1483
|
-
}),
|
|
1484
|
+
s && ((!i[s] || typeof i[s] != "object") && k(i, s, {}), i = i[s]), s = n;
|
|
1485
|
+
}), k(i, s, r), i;
|
|
1484
1486
|
}
|
|
1485
|
-
function
|
|
1487
|
+
function xe(t, e) {
|
|
1486
1488
|
return {
|
|
1487
1489
|
value: t,
|
|
1488
1490
|
enumerable: !1,
|
|
@@ -1490,25 +1492,25 @@ function ze(t, e) {
|
|
|
1490
1492
|
writable: !!e
|
|
1491
1493
|
};
|
|
1492
1494
|
}
|
|
1493
|
-
function Vt(t, e) {
|
|
1494
|
-
return It([t], e || !1)[0];
|
|
1495
|
-
}
|
|
1496
1495
|
function It(t, e) {
|
|
1497
|
-
return
|
|
1496
|
+
return Pt([t], e || !1)[0];
|
|
1497
|
+
}
|
|
1498
|
+
function Pt(t, e) {
|
|
1499
|
+
return we([], [...t], e || !1);
|
|
1498
1500
|
}
|
|
1499
1501
|
function te(t, e) {
|
|
1500
|
-
return ee(Array.isArray(e) ? e : [e], t, { array:
|
|
1502
|
+
return ee(Array.isArray(e) ? e : [e], t, { array: Ye, normal: et }), t;
|
|
1501
1503
|
}
|
|
1502
|
-
function
|
|
1504
|
+
function ht(t) {
|
|
1503
1505
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1504
1506
|
return e.type || (e.type = "input"), e;
|
|
1505
1507
|
}
|
|
1506
|
-
function
|
|
1508
|
+
function Jr(t, e) {
|
|
1507
1509
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1508
1510
|
e[r] && (t[r] = te(t[r] || {}, e[r]));
|
|
1509
1511
|
}), t) : e;
|
|
1510
1512
|
}
|
|
1511
|
-
function
|
|
1513
|
+
function Tt(t, e) {
|
|
1512
1514
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1513
1515
|
get() {
|
|
1514
1516
|
return e[i]();
|
|
@@ -1518,32 +1520,32 @@ function Pt(t, e) {
|
|
|
1518
1520
|
function Y(t) {
|
|
1519
1521
|
return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
|
|
1520
1522
|
}
|
|
1521
|
-
function
|
|
1523
|
+
function O(t, e) {
|
|
1522
1524
|
try {
|
|
1523
1525
|
e = t();
|
|
1524
1526
|
} catch (r) {
|
|
1525
|
-
|
|
1527
|
+
Hr(r);
|
|
1526
1528
|
}
|
|
1527
1529
|
return e;
|
|
1528
1530
|
}
|
|
1529
|
-
function
|
|
1531
|
+
function Xe(t, e) {
|
|
1530
1532
|
let r = null;
|
|
1531
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1533
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1532
1534
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1533
1535
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1534
1536
|
});
|
|
1535
1537
|
}), r;
|
|
1536
1538
|
}
|
|
1537
|
-
function
|
|
1539
|
+
function Kr(t, e) {
|
|
1538
1540
|
if (h.Object(t)) {
|
|
1539
1541
|
const r = {};
|
|
1540
1542
|
return Object.keys(t).forEach((i) => {
|
|
1541
|
-
r[i] =
|
|
1543
|
+
r[i] = Xe(t[i], i);
|
|
1542
1544
|
}), r;
|
|
1543
1545
|
} else
|
|
1544
|
-
return
|
|
1546
|
+
return Xe(t, e);
|
|
1545
1547
|
}
|
|
1546
|
-
function
|
|
1548
|
+
function Ee() {
|
|
1547
1549
|
const t = {}, e = (r) => r || "default";
|
|
1548
1550
|
return {
|
|
1549
1551
|
setSlot(r, i) {
|
|
@@ -1559,7 +1561,7 @@ function ke() {
|
|
|
1559
1561
|
const n = s();
|
|
1560
1562
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1561
1563
|
} else h.Undef(s) || i.push(s);
|
|
1562
|
-
}),
|
|
1564
|
+
}), Kr(i, r);
|
|
1563
1565
|
},
|
|
1564
1566
|
getSlots() {
|
|
1565
1567
|
let r = [];
|
|
@@ -1579,27 +1581,27 @@ function ke() {
|
|
|
1579
1581
|
}
|
|
1580
1582
|
};
|
|
1581
1583
|
}
|
|
1582
|
-
function
|
|
1584
|
+
function Se(t, e) {
|
|
1583
1585
|
return Object.setPrototypeOf(t, e), t;
|
|
1584
1586
|
}
|
|
1585
|
-
const
|
|
1586
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1587
|
-
"!=": (t, e) => !
|
|
1587
|
+
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
|
|
1588
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
|
|
1589
|
+
"!=": (t, e) => !ce["=="](t, e),
|
|
1588
1590
|
">": (t, e) => t > e,
|
|
1589
1591
|
">=": (t, e) => t >= e,
|
|
1590
1592
|
"<": (t, e) => t < e,
|
|
1591
1593
|
"<=": (t, e) => t <= e,
|
|
1592
1594
|
on(t, e) {
|
|
1593
|
-
return t && t.indexOf && t.indexOf(
|
|
1595
|
+
return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
|
|
1594
1596
|
},
|
|
1595
1597
|
notOn(t, e) {
|
|
1596
|
-
return !
|
|
1598
|
+
return !ce.on(t, e);
|
|
1597
1599
|
},
|
|
1598
1600
|
in(t, e) {
|
|
1599
1601
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1600
1602
|
},
|
|
1601
1603
|
notIn(t, e) {
|
|
1602
|
-
return !
|
|
1604
|
+
return !ce.in(t, e);
|
|
1603
1605
|
},
|
|
1604
1606
|
between(t, e) {
|
|
1605
1607
|
return t > e[0] && t < e[1];
|
|
@@ -1622,7 +1624,7 @@ function B(t, e) {
|
|
|
1622
1624
|
t != null && (t = t[r]);
|
|
1623
1625
|
}), t;
|
|
1624
1626
|
}
|
|
1625
|
-
function
|
|
1627
|
+
function Wr(t) {
|
|
1626
1628
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1627
1629
|
let r;
|
|
1628
1630
|
const i = {};
|
|
@@ -1630,21 +1632,33 @@ function Jr(t) {
|
|
|
1630
1632
|
r[1] && (i[r[1]] = !0);
|
|
1631
1633
|
return Object.keys(i);
|
|
1632
1634
|
}
|
|
1633
|
-
function
|
|
1635
|
+
function pt(t) {
|
|
1634
1636
|
let e = t.split("."), r = [], i = "";
|
|
1635
1637
|
return e.forEach((s, n) => {
|
|
1636
1638
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1637
1639
|
}), r.join(" && ");
|
|
1638
1640
|
}
|
|
1639
|
-
|
|
1641
|
+
function Bt(t) {
|
|
1642
|
+
const e = [];
|
|
1643
|
+
let r = "", i = 0;
|
|
1644
|
+
for (let s = 0; s < t.length; s++) {
|
|
1645
|
+
const n = t[s];
|
|
1646
|
+
n === "[" ? (i === 0 && r && (e.push({ type: "key", value: r }), r = ""), i++, r += n) : n === "]" ? (i--, r += n, i === 0 && (e.push({
|
|
1647
|
+
type: "bracket",
|
|
1648
|
+
value: Bt(r.slice(1, -1))
|
|
1649
|
+
}), r = "")) : n === "." && i === 0 ? r && (e.push({ type: "key", value: r }), r = "") : r += n;
|
|
1650
|
+
}
|
|
1651
|
+
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
1652
|
+
}
|
|
1653
|
+
const je = (t, e) => {
|
|
1640
1654
|
if (!(!t || t === e || !t.$props)) {
|
|
1641
1655
|
if (t.$props.formCreateInject)
|
|
1642
1656
|
return t.$props.formCreateInject;
|
|
1643
1657
|
if (t.$parent)
|
|
1644
|
-
return
|
|
1658
|
+
return je(t.$parent, e);
|
|
1645
1659
|
}
|
|
1646
1660
|
};
|
|
1647
|
-
function
|
|
1661
|
+
function zr(t, e, r) {
|
|
1648
1662
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1649
1663
|
return {
|
|
1650
1664
|
name: i,
|
|
@@ -1695,102 +1709,102 @@ function Kr(t, e, r) {
|
|
|
1695
1709
|
return this.fc.render();
|
|
1696
1710
|
},
|
|
1697
1711
|
setup(s) {
|
|
1698
|
-
const n =
|
|
1699
|
-
|
|
1700
|
-
const o =
|
|
1712
|
+
const n = lr().proxy;
|
|
1713
|
+
ur("parentFC", n);
|
|
1714
|
+
const o = fr("parentFC", null);
|
|
1701
1715
|
let a = o;
|
|
1702
1716
|
if (o)
|
|
1703
1717
|
for (; a.parent; )
|
|
1704
1718
|
a = a.parent;
|
|
1705
1719
|
else
|
|
1706
1720
|
a = n;
|
|
1707
|
-
const { rule: l, value: u, subForm: f, inFor: d } =
|
|
1721
|
+
const { rule: l, value: u, subForm: f, inFor: d } = ut(s), p = ne({
|
|
1708
1722
|
ctxInject: {},
|
|
1709
1723
|
destroyed: !1,
|
|
1710
1724
|
isShow: !0,
|
|
1711
1725
|
unique: 1,
|
|
1712
1726
|
renderRule: [...l.value || []],
|
|
1713
1727
|
updateValue: JSON.stringify(u.value || {})
|
|
1714
|
-
}),
|
|
1728
|
+
}), y = new t(n), g = y.api(), w = d.value, F = () => {
|
|
1715
1729
|
if (o) {
|
|
1716
|
-
const
|
|
1717
|
-
if (
|
|
1718
|
-
let
|
|
1719
|
-
w ? (
|
|
1730
|
+
const E = je(n, o);
|
|
1731
|
+
if (E) {
|
|
1732
|
+
let R;
|
|
1733
|
+
w ? (R = H(E.getSubForm()), R.push(g)) : R = g, E.subForm(R);
|
|
1720
1734
|
}
|
|
1721
1735
|
}
|
|
1722
1736
|
}, G = () => {
|
|
1723
|
-
const
|
|
1724
|
-
if (
|
|
1737
|
+
const E = je(n, o);
|
|
1738
|
+
if (E)
|
|
1725
1739
|
if (w) {
|
|
1726
|
-
const
|
|
1727
|
-
|
|
1740
|
+
const R = H(E.getSubForm()), M = R.indexOf(g);
|
|
1741
|
+
M > -1 && R.splice(M, 1);
|
|
1728
1742
|
} else
|
|
1729
|
-
|
|
1743
|
+
E.subForm();
|
|
1730
1744
|
};
|
|
1731
|
-
let
|
|
1732
|
-
|
|
1745
|
+
let V = null;
|
|
1746
|
+
cr(() => {
|
|
1733
1747
|
L(() => {
|
|
1734
|
-
let
|
|
1735
|
-
const
|
|
1736
|
-
Object.keys(
|
|
1737
|
-
let
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
}),
|
|
1741
|
-
}), s.option && s.option.style && (
|
|
1748
|
+
let E = "";
|
|
1749
|
+
const R = s.option && s.option.globalClass || {};
|
|
1750
|
+
Object.keys(R).forEach((M) => {
|
|
1751
|
+
let me = "";
|
|
1752
|
+
R[M].style && Object.keys(R[M].style).forEach((W) => {
|
|
1753
|
+
me += ve(W) + ":" + R[M].style[W] + ";";
|
|
1754
|
+
}), R[M].content && (me += R[M].content + ";"), me && (E += `.${M}{${me}}`);
|
|
1755
|
+
}), s.option && s.option.style && (E += s.option.style), V || (V = document.createElement("style"), V.type = "text/css", document.head.appendChild(V)), V.innerHTML = E || "";
|
|
1742
1756
|
}, () => {
|
|
1743
1757
|
});
|
|
1744
1758
|
});
|
|
1745
|
-
const
|
|
1746
|
-
|
|
1747
|
-
}, 100),
|
|
1748
|
-
|
|
1749
|
-
}, 100),
|
|
1750
|
-
|
|
1751
|
-
}, 100),
|
|
1752
|
-
|
|
1759
|
+
const N = se(() => {
|
|
1760
|
+
y.bus.$emit("$loadData.$topForm");
|
|
1761
|
+
}, 100), de = se(function() {
|
|
1762
|
+
y.bus.$emit("$loadData.$scopeForm");
|
|
1763
|
+
}, 100), Pe = se(() => {
|
|
1764
|
+
y.bus.$emit("$loadData.$form");
|
|
1765
|
+
}, 100), pe = (E) => {
|
|
1766
|
+
y.bus.$emit("change-$form." + E);
|
|
1753
1767
|
};
|
|
1754
|
-
return
|
|
1755
|
-
o && (
|
|
1756
|
-
}),
|
|
1757
|
-
o && (
|
|
1758
|
-
}),
|
|
1759
|
-
|
|
1760
|
-
}), L(f, (
|
|
1761
|
-
|
|
1768
|
+
return hr(() => {
|
|
1769
|
+
o && (g.top.bus.$on("$loadData.$form", N), g.top.bus.$on("change", pe)), g !== g.scope && g.scope.bus.$on("$loadData.$scopeForm", de), y.mounted();
|
|
1770
|
+
}), dr(() => {
|
|
1771
|
+
o && (g.top.bus.$off("$loadData.$form", N), g.top.bus.$off("change", pe)), g !== g.scope && g.scope.bus.$off("$loadData.$scopeForm", de), G(), p.destroyed = !0, y.unmount(), V && (V.parentNode || V.parentElement) && document.head.removeChild(V);
|
|
1772
|
+
}), pr(() => {
|
|
1773
|
+
y.updated();
|
|
1774
|
+
}), L(f, (E) => {
|
|
1775
|
+
E ? F() : G();
|
|
1762
1776
|
}, { immediate: !0 }), L(() => s.option, () => {
|
|
1763
|
-
|
|
1764
|
-
}, { deep: !0 }), L(() => [...l.value], (
|
|
1765
|
-
|
|
1777
|
+
y.initOptions(), g.refresh();
|
|
1778
|
+
}, { deep: !0 }), L(() => [...l.value], (E) => {
|
|
1779
|
+
y.$handle.isBreakWatch() || E.length === p.renderRule.length && E.every((R) => p.renderRule.indexOf(R) > -1) || (y.$handle.updateAppendData(), y.$handle.reloadRule(l.value), n.renderRule());
|
|
1766
1780
|
}), L(() => [s.disabled, s.preview], () => {
|
|
1767
|
-
|
|
1768
|
-
}), L(u, (
|
|
1769
|
-
|
|
1781
|
+
g.refresh();
|
|
1782
|
+
}), L(u, (E) => {
|
|
1783
|
+
Ce(E || {}) !== p.updateValue && (g.config.forceCoverValue ? g.coverValue(E || {}) : g.setValue(E || {}));
|
|
1770
1784
|
}, { deep: !0, flush: "post" }), L(() => s.index, () => {
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1785
|
+
g.coverValue({}), y.$handle.updateAppendData(), P(() => {
|
|
1786
|
+
P(() => {
|
|
1787
|
+
g.clearValidateState();
|
|
1774
1788
|
});
|
|
1775
1789
|
});
|
|
1776
1790
|
}, { flush: "sync" }), q(v({
|
|
1777
|
-
fc:
|
|
1778
|
-
parent: o &&
|
|
1779
|
-
top:
|
|
1780
|
-
fapi:
|
|
1781
|
-
},
|
|
1782
|
-
getGroupInject: () =>
|
|
1791
|
+
fc: ye(y),
|
|
1792
|
+
parent: o && ye(o),
|
|
1793
|
+
top: ye(a),
|
|
1794
|
+
fapi: ye(g)
|
|
1795
|
+
}, ut(p)), {
|
|
1796
|
+
getGroupInject: () => je(n, o),
|
|
1783
1797
|
refresh() {
|
|
1784
|
-
++
|
|
1798
|
+
++p.unique;
|
|
1785
1799
|
},
|
|
1786
1800
|
renderRule() {
|
|
1787
|
-
|
|
1801
|
+
p.renderRule = [...l.value || []];
|
|
1788
1802
|
},
|
|
1789
|
-
updateValue(
|
|
1790
|
-
if (
|
|
1791
|
-
const
|
|
1792
|
-
|
|
1793
|
-
|
|
1803
|
+
updateValue(E) {
|
|
1804
|
+
if (p.destroyed) return;
|
|
1805
|
+
const R = Ce(E);
|
|
1806
|
+
p.updateValue !== R && (p.updateValue = R, n.$emit("update:value", E), P(() => {
|
|
1807
|
+
Pe(), o ? f.value || de() : (N(), de());
|
|
1794
1808
|
}));
|
|
1795
1809
|
}
|
|
1796
1810
|
});
|
|
@@ -1800,7 +1814,7 @@ function Kr(t, e, r) {
|
|
|
1800
1814
|
}
|
|
1801
1815
|
};
|
|
1802
1816
|
}
|
|
1803
|
-
function
|
|
1817
|
+
function Lt() {
|
|
1804
1818
|
return {
|
|
1805
1819
|
props: {},
|
|
1806
1820
|
on: {},
|
|
@@ -1812,57 +1826,57 @@ function Tt() {
|
|
|
1812
1826
|
value: void 0
|
|
1813
1827
|
};
|
|
1814
1828
|
}
|
|
1815
|
-
function
|
|
1829
|
+
function T(t, e) {
|
|
1816
1830
|
return (r, i, s, n = {}) => {
|
|
1817
|
-
const o = new
|
|
1831
|
+
const o = new rt(t, r, i, s, n);
|
|
1818
1832
|
return e && (h.Function(e) ? e(o) : o.props(e)), o;
|
|
1819
1833
|
};
|
|
1820
1834
|
}
|
|
1821
|
-
function
|
|
1822
|
-
this._data = _(
|
|
1835
|
+
function rt(t, e, r, i, s) {
|
|
1836
|
+
this._data = _(Lt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1823
1837
|
}
|
|
1824
|
-
_(
|
|
1838
|
+
_(rt.prototype, {
|
|
1825
1839
|
getRule() {
|
|
1826
1840
|
return this._data;
|
|
1827
1841
|
},
|
|
1828
1842
|
setProp(t, e) {
|
|
1829
|
-
return
|
|
1843
|
+
return k(this._data, t, e), this;
|
|
1830
1844
|
},
|
|
1831
1845
|
_clone() {
|
|
1832
1846
|
const t = new this.constructor();
|
|
1833
|
-
return t._data =
|
|
1847
|
+
return t._data = It(this._data), t;
|
|
1834
1848
|
}
|
|
1835
1849
|
});
|
|
1836
|
-
function
|
|
1850
|
+
function Nt(t) {
|
|
1837
1851
|
t.forEach((e) => {
|
|
1838
|
-
|
|
1852
|
+
rt.prototype[e] = function(r) {
|
|
1839
1853
|
return te(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1840
1854
|
};
|
|
1841
1855
|
});
|
|
1842
1856
|
}
|
|
1843
|
-
|
|
1844
|
-
const
|
|
1845
|
-
function
|
|
1846
|
-
let i =
|
|
1857
|
+
Nt(Dt());
|
|
1858
|
+
const Mt = T("");
|
|
1859
|
+
function xr(t, e, r) {
|
|
1860
|
+
let i = Mt("", e);
|
|
1847
1861
|
return i._data.type = t, i._data.title = r, i;
|
|
1848
1862
|
}
|
|
1849
|
-
function
|
|
1850
|
-
let s =
|
|
1863
|
+
function mt(t, e, r, i) {
|
|
1864
|
+
let s = Mt("", r);
|
|
1851
1865
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1852
1866
|
}
|
|
1853
|
-
function
|
|
1867
|
+
function Xr() {
|
|
1854
1868
|
return {
|
|
1855
|
-
create:
|
|
1856
|
-
createTmp:
|
|
1857
|
-
template:
|
|
1858
|
-
factory:
|
|
1869
|
+
create: xr,
|
|
1870
|
+
createTmp: mt,
|
|
1871
|
+
template: mt,
|
|
1872
|
+
factory: T
|
|
1859
1873
|
};
|
|
1860
1874
|
}
|
|
1861
|
-
function
|
|
1875
|
+
function Zr(t, e, r) {
|
|
1862
1876
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1863
1877
|
return s.status = r.status, s.url = t, s;
|
|
1864
1878
|
}
|
|
1865
|
-
function
|
|
1879
|
+
function gt(t) {
|
|
1866
1880
|
const e = t.responseText || t.response;
|
|
1867
1881
|
if (!e)
|
|
1868
1882
|
return e;
|
|
@@ -1872,7 +1886,7 @@ function mt(t) {
|
|
|
1872
1886
|
return e;
|
|
1873
1887
|
}
|
|
1874
1888
|
}
|
|
1875
|
-
function
|
|
1889
|
+
function qt(t) {
|
|
1876
1890
|
if (typeof XMLHttpRequest == "undefined")
|
|
1877
1891
|
return;
|
|
1878
1892
|
const e = new XMLHttpRequest();
|
|
@@ -1887,8 +1901,8 @@ function Mt(t) {
|
|
|
1887
1901
|
t.onError(o);
|
|
1888
1902
|
}, e.onload = function() {
|
|
1889
1903
|
if (e.status < 200 || e.status >= 300)
|
|
1890
|
-
return t.onError(
|
|
1891
|
-
t.onSuccess(
|
|
1904
|
+
return t.onError(Zr(r, t, e), gt(e));
|
|
1905
|
+
t.onSuccess(gt(e));
|
|
1892
1906
|
}, e.open(t.method || "get", r, !0);
|
|
1893
1907
|
let i;
|
|
1894
1908
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
@@ -1899,9 +1913,9 @@ function Mt(t) {
|
|
|
1899
1913
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1900
1914
|
}), e.send(i);
|
|
1901
1915
|
}
|
|
1902
|
-
function
|
|
1916
|
+
function yt(t, e, r) {
|
|
1903
1917
|
return new Promise((i, s) => {
|
|
1904
|
-
(e ||
|
|
1918
|
+
(e || qt)(q(v({}, t), {
|
|
1905
1919
|
onSuccess(n) {
|
|
1906
1920
|
let o = (l) => l;
|
|
1907
1921
|
const a = x(t.parse);
|
|
@@ -1913,10 +1927,10 @@ function gt(t, e, r) {
|
|
|
1913
1927
|
}));
|
|
1914
1928
|
});
|
|
1915
1929
|
}
|
|
1916
|
-
function
|
|
1930
|
+
function _e(t) {
|
|
1917
1931
|
return K(t);
|
|
1918
1932
|
}
|
|
1919
|
-
function
|
|
1933
|
+
function Qr(t) {
|
|
1920
1934
|
function e(n) {
|
|
1921
1935
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1922
1936
|
}
|
|
@@ -1924,7 +1938,7 @@ function Xr(t) {
|
|
|
1924
1938
|
h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
|
|
1925
1939
|
const u = t.fieldCtx[l] || t.nameCtx[l];
|
|
1926
1940
|
u && u.forEach((f) => {
|
|
1927
|
-
|
|
1941
|
+
k(f.rule, o, a), t.$render.clearCache(f);
|
|
1928
1942
|
});
|
|
1929
1943
|
});
|
|
1930
1944
|
}
|
|
@@ -2000,14 +2014,14 @@ function Xr(t) {
|
|
|
2000
2014
|
if (n == null || typeof n == "boolean") {
|
|
2001
2015
|
const o = {};
|
|
2002
2016
|
return Object.keys(t.form).forEach((a) => {
|
|
2003
|
-
(n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] =
|
|
2017
|
+
(n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = _e(t.form[a]));
|
|
2004
2018
|
}), o;
|
|
2005
2019
|
} else
|
|
2006
2020
|
return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
|
|
2007
2021
|
},
|
|
2008
2022
|
getValue(n) {
|
|
2009
2023
|
const o = t.getFieldCtx(n);
|
|
2010
|
-
return o ?
|
|
2024
|
+
return o ? _e(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? _e(t.appendData[n]) : void 0;
|
|
2011
2025
|
},
|
|
2012
2026
|
coverValue(n) {
|
|
2013
2027
|
const o = v({}, n || {});
|
|
@@ -2017,7 +2031,7 @@ function Xr(t) {
|
|
|
2017
2031
|
if (l) {
|
|
2018
2032
|
const u = D(n, a);
|
|
2019
2033
|
l.forEach((f) => {
|
|
2020
|
-
f.rule
|
|
2034
|
+
k(f.rule, "value", u ? n[a] : void 0);
|
|
2021
2035
|
}), delete o[a];
|
|
2022
2036
|
}
|
|
2023
2037
|
}), _(t.appendData, o);
|
|
@@ -2030,7 +2044,7 @@ function Xr(t) {
|
|
|
2030
2044
|
const l = t.fieldCtx[a];
|
|
2031
2045
|
if (!l) return t.appendData[a] = o[a];
|
|
2032
2046
|
l.forEach((u) => {
|
|
2033
|
-
u.rule
|
|
2047
|
+
k(u.rule, "value", o[a]);
|
|
2034
2048
|
});
|
|
2035
2049
|
});
|
|
2036
2050
|
}, !0);
|
|
@@ -2094,7 +2108,7 @@ function Xr(t) {
|
|
|
2094
2108
|
disabled(n, o) {
|
|
2095
2109
|
e(o).forEach((a) => {
|
|
2096
2110
|
t.getCtxs(a).forEach((l) => {
|
|
2097
|
-
|
|
2111
|
+
k(l.rule.props, "disabled", !!n);
|
|
2098
2112
|
});
|
|
2099
2113
|
}), t.refresh();
|
|
2100
2114
|
},
|
|
@@ -2152,7 +2166,7 @@ function Xr(t) {
|
|
|
2152
2166
|
t.$manager.updateOptions(t.options), s.refresh();
|
|
2153
2167
|
},
|
|
2154
2168
|
hideForm: (n) => {
|
|
2155
|
-
|
|
2169
|
+
k(t.vm, "isShow", !n);
|
|
2156
2170
|
},
|
|
2157
2171
|
changeStatus: () => t.changeStatus,
|
|
2158
2172
|
clearChangeStatus: () => {
|
|
@@ -2197,7 +2211,7 @@ function Xr(t) {
|
|
|
2197
2211
|
},
|
|
2198
2212
|
setEffect(n, o, a) {
|
|
2199
2213
|
const l = t.getCtx(n);
|
|
2200
|
-
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) &&
|
|
2214
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) && k(l.rule, "$" + o, a), D(l.rule, "effect") || k(l.rule, "effect", {}), k(l.rule.effect, o, a));
|
|
2201
2215
|
},
|
|
2202
2216
|
clearEffectData(n, o) {
|
|
2203
2217
|
const a = t.getCtx(n);
|
|
@@ -2217,27 +2231,27 @@ function Xr(t) {
|
|
|
2217
2231
|
resetFields(n) {
|
|
2218
2232
|
e(n).forEach((o) => {
|
|
2219
2233
|
t.getCtxs(o).forEach((a) => {
|
|
2220
|
-
t.$render.clearCache(a), a.rule.value =
|
|
2234
|
+
t.$render.clearCache(a), a.rule.value = _e(a.defaultValue);
|
|
2221
2235
|
});
|
|
2222
|
-
}),
|
|
2223
|
-
|
|
2224
|
-
|
|
2236
|
+
}), P(() => {
|
|
2237
|
+
P(() => {
|
|
2238
|
+
P(() => {
|
|
2225
2239
|
s.clearValidateState(n);
|
|
2226
2240
|
});
|
|
2227
2241
|
});
|
|
2228
|
-
}), n == null && (h.Function(t.options.onReset) &&
|
|
2242
|
+
}), n == null && (h.Function(t.options.onReset) && O(() => t.options.onReset(s)), t.vm.$emit("reset", s));
|
|
2229
2243
|
},
|
|
2230
2244
|
method(n, o) {
|
|
2231
2245
|
const a = s.el(n);
|
|
2232
2246
|
if (!a || !a[o])
|
|
2233
|
-
throw new Error(
|
|
2247
|
+
throw new Error(jt("err", `${o} 方法不存在`));
|
|
2234
2248
|
return (...l) => a[o](...l);
|
|
2235
2249
|
},
|
|
2236
2250
|
exec(n, o, ...a) {
|
|
2237
|
-
return
|
|
2251
|
+
return O(() => s.method(n, o)(...a));
|
|
2238
2252
|
},
|
|
2239
2253
|
toJson(n) {
|
|
2240
|
-
return
|
|
2254
|
+
return Ce(s.rule, n);
|
|
2241
2255
|
},
|
|
2242
2256
|
trigger(n, o, ...a) {
|
|
2243
2257
|
const l = s.el(n);
|
|
@@ -2261,8 +2275,8 @@ function Xr(t) {
|
|
|
2261
2275
|
return [];
|
|
2262
2276
|
const u = [];
|
|
2263
2277
|
return ((d) => {
|
|
2264
|
-
d && d.forEach((
|
|
2265
|
-
typeof
|
|
2278
|
+
d && d.forEach((p) => {
|
|
2279
|
+
typeof p == "object" && (p.field && u.push(p), u.push(...s.getChildrenRuleList(p)));
|
|
2266
2280
|
});
|
|
2267
2281
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2268
2282
|
},
|
|
@@ -2278,13 +2292,13 @@ function Xr(t) {
|
|
|
2278
2292
|
}
|
|
2279
2293
|
},
|
|
2280
2294
|
getChildrenFormData(n, o) {
|
|
2281
|
-
return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] =
|
|
2295
|
+
return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = _e(u.value)), l), {});
|
|
2282
2296
|
},
|
|
2283
2297
|
setChildrenFormData(n, o, a) {
|
|
2284
2298
|
const l = s.getChildrenRuleList(n);
|
|
2285
2299
|
t.deferSyncValue(() => {
|
|
2286
2300
|
l.forEach((u) => {
|
|
2287
|
-
D(o, u.field) ? u
|
|
2301
|
+
D(o, u.field) ? k(u, "value", o[u.field]) : a && k(u, "value", void 0);
|
|
2288
2302
|
});
|
|
2289
2303
|
});
|
|
2290
2304
|
},
|
|
@@ -2296,9 +2310,9 @@ function Xr(t) {
|
|
|
2296
2310
|
getGlobalData(n) {
|
|
2297
2311
|
return new Promise((o, a) => {
|
|
2298
2312
|
let l = s.options.globalData[n];
|
|
2299
|
-
l
|
|
2313
|
+
l ? l.type === "fetch" ? s.fetch(l).then((u) => {
|
|
2300
2314
|
o(u);
|
|
2301
|
-
}).catch(a) : o(l.data);
|
|
2315
|
+
}).catch(a) : o(l.data) : o(t.fc.loadData[n]);
|
|
2302
2316
|
});
|
|
2303
2317
|
},
|
|
2304
2318
|
renderRule(n, o, a) {
|
|
@@ -2313,7 +2327,7 @@ function Xr(t) {
|
|
|
2313
2327
|
t.bus.$once("next-tick", n), t.refresh();
|
|
2314
2328
|
},
|
|
2315
2329
|
nextRefresh(n) {
|
|
2316
|
-
t.nextRefresh(), n &&
|
|
2330
|
+
t.nextRefresh(), n && O(n);
|
|
2317
2331
|
},
|
|
2318
2332
|
emit(n, ...o) {
|
|
2319
2333
|
t.vm.$emit(n, ...o);
|
|
@@ -2324,10 +2338,10 @@ function Xr(t) {
|
|
|
2324
2338
|
bus: t.bus,
|
|
2325
2339
|
fetch(n) {
|
|
2326
2340
|
return new Promise((o, a) => {
|
|
2327
|
-
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2328
|
-
|
|
2341
|
+
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((l) => {
|
|
2342
|
+
O(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2329
2343
|
}).catch((l) => {
|
|
2330
|
-
|
|
2344
|
+
O(() => n.onError && n.onError(l)), a(l);
|
|
2331
2345
|
})).catch((l) => {
|
|
2332
2346
|
});
|
|
2333
2347
|
});
|
|
@@ -2335,11 +2349,11 @@ function Xr(t) {
|
|
|
2335
2349
|
watchFetch(n, o, a, l) {
|
|
2336
2350
|
return t.fc.watchLoadData((u, f) => {
|
|
2337
2351
|
let d = K(n);
|
|
2338
|
-
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() =>
|
|
2339
|
-
|
|
2340
|
-
}).catch((
|
|
2341
|
-
|
|
2342
|
-
})).catch((
|
|
2352
|
+
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => yt(d, t.fc.create.fetch, s).then((p) => {
|
|
2353
|
+
O(() => d.onSuccess && d.onSuccess(p)), o && o(p, f);
|
|
2354
|
+
}).catch((p) => {
|
|
2355
|
+
O(() => d.onError && d.onError(p)), a && a(p);
|
|
2356
|
+
})).catch((p) => {
|
|
2343
2357
|
});
|
|
2344
2358
|
}, n.wait == null ? 1e3 : n.wait);
|
|
2345
2359
|
},
|
|
@@ -2369,7 +2383,7 @@ function Xr(t) {
|
|
|
2369
2383
|
};
|
|
2370
2384
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2371
2385
|
}
|
|
2372
|
-
function
|
|
2386
|
+
function Yr(t) {
|
|
2373
2387
|
_(t.prototype, {
|
|
2374
2388
|
initCache() {
|
|
2375
2389
|
this.clearCacheAll();
|
|
@@ -2405,12 +2419,12 @@ function J(t) {
|
|
|
2405
2419
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2406
2420
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2407
2421
|
});
|
|
2408
|
-
return
|
|
2422
|
+
return Ut(e);
|
|
2409
2423
|
}
|
|
2410
|
-
function
|
|
2424
|
+
function Ut(t) {
|
|
2411
2425
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2412
2426
|
}
|
|
2413
|
-
function
|
|
2427
|
+
function ei(t) {
|
|
2414
2428
|
_(t.prototype, {
|
|
2415
2429
|
initRender() {
|
|
2416
2430
|
this.cacheConfig = {};
|
|
@@ -2419,7 +2433,7 @@ function Qr(t) {
|
|
|
2419
2433
|
const r = (i) => {
|
|
2420
2434
|
if (i) {
|
|
2421
2435
|
let s;
|
|
2422
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2436
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + ve(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + ve(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2423
2437
|
}
|
|
2424
2438
|
};
|
|
2425
2439
|
return r(this.vm);
|
|
@@ -2428,7 +2442,7 @@ function Qr(t) {
|
|
|
2428
2442
|
if (!this.vm.isShow)
|
|
2429
2443
|
return;
|
|
2430
2444
|
this.$manager.beforeRender();
|
|
2431
|
-
const e =
|
|
2445
|
+
const e = Ee();
|
|
2432
2446
|
return this.sort.forEach((r) => {
|
|
2433
2447
|
this.renderSlot(e, this.$handle.ctxs[r]);
|
|
2434
2448
|
}), this.$manager.render(e);
|
|
@@ -2439,7 +2453,7 @@ function Qr(t) {
|
|
|
2439
2453
|
})) : e.setSlot(r.rule.slot, this.renderCtx(r, i));
|
|
2440
2454
|
},
|
|
2441
2455
|
mergeGlobal(e) {
|
|
2442
|
-
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] =
|
|
2456
|
+
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = $e(() => {
|
|
2443
2457
|
const i = this.$handle.options.global;
|
|
2444
2458
|
return te({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2445
2459
|
})), e.prop = te({}, [this.cacheConfig[e.trueType].value, e.prop]));
|
|
@@ -2489,23 +2503,23 @@ function Qr(t) {
|
|
|
2489
2503
|
model: n.model || {},
|
|
2490
2504
|
slotValue: l
|
|
2491
2505
|
};
|
|
2492
|
-
l.length && i.slotUpdate &&
|
|
2506
|
+
l.length && i.slotUpdate && O(() => i.slotUpdate(u));
|
|
2493
2507
|
let f = [];
|
|
2494
2508
|
const d = e.loadChildrenPending();
|
|
2495
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((
|
|
2509
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((g) => {
|
|
2496
2510
|
f.push(this.renderRule({
|
|
2497
2511
|
type: "template",
|
|
2498
|
-
slot:
|
|
2512
|
+
slot: g
|
|
2499
2513
|
}, (() => {
|
|
2500
|
-
if (h.Function(n.renderSlots[
|
|
2501
|
-
return
|
|
2502
|
-
const w = this.parseSide(n.renderSlots[
|
|
2514
|
+
if (h.Function(n.renderSlots[g]))
|
|
2515
|
+
return O(() => n.renderSlots[g]());
|
|
2516
|
+
const w = this.parseSide(n.renderSlots[g], e);
|
|
2503
2517
|
return this.renderRule(w);
|
|
2504
2518
|
})()));
|
|
2505
2519
|
});
|
|
2506
|
-
const
|
|
2507
|
-
let
|
|
2508
|
-
return
|
|
2520
|
+
const p = this.getTypeSlot(e);
|
|
2521
|
+
let y;
|
|
2522
|
+
return p ? (u.children = f, y = p(u)) : y = a ? e.parser.preview(Ke(f), e) : e.parser.render(Ke(f), e), y = this.renderSides(y, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), y = this.$manager.makeWrap(e, y)), e.none && (Array.isArray(y) ? y = y.map((g) => !g || !g.tag ? g : this.none(g)) : y = this.none(y)), o && this.setCache(e, () => this.stable(y), r), y;
|
|
2509
2523
|
}, this.setCache(e, s, r);
|
|
2510
2524
|
}
|
|
2511
2525
|
return (...s) => {
|
|
@@ -2586,7 +2600,7 @@ function Qr(t) {
|
|
|
2586
2600
|
if (l.indexOf("native.") === 0)
|
|
2587
2601
|
o[l.replace("native.", "")] = n[l], delete n[l];
|
|
2588
2602
|
else if (this.$handle.options.transformEventName !== !1) {
|
|
2589
|
-
const u =
|
|
2603
|
+
const u = ve(l);
|
|
2590
2604
|
u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
|
|
2591
2605
|
}
|
|
2592
2606
|
}), e.prop.on = n;
|
|
@@ -2642,7 +2656,7 @@ function Qr(t) {
|
|
|
2642
2656
|
},
|
|
2643
2657
|
renderChildren(e, r, i) {
|
|
2644
2658
|
if (!h.trueArray(e)) return [];
|
|
2645
|
-
const s =
|
|
2659
|
+
const s = Ee();
|
|
2646
2660
|
return e.map((n) => {
|
|
2647
2661
|
if (n) {
|
|
2648
2662
|
if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
|
|
@@ -2651,7 +2665,7 @@ function Qr(t) {
|
|
|
2651
2665
|
}) : n);
|
|
2652
2666
|
if (n.__fc__)
|
|
2653
2667
|
return this.renderSlot(s, n.__fc__, r);
|
|
2654
|
-
n.type &&
|
|
2668
|
+
n.type && P(() => {
|
|
2655
2669
|
this.$handle.loadChildren(e, r), this.$handle.refresh();
|
|
2656
2670
|
});
|
|
2657
2671
|
}
|
|
@@ -2659,7 +2673,7 @@ function Qr(t) {
|
|
|
2659
2673
|
},
|
|
2660
2674
|
defaultRender(e, r) {
|
|
2661
2675
|
const i = e.prop;
|
|
2662
|
-
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(
|
|
2676
|
+
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(Ut(i.type), i, r);
|
|
2663
2677
|
},
|
|
2664
2678
|
createChildrenVnodes(e, r, i) {
|
|
2665
2679
|
this.force = i !== !1, this.tmpInput = r;
|
|
@@ -2668,7 +2682,7 @@ function Qr(t) {
|
|
|
2668
2682
|
},
|
|
2669
2683
|
createRuleVnode(e, r, i) {
|
|
2670
2684
|
this.force = i !== !1, this.tmpInput = r;
|
|
2671
|
-
const s =
|
|
2685
|
+
const s = Ee();
|
|
2672
2686
|
return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
|
|
2673
2687
|
},
|
|
2674
2688
|
renderRule(e, r, i) {
|
|
@@ -2683,7 +2697,7 @@ function Qr(t) {
|
|
|
2683
2697
|
a && (s = J(a));
|
|
2684
2698
|
}
|
|
2685
2699
|
if (!s) return;
|
|
2686
|
-
const n =
|
|
2700
|
+
const n = Ee();
|
|
2687
2701
|
h.trueArray(e.children) && e.children.forEach((a) => {
|
|
2688
2702
|
a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2689
2703
|
});
|
|
@@ -2692,8 +2706,8 @@ function Qr(t) {
|
|
|
2692
2706
|
}
|
|
2693
2707
|
});
|
|
2694
2708
|
}
|
|
2695
|
-
let
|
|
2696
|
-
function
|
|
2709
|
+
let ti = 1;
|
|
2710
|
+
function it(t) {
|
|
2697
2711
|
_(this, {
|
|
2698
2712
|
$handle: t,
|
|
2699
2713
|
fc: t.fc,
|
|
@@ -2702,8 +2716,8 @@ function rt(t) {
|
|
|
2702
2716
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2703
2717
|
force: !1,
|
|
2704
2718
|
tmpInput: null,
|
|
2705
|
-
id:
|
|
2706
|
-
}),
|
|
2719
|
+
id: ti++
|
|
2720
|
+
}), Tt(this, {
|
|
2707
2721
|
options() {
|
|
2708
2722
|
return t.options;
|
|
2709
2723
|
},
|
|
@@ -2712,9 +2726,9 @@ function rt(t) {
|
|
|
2712
2726
|
}
|
|
2713
2727
|
}), this.initCache(), this.initRender();
|
|
2714
2728
|
}
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
function
|
|
2729
|
+
Yr(it);
|
|
2730
|
+
ei(it);
|
|
2731
|
+
function ri(t) {
|
|
2718
2732
|
_(t.prototype, {
|
|
2719
2733
|
parseInjectEvent(e, r) {
|
|
2720
2734
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2741,17 +2755,17 @@ function ei(t) {
|
|
|
2741
2755
|
let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
|
|
2742
2756
|
return h.trueArray(u) && u.forEach((f) => {
|
|
2743
2757
|
if (!f) return;
|
|
2744
|
-
let d,
|
|
2745
|
-
if (h.Object(f) && (d = f.inject, f = f.name,
|
|
2746
|
-
r || (
|
|
2747
|
-
const
|
|
2748
|
-
this.vm.$emit(
|
|
2758
|
+
let d, p = n || o || a;
|
|
2759
|
+
if (h.Object(f) && (d = f.inject, f = f.name, p = f.prefix || p), p) {
|
|
2760
|
+
r || (p = `native-${p}`);
|
|
2761
|
+
const y = ve(`${p}-${f}`), g = (...w) => {
|
|
2762
|
+
this.vm.$emit(y, ...w), this.vm.$emit("emit-event", y, ...w), this.bus.$emit(y, ...w);
|
|
2749
2763
|
};
|
|
2750
|
-
if (
|
|
2751
|
-
i[f] =
|
|
2764
|
+
if (g.__emit = !0, !d && l === !1)
|
|
2765
|
+
i[f] = g;
|
|
2752
2766
|
else {
|
|
2753
2767
|
let w = d || l || this.options.injectEvent;
|
|
2754
|
-
i[f] = h.Undef(w) ?
|
|
2768
|
+
i[f] = h.Undef(w) ? g : this.inject(s, g, w);
|
|
2755
2769
|
}
|
|
2756
2770
|
}
|
|
2757
2771
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2781,24 +2795,36 @@ function ei(t) {
|
|
|
2781
2795
|
},
|
|
2782
2796
|
loadStrVar(e, r, i) {
|
|
2783
2797
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2784
|
-
const s = e, n =
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2798
|
+
const s = e, n = Wr(e), o = (u) => {
|
|
2799
|
+
let f = !1, d;
|
|
2800
|
+
if (i && u.indexOf("$form.") === 0) {
|
|
2801
|
+
const p = u.split(".");
|
|
2802
|
+
p.shift(), D(i.value, p[0]) && (f = !0, d = r ? r({
|
|
2803
|
+
id: "$form." + p[0] + "_" + i.rule.__fc__.id,
|
|
2804
|
+
getValue: () => B(i.value, p)
|
|
2805
|
+
}) : B(i.value, p));
|
|
2806
|
+
}
|
|
2807
|
+
return f || (d = r ? r(u) : this.fc.getLoadData(u)), d;
|
|
2808
|
+
}, a = (u) => {
|
|
2809
|
+
const f = [];
|
|
2810
|
+
u.forEach((p) => {
|
|
2811
|
+
p.key ? f.push(p.key) : p.children && f.push(a(p.children));
|
|
2812
|
+
});
|
|
2813
|
+
let d = !1;
|
|
2814
|
+
return f.forEach((p, y) => {
|
|
2815
|
+
p != null && (p.indexOf("'") === 0 || p.indexOf('"') === 0) && (f[y] = p.slice(1, -1), d = !0);
|
|
2816
|
+
}), f.length === 1 && (d || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
|
|
2817
|
+
};
|
|
2818
|
+
let l;
|
|
2819
|
+
if (n.forEach((u) => {
|
|
2820
|
+
const f = u.split("||"), d = f[0].trim();
|
|
2821
|
+
if (d) {
|
|
2822
|
+
const p = (f[1] || "").trim(), y = Bt(d);
|
|
2823
|
+
let g = O(() => a(y));
|
|
2824
|
+
(g == null || g === "") && f.length > 1 && (g = p), l = g, e = e.replaceAll(`{{${u}}}`, g == null ? "" : g);
|
|
2799
2825
|
}
|
|
2800
2826
|
}), n.length === 1 && s === `{{${n[0]}}}`)
|
|
2801
|
-
return
|
|
2827
|
+
return l;
|
|
2802
2828
|
}
|
|
2803
2829
|
return e;
|
|
2804
2830
|
},
|
|
@@ -2817,13 +2843,13 @@ function ei(t) {
|
|
|
2817
2843
|
}
|
|
2818
2844
|
});
|
|
2819
2845
|
}
|
|
2820
|
-
const
|
|
2821
|
-
function
|
|
2846
|
+
const $t = ["hook:updated", "hook:mounted"];
|
|
2847
|
+
function ii(t) {
|
|
2822
2848
|
_(t.prototype, {
|
|
2823
2849
|
usePage() {
|
|
2824
2850
|
const e = this.options.page;
|
|
2825
2851
|
if (!e) return;
|
|
2826
|
-
let r = 25, i =
|
|
2852
|
+
let r = 25, i = ni(this.rules);
|
|
2827
2853
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), _(this, {
|
|
2828
2854
|
first: r,
|
|
2829
2855
|
limit: i,
|
|
@@ -2832,16 +2858,16 @@ function ti(t) {
|
|
|
2832
2858
|
},
|
|
2833
2859
|
pageLoad() {
|
|
2834
2860
|
const e = () => {
|
|
2835
|
-
this.pageEnd ? (this.vm.$off(
|
|
2861
|
+
this.pageEnd ? (this.vm.$off($t, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2836
2862
|
};
|
|
2837
|
-
this.vm.$on(
|
|
2863
|
+
this.vm.$on($t, e);
|
|
2838
2864
|
}
|
|
2839
2865
|
});
|
|
2840
2866
|
}
|
|
2841
|
-
function
|
|
2867
|
+
function ni(t) {
|
|
2842
2868
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2843
2869
|
}
|
|
2844
|
-
function
|
|
2870
|
+
function si(t) {
|
|
2845
2871
|
_(t.prototype, {
|
|
2846
2872
|
clearNextTick() {
|
|
2847
2873
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2856,15 +2882,15 @@ function ii(t) {
|
|
|
2856
2882
|
}
|
|
2857
2883
|
});
|
|
2858
2884
|
}
|
|
2859
|
-
function
|
|
2885
|
+
function oi(t) {
|
|
2860
2886
|
Object.defineProperties(t.origin, {
|
|
2861
|
-
__fc__:
|
|
2887
|
+
__fc__: xe(ye(t), !0)
|
|
2862
2888
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2863
|
-
__fc__:
|
|
2889
|
+
__fc__: xe(ye(t), !0)
|
|
2864
2890
|
});
|
|
2865
2891
|
}
|
|
2866
|
-
function
|
|
2867
|
-
const i =
|
|
2892
|
+
function Ht(t, e, r) {
|
|
2893
|
+
const i = Ie(), s = !!e.field;
|
|
2868
2894
|
_(this, {
|
|
2869
2895
|
id: i,
|
|
2870
2896
|
ref: i,
|
|
@@ -2891,9 +2917,9 @@ function qt(t, e, r) {
|
|
|
2891
2917
|
exportEl: void 0,
|
|
2892
2918
|
defaultValue: s ? K(r) : void 0,
|
|
2893
2919
|
field: e.field || void 0
|
|
2894
|
-
}), this.updateKey(),
|
|
2920
|
+
}), this.updateKey(), oi(this), this.update(t, !0);
|
|
2895
2921
|
}
|
|
2896
|
-
_(
|
|
2922
|
+
_(Ht.prototype, {
|
|
2897
2923
|
getParentGroup() {
|
|
2898
2924
|
let t = this.parent;
|
|
2899
2925
|
for (; t; ) {
|
|
@@ -2926,7 +2952,7 @@ _(qt.prototype, {
|
|
|
2926
2952
|
delete this.pending[e];
|
|
2927
2953
|
let a = r;
|
|
2928
2954
|
if (h.Function(r)) {
|
|
2929
|
-
let l =
|
|
2955
|
+
let l = O(() => r({
|
|
2930
2956
|
rule: this.rule,
|
|
2931
2957
|
api: this.$api,
|
|
2932
2958
|
update: (u) => {
|
|
@@ -2963,7 +2989,7 @@ _(qt.prototype, {
|
|
|
2963
2989
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2964
2990
|
},
|
|
2965
2991
|
updateKey(t) {
|
|
2966
|
-
this.key =
|
|
2992
|
+
this.key = Ie(), t && this.parent && this.parent.updateKey(t);
|
|
2967
2993
|
},
|
|
2968
2994
|
updateType() {
|
|
2969
2995
|
this.originType = this.rule.type, this.type = J(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -2979,6 +3005,9 @@ _(qt.prototype, {
|
|
|
2979
3005
|
initNone() {
|
|
2980
3006
|
this.none = !(h.Undef(this.prop.display) || this.prop.display);
|
|
2981
3007
|
},
|
|
3008
|
+
hasHidden() {
|
|
3009
|
+
return !!this.rule.hidden || (this.parent ? this.parent.hasHidden() : !1);
|
|
3010
|
+
},
|
|
2982
3011
|
injectValidate() {
|
|
2983
3012
|
return this.prop.validate;
|
|
2984
3013
|
},
|
|
@@ -3040,19 +3069,19 @@ _(qt.prototype, {
|
|
|
3040
3069
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3041
3070
|
}
|
|
3042
3071
|
});
|
|
3043
|
-
function
|
|
3072
|
+
function ai(t) {
|
|
3044
3073
|
_(t.prototype, {
|
|
3045
3074
|
nextRefresh(e) {
|
|
3046
3075
|
const r = this.loadedId;
|
|
3047
|
-
|
|
3076
|
+
P(() => {
|
|
3048
3077
|
r === this.loadedId && (e ? e() : this.refresh());
|
|
3049
3078
|
});
|
|
3050
3079
|
},
|
|
3051
3080
|
parseRule(e) {
|
|
3052
|
-
const r =
|
|
3081
|
+
const r = ht(e);
|
|
3053
3082
|
return Object.defineProperties(r, {
|
|
3054
|
-
__origin__:
|
|
3055
|
-
}),
|
|
3083
|
+
__origin__: xe(e, !0)
|
|
3084
|
+
}), li(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3056
3085
|
i && this.loadFn(i, r);
|
|
3057
3086
|
}), this.loadCtrl(r), r.update && (r.update = x(r.update)), r;
|
|
3058
3087
|
},
|
|
@@ -3099,32 +3128,32 @@ function si(t) {
|
|
|
3099
3128
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3100
3129
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3101
3130
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3102
|
-
let l =
|
|
3131
|
+
let l = ht(o);
|
|
3103
3132
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3104
3133
|
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);
|
|
3105
|
-
let f, d = !1,
|
|
3106
|
-
if (
|
|
3107
|
-
if (f = o.__fc__,
|
|
3108
|
-
if (
|
|
3134
|
+
let f, d = !1, p = !!o.__fc__, y = l.value;
|
|
3135
|
+
if (p) {
|
|
3136
|
+
if (f = o.__fc__, y = f.defaultValue, f.deleted) {
|
|
3137
|
+
if (bt(f))
|
|
3109
3138
|
return;
|
|
3110
3139
|
f.update(this);
|
|
3111
3140
|
} else if (!f.check(this)) {
|
|
3112
|
-
if (
|
|
3141
|
+
if (bt(f))
|
|
3113
3142
|
return;
|
|
3114
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3143
|
+
e[a] = o = o._clone ? o._clone() : Vt(Ce(o)), f = null, d = !0;
|
|
3115
3144
|
}
|
|
3116
3145
|
}
|
|
3117
3146
|
if (f)
|
|
3118
3147
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3119
3148
|
else {
|
|
3120
|
-
const
|
|
3121
|
-
f = new
|
|
3149
|
+
const F = this.parseRule(o);
|
|
3150
|
+
f = new Ht(this, F, y), this.bindParser(f);
|
|
3122
3151
|
}
|
|
3123
|
-
[!1, !0].forEach((
|
|
3124
|
-
const
|
|
3125
|
-
if (f.parser.loadChildren === !1 || s(
|
|
3126
|
-
const
|
|
3127
|
-
|
|
3152
|
+
[!1, !0].forEach((F) => this.parseEmit(f, F)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !p && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3153
|
+
const g = f.loadChildrenPending();
|
|
3154
|
+
if (f.parser.loadChildren === !1 || s(g, f), !r) {
|
|
3155
|
+
const F = i(a);
|
|
3156
|
+
F > -1 || !a ? this.sort.splice(F + 1, 0, f.id) : this.sort.push(f.id);
|
|
3128
3157
|
}
|
|
3129
3158
|
const w = f.rule;
|
|
3130
3159
|
return f.updated || (f.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
|
|
@@ -3137,16 +3166,16 @@ function si(t) {
|
|
|
3137
3166
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3138
3167
|
},
|
|
3139
3168
|
useCtrl(e) {
|
|
3140
|
-
const r =
|
|
3169
|
+
const r = ui(e), i = [], s = this.api;
|
|
3141
3170
|
if (!r.length) return !1;
|
|
3142
3171
|
for (let a = 0; a < r.length; a++) {
|
|
3143
3172
|
const l = r[a], u = l.handle || function(d) {
|
|
3144
|
-
return (
|
|
3173
|
+
return (ce[l.condition || "=="] || ce["=="])(d, l.value);
|
|
3145
3174
|
};
|
|
3146
3175
|
if (!h.trueArray(l.rule)) continue;
|
|
3147
3176
|
const f = q(v({}, l), {
|
|
3148
|
-
valid:
|
|
3149
|
-
ctrl:
|
|
3177
|
+
valid: O(() => u(e.rule.value, s)),
|
|
3178
|
+
ctrl: fi(e, l.rule),
|
|
3150
3179
|
isHidden: h.String(l.rule[0])
|
|
3151
3180
|
});
|
|
3152
3181
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3155,16 +3184,16 @@ function si(t) {
|
|
|
3155
3184
|
const n = [];
|
|
3156
3185
|
let o = !1;
|
|
3157
3186
|
return this.deferSyncValue(() => {
|
|
3158
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child:
|
|
3187
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: p, ctrl: y, method: g }) => {
|
|
3159
3188
|
if (a) {
|
|
3160
3189
|
l ? e.ctrlRule.push({
|
|
3161
3190
|
__ctrl: !0,
|
|
3162
3191
|
children: u,
|
|
3163
3192
|
valid: l
|
|
3164
|
-
}) :
|
|
3165
|
-
|
|
3193
|
+
}) : y && e.ctrlRule.splice(e.ctrlRule.indexOf(y) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3194
|
+
g === "disabled" || g === "enabled" ? this.api.disabled(!l, u) : g === "display" || g === "show" ? this.api.display(l, u) : g === "required" ? (u.forEach((w) => {
|
|
3166
3195
|
this.api.setEffect(w, "required", l);
|
|
3167
|
-
}), l || this.api.clearValidateState(u)) :
|
|
3196
|
+
}), l || this.api.clearValidateState(u)) : g === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3168
3197
|
});
|
|
3169
3198
|
return;
|
|
3170
3199
|
}
|
|
@@ -3177,17 +3206,17 @@ function si(t) {
|
|
|
3177
3206
|
children: u
|
|
3178
3207
|
};
|
|
3179
3208
|
e.ctrlRule.push(w), this.bus.$once("load-start", () => {
|
|
3180
|
-
f ? s.prepend(w, f,
|
|
3209
|
+
f ? s.prepend(w, f, p) : d || p ? s.append(w, d || e.id, p) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
|
|
3181
3210
|
});
|
|
3182
3211
|
} else {
|
|
3183
|
-
e.ctrlRule.splice(e.ctrlRule.indexOf(
|
|
3184
|
-
const w = Y(
|
|
3212
|
+
e.ctrlRule.splice(e.ctrlRule.indexOf(y), 1);
|
|
3213
|
+
const w = Y(y);
|
|
3185
3214
|
w && w.rm();
|
|
3186
3215
|
}
|
|
3187
3216
|
});
|
|
3188
3217
|
}), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
|
|
3189
3218
|
n.forEach((a) => a());
|
|
3190
|
-
}) : n.length &&
|
|
3219
|
+
}) : n.length && P(() => {
|
|
3191
3220
|
n.forEach((a) => a());
|
|
3192
3221
|
})), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
|
|
3193
3222
|
},
|
|
@@ -3209,36 +3238,36 @@ function si(t) {
|
|
|
3209
3238
|
}
|
|
3210
3239
|
});
|
|
3211
3240
|
}
|
|
3212
|
-
function
|
|
3213
|
-
const e =
|
|
3241
|
+
function li(t) {
|
|
3242
|
+
const e = Lt();
|
|
3214
3243
|
return Object.keys(e).forEach((r) => {
|
|
3215
|
-
D(t, r) ||
|
|
3244
|
+
D(t, r) || k(t, r, e[r]);
|
|
3216
3245
|
}), t;
|
|
3217
3246
|
}
|
|
3218
|
-
function
|
|
3247
|
+
function ui(t) {
|
|
3219
3248
|
const e = t.rule.control || [];
|
|
3220
3249
|
return h.Object(e) ? [e] : e;
|
|
3221
3250
|
}
|
|
3222
|
-
function
|
|
3251
|
+
function fi(t, e) {
|
|
3223
3252
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3224
3253
|
const i = t.ctrlRule[r];
|
|
3225
3254
|
if (i.children === e)
|
|
3226
3255
|
return i;
|
|
3227
3256
|
}
|
|
3228
3257
|
}
|
|
3229
|
-
function
|
|
3258
|
+
function bt(t) {
|
|
3230
3259
|
return !!t.rule.__ctrl;
|
|
3231
3260
|
}
|
|
3232
|
-
function
|
|
3261
|
+
function ci(t) {
|
|
3233
3262
|
_(t.prototype, {
|
|
3234
3263
|
setValue(e, r, i, s) {
|
|
3235
3264
|
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, {
|
|
3236
3265
|
rule: e.origin,
|
|
3237
3266
|
api: this.api,
|
|
3238
3267
|
setFlag: s || !1
|
|
3239
|
-
}), s &&
|
|
3240
|
-
|
|
3241
|
-
|
|
3268
|
+
}), s && P(() => {
|
|
3269
|
+
P(() => {
|
|
3270
|
+
P(() => {
|
|
3242
3271
|
this.api.clearValidateState(e.id);
|
|
3243
3272
|
});
|
|
3244
3273
|
});
|
|
@@ -3262,7 +3291,7 @@ function ui(t) {
|
|
|
3262
3291
|
setFormData(e, r) {
|
|
3263
3292
|
e.modelValue = r;
|
|
3264
3293
|
const i = e.getParentGroup();
|
|
3265
|
-
i && (this.subRuleData[i.id] ||
|
|
3294
|
+
i && (this.subRuleData[i.id] || k(this.subRuleData, i.id, {}), k(this.subRuleData[i.id], e.field, e.rule.value)), k(this.formData, e.id, r);
|
|
3266
3295
|
},
|
|
3267
3296
|
rmSubRuleData(e) {
|
|
3268
3297
|
const r = e.getParentGroup();
|
|
@@ -3273,13 +3302,13 @@ function ui(t) {
|
|
|
3273
3302
|
},
|
|
3274
3303
|
syncForm() {
|
|
3275
3304
|
const e = {}, r = this.fields(), i = [];
|
|
3276
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] =
|
|
3277
|
-
|
|
3278
|
-
return
|
|
3305
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Ve(this.appendData, n)), s), e), r.reduce((s, n) => {
|
|
3306
|
+
let o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a))[0];
|
|
3307
|
+
return o || (o = this.fieldCtx[n][0], i.push(n)), s[n] = Ve(o.rule, "value"), s;
|
|
3279
3308
|
}, e), this.form = ne(e), this.ignoreFields = i, this.syncValue();
|
|
3280
3309
|
},
|
|
3281
3310
|
isIgnore(e) {
|
|
3282
|
-
return e.ignore === !0 || e.ignore === "hidden"
|
|
3311
|
+
return e.rule.ignore === !0 || (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields) && e.hasHidden();
|
|
3283
3312
|
},
|
|
3284
3313
|
appendValue(e) {
|
|
3285
3314
|
(!e.field || !D(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
@@ -3288,7 +3317,7 @@ function ui(t) {
|
|
|
3288
3317
|
this.subForm[e.id] = r;
|
|
3289
3318
|
},
|
|
3290
3319
|
deferSyncValue(e, r) {
|
|
3291
|
-
this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r),
|
|
3320
|
+
this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), O(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
|
|
3292
3321
|
},
|
|
3293
3322
|
syncValue() {
|
|
3294
3323
|
if (this.deferSyncFn)
|
|
@@ -3299,14 +3328,14 @@ function ui(t) {
|
|
|
3299
3328
|
}), this.vm.updateValue(e);
|
|
3300
3329
|
},
|
|
3301
3330
|
isChange(e, r) {
|
|
3302
|
-
return JSON.stringify(this.getFormData(e),
|
|
3331
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3303
3332
|
},
|
|
3304
3333
|
isQuote(e, r) {
|
|
3305
3334
|
return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
3306
3335
|
},
|
|
3307
3336
|
refreshUpdate(e, r, i, s) {
|
|
3308
3337
|
if (h.Function(e.rule.update)) {
|
|
3309
|
-
const n =
|
|
3338
|
+
const n = O(() => e.rule.update(r, e.origin, this.api, {
|
|
3310
3339
|
origin: i || "change",
|
|
3311
3340
|
linkField: s
|
|
3312
3341
|
}));
|
|
@@ -3332,10 +3361,10 @@ function ui(t) {
|
|
|
3332
3361
|
}
|
|
3333
3362
|
});
|
|
3334
3363
|
}
|
|
3335
|
-
function
|
|
3364
|
+
function vt(t, e) {
|
|
3336
3365
|
return typeof e == "function" ? "" + e : e;
|
|
3337
3366
|
}
|
|
3338
|
-
const
|
|
3367
|
+
const Ae = {
|
|
3339
3368
|
init(t) {
|
|
3340
3369
|
},
|
|
3341
3370
|
toFormValue(t, e) {
|
|
@@ -3354,8 +3383,8 @@ const De = {
|
|
|
3354
3383
|
},
|
|
3355
3384
|
mergeProp(t) {
|
|
3356
3385
|
}
|
|
3357
|
-
},
|
|
3358
|
-
function
|
|
3386
|
+
}, hi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Re = Symbol("oldValue");
|
|
3387
|
+
function di(t) {
|
|
3359
3388
|
_(t.prototype, {
|
|
3360
3389
|
getCtx(e) {
|
|
3361
3390
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3390,7 +3419,7 @@ function ci(t) {
|
|
|
3390
3419
|
if (n)
|
|
3391
3420
|
return n;
|
|
3392
3421
|
}
|
|
3393
|
-
return r[e.originType] || r[J(e.type)] || r[e.trueType] ||
|
|
3422
|
+
return r[e.originType] || r[J(e.type)] || r[e.trueType] || Ae;
|
|
3394
3423
|
},
|
|
3395
3424
|
bindParser(e) {
|
|
3396
3425
|
e.setParser(this.getParser(e));
|
|
@@ -3400,11 +3429,11 @@ function ci(t) {
|
|
|
3400
3429
|
return J(i);
|
|
3401
3430
|
},
|
|
3402
3431
|
noWatch(e) {
|
|
3403
|
-
this.noWatchFn || (this.noWatchFn = e),
|
|
3432
|
+
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3404
3433
|
},
|
|
3405
3434
|
watchCtx(e) {
|
|
3406
|
-
if (
|
|
3407
|
-
const s =
|
|
3435
|
+
if (Dt().filter((i) => i[0] !== "_" && i[0] !== "$" && hi.indexOf(i) === -1).forEach((i) => {
|
|
3436
|
+
const s = Ve(e.rule, i), n = i === "children";
|
|
3408
3437
|
e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3409
3438
|
let l = s.value;
|
|
3410
3439
|
if (!this.isBreakWatch()) {
|
|
@@ -3412,9 +3441,9 @@ function ci(t) {
|
|
|
3412
3441
|
this.$render.clearCache(e), this.nextRefresh();
|
|
3413
3442
|
return;
|
|
3414
3443
|
}
|
|
3415
|
-
if (this.watching = !0,
|
|
3444
|
+
if (this.watching = !0, P(() => {
|
|
3416
3445
|
this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
|
|
3417
|
-
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(),
|
|
3446
|
+
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), P(() => {
|
|
3418
3447
|
this.targetHook(e, "hidden", { value: l });
|
|
3419
3448
|
})), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
|
|
3420
3449
|
this.syncForm();
|
|
@@ -3425,21 +3454,21 @@ function ci(t) {
|
|
|
3425
3454
|
this.$render.clearCache(e), this.refresh(), this.watching = !1;
|
|
3426
3455
|
}
|
|
3427
3456
|
}, { deep: !n, sync: n }));
|
|
3428
|
-
}), e.refRule.__$title =
|
|
3457
|
+
}), e.refRule.__$title = $e(() => {
|
|
3429
3458
|
let i = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
|
|
3430
3459
|
if (i) {
|
|
3431
3460
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3432
3461
|
s && (i = this.api.t(s[1]));
|
|
3433
3462
|
}
|
|
3434
3463
|
return i;
|
|
3435
|
-
}), e.refRule.__$info =
|
|
3464
|
+
}), e.refRule.__$info = $e(() => {
|
|
3436
3465
|
let i = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
|
|
3437
3466
|
if (i) {
|
|
3438
3467
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3439
3468
|
s && (i = this.api.t(s[1]));
|
|
3440
3469
|
}
|
|
3441
3470
|
return i;
|
|
3442
|
-
}), e.refRule.__$validate =
|
|
3471
|
+
}), e.refRule.__$validate = $e(() => {
|
|
3443
3472
|
const i = (s) => {
|
|
3444
3473
|
var o, a;
|
|
3445
3474
|
const n = s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
@@ -3471,7 +3500,7 @@ function ci(t) {
|
|
|
3471
3500
|
return n;
|
|
3472
3501
|
});
|
|
3473
3502
|
}), e.input) {
|
|
3474
|
-
const i =
|
|
3503
|
+
const i = Ve(e.rule, "value");
|
|
3475
3504
|
e.watch.push(L(() => i.value, () => {
|
|
3476
3505
|
let s = e.parser.toFormValue(i.value, e);
|
|
3477
3506
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
@@ -3480,26 +3509,25 @@ function ci(t) {
|
|
|
3480
3509
|
this.bus.$once("load-end", () => {
|
|
3481
3510
|
let i = e.rule.computed;
|
|
3482
3511
|
i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : oe(e.rule, s, l);
|
|
3512
|
+
const n = $e(() => {
|
|
3513
|
+
const a = i[s];
|
|
3514
|
+
if (!a) return;
|
|
3515
|
+
const l = this.compute(e, a);
|
|
3516
|
+
return a.linkage && l === Re ? Re : l;
|
|
3517
|
+
}), o = (a) => {
|
|
3518
|
+
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : oe(e.rule, s, a);
|
|
3491
3519
|
};
|
|
3492
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 :
|
|
3493
|
-
|
|
3494
|
-
a
|
|
3520
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== B(e.rule, s)) && o(n.value), e.watch.push(L(n, (a, l) => {
|
|
3521
|
+
a === Re || a === l || setTimeout(() => {
|
|
3522
|
+
o(a);
|
|
3495
3523
|
});
|
|
3496
|
-
}));
|
|
3524
|
+
}, { deep: !0 }));
|
|
3497
3525
|
}));
|
|
3498
3526
|
}), this.watchEffect(e);
|
|
3499
3527
|
},
|
|
3500
3528
|
adapterValidate(e, r) {
|
|
3501
3529
|
const i = (s, n) => {
|
|
3502
|
-
if ((e.beforeValidate &&
|
|
3530
|
+
if ((e.beforeValidate && O(() => e.beforeValidate({
|
|
3503
3531
|
value: s,
|
|
3504
3532
|
api: this.api,
|
|
3505
3533
|
validate: e,
|
|
@@ -3507,12 +3535,12 @@ function ci(t) {
|
|
|
3507
3535
|
}))) === !1)
|
|
3508
3536
|
n();
|
|
3509
3537
|
else {
|
|
3510
|
-
const a = this.validator(s, e);
|
|
3538
|
+
const a = this.validator(r, s, e);
|
|
3511
3539
|
if (a) {
|
|
3512
3540
|
let l = "";
|
|
3513
3541
|
typeof e.error == "object" && (l = e.error[a] || e.error.default), !l && typeof e.message == "string" && (l = e.message), l || (l = this.getValidateMessage(r, { key: a, rule: e[a] })), n(l);
|
|
3514
3542
|
} else if (e.validator) {
|
|
3515
|
-
const l = e.validator &&
|
|
3543
|
+
const l = e.validator && O(() => e.validator(s, n));
|
|
3516
3544
|
l && h.Function(l.then) && l.then(() => n()).catch((u) => n(u));
|
|
3517
3545
|
} else
|
|
3518
3546
|
n();
|
|
@@ -3532,36 +3560,36 @@ function ci(t) {
|
|
|
3532
3560
|
title: (n = (s = e.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value
|
|
3533
3561
|
});
|
|
3534
3562
|
},
|
|
3535
|
-
validator(e, r) {
|
|
3536
|
-
if (h.empty(
|
|
3537
|
-
return
|
|
3538
|
-
for (const [
|
|
3539
|
-
switch (
|
|
3563
|
+
validator(e, r, i) {
|
|
3564
|
+
if (h.empty(r))
|
|
3565
|
+
return i.required ? "required" : void 0;
|
|
3566
|
+
for (const [n, o] of Object.entries(i))
|
|
3567
|
+
switch (n) {
|
|
3540
3568
|
case "len":
|
|
3541
3569
|
case "maxLen":
|
|
3542
3570
|
case "minLen":
|
|
3543
|
-
const
|
|
3544
|
-
if (Array.isArray(
|
|
3545
|
-
if (!
|
|
3546
|
-
return
|
|
3571
|
+
const a = (g) => n === "len" ? g === o : n === "maxLen" ? g <= o : g >= o;
|
|
3572
|
+
if (Array.isArray(r)) {
|
|
3573
|
+
if (!a(r.length))
|
|
3574
|
+
return n;
|
|
3547
3575
|
} else {
|
|
3548
|
-
if (typeof
|
|
3549
|
-
return
|
|
3550
|
-
if (!
|
|
3551
|
-
return
|
|
3576
|
+
if (typeof r == "object")
|
|
3577
|
+
return n;
|
|
3578
|
+
if (!a(("" + r).length))
|
|
3579
|
+
return n;
|
|
3552
3580
|
}
|
|
3553
3581
|
break;
|
|
3554
3582
|
case "pattern":
|
|
3555
|
-
if (!(typeof
|
|
3556
|
-
return
|
|
3583
|
+
if (!(typeof o == "string" ? new RegExp(o) : o).test("" + r))
|
|
3584
|
+
return n;
|
|
3557
3585
|
break;
|
|
3558
3586
|
case "uppercase":
|
|
3559
|
-
if (
|
|
3560
|
-
return
|
|
3587
|
+
if (o && (typeof r != "string" || !/^[A-Z]*$/.test(r)))
|
|
3588
|
+
return n;
|
|
3561
3589
|
break;
|
|
3562
3590
|
case "lowercase":
|
|
3563
|
-
if (
|
|
3564
|
-
return
|
|
3591
|
+
if (o && (typeof r != "string" || !/^[a-z]*$/.test(r)))
|
|
3592
|
+
return n;
|
|
3565
3593
|
break;
|
|
3566
3594
|
case "min":
|
|
3567
3595
|
case "max":
|
|
@@ -3569,40 +3597,44 @@ function ci(t) {
|
|
|
3569
3597
|
case "negative":
|
|
3570
3598
|
case "integer":
|
|
3571
3599
|
case "number":
|
|
3572
|
-
const
|
|
3573
|
-
if (Number.isNaN(
|
|
3574
|
-
return
|
|
3600
|
+
const u = Number(r);
|
|
3601
|
+
if (Number.isNaN(u) || n === "min" && u < o || n === "max" && u > o || n === "positive" && u <= 0 || n === "negative" && u >= 0 || n === "integer" && !Number.isInteger(u))
|
|
3602
|
+
return n;
|
|
3575
3603
|
break;
|
|
3576
3604
|
case "equal":
|
|
3577
|
-
if (
|
|
3578
|
-
return
|
|
3605
|
+
if (r !== o)
|
|
3606
|
+
return n;
|
|
3579
3607
|
break;
|
|
3580
3608
|
case "enum":
|
|
3581
|
-
if (Array.isArray(
|
|
3582
|
-
return
|
|
3609
|
+
if (Array.isArray(o) && !o.includes(r))
|
|
3610
|
+
return n;
|
|
3583
3611
|
break;
|
|
3584
3612
|
case "hasKeys":
|
|
3585
|
-
if (typeof
|
|
3586
|
-
return
|
|
3613
|
+
if (typeof r != "object" || Array.isArray(o) && o.some((g) => !(g in r)))
|
|
3614
|
+
return n;
|
|
3587
3615
|
break;
|
|
3588
3616
|
case "email":
|
|
3589
|
-
if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" +
|
|
3590
|
-
return
|
|
3617
|
+
if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" + r))
|
|
3618
|
+
return n;
|
|
3591
3619
|
break;
|
|
3592
3620
|
case "url":
|
|
3593
3621
|
if (!new RegExp(
|
|
3594
3622
|
"^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
|
|
3595
3623
|
"i"
|
|
3596
|
-
).test("" +
|
|
3597
|
-
return
|
|
3624
|
+
).test("" + r))
|
|
3625
|
+
return n;
|
|
3598
3626
|
break;
|
|
3599
3627
|
case "ip":
|
|
3600
|
-
if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" +
|
|
3601
|
-
return
|
|
3628
|
+
if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" + r))
|
|
3629
|
+
return n;
|
|
3602
3630
|
break;
|
|
3603
3631
|
case "phone":
|
|
3604
|
-
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" +
|
|
3605
|
-
return
|
|
3632
|
+
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" + r))
|
|
3633
|
+
return n;
|
|
3634
|
+
break;
|
|
3635
|
+
case "computed":
|
|
3636
|
+
if (!this.compute(e, o))
|
|
3637
|
+
return n;
|
|
3606
3638
|
break;
|
|
3607
3639
|
}
|
|
3608
3640
|
},
|
|
@@ -3616,29 +3648,29 @@ function ci(t) {
|
|
|
3616
3648
|
let u = !0;
|
|
3617
3649
|
for (let f = 0; f < a.group.length; f++) {
|
|
3618
3650
|
const d = a.group[f];
|
|
3619
|
-
let
|
|
3651
|
+
let p, y = null;
|
|
3620
3652
|
if (d.variable)
|
|
3621
|
-
|
|
3653
|
+
y = JSON.stringify(this.fc.getLoadData(d.variable) || "");
|
|
3622
3654
|
else if (d.field)
|
|
3623
|
-
|
|
3655
|
+
y = pt(d.field || "");
|
|
3624
3656
|
else if (!d.mode)
|
|
3625
3657
|
return !0;
|
|
3626
|
-
let
|
|
3627
|
-
if (
|
|
3658
|
+
let g = d.compare;
|
|
3659
|
+
if (g && (g = pt(g || "")), d.mode ? p = n(d) : ce[d.condition] ? h.Function(d.handler) ? p = O(() => d.handler(this.api, e.rule)) : p = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${y}, ${g || "$val"}); }}}}`).call(this.api.form, ce, d.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : p = !1, l && p)
|
|
3628
3660
|
return !0;
|
|
3629
|
-
l || (u = u &&
|
|
3661
|
+
l || (u = u && p);
|
|
3630
3662
|
}
|
|
3631
3663
|
return l ? !1 : u;
|
|
3632
3664
|
};
|
|
3633
3665
|
let o = n(r);
|
|
3634
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ?
|
|
3666
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : Re : o;
|
|
3635
3667
|
} else if (h.Function(r))
|
|
3636
3668
|
i = () => r(this.api.form, this.api);
|
|
3637
3669
|
else {
|
|
3638
3670
|
const s = e.getParentGroup();
|
|
3639
3671
|
i = () => this.computeValue(r, e, s);
|
|
3640
3672
|
}
|
|
3641
|
-
return
|
|
3673
|
+
return O(i, void 0);
|
|
3642
3674
|
},
|
|
3643
3675
|
computeValue(e, r, i) {
|
|
3644
3676
|
const s = this, n = Object.keys(this.fc.formulas).reduce((o, a) => (o[a] = function(...l) {
|
|
@@ -3649,7 +3681,7 @@ function ci(t) {
|
|
|
3649
3681
|
fc: s.fc
|
|
3650
3682
|
}, ...l);
|
|
3651
3683
|
}, o), {});
|
|
3652
|
-
return
|
|
3684
|
+
return O(() => new Function("$formulas", "$form", "$scope", "$group", "$rule", "$api", `with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form, n, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, i ? this.subRuleData[i.id] || {} : {}, r.rule, this.api));
|
|
3653
3685
|
},
|
|
3654
3686
|
updateChildren(e, r, i) {
|
|
3655
3687
|
this.deferSyncValue(() => {
|
|
@@ -3672,7 +3704,7 @@ function ci(t) {
|
|
|
3672
3704
|
if (!this.reloading) {
|
|
3673
3705
|
if (e.parser.loadChildren !== !1) {
|
|
3674
3706
|
const l = e.getPending("children", e.rule.children);
|
|
3675
|
-
h.trueArray(l) && l.forEach((u) => u.__fc__ && this.rmCtx(u.__fc__));
|
|
3707
|
+
h.trueArray(l) && l.forEach((u) => u && u.__fc__ && this.rmCtx(u.__fc__));
|
|
3676
3708
|
}
|
|
3677
3709
|
e.root === this.rules && this.vm.renderRule();
|
|
3678
3710
|
}
|
|
@@ -3682,7 +3714,7 @@ function ci(t) {
|
|
|
3682
3714
|
}
|
|
3683
3715
|
});
|
|
3684
3716
|
}
|
|
3685
|
-
function
|
|
3717
|
+
function pi(t) {
|
|
3686
3718
|
_(t.prototype, {
|
|
3687
3719
|
mounted() {
|
|
3688
3720
|
const e = () => {
|
|
@@ -3697,7 +3729,7 @@ function hi(t) {
|
|
|
3697
3729
|
const i = this.options[e] || this.options[J("on-" + e)];
|
|
3698
3730
|
if (i) {
|
|
3699
3731
|
const s = x(i);
|
|
3700
|
-
h.Function(s) &&
|
|
3732
|
+
h.Function(s) && O(() => s(...r));
|
|
3701
3733
|
}
|
|
3702
3734
|
this.bus.$emit(e, ...r);
|
|
3703
3735
|
},
|
|
@@ -3705,18 +3737,18 @@ function hi(t) {
|
|
|
3705
3737
|
var n, o;
|
|
3706
3738
|
let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
|
|
3707
3739
|
s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
|
|
3708
|
-
|
|
3740
|
+
O(() => a(q(v({}, i || {}), { self: e.rule, rule: e.rule, $f: this.api, api: this.api, option: this.vm.$props.option })));
|
|
3709
3741
|
}));
|
|
3710
3742
|
}
|
|
3711
3743
|
});
|
|
3712
3744
|
}
|
|
3713
|
-
function
|
|
3745
|
+
function mi(t) {
|
|
3714
3746
|
_(t.prototype, {
|
|
3715
3747
|
useProvider() {
|
|
3716
3748
|
const e = this.fc.providers;
|
|
3717
3749
|
Object.keys(e).forEach((r) => {
|
|
3718
3750
|
let i = e[r];
|
|
3719
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3751
|
+
h.Function(i) && (i = i(this.fc)), i._c = yi(i), this.onEffect(i), this.providers[r] = i;
|
|
3720
3752
|
});
|
|
3721
3753
|
},
|
|
3722
3754
|
onEffect(e) {
|
|
@@ -3780,26 +3812,26 @@ function di(t) {
|
|
|
3780
3812
|
d = s;
|
|
3781
3813
|
else
|
|
3782
3814
|
return;
|
|
3783
|
-
const
|
|
3784
|
-
e && (
|
|
3815
|
+
const p = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3816
|
+
e && (p.getProp = () => e.effectData(u), p.clearProp = () => e.clearEffectData(u), p.mergeProp = (y) => te(p.getProp(), [y]), p.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [p, r, this.api]);
|
|
3785
3817
|
});
|
|
3786
3818
|
}
|
|
3787
3819
|
});
|
|
3788
3820
|
}
|
|
3789
|
-
function
|
|
3821
|
+
function gi(t) {
|
|
3790
3822
|
return t.filter(function(e, r, i) {
|
|
3791
3823
|
return i.indexOf(e, 0) === r;
|
|
3792
3824
|
});
|
|
3793
3825
|
}
|
|
3794
|
-
function
|
|
3826
|
+
function yi(t) {
|
|
3795
3827
|
const e = t.components;
|
|
3796
3828
|
if (Array.isArray(e)) {
|
|
3797
|
-
const r =
|
|
3829
|
+
const r = gi(e.filter((i) => i !== "*"));
|
|
3798
3830
|
return r.length ? r : !1;
|
|
3799
3831
|
} else return h.String(e) ? [e] : !1;
|
|
3800
3832
|
}
|
|
3801
3833
|
function X(t) {
|
|
3802
|
-
|
|
3834
|
+
Tt(this, {
|
|
3803
3835
|
options() {
|
|
3804
3836
|
return t.options.value || {};
|
|
3805
3837
|
},
|
|
@@ -3833,10 +3865,10 @@ function X(t) {
|
|
|
3833
3865
|
nextReload: () => {
|
|
3834
3866
|
this.lifecycle("reload");
|
|
3835
3867
|
}
|
|
3836
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3837
|
-
const i =
|
|
3868
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3869
|
+
const i = O(() => r(e, this));
|
|
3838
3870
|
return i && i !== e && _(e, i), e;
|
|
3839
|
-
},
|
|
3871
|
+
}, Qr(this));
|
|
3840
3872
|
}
|
|
3841
3873
|
_(X.prototype, {
|
|
3842
3874
|
initData(t) {
|
|
@@ -3859,43 +3891,43 @@ _(X.prototype, {
|
|
|
3859
3891
|
},
|
|
3860
3892
|
globalBeforeFetch(t) {
|
|
3861
3893
|
return new Promise((e, r) => {
|
|
3862
|
-
const i = this.options.beforeFetch &&
|
|
3894
|
+
const i = this.options.beforeFetch && O(() => this.options.beforeFetch(t, { api: this.api }));
|
|
3863
3895
|
i && h.Function(i.then) ? i.then(e).catch(r) : e();
|
|
3864
3896
|
});
|
|
3865
3897
|
},
|
|
3866
3898
|
beforeFetch(t) {
|
|
3867
3899
|
return new Promise((e, r) => {
|
|
3868
|
-
const i = t && t.beforeFetch &&
|
|
3900
|
+
const i = t && t.beforeFetch && O(() => t.beforeFetch(t, { api: this.api }));
|
|
3869
3901
|
i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
|
|
3870
3902
|
}).then(() => this.globalBeforeFetch(t));
|
|
3871
3903
|
},
|
|
3872
3904
|
beforeSubmit(t) {
|
|
3873
3905
|
return new Promise((e, r) => {
|
|
3874
|
-
const i = this.options.beforeSubmit &&
|
|
3906
|
+
const i = this.options.beforeSubmit && O(() => this.options.beforeSubmit(t, { api: this.api }));
|
|
3875
3907
|
i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
|
|
3876
3908
|
});
|
|
3877
3909
|
}
|
|
3878
3910
|
});
|
|
3879
|
-
|
|
3880
|
-
ti(X);
|
|
3911
|
+
ri(X);
|
|
3881
3912
|
ii(X);
|
|
3882
3913
|
si(X);
|
|
3883
|
-
|
|
3914
|
+
ai(X);
|
|
3884
3915
|
ci(X);
|
|
3885
|
-
hi(X);
|
|
3886
3916
|
di(X);
|
|
3887
|
-
|
|
3888
|
-
|
|
3917
|
+
pi(X);
|
|
3918
|
+
mi(X);
|
|
3919
|
+
const $i = "fcFragment", Ne = {
|
|
3920
|
+
name: $i,
|
|
3889
3921
|
functional: !0,
|
|
3890
3922
|
props: ["vnode"],
|
|
3891
3923
|
render(t, e) {
|
|
3892
3924
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3893
3925
|
}
|
|
3894
3926
|
};
|
|
3895
|
-
function
|
|
3927
|
+
function bi(t) {
|
|
3896
3928
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3897
3929
|
}
|
|
3898
|
-
function
|
|
3930
|
+
function vi() {
|
|
3899
3931
|
const t = {};
|
|
3900
3932
|
function e(r) {
|
|
3901
3933
|
r && this.setVm(r);
|
|
@@ -3906,11 +3938,11 @@ function $i() {
|
|
|
3906
3938
|
},
|
|
3907
3939
|
make(r, i, s) {
|
|
3908
3940
|
var n, o, a;
|
|
3909
|
-
return (
|
|
3941
|
+
return (be.isReservedTag ? be.isReservedTag(r) : (o = (n = be) == 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);
|
|
3910
3942
|
},
|
|
3911
3943
|
makeComponent(r, i, s) {
|
|
3912
3944
|
var o;
|
|
3913
|
-
let n = this.$h(r,
|
|
3945
|
+
let n = this.$h(r, bi(i), s || []);
|
|
3914
3946
|
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3915
3947
|
const a = Object.keys(n.componentOptions.propsData);
|
|
3916
3948
|
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
@@ -3927,7 +3959,7 @@ function $i() {
|
|
|
3927
3959
|
},
|
|
3928
3960
|
use(r) {
|
|
3929
3961
|
Object.keys(r).forEach((i) => {
|
|
3930
|
-
const s =
|
|
3962
|
+
const s = ve(i), n = At(i).toLocaleLowerCase(), o = r[i];
|
|
3931
3963
|
[i, s, n].forEach((a) => {
|
|
3932
3964
|
e.alias(i, o), e.prototype[a] = function(l, u) {
|
|
3933
3965
|
return this.make(o, l, u);
|
|
@@ -3937,12 +3969,12 @@ function $i() {
|
|
|
3937
3969
|
}
|
|
3938
3970
|
}), e;
|
|
3939
3971
|
}
|
|
3940
|
-
function
|
|
3941
|
-
class e extends
|
|
3972
|
+
function _i(t) {
|
|
3973
|
+
class e extends Gt {
|
|
3942
3974
|
}
|
|
3943
3975
|
return Object.assign(e.prototype, t), e;
|
|
3944
3976
|
}
|
|
3945
|
-
function
|
|
3977
|
+
function Gt(t) {
|
|
3946
3978
|
_(this, {
|
|
3947
3979
|
$handle: t,
|
|
3948
3980
|
vm: t.vm,
|
|
@@ -3953,12 +3985,12 @@ function Ut(t) {
|
|
|
3953
3985
|
}
|
|
3954
3986
|
}), this.updateKey(), this.init();
|
|
3955
3987
|
}
|
|
3956
|
-
_(
|
|
3988
|
+
_(Gt.prototype, {
|
|
3957
3989
|
__init() {
|
|
3958
3990
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
3959
3991
|
},
|
|
3960
3992
|
updateKey() {
|
|
3961
|
-
this.key =
|
|
3993
|
+
this.key = Ie();
|
|
3962
3994
|
},
|
|
3963
3995
|
//TODO interface
|
|
3964
3996
|
init() {
|
|
@@ -4001,21 +4033,23 @@ _(Ut.prototype, {
|
|
|
4001
4033
|
render(t) {
|
|
4002
4034
|
}
|
|
4003
4035
|
});
|
|
4004
|
-
const
|
|
4036
|
+
const Ci = function(t) {
|
|
4005
4037
|
const e = {
|
|
4006
4038
|
name: "loadData",
|
|
4007
4039
|
_fn: [],
|
|
4008
4040
|
loaded(r, i, s) {
|
|
4009
|
-
this.deleted(r),
|
|
4041
|
+
this.deleted(r), P(() => {
|
|
4010
4042
|
let n = H(r.getValue());
|
|
4011
4043
|
const o = [];
|
|
4012
4044
|
n.forEach((a) => {
|
|
4013
4045
|
if (a && (a.attr || a.template)) {
|
|
4014
4046
|
let l = (d) => {
|
|
4015
|
-
let
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
a.
|
|
4047
|
+
let p;
|
|
4048
|
+
i && i.__fc__ && (p = i.__fc__.getParentGroup());
|
|
4049
|
+
let y;
|
|
4050
|
+
a.template ? y = t.$handle.loadStrVar(a.template, d, p ? { rule: i, value: t.$handle.subRuleData[p.id] || {} } : null) : a.handler && h.Function(a.handler) ? y = a.handler(d, i, s) : y = t.$handle.loadStrVar(`{{${a.attr}}}`, d, p ? { rule: i, value: t.$handle.subRuleData[p.id] || {} } : null), (y == null || y === "") && a.default != null && (y = a.default), a.copy !== !1 && (y = K(y));
|
|
4051
|
+
const g = a.modify ? i : r.getProp();
|
|
4052
|
+
a.to === "child" ? g.children ? k(g.children, 0, y) : k(g, "children", [y]) : oe(g, a.to || "options", y), s.sync(i);
|
|
4019
4053
|
}, u = (d) => l(d);
|
|
4020
4054
|
const f = t.watchLoadData(u);
|
|
4021
4055
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4030,7 +4064,7 @@ const vi = function(t) {
|
|
|
4030
4064
|
}
|
|
4031
4065
|
};
|
|
4032
4066
|
return e.watch = e.loaded, e;
|
|
4033
|
-
},
|
|
4067
|
+
}, wi = function(t) {
|
|
4034
4068
|
const e = {
|
|
4035
4069
|
name: "t",
|
|
4036
4070
|
_fn: [],
|
|
@@ -4042,13 +4076,13 @@ const vi = function(t) {
|
|
|
4042
4076
|
const l = n[a];
|
|
4043
4077
|
if (l) {
|
|
4044
4078
|
const u = typeof l == "object";
|
|
4045
|
-
let f = (
|
|
4046
|
-
let
|
|
4079
|
+
let f = (y) => {
|
|
4080
|
+
let g = t.t(u ? l.attr : l, u ? l.params : null, y);
|
|
4047
4081
|
const w = u && l.modify ? i : r.getProp();
|
|
4048
|
-
a === "child" ? w.children ?
|
|
4049
|
-
}, d = (
|
|
4050
|
-
const
|
|
4051
|
-
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(
|
|
4082
|
+
a === "child" ? w.children ? k(w.children, 0, g) : k(w, "children", [g]) : oe(w, a, g), s.sync(i);
|
|
4083
|
+
}, d = (y) => f(y);
|
|
4084
|
+
const p = t.watchLoadData(d);
|
|
4085
|
+
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(p) : p();
|
|
4052
4086
|
}
|
|
4053
4087
|
}), this._fn[r.id] = o;
|
|
4054
4088
|
},
|
|
@@ -4059,7 +4093,7 @@ const vi = function(t) {
|
|
|
4059
4093
|
}
|
|
4060
4094
|
};
|
|
4061
4095
|
return e.watch = e.loaded, e;
|
|
4062
|
-
},
|
|
4096
|
+
}, Jt = {
|
|
4063
4097
|
name: "componentValidate",
|
|
4064
4098
|
load(t, e, r) {
|
|
4065
4099
|
let i = t.getValue();
|
|
@@ -4082,9 +4116,9 @@ const vi = function(t) {
|
|
|
4082
4116
|
}
|
|
4083
4117
|
},
|
|
4084
4118
|
watch(...t) {
|
|
4085
|
-
|
|
4119
|
+
Jt.load(...t);
|
|
4086
4120
|
}
|
|
4087
|
-
},
|
|
4121
|
+
}, Oi = function(t) {
|
|
4088
4122
|
function e(s) {
|
|
4089
4123
|
return h.String(s) && (s = {
|
|
4090
4124
|
action: s,
|
|
@@ -4117,32 +4151,32 @@ const vi = function(t) {
|
|
|
4117
4151
|
if (!s.getValue())
|
|
4118
4152
|
return s.clearProp(), o.sync(n), !0;
|
|
4119
4153
|
};
|
|
4120
|
-
i._fn[s.id] = t.watchLoadData(se((d,
|
|
4121
|
-
if (
|
|
4154
|
+
i._fn[s.id] = t.watchLoadData(se((d, p) => {
|
|
4155
|
+
if (p && a.watch === !1)
|
|
4122
4156
|
return i._fn[s.id]();
|
|
4123
|
-
const
|
|
4157
|
+
const y = t.$handle.loadFetchVar(K(a), d, n), g = q(v({
|
|
4124
4158
|
headers: {}
|
|
4125
|
-
},
|
|
4126
|
-
onSuccess(w,
|
|
4159
|
+
}, y), {
|
|
4160
|
+
onSuccess(w, F) {
|
|
4127
4161
|
if (f()) return;
|
|
4128
|
-
let G = (
|
|
4129
|
-
const
|
|
4130
|
-
h.Function(
|
|
4162
|
+
let G = (N) => F ? N : D(N, "data") ? N.data : N;
|
|
4163
|
+
const V = x(y.parse);
|
|
4164
|
+
h.Function(V) ? G = V : V && h.String(V) && (G = (N) => B(N, V)), l(G(w, n, o));
|
|
4131
4165
|
},
|
|
4132
4166
|
onError(w) {
|
|
4133
|
-
l(void 0), !f() && (u || ((
|
|
4167
|
+
l(void 0), !f() && (u || ((F) => tt(F.message || "fetch fail " + y.action)))(w, n, o);
|
|
4134
4168
|
}
|
|
4135
4169
|
});
|
|
4136
|
-
t.$handle.beforeFetch(
|
|
4137
|
-
if (h.Function(
|
|
4138
|
-
|
|
4139
|
-
|
|
4170
|
+
t.$handle.beforeFetch(g, { rule: n, api: o }).then(() => {
|
|
4171
|
+
if (h.Function(y.action)) {
|
|
4172
|
+
y.action(n, o).then((w) => {
|
|
4173
|
+
g.onSuccess(w, !0);
|
|
4140
4174
|
}).catch((w) => {
|
|
4141
|
-
|
|
4175
|
+
g.onError(w);
|
|
4142
4176
|
});
|
|
4143
4177
|
return;
|
|
4144
4178
|
}
|
|
4145
|
-
|
|
4179
|
+
O(() => t.create.fetch(g, { inject: s, rule: n, api: o }));
|
|
4146
4180
|
}).catch((w) => {
|
|
4147
4181
|
});
|
|
4148
4182
|
}, a.wait || 600));
|
|
@@ -4161,13 +4195,13 @@ const vi = function(t) {
|
|
|
4161
4195
|
}
|
|
4162
4196
|
};
|
|
4163
4197
|
return i;
|
|
4164
|
-
},
|
|
4165
|
-
fetch:
|
|
4166
|
-
loadData:
|
|
4167
|
-
t:
|
|
4168
|
-
componentValidate:
|
|
4198
|
+
}, Fi = {
|
|
4199
|
+
fetch: Oi,
|
|
4200
|
+
loadData: Ci,
|
|
4201
|
+
t: wi,
|
|
4202
|
+
componentValidate: Jt
|
|
4169
4203
|
};
|
|
4170
|
-
function
|
|
4204
|
+
function ki(t) {
|
|
4171
4205
|
t = t || /* @__PURE__ */ new Map();
|
|
4172
4206
|
const e = {
|
|
4173
4207
|
$on(r, i) {
|
|
@@ -4191,8 +4225,8 @@ function Fi(t) {
|
|
|
4191
4225
|
};
|
|
4192
4226
|
return e;
|
|
4193
4227
|
}
|
|
4194
|
-
const
|
|
4195
|
-
name:
|
|
4228
|
+
const Ei = "html", Si = {
|
|
4229
|
+
name: Ei,
|
|
4196
4230
|
loadChildren: !1,
|
|
4197
4231
|
render(t, e) {
|
|
4198
4232
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4201,7 +4235,7 @@ const Oi = "html", ki = {
|
|
|
4201
4235
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4202
4236
|
}
|
|
4203
4237
|
};
|
|
4204
|
-
function
|
|
4238
|
+
function Ri(t) {
|
|
4205
4239
|
t = t + "=";
|
|
4206
4240
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4207
4241
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4219,7 +4253,7 @@ function Ei(t) {
|
|
|
4219
4253
|
}
|
|
4220
4254
|
return null;
|
|
4221
4255
|
}
|
|
4222
|
-
function
|
|
4256
|
+
function Di(t) {
|
|
4223
4257
|
const e = localStorage.getItem(t);
|
|
4224
4258
|
if (e)
|
|
4225
4259
|
try {
|
|
@@ -4229,7 +4263,7 @@ function Si(t) {
|
|
|
4229
4263
|
}
|
|
4230
4264
|
return null;
|
|
4231
4265
|
}
|
|
4232
|
-
function
|
|
4266
|
+
function ji(t) {
|
|
4233
4267
|
const e = sessionStorage.getItem(t);
|
|
4234
4268
|
if (e)
|
|
4235
4269
|
try {
|
|
@@ -4239,23 +4273,23 @@ function Ri(t) {
|
|
|
4239
4273
|
}
|
|
4240
4274
|
return null;
|
|
4241
4275
|
}
|
|
4242
|
-
function
|
|
4276
|
+
function nt(t, e) {
|
|
4243
4277
|
if (!e)
|
|
4244
4278
|
return null;
|
|
4245
4279
|
const r = e.split(".");
|
|
4246
4280
|
let i = t(r.shift());
|
|
4247
4281
|
return r.length ? i == null ? null : B(i, r) : i;
|
|
4248
4282
|
}
|
|
4249
|
-
function
|
|
4250
|
-
return
|
|
4283
|
+
function Ai(t) {
|
|
4284
|
+
return nt(Ri, t);
|
|
4251
4285
|
}
|
|
4252
|
-
function
|
|
4253
|
-
return
|
|
4286
|
+
function Vi(t) {
|
|
4287
|
+
return nt(Di, t);
|
|
4254
4288
|
}
|
|
4255
|
-
function
|
|
4256
|
-
return
|
|
4289
|
+
function Ii(t) {
|
|
4290
|
+
return nt(ji, t);
|
|
4257
4291
|
}
|
|
4258
|
-
const
|
|
4292
|
+
const Pi = {
|
|
4259
4293
|
en: {
|
|
4260
4294
|
required: "{title} is required",
|
|
4261
4295
|
validate: {
|
|
@@ -4305,17 +4339,17 @@ const Vi = {
|
|
|
4305
4339
|
}
|
|
4306
4340
|
}
|
|
4307
4341
|
};
|
|
4308
|
-
function
|
|
4342
|
+
function Ti(t, e) {
|
|
4309
4343
|
let r;
|
|
4310
4344
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4311
4345
|
}
|
|
4312
4346
|
function Me() {
|
|
4313
|
-
return
|
|
4347
|
+
return Ti("name", ...arguments);
|
|
4314
4348
|
}
|
|
4315
|
-
function
|
|
4349
|
+
function Bi(t) {
|
|
4316
4350
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4317
4351
|
}
|
|
4318
|
-
function
|
|
4352
|
+
function Li(t, e) {
|
|
4319
4353
|
const r = new Vue({
|
|
4320
4354
|
data() {
|
|
4321
4355
|
return { rule: t, option: e || {} };
|
|
@@ -4326,81 +4360,81 @@ function Ti(t, e) {
|
|
|
4326
4360
|
});
|
|
4327
4361
|
return r.$mount(), r;
|
|
4328
4362
|
}
|
|
4329
|
-
function
|
|
4363
|
+
function Ni(t) {
|
|
4330
4364
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4331
|
-
|
|
4365
|
+
Rt.push(...e), Ye.push(...r), et.push(...i), Nt([...e, ...r, ...i]);
|
|
4332
4366
|
}
|
|
4333
|
-
let
|
|
4334
|
-
const U = {},
|
|
4335
|
-
function
|
|
4367
|
+
let Mi = 1;
|
|
4368
|
+
const U = {}, De = Symbol("defValue");
|
|
4369
|
+
function Kt(t) {
|
|
4336
4370
|
const e = {
|
|
4337
|
-
[
|
|
4371
|
+
[Ne.name]: Ne
|
|
4338
4372
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4339
4373
|
t.extendApi
|
|
4340
|
-
], u = v({},
|
|
4374
|
+
], u = v({}, Fi), f = Xr();
|
|
4341
4375
|
let d = { global: {} };
|
|
4342
|
-
const
|
|
4343
|
-
$mobile:
|
|
4344
|
-
}),
|
|
4345
|
-
|
|
4376
|
+
const p = t.isMobile === !0, y = ne({
|
|
4377
|
+
$mobile: p
|
|
4378
|
+
}), g = vi(), w = {}, F = {};
|
|
4379
|
+
Ni(t.attrs || {});
|
|
4346
4380
|
function G(c) {
|
|
4347
|
-
const
|
|
4348
|
-
if (Array.isArray(
|
|
4349
|
-
return
|
|
4350
|
-
if (
|
|
4351
|
-
return
|
|
4381
|
+
const m = U[c];
|
|
4382
|
+
if (Array.isArray(m))
|
|
4383
|
+
return m.map(($) => $.api());
|
|
4384
|
+
if (m)
|
|
4385
|
+
return m.api();
|
|
4352
4386
|
}
|
|
4353
|
-
function
|
|
4387
|
+
function V(c) {
|
|
4354
4388
|
o.push(c);
|
|
4355
4389
|
}
|
|
4356
|
-
function
|
|
4390
|
+
function N() {
|
|
4357
4391
|
const c = Me(...arguments);
|
|
4358
4392
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4359
4393
|
}
|
|
4360
|
-
function
|
|
4394
|
+
function de() {
|
|
4361
4395
|
const c = Me(...arguments);
|
|
4362
4396
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4363
4397
|
name: c.id
|
|
4364
4398
|
}));
|
|
4365
4399
|
}
|
|
4366
|
-
function
|
|
4367
|
-
|
|
4400
|
+
function Pe(c) {
|
|
4401
|
+
g.use(c);
|
|
4368
4402
|
}
|
|
4369
|
-
function
|
|
4403
|
+
function pe() {
|
|
4370
4404
|
const c = Me(...arguments);
|
|
4371
|
-
if (!c.id || !c.prop) return
|
|
4372
|
-
const
|
|
4373
|
-
r[
|
|
4405
|
+
if (!c.id || !c.prop) return Ae;
|
|
4406
|
+
const m = J(c.id), $ = c.prop, b = $.merge === !0 ? r[m] : void 0;
|
|
4407
|
+
r[m] = Se($, b || Ae), f[m] = T(m), $.maker && _(f, $.maker);
|
|
4374
4408
|
}
|
|
4375
|
-
function
|
|
4376
|
-
let
|
|
4409
|
+
function E(c, m) {
|
|
4410
|
+
let $;
|
|
4377
4411
|
if (h.String(c)) {
|
|
4378
|
-
if (
|
|
4379
|
-
return ["form-create", "formcreate"].indexOf(
|
|
4412
|
+
if ($ = c, m === void 0)
|
|
4413
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? R() : e[$];
|
|
4380
4414
|
} else
|
|
4381
|
-
|
|
4382
|
-
if (
|
|
4383
|
-
const b = J(
|
|
4384
|
-
e[
|
|
4415
|
+
$ = J(c.name), m = c;
|
|
4416
|
+
if (!$ || !m) return;
|
|
4417
|
+
const b = J($);
|
|
4418
|
+
e[$] = m, e[b] = m, delete g.aliasMap[$], delete g.aliasMap[b], delete r[$], delete r[b], m.formCreateParser && pe($, m.formCreateParser);
|
|
4385
4419
|
}
|
|
4386
|
-
function
|
|
4387
|
-
return
|
|
4420
|
+
function R() {
|
|
4421
|
+
return zr(Be, e, i);
|
|
4388
4422
|
}
|
|
4389
|
-
function
|
|
4390
|
-
return
|
|
4423
|
+
function M() {
|
|
4424
|
+
return Ne;
|
|
4391
4425
|
}
|
|
4392
|
-
function
|
|
4393
|
-
return h.Function(c.install) ? c.install(W,
|
|
4426
|
+
function me(c, m) {
|
|
4427
|
+
return h.Function(c.install) ? c.install(W, m) : h.Function(c) && c(W, m), this;
|
|
4394
4428
|
}
|
|
4395
|
-
function W(c,
|
|
4396
|
-
let b =
|
|
4429
|
+
function W(c, m, $) {
|
|
4430
|
+
let b = Li(c, m || {});
|
|
4397
4431
|
const C = b.$refs.fc.formCreate;
|
|
4398
|
-
return C.$parent =
|
|
4432
|
+
return C.$parent = $, Bi(C.options).appendChild(b.$el), C.api();
|
|
4399
4433
|
}
|
|
4400
|
-
|
|
4401
|
-
function
|
|
4402
|
-
let
|
|
4403
|
-
return c ?
|
|
4434
|
+
Se(W, F);
|
|
4435
|
+
function zt(c) {
|
|
4436
|
+
let m = v({}, t);
|
|
4437
|
+
return c ? m.inherit = {
|
|
4404
4438
|
components: e,
|
|
4405
4439
|
parsers: r,
|
|
4406
4440
|
directives: i,
|
|
@@ -4409,67 +4443,67 @@ function Gt(t) {
|
|
|
4409
4443
|
useApps: o,
|
|
4410
4444
|
maker: f,
|
|
4411
4445
|
formulas: w,
|
|
4412
|
-
loadData:
|
|
4413
|
-
} : delete
|
|
4446
|
+
loadData: y
|
|
4447
|
+
} : delete m.inherit, Kt(m);
|
|
4414
4448
|
}
|
|
4415
|
-
function
|
|
4416
|
-
s[c] =
|
|
4449
|
+
function xt(c, m) {
|
|
4450
|
+
s[c] = m;
|
|
4417
4451
|
}
|
|
4418
|
-
function
|
|
4419
|
-
w[c] =
|
|
4452
|
+
function Xt(c, m) {
|
|
4453
|
+
w[c] = m;
|
|
4420
4454
|
}
|
|
4421
|
-
function
|
|
4422
|
-
const
|
|
4423
|
-
|
|
4424
|
-
b[C] =
|
|
4425
|
-
}),
|
|
4455
|
+
function Zt(c, m) {
|
|
4456
|
+
const $ = n[c] || {}, b = $.parsers || {};
|
|
4457
|
+
m.parsers && Object.keys(m.parsers).forEach((C) => {
|
|
4458
|
+
b[C] = Se(m.parsers[C], Ae);
|
|
4459
|
+
}), m.name = c, n[c] = q(v(v({}, $), m), { parsers: b });
|
|
4426
4460
|
}
|
|
4427
|
-
function
|
|
4428
|
-
c && Object.keys(U).forEach((
|
|
4429
|
-
(Array.isArray(U[
|
|
4461
|
+
function Oe(c) {
|
|
4462
|
+
c && Object.keys(U).forEach((m) => {
|
|
4463
|
+
(Array.isArray(U[m]) ? U[m] : [U[m]]).forEach((b) => {
|
|
4430
4464
|
b.bus.$emit("$loadData." + c);
|
|
4431
4465
|
});
|
|
4432
4466
|
});
|
|
4433
4467
|
}
|
|
4434
|
-
function
|
|
4435
|
-
oe(
|
|
4468
|
+
function Te(c, m) {
|
|
4469
|
+
oe(y, c, m), Oe(c);
|
|
4436
4470
|
}
|
|
4437
|
-
function Fe(c,
|
|
4438
|
-
const
|
|
4439
|
-
|
|
4471
|
+
function Fe(c, m) {
|
|
4472
|
+
const $ = (...b) => O(() => m(...b));
|
|
4473
|
+
$._driver = !0, Te(c, $);
|
|
4440
4474
|
}
|
|
4441
|
-
function
|
|
4442
|
-
const
|
|
4443
|
-
c =
|
|
4444
|
-
const b =
|
|
4445
|
-
if (D(
|
|
4446
|
-
let C =
|
|
4447
|
-
return C && C._driver ? C = C(b) :
|
|
4475
|
+
function st(c, m) {
|
|
4476
|
+
const $ = (c || "").split(".");
|
|
4477
|
+
c = $.shift();
|
|
4478
|
+
const b = $.join(".");
|
|
4479
|
+
if (D(y, c) || k(y, c, De), y[c] !== De) {
|
|
4480
|
+
let C = y[c];
|
|
4481
|
+
return C && C._driver ? C = C(b) : $.length && (C = B(C, $)), C == null || C === "" ? m : C;
|
|
4448
4482
|
} else
|
|
4449
|
-
return
|
|
4483
|
+
return m;
|
|
4450
4484
|
}
|
|
4451
|
-
function
|
|
4485
|
+
function Qt(c) {
|
|
4452
4486
|
l.push(c);
|
|
4453
4487
|
}
|
|
4454
|
-
function
|
|
4455
|
-
delete
|
|
4488
|
+
function Yt(c) {
|
|
4489
|
+
delete y[c], Oe(c);
|
|
4456
4490
|
}
|
|
4457
|
-
function
|
|
4458
|
-
a.push({ name: c, callback:
|
|
4491
|
+
function er(c, m) {
|
|
4492
|
+
a.push({ name: c, callback: m });
|
|
4459
4493
|
}
|
|
4460
|
-
function
|
|
4494
|
+
function Be(c) {
|
|
4461
4495
|
_(this, {
|
|
4462
|
-
id:
|
|
4496
|
+
id: Mi++,
|
|
4463
4497
|
create: W,
|
|
4464
4498
|
vm: c,
|
|
4465
|
-
manager:
|
|
4499
|
+
manager: _i(t.manager),
|
|
4466
4500
|
parsers: r,
|
|
4467
4501
|
providers: u,
|
|
4468
4502
|
modelFields: s,
|
|
4469
4503
|
formulas: w,
|
|
4470
|
-
isMobile:
|
|
4504
|
+
isMobile: p,
|
|
4471
4505
|
rules: c.$options.propsData.rule,
|
|
4472
|
-
name: c.$options.propsData.name ||
|
|
4506
|
+
name: c.$options.propsData.name || Ie(),
|
|
4473
4507
|
inFor: c.$options.propsData.inFor,
|
|
4474
4508
|
prop: {
|
|
4475
4509
|
components: e,
|
|
@@ -4478,70 +4512,70 @@ function Gt(t) {
|
|
|
4478
4512
|
get: null,
|
|
4479
4513
|
drivers: n,
|
|
4480
4514
|
renderDriver: null,
|
|
4481
|
-
refreshData:
|
|
4482
|
-
loadData:
|
|
4483
|
-
CreateNode:
|
|
4484
|
-
bus: new
|
|
4515
|
+
refreshData: Oe,
|
|
4516
|
+
loadData: y,
|
|
4517
|
+
CreateNode: g,
|
|
4518
|
+
bus: new ki(),
|
|
4485
4519
|
unwatch: [],
|
|
4486
|
-
options:
|
|
4520
|
+
options: mr({}),
|
|
4487
4521
|
extendApiFn: l,
|
|
4488
4522
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4489
4523
|
tmpData: ne({})
|
|
4490
|
-
}), a.forEach((
|
|
4491
|
-
this.bus.$on(
|
|
4492
|
-
}),
|
|
4524
|
+
}), a.forEach((m) => {
|
|
4525
|
+
this.bus.$on(m.name, m.callback);
|
|
4526
|
+
}), P(() => {
|
|
4493
4527
|
L(this.options, () => {
|
|
4494
4528
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4495
4529
|
}, { deep: !0 });
|
|
4496
4530
|
}), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
|
|
4497
4531
|
}
|
|
4498
|
-
|
|
4532
|
+
Be.isMobile = p, _(Be.prototype, {
|
|
4499
4533
|
init() {
|
|
4500
4534
|
this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
|
|
4501
4535
|
this.initOptions(), this.$handle.api.refresh();
|
|
4502
4536
|
}, { 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.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4503
4537
|
},
|
|
4504
|
-
targetFormDriver(c, ...
|
|
4538
|
+
targetFormDriver(c, ...m) {
|
|
4505
4539
|
if (this.renderDriver && this.renderDriver[c])
|
|
4506
|
-
return
|
|
4540
|
+
return O(() => this.renderDriver[c](...m));
|
|
4507
4541
|
},
|
|
4508
|
-
t(c,
|
|
4509
|
-
let b =
|
|
4510
|
-
return b == null && (b = ""), b &&
|
|
4542
|
+
t(c, m, $) {
|
|
4543
|
+
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4544
|
+
return b == null && (b = ""), b && m && Object.keys(m).forEach((C) => {
|
|
4511
4545
|
const j = new RegExp(`{${C}}`, "g");
|
|
4512
|
-
b = b.replace(j,
|
|
4546
|
+
b = b.replace(j, m[C]);
|
|
4513
4547
|
}), b;
|
|
4514
4548
|
},
|
|
4515
4549
|
globalDataDriver(c) {
|
|
4516
|
-
let
|
|
4517
|
-
const
|
|
4550
|
+
let m = c.split(".");
|
|
4551
|
+
const $ = m.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4518
4552
|
if (b) {
|
|
4519
4553
|
if (b.type === "static")
|
|
4520
|
-
return B(b.data,
|
|
4554
|
+
return B(b.data, m);
|
|
4521
4555
|
{
|
|
4522
4556
|
let C;
|
|
4523
4557
|
const j = this.fetchCache.get(b);
|
|
4524
4558
|
if (j) {
|
|
4525
|
-
if (j.status && (C = B(j.data,
|
|
4559
|
+
if (j.status && (C = B(j.data, m)), !j.loading)
|
|
4526
4560
|
return C;
|
|
4527
4561
|
j.loading = !1, this.fetchCache.set(b, j);
|
|
4528
4562
|
} else
|
|
4529
4563
|
this.fetchCache.set(b, { status: !1 });
|
|
4530
|
-
const
|
|
4564
|
+
const S = se(() => {
|
|
4531
4565
|
le();
|
|
4532
4566
|
const z = this.fetchCache.get(b);
|
|
4533
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." +
|
|
4567
|
+
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
4534
4568
|
}, b.wait || 600), ae = (z) => {
|
|
4535
|
-
this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." +
|
|
4569
|
+
this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." + $);
|
|
4536
4570
|
}, Z = (z, ue) => {
|
|
4537
4571
|
if (ue && b.watch === !1)
|
|
4538
4572
|
return le();
|
|
4539
4573
|
if (ue) {
|
|
4540
|
-
|
|
4574
|
+
S();
|
|
4541
4575
|
return;
|
|
4542
4576
|
}
|
|
4543
|
-
const
|
|
4544
|
-
this.$handle.api.fetch(
|
|
4577
|
+
const ge = this.$handle.loadFetchVar(Ke(b), z);
|
|
4578
|
+
this.$handle.api.fetch(ge).then((re) => {
|
|
4545
4579
|
ae(re);
|
|
4546
4580
|
}).catch((re) => {
|
|
4547
4581
|
ae(null);
|
|
@@ -4556,91 +4590,91 @@ function Gt(t) {
|
|
|
4556
4590
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4557
4591
|
},
|
|
4558
4592
|
globalLanguageDriver(c) {
|
|
4559
|
-
let
|
|
4560
|
-
if (
|
|
4593
|
+
let m = this.vm.top.$props.locale, $;
|
|
4594
|
+
if (m && typeof m == "object" && ($ = B(m, c)), $ == null) {
|
|
4561
4595
|
const b = this.options.value.language || {}, C = this.getLocale();
|
|
4562
|
-
|
|
4596
|
+
$ = B(b[C] || {}, c), $ == null && ($ = B(Pi[C] || {}, c));
|
|
4563
4597
|
}
|
|
4564
|
-
return
|
|
4598
|
+
return $;
|
|
4565
4599
|
},
|
|
4566
4600
|
globalVarDriver(c) {
|
|
4567
|
-
let
|
|
4568
|
-
const
|
|
4601
|
+
let m = c.split(".");
|
|
4602
|
+
const $ = m.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4569
4603
|
if (b) {
|
|
4570
4604
|
const C = h.Function(b) ? b : x(b.handle);
|
|
4571
4605
|
if (C) {
|
|
4572
4606
|
let j;
|
|
4573
|
-
const
|
|
4574
|
-
Z ? (this.bus.$emit("$loadData.$var." +
|
|
4607
|
+
const S = this.watchLoadData((ae, Z) => {
|
|
4608
|
+
Z ? (this.bus.$emit("$loadData.$var." + $), S()) : j = C(ae, this.$handle.api);
|
|
4575
4609
|
});
|
|
4576
|
-
return this.unwatch.push(
|
|
4610
|
+
return this.unwatch.push(S), B(j, m);
|
|
4577
4611
|
}
|
|
4578
4612
|
}
|
|
4579
4613
|
},
|
|
4580
|
-
setData(c,
|
|
4581
|
-
|
|
4614
|
+
setData(c, m, $) {
|
|
4615
|
+
$ ? Te(c, m) : (oe(this.vm.top.fc.tmpData, c, m), this.bus.$emit("$loadData." + c));
|
|
4582
4616
|
},
|
|
4583
|
-
getLoadData(c,
|
|
4584
|
-
let
|
|
4617
|
+
getLoadData(c, m) {
|
|
4618
|
+
let $ = null;
|
|
4585
4619
|
if (c != null) {
|
|
4586
4620
|
let b = c.split(".");
|
|
4587
4621
|
const C = b.shift();
|
|
4588
4622
|
if (C === "$topForm")
|
|
4589
|
-
|
|
4623
|
+
$ = this.$handle.api.top.formData(!0);
|
|
4590
4624
|
else if (C === "$scopeForm")
|
|
4591
|
-
|
|
4625
|
+
$ = this.$handle.api.scope.formData(!0);
|
|
4592
4626
|
else if (C === "$form")
|
|
4593
|
-
|
|
4627
|
+
$ = this.$handle.api.formData(!0);
|
|
4594
4628
|
else if (C === "$options")
|
|
4595
|
-
|
|
4629
|
+
$ = this.options.value;
|
|
4596
4630
|
else if (C === "$globalData")
|
|
4597
|
-
|
|
4631
|
+
$ = this.globalDataDriver(b.join(".")), b = [];
|
|
4598
4632
|
else if (C === "$var")
|
|
4599
|
-
|
|
4633
|
+
$ = this.globalVarDriver(b.join(".")), b = [];
|
|
4600
4634
|
else if (C === "$locale")
|
|
4601
|
-
|
|
4635
|
+
$ = this.getLocale(), b = [];
|
|
4602
4636
|
else if (C === "$t")
|
|
4603
|
-
|
|
4637
|
+
$ = this.globalLanguageDriver(b.join(".")), b = [];
|
|
4604
4638
|
else {
|
|
4605
4639
|
if (C === "$preview")
|
|
4606
4640
|
return this.$handle.preview;
|
|
4607
4641
|
{
|
|
4608
4642
|
const j = this.vm.top.fc.tmpData;
|
|
4609
|
-
D(j, C) ||
|
|
4643
|
+
D(j, C) || k(j, C, De), $ = j[C] !== De ? B(j, c) : st(c), b = [];
|
|
4610
4644
|
}
|
|
4611
4645
|
}
|
|
4612
|
-
|
|
4646
|
+
$ && b.length && ($ = B($, b));
|
|
4613
4647
|
}
|
|
4614
|
-
return
|
|
4648
|
+
return $ == null || $ === "" ? m : $;
|
|
4615
4649
|
},
|
|
4616
|
-
watchLoadData(c,
|
|
4617
|
-
let
|
|
4618
|
-
const b = (
|
|
4619
|
-
this.get || (this.get = C),
|
|
4620
|
-
c(C,
|
|
4650
|
+
watchLoadData(c, m) {
|
|
4651
|
+
let $ = {};
|
|
4652
|
+
const b = (S) => {
|
|
4653
|
+
this.get || (this.get = C), O(() => {
|
|
4654
|
+
c(C, S);
|
|
4621
4655
|
}), this.get === C && (this.get = void 0);
|
|
4622
|
-
}, C = (
|
|
4656
|
+
}, C = (S, ae) => {
|
|
4623
4657
|
let Z;
|
|
4624
|
-
if (typeof
|
|
4625
|
-
return
|
|
4626
|
-
const le =
|
|
4627
|
-
const
|
|
4628
|
-
if (
|
|
4629
|
-
JSON.stringify(
|
|
4658
|
+
if (typeof S == "object" && (Z = S.getValue, S = S.id), $[S])
|
|
4659
|
+
return $[S].val;
|
|
4660
|
+
const le = $e(() => Z ? Z() : this.getLoadData(S, ae)), z = S.split("."), ue = z.shift(), ge = z.shift() || "", re = se(() => {
|
|
4661
|
+
const fe = Z ? Z() : this.getLoadData(S, ae);
|
|
4662
|
+
if ($[S])
|
|
4663
|
+
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[S].val || JSON.stringify(fe) !== JSON.stringify($[S].val)) && ($[S].val = fe, b(!0));
|
|
4630
4664
|
else return;
|
|
4631
|
-
},
|
|
4665
|
+
}, m || 0), rr = L(le, (fe) => {
|
|
4632
4666
|
re();
|
|
4633
4667
|
});
|
|
4634
|
-
return this.bus.$on("$loadData." + ue, re),
|
|
4668
|
+
return this.bus.$on("$loadData." + ue, re), ge && this.bus.$on("$loadData." + ue + "." + ge, re), $[S] = {
|
|
4635
4669
|
fn: () => {
|
|
4636
|
-
this.bus.$off("$loadData." + ue, re),
|
|
4670
|
+
this.bus.$off("$loadData." + ue, re), ge && this.bus.$off("$loadData." + ue + "." + ge, re), rr();
|
|
4637
4671
|
},
|
|
4638
4672
|
val: le.value
|
|
4639
4673
|
}, le.value;
|
|
4640
4674
|
};
|
|
4641
4675
|
b(!1);
|
|
4642
4676
|
const j = () => {
|
|
4643
|
-
Object.keys(
|
|
4677
|
+
Object.keys($).forEach((S) => $[S].fn()), $ = {};
|
|
4644
4678
|
};
|
|
4645
4679
|
return this.unwatch.push(j), j;
|
|
4646
4680
|
},
|
|
@@ -4658,10 +4692,10 @@ function Gt(t) {
|
|
|
4658
4692
|
}, K(d));
|
|
4659
4693
|
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);
|
|
4660
4694
|
},
|
|
4661
|
-
mergeOptions(c,
|
|
4662
|
-
return
|
|
4663
|
-
delete
|
|
4664
|
-
}),
|
|
4695
|
+
mergeOptions(c, m, $) {
|
|
4696
|
+
return m = v({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4697
|
+
delete m[b];
|
|
4698
|
+
}), m.global && (c.global = Jr(c.global, m.global), delete m.global), this.$handle.$manager.mergeOptions([m], c), c;
|
|
4665
4699
|
},
|
|
4666
4700
|
updateOptions(c) {
|
|
4667
4701
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4690,76 +4724,76 @@ function Gt(t) {
|
|
|
4690
4724
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4691
4725
|
}
|
|
4692
4726
|
});
|
|
4693
|
-
function
|
|
4727
|
+
function ot(c) {
|
|
4694
4728
|
_(c, {
|
|
4695
4729
|
version: t.version,
|
|
4696
4730
|
ui: t.ui,
|
|
4697
|
-
isMobile:
|
|
4698
|
-
extendApi:
|
|
4699
|
-
getData:
|
|
4731
|
+
isMobile: p,
|
|
4732
|
+
extendApi: Qt,
|
|
4733
|
+
getData: st,
|
|
4700
4734
|
setDataDriver: Fe,
|
|
4701
|
-
setData:
|
|
4702
|
-
removeData:
|
|
4703
|
-
refreshData:
|
|
4735
|
+
setData: Te,
|
|
4736
|
+
removeData: Yt,
|
|
4737
|
+
refreshData: Oe,
|
|
4704
4738
|
maker: f,
|
|
4705
|
-
component:
|
|
4706
|
-
directive:
|
|
4707
|
-
setModelField:
|
|
4708
|
-
setFormula:
|
|
4709
|
-
setDriver:
|
|
4710
|
-
register:
|
|
4711
|
-
$vnode:
|
|
4712
|
-
parser:
|
|
4713
|
-
use:
|
|
4714
|
-
factory:
|
|
4715
|
-
componentAlias:
|
|
4716
|
-
copyRule:
|
|
4717
|
-
copyRules:
|
|
4739
|
+
component: E,
|
|
4740
|
+
directive: N,
|
|
4741
|
+
setModelField: xt,
|
|
4742
|
+
setFormula: Xt,
|
|
4743
|
+
setDriver: Zt,
|
|
4744
|
+
register: de,
|
|
4745
|
+
$vnode: M,
|
|
4746
|
+
parser: pe,
|
|
4747
|
+
use: me,
|
|
4748
|
+
factory: zt,
|
|
4749
|
+
componentAlias: Pe,
|
|
4750
|
+
copyRule: It,
|
|
4751
|
+
copyRules: Pt,
|
|
4718
4752
|
mergeRule: te,
|
|
4719
|
-
fetch:
|
|
4720
|
-
$form:
|
|
4753
|
+
fetch: qt,
|
|
4754
|
+
$form: R,
|
|
4721
4755
|
parseFn: x,
|
|
4722
|
-
parseJson:
|
|
4723
|
-
toJson:
|
|
4724
|
-
useApp:
|
|
4756
|
+
parseJson: Vt,
|
|
4757
|
+
toJson: Ce,
|
|
4758
|
+
useApp: V,
|
|
4725
4759
|
getApi: G,
|
|
4726
|
-
on:
|
|
4760
|
+
on: er
|
|
4727
4761
|
});
|
|
4728
4762
|
}
|
|
4729
|
-
function
|
|
4763
|
+
function tr(c) {
|
|
4730
4764
|
_(c, {
|
|
4731
4765
|
create: W,
|
|
4732
|
-
install(
|
|
4733
|
-
if (d = v(v({}, d),
|
|
4734
|
-
|
|
4735
|
-
const b = function(j,
|
|
4736
|
-
return W(j,
|
|
4766
|
+
install(m, $) {
|
|
4767
|
+
if (d = v(v({}, d), $ || {}), m._installedFormCreate === !0) return;
|
|
4768
|
+
m._installedFormCreate = !0;
|
|
4769
|
+
const b = function(j, S = {}) {
|
|
4770
|
+
return W(j, S, this);
|
|
4737
4771
|
};
|
|
4738
|
-
|
|
4739
|
-
const C =
|
|
4740
|
-
|
|
4741
|
-
|
|
4772
|
+
ot(b), m.prototype.$formCreate = b;
|
|
4773
|
+
const C = R();
|
|
4774
|
+
m.component(C.name, C), m.component("FcFragment", M()), o.forEach((j) => {
|
|
4775
|
+
O(() => j(c, m));
|
|
4742
4776
|
});
|
|
4743
4777
|
}
|
|
4744
4778
|
});
|
|
4745
4779
|
}
|
|
4746
|
-
if (
|
|
4780
|
+
if (ot(F), tr(F), Fe("$cookie", Ai), Fe("$localStorage", Vi), Fe("$sessionStorage", Ii), g.use({ fragment: "fcFragment" }), t.install && W.use(t), pe(Si), t.inherit) {
|
|
4747
4781
|
const c = t.inherit;
|
|
4748
|
-
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 && _(
|
|
4782
|
+
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 && _(y, c.loadData), c.formulas && _(w, c.formulas);
|
|
4749
4783
|
}
|
|
4750
|
-
const
|
|
4751
|
-
return
|
|
4784
|
+
const ke = R();
|
|
4785
|
+
return Se(ke, F), Object.defineProperties(ke, {
|
|
4752
4786
|
fetch: {
|
|
4753
4787
|
get() {
|
|
4754
|
-
return
|
|
4788
|
+
return F.fetch;
|
|
4755
4789
|
},
|
|
4756
4790
|
set(c) {
|
|
4757
|
-
|
|
4791
|
+
F.fetch = c;
|
|
4758
4792
|
}
|
|
4759
4793
|
}
|
|
4760
|
-
}),
|
|
4794
|
+
}), ke.util = F, ke;
|
|
4761
4795
|
}
|
|
4762
|
-
const
|
|
4796
|
+
const _t = {
|
|
4763
4797
|
date: "yyyy-MM-dd",
|
|
4764
4798
|
month: "yyyy-MM",
|
|
4765
4799
|
datetime: "yyyy-MM-dd HH:mm:ss",
|
|
@@ -4768,73 +4802,73 @@ const vt = {
|
|
|
4768
4802
|
monthrange: "yyyy-MM",
|
|
4769
4803
|
datetimerange: "yyyy-MM-dd HH:mm:ss",
|
|
4770
4804
|
year: "yyyy"
|
|
4771
|
-
},
|
|
4772
|
-
name:
|
|
4805
|
+
}, Ct = "datePicker", qi = {
|
|
4806
|
+
name: Ct,
|
|
4773
4807
|
maker: function() {
|
|
4774
|
-
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] =
|
|
4808
|
+
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = T(Ct, { type: e.toLowerCase() }), t), {});
|
|
4775
4809
|
}(),
|
|
4776
4810
|
mergeProp(t) {
|
|
4777
4811
|
const e = t.prop.props;
|
|
4778
|
-
e.valueFormat || (e.valueFormat =
|
|
4812
|
+
e.valueFormat || (e.valueFormat = _t[e.type] || _t.date);
|
|
4779
4813
|
}
|
|
4780
|
-
},
|
|
4781
|
-
name:
|
|
4814
|
+
}, qe = "hidden", Ui = {
|
|
4815
|
+
name: qe,
|
|
4782
4816
|
maker: {
|
|
4783
|
-
[
|
|
4817
|
+
[qe]: (t, e) => T(qe)("", t, e)
|
|
4784
4818
|
},
|
|
4785
4819
|
render() {
|
|
4786
4820
|
return [];
|
|
4787
4821
|
}
|
|
4788
|
-
},
|
|
4789
|
-
name:
|
|
4822
|
+
}, Ue = "input", Hi = {
|
|
4823
|
+
name: Ue,
|
|
4790
4824
|
maker: function() {
|
|
4791
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] =
|
|
4792
|
-
return t.idate =
|
|
4825
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = T(Ue, { type: r }), e), {});
|
|
4826
|
+
return t.idate = T(Ue, { type: "date" }), t;
|
|
4793
4827
|
}(),
|
|
4794
4828
|
mergeProp(t) {
|
|
4795
4829
|
let { props: e } = t.prop;
|
|
4796
4830
|
e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4797
4831
|
}
|
|
4798
|
-
},
|
|
4799
|
-
name:
|
|
4832
|
+
}, wt = "slider", Gi = {
|
|
4833
|
+
name: wt,
|
|
4800
4834
|
maker: {
|
|
4801
|
-
sliderRange:
|
|
4835
|
+
sliderRange: T(wt, { range: !0 })
|
|
4802
4836
|
},
|
|
4803
4837
|
toFormValue(t, e) {
|
|
4804
4838
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4805
4839
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4806
4840
|
}
|
|
4807
|
-
},
|
|
4808
|
-
name:
|
|
4841
|
+
}, He = "timePicker", Ji = {
|
|
4842
|
+
name: He,
|
|
4809
4843
|
maker: {
|
|
4810
|
-
time:
|
|
4811
|
-
timeRange:
|
|
4844
|
+
time: T(He, (t) => t.props.isRange = !1),
|
|
4845
|
+
timeRange: T(He, (t) => t.props.isRange = !0)
|
|
4812
4846
|
},
|
|
4813
4847
|
mergeProp(t) {
|
|
4814
4848
|
const e = t.prop.props;
|
|
4815
4849
|
e.valueFormat || (e.valueFormat = "HH:mm:ss");
|
|
4816
4850
|
}
|
|
4817
|
-
},
|
|
4851
|
+
}, Ki = {
|
|
4818
4852
|
name: "FcRow",
|
|
4819
4853
|
render(t, e) {
|
|
4820
4854
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4821
4855
|
e.vNode.row(e.prop, t)
|
|
4822
4856
|
]);
|
|
4823
4857
|
}
|
|
4824
|
-
},
|
|
4825
|
-
name:
|
|
4858
|
+
}, Wi = "select", zi = {
|
|
4859
|
+
name: Wi,
|
|
4826
4860
|
toFormValue(t, e) {
|
|
4827
4861
|
return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
|
|
4828
4862
|
}
|
|
4829
|
-
},
|
|
4830
|
-
Mi,
|
|
4831
|
-
Ni,
|
|
4863
|
+
}, xi = [
|
|
4832
4864
|
qi,
|
|
4833
4865
|
Ui,
|
|
4834
4866
|
Hi,
|
|
4835
4867
|
Gi,
|
|
4836
|
-
|
|
4837
|
-
|
|
4868
|
+
Ji,
|
|
4869
|
+
Ki,
|
|
4870
|
+
zi
|
|
4871
|
+
], A = "el", Xi = {
|
|
4838
4872
|
button: A + "Button",
|
|
4839
4873
|
icon: "i",
|
|
4840
4874
|
slider: A + "Slider",
|
|
@@ -4867,7 +4901,7 @@ const vt = {
|
|
|
4867
4901
|
object: "fcSubForm",
|
|
4868
4902
|
subForm: "fcSubForm"
|
|
4869
4903
|
};
|
|
4870
|
-
function
|
|
4904
|
+
function Zi() {
|
|
4871
4905
|
return {
|
|
4872
4906
|
form: {
|
|
4873
4907
|
inline: !1,
|
|
@@ -4901,23 +4935,23 @@ function xi() {
|
|
|
4901
4935
|
}
|
|
4902
4936
|
};
|
|
4903
4937
|
}
|
|
4904
|
-
function
|
|
4938
|
+
function Qi(t) {
|
|
4905
4939
|
return t.type === "tooltip";
|
|
4906
4940
|
}
|
|
4907
|
-
function
|
|
4941
|
+
function Ot(t, e) {
|
|
4908
4942
|
D(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4909
4943
|
}
|
|
4910
4944
|
function Q(t) {
|
|
4911
4945
|
return t === !1;
|
|
4912
4946
|
}
|
|
4913
|
-
function
|
|
4947
|
+
function Yi(t, e) {
|
|
4914
4948
|
D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4915
4949
|
}
|
|
4916
|
-
function
|
|
4950
|
+
function Ge(t) {
|
|
4917
4951
|
const e = v({}, t);
|
|
4918
4952
|
return delete e.children, e;
|
|
4919
4953
|
}
|
|
4920
|
-
const
|
|
4954
|
+
const en = {
|
|
4921
4955
|
validate() {
|
|
4922
4956
|
const t = this.form();
|
|
4923
4957
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4936,11 +4970,11 @@ const Qi = {
|
|
|
4936
4970
|
},
|
|
4937
4971
|
tidyOptions(t) {
|
|
4938
4972
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4939
|
-
|
|
4973
|
+
Yi(t, e);
|
|
4940
4974
|
}), t;
|
|
4941
4975
|
},
|
|
4942
4976
|
tidyRule({ prop: t }) {
|
|
4943
|
-
return
|
|
4977
|
+
return Ot(t, "title"), Ot(t, "info"), t;
|
|
4944
4978
|
},
|
|
4945
4979
|
mergeProp(t) {
|
|
4946
4980
|
const e = {
|
|
@@ -4958,7 +4992,7 @@ const Qi = {
|
|
|
4958
4992
|
});
|
|
4959
4993
|
},
|
|
4960
4994
|
getDefaultOptions() {
|
|
4961
|
-
return
|
|
4995
|
+
return Zi();
|
|
4962
4996
|
},
|
|
4963
4997
|
update() {
|
|
4964
4998
|
const t = this.options.form;
|
|
@@ -4987,9 +5021,9 @@ const Qi = {
|
|
|
4987
5021
|
delete r.wrap.title;
|
|
4988
5022
|
const u = Q(r.wrap.show) ? e : this.$r(ee([r.wrap, {
|
|
4989
5023
|
props: q(v({
|
|
4990
|
-
labelWidth: o === void 0 ? o :
|
|
5024
|
+
labelWidth: o === void 0 ? o : At(o),
|
|
4991
5025
|
label: n ? r.title.title : void 0
|
|
4992
|
-
},
|
|
5026
|
+
}, Ge(r.wrap || {})), {
|
|
4993
5027
|
prop: t.id,
|
|
4994
5028
|
rules: t.injectValidate()
|
|
4995
5029
|
}),
|
|
@@ -5006,22 +5040,22 @@ const Qi = {
|
|
|
5006
5040
|
return !(!e.title && !e.native || Q(e.show));
|
|
5007
5041
|
},
|
|
5008
5042
|
makeInfo(t, e, r) {
|
|
5009
|
-
var f, d,
|
|
5010
|
-
const i = v({}, t.title), s = v({}, t.info), n =
|
|
5043
|
+
var f, d, p, y, g, w;
|
|
5044
|
+
const i = v({}, t.title), s = v({}, t.info), n = Qi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5011
5045
|
title: (d = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : d.value,
|
|
5012
5046
|
rule: r.rule,
|
|
5013
5047
|
options: this.options
|
|
5014
|
-
}) : ((
|
|
5048
|
+
}) : ((y = (p = r.refRule) == null ? void 0 : p.__$title) == null ? void 0 : y.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5015
5049
|
if (!Q(s.show) && (s.info || s.native) && !Q(s.icon)) {
|
|
5016
|
-
const
|
|
5050
|
+
const F = {
|
|
5017
5051
|
type: s.type || "popover",
|
|
5018
5052
|
slot: "label",
|
|
5019
|
-
props:
|
|
5053
|
+
props: Ge(s),
|
|
5020
5054
|
key: `${e}pop`
|
|
5021
5055
|
};
|
|
5022
|
-
delete
|
|
5056
|
+
delete F.props.icon, delete F.props.show, delete F.props.info, delete F.props.align, delete F.props.native;
|
|
5023
5057
|
const G = "content";
|
|
5024
|
-
s.info && !D(
|
|
5058
|
+
s.info && !D(F.props, G) && (F.props[G] = (w = (g = r.refRule) == null ? void 0 : g.__$info) == null ? void 0 : w.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(ee([s, F]), [
|
|
5025
5059
|
this.$r({
|
|
5026
5060
|
type: "i",
|
|
5027
5061
|
slot: n ? "default" : "reference",
|
|
@@ -5031,7 +5065,7 @@ const Qi = {
|
|
|
5031
5065
|
]));
|
|
5032
5066
|
}
|
|
5033
5067
|
const u = ee([i, {
|
|
5034
|
-
props:
|
|
5068
|
+
props: Ge(i),
|
|
5035
5069
|
key: `${e}tit`,
|
|
5036
5070
|
class: "fc-form-title",
|
|
5037
5071
|
slot: i.slot || "label",
|
|
@@ -5106,35 +5140,35 @@ const Qi = {
|
|
|
5106
5140
|
key: `${this.key}b1`
|
|
5107
5141
|
}, [e]);
|
|
5108
5142
|
}
|
|
5109
|
-
},
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
function
|
|
5143
|
+
}, he = {};
|
|
5144
|
+
tn(he);
|
|
5145
|
+
rn(he);
|
|
5146
|
+
nn(he);
|
|
5147
|
+
sn(he);
|
|
5148
|
+
on(he);
|
|
5149
|
+
function tn(t) {
|
|
5116
5150
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5117
|
-
t[e] =
|
|
5151
|
+
t[e] = T(e);
|
|
5118
5152
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5119
5153
|
}
|
|
5120
|
-
function
|
|
5154
|
+
function rn(t) {
|
|
5121
5155
|
const e = "select", r = "multiple";
|
|
5122
|
-
t.selectMultiple =
|
|
5156
|
+
t.selectMultiple = T(e, { [r]: !0 }), t.selectOne = T(e, { [r]: !1 });
|
|
5123
5157
|
}
|
|
5124
|
-
function
|
|
5158
|
+
function nn(t) {
|
|
5125
5159
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5126
|
-
Object.keys(r).reduce((i, s) => (i[s] =
|
|
5160
|
+
Object.keys(r).reduce((i, s) => (i[s] = T(e, { type: r[s] }), i), t);
|
|
5127
5161
|
}
|
|
5128
|
-
function
|
|
5162
|
+
function sn(t) {
|
|
5129
5163
|
const e = "upload", r = {
|
|
5130
5164
|
image: ["image", 0],
|
|
5131
5165
|
file: ["file", 0],
|
|
5132
5166
|
uploadFileOne: ["file", 1],
|
|
5133
5167
|
uploadImageOne: ["image", 1]
|
|
5134
5168
|
};
|
|
5135
|
-
Object.keys(r).reduce((i, s) => (i[s] =
|
|
5169
|
+
Object.keys(r).reduce((i, s) => (i[s] = T(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
5136
5170
|
}
|
|
5137
|
-
function
|
|
5171
|
+
function on(t) {
|
|
5138
5172
|
const e = {
|
|
5139
5173
|
frameInputs: ["input", 0],
|
|
5140
5174
|
frameFiles: ["file", 0],
|
|
@@ -5143,12 +5177,12 @@ function nn(t) {
|
|
|
5143
5177
|
frameFileOne: ["file", 1],
|
|
5144
5178
|
frameImageOne: ["image", 1]
|
|
5145
5179
|
};
|
|
5146
|
-
return Object.keys(e).reduce((r, i) => (r[i] =
|
|
5180
|
+
return Object.keys(e).reduce((r, i) => (r[i] = T("frame", (s) => s.props({ type: e[i][0], maxLength: e[i][1] })), r), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages, t;
|
|
5147
5181
|
}
|
|
5148
5182
|
function Ft(t, e) {
|
|
5149
5183
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5150
5184
|
}
|
|
5151
|
-
function
|
|
5185
|
+
function an(t, e) {
|
|
5152
5186
|
return {
|
|
5153
5187
|
formEl() {
|
|
5154
5188
|
return e.$manager.form();
|
|
@@ -5236,21 +5270,21 @@ function sn(t, e) {
|
|
|
5236
5270
|
(e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
|
|
5237
5271
|
let a = t.formData();
|
|
5238
5272
|
e.beforeSubmit(a).then(() => {
|
|
5239
|
-
h.Function(r) &&
|
|
5273
|
+
h.Function(r) && O(() => r(a, t)), h.Function(e.options.onSubmit) && O(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
|
|
5240
5274
|
}).catch((l) => {
|
|
5241
5275
|
});
|
|
5242
5276
|
}).catch((...a) => {
|
|
5243
|
-
h.Function(i) &&
|
|
5277
|
+
h.Function(i) && O(() => i(t, ...a)), n(...a);
|
|
5244
5278
|
});
|
|
5245
5279
|
});
|
|
5246
5280
|
}
|
|
5247
5281
|
};
|
|
5248
5282
|
}
|
|
5249
|
-
const
|
|
5283
|
+
const Wt = {
|
|
5250
5284
|
name: "required",
|
|
5251
5285
|
load(t, e, r) {
|
|
5252
5286
|
var s, n;
|
|
5253
|
-
const i =
|
|
5287
|
+
const i = ln(t.getValue());
|
|
5254
5288
|
if (i.required === !1)
|
|
5255
5289
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5256
5290
|
else {
|
|
@@ -5271,28 +5305,28 @@ const Jt = {
|
|
|
5271
5305
|
r.sync(e);
|
|
5272
5306
|
},
|
|
5273
5307
|
watch(...t) {
|
|
5274
|
-
|
|
5308
|
+
Wt.load(...t);
|
|
5275
5309
|
}
|
|
5276
5310
|
};
|
|
5277
|
-
function
|
|
5311
|
+
function ln(t) {
|
|
5278
5312
|
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 : {};
|
|
5279
5313
|
}
|
|
5280
|
-
function
|
|
5281
|
-
t.componentAlias(
|
|
5314
|
+
function un(t) {
|
|
5315
|
+
t.componentAlias(Xi), qr.forEach((e) => {
|
|
5282
5316
|
t.component(e.name, e);
|
|
5283
|
-
}), t.register(
|
|
5317
|
+
}), t.register(Wt), xi.forEach((e) => {
|
|
5284
5318
|
t.parser(e);
|
|
5285
|
-
}), Object.keys(
|
|
5286
|
-
t.maker[e] =
|
|
5319
|
+
}), Object.keys(he).forEach((e) => {
|
|
5320
|
+
t.maker[e] = he[e];
|
|
5287
5321
|
});
|
|
5288
5322
|
}
|
|
5289
|
-
function
|
|
5290
|
-
return
|
|
5323
|
+
function fn() {
|
|
5324
|
+
return Kt({
|
|
5291
5325
|
ui: "element-ui",
|
|
5292
|
-
version: "2.7.
|
|
5293
|
-
manager:
|
|
5294
|
-
extendApi:
|
|
5295
|
-
install:
|
|
5326
|
+
version: "2.7.9",
|
|
5327
|
+
manager: en,
|
|
5328
|
+
extendApi: an,
|
|
5329
|
+
install: un,
|
|
5296
5330
|
attrs: {
|
|
5297
5331
|
normal: ["col", "wrap"],
|
|
5298
5332
|
array: ["className"],
|
|
@@ -5300,10 +5334,10 @@ function ln() {
|
|
|
5300
5334
|
}
|
|
5301
5335
|
});
|
|
5302
5336
|
}
|
|
5303
|
-
const
|
|
5304
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5305
|
-
const
|
|
5337
|
+
const Ze = fn();
|
|
5338
|
+
typeof window != "undefined" && (window.formCreate = Ze, window.Vue && Ze.install(window.Vue));
|
|
5339
|
+
const dn = Ze.maker;
|
|
5306
5340
|
export {
|
|
5307
|
-
|
|
5308
|
-
|
|
5341
|
+
Ze as default,
|
|
5342
|
+
dn as maker
|
|
5309
5343
|
};
|