@form-create/element-ui 2.7.15 → 2.7.17
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 +678 -649
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +11 -11
- package/src/core/alias.js +1 -0
- package/src/parsers/index.js +2 -0
- package/src/parsers/textarea.js +11 -0
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.17
|
|
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 nr = Object.defineProperty, sr = Object.defineProperties;
|
|
11
|
+
var or = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var at = Object.getOwnPropertySymbols;
|
|
13
|
+
var ar = Object.prototype.hasOwnProperty, lr = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var lt = (t, e, r) => e in t ? nr(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
|
+
ar.call(e, r) && lt(t, r, e[r]);
|
|
17
|
+
if (at)
|
|
18
|
+
for (var r of at(e))
|
|
19
|
+
lr.call(e, r) && lt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
}, q = (t, e) =>
|
|
22
|
-
import $e, { getCurrentInstance as
|
|
23
|
-
function
|
|
21
|
+
}, q = (t, e) => sr(t, or(e));
|
|
22
|
+
import $e, { getCurrentInstance as ur, provide as fr, inject as cr, toRefs as ut, reactive as ne, onBeforeMount as hr, watch as N, onMounted as dr, onBeforeUnmount as pr, onUpdated as mr, nextTick as P, markRaw as ge, computed as ye, toRef as Ae, ref as gr } from "vue";
|
|
23
|
+
function yr(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 $r = ["attrs", "props", "domProps"], br = ["class", "style", "directives"], vr = ["on", "nativeOn"], _r = 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 ($r.indexOf(i) !== -1) e[i] = Je({}, e[i], r[i]);
|
|
36
|
+
else if (br.indexOf(i) !== -1) {
|
|
37
37
|
var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
|
|
38
38
|
e[i] = [].concat(s, n);
|
|
39
|
-
} else if (
|
|
39
|
+
} else if (vr.indexOf(i) !== -1)
|
|
40
40
|
for (var o in r[i]) if (e[i][o]) {
|
|
41
41
|
var a = e[i][o] instanceof Array ? e[i][o] : [e[i][o]], l = r[i][o] instanceof Array ? r[i][o] : [r[i][o]];
|
|
42
42
|
e[i][o] = [].concat(a, l);
|
|
43
43
|
} else e[i][o] = r[i][o];
|
|
44
|
-
else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ?
|
|
44
|
+
else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? Cr(e[i][u], r[i][u]) : r[i][u];
|
|
45
45
|
else e[i] = r[i];
|
|
46
46
|
return e;
|
|
47
47
|
}, {});
|
|
48
|
-
},
|
|
48
|
+
}, Cr = function(t, e) {
|
|
49
49
|
return function() {
|
|
50
50
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
51
51
|
};
|
|
52
|
-
},
|
|
53
|
-
const I = /* @__PURE__ */
|
|
54
|
-
function
|
|
52
|
+
}, wr = _r;
|
|
53
|
+
const I = /* @__PURE__ */ yr(wr);
|
|
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 Or = "fcCheckbox", Fr = {
|
|
58
|
+
name: Or,
|
|
59
59
|
props: {
|
|
60
60
|
formCreateInject: {
|
|
61
61
|
type: Object,
|
|
@@ -117,7 +117,7 @@ const wr = "fcCheckbox", Or = {
|
|
|
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 wr = "fcCheckbox", Or = {
|
|
|
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 kr = "fcFrame", Er = {
|
|
130
|
+
name: kr,
|
|
131
131
|
props: {
|
|
132
132
|
formCreateInject: {
|
|
133
133
|
type: Object,
|
|
@@ -496,8 +496,8 @@ const Fr = "fcFrame", kr = {
|
|
|
496
496
|
mounted() {
|
|
497
497
|
this.$on("fc.closeModal", this.closeModal);
|
|
498
498
|
}
|
|
499
|
-
},
|
|
500
|
-
name:
|
|
499
|
+
}, Rr = "fcRadio", Sr = {
|
|
500
|
+
name: Rr,
|
|
501
501
|
props: {
|
|
502
502
|
formCreateInject: {
|
|
503
503
|
type: Object,
|
|
@@ -556,7 +556,7 @@ const Fr = "fcFrame", kr = {
|
|
|
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 Fr = "fcFrame", kr = {
|
|
|
594
594
|
function j(t, e) {
|
|
595
595
|
return {}.hasOwnProperty.call(t, e);
|
|
596
596
|
}
|
|
597
|
-
const
|
|
598
|
-
name:
|
|
597
|
+
const jr = "fcSelect", Dr = {
|
|
598
|
+
name: jr,
|
|
599
599
|
functional: !0,
|
|
600
600
|
props: {
|
|
601
601
|
formCreateInject: {
|
|
@@ -626,8 +626,8 @@ const Rr = "fcSelect", jr = {
|
|
|
626
626
|
mounted() {
|
|
627
627
|
this.$emit("fc.el", this.$refs.el);
|
|
628
628
|
}
|
|
629
|
-
},
|
|
630
|
-
name:
|
|
629
|
+
}, Ar = "fcTree", Vr = {
|
|
630
|
+
name: Ar,
|
|
631
631
|
formCreateParser: {
|
|
632
632
|
mergeProp(t) {
|
|
633
633
|
const e = t.prop.props;
|
|
@@ -677,31 +677,31 @@ const Rr = "fcSelect", jr = {
|
|
|
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: Ir(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 Ir(t) {
|
|
701
701
|
return ("" + t).split("/").pop();
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
name:
|
|
703
|
+
const Pr = "fcUpload", Tr = {
|
|
704
|
+
name: Pr,
|
|
705
705
|
props: {
|
|
706
706
|
formCreateInject: {
|
|
707
707
|
type: Object,
|
|
@@ -750,11 +750,11 @@ const Ir = "fcUpload", Pr = {
|
|
|
750
750
|
};
|
|
751
751
|
},
|
|
752
752
|
created() {
|
|
753
|
-
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(
|
|
753
|
+
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);
|
|
754
754
|
},
|
|
755
755
|
watch: {
|
|
756
756
|
value(t) {
|
|
757
|
-
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(
|
|
757
|
+
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);
|
|
758
758
|
},
|
|
759
759
|
limit(t, e) {
|
|
760
760
|
(e === 1 || t === 1) && this.update();
|
|
@@ -912,7 +912,7 @@ const Ir = "fcUpload", Pr = {
|
|
|
912
912
|
}), this.$emit("fc.el", this.$refs.upload);
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
|
-
function
|
|
915
|
+
function F(t, e, r) {
|
|
916
916
|
$e.set(t, e, r);
|
|
917
917
|
}
|
|
918
918
|
function ie(t, e) {
|
|
@@ -926,39 +926,143 @@ function Oe(t, e = {}, r) {
|
|
|
926
926
|
if ((i = Array.isArray(n)) || h.Object(n)) {
|
|
927
927
|
let o = t[s] === void 0;
|
|
928
928
|
if (i)
|
|
929
|
-
i = !1, o &&
|
|
929
|
+
i = !1, o && F(t, s, []);
|
|
930
930
|
else if (n._clone && r !== void 0)
|
|
931
931
|
if (r)
|
|
932
|
-
n = n.getRule(), o &&
|
|
932
|
+
n = n.getRule(), o && F(t, s, {});
|
|
933
933
|
else {
|
|
934
|
-
|
|
934
|
+
F(t, s, n._clone());
|
|
935
935
|
continue;
|
|
936
936
|
}
|
|
937
937
|
else
|
|
938
|
-
o &&
|
|
938
|
+
o && F(t, s, {});
|
|
939
939
|
t[s] = Oe(t[s], n, r);
|
|
940
940
|
} else
|
|
941
|
-
|
|
941
|
+
F(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
942
942
|
}
|
|
943
943
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
944
944
|
}
|
|
945
945
|
function K(t) {
|
|
946
946
|
return Oe({}, { value: t }).value;
|
|
947
947
|
}
|
|
948
|
-
const
|
|
948
|
+
const Br = Object.assign || function(t) {
|
|
949
949
|
for (let e, r = 1; r < arguments.length; r++)
|
|
950
950
|
for (let i in e = arguments[r], e)
|
|
951
|
-
Object.prototype.hasOwnProperty.call(e, i) &&
|
|
951
|
+
Object.prototype.hasOwnProperty.call(e, i) && F(t, i, e[i]);
|
|
952
952
|
return t;
|
|
953
953
|
};
|
|
954
954
|
function _() {
|
|
955
|
-
return
|
|
955
|
+
return Br.apply(this, arguments);
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Ke(t) {
|
|
958
958
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
|
|
959
959
|
}
|
|
960
|
-
|
|
961
|
-
|
|
960
|
+
function se(t, e) {
|
|
961
|
+
var r = null;
|
|
962
|
+
return function(...i) {
|
|
963
|
+
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
function Et(t) {
|
|
967
|
+
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
968
|
+
}
|
|
969
|
+
function Lr(t) {
|
|
970
|
+
return t && typeof t == "object" && typeof t.then == "function";
|
|
971
|
+
}
|
|
972
|
+
function Ve(t) {
|
|
973
|
+
return Lr(t) ? t : Promise.resolve(t);
|
|
974
|
+
}
|
|
975
|
+
function be(t) {
|
|
976
|
+
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
977
|
+
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
978
|
+
}
|
|
979
|
+
function Nr(t) {
|
|
980
|
+
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
981
|
+
}
|
|
982
|
+
function Rt(t, e, r) {
|
|
983
|
+
return `[form-create ${t}]: ${e}`;
|
|
984
|
+
}
|
|
985
|
+
function Ye(t, e) {
|
|
986
|
+
console.error(Rt("err", t));
|
|
987
|
+
}
|
|
988
|
+
function Mr(t) {
|
|
989
|
+
Ye(t.toString()), console.error(t);
|
|
990
|
+
}
|
|
991
|
+
const We = "[[FORM-CREATE-PREFIX-", xe = "-FORM-CREATE-SUFFIX]]";
|
|
992
|
+
function we(t, e) {
|
|
993
|
+
return JSON.stringify(Oe(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
994
|
+
if (!(i && i._isVue === !0)) {
|
|
995
|
+
if (typeof i != "function")
|
|
996
|
+
return i;
|
|
997
|
+
if (i.__json)
|
|
998
|
+
return i.__json;
|
|
999
|
+
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1000
|
+
return We + i + xe;
|
|
1001
|
+
}
|
|
1002
|
+
}, e);
|
|
1003
|
+
}
|
|
1004
|
+
function Le(t) {
|
|
1005
|
+
return new Function("return " + t)();
|
|
1006
|
+
}
|
|
1007
|
+
function z(t, e) {
|
|
1008
|
+
if (t && h.String(t) && t.length > 4) {
|
|
1009
|
+
let r = t.trim(), i = !1;
|
|
1010
|
+
try {
|
|
1011
|
+
if (r.indexOf(xe) > 0 && r.indexOf(We) === 0)
|
|
1012
|
+
r = r.replace(xe, "").replace(We, ""), i = !0;
|
|
1013
|
+
else if (r.indexOf("$FN:") === 0)
|
|
1014
|
+
r = r.substring(4), i = !0;
|
|
1015
|
+
else if (r.indexOf("$EXEC:") === 0)
|
|
1016
|
+
r = r.substring(6), i = !0;
|
|
1017
|
+
else if (r.indexOf("$GLOBAL:") === 0) {
|
|
1018
|
+
const n = r.substring(8);
|
|
1019
|
+
return r = function(...o) {
|
|
1020
|
+
const a = o[0].api.getGlobalEvent(n);
|
|
1021
|
+
if (a)
|
|
1022
|
+
return a.call(this, ...o);
|
|
1023
|
+
}, r.__json = t, r.__inject = !0, r;
|
|
1024
|
+
} else {
|
|
1025
|
+
if (r.indexOf("$FNX:") === 0)
|
|
1026
|
+
return r = Le(`function($inject){
|
|
1027
|
+
` + r.substring(5) + `
|
|
1028
|
+
}`), r.__json = t, r.__inject = !0, r;
|
|
1029
|
+
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1030
|
+
}
|
|
1031
|
+
if (!i) return t;
|
|
1032
|
+
let s;
|
|
1033
|
+
try {
|
|
1034
|
+
s = Le(r);
|
|
1035
|
+
} catch (n) {
|
|
1036
|
+
s = Le("function " + r);
|
|
1037
|
+
}
|
|
1038
|
+
return s.__json = t, s;
|
|
1039
|
+
} catch (s) {
|
|
1040
|
+
Ye(`解析失败:${r}
|
|
1041
|
+
|
|
1042
|
+
err: ${s}`);
|
|
1043
|
+
return;
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
return t;
|
|
1047
|
+
}
|
|
1048
|
+
function St(t, e) {
|
|
1049
|
+
return JSON.parse(t, function(r, i) {
|
|
1050
|
+
return h.Undef(i) || !i.indexOf ? i : z(i, e);
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
let qr = 0;
|
|
1054
|
+
function Ie() {
|
|
1055
|
+
const t = 370 + ++qr;
|
|
1056
|
+
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1057
|
+
}
|
|
1058
|
+
function oe(t, e, r) {
|
|
1059
|
+
let i = t, s;
|
|
1060
|
+
return (e || "").split(".").forEach((n) => {
|
|
1061
|
+
s && ((!i[s] || typeof i[s] != "object") && F(i, s, {}), i = i[s]), s = n;
|
|
1062
|
+
}), F(i, s, r), i;
|
|
1063
|
+
}
|
|
1064
|
+
const Ur = "fcGroup", Hr = {
|
|
1065
|
+
name: Ur,
|
|
962
1066
|
props: {
|
|
963
1067
|
field: String,
|
|
964
1068
|
rule: [Array, Object],
|
|
@@ -1140,11 +1244,16 @@ const Br = "fcGroup", Lr = {
|
|
|
1140
1244
|
e.push(this.defaultValue ? K(this.defaultValue) : this.field ? null : {}), this.input(e);
|
|
1141
1245
|
},
|
|
1142
1246
|
del(t, e) {
|
|
1143
|
-
if (this.disabled
|
|
1247
|
+
if (this.disabled)
|
|
1144
1248
|
return;
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1249
|
+
const r = () => {
|
|
1250
|
+
this.removeRule(e, !0);
|
|
1251
|
+
const i = [...this.value];
|
|
1252
|
+
i.splice(t, 1), this.input(i);
|
|
1253
|
+
};
|
|
1254
|
+
Ve(this.onBeforeRemove(this.modelValue, t)).then((i) => {
|
|
1255
|
+
i !== !1 && r();
|
|
1256
|
+
});
|
|
1148
1257
|
},
|
|
1149
1258
|
addIcon(t) {
|
|
1150
1259
|
const e = this.$createElement;
|
|
@@ -1262,8 +1371,8 @@ const Br = "fcGroup", Lr = {
|
|
|
1262
1371
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1263
1372
|
}, [n]);
|
|
1264
1373
|
}
|
|
1265
|
-
},
|
|
1266
|
-
name:
|
|
1374
|
+
}, Gr = "fcSubForm", Jr = {
|
|
1375
|
+
name: Gr,
|
|
1267
1376
|
props: {
|
|
1268
1377
|
rule: Array,
|
|
1269
1378
|
options: Object,
|
|
@@ -1346,31 +1455,17 @@ const Br = "fcGroup", Lr = {
|
|
|
1346
1455
|
}
|
|
1347
1456
|
}]));
|
|
1348
1457
|
}
|
|
1349
|
-
},
|
|
1350
|
-
|
|
1351
|
-
|
|
1458
|
+
}, Kr = [
|
|
1459
|
+
Fr,
|
|
1460
|
+
Er,
|
|
1352
1461
|
Sr,
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
]
|
|
1359
|
-
|
|
1360
|
-
var r = null;
|
|
1361
|
-
return function(...i) {
|
|
1362
|
-
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1363
|
-
};
|
|
1364
|
-
}
|
|
1365
|
-
function be(t) {
|
|
1366
|
-
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1367
|
-
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1368
|
-
}
|
|
1369
|
-
function Ur(t) {
|
|
1370
|
-
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
1371
|
-
}
|
|
1372
|
-
const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], St = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
|
|
1373
|
-
const i = [...kt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...St, ...r.functional || []], o = r.props || [];
|
|
1462
|
+
Dr,
|
|
1463
|
+
Vr,
|
|
1464
|
+
Tr,
|
|
1465
|
+
Hr,
|
|
1466
|
+
Jr
|
|
1467
|
+
], jt = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style", "directives"], At = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
|
|
1468
|
+
const i = [...jt, ...r.normal || []], s = [...Dt, ...r.array || []], n = [...At, ...r.functional || []], o = r.props || [];
|
|
1374
1469
|
return t.reduce((a, l) => {
|
|
1375
1470
|
for (const u in l)
|
|
1376
1471
|
if (a[u])
|
|
@@ -1390,105 +1485,20 @@ const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style"
|
|
|
1390
1485
|
a[u][f] = l[u][f];
|
|
1391
1486
|
else if (u === "hook")
|
|
1392
1487
|
for (let f in l[u])
|
|
1393
|
-
a[u][f] ? a[u][f] =
|
|
1488
|
+
a[u][f] ? a[u][f] = Wr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1394
1489
|
else
|
|
1395
1490
|
a[u] = l[u];
|
|
1396
1491
|
else
|
|
1397
1492
|
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];
|
|
1398
1493
|
return a;
|
|
1399
1494
|
}, e);
|
|
1400
|
-
},
|
|
1495
|
+
}, Wr = (t, e) => function() {
|
|
1401
1496
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1402
|
-
},
|
|
1403
|
-
function
|
|
1404
|
-
return [...
|
|
1405
|
-
}
|
|
1406
|
-
function Dt(t, e, r) {
|
|
1407
|
-
return `[form-create ${t}]: ${e}`;
|
|
1408
|
-
}
|
|
1409
|
-
function et(t, e) {
|
|
1410
|
-
console.error(Dt("err", t));
|
|
1411
|
-
}
|
|
1412
|
-
function Gr(t) {
|
|
1413
|
-
et(t.toString()), console.error(t);
|
|
1414
|
-
}
|
|
1415
|
-
function At(t) {
|
|
1416
|
-
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1417
|
-
}
|
|
1418
|
-
const Ke = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
|
|
1419
|
-
function we(t, e) {
|
|
1420
|
-
return JSON.stringify(Oe(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1421
|
-
if (!(i && i._isVue === !0)) {
|
|
1422
|
-
if (typeof i != "function")
|
|
1423
|
-
return i;
|
|
1424
|
-
if (i.__json)
|
|
1425
|
-
return i.__json;
|
|
1426
|
-
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1427
|
-
return Ke + i + We;
|
|
1428
|
-
}
|
|
1429
|
-
}, e);
|
|
1430
|
-
}
|
|
1431
|
-
function Be(t) {
|
|
1432
|
-
return new Function("return " + t)();
|
|
1433
|
-
}
|
|
1434
|
-
function z(t, e) {
|
|
1435
|
-
if (t && h.String(t) && t.length > 4) {
|
|
1436
|
-
let r = t.trim(), i = !1;
|
|
1437
|
-
try {
|
|
1438
|
-
if (r.indexOf(We) > 0 && r.indexOf(Ke) === 0)
|
|
1439
|
-
r = r.replace(We, "").replace(Ke, ""), i = !0;
|
|
1440
|
-
else if (r.indexOf("$FN:") === 0)
|
|
1441
|
-
r = r.substring(4), i = !0;
|
|
1442
|
-
else if (r.indexOf("$EXEC:") === 0)
|
|
1443
|
-
r = r.substring(6), i = !0;
|
|
1444
|
-
else if (r.indexOf("$GLOBAL:") === 0) {
|
|
1445
|
-
const n = r.substring(8);
|
|
1446
|
-
return r = function(...o) {
|
|
1447
|
-
const a = o[0].api.getGlobalEvent(n);
|
|
1448
|
-
if (a)
|
|
1449
|
-
return a.call(this, ...o);
|
|
1450
|
-
}, r.__json = t, r.__inject = !0, r;
|
|
1451
|
-
} else {
|
|
1452
|
-
if (r.indexOf("$FNX:") === 0)
|
|
1453
|
-
return r = Be(`function($inject){
|
|
1454
|
-
` + r.substring(5) + `
|
|
1455
|
-
}`), r.__json = t, r.__inject = !0, r;
|
|
1456
|
-
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1457
|
-
}
|
|
1458
|
-
if (!i) return t;
|
|
1459
|
-
let s;
|
|
1460
|
-
try {
|
|
1461
|
-
s = Be(r);
|
|
1462
|
-
} catch (n) {
|
|
1463
|
-
s = Be("function " + r);
|
|
1464
|
-
}
|
|
1465
|
-
return s.__json = t, s;
|
|
1466
|
-
} catch (s) {
|
|
1467
|
-
et(`解析失败:${r}
|
|
1468
|
-
|
|
1469
|
-
err: ${s}`);
|
|
1470
|
-
return;
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
return t;
|
|
1474
|
-
}
|
|
1475
|
-
function Vt(t, e) {
|
|
1476
|
-
return JSON.parse(t, function(r, i) {
|
|
1477
|
-
return h.Undef(i) || !i.indexOf ? i : z(i, e);
|
|
1478
|
-
});
|
|
1479
|
-
}
|
|
1480
|
-
let Jr = 0;
|
|
1481
|
-
function Ve() {
|
|
1482
|
-
const t = 370 + ++Jr;
|
|
1483
|
-
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1484
|
-
}
|
|
1485
|
-
function oe(t, e, r) {
|
|
1486
|
-
let i = t, s;
|
|
1487
|
-
return (e || "").split(".").forEach((n) => {
|
|
1488
|
-
s && ((!i[s] || typeof i[s] != "object") && k(i, s, {}), i = i[s]), s = n;
|
|
1489
|
-
}), k(i, s, r), i;
|
|
1497
|
+
}, Vt = ["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"], et = ["validate", "children", "control"], tt = ["effect", "deep", "renderSlots"];
|
|
1498
|
+
function It() {
|
|
1499
|
+
return [...Vt, ...jt, ...Dt, ...At, ...et, ...tt];
|
|
1490
1500
|
}
|
|
1491
|
-
function
|
|
1501
|
+
function ze(t, e) {
|
|
1492
1502
|
return {
|
|
1493
1503
|
value: t,
|
|
1494
1504
|
enumerable: !1,
|
|
@@ -1496,25 +1506,25 @@ function xe(t, e) {
|
|
|
1496
1506
|
writable: !!e
|
|
1497
1507
|
};
|
|
1498
1508
|
}
|
|
1499
|
-
function It(t, e) {
|
|
1500
|
-
return Pt([t], e || !1)[0];
|
|
1501
|
-
}
|
|
1502
1509
|
function Pt(t, e) {
|
|
1510
|
+
return Tt([t], e || !1)[0];
|
|
1511
|
+
}
|
|
1512
|
+
function Tt(t, e) {
|
|
1503
1513
|
return Oe([], [...t], e || !1);
|
|
1504
1514
|
}
|
|
1505
1515
|
function ee(t, e) {
|
|
1506
|
-
return Y(Array.isArray(e) ? e : [e], t, { array:
|
|
1516
|
+
return Y(Array.isArray(e) ? e : [e], t, { array: et, normal: tt }), t;
|
|
1507
1517
|
}
|
|
1508
|
-
function
|
|
1518
|
+
function ht(t) {
|
|
1509
1519
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1510
1520
|
return e.type || (e.type = "input"), e;
|
|
1511
1521
|
}
|
|
1512
|
-
function
|
|
1522
|
+
function xr(t, e) {
|
|
1513
1523
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1514
1524
|
e[r] && (t[r] = ee(t[r] || {}, e[r]));
|
|
1515
1525
|
}), t) : e;
|
|
1516
1526
|
}
|
|
1517
|
-
function
|
|
1527
|
+
function Bt(t, e) {
|
|
1518
1528
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1519
1529
|
get() {
|
|
1520
1530
|
return e[i]();
|
|
@@ -1528,28 +1538,28 @@ function O(t, e) {
|
|
|
1528
1538
|
try {
|
|
1529
1539
|
e = t();
|
|
1530
1540
|
} catch (r) {
|
|
1531
|
-
|
|
1541
|
+
Mr(r);
|
|
1532
1542
|
}
|
|
1533
1543
|
return e;
|
|
1534
1544
|
}
|
|
1535
|
-
function
|
|
1545
|
+
function Xe(t, e) {
|
|
1536
1546
|
let r = null;
|
|
1537
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1547
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1538
1548
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1539
1549
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1540
1550
|
});
|
|
1541
1551
|
}), r;
|
|
1542
1552
|
}
|
|
1543
|
-
function
|
|
1553
|
+
function zr(t, e) {
|
|
1544
1554
|
if (h.Object(t)) {
|
|
1545
1555
|
const r = {};
|
|
1546
1556
|
return Object.keys(t).forEach((i) => {
|
|
1547
|
-
r[i] =
|
|
1557
|
+
r[i] = Xe(t[i], i);
|
|
1548
1558
|
}), r;
|
|
1549
1559
|
} else
|
|
1550
|
-
return
|
|
1560
|
+
return Xe(t, e);
|
|
1551
1561
|
}
|
|
1552
|
-
function
|
|
1562
|
+
function Re() {
|
|
1553
1563
|
const t = {}, e = (r) => r || "default";
|
|
1554
1564
|
return {
|
|
1555
1565
|
setSlot(r, i) {
|
|
@@ -1565,7 +1575,7 @@ function Se() {
|
|
|
1565
1575
|
const n = s();
|
|
1566
1576
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1567
1577
|
} else h.Undef(s) || i.push(s);
|
|
1568
|
-
}),
|
|
1578
|
+
}), zr(i, r);
|
|
1569
1579
|
},
|
|
1570
1580
|
getSlots() {
|
|
1571
1581
|
let r = [];
|
|
@@ -1585,27 +1595,27 @@ function Se() {
|
|
|
1585
1595
|
}
|
|
1586
1596
|
};
|
|
1587
1597
|
}
|
|
1588
|
-
function
|
|
1598
|
+
function Se(t, e) {
|
|
1589
1599
|
return Object.setPrototypeOf(t, e), t;
|
|
1590
1600
|
}
|
|
1591
|
-
const
|
|
1592
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1593
|
-
"!=": (t, e) => !
|
|
1601
|
+
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
|
|
1602
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
|
|
1603
|
+
"!=": (t, e) => !ce["=="](t, e),
|
|
1594
1604
|
">": (t, e) => t > e,
|
|
1595
1605
|
">=": (t, e) => t >= e,
|
|
1596
1606
|
"<": (t, e) => t < e,
|
|
1597
1607
|
"<=": (t, e) => t <= e,
|
|
1598
1608
|
on(t, e) {
|
|
1599
|
-
return t && t.indexOf && t.indexOf(
|
|
1609
|
+
return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
|
|
1600
1610
|
},
|
|
1601
1611
|
notOn(t, e) {
|
|
1602
|
-
return !
|
|
1612
|
+
return !ce.on(t, e);
|
|
1603
1613
|
},
|
|
1604
1614
|
in(t, e) {
|
|
1605
1615
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1606
1616
|
},
|
|
1607
1617
|
notIn(t, e) {
|
|
1608
|
-
return !
|
|
1618
|
+
return !ce.in(t, e);
|
|
1609
1619
|
},
|
|
1610
1620
|
between(t, e) {
|
|
1611
1621
|
return t > e[0] && t < e[1];
|
|
@@ -1628,7 +1638,7 @@ function B(t, e) {
|
|
|
1628
1638
|
t != null && (t = t[r]);
|
|
1629
1639
|
}), t;
|
|
1630
1640
|
}
|
|
1631
|
-
function
|
|
1641
|
+
function Xr(t) {
|
|
1632
1642
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1633
1643
|
let r;
|
|
1634
1644
|
const i = {};
|
|
@@ -1636,20 +1646,20 @@ function xr(t) {
|
|
|
1636
1646
|
r[1] && (i[r[1]] = !0);
|
|
1637
1647
|
return Object.keys(i);
|
|
1638
1648
|
}
|
|
1639
|
-
function
|
|
1649
|
+
function pt(t) {
|
|
1640
1650
|
let e = t.split("."), r = [], i = "";
|
|
1641
1651
|
return e.forEach((s, n) => {
|
|
1642
1652
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1643
1653
|
}), r.join(" && ");
|
|
1644
1654
|
}
|
|
1645
|
-
function
|
|
1655
|
+
function Lt(t) {
|
|
1646
1656
|
const e = [];
|
|
1647
1657
|
let r = "", i = 0;
|
|
1648
1658
|
for (let s = 0; s < t.length; s++) {
|
|
1649
1659
|
const n = t[s];
|
|
1650
1660
|
n === "[" ? (i === 0 && r && (e.push({ type: "key", value: r }), r = ""), i++, r += n) : n === "]" ? (i--, r += n, i === 0 && (e.push({
|
|
1651
1661
|
type: "bracket",
|
|
1652
|
-
value:
|
|
1662
|
+
value: Lt(r.slice(1, -1))
|
|
1653
1663
|
}), r = "")) : n === "." && i === 0 ? r && (e.push({ type: "key", value: r }), r = "") : r += n;
|
|
1654
1664
|
}
|
|
1655
1665
|
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
@@ -1662,7 +1672,7 @@ const je = (t, e) => {
|
|
|
1662
1672
|
return je(t.$parent, e);
|
|
1663
1673
|
}
|
|
1664
1674
|
};
|
|
1665
|
-
function
|
|
1675
|
+
function Zr(t, e, r) {
|
|
1666
1676
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1667
1677
|
return {
|
|
1668
1678
|
name: i,
|
|
@@ -1714,79 +1724,79 @@ function zr(t, e, r) {
|
|
|
1714
1724
|
return this.fc.render();
|
|
1715
1725
|
},
|
|
1716
1726
|
setup(s) {
|
|
1717
|
-
const n =
|
|
1718
|
-
|
|
1719
|
-
const o =
|
|
1727
|
+
const n = ur().proxy;
|
|
1728
|
+
fr("parentFC", n);
|
|
1729
|
+
const o = cr("parentFC", null);
|
|
1720
1730
|
let a = o;
|
|
1721
1731
|
if (o)
|
|
1722
1732
|
for (; a.parent; )
|
|
1723
1733
|
a = a.parent;
|
|
1724
1734
|
else
|
|
1725
1735
|
a = n;
|
|
1726
|
-
const { rule: l, value: u, subForm: f, inFor: p } =
|
|
1736
|
+
const { rule: l, value: u, subForm: f, inFor: p } = ut(s), d = ne({
|
|
1727
1737
|
ctxInject: {},
|
|
1728
1738
|
destroyed: !1,
|
|
1729
1739
|
isShow: !0,
|
|
1730
1740
|
unique: 1,
|
|
1731
1741
|
renderRule: [...l.value || []],
|
|
1732
1742
|
updateValue: JSON.stringify(u.value || {})
|
|
1733
|
-
}), g = new t(n), y = g.api(), C = p.value,
|
|
1743
|
+
}), g = new t(n), y = g.api(), C = p.value, k = () => {
|
|
1734
1744
|
if (o) {
|
|
1735
1745
|
const E = je(n, o);
|
|
1736
1746
|
if (E) {
|
|
1737
|
-
let
|
|
1738
|
-
C ? (
|
|
1747
|
+
let R;
|
|
1748
|
+
C ? (R = H(E.getSubForm()), R.push(y)) : R = y, E.subForm(R);
|
|
1739
1749
|
}
|
|
1740
1750
|
}
|
|
1741
1751
|
}, G = () => {
|
|
1742
1752
|
const E = je(n, o);
|
|
1743
1753
|
if (E)
|
|
1744
1754
|
if (C) {
|
|
1745
|
-
const
|
|
1746
|
-
M > -1 &&
|
|
1755
|
+
const R = H(E.getSubForm()), M = R.indexOf(y);
|
|
1756
|
+
M > -1 && R.splice(M, 1);
|
|
1747
1757
|
} else
|
|
1748
1758
|
E.subForm();
|
|
1749
1759
|
};
|
|
1750
1760
|
let V = null;
|
|
1751
|
-
|
|
1752
|
-
|
|
1761
|
+
hr(() => {
|
|
1762
|
+
N(() => {
|
|
1753
1763
|
let E = "";
|
|
1754
|
-
const
|
|
1755
|
-
Object.keys(
|
|
1756
|
-
let
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
}),
|
|
1764
|
+
const R = s.option && s.option.globalClass || {};
|
|
1765
|
+
Object.keys(R).forEach((M) => {
|
|
1766
|
+
let me = "";
|
|
1767
|
+
R[M].style && Object.keys(R[M].style).forEach((W) => {
|
|
1768
|
+
me += be(W) + ":" + R[M].style[W] + ";";
|
|
1769
|
+
}), R[M].content && (me += R[M].content + ";"), me && (E += `.${M}{${me}}`);
|
|
1760
1770
|
}), 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 || "";
|
|
1761
1771
|
}, () => {
|
|
1762
1772
|
});
|
|
1763
1773
|
});
|
|
1764
|
-
const
|
|
1774
|
+
const L = se(() => {
|
|
1765
1775
|
g.bus.$emit("$loadData.$topForm");
|
|
1766
|
-
}, 100),
|
|
1776
|
+
}, 100), de = se(function() {
|
|
1767
1777
|
g.bus.$emit("$loadData.$scopeForm");
|
|
1768
|
-
}, 100),
|
|
1778
|
+
}, 100), Pe = se(() => {
|
|
1769
1779
|
g.bus.$emit("$loadData.$form");
|
|
1770
|
-
}, 100),
|
|
1780
|
+
}, 100), pe = (E) => {
|
|
1771
1781
|
g.bus.$emit("change-$form." + E);
|
|
1772
1782
|
};
|
|
1773
|
-
return
|
|
1774
|
-
o && (y.top.bus.$on("$loadData.$form",
|
|
1775
|
-
}), dr(() => {
|
|
1776
|
-
o && (y.top.bus.$off("$loadData.$form", N), y.top.bus.$off("change", de)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", he), G(), d.destroyed = !0, g.unmount(), V && (V.parentNode || V.parentElement) && document.head.removeChild(V);
|
|
1783
|
+
return dr(() => {
|
|
1784
|
+
o && (y.top.bus.$on("$loadData.$form", L), y.top.bus.$on("change", pe)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", de), g.mounted();
|
|
1777
1785
|
}), pr(() => {
|
|
1786
|
+
o && (y.top.bus.$off("$loadData.$form", L), y.top.bus.$off("change", pe)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", de), G(), d.destroyed = !0, g.unmount(), V && (V.parentNode || V.parentElement) && document.head.removeChild(V);
|
|
1787
|
+
}), mr(() => {
|
|
1778
1788
|
g.updated();
|
|
1779
|
-
}),
|
|
1780
|
-
E ?
|
|
1781
|
-
}, { immediate: !0 }),
|
|
1789
|
+
}), N(f, (E) => {
|
|
1790
|
+
E ? k() : G();
|
|
1791
|
+
}, { immediate: !0 }), N(() => s.option, () => {
|
|
1782
1792
|
g.initOptions(), y.refresh();
|
|
1783
|
-
}, { deep: !0, flush: "sync" }),
|
|
1784
|
-
g.$handle.isBreakWatch() || E.length === d.renderRule.length && E.every((
|
|
1785
|
-
}),
|
|
1793
|
+
}, { deep: !0, flush: "sync" }), N(() => [...l.value], (E) => {
|
|
1794
|
+
g.$handle.isBreakWatch() || E.length === d.renderRule.length && E.every((R) => d.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
|
|
1795
|
+
}), N(() => [s.disabled, s.preview], () => {
|
|
1786
1796
|
y.refresh();
|
|
1787
|
-
}),
|
|
1797
|
+
}), N(u, (E) => {
|
|
1788
1798
|
we(E || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(E || {}) : y.setValue(E || {}));
|
|
1789
|
-
}, { deep: !0, flush: "post" }),
|
|
1799
|
+
}, { deep: !0, flush: "post" }), N(() => s.index, () => {
|
|
1790
1800
|
y.coverValue({}), g.$handle.updateAppendData(), P(() => {
|
|
1791
1801
|
P(() => {
|
|
1792
1802
|
y.clearValidateState();
|
|
@@ -1797,7 +1807,7 @@ function zr(t, e, r) {
|
|
|
1797
1807
|
parent: o && ge(o),
|
|
1798
1808
|
top: ge(a),
|
|
1799
1809
|
fapi: ge(y)
|
|
1800
|
-
},
|
|
1810
|
+
}, ut(d)), {
|
|
1801
1811
|
getGroupInject: () => je(n, o),
|
|
1802
1812
|
refresh() {
|
|
1803
1813
|
++d.unique;
|
|
@@ -1807,9 +1817,9 @@ function zr(t, e, r) {
|
|
|
1807
1817
|
},
|
|
1808
1818
|
updateValue(E) {
|
|
1809
1819
|
if (d.destroyed) return;
|
|
1810
|
-
const
|
|
1811
|
-
d.updateValue !==
|
|
1812
|
-
|
|
1820
|
+
const R = we(E);
|
|
1821
|
+
d.updateValue !== R && (d.updateValue = R, n.$emit("update:value", E), P(() => {
|
|
1822
|
+
Pe(), o ? f.value || de() : (L(), de());
|
|
1813
1823
|
}));
|
|
1814
1824
|
}
|
|
1815
1825
|
});
|
|
@@ -1819,7 +1829,7 @@ function zr(t, e, r) {
|
|
|
1819
1829
|
}
|
|
1820
1830
|
};
|
|
1821
1831
|
}
|
|
1822
|
-
function
|
|
1832
|
+
function Nt() {
|
|
1823
1833
|
return {
|
|
1824
1834
|
props: {},
|
|
1825
1835
|
on: {},
|
|
@@ -1833,55 +1843,55 @@ function Lt() {
|
|
|
1833
1843
|
}
|
|
1834
1844
|
function T(t, e) {
|
|
1835
1845
|
return (r, i, s, n = {}) => {
|
|
1836
|
-
const o = new
|
|
1846
|
+
const o = new rt(t, r, i, s, n);
|
|
1837
1847
|
return e && (h.Function(e) ? e(o) : o.props(e)), o;
|
|
1838
1848
|
};
|
|
1839
1849
|
}
|
|
1840
|
-
function
|
|
1841
|
-
this._data = _(
|
|
1850
|
+
function rt(t, e, r, i, s) {
|
|
1851
|
+
this._data = _(Nt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1842
1852
|
}
|
|
1843
|
-
_(
|
|
1853
|
+
_(rt.prototype, {
|
|
1844
1854
|
getRule() {
|
|
1845
1855
|
return this._data;
|
|
1846
1856
|
},
|
|
1847
1857
|
setProp(t, e) {
|
|
1848
|
-
return
|
|
1858
|
+
return F(this._data, t, e), this;
|
|
1849
1859
|
},
|
|
1850
1860
|
_clone() {
|
|
1851
1861
|
const t = new this.constructor();
|
|
1852
|
-
return t._data =
|
|
1862
|
+
return t._data = Pt(this._data), t;
|
|
1853
1863
|
}
|
|
1854
1864
|
});
|
|
1855
|
-
function
|
|
1865
|
+
function Mt(t) {
|
|
1856
1866
|
t.forEach((e) => {
|
|
1857
|
-
|
|
1867
|
+
rt.prototype[e] = function(r) {
|
|
1858
1868
|
return ee(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1859
1869
|
};
|
|
1860
1870
|
});
|
|
1861
1871
|
}
|
|
1862
|
-
|
|
1863
|
-
const
|
|
1864
|
-
function
|
|
1865
|
-
let i =
|
|
1872
|
+
Mt(It());
|
|
1873
|
+
const qt = T("");
|
|
1874
|
+
function Qr(t, e, r) {
|
|
1875
|
+
let i = qt("", e);
|
|
1866
1876
|
return i._data.type = t, i._data.title = r, i;
|
|
1867
1877
|
}
|
|
1868
|
-
function
|
|
1869
|
-
let s =
|
|
1878
|
+
function mt(t, e, r, i) {
|
|
1879
|
+
let s = qt("", r);
|
|
1870
1880
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1871
1881
|
}
|
|
1872
|
-
function
|
|
1882
|
+
function Yr() {
|
|
1873
1883
|
return {
|
|
1874
|
-
create:
|
|
1875
|
-
createTmp:
|
|
1876
|
-
template:
|
|
1884
|
+
create: Qr,
|
|
1885
|
+
createTmp: mt,
|
|
1886
|
+
template: mt,
|
|
1877
1887
|
factory: T
|
|
1878
1888
|
};
|
|
1879
1889
|
}
|
|
1880
|
-
function
|
|
1890
|
+
function ei(t, e, r) {
|
|
1881
1891
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1882
1892
|
return s.status = r.status, s.url = t, s;
|
|
1883
1893
|
}
|
|
1884
|
-
function
|
|
1894
|
+
function gt(t) {
|
|
1885
1895
|
const e = t.responseText || t.response;
|
|
1886
1896
|
if (!e)
|
|
1887
1897
|
return e;
|
|
@@ -1891,7 +1901,7 @@ function mt(t) {
|
|
|
1891
1901
|
return e;
|
|
1892
1902
|
}
|
|
1893
1903
|
}
|
|
1894
|
-
function
|
|
1904
|
+
function Ut(t) {
|
|
1895
1905
|
if (typeof XMLHttpRequest == "undefined")
|
|
1896
1906
|
return;
|
|
1897
1907
|
const e = new XMLHttpRequest();
|
|
@@ -1899,15 +1909,15 @@ function qt(t) {
|
|
|
1899
1909
|
if (e.upload && t.onProgress && e.upload.addEventListener("progress", (n) => {
|
|
1900
1910
|
n.percent = n.total > 0 ? n.loaded / n.total * 100 : 0, t.onProgress(n);
|
|
1901
1911
|
}), t.query) {
|
|
1902
|
-
const n =
|
|
1903
|
-
|
|
1912
|
+
const n = h.String(t.query) ? t.query : Object.keys(t.query).reduce((a, l) => (a[l] = t.query[l] === null || t.query[l] === void 0 ? "" : t.query[l], a), {}), o = new URLSearchParams(n).toString();
|
|
1913
|
+
o && (r.includes("?") ? r += `&${o}` : r += `?${o}`);
|
|
1904
1914
|
}
|
|
1905
1915
|
e.onerror = function(o) {
|
|
1906
1916
|
t.onError(o);
|
|
1907
1917
|
}, e.onload = function() {
|
|
1908
1918
|
if (e.status < 200 || e.status >= 300)
|
|
1909
|
-
return t.onError(
|
|
1910
|
-
t.onSuccess(
|
|
1919
|
+
return t.onError(ei(r, t, e), gt(e));
|
|
1920
|
+
t.onSuccess(gt(e));
|
|
1911
1921
|
}, e.open(t.method || "get", r, !0);
|
|
1912
1922
|
let i;
|
|
1913
1923
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
@@ -1918,13 +1928,15 @@ function qt(t) {
|
|
|
1918
1928
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1919
1929
|
}), e.send(i);
|
|
1920
1930
|
}
|
|
1921
|
-
function
|
|
1931
|
+
function yt(t, e, r) {
|
|
1922
1932
|
return new Promise((i, s) => {
|
|
1923
|
-
(e ||
|
|
1933
|
+
(e || Ut)(q(v({}, t), {
|
|
1924
1934
|
onSuccess(n) {
|
|
1925
1935
|
let o = (l) => l;
|
|
1926
1936
|
const a = z(t.parse);
|
|
1927
|
-
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)),
|
|
1937
|
+
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), Ve(o(n, t.targetRule, r)).then((l) => {
|
|
1938
|
+
i(l);
|
|
1939
|
+
});
|
|
1928
1940
|
},
|
|
1929
1941
|
onError(n) {
|
|
1930
1942
|
s(n);
|
|
@@ -1935,7 +1947,7 @@ function gt(t, e, r) {
|
|
|
1935
1947
|
function _e(t) {
|
|
1936
1948
|
return K(t);
|
|
1937
1949
|
}
|
|
1938
|
-
function
|
|
1950
|
+
function ti(t) {
|
|
1939
1951
|
function e(n) {
|
|
1940
1952
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1941
1953
|
}
|
|
@@ -1943,7 +1955,7 @@ function Yr(t) {
|
|
|
1943
1955
|
h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
|
|
1944
1956
|
const u = t.fieldCtx[l] || t.nameCtx[l];
|
|
1945
1957
|
u && u.forEach((f) => {
|
|
1946
|
-
|
|
1958
|
+
F(f.rule, o, a), t.$render.clearCache(f);
|
|
1947
1959
|
});
|
|
1948
1960
|
});
|
|
1949
1961
|
}
|
|
@@ -2036,7 +2048,7 @@ function Yr(t) {
|
|
|
2036
2048
|
if (l) {
|
|
2037
2049
|
const u = j(n, a);
|
|
2038
2050
|
l.forEach((f) => {
|
|
2039
|
-
|
|
2051
|
+
F(f.rule, "value", u ? n[a] : void 0);
|
|
2040
2052
|
}), delete o[a];
|
|
2041
2053
|
}
|
|
2042
2054
|
}), _(t.appendData, o);
|
|
@@ -2049,7 +2061,7 @@ function Yr(t) {
|
|
|
2049
2061
|
const l = t.fieldCtx[a];
|
|
2050
2062
|
if (!l) return t.appendData[a] = o[a];
|
|
2051
2063
|
l.forEach((u) => {
|
|
2052
|
-
|
|
2064
|
+
F(u.rule, "value", o[a]);
|
|
2053
2065
|
});
|
|
2054
2066
|
});
|
|
2055
2067
|
}, !0);
|
|
@@ -2113,7 +2125,7 @@ function Yr(t) {
|
|
|
2113
2125
|
disabled(n, o) {
|
|
2114
2126
|
e(o).forEach((a) => {
|
|
2115
2127
|
t.getCtxs(a).forEach((l) => {
|
|
2116
|
-
|
|
2128
|
+
F(l.rule.props, "disabled", !!n);
|
|
2117
2129
|
});
|
|
2118
2130
|
}), t.refresh();
|
|
2119
2131
|
},
|
|
@@ -2171,7 +2183,7 @@ function Yr(t) {
|
|
|
2171
2183
|
t.$manager.updateOptions(t.options), s.refresh();
|
|
2172
2184
|
},
|
|
2173
2185
|
hideForm: (n) => {
|
|
2174
|
-
|
|
2186
|
+
F(t.vm, "isShow", !n);
|
|
2175
2187
|
},
|
|
2176
2188
|
changeStatus: () => t.changeStatus,
|
|
2177
2189
|
clearChangeStatus: () => {
|
|
@@ -2230,7 +2242,7 @@ function Yr(t) {
|
|
|
2230
2242
|
},
|
|
2231
2243
|
setEffect(n, o, a) {
|
|
2232
2244
|
const l = t.getCtx(n);
|
|
2233
|
-
l && o && (o[0] === "$" && (o = o.substr(1)), j(l.rule, "$" + o) &&
|
|
2245
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), j(l.rule, "$" + o) && F(l.rule, "$" + o, a), j(l.rule, "effect") || F(l.rule, "effect", {}), F(l.rule.effect, o, a));
|
|
2234
2246
|
},
|
|
2235
2247
|
clearEffectData(n, o) {
|
|
2236
2248
|
const a = t.getCtx(n);
|
|
@@ -2263,7 +2275,7 @@ function Yr(t) {
|
|
|
2263
2275
|
method(n, o) {
|
|
2264
2276
|
const a = s.el(n);
|
|
2265
2277
|
if (!a || !a[o])
|
|
2266
|
-
throw new Error(
|
|
2278
|
+
throw new Error(Rt("err", `${o} 方法不存在`));
|
|
2267
2279
|
return (...l) => a[o](...l);
|
|
2268
2280
|
},
|
|
2269
2281
|
exec(n, o, ...a) {
|
|
@@ -2317,7 +2329,7 @@ function Yr(t) {
|
|
|
2317
2329
|
const l = s.getChildrenRuleList(n);
|
|
2318
2330
|
t.deferSyncValue(() => {
|
|
2319
2331
|
l.forEach((u) => {
|
|
2320
|
-
j(o, u.field) ?
|
|
2332
|
+
j(o, u.field) ? F(u, "value", o[u.field]) : a && F(u, "value", void 0);
|
|
2321
2333
|
});
|
|
2322
2334
|
});
|
|
2323
2335
|
},
|
|
@@ -2367,7 +2379,7 @@ function Yr(t) {
|
|
|
2367
2379
|
},
|
|
2368
2380
|
fetch(n) {
|
|
2369
2381
|
return new Promise((o, a) => {
|
|
2370
|
-
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2382
|
+
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((l) => {
|
|
2371
2383
|
O(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2372
2384
|
}).catch((l) => {
|
|
2373
2385
|
O(() => n.onError && n.onError(l)), a(l);
|
|
@@ -2378,7 +2390,7 @@ function Yr(t) {
|
|
|
2378
2390
|
watchFetch(n, o, a, l) {
|
|
2379
2391
|
return t.fc.watchLoadData((u, f) => {
|
|
2380
2392
|
let p = K(n);
|
|
2381
|
-
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() =>
|
|
2393
|
+
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((d) => {
|
|
2382
2394
|
O(() => p.onSuccess && p.onSuccess(d)), o && o(d, f);
|
|
2383
2395
|
}).catch((d) => {
|
|
2384
2396
|
O(() => p.onError && p.onError(d)), a && a(d);
|
|
@@ -2412,7 +2424,7 @@ function Yr(t) {
|
|
|
2412
2424
|
};
|
|
2413
2425
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2414
2426
|
}
|
|
2415
|
-
function
|
|
2427
|
+
function ri(t) {
|
|
2416
2428
|
_(t.prototype, {
|
|
2417
2429
|
initCache() {
|
|
2418
2430
|
this.clearCacheAll();
|
|
@@ -2448,12 +2460,12 @@ function J(t) {
|
|
|
2448
2460
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2449
2461
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2450
2462
|
});
|
|
2451
|
-
return
|
|
2463
|
+
return Ht(e);
|
|
2452
2464
|
}
|
|
2453
|
-
function
|
|
2465
|
+
function Ht(t) {
|
|
2454
2466
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2455
2467
|
}
|
|
2456
|
-
function
|
|
2468
|
+
function ii(t) {
|
|
2457
2469
|
_(t.prototype, {
|
|
2458
2470
|
initRender() {
|
|
2459
2471
|
this.cacheConfig = {};
|
|
@@ -2471,7 +2483,7 @@ function ti(t) {
|
|
|
2471
2483
|
if (!this.vm.isShow)
|
|
2472
2484
|
return;
|
|
2473
2485
|
this.$manager.beforeRender();
|
|
2474
|
-
const e =
|
|
2486
|
+
const e = Re();
|
|
2475
2487
|
return this.sort.forEach((r) => {
|
|
2476
2488
|
this.renderSlot(e, this.$handle.ctxs[r]);
|
|
2477
2489
|
}), this.$manager.render(e);
|
|
@@ -2548,7 +2560,7 @@ function ti(t) {
|
|
|
2548
2560
|
});
|
|
2549
2561
|
const d = this.getTypeSlot(e);
|
|
2550
2562
|
let g;
|
|
2551
|
-
return d ? (u.children = f, g = d(u)) : g = a ? e.parser.preview(
|
|
2563
|
+
return d ? (u.children = f, g = d(u)) : g = a ? e.parser.preview(Ke(f), e) : e.parser.render(Ke(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map((y) => !y || !y.tag ? y : this.none(y)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
|
|
2552
2564
|
}, this.setCache(e, s, r);
|
|
2553
2565
|
}
|
|
2554
2566
|
return (...s) => {
|
|
@@ -2590,11 +2602,11 @@ function ti(t) {
|
|
|
2590
2602
|
},
|
|
2591
2603
|
injectProp(e) {
|
|
2592
2604
|
const r = this.vm;
|
|
2593
|
-
r.ctxInject[e.id] || (r.ctxInject
|
|
2605
|
+
r.ctxInject[e.id] || F(r.ctxInject, e.id, {
|
|
2594
2606
|
api: this.$handle.api,
|
|
2595
2607
|
form: this.fc.create,
|
|
2596
|
-
subForm: (
|
|
2597
|
-
this.$handle.addSubForm(e,
|
|
2608
|
+
subForm: (n) => {
|
|
2609
|
+
this.$handle.addSubForm(e, n);
|
|
2598
2610
|
},
|
|
2599
2611
|
getSubForm: () => this.$handle.subForm[e.id],
|
|
2600
2612
|
slots: () => this.vm.top.$scopedSlots,
|
|
@@ -2606,20 +2618,22 @@ function ti(t) {
|
|
|
2606
2618
|
field: e.field,
|
|
2607
2619
|
rule: e.rule,
|
|
2608
2620
|
input: e.input,
|
|
2609
|
-
t: (...
|
|
2610
|
-
updateValue: (
|
|
2611
|
-
this.$handle.onUpdateValue(e,
|
|
2621
|
+
t: (...n) => this.$handle.api.t(...n),
|
|
2622
|
+
updateValue: (n) => {
|
|
2623
|
+
this.$handle.onUpdateValue(e, n);
|
|
2612
2624
|
}
|
|
2613
2625
|
});
|
|
2614
|
-
const i = r.ctxInject[e.id]
|
|
2615
|
-
return _(i, {
|
|
2626
|
+
const i = r.ctxInject[e.id], s = {
|
|
2616
2627
|
preview: e.prop.preview,
|
|
2617
2628
|
options: e.prop.options,
|
|
2618
2629
|
prop: function() {
|
|
2619
|
-
const
|
|
2620
|
-
return
|
|
2630
|
+
const n = v({}, e.prop);
|
|
2631
|
+
return n.on = n.on ? v({}, n.on) : {}, delete n.model, n;
|
|
2621
2632
|
}(),
|
|
2622
2633
|
children: e.loadChildrenPending()
|
|
2634
|
+
};
|
|
2635
|
+
return Object.keys(s).forEach((n) => {
|
|
2636
|
+
F(i, n, s[n]);
|
|
2623
2637
|
}), i;
|
|
2624
2638
|
},
|
|
2625
2639
|
ctxProp(e) {
|
|
@@ -2686,7 +2700,7 @@ function ti(t) {
|
|
|
2686
2700
|
},
|
|
2687
2701
|
renderChildren(e, r, i) {
|
|
2688
2702
|
if (!h.trueArray(e)) return [];
|
|
2689
|
-
const s =
|
|
2703
|
+
const s = Re();
|
|
2690
2704
|
return e.map((n) => {
|
|
2691
2705
|
if (n) {
|
|
2692
2706
|
if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
|
|
@@ -2703,7 +2717,7 @@ function ti(t) {
|
|
|
2703
2717
|
},
|
|
2704
2718
|
defaultRender(e, r) {
|
|
2705
2719
|
const i = e.prop;
|
|
2706
|
-
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(
|
|
2720
|
+
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(Ht(i.type), i, r);
|
|
2707
2721
|
},
|
|
2708
2722
|
createChildrenVnodes(e, r, i) {
|
|
2709
2723
|
this.force = i !== !1, this.tmpInput = r;
|
|
@@ -2712,7 +2726,7 @@ function ti(t) {
|
|
|
2712
2726
|
},
|
|
2713
2727
|
createRuleVnode(e, r, i) {
|
|
2714
2728
|
this.force = i !== !1, this.tmpInput = r;
|
|
2715
|
-
const s =
|
|
2729
|
+
const s = Re();
|
|
2716
2730
|
return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
|
|
2717
2731
|
},
|
|
2718
2732
|
renderRule(e, r, i) {
|
|
@@ -2727,7 +2741,7 @@ function ti(t) {
|
|
|
2727
2741
|
a && (s = J(a));
|
|
2728
2742
|
}
|
|
2729
2743
|
if (!s) return;
|
|
2730
|
-
const n =
|
|
2744
|
+
const n = Re();
|
|
2731
2745
|
h.trueArray(e.children) && e.children.forEach((a) => {
|
|
2732
2746
|
a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2733
2747
|
});
|
|
@@ -2736,8 +2750,8 @@ function ti(t) {
|
|
|
2736
2750
|
}
|
|
2737
2751
|
});
|
|
2738
2752
|
}
|
|
2739
|
-
let
|
|
2740
|
-
function
|
|
2753
|
+
let ni = 1;
|
|
2754
|
+
function it(t) {
|
|
2741
2755
|
_(this, {
|
|
2742
2756
|
$handle: t,
|
|
2743
2757
|
fc: t.fc,
|
|
@@ -2746,8 +2760,8 @@ function rt(t) {
|
|
|
2746
2760
|
vNode: new t.fc.CreateNode(t),
|
|
2747
2761
|
force: !1,
|
|
2748
2762
|
tmpInput: null,
|
|
2749
|
-
id:
|
|
2750
|
-
}),
|
|
2763
|
+
id: ni++
|
|
2764
|
+
}), Bt(this, {
|
|
2751
2765
|
options() {
|
|
2752
2766
|
return t.options;
|
|
2753
2767
|
},
|
|
@@ -2756,9 +2770,9 @@ function rt(t) {
|
|
|
2756
2770
|
}
|
|
2757
2771
|
}), this.initCache(), this.initRender();
|
|
2758
2772
|
}
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
function
|
|
2773
|
+
ri(it);
|
|
2774
|
+
ii(it);
|
|
2775
|
+
function si(t) {
|
|
2762
2776
|
_(t.prototype, {
|
|
2763
2777
|
parseInjectEvent(e, r) {
|
|
2764
2778
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2825,7 +2839,7 @@ function ii(t) {
|
|
|
2825
2839
|
},
|
|
2826
2840
|
loadStrVar(e, r, i) {
|
|
2827
2841
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2828
|
-
const s = e, n =
|
|
2842
|
+
const s = e, n = Xr(e), o = (u) => {
|
|
2829
2843
|
let f = !1, p;
|
|
2830
2844
|
if (i && u.indexOf("$form.") === 0) {
|
|
2831
2845
|
const d = u.split(".");
|
|
@@ -2849,7 +2863,7 @@ function ii(t) {
|
|
|
2849
2863
|
if (n.forEach((u) => {
|
|
2850
2864
|
const f = u.split("||"), p = f[0].trim();
|
|
2851
2865
|
if (p) {
|
|
2852
|
-
const d = (f[1] || "").trim(), g =
|
|
2866
|
+
const d = (f[1] || "").trim(), g = Lt(p);
|
|
2853
2867
|
let y = O(() => a(g));
|
|
2854
2868
|
(y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2855
2869
|
}
|
|
@@ -2864,7 +2878,7 @@ function ii(t) {
|
|
|
2864
2878
|
const n = (o) => this.loadStrVar(o, r, s ? { rule: i, value: this.subRuleData[s.id] || {} } : null);
|
|
2865
2879
|
return e.action = n(e.action || ""), ["headers", "data", "query"].forEach((o) => {
|
|
2866
2880
|
if (e[o]) {
|
|
2867
|
-
const a = {};
|
|
2881
|
+
const a = Array.isArray(e[o]) ? [] : {};
|
|
2868
2882
|
Object.keys(e[o]).forEach((l) => {
|
|
2869
2883
|
a[n(l)] = n(e[o][l]);
|
|
2870
2884
|
}), e[o] = a;
|
|
@@ -2873,13 +2887,13 @@ function ii(t) {
|
|
|
2873
2887
|
}
|
|
2874
2888
|
});
|
|
2875
2889
|
}
|
|
2876
|
-
const
|
|
2877
|
-
function
|
|
2890
|
+
const $t = ["hook:updated", "hook:mounted"];
|
|
2891
|
+
function oi(t) {
|
|
2878
2892
|
_(t.prototype, {
|
|
2879
2893
|
usePage() {
|
|
2880
2894
|
const e = this.options.page;
|
|
2881
2895
|
if (!e) return;
|
|
2882
|
-
let r = 25, i =
|
|
2896
|
+
let r = 25, i = ai(this.rules);
|
|
2883
2897
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), _(this, {
|
|
2884
2898
|
first: r,
|
|
2885
2899
|
limit: i,
|
|
@@ -2888,16 +2902,16 @@ function ni(t) {
|
|
|
2888
2902
|
},
|
|
2889
2903
|
pageLoad() {
|
|
2890
2904
|
const e = () => {
|
|
2891
|
-
this.pageEnd ? (this.vm.$off(
|
|
2905
|
+
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());
|
|
2892
2906
|
};
|
|
2893
|
-
this.vm.$on(
|
|
2907
|
+
this.vm.$on($t, e);
|
|
2894
2908
|
}
|
|
2895
2909
|
});
|
|
2896
2910
|
}
|
|
2897
|
-
function
|
|
2911
|
+
function ai(t) {
|
|
2898
2912
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2899
2913
|
}
|
|
2900
|
-
function
|
|
2914
|
+
function li(t) {
|
|
2901
2915
|
_(t.prototype, {
|
|
2902
2916
|
clearNextTick() {
|
|
2903
2917
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2912,15 +2926,15 @@ function oi(t) {
|
|
|
2912
2926
|
}
|
|
2913
2927
|
});
|
|
2914
2928
|
}
|
|
2915
|
-
function
|
|
2929
|
+
function ui(t) {
|
|
2916
2930
|
Object.defineProperties(t.origin, {
|
|
2917
|
-
__fc__:
|
|
2931
|
+
__fc__: ze(ge(t), !0)
|
|
2918
2932
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2919
|
-
__fc__:
|
|
2933
|
+
__fc__: ze(ge(t), !0)
|
|
2920
2934
|
});
|
|
2921
2935
|
}
|
|
2922
|
-
function
|
|
2923
|
-
const i =
|
|
2936
|
+
function Gt(t, e, r) {
|
|
2937
|
+
const i = Ie(), s = !!e.field;
|
|
2924
2938
|
_(this, {
|
|
2925
2939
|
id: i,
|
|
2926
2940
|
ref: i,
|
|
@@ -2947,9 +2961,9 @@ function Ht(t, e, r) {
|
|
|
2947
2961
|
exportEl: void 0,
|
|
2948
2962
|
defaultValue: s ? K(r) : void 0,
|
|
2949
2963
|
field: e.field || void 0
|
|
2950
|
-
}), this.updateKey(),
|
|
2964
|
+
}), this.updateKey(), ui(this), this.update(t, !0);
|
|
2951
2965
|
}
|
|
2952
|
-
_(
|
|
2966
|
+
_(Gt.prototype, {
|
|
2953
2967
|
getParentGroup() {
|
|
2954
2968
|
let t = this.parent;
|
|
2955
2969
|
for (; t; ) {
|
|
@@ -3019,7 +3033,7 @@ _(Ht.prototype, {
|
|
|
3019
3033
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
3020
3034
|
},
|
|
3021
3035
|
updateKey(t) {
|
|
3022
|
-
this.key =
|
|
3036
|
+
this.key = Ie(), t && this.parent && this.parent.updateKey(t);
|
|
3023
3037
|
},
|
|
3024
3038
|
updateType() {
|
|
3025
3039
|
this.originType = this.rule.type, this.type = J(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -3045,7 +3059,9 @@ _(Ht.prototype, {
|
|
|
3045
3059
|
return this.vm === t.vm;
|
|
3046
3060
|
},
|
|
3047
3061
|
unwatch() {
|
|
3048
|
-
this.watch.forEach((t) => t()), this.watch = [], this.refRule
|
|
3062
|
+
this.watch.forEach((t) => t()), this.watch = [], Object.keys(this.refRule).forEach((t) => {
|
|
3063
|
+
t.indexOf("__$") !== 0 && delete this.refRule[t];
|
|
3064
|
+
});
|
|
3049
3065
|
},
|
|
3050
3066
|
unlink() {
|
|
3051
3067
|
this.linkOn.forEach((t) => t()), this.linkOn = [];
|
|
@@ -3099,7 +3115,7 @@ _(Ht.prototype, {
|
|
|
3099
3115
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3100
3116
|
}
|
|
3101
3117
|
});
|
|
3102
|
-
function
|
|
3118
|
+
function fi(t) {
|
|
3103
3119
|
_(t.prototype, {
|
|
3104
3120
|
nextRefresh(e) {
|
|
3105
3121
|
const r = this.loadedId;
|
|
@@ -3108,10 +3124,10 @@ function li(t) {
|
|
|
3108
3124
|
});
|
|
3109
3125
|
},
|
|
3110
3126
|
parseRule(e) {
|
|
3111
|
-
const r =
|
|
3127
|
+
const r = ht(e);
|
|
3112
3128
|
return Object.defineProperties(r, {
|
|
3113
|
-
__origin__:
|
|
3114
|
-
}),
|
|
3129
|
+
__origin__: ze(e, !0)
|
|
3130
|
+
}), ci(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3115
3131
|
i && this.loadFn(i, r);
|
|
3116
3132
|
}), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
|
|
3117
3133
|
},
|
|
@@ -3158,32 +3174,32 @@ function li(t) {
|
|
|
3158
3174
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3159
3175
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3160
3176
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3161
|
-
let l =
|
|
3177
|
+
let l = ht(o);
|
|
3162
3178
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3163
3179
|
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);
|
|
3164
3180
|
let f, p = !1, d = !!o.__fc__, g = l.value;
|
|
3165
3181
|
if (d) {
|
|
3166
3182
|
if (f = o.__fc__, g = f.defaultValue, f.deleted) {
|
|
3167
|
-
if (
|
|
3183
|
+
if (bt(f))
|
|
3168
3184
|
return;
|
|
3169
3185
|
f.update(this);
|
|
3170
3186
|
} else if (!f.check(this)) {
|
|
3171
|
-
if (
|
|
3187
|
+
if (bt(f))
|
|
3172
3188
|
return;
|
|
3173
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3189
|
+
e[a] = o = o._clone ? o._clone() : St(we(o)), f = null, p = !0;
|
|
3174
3190
|
}
|
|
3175
3191
|
}
|
|
3176
3192
|
if (f)
|
|
3177
3193
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3178
3194
|
else {
|
|
3179
|
-
const
|
|
3180
|
-
f = new
|
|
3195
|
+
const k = this.parseRule(o);
|
|
3196
|
+
f = new Gt(this, k, g), this.bindParser(f);
|
|
3181
3197
|
}
|
|
3182
|
-
[!1, !0].forEach((
|
|
3198
|
+
[!1, !0].forEach((k) => this.parseEmit(f, k)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !p && !d && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3183
3199
|
const y = f.loadChildrenPending();
|
|
3184
3200
|
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3185
|
-
const
|
|
3186
|
-
|
|
3201
|
+
const k = i(a);
|
|
3202
|
+
k > -1 || !a ? this.sort.splice(k + 1, 0, f.id) : this.sort.push(f.id);
|
|
3187
3203
|
}
|
|
3188
3204
|
const C = f.rule;
|
|
3189
3205
|
return f.updated || (f.updated = !0, h.Function(C.update) && this.bus.$once("load-end", () => {
|
|
@@ -3196,16 +3212,16 @@ function li(t) {
|
|
|
3196
3212
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3197
3213
|
},
|
|
3198
3214
|
useCtrl(e) {
|
|
3199
|
-
const r =
|
|
3215
|
+
const r = hi(e), i = [], s = this.api;
|
|
3200
3216
|
if (!r.length) return !1;
|
|
3201
3217
|
for (let a = 0; a < r.length; a++) {
|
|
3202
3218
|
const l = r[a], u = l.handle || function(p) {
|
|
3203
|
-
return (
|
|
3219
|
+
return (ce[l.condition || "=="] || ce["=="])(p, l.value);
|
|
3204
3220
|
};
|
|
3205
3221
|
if (!h.trueArray(l.rule)) continue;
|
|
3206
3222
|
const f = q(v({}, l), {
|
|
3207
3223
|
valid: O(() => u(e.rule.value, s)),
|
|
3208
|
-
ctrl:
|
|
3224
|
+
ctrl: di(e, l.rule),
|
|
3209
3225
|
isHidden: h.String(l.rule[0])
|
|
3210
3226
|
});
|
|
3211
3227
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3268,27 +3284,27 @@ function li(t) {
|
|
|
3268
3284
|
}
|
|
3269
3285
|
});
|
|
3270
3286
|
}
|
|
3271
|
-
function
|
|
3272
|
-
const e =
|
|
3287
|
+
function ci(t) {
|
|
3288
|
+
const e = Nt();
|
|
3273
3289
|
return Object.keys(e).forEach((r) => {
|
|
3274
|
-
j(t, r) ||
|
|
3290
|
+
j(t, r) || F(t, r, e[r]);
|
|
3275
3291
|
}), t;
|
|
3276
3292
|
}
|
|
3277
|
-
function
|
|
3293
|
+
function hi(t) {
|
|
3278
3294
|
const e = t.rule.control || [];
|
|
3279
3295
|
return h.Object(e) ? [e] : e;
|
|
3280
3296
|
}
|
|
3281
|
-
function
|
|
3297
|
+
function di(t, e) {
|
|
3282
3298
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3283
3299
|
const i = t.ctrlRule[r];
|
|
3284
3300
|
if (i.children === e)
|
|
3285
3301
|
return i;
|
|
3286
3302
|
}
|
|
3287
3303
|
}
|
|
3288
|
-
function
|
|
3304
|
+
function bt(t) {
|
|
3289
3305
|
return !!t.rule.__ctrl;
|
|
3290
3306
|
}
|
|
3291
|
-
function
|
|
3307
|
+
function pi(t) {
|
|
3292
3308
|
_(t.prototype, {
|
|
3293
3309
|
setValue(e, r, i, s) {
|
|
3294
3310
|
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, {
|
|
@@ -3321,7 +3337,7 @@ function hi(t) {
|
|
|
3321
3337
|
setFormData(e, r) {
|
|
3322
3338
|
e.modelValue = r;
|
|
3323
3339
|
const i = e.getParentGroup();
|
|
3324
|
-
i && (this.subRuleData[i.id] ||
|
|
3340
|
+
i && (this.subRuleData[i.id] || F(this.subRuleData, i.id, {}), F(this.subRuleData[i.id], e.field, e.rule.value)), F(this.formData, e.id, r);
|
|
3325
3341
|
},
|
|
3326
3342
|
rmSubRuleData(e) {
|
|
3327
3343
|
const r = e.getParentGroup();
|
|
@@ -3341,7 +3357,7 @@ function hi(t) {
|
|
|
3341
3357
|
return e.rule.ignore === !0 || (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields) && e.hasHidden();
|
|
3342
3358
|
},
|
|
3343
3359
|
appendValue(e) {
|
|
3344
|
-
(!e.field || !j(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3360
|
+
(!e.field || !j(this.appendData, e.field)) && (!h.Undef(e.value) || !this.options.forceCoverValue) || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3345
3361
|
},
|
|
3346
3362
|
addSubForm(e, r) {
|
|
3347
3363
|
this.subForm[e.id] = r;
|
|
@@ -3358,7 +3374,7 @@ function hi(t) {
|
|
|
3358
3374
|
}), this.vm.updateValue(e);
|
|
3359
3375
|
},
|
|
3360
3376
|
isChange(e, r) {
|
|
3361
|
-
return JSON.stringify(this.getFormData(e),
|
|
3377
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3362
3378
|
},
|
|
3363
3379
|
isQuote(e, r) {
|
|
3364
3380
|
return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -3391,7 +3407,7 @@ function hi(t) {
|
|
|
3391
3407
|
}
|
|
3392
3408
|
});
|
|
3393
3409
|
}
|
|
3394
|
-
function
|
|
3410
|
+
function vt(t, e) {
|
|
3395
3411
|
return typeof e == "function" ? "" + e : e;
|
|
3396
3412
|
}
|
|
3397
3413
|
const De = {
|
|
@@ -3413,8 +3429,8 @@ const De = {
|
|
|
3413
3429
|
},
|
|
3414
3430
|
mergeProp(t) {
|
|
3415
3431
|
}
|
|
3416
|
-
},
|
|
3417
|
-
function
|
|
3432
|
+
}, mi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Ce = Symbol("oldValue");
|
|
3433
|
+
function gi(t) {
|
|
3418
3434
|
_(t.prototype, {
|
|
3419
3435
|
getCtx(e) {
|
|
3420
3436
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3462,9 +3478,9 @@ function pi(t) {
|
|
|
3462
3478
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3463
3479
|
},
|
|
3464
3480
|
watchCtx(e) {
|
|
3465
|
-
if (
|
|
3481
|
+
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && mi.indexOf(i) === -1).forEach((i) => {
|
|
3466
3482
|
const s = Ae(e.rule, i), n = i === "children";
|
|
3467
|
-
e.refRule[i] = s, e.watch.push(
|
|
3483
|
+
e.refRule[i] = s, e.watch.push(N(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3468
3484
|
let l = s.value;
|
|
3469
3485
|
if (!this.isBreakWatch()) {
|
|
3470
3486
|
if (n && e.parser.loadChildren === !1) {
|
|
@@ -3531,7 +3547,7 @@ function pi(t) {
|
|
|
3531
3547
|
});
|
|
3532
3548
|
}), e.input) {
|
|
3533
3549
|
const i = Ae(e.rule, "value");
|
|
3534
|
-
e.watch.push(
|
|
3550
|
+
e.watch.push(N(() => i.value, () => {
|
|
3535
3551
|
let s = e.parser.toFormValue(i.value, e);
|
|
3536
3552
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
3537
3553
|
}));
|
|
@@ -3547,7 +3563,7 @@ function pi(t) {
|
|
|
3547
3563
|
}), o = (a) => {
|
|
3548
3564
|
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : oe(e.rule, s, a);
|
|
3549
3565
|
};
|
|
3550
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== B(e.rule, s)) && o(n.value), e.watch.push(
|
|
3566
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== B(e.rule, s)) && o(n.value), e.watch.push(N(n, (a, l) => {
|
|
3551
3567
|
a === Ce || a === l || setTimeout(() => {
|
|
3552
3568
|
o(a);
|
|
3553
3569
|
});
|
|
@@ -3682,11 +3698,11 @@ function pi(t) {
|
|
|
3682
3698
|
if (p.variable)
|
|
3683
3699
|
g = JSON.stringify(this.fc.getLoadData(p.variable)) || "";
|
|
3684
3700
|
else if (p.field)
|
|
3685
|
-
g =
|
|
3701
|
+
g = pt(p.field || "");
|
|
3686
3702
|
else if (!p.mode)
|
|
3687
3703
|
return !0;
|
|
3688
3704
|
let y = p.compare;
|
|
3689
|
-
if (y && (y =
|
|
3705
|
+
if (y && (y = pt(y || "")), p.mode ? d = n(p) : ce[p.condition] ? h.Function(p.handler) ? d = O(() => p.handler(this.api, e.rule)) : d = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${y || "$val"}); }}}}`).call(this.api.form, ce, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : d = !1, l && d)
|
|
3690
3706
|
return !0;
|
|
3691
3707
|
l || (u = u && d);
|
|
3692
3708
|
}
|
|
@@ -3695,7 +3711,7 @@ function pi(t) {
|
|
|
3695
3711
|
let o = n(r);
|
|
3696
3712
|
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : Ce : r.linkageVariable ? o ? O(() => this.fc.getLoadData(r.linkageVariable), void 0) : Ce : o;
|
|
3697
3713
|
} else if (h.Function(r))
|
|
3698
|
-
i = () => r(this.api.form, this.api);
|
|
3714
|
+
i = () => r(this.api.form, this.api, e.rule);
|
|
3699
3715
|
else {
|
|
3700
3716
|
const s = e.getParentGroup();
|
|
3701
3717
|
i = () => this.computeValue(r, e, s);
|
|
@@ -3744,7 +3760,7 @@ function pi(t) {
|
|
|
3744
3760
|
}
|
|
3745
3761
|
});
|
|
3746
3762
|
}
|
|
3747
|
-
function
|
|
3763
|
+
function yi(t) {
|
|
3748
3764
|
_(t.prototype, {
|
|
3749
3765
|
mounted() {
|
|
3750
3766
|
const e = () => {
|
|
@@ -3778,7 +3794,7 @@ function mi(t) {
|
|
|
3778
3794
|
}));
|
|
3779
3795
|
};
|
|
3780
3796
|
n(s);
|
|
3781
|
-
let o = "deep" +
|
|
3797
|
+
let o = "deep" + Nr(r), a = e.parent;
|
|
3782
3798
|
for (; a; ) {
|
|
3783
3799
|
let d = (p = (f = a.prop) == null ? void 0 : f.hook) == null ? void 0 : p[o];
|
|
3784
3800
|
n(d, a), a = a.parent;
|
|
@@ -3786,13 +3802,13 @@ function mi(t) {
|
|
|
3786
3802
|
}
|
|
3787
3803
|
});
|
|
3788
3804
|
}
|
|
3789
|
-
function
|
|
3805
|
+
function $i(t) {
|
|
3790
3806
|
_(t.prototype, {
|
|
3791
3807
|
useProvider() {
|
|
3792
3808
|
const e = this.fc.providers;
|
|
3793
3809
|
Object.keys(e).forEach((r) => {
|
|
3794
3810
|
let i = e[r];
|
|
3795
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3811
|
+
h.Function(i) && (i = i(this.fc)), i._c = vi(i), this.onEffect(i, r), this.providers[r] = i;
|
|
3796
3812
|
});
|
|
3797
3813
|
},
|
|
3798
3814
|
onEffect(e, r) {
|
|
@@ -3816,7 +3832,7 @@ function gi(t) {
|
|
|
3816
3832
|
}), Object.keys(e.rule).forEach((i) => {
|
|
3817
3833
|
i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
|
|
3818
3834
|
}), Object.keys(r).forEach((i) => {
|
|
3819
|
-
e.watch.push(
|
|
3835
|
+
e.watch.push(N(r[i], (s) => {
|
|
3820
3836
|
this.effect(e, "watch", { [i]: s });
|
|
3821
3837
|
}, { deep: !0 }));
|
|
3822
3838
|
});
|
|
@@ -3862,20 +3878,20 @@ function gi(t) {
|
|
|
3862
3878
|
}
|
|
3863
3879
|
});
|
|
3864
3880
|
}
|
|
3865
|
-
function
|
|
3881
|
+
function bi(t) {
|
|
3866
3882
|
return t.filter(function(e, r, i) {
|
|
3867
3883
|
return i.indexOf(e, 0) === r;
|
|
3868
3884
|
});
|
|
3869
3885
|
}
|
|
3870
|
-
function
|
|
3886
|
+
function vi(t) {
|
|
3871
3887
|
const e = t.components;
|
|
3872
3888
|
if (Array.isArray(e)) {
|
|
3873
|
-
const r =
|
|
3889
|
+
const r = bi(e.filter((i) => i !== "*"));
|
|
3874
3890
|
return r.length ? r : !1;
|
|
3875
3891
|
} else return h.String(e) ? [e] : !1;
|
|
3876
3892
|
}
|
|
3877
3893
|
function X(t) {
|
|
3878
|
-
|
|
3894
|
+
Bt(this, {
|
|
3879
3895
|
options() {
|
|
3880
3896
|
return t.options.value || {};
|
|
3881
3897
|
},
|
|
@@ -3909,10 +3925,10 @@ function X(t) {
|
|
|
3909
3925
|
nextReload: () => {
|
|
3910
3926
|
this.lifecycle("reload");
|
|
3911
3927
|
}
|
|
3912
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3928
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3913
3929
|
const i = O(() => r(e, this));
|
|
3914
3930
|
return i && i !== e && _(e, i), e;
|
|
3915
|
-
},
|
|
3931
|
+
}, ti(this));
|
|
3916
3932
|
}
|
|
3917
3933
|
_(X.prototype, {
|
|
3918
3934
|
initData(t) {
|
|
@@ -3952,26 +3968,26 @@ _(X.prototype, {
|
|
|
3952
3968
|
});
|
|
3953
3969
|
}
|
|
3954
3970
|
});
|
|
3955
|
-
|
|
3956
|
-
ni(X);
|
|
3971
|
+
si(X);
|
|
3957
3972
|
oi(X);
|
|
3958
3973
|
li(X);
|
|
3959
|
-
|
|
3974
|
+
fi(X);
|
|
3960
3975
|
pi(X);
|
|
3961
|
-
mi(X);
|
|
3962
3976
|
gi(X);
|
|
3963
|
-
|
|
3964
|
-
|
|
3977
|
+
yi(X);
|
|
3978
|
+
$i(X);
|
|
3979
|
+
const _i = "fcFragment", Ne = {
|
|
3980
|
+
name: _i,
|
|
3965
3981
|
functional: !0,
|
|
3966
3982
|
props: ["vnode"],
|
|
3967
3983
|
render(t, e) {
|
|
3968
3984
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3969
3985
|
}
|
|
3970
3986
|
};
|
|
3971
|
-
function
|
|
3987
|
+
function Ci(t) {
|
|
3972
3988
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3973
3989
|
}
|
|
3974
|
-
function
|
|
3990
|
+
function wi() {
|
|
3975
3991
|
const t = {};
|
|
3976
3992
|
function e(r) {
|
|
3977
3993
|
r && this.setVm(r);
|
|
@@ -3988,7 +4004,7 @@ function _i() {
|
|
|
3988
4004
|
var a;
|
|
3989
4005
|
const n = this.handle.fc.prop.components[r];
|
|
3990
4006
|
n && (r = n);
|
|
3991
|
-
let o = this.$h(r,
|
|
4007
|
+
let o = this.$h(r, Ci(i), s || []);
|
|
3992
4008
|
if ((a = o == null ? void 0 : o.componentOptions) != null && a.propsData && (i != null && i.props)) {
|
|
3993
4009
|
const l = Object.keys(o.componentOptions.propsData);
|
|
3994
4010
|
o.data.attrs || (o.data.attrs = {}), Object.keys(i.props).forEach((u) => {
|
|
@@ -4005,7 +4021,7 @@ function _i() {
|
|
|
4005
4021
|
},
|
|
4006
4022
|
use(r) {
|
|
4007
4023
|
Object.keys(r).forEach((i) => {
|
|
4008
|
-
const s = be(i), n =
|
|
4024
|
+
const s = be(i), n = Et(i).toLocaleLowerCase(), o = r[i];
|
|
4009
4025
|
e.alias(i, o), [i, s, n].forEach((a) => {
|
|
4010
4026
|
e.prototype[a] = function(l, u) {
|
|
4011
4027
|
return this.make(t[i] || a, l, u);
|
|
@@ -4015,12 +4031,12 @@ function _i() {
|
|
|
4015
4031
|
}
|
|
4016
4032
|
}), e;
|
|
4017
4033
|
}
|
|
4018
|
-
function
|
|
4019
|
-
class e extends
|
|
4034
|
+
function Oi(t) {
|
|
4035
|
+
class e extends Jt {
|
|
4020
4036
|
}
|
|
4021
4037
|
return Object.assign(e.prototype, t), e;
|
|
4022
4038
|
}
|
|
4023
|
-
function
|
|
4039
|
+
function Jt(t) {
|
|
4024
4040
|
_(this, {
|
|
4025
4041
|
$handle: t,
|
|
4026
4042
|
vm: t.vm,
|
|
@@ -4031,12 +4047,12 @@ function Gt(t) {
|
|
|
4031
4047
|
}
|
|
4032
4048
|
}), this.updateKey(), this.init();
|
|
4033
4049
|
}
|
|
4034
|
-
_(
|
|
4050
|
+
_(Jt.prototype, {
|
|
4035
4051
|
__init() {
|
|
4036
4052
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
4037
4053
|
},
|
|
4038
4054
|
updateKey() {
|
|
4039
|
-
this.key =
|
|
4055
|
+
this.key = Ie();
|
|
4040
4056
|
},
|
|
4041
4057
|
//TODO interface
|
|
4042
4058
|
init() {
|
|
@@ -4081,7 +4097,7 @@ _(Gt.prototype, {
|
|
|
4081
4097
|
render(t) {
|
|
4082
4098
|
}
|
|
4083
4099
|
});
|
|
4084
|
-
const
|
|
4100
|
+
const Fi = function(t) {
|
|
4085
4101
|
const e = {
|
|
4086
4102
|
name: "loadData",
|
|
4087
4103
|
_fn: [],
|
|
@@ -4097,7 +4113,7 @@ const wi = function(t) {
|
|
|
4097
4113
|
let g;
|
|
4098
4114
|
a.template ? g = t.$handle.loadStrVar(a.template, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null) : a.handler && h.Function(a.handler) ? g = a.handler(p, i, s) : g = t.$handle.loadStrVar(`{{${a.attr}}}`, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null), (g == null || g === "") && a.default != null && (g = a.default), a.copy !== !1 && (g = K(g));
|
|
4099
4115
|
const y = a.modify ? i : r.getProp();
|
|
4100
|
-
a.to === "child" ? y.children ?
|
|
4116
|
+
a.to === "child" ? y.children ? F(y.children, 0, g) : F(y, "children", [g]) : oe(y, a.to || "options", g), s.sync(i);
|
|
4101
4117
|
}, u = (p) => l(p);
|
|
4102
4118
|
const f = t.watchLoadData(u);
|
|
4103
4119
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4112,7 +4128,7 @@ const wi = function(t) {
|
|
|
4112
4128
|
}
|
|
4113
4129
|
};
|
|
4114
4130
|
return e.watch = e.loaded, e;
|
|
4115
|
-
},
|
|
4131
|
+
}, ki = function(t) {
|
|
4116
4132
|
const e = {
|
|
4117
4133
|
name: "t",
|
|
4118
4134
|
_fn: [],
|
|
@@ -4127,7 +4143,7 @@ const wi = function(t) {
|
|
|
4127
4143
|
let f = (g) => {
|
|
4128
4144
|
let y = t.t(u ? l.attr : l, u ? l.params : null, g);
|
|
4129
4145
|
const C = u && l.modify ? i : r.getProp();
|
|
4130
|
-
a === "child" ? C.children ?
|
|
4146
|
+
a === "child" ? C.children ? F(C.children, 0, y) : F(C, "children", [y]) : oe(C, a, y), s.sync(i);
|
|
4131
4147
|
}, p = (g) => f(g);
|
|
4132
4148
|
const d = t.watchLoadData(p);
|
|
4133
4149
|
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
@@ -4141,7 +4157,7 @@ const wi = function(t) {
|
|
|
4141
4157
|
}
|
|
4142
4158
|
};
|
|
4143
4159
|
return e.watch = e.loaded, e;
|
|
4144
|
-
},
|
|
4160
|
+
}, Kt = {
|
|
4145
4161
|
name: "componentValidate",
|
|
4146
4162
|
load(t, e, r) {
|
|
4147
4163
|
let i = t.getValue();
|
|
@@ -4164,9 +4180,9 @@ const wi = function(t) {
|
|
|
4164
4180
|
}
|
|
4165
4181
|
},
|
|
4166
4182
|
watch(...t) {
|
|
4167
|
-
|
|
4183
|
+
Kt.load(...t);
|
|
4168
4184
|
}
|
|
4169
|
-
},
|
|
4185
|
+
}, Ei = function(t) {
|
|
4170
4186
|
function e(s) {
|
|
4171
4187
|
return h.String(s) && (s = {
|
|
4172
4188
|
action: s,
|
|
@@ -4183,7 +4199,18 @@ const wi = function(t) {
|
|
|
4183
4199
|
l(void 0);
|
|
4184
4200
|
return;
|
|
4185
4201
|
}
|
|
4186
|
-
a = K(a), a.to || (a.to = "options")
|
|
4202
|
+
if (a = K(a), a.to || (a.to = "options"), a.key) {
|
|
4203
|
+
const p = t.$handle.options.globalData[a.key];
|
|
4204
|
+
if (!p) {
|
|
4205
|
+
l(void 0);
|
|
4206
|
+
return;
|
|
4207
|
+
}
|
|
4208
|
+
if (p.type === "static") {
|
|
4209
|
+
l(p.data);
|
|
4210
|
+
return;
|
|
4211
|
+
} else
|
|
4212
|
+
a = v(v({}, a), p);
|
|
4213
|
+
}
|
|
4187
4214
|
const u = a.onError, f = () => {
|
|
4188
4215
|
if (!s.getValue())
|
|
4189
4216
|
return s.clearProp(), o.sync(n), !0;
|
|
@@ -4191,30 +4218,24 @@ const wi = function(t) {
|
|
|
4191
4218
|
i._fn[s.id] = t.watchLoadData(se((p, d) => {
|
|
4192
4219
|
if (d && a.watch === !1)
|
|
4193
4220
|
return i._fn[s.id]();
|
|
4194
|
-
if (a.key) {
|
|
4195
|
-
const C = p("$globalData." + a.key);
|
|
4196
|
-
if (C) {
|
|
4197
|
-
if (f()) return;
|
|
4198
|
-
l(C);
|
|
4199
|
-
}
|
|
4200
|
-
return;
|
|
4201
|
-
}
|
|
4202
4221
|
const g = t.$handle.loadFetchVar(K(a), p, n), y = q(v({
|
|
4203
4222
|
headers: {}
|
|
4204
4223
|
}, g), {
|
|
4205
|
-
onSuccess(C,
|
|
4224
|
+
onSuccess(C, k) {
|
|
4206
4225
|
if (f()) return;
|
|
4207
|
-
let G = (
|
|
4226
|
+
let G = (L) => k ? L : j(L, "data") ? L.data : L;
|
|
4208
4227
|
const V = z(g.parse);
|
|
4209
|
-
h.Function(V) ? G = V : V && h.String(V) && (G = (
|
|
4228
|
+
h.Function(V) ? G = V : V && h.String(V) && (G = (L) => B(L, V)), Ve(G(C, n, o)).then((L) => {
|
|
4229
|
+
l(L);
|
|
4230
|
+
});
|
|
4210
4231
|
},
|
|
4211
4232
|
onError(C) {
|
|
4212
|
-
l(void 0), !f() && (u || ((
|
|
4233
|
+
l(void 0), !f() && (u || ((k) => Ye(k.message || "fetch fail " + g.action)))(C, n, o);
|
|
4213
4234
|
}
|
|
4214
4235
|
});
|
|
4215
4236
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4216
4237
|
if (h.Function(g.action)) {
|
|
4217
|
-
g.action(n, o).then((C) => {
|
|
4238
|
+
Ve(g.action(n, o)).then((C) => {
|
|
4218
4239
|
y.onSuccess(C, !0);
|
|
4219
4240
|
}).catch((C) => {
|
|
4220
4241
|
y.onError(C);
|
|
@@ -4240,13 +4261,13 @@ const wi = function(t) {
|
|
|
4240
4261
|
}
|
|
4241
4262
|
};
|
|
4242
4263
|
return i;
|
|
4243
|
-
},
|
|
4244
|
-
fetch:
|
|
4245
|
-
loadData:
|
|
4246
|
-
t:
|
|
4247
|
-
componentValidate:
|
|
4264
|
+
}, Ri = {
|
|
4265
|
+
fetch: Ei,
|
|
4266
|
+
loadData: Fi,
|
|
4267
|
+
t: ki,
|
|
4268
|
+
componentValidate: Kt
|
|
4248
4269
|
};
|
|
4249
|
-
function
|
|
4270
|
+
function Si(t) {
|
|
4250
4271
|
t = t || /* @__PURE__ */ new Map();
|
|
4251
4272
|
const e = {
|
|
4252
4273
|
$on(r, i) {
|
|
@@ -4270,8 +4291,8 @@ function Ei(t) {
|
|
|
4270
4291
|
};
|
|
4271
4292
|
return e;
|
|
4272
4293
|
}
|
|
4273
|
-
const
|
|
4274
|
-
name:
|
|
4294
|
+
const ji = "html", Di = {
|
|
4295
|
+
name: ji,
|
|
4275
4296
|
loadChildren: !1,
|
|
4276
4297
|
render(t, e) {
|
|
4277
4298
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4280,7 +4301,7 @@ const Si = "html", Ri = {
|
|
|
4280
4301
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4281
4302
|
}
|
|
4282
4303
|
};
|
|
4283
|
-
function
|
|
4304
|
+
function Ai(t) {
|
|
4284
4305
|
t = t + "=";
|
|
4285
4306
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4286
4307
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4298,7 +4319,7 @@ function ji(t) {
|
|
|
4298
4319
|
}
|
|
4299
4320
|
return null;
|
|
4300
4321
|
}
|
|
4301
|
-
function
|
|
4322
|
+
function Vi(t) {
|
|
4302
4323
|
const e = localStorage.getItem(t);
|
|
4303
4324
|
if (e)
|
|
4304
4325
|
try {
|
|
@@ -4308,7 +4329,7 @@ function Di(t) {
|
|
|
4308
4329
|
}
|
|
4309
4330
|
return null;
|
|
4310
4331
|
}
|
|
4311
|
-
function
|
|
4332
|
+
function Ii(t) {
|
|
4312
4333
|
const e = sessionStorage.getItem(t);
|
|
4313
4334
|
if (e)
|
|
4314
4335
|
try {
|
|
@@ -4318,23 +4339,23 @@ function Ai(t) {
|
|
|
4318
4339
|
}
|
|
4319
4340
|
return null;
|
|
4320
4341
|
}
|
|
4321
|
-
function
|
|
4342
|
+
function nt(t, e) {
|
|
4322
4343
|
if (!e)
|
|
4323
4344
|
return null;
|
|
4324
4345
|
const r = e.split(".");
|
|
4325
4346
|
let i = t(r.shift());
|
|
4326
4347
|
return r.length ? i == null ? null : B(i, r) : i;
|
|
4327
4348
|
}
|
|
4328
|
-
function
|
|
4329
|
-
return
|
|
4349
|
+
function Pi(t) {
|
|
4350
|
+
return nt(Ai, t);
|
|
4330
4351
|
}
|
|
4331
|
-
function
|
|
4332
|
-
return
|
|
4352
|
+
function Ti(t) {
|
|
4353
|
+
return nt(Vi, t);
|
|
4333
4354
|
}
|
|
4334
|
-
function
|
|
4335
|
-
return
|
|
4355
|
+
function Bi(t) {
|
|
4356
|
+
return nt(Ii, t);
|
|
4336
4357
|
}
|
|
4337
|
-
const
|
|
4358
|
+
const Li = {
|
|
4338
4359
|
en: {
|
|
4339
4360
|
required: "{title} is required",
|
|
4340
4361
|
validate: {
|
|
@@ -4384,17 +4405,17 @@ const Ti = {
|
|
|
4384
4405
|
}
|
|
4385
4406
|
}
|
|
4386
4407
|
};
|
|
4387
|
-
function
|
|
4408
|
+
function Ni(t, e) {
|
|
4388
4409
|
let r;
|
|
4389
4410
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4390
4411
|
}
|
|
4391
|
-
function
|
|
4392
|
-
return
|
|
4412
|
+
function Me() {
|
|
4413
|
+
return Ni("name", ...arguments);
|
|
4393
4414
|
}
|
|
4394
|
-
function
|
|
4415
|
+
function Mi(t) {
|
|
4395
4416
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4396
4417
|
}
|
|
4397
|
-
function
|
|
4418
|
+
function qi(t, e) {
|
|
4398
4419
|
const r = new Vue({
|
|
4399
4420
|
data() {
|
|
4400
4421
|
return { rule: t, option: e || {} };
|
|
@@ -4405,23 +4426,23 @@ function Ni(t, e) {
|
|
|
4405
4426
|
});
|
|
4406
4427
|
return r.$mount(), r;
|
|
4407
4428
|
}
|
|
4408
|
-
function
|
|
4429
|
+
function Ui(t) {
|
|
4409
4430
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4410
|
-
|
|
4431
|
+
Vt.push(...e), et.push(...r), tt.push(...i), Mt([...e, ...r, ...i]);
|
|
4411
4432
|
}
|
|
4412
|
-
let
|
|
4413
|
-
const U = {},
|
|
4414
|
-
function
|
|
4433
|
+
let Hi = 1;
|
|
4434
|
+
const U = {}, _t = Symbol("defValue");
|
|
4435
|
+
function Wt(t) {
|
|
4415
4436
|
const e = {
|
|
4416
|
-
[
|
|
4437
|
+
[Ne.name]: Ne
|
|
4417
4438
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4418
4439
|
t.extendApi
|
|
4419
|
-
], u = v({},
|
|
4440
|
+
], u = v({}, Ri), f = Yr();
|
|
4420
4441
|
let p = { global: {} };
|
|
4421
4442
|
const d = t.isMobile === !0, g = ne({
|
|
4422
4443
|
$mobile: d
|
|
4423
|
-
}), y =
|
|
4424
|
-
|
|
4444
|
+
}), y = wi(), C = {}, k = {};
|
|
4445
|
+
Ui(t.attrs || {});
|
|
4425
4446
|
function G(c) {
|
|
4426
4447
|
const m = U[c];
|
|
4427
4448
|
if (Array.isArray(m))
|
|
@@ -4432,52 +4453,52 @@ function Kt(t) {
|
|
|
4432
4453
|
function V(c) {
|
|
4433
4454
|
o.push(c);
|
|
4434
4455
|
}
|
|
4435
|
-
function
|
|
4436
|
-
const c =
|
|
4456
|
+
function L() {
|
|
4457
|
+
const c = Me(...arguments);
|
|
4437
4458
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4438
4459
|
}
|
|
4439
|
-
function
|
|
4440
|
-
const c =
|
|
4460
|
+
function de() {
|
|
4461
|
+
const c = Me(...arguments);
|
|
4441
4462
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4442
4463
|
name: c.id
|
|
4443
4464
|
}));
|
|
4444
4465
|
}
|
|
4445
|
-
function
|
|
4466
|
+
function Pe(c) {
|
|
4446
4467
|
y.use(c);
|
|
4447
4468
|
}
|
|
4448
|
-
function
|
|
4449
|
-
const c =
|
|
4469
|
+
function pe() {
|
|
4470
|
+
const c = Me(...arguments);
|
|
4450
4471
|
if (!c.id || !c.prop) return De;
|
|
4451
4472
|
const m = J(c.id), $ = c.prop, b = $.merge === !0 ? r[m] : void 0;
|
|
4452
|
-
r[m] =
|
|
4473
|
+
r[m] = Se($, b || De), f[m] = T(m), $.maker && _(f, $.maker);
|
|
4453
4474
|
}
|
|
4454
4475
|
function E(c, m) {
|
|
4455
4476
|
let $;
|
|
4456
4477
|
if (h.String(c)) {
|
|
4457
4478
|
if ($ = c, m === void 0)
|
|
4458
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4479
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? R() : e[$];
|
|
4459
4480
|
} else
|
|
4460
4481
|
$ = J(c.name), m = c;
|
|
4461
4482
|
if (!$ || !m) return;
|
|
4462
4483
|
const b = J($);
|
|
4463
|
-
e[$] = m, e[b] = m, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], m.formCreateParser &&
|
|
4484
|
+
e[$] = m, e[b] = m, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], m.formCreateParser && pe($, m.formCreateParser);
|
|
4464
4485
|
}
|
|
4465
|
-
function
|
|
4466
|
-
return
|
|
4486
|
+
function R() {
|
|
4487
|
+
return Zr(Be, e, i);
|
|
4467
4488
|
}
|
|
4468
4489
|
function M() {
|
|
4469
|
-
return
|
|
4490
|
+
return Ne;
|
|
4470
4491
|
}
|
|
4471
|
-
function
|
|
4492
|
+
function me(c, m) {
|
|
4472
4493
|
return h.Function(c.install) ? c.install(W, m) : h.Function(c) && c(W, m), this;
|
|
4473
4494
|
}
|
|
4474
4495
|
function W(c, m, $) {
|
|
4475
|
-
let b =
|
|
4496
|
+
let b = qi(c, m || {});
|
|
4476
4497
|
const w = b.$refs.fc.formCreate;
|
|
4477
|
-
return w.$parent = $,
|
|
4498
|
+
return w.$parent = $, Mi(w.options).appendChild(b.$el), w.api();
|
|
4478
4499
|
}
|
|
4479
|
-
|
|
4480
|
-
function
|
|
4500
|
+
Se(W, k);
|
|
4501
|
+
function zt(c) {
|
|
4481
4502
|
let m = v({}, t);
|
|
4482
4503
|
return c ? m.inherit = {
|
|
4483
4504
|
components: e,
|
|
@@ -4489,18 +4510,18 @@ function Kt(t) {
|
|
|
4489
4510
|
maker: f,
|
|
4490
4511
|
formulas: C,
|
|
4491
4512
|
loadData: g
|
|
4492
|
-
} : delete m.inherit,
|
|
4513
|
+
} : delete m.inherit, Wt(m);
|
|
4493
4514
|
}
|
|
4494
|
-
function
|
|
4515
|
+
function Xt(c, m) {
|
|
4495
4516
|
s[c] = m;
|
|
4496
4517
|
}
|
|
4497
|
-
function
|
|
4518
|
+
function Zt(c, m) {
|
|
4498
4519
|
C[c] = m;
|
|
4499
4520
|
}
|
|
4500
|
-
function
|
|
4521
|
+
function Qt(c, m) {
|
|
4501
4522
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4502
4523
|
m.parsers && Object.keys(m.parsers).forEach((w) => {
|
|
4503
|
-
b[w] =
|
|
4524
|
+
b[w] = Se(m.parsers[w], De);
|
|
4504
4525
|
}), m.name = c, n[c] = q(v(v({}, $), m), { parsers: b });
|
|
4505
4526
|
}
|
|
4506
4527
|
function Fe(c) {
|
|
@@ -4510,45 +4531,45 @@ function Kt(t) {
|
|
|
4510
4531
|
});
|
|
4511
4532
|
});
|
|
4512
4533
|
}
|
|
4513
|
-
function
|
|
4534
|
+
function Te(c, m) {
|
|
4514
4535
|
oe(g, c, m), Fe(c);
|
|
4515
4536
|
}
|
|
4516
4537
|
function ke(c, m) {
|
|
4517
4538
|
const $ = (...b) => O(() => m(...b));
|
|
4518
|
-
$._driver = !0,
|
|
4539
|
+
$._driver = !0, Te(c, $);
|
|
4519
4540
|
}
|
|
4520
|
-
function
|
|
4541
|
+
function st(c, m) {
|
|
4521
4542
|
const $ = (c || "").split(".");
|
|
4522
4543
|
c = $.shift();
|
|
4523
4544
|
const b = $.join(".");
|
|
4524
|
-
if (j(g, c) ||
|
|
4545
|
+
if (j(g, c) || F(g, c, _t), g[c] !== _t) {
|
|
4525
4546
|
let w = g[c];
|
|
4526
4547
|
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ? m : w;
|
|
4527
4548
|
} else
|
|
4528
4549
|
return m;
|
|
4529
4550
|
}
|
|
4530
|
-
function
|
|
4551
|
+
function Yt(c) {
|
|
4531
4552
|
l.push(c);
|
|
4532
4553
|
}
|
|
4533
|
-
function
|
|
4554
|
+
function er(c) {
|
|
4534
4555
|
delete g[c], Fe(c);
|
|
4535
4556
|
}
|
|
4536
|
-
function
|
|
4557
|
+
function tr(c, m) {
|
|
4537
4558
|
a.push({ name: c, callback: m });
|
|
4538
4559
|
}
|
|
4539
|
-
function
|
|
4560
|
+
function Be(c) {
|
|
4540
4561
|
_(this, {
|
|
4541
|
-
id:
|
|
4562
|
+
id: Hi++,
|
|
4542
4563
|
create: W,
|
|
4543
4564
|
vm: c,
|
|
4544
|
-
manager:
|
|
4565
|
+
manager: Oi(t.manager),
|
|
4545
4566
|
parsers: r,
|
|
4546
4567
|
providers: u,
|
|
4547
4568
|
modelFields: s,
|
|
4548
4569
|
formulas: C,
|
|
4549
4570
|
isMobile: d,
|
|
4550
4571
|
rules: c.$props.rule,
|
|
4551
|
-
name: c.$props.name ||
|
|
4572
|
+
name: c.$props.name || Ie(),
|
|
4552
4573
|
inFor: c.$props.inFor,
|
|
4553
4574
|
prop: {
|
|
4554
4575
|
components: e,
|
|
@@ -4560,23 +4581,23 @@ function Kt(t) {
|
|
|
4560
4581
|
refreshData: Fe,
|
|
4561
4582
|
loadData: g,
|
|
4562
4583
|
CreateNode: y,
|
|
4563
|
-
bus: new
|
|
4584
|
+
bus: new Si(),
|
|
4564
4585
|
unwatch: [],
|
|
4565
|
-
options:
|
|
4586
|
+
options: gr({}),
|
|
4566
4587
|
extendApiFn: l,
|
|
4567
4588
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4568
4589
|
tmpData: ne({})
|
|
4569
4590
|
}), a.forEach((m) => {
|
|
4570
4591
|
this.bus.$on(m.name, m.callback);
|
|
4571
4592
|
}), P(() => {
|
|
4572
|
-
|
|
4593
|
+
N(this.options, () => {
|
|
4573
4594
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4574
4595
|
}, { deep: !0 });
|
|
4575
4596
|
}), _(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);
|
|
4576
4597
|
}
|
|
4577
|
-
|
|
4598
|
+
Be.isMobile = d, _(Be.prototype, {
|
|
4578
4599
|
init() {
|
|
4579
|
-
this.isSub() && this.unwatch.push(
|
|
4600
|
+
this.isSub() && this.unwatch.push(N(() => this.vm.parent.fc.options.value, () => {
|
|
4580
4601
|
this.initOptions(), this.$handle.api.refresh();
|
|
4581
4602
|
}, { deep: !0, flush: "sync" })), this.vm.$props.driver && (this.renderDriver = typeof this.vm.$props.driver == "object" ? this.vm.$props.driver : this.drivers[this.vm.$props.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();
|
|
4582
4603
|
},
|
|
@@ -4587,8 +4608,8 @@ function Kt(t) {
|
|
|
4587
4608
|
t(c, m, $) {
|
|
4588
4609
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4589
4610
|
return b == null && (b = ""), b && m && Object.keys(m).forEach((w) => {
|
|
4590
|
-
const
|
|
4591
|
-
b = b.replace(
|
|
4611
|
+
const A = new RegExp(`{${w}}`, "g");
|
|
4612
|
+
b = b.replace(A, m[w]);
|
|
4592
4613
|
}), b;
|
|
4593
4614
|
},
|
|
4594
4615
|
globalDataDriver(c) {
|
|
@@ -4599,14 +4620,14 @@ function Kt(t) {
|
|
|
4599
4620
|
return B(b.data, m);
|
|
4600
4621
|
{
|
|
4601
4622
|
let w;
|
|
4602
|
-
const
|
|
4603
|
-
if (
|
|
4604
|
-
if (
|
|
4623
|
+
const A = this.fetchCache.get(b);
|
|
4624
|
+
if (A) {
|
|
4625
|
+
if (A.status && (w = B(A.data, m)), !A.loading)
|
|
4605
4626
|
return w;
|
|
4606
|
-
|
|
4627
|
+
A.loading = !1, this.fetchCache.set(b, A);
|
|
4607
4628
|
} else
|
|
4608
4629
|
this.fetchCache.set(b, { status: !1 });
|
|
4609
|
-
const
|
|
4630
|
+
const S = se(() => {
|
|
4610
4631
|
te();
|
|
4611
4632
|
const x = this.fetchCache.get(b);
|
|
4612
4633
|
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (x && (x.loading = !0, this.fetchCache.set(b, x)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
@@ -4616,11 +4637,11 @@ function Kt(t) {
|
|
|
4616
4637
|
if (le && b.watch === !1)
|
|
4617
4638
|
return te();
|
|
4618
4639
|
if (le) {
|
|
4619
|
-
|
|
4640
|
+
S();
|
|
4620
4641
|
return;
|
|
4621
4642
|
}
|
|
4622
|
-
const
|
|
4623
|
-
this.$handle.api.fetch(
|
|
4643
|
+
const ue = this.$handle.loadFetchVar(Ke(b), x);
|
|
4644
|
+
ue.targetRule = this.targetRule, this.$handle.api.fetch(ue).then((re) => {
|
|
4624
4645
|
ve(re);
|
|
4625
4646
|
}).catch((re) => {
|
|
4626
4647
|
ve(null);
|
|
@@ -4637,8 +4658,8 @@ function Kt(t) {
|
|
|
4637
4658
|
globalLanguageDriver(c) {
|
|
4638
4659
|
let m = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4639
4660
|
if (m && (b = O(() => m(c))), b == null && $ && typeof $ == "object" && (b = B($, c)), b == null) {
|
|
4640
|
-
const w = this.options.value.language || {},
|
|
4641
|
-
b = B(w[
|
|
4661
|
+
const w = this.options.value.language || {}, A = this.getLocale();
|
|
4662
|
+
b = B(w[A] || {}, c), b == null && (b = B(Li[A] || {}, c));
|
|
4642
4663
|
}
|
|
4643
4664
|
return b;
|
|
4644
4665
|
},
|
|
@@ -4648,13 +4669,13 @@ function Kt(t) {
|
|
|
4648
4669
|
if (b) {
|
|
4649
4670
|
const w = h.Function(b) ? b : z(b.handle);
|
|
4650
4671
|
if (w) {
|
|
4651
|
-
let
|
|
4652
|
-
return B(
|
|
4672
|
+
let A = w((...S) => this.$handle.api.getData(...S), this.$handle.api);
|
|
4673
|
+
return B(A, m);
|
|
4653
4674
|
}
|
|
4654
4675
|
}
|
|
4655
4676
|
},
|
|
4656
4677
|
setData(c, m, $) {
|
|
4657
|
-
$ ?
|
|
4678
|
+
$ ? Te(c, m) : (oe(this.vm.top.fc.tmpData, c, m), this.bus.$emit("$loadData." + c));
|
|
4658
4679
|
},
|
|
4659
4680
|
getLoadData(c, m) {
|
|
4660
4681
|
let $ = null;
|
|
@@ -4682,7 +4703,7 @@ function Kt(t) {
|
|
|
4682
4703
|
else {
|
|
4683
4704
|
if (w === "$preview")
|
|
4684
4705
|
return this.$handle.preview;
|
|
4685
|
-
$ =
|
|
4706
|
+
$ = st(c), b = [];
|
|
4686
4707
|
}
|
|
4687
4708
|
$ && b.length && ($ = B($, b));
|
|
4688
4709
|
}
|
|
@@ -4690,34 +4711,34 @@ function Kt(t) {
|
|
|
4690
4711
|
},
|
|
4691
4712
|
watchLoadData(c, m) {
|
|
4692
4713
|
let $ = {};
|
|
4693
|
-
const b = (
|
|
4714
|
+
const b = (S) => {
|
|
4694
4715
|
this.get || (this.get = w), O(() => {
|
|
4695
|
-
c(w,
|
|
4716
|
+
c(w, S);
|
|
4696
4717
|
}), this.get === w && (this.get = void 0);
|
|
4697
|
-
}, w = (
|
|
4718
|
+
}, w = (S, ve) => {
|
|
4698
4719
|
let ae;
|
|
4699
|
-
if (typeof
|
|
4700
|
-
return $[
|
|
4701
|
-
const te = ye(() => ae ? ae() : this.getLoadData(
|
|
4702
|
-
const
|
|
4703
|
-
if ($[
|
|
4704
|
-
((
|
|
4720
|
+
if (typeof S == "object" && (ae = S.getValue, S = S.id), $[S])
|
|
4721
|
+
return $[S].val;
|
|
4722
|
+
const te = ye(() => ae ? ae() : this.getLoadData(S, ve)), x = S.split("."), le = x.shift(), ue = x.shift() || "", re = se(() => {
|
|
4723
|
+
const fe = ae ? ae() : this.getLoadData(S, ve);
|
|
4724
|
+
if ($[S])
|
|
4725
|
+
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[S].val || JSON.stringify(fe) !== JSON.stringify($[S].val)) && ($[S].val = fe, b(!0));
|
|
4705
4726
|
else return;
|
|
4706
|
-
}, m || 0),
|
|
4727
|
+
}, m || 0), ir = N(te, (fe) => {
|
|
4707
4728
|
re();
|
|
4708
4729
|
});
|
|
4709
|
-
return this.bus.$on("$loadData." + le, re),
|
|
4730
|
+
return this.bus.$on("$loadData." + le, re), ue && this.bus.$on("$loadData." + le + "." + ue, re), $[S] = {
|
|
4710
4731
|
fn: () => {
|
|
4711
|
-
this.bus.$off("$loadData." + le, re),
|
|
4732
|
+
this.bus.$off("$loadData." + le, re), ue && this.bus.$off("$loadData." + le + "." + ue, re), ir();
|
|
4712
4733
|
},
|
|
4713
4734
|
val: te.value
|
|
4714
4735
|
}, te.value;
|
|
4715
4736
|
};
|
|
4716
4737
|
b(!1);
|
|
4717
|
-
const
|
|
4718
|
-
Object.keys($).forEach((
|
|
4738
|
+
const A = () => {
|
|
4739
|
+
Object.keys($).forEach((S) => $[S].fn()), $ = {};
|
|
4719
4740
|
};
|
|
4720
|
-
return this.unwatch.push(
|
|
4741
|
+
return this.unwatch.push(A), A;
|
|
4721
4742
|
},
|
|
4722
4743
|
isSub() {
|
|
4723
4744
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4739,7 +4760,7 @@ function Kt(t) {
|
|
|
4739
4760
|
mergeOptions(c, m, $) {
|
|
4740
4761
|
return m = v({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4741
4762
|
delete m[b];
|
|
4742
|
-
}), m.global && (c.global =
|
|
4763
|
+
}), m.global && (c.global = xr(c.global, m.global), delete m.global), this.$handle.$manager.mergeOptions([m], c), c;
|
|
4743
4764
|
},
|
|
4744
4765
|
updateOptions(c) {
|
|
4745
4766
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4768,76 +4789,76 @@ function Kt(t) {
|
|
|
4768
4789
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4769
4790
|
}
|
|
4770
4791
|
});
|
|
4771
|
-
function
|
|
4792
|
+
function ot(c) {
|
|
4772
4793
|
_(c, {
|
|
4773
4794
|
version: t.version,
|
|
4774
4795
|
ui: t.ui,
|
|
4775
4796
|
isMobile: d,
|
|
4776
|
-
extendApi:
|
|
4777
|
-
getData:
|
|
4797
|
+
extendApi: Yt,
|
|
4798
|
+
getData: st,
|
|
4778
4799
|
setDataDriver: ke,
|
|
4779
|
-
setData:
|
|
4780
|
-
removeData:
|
|
4800
|
+
setData: Te,
|
|
4801
|
+
removeData: er,
|
|
4781
4802
|
refreshData: Fe,
|
|
4782
4803
|
maker: f,
|
|
4783
4804
|
component: E,
|
|
4784
|
-
directive:
|
|
4785
|
-
setModelField:
|
|
4786
|
-
setFormula:
|
|
4787
|
-
setDriver:
|
|
4788
|
-
register:
|
|
4805
|
+
directive: L,
|
|
4806
|
+
setModelField: Xt,
|
|
4807
|
+
setFormula: Zt,
|
|
4808
|
+
setDriver: Qt,
|
|
4809
|
+
register: de,
|
|
4789
4810
|
$vnode: M,
|
|
4790
|
-
parser:
|
|
4791
|
-
use:
|
|
4792
|
-
factory:
|
|
4793
|
-
componentAlias:
|
|
4794
|
-
copyRule:
|
|
4795
|
-
copyRules:
|
|
4811
|
+
parser: pe,
|
|
4812
|
+
use: me,
|
|
4813
|
+
factory: zt,
|
|
4814
|
+
componentAlias: Pe,
|
|
4815
|
+
copyRule: Pt,
|
|
4816
|
+
copyRules: Tt,
|
|
4796
4817
|
mergeRule: ee,
|
|
4797
|
-
fetch:
|
|
4798
|
-
$form:
|
|
4818
|
+
fetch: Ut,
|
|
4819
|
+
$form: R,
|
|
4799
4820
|
parseFn: z,
|
|
4800
|
-
parseJson:
|
|
4821
|
+
parseJson: St,
|
|
4801
4822
|
toJson: we,
|
|
4802
4823
|
useApp: V,
|
|
4803
4824
|
getApi: G,
|
|
4804
|
-
on:
|
|
4825
|
+
on: tr
|
|
4805
4826
|
});
|
|
4806
4827
|
}
|
|
4807
|
-
function
|
|
4828
|
+
function rr(c) {
|
|
4808
4829
|
_(c, {
|
|
4809
4830
|
create: W,
|
|
4810
4831
|
install(m, $) {
|
|
4811
4832
|
if (p = v(v({}, p), $ || {}), m._installedFormCreate === !0) return;
|
|
4812
4833
|
m._installedFormCreate = !0;
|
|
4813
|
-
const b = function(
|
|
4814
|
-
return W(
|
|
4834
|
+
const b = function(A, S = {}) {
|
|
4835
|
+
return W(A, S, this);
|
|
4815
4836
|
};
|
|
4816
|
-
|
|
4817
|
-
const w =
|
|
4818
|
-
m.component(w.name, w), m.component("FcFragment", M()), o.forEach((
|
|
4819
|
-
O(() =>
|
|
4837
|
+
ot(b), m.prototype.$formCreate = b;
|
|
4838
|
+
const w = R();
|
|
4839
|
+
m.component(w.name, w), m.component("FcFragment", M()), o.forEach((A) => {
|
|
4840
|
+
O(() => A(c, m));
|
|
4820
4841
|
});
|
|
4821
4842
|
}
|
|
4822
4843
|
});
|
|
4823
4844
|
}
|
|
4824
|
-
if (
|
|
4845
|
+
if (ot(k), rr(k), ke("$cookie", Pi), ke("$localStorage", Ti), ke("$sessionStorage", Bi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), pe(Di), t.inherit) {
|
|
4825
4846
|
const c = t.inherit;
|
|
4826
4847
|
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(g, c.loadData), c.formulas && _(C, c.formulas);
|
|
4827
4848
|
}
|
|
4828
|
-
const Ee =
|
|
4829
|
-
return
|
|
4849
|
+
const Ee = R();
|
|
4850
|
+
return Se(Ee, k), Object.defineProperties(Ee, {
|
|
4830
4851
|
fetch: {
|
|
4831
4852
|
get() {
|
|
4832
|
-
return
|
|
4853
|
+
return k.fetch;
|
|
4833
4854
|
},
|
|
4834
4855
|
set(c) {
|
|
4835
|
-
|
|
4856
|
+
k.fetch = c;
|
|
4836
4857
|
}
|
|
4837
4858
|
}
|
|
4838
|
-
}), Ee.util =
|
|
4859
|
+
}), Ee.util = k, Ee;
|
|
4839
4860
|
}
|
|
4840
|
-
const
|
|
4861
|
+
const Ct = {
|
|
4841
4862
|
date: "yyyy-MM-dd",
|
|
4842
4863
|
month: "yyyy-MM",
|
|
4843
4864
|
datetime: "yyyy-MM-dd HH:mm:ss",
|
|
@@ -4846,106 +4867,114 @@ const _t = {
|
|
|
4846
4867
|
monthrange: "yyyy-MM",
|
|
4847
4868
|
datetimerange: "yyyy-MM-dd HH:mm:ss",
|
|
4848
4869
|
year: "yyyy"
|
|
4849
|
-
},
|
|
4850
|
-
name:
|
|
4870
|
+
}, wt = "datePicker", Gi = {
|
|
4871
|
+
name: wt,
|
|
4851
4872
|
maker: function() {
|
|
4852
|
-
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = T(
|
|
4873
|
+
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = T(wt, { type: e.toLowerCase() }), t), {});
|
|
4853
4874
|
}(),
|
|
4854
4875
|
mergeProp(t) {
|
|
4855
4876
|
const e = t.prop.props;
|
|
4856
|
-
e.valueFormat || (e.valueFormat =
|
|
4877
|
+
e.valueFormat || (e.valueFormat = Ct[e.type] || Ct.date);
|
|
4857
4878
|
}
|
|
4858
|
-
},
|
|
4859
|
-
name:
|
|
4879
|
+
}, qe = "hidden", Ji = {
|
|
4880
|
+
name: qe,
|
|
4860
4881
|
maker: {
|
|
4861
|
-
[
|
|
4882
|
+
[qe]: (t, e) => T(qe)("", t, e)
|
|
4862
4883
|
},
|
|
4863
4884
|
render() {
|
|
4864
4885
|
return [];
|
|
4865
4886
|
}
|
|
4866
|
-
},
|
|
4867
|
-
name:
|
|
4887
|
+
}, Ue = "input", Ki = {
|
|
4888
|
+
name: Ue,
|
|
4868
4889
|
maker: function() {
|
|
4869
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = T(
|
|
4870
|
-
return t.idate = T(
|
|
4890
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = T(Ue, { type: r }), e), {});
|
|
4891
|
+
return t.idate = T(Ue, { type: "date" }), t;
|
|
4871
4892
|
}(),
|
|
4872
4893
|
mergeProp(t) {
|
|
4873
4894
|
let { props: e } = t.prop;
|
|
4874
4895
|
e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4875
4896
|
}
|
|
4876
|
-
},
|
|
4877
|
-
name:
|
|
4897
|
+
}, Wi = "textarea", xi = {
|
|
4898
|
+
name: Wi,
|
|
4899
|
+
mergeProp(t) {
|
|
4900
|
+
let { props: e } = t.prop;
|
|
4901
|
+
e.type = "textarea", e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4902
|
+
}
|
|
4903
|
+
}, Ot = "slider", zi = {
|
|
4904
|
+
name: Ot,
|
|
4878
4905
|
maker: {
|
|
4879
|
-
sliderRange: T(
|
|
4906
|
+
sliderRange: T(Ot, { range: !0 })
|
|
4880
4907
|
},
|
|
4881
4908
|
toFormValue(t, e) {
|
|
4882
4909
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4883
4910
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4884
4911
|
}
|
|
4885
|
-
},
|
|
4886
|
-
name:
|
|
4912
|
+
}, He = "timePicker", Xi = {
|
|
4913
|
+
name: He,
|
|
4887
4914
|
maker: {
|
|
4888
|
-
time: T(
|
|
4889
|
-
timeRange: T(
|
|
4915
|
+
time: T(He, (t) => t.props.isRange = !1),
|
|
4916
|
+
timeRange: T(He, (t) => t.props.isRange = !0)
|
|
4890
4917
|
},
|
|
4891
4918
|
mergeProp(t) {
|
|
4892
4919
|
const e = t.prop.props;
|
|
4893
4920
|
e.valueFormat || (e.valueFormat = "HH:mm:ss");
|
|
4894
4921
|
}
|
|
4895
|
-
},
|
|
4922
|
+
}, Zi = {
|
|
4896
4923
|
name: "FcRow",
|
|
4897
4924
|
render(t, e) {
|
|
4898
4925
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4899
4926
|
e.vNode.row(e.prop, t)
|
|
4900
4927
|
]);
|
|
4901
4928
|
}
|
|
4902
|
-
},
|
|
4903
|
-
name:
|
|
4929
|
+
}, Qi = "select", Yi = {
|
|
4930
|
+
name: Qi,
|
|
4904
4931
|
toFormValue(t, e) {
|
|
4905
4932
|
return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
|
|
4906
4933
|
}
|
|
4907
|
-
},
|
|
4908
|
-
Ui,
|
|
4909
|
-
Hi,
|
|
4934
|
+
}, en = [
|
|
4910
4935
|
Gi,
|
|
4911
4936
|
Ji,
|
|
4912
4937
|
Ki,
|
|
4913
|
-
|
|
4914
|
-
zi
|
|
4915
|
-
|
|
4916
|
-
|
|
4938
|
+
xi,
|
|
4939
|
+
zi,
|
|
4940
|
+
Xi,
|
|
4941
|
+
Zi,
|
|
4942
|
+
Yi
|
|
4943
|
+
], D = "el", tn = {
|
|
4944
|
+
button: D + "Button",
|
|
4917
4945
|
icon: "i",
|
|
4918
|
-
slider:
|
|
4919
|
-
rate:
|
|
4946
|
+
slider: D + "Slider",
|
|
4947
|
+
rate: D + "Rate",
|
|
4920
4948
|
upload: "fcUpload",
|
|
4921
|
-
cascader:
|
|
4922
|
-
popover:
|
|
4923
|
-
tooltip:
|
|
4924
|
-
colorPicker:
|
|
4925
|
-
timePicker:
|
|
4926
|
-
timeSelect:
|
|
4927
|
-
datePicker:
|
|
4928
|
-
switch:
|
|
4949
|
+
cascader: D + "Cascader",
|
|
4950
|
+
popover: D + "Popover",
|
|
4951
|
+
tooltip: D + "Tooltip",
|
|
4952
|
+
colorPicker: D + "ColorPicker",
|
|
4953
|
+
timePicker: D + "TimePicker",
|
|
4954
|
+
timeSelect: D + "TimeSelect",
|
|
4955
|
+
datePicker: D + "DatePicker",
|
|
4956
|
+
switch: D + "Switch",
|
|
4929
4957
|
select: "fcSelect",
|
|
4930
4958
|
checkbox: "fcCheckbox",
|
|
4931
4959
|
radio: "fcRadio",
|
|
4932
|
-
inputNumber:
|
|
4933
|
-
number:
|
|
4934
|
-
input:
|
|
4935
|
-
|
|
4936
|
-
|
|
4960
|
+
inputNumber: D + "InputNumber",
|
|
4961
|
+
number: D + "InputNumber",
|
|
4962
|
+
input: D + "Input",
|
|
4963
|
+
textarea: D + "Input",
|
|
4964
|
+
formItem: D + "FormItem",
|
|
4965
|
+
form: D + "Form",
|
|
4937
4966
|
frame: "fcFrame",
|
|
4938
|
-
col:
|
|
4939
|
-
row:
|
|
4967
|
+
col: D + "Col",
|
|
4968
|
+
row: D + "Row",
|
|
4940
4969
|
tree: "fcTree",
|
|
4941
|
-
autoComplete:
|
|
4942
|
-
auto:
|
|
4970
|
+
autoComplete: D + "Autocomplete",
|
|
4971
|
+
auto: D + "Autocomplete",
|
|
4943
4972
|
group: "fcGroup",
|
|
4944
4973
|
array: "fcGroup",
|
|
4945
4974
|
object: "fcSubForm",
|
|
4946
4975
|
subForm: "fcSubForm"
|
|
4947
4976
|
};
|
|
4948
|
-
function
|
|
4977
|
+
function rn() {
|
|
4949
4978
|
return {
|
|
4950
4979
|
form: {
|
|
4951
4980
|
inline: !1,
|
|
@@ -4979,23 +5008,23 @@ function Qi() {
|
|
|
4979
5008
|
}
|
|
4980
5009
|
};
|
|
4981
5010
|
}
|
|
4982
|
-
function
|
|
5011
|
+
function nn(t) {
|
|
4983
5012
|
return t.type === "tooltip";
|
|
4984
5013
|
}
|
|
4985
|
-
function
|
|
5014
|
+
function Ft(t, e) {
|
|
4986
5015
|
j(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4987
5016
|
}
|
|
4988
5017
|
function Z(t) {
|
|
4989
5018
|
return t === !1;
|
|
4990
5019
|
}
|
|
4991
|
-
function
|
|
5020
|
+
function sn(t, e) {
|
|
4992
5021
|
j(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4993
5022
|
}
|
|
4994
|
-
function
|
|
5023
|
+
function Ge(t) {
|
|
4995
5024
|
const e = v({}, t);
|
|
4996
5025
|
return delete e.children, e;
|
|
4997
5026
|
}
|
|
4998
|
-
const
|
|
5027
|
+
const on = {
|
|
4999
5028
|
validate() {
|
|
5000
5029
|
const t = this.form();
|
|
5001
5030
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -5018,11 +5047,11 @@ const tn = {
|
|
|
5018
5047
|
},
|
|
5019
5048
|
tidyOptions(t) {
|
|
5020
5049
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
5021
|
-
|
|
5050
|
+
sn(t, e);
|
|
5022
5051
|
}), t;
|
|
5023
5052
|
},
|
|
5024
5053
|
tidyRule({ prop: t }) {
|
|
5025
|
-
return
|
|
5054
|
+
return Ft(t, "title"), Ft(t, "info"), t;
|
|
5026
5055
|
},
|
|
5027
5056
|
mergeProp(t) {
|
|
5028
5057
|
const e = {
|
|
@@ -5040,7 +5069,7 @@ const tn = {
|
|
|
5040
5069
|
});
|
|
5041
5070
|
},
|
|
5042
5071
|
getDefaultOptions() {
|
|
5043
|
-
return
|
|
5072
|
+
return rn();
|
|
5044
5073
|
},
|
|
5045
5074
|
update() {
|
|
5046
5075
|
const t = this.options.form;
|
|
@@ -5069,9 +5098,9 @@ const tn = {
|
|
|
5069
5098
|
delete r.wrap.class, delete r.wrap.title;
|
|
5070
5099
|
const f = Z(r.wrap.show) ? e : this.$r(Y([r.wrap, {
|
|
5071
5100
|
props: q(v({
|
|
5072
|
-
labelWidth: o === void 0 ? o :
|
|
5101
|
+
labelWidth: o === void 0 ? o : Et(o),
|
|
5073
5102
|
label: n ? r.title.title : void 0
|
|
5074
|
-
},
|
|
5103
|
+
}, Ge(r.wrap || {})), {
|
|
5075
5104
|
prop: t.id,
|
|
5076
5105
|
rules: t.injectValidate()
|
|
5077
5106
|
}),
|
|
@@ -5089,21 +5118,21 @@ const tn = {
|
|
|
5089
5118
|
},
|
|
5090
5119
|
makeInfo(t, e, r) {
|
|
5091
5120
|
var f, p, d, g, y, C;
|
|
5092
|
-
const i = v({}, t.title), s = v({}, t.info), n =
|
|
5121
|
+
const i = v({}, t.title), s = v({}, t.info), n = nn(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5093
5122
|
title: (p = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : p.value,
|
|
5094
5123
|
rule: r.rule,
|
|
5095
5124
|
options: this.options
|
|
5096
5125
|
}) : ((g = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5097
5126
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5098
|
-
const
|
|
5127
|
+
const k = {
|
|
5099
5128
|
type: s.type || "popover",
|
|
5100
5129
|
slot: "label",
|
|
5101
|
-
props:
|
|
5130
|
+
props: Ge(s),
|
|
5102
5131
|
key: `${e}pop`
|
|
5103
5132
|
};
|
|
5104
|
-
delete
|
|
5133
|
+
delete k.props.icon, delete k.props.show, delete k.props.info, delete k.props.align, delete k.props.native;
|
|
5105
5134
|
const G = "content";
|
|
5106
|
-
s.info && !j(
|
|
5135
|
+
s.info && !j(k.props, G) && (k.props[G] = (C = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : C.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, k]), [
|
|
5107
5136
|
this.$r({
|
|
5108
5137
|
type: "i",
|
|
5109
5138
|
slot: n ? "default" : "reference",
|
|
@@ -5113,7 +5142,7 @@ const tn = {
|
|
|
5113
5142
|
]));
|
|
5114
5143
|
}
|
|
5115
5144
|
const u = Y([i, {
|
|
5116
|
-
props:
|
|
5145
|
+
props: Ge(i),
|
|
5117
5146
|
key: `${e}tit`,
|
|
5118
5147
|
class: "fc-form-title",
|
|
5119
5148
|
slot: i.slot || "label",
|
|
@@ -5188,26 +5217,26 @@ const tn = {
|
|
|
5188
5217
|
key: `${this.key}b1`
|
|
5189
5218
|
}, [e]);
|
|
5190
5219
|
}
|
|
5191
|
-
},
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
function
|
|
5220
|
+
}, he = {};
|
|
5221
|
+
an(he);
|
|
5222
|
+
ln(he);
|
|
5223
|
+
un(he);
|
|
5224
|
+
fn(he);
|
|
5225
|
+
cn(he);
|
|
5226
|
+
function an(t) {
|
|
5198
5227
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5199
5228
|
t[e] = T(e);
|
|
5200
5229
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5201
5230
|
}
|
|
5202
|
-
function
|
|
5231
|
+
function ln(t) {
|
|
5203
5232
|
const e = "select", r = "multiple";
|
|
5204
5233
|
t.selectMultiple = T(e, { [r]: !0 }), t.selectOne = T(e, { [r]: !1 });
|
|
5205
5234
|
}
|
|
5206
|
-
function
|
|
5235
|
+
function un(t) {
|
|
5207
5236
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5208
5237
|
Object.keys(r).reduce((i, s) => (i[s] = T(e, { type: r[s] }), i), t);
|
|
5209
5238
|
}
|
|
5210
|
-
function
|
|
5239
|
+
function fn(t) {
|
|
5211
5240
|
const e = "upload", r = {
|
|
5212
5241
|
image: ["image", 0],
|
|
5213
5242
|
file: ["file", 0],
|
|
@@ -5216,7 +5245,7 @@ function on(t) {
|
|
|
5216
5245
|
};
|
|
5217
5246
|
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;
|
|
5218
5247
|
}
|
|
5219
|
-
function
|
|
5248
|
+
function cn(t) {
|
|
5220
5249
|
const e = {
|
|
5221
5250
|
frameInputs: ["input", 0],
|
|
5222
5251
|
frameFiles: ["file", 0],
|
|
@@ -5227,10 +5256,10 @@ function an(t) {
|
|
|
5227
5256
|
};
|
|
5228
5257
|
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;
|
|
5229
5258
|
}
|
|
5230
|
-
function
|
|
5259
|
+
function kt(t, e) {
|
|
5231
5260
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5232
5261
|
}
|
|
5233
|
-
function
|
|
5262
|
+
function hn(t, e) {
|
|
5234
5263
|
return {
|
|
5235
5264
|
formEl() {
|
|
5236
5265
|
return e.$manager.form();
|
|
@@ -5306,11 +5335,11 @@ function ln(t, e) {
|
|
|
5306
5335
|
}
|
|
5307
5336
|
},
|
|
5308
5337
|
submitBtnProps: (r = {}) => {
|
|
5309
|
-
let i =
|
|
5338
|
+
let i = kt(e.options.submitBtn, !0);
|
|
5310
5339
|
_(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
5311
5340
|
},
|
|
5312
5341
|
resetBtnProps: (r = {}) => {
|
|
5313
|
-
let i =
|
|
5342
|
+
let i = kt(e.options.resetBtn, !1);
|
|
5314
5343
|
_(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
5315
5344
|
},
|
|
5316
5345
|
submit(r, i) {
|
|
@@ -5328,11 +5357,11 @@ function ln(t, e) {
|
|
|
5328
5357
|
}
|
|
5329
5358
|
};
|
|
5330
5359
|
}
|
|
5331
|
-
const
|
|
5360
|
+
const xt = {
|
|
5332
5361
|
name: "required",
|
|
5333
5362
|
load(t, e, r) {
|
|
5334
5363
|
var s, n;
|
|
5335
|
-
const i =
|
|
5364
|
+
const i = dn(t.getValue());
|
|
5336
5365
|
if (i.required === !1)
|
|
5337
5366
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5338
5367
|
else {
|
|
@@ -5353,28 +5382,28 @@ const Wt = {
|
|
|
5353
5382
|
r.sync(e);
|
|
5354
5383
|
},
|
|
5355
5384
|
watch(...t) {
|
|
5356
|
-
|
|
5385
|
+
xt.load(...t);
|
|
5357
5386
|
}
|
|
5358
5387
|
};
|
|
5359
|
-
function
|
|
5388
|
+
function dn(t) {
|
|
5360
5389
|
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 : {};
|
|
5361
5390
|
}
|
|
5362
|
-
function
|
|
5363
|
-
t.componentAlias(
|
|
5391
|
+
function pn(t) {
|
|
5392
|
+
t.componentAlias(tn), Kr.forEach((e) => {
|
|
5364
5393
|
t.component(e.name, e);
|
|
5365
|
-
}), t.register(
|
|
5394
|
+
}), t.register(xt), en.forEach((e) => {
|
|
5366
5395
|
t.parser(e);
|
|
5367
|
-
}), Object.keys(
|
|
5368
|
-
t.maker[e] =
|
|
5396
|
+
}), Object.keys(he).forEach((e) => {
|
|
5397
|
+
t.maker[e] = he[e];
|
|
5369
5398
|
});
|
|
5370
5399
|
}
|
|
5371
|
-
function
|
|
5372
|
-
return
|
|
5400
|
+
function mn() {
|
|
5401
|
+
return Wt({
|
|
5373
5402
|
ui: "element-ui",
|
|
5374
|
-
version: "2.7.
|
|
5375
|
-
manager:
|
|
5376
|
-
extendApi:
|
|
5377
|
-
install:
|
|
5403
|
+
version: "2.7.17",
|
|
5404
|
+
manager: on,
|
|
5405
|
+
extendApi: hn,
|
|
5406
|
+
install: pn,
|
|
5378
5407
|
attrs: {
|
|
5379
5408
|
normal: ["col", "wrap"],
|
|
5380
5409
|
array: ["className"],
|
|
@@ -5382,10 +5411,10 @@ function cn() {
|
|
|
5382
5411
|
}
|
|
5383
5412
|
});
|
|
5384
5413
|
}
|
|
5385
|
-
const
|
|
5386
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5387
|
-
const
|
|
5414
|
+
const Ze = mn();
|
|
5415
|
+
typeof window != "undefined" && (window.formCreate = Ze, window.Vue && Ze.install(window.Vue));
|
|
5416
|
+
const $n = Ze.maker;
|
|
5388
5417
|
export {
|
|
5389
|
-
|
|
5390
|
-
|
|
5418
|
+
Ze as default,
|
|
5419
|
+
$n as maker
|
|
5391
5420
|
};
|