@form-create/element-ui 2.7.6 → 2.7.8
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 +589 -577
- package/dist/form-create.js +5 -3
- package/dist/form-create.min.js +5 -3
- package/package.json +11 -11
package/dist/form-create.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/element-ui v2.7.
|
|
3
|
+
* @form-create/element-ui v2.7.8
|
|
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 rr = Object.defineProperty, ir = Object.defineProperties;
|
|
11
|
+
var nr = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var at = Object.getOwnPropertySymbols;
|
|
13
|
+
var sr = Object.prototype.hasOwnProperty, or = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var lt = (t, e, r) => e in t ? rr(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
|
+
sr.call(e, r) && lt(t, r, e[r]);
|
|
17
|
+
if (at)
|
|
18
|
+
for (var r of at(e))
|
|
19
|
+
or.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) => ir(t, nr(e));
|
|
22
|
+
import $e, { getCurrentInstance as ar, provide as lr, inject as ur, toRefs as ut, reactive as ne, onBeforeMount as fr, watch as L, onMounted as cr, onBeforeUnmount as hr, onUpdated as dr, nextTick as I, markRaw as ge, computed as ye, toRef as Ae, ref as pr } from "vue";
|
|
23
|
+
function mr(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 gr = ["attrs", "props", "domProps"], yr = ["class", "style", "directives"], $r = ["on", "nativeOn"], br = function(t) {
|
|
33
33
|
return t.reduce(function(e, r) {
|
|
34
34
|
for (var i in r) if (!e[i]) e[i] = r[i];
|
|
35
|
-
else if (
|
|
36
|
-
else if (
|
|
35
|
+
else if (gr.indexOf(i) !== -1) e[i] = Je({}, e[i], r[i]);
|
|
36
|
+
else if (yr.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 ($r.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] ? vr(e[i][u], r[i][u]) : r[i][u];
|
|
45
45
|
else e[i] = r[i];
|
|
46
46
|
return e;
|
|
47
47
|
}, {});
|
|
48
|
-
},
|
|
48
|
+
}, vr = function(t, e) {
|
|
49
49
|
return function() {
|
|
50
50
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
51
51
|
};
|
|
52
|
-
},
|
|
53
|
-
const V = /* @__PURE__ */
|
|
54
|
-
function
|
|
52
|
+
}, _r = br;
|
|
53
|
+
const V = /* @__PURE__ */ mr(_r);
|
|
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 Cr = "fcCheckbox", wr = {
|
|
58
|
+
name: Cr,
|
|
59
59
|
props: {
|
|
60
60
|
formCreateInject: {
|
|
61
61
|
type: Object,
|
|
@@ -117,7 +117,7 @@ const _r = "fcCheckbox", Cr = {
|
|
|
117
117
|
}, {
|
|
118
118
|
key: s + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), Qe(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -126,8 +126,8 @@ const _r = "fcCheckbox", Cr = {
|
|
|
126
126
|
function H(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
name:
|
|
129
|
+
const Fr = "fcFrame", Or = {
|
|
130
|
+
name: Fr,
|
|
131
131
|
props: {
|
|
132
132
|
formCreateInject: {
|
|
133
133
|
type: Object,
|
|
@@ -496,8 +496,8 @@ const wr = "fcFrame", Fr = {
|
|
|
496
496
|
mounted() {
|
|
497
497
|
this.$on("fc.closeModal", this.closeModal);
|
|
498
498
|
}
|
|
499
|
-
},
|
|
500
|
-
name:
|
|
499
|
+
}, kr = "fcRadio", Sr = {
|
|
500
|
+
name: kr,
|
|
501
501
|
props: {
|
|
502
502
|
formCreateInject: {
|
|
503
503
|
type: Object,
|
|
@@ -556,7 +556,7 @@ const wr = "fcFrame", Fr = {
|
|
|
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,7 +594,7 @@ const wr = "fcFrame", Fr = {
|
|
|
594
594
|
function D(t, e) {
|
|
595
595
|
return {}.hasOwnProperty.call(t, e);
|
|
596
596
|
}
|
|
597
|
-
const Er = "fcSelect",
|
|
597
|
+
const Er = "fcSelect", Rr = {
|
|
598
598
|
name: Er,
|
|
599
599
|
functional: !0,
|
|
600
600
|
props: {
|
|
@@ -626,8 +626,8 @@ const Er = "fcSelect", Sr = {
|
|
|
626
626
|
mounted() {
|
|
627
627
|
this.$emit("fc.el", this.$refs.el);
|
|
628
628
|
}
|
|
629
|
-
},
|
|
630
|
-
name:
|
|
629
|
+
}, Dr = "fcTree", jr = {
|
|
630
|
+
name: Dr,
|
|
631
631
|
formCreateParser: {
|
|
632
632
|
mergeProp(t) {
|
|
633
633
|
const e = t.prop.props;
|
|
@@ -677,31 +677,31 @@ const Er = "fcSelect", Sr = {
|
|
|
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: Ar(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 Ar(t) {
|
|
701
701
|
return ("" + t).split("/").pop();
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
name:
|
|
703
|
+
const Vr = "fcUpload", Ir = {
|
|
704
|
+
name: Vr,
|
|
705
705
|
props: {
|
|
706
706
|
formCreateInject: {
|
|
707
707
|
type: Object,
|
|
@@ -749,11 +749,11 @@ const Ar = "fcUpload", Vr = {
|
|
|
749
749
|
};
|
|
750
750
|
},
|
|
751
751
|
created() {
|
|
752
|
-
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(
|
|
752
|
+
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ft).map(ct);
|
|
753
753
|
},
|
|
754
754
|
watch: {
|
|
755
755
|
value(t) {
|
|
756
|
-
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(
|
|
756
|
+
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ft).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
|
|
757
757
|
},
|
|
758
758
|
limit(t, e) {
|
|
759
759
|
(e === 1 || t === 1) && this.update();
|
|
@@ -911,7 +911,7 @@ const Ar = "fcUpload", Vr = {
|
|
|
911
911
|
}), this.$emit("fc.el", this.$refs.upload);
|
|
912
912
|
}
|
|
913
913
|
};
|
|
914
|
-
function
|
|
914
|
+
function S(t, e, r) {
|
|
915
915
|
$e.set(t, e, r);
|
|
916
916
|
}
|
|
917
917
|
function ie(t, e) {
|
|
@@ -925,39 +925,39 @@ function Ce(t, e = {}, r) {
|
|
|
925
925
|
if ((i = Array.isArray(n)) || h.Object(n)) {
|
|
926
926
|
let o = t[s] === void 0;
|
|
927
927
|
if (i)
|
|
928
|
-
i = !1, o &&
|
|
928
|
+
i = !1, o && S(t, s, []);
|
|
929
929
|
else if (n._clone && r !== void 0)
|
|
930
930
|
if (r)
|
|
931
|
-
n = n.getRule(), o &&
|
|
931
|
+
n = n.getRule(), o && S(t, s, {});
|
|
932
932
|
else {
|
|
933
|
-
|
|
933
|
+
S(t, s, n._clone());
|
|
934
934
|
continue;
|
|
935
935
|
}
|
|
936
936
|
else
|
|
937
|
-
o &&
|
|
937
|
+
o && S(t, s, {});
|
|
938
938
|
t[s] = Ce(t[s], n, r);
|
|
939
939
|
} else
|
|
940
|
-
|
|
940
|
+
S(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
941
941
|
}
|
|
942
942
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
943
943
|
}
|
|
944
944
|
function K(t) {
|
|
945
945
|
return Ce({}, { value: t }).value;
|
|
946
946
|
}
|
|
947
|
-
const
|
|
947
|
+
const Pr = Object.assign || function(t) {
|
|
948
948
|
for (let e, r = 1; r < arguments.length; r++)
|
|
949
949
|
for (let i in e = arguments[r], e)
|
|
950
|
-
Object.prototype.hasOwnProperty.call(e, i) &&
|
|
950
|
+
Object.prototype.hasOwnProperty.call(e, i) && S(t, i, e[i]);
|
|
951
951
|
return t;
|
|
952
952
|
};
|
|
953
953
|
function _() {
|
|
954
|
-
return
|
|
954
|
+
return Pr.apply(this, arguments);
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Ke(t) {
|
|
957
957
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
|
|
958
958
|
}
|
|
959
|
-
const
|
|
960
|
-
name:
|
|
959
|
+
const Tr = "fcGroup", Br = {
|
|
960
|
+
name: Tr,
|
|
961
961
|
props: {
|
|
962
962
|
field: String,
|
|
963
963
|
rule: [Array, Object],
|
|
@@ -1261,8 +1261,8 @@ const Pr = "fcGroup", Tr = {
|
|
|
1261
1261
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1262
1262
|
}, [n]);
|
|
1263
1263
|
}
|
|
1264
|
-
},
|
|
1265
|
-
name:
|
|
1264
|
+
}, Lr = "fcSubForm", Mr = {
|
|
1265
|
+
name: Lr,
|
|
1266
1266
|
props: {
|
|
1267
1267
|
rule: Array,
|
|
1268
1268
|
options: Object,
|
|
@@ -1345,15 +1345,15 @@ const Pr = "fcGroup", Tr = {
|
|
|
1345
1345
|
}
|
|
1346
1346
|
}]));
|
|
1347
1347
|
}
|
|
1348
|
-
},
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
kr,
|
|
1348
|
+
}, Nr = [
|
|
1349
|
+
wr,
|
|
1350
|
+
Or,
|
|
1352
1351
|
Sr,
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1352
|
+
Rr,
|
|
1353
|
+
jr,
|
|
1354
|
+
Ir,
|
|
1355
|
+
Br,
|
|
1356
|
+
Mr
|
|
1357
1357
|
];
|
|
1358
1358
|
function se(t, e) {
|
|
1359
1359
|
var r = null;
|
|
@@ -1361,12 +1361,12 @@ function se(t, e) {
|
|
|
1361
1361
|
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1362
1362
|
};
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function be(t) {
|
|
1365
1365
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1366
1366
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
const i = [...
|
|
1368
|
+
const kt = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
|
|
1369
|
+
const i = [...kt, ...r.normal || []], s = [...St, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
|
|
1370
1370
|
return t.reduce((a, l) => {
|
|
1371
1371
|
for (const u in l)
|
|
1372
1372
|
if (a[u])
|
|
@@ -1386,32 +1386,32 @@ const Ot = ["attrs", "props", "domProps", "scopedSlots"], kt = ["class", "style"
|
|
|
1386
1386
|
a[u][f] = l[u][f];
|
|
1387
1387
|
else if (u === "hook")
|
|
1388
1388
|
for (let f in l[u])
|
|
1389
|
-
a[u][f] ? a[u][f] =
|
|
1389
|
+
a[u][f] ? a[u][f] = qr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1390
1390
|
else
|
|
1391
1391
|
a[u] = l[u];
|
|
1392
1392
|
else
|
|
1393
1393
|
i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = v({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? v({}, l[u]) : l[u] : a[u] = l[u];
|
|
1394
1394
|
return a;
|
|
1395
1395
|
}, e);
|
|
1396
|
-
},
|
|
1396
|
+
}, qr = (t, e) => function() {
|
|
1397
1397
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1398
|
-
},
|
|
1399
|
-
function
|
|
1400
|
-
return [...
|
|
1398
|
+
}, Rt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], et = ["effect", "deep", "renderSlots"];
|
|
1399
|
+
function Dt() {
|
|
1400
|
+
return [...Rt, ...kt, ...St, ...Et, ...Ye, ...et];
|
|
1401
1401
|
}
|
|
1402
|
-
function
|
|
1402
|
+
function jt(t, e, r) {
|
|
1403
1403
|
return `[form-create ${t}]: ${e}`;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1406
|
-
console.error(
|
|
1405
|
+
function tt(t, e) {
|
|
1406
|
+
console.error(jt("err", t));
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1409
|
-
|
|
1408
|
+
function Ur(t) {
|
|
1409
|
+
tt(t.toString()), console.error(t);
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function At(t) {
|
|
1412
1412
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1413
1413
|
}
|
|
1414
|
-
const
|
|
1414
|
+
const We = "[[FORM-CREATE-PREFIX-", ze = "-FORM-CREATE-SUFFIX]]";
|
|
1415
1415
|
function _e(t, e) {
|
|
1416
1416
|
return JSON.stringify(Ce(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1417
1417
|
if (!(i && i._isVue === !0)) {
|
|
@@ -1420,19 +1420,19 @@ function _e(t, e) {
|
|
|
1420
1420
|
if (i.__json)
|
|
1421
1421
|
return i.__json;
|
|
1422
1422
|
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1423
|
-
return
|
|
1423
|
+
return We + i + ze;
|
|
1424
1424
|
}
|
|
1425
1425
|
}, e);
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function Le(t) {
|
|
1428
1428
|
return new Function("return " + t)();
|
|
1429
1429
|
}
|
|
1430
1430
|
function x(t, e) {
|
|
1431
1431
|
if (t && h.String(t) && t.length > 4) {
|
|
1432
1432
|
let r = t.trim(), i = !1;
|
|
1433
1433
|
try {
|
|
1434
|
-
if (r.indexOf(
|
|
1435
|
-
r = r.replace(
|
|
1434
|
+
if (r.indexOf(ze) > 0 && r.indexOf(We) === 0)
|
|
1435
|
+
r = r.replace(ze, "").replace(We, ""), i = !0;
|
|
1436
1436
|
else if (r.indexOf("$FN:") === 0)
|
|
1437
1437
|
r = r.substring(4), i = !0;
|
|
1438
1438
|
else if (r.indexOf("$EXEC:") === 0)
|
|
@@ -1446,19 +1446,21 @@ function x(t, e) {
|
|
|
1446
1446
|
}, r.__json = t, r.__inject = !0, r;
|
|
1447
1447
|
} else {
|
|
1448
1448
|
if (r.indexOf("$FNX:") === 0)
|
|
1449
|
-
return r =
|
|
1449
|
+
return r = Le(`function($inject){
|
|
1450
|
+
` + r.substring(5) + `
|
|
1451
|
+
}`), r.__json = t, r.__inject = !0, r;
|
|
1450
1452
|
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1451
1453
|
}
|
|
1452
1454
|
if (!i) return t;
|
|
1453
1455
|
let s;
|
|
1454
1456
|
try {
|
|
1455
|
-
s =
|
|
1457
|
+
s = Le(r);
|
|
1456
1458
|
} catch (n) {
|
|
1457
|
-
s =
|
|
1459
|
+
s = Le("function " + r);
|
|
1458
1460
|
}
|
|
1459
1461
|
return s.__json = t, s;
|
|
1460
1462
|
} catch (s) {
|
|
1461
|
-
|
|
1463
|
+
tt(`解析失败:${r}
|
|
1462
1464
|
|
|
1463
1465
|
err: ${s}`);
|
|
1464
1466
|
return;
|
|
@@ -1466,23 +1468,23 @@ err: ${s}`);
|
|
|
1466
1468
|
}
|
|
1467
1469
|
return t;
|
|
1468
1470
|
}
|
|
1469
|
-
function
|
|
1471
|
+
function Vt(t, e) {
|
|
1470
1472
|
return JSON.parse(t, function(r, i) {
|
|
1471
1473
|
return h.Undef(i) || !i.indexOf ? i : x(i, e);
|
|
1472
1474
|
});
|
|
1473
1475
|
}
|
|
1474
|
-
let
|
|
1475
|
-
function
|
|
1476
|
-
const t = 370 + ++
|
|
1476
|
+
let Hr = 0;
|
|
1477
|
+
function Ve() {
|
|
1478
|
+
const t = 370 + ++Hr;
|
|
1477
1479
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1478
1480
|
}
|
|
1479
1481
|
function oe(t, e, r) {
|
|
1480
1482
|
let i = t, s;
|
|
1481
1483
|
return (e || "").split(".").forEach((n) => {
|
|
1482
|
-
s && ((!i[s] || typeof i[s] != "object") &&
|
|
1483
|
-
}),
|
|
1484
|
+
s && ((!i[s] || typeof i[s] != "object") && S(i, s, {}), i = i[s]), s = n;
|
|
1485
|
+
}), S(i, s, r), i;
|
|
1484
1486
|
}
|
|
1485
|
-
function
|
|
1487
|
+
function xe(t, e) {
|
|
1486
1488
|
return {
|
|
1487
1489
|
value: t,
|
|
1488
1490
|
enumerable: !1,
|
|
@@ -1490,25 +1492,25 @@ function ze(t, e) {
|
|
|
1490
1492
|
writable: !!e
|
|
1491
1493
|
};
|
|
1492
1494
|
}
|
|
1493
|
-
function Vt(t, e) {
|
|
1494
|
-
return It([t], e || !1)[0];
|
|
1495
|
-
}
|
|
1496
1495
|
function It(t, e) {
|
|
1496
|
+
return Pt([t], e || !1)[0];
|
|
1497
|
+
}
|
|
1498
|
+
function Pt(t, e) {
|
|
1497
1499
|
return Ce([], [...t], e || !1);
|
|
1498
1500
|
}
|
|
1499
1501
|
function te(t, e) {
|
|
1500
|
-
return ee(Array.isArray(e) ? e : [e], t, { array:
|
|
1502
|
+
return ee(Array.isArray(e) ? e : [e], t, { array: Ye, normal: et }), t;
|
|
1501
1503
|
}
|
|
1502
|
-
function
|
|
1504
|
+
function ht(t) {
|
|
1503
1505
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1504
1506
|
return e.type || (e.type = "input"), e;
|
|
1505
1507
|
}
|
|
1506
|
-
function
|
|
1508
|
+
function Gr(t, e) {
|
|
1507
1509
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1508
1510
|
e[r] && (t[r] = te(t[r] || {}, e[r]));
|
|
1509
1511
|
}), t) : e;
|
|
1510
1512
|
}
|
|
1511
|
-
function
|
|
1513
|
+
function Tt(t, e) {
|
|
1512
1514
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1513
1515
|
get() {
|
|
1514
1516
|
return e[i]();
|
|
@@ -1522,26 +1524,26 @@ function F(t, e) {
|
|
|
1522
1524
|
try {
|
|
1523
1525
|
e = t();
|
|
1524
1526
|
} catch (r) {
|
|
1525
|
-
|
|
1527
|
+
Ur(r);
|
|
1526
1528
|
}
|
|
1527
1529
|
return e;
|
|
1528
1530
|
}
|
|
1529
|
-
function
|
|
1531
|
+
function Xe(t, e) {
|
|
1530
1532
|
let r = null;
|
|
1531
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1533
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1532
1534
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1533
1535
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1534
1536
|
});
|
|
1535
1537
|
}), r;
|
|
1536
1538
|
}
|
|
1537
|
-
function
|
|
1539
|
+
function Jr(t, e) {
|
|
1538
1540
|
if (h.Object(t)) {
|
|
1539
1541
|
const r = {};
|
|
1540
1542
|
return Object.keys(t).forEach((i) => {
|
|
1541
|
-
r[i] =
|
|
1543
|
+
r[i] = Xe(t[i], i);
|
|
1542
1544
|
}), r;
|
|
1543
1545
|
} else
|
|
1544
|
-
return
|
|
1546
|
+
return Xe(t, e);
|
|
1545
1547
|
}
|
|
1546
1548
|
function ke() {
|
|
1547
1549
|
const t = {}, e = (r) => r || "default";
|
|
@@ -1559,7 +1561,7 @@ function ke() {
|
|
|
1559
1561
|
const n = s();
|
|
1560
1562
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1561
1563
|
} else h.Undef(s) || i.push(s);
|
|
1562
|
-
}),
|
|
1564
|
+
}), Jr(i, r);
|
|
1563
1565
|
},
|
|
1564
1566
|
getSlots() {
|
|
1565
1567
|
let r = [];
|
|
@@ -1579,18 +1581,18 @@ function ke() {
|
|
|
1579
1581
|
}
|
|
1580
1582
|
};
|
|
1581
1583
|
}
|
|
1582
|
-
function
|
|
1584
|
+
function Se(t, e) {
|
|
1583
1585
|
return Object.setPrototypeOf(t, e), t;
|
|
1584
1586
|
}
|
|
1585
|
-
const
|
|
1586
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1587
|
+
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
|
|
1588
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
|
|
1587
1589
|
"!=": (t, e) => !fe["=="](t, e),
|
|
1588
1590
|
">": (t, e) => t > e,
|
|
1589
1591
|
">=": (t, e) => t >= e,
|
|
1590
1592
|
"<": (t, e) => t < e,
|
|
1591
1593
|
"<=": (t, e) => t <= e,
|
|
1592
1594
|
on(t, e) {
|
|
1593
|
-
return t && t.indexOf && t.indexOf(
|
|
1595
|
+
return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
|
|
1594
1596
|
},
|
|
1595
1597
|
notOn(t, e) {
|
|
1596
1598
|
return !fe.on(t, e);
|
|
@@ -1622,7 +1624,7 @@ function B(t, e) {
|
|
|
1622
1624
|
t != null && (t = t[r]);
|
|
1623
1625
|
}), t;
|
|
1624
1626
|
}
|
|
1625
|
-
function
|
|
1627
|
+
function Kr(t) {
|
|
1626
1628
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1627
1629
|
let r;
|
|
1628
1630
|
const i = {};
|
|
@@ -1630,21 +1632,21 @@ function Jr(t) {
|
|
|
1630
1632
|
r[1] && (i[r[1]] = !0);
|
|
1631
1633
|
return Object.keys(i);
|
|
1632
1634
|
}
|
|
1633
|
-
function
|
|
1635
|
+
function pt(t) {
|
|
1634
1636
|
let e = t.split("."), r = [], i = "";
|
|
1635
1637
|
return e.forEach((s, n) => {
|
|
1636
1638
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1637
1639
|
}), r.join(" && ");
|
|
1638
1640
|
}
|
|
1639
|
-
const
|
|
1641
|
+
const De = (t, e) => {
|
|
1640
1642
|
if (!(!t || t === e || !t.$props)) {
|
|
1641
1643
|
if (t.$props.formCreateInject)
|
|
1642
1644
|
return t.$props.formCreateInject;
|
|
1643
1645
|
if (t.$parent)
|
|
1644
|
-
return
|
|
1646
|
+
return De(t.$parent, e);
|
|
1645
1647
|
}
|
|
1646
1648
|
};
|
|
1647
|
-
function
|
|
1649
|
+
function Wr(t, e, r) {
|
|
1648
1650
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1649
1651
|
return {
|
|
1650
1652
|
name: i,
|
|
@@ -1695,49 +1697,49 @@ function Kr(t, e, r) {
|
|
|
1695
1697
|
return this.fc.render();
|
|
1696
1698
|
},
|
|
1697
1699
|
setup(s) {
|
|
1698
|
-
const n =
|
|
1699
|
-
|
|
1700
|
-
const o =
|
|
1700
|
+
const n = ar().proxy;
|
|
1701
|
+
lr("parentFC", n);
|
|
1702
|
+
const o = ur("parentFC", null);
|
|
1701
1703
|
let a = o;
|
|
1702
1704
|
if (o)
|
|
1703
1705
|
for (; a.parent; )
|
|
1704
1706
|
a = a.parent;
|
|
1705
1707
|
else
|
|
1706
1708
|
a = n;
|
|
1707
|
-
const { rule: l, value: u, subForm: f, inFor: d } =
|
|
1709
|
+
const { rule: l, value: u, subForm: f, inFor: d } = ut(s), g = ne({
|
|
1708
1710
|
ctxInject: {},
|
|
1709
1711
|
destroyed: !1,
|
|
1710
1712
|
isShow: !0,
|
|
1711
1713
|
unique: 1,
|
|
1712
1714
|
renderRule: [...l.value || []],
|
|
1713
1715
|
updateValue: JSON.stringify(u.value || {})
|
|
1714
|
-
}), m = new t(n),
|
|
1716
|
+
}), m = new t(n), y = m.api(), w = d.value, O = () => {
|
|
1715
1717
|
if (o) {
|
|
1716
|
-
const k =
|
|
1718
|
+
const k = De(n, o);
|
|
1717
1719
|
if (k) {
|
|
1718
|
-
let
|
|
1719
|
-
w ? (
|
|
1720
|
+
let E;
|
|
1721
|
+
w ? (E = H(k.getSubForm()), E.push(y)) : E = y, k.subForm(E);
|
|
1720
1722
|
}
|
|
1721
1723
|
}
|
|
1722
1724
|
}, G = () => {
|
|
1723
|
-
const k =
|
|
1725
|
+
const k = De(n, o);
|
|
1724
1726
|
if (k)
|
|
1725
1727
|
if (w) {
|
|
1726
|
-
const
|
|
1727
|
-
N > -1 &&
|
|
1728
|
+
const E = H(k.getSubForm()), N = E.indexOf(y);
|
|
1729
|
+
N > -1 && E.splice(N, 1);
|
|
1728
1730
|
} else
|
|
1729
1731
|
k.subForm();
|
|
1730
1732
|
};
|
|
1731
1733
|
let T = null;
|
|
1732
|
-
|
|
1734
|
+
fr(() => {
|
|
1733
1735
|
L(() => {
|
|
1734
1736
|
let k = "";
|
|
1735
|
-
const
|
|
1736
|
-
Object.keys(
|
|
1737
|
+
const E = s.option && s.option.globalClass || {};
|
|
1738
|
+
Object.keys(E).forEach((N) => {
|
|
1737
1739
|
let pe = "";
|
|
1738
|
-
|
|
1739
|
-
pe +=
|
|
1740
|
-
}),
|
|
1740
|
+
E[N].style && Object.keys(E[N].style).forEach((W) => {
|
|
1741
|
+
pe += be(W) + ":" + E[N].style[W] + ";";
|
|
1742
|
+
}), E[N].content && (pe += E[N].content + ";"), pe && (k += `.${N}{${pe}}`);
|
|
1741
1743
|
}), s.option && s.option.style && (k += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = k || "";
|
|
1742
1744
|
}, () => {
|
|
1743
1745
|
});
|
|
@@ -1746,40 +1748,40 @@ function Kr(t, e, r) {
|
|
|
1746
1748
|
m.bus.$emit("$loadData.$topForm");
|
|
1747
1749
|
}, 100), he = se(function() {
|
|
1748
1750
|
m.bus.$emit("$loadData.$scopeForm");
|
|
1749
|
-
}, 100),
|
|
1751
|
+
}, 100), Ie = se(() => {
|
|
1750
1752
|
m.bus.$emit("$loadData.$form");
|
|
1751
1753
|
}, 100), de = (k) => {
|
|
1752
1754
|
m.bus.$emit("change-$form." + k);
|
|
1753
1755
|
};
|
|
1754
|
-
return
|
|
1755
|
-
o && (
|
|
1756
|
-
}), cr(() => {
|
|
1757
|
-
o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), g.destroyed = !0, m.unmount();
|
|
1756
|
+
return cr(() => {
|
|
1757
|
+
o && (y.top.bus.$on("$loadData.$form", M), y.top.bus.$on("change", de)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", he), m.mounted();
|
|
1758
1758
|
}), hr(() => {
|
|
1759
|
+
o && (y.top.bus.$off("$loadData.$form", M), y.top.bus.$off("change", de)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), g.destroyed = !0, m.unmount();
|
|
1760
|
+
}), dr(() => {
|
|
1759
1761
|
m.updated();
|
|
1760
1762
|
}), L(f, (k) => {
|
|
1761
1763
|
k ? O() : G();
|
|
1762
1764
|
}, { immediate: !0 }), L(() => s.option, () => {
|
|
1763
|
-
m.initOptions(),
|
|
1765
|
+
m.initOptions(), y.refresh();
|
|
1764
1766
|
}, { deep: !0 }), L(() => [...l.value], (k) => {
|
|
1765
|
-
m.$handle.isBreakWatch() || k.length === g.renderRule.length && k.every((
|
|
1767
|
+
m.$handle.isBreakWatch() || k.length === g.renderRule.length && k.every((E) => g.renderRule.indexOf(E) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
|
|
1766
1768
|
}), L(() => [s.disabled, s.preview], () => {
|
|
1767
|
-
|
|
1769
|
+
y.refresh();
|
|
1768
1770
|
}), L(u, (k) => {
|
|
1769
|
-
_e(k || {}) !== g.updateValue && (
|
|
1771
|
+
_e(k || {}) !== g.updateValue && (y.config.forceCoverValue ? y.coverValue(k || {}) : y.setValue(k || {}));
|
|
1770
1772
|
}, { deep: !0, flush: "post" }), L(() => s.index, () => {
|
|
1771
|
-
|
|
1773
|
+
y.coverValue({}), m.$handle.updateAppendData(), I(() => {
|
|
1772
1774
|
I(() => {
|
|
1773
|
-
|
|
1775
|
+
y.clearValidateState();
|
|
1774
1776
|
});
|
|
1775
1777
|
});
|
|
1776
1778
|
}, { flush: "sync" }), q(v({
|
|
1777
1779
|
fc: ge(m),
|
|
1778
1780
|
parent: o && ge(o),
|
|
1779
1781
|
top: ge(a),
|
|
1780
|
-
fapi: ge(
|
|
1781
|
-
},
|
|
1782
|
-
getGroupInject: () =>
|
|
1782
|
+
fapi: ge(y)
|
|
1783
|
+
}, ut(g)), {
|
|
1784
|
+
getGroupInject: () => De(n, o),
|
|
1783
1785
|
refresh() {
|
|
1784
1786
|
++g.unique;
|
|
1785
1787
|
},
|
|
@@ -1788,9 +1790,9 @@ function Kr(t, e, r) {
|
|
|
1788
1790
|
},
|
|
1789
1791
|
updateValue(k) {
|
|
1790
1792
|
if (g.destroyed) return;
|
|
1791
|
-
const
|
|
1792
|
-
g.updateValue !==
|
|
1793
|
-
|
|
1793
|
+
const E = _e(k);
|
|
1794
|
+
g.updateValue !== E && (g.updateValue = E, n.$emit("update:value", k), I(() => {
|
|
1795
|
+
Ie(), o ? f.value || he() : (M(), he());
|
|
1794
1796
|
}));
|
|
1795
1797
|
}
|
|
1796
1798
|
});
|
|
@@ -1800,7 +1802,7 @@ function Kr(t, e, r) {
|
|
|
1800
1802
|
}
|
|
1801
1803
|
};
|
|
1802
1804
|
}
|
|
1803
|
-
function
|
|
1805
|
+
function Bt() {
|
|
1804
1806
|
return {
|
|
1805
1807
|
props: {},
|
|
1806
1808
|
on: {},
|
|
@@ -1814,55 +1816,55 @@ function Tt() {
|
|
|
1814
1816
|
}
|
|
1815
1817
|
function P(t, e) {
|
|
1816
1818
|
return (r, i, s, n = {}) => {
|
|
1817
|
-
const o = new
|
|
1819
|
+
const o = new rt(t, r, i, s, n);
|
|
1818
1820
|
return e && (h.Function(e) ? e(o) : o.props(e)), o;
|
|
1819
1821
|
};
|
|
1820
1822
|
}
|
|
1821
|
-
function
|
|
1822
|
-
this._data = _(
|
|
1823
|
+
function rt(t, e, r, i, s) {
|
|
1824
|
+
this._data = _(Bt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1823
1825
|
}
|
|
1824
|
-
_(
|
|
1826
|
+
_(rt.prototype, {
|
|
1825
1827
|
getRule() {
|
|
1826
1828
|
return this._data;
|
|
1827
1829
|
},
|
|
1828
1830
|
setProp(t, e) {
|
|
1829
|
-
return
|
|
1831
|
+
return S(this._data, t, e), this;
|
|
1830
1832
|
},
|
|
1831
1833
|
_clone() {
|
|
1832
1834
|
const t = new this.constructor();
|
|
1833
|
-
return t._data =
|
|
1835
|
+
return t._data = It(this._data), t;
|
|
1834
1836
|
}
|
|
1835
1837
|
});
|
|
1836
|
-
function
|
|
1838
|
+
function Lt(t) {
|
|
1837
1839
|
t.forEach((e) => {
|
|
1838
|
-
|
|
1840
|
+
rt.prototype[e] = function(r) {
|
|
1839
1841
|
return te(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1840
1842
|
};
|
|
1841
1843
|
});
|
|
1842
1844
|
}
|
|
1843
|
-
|
|
1844
|
-
const
|
|
1845
|
-
function
|
|
1846
|
-
let i =
|
|
1845
|
+
Lt(Dt());
|
|
1846
|
+
const Mt = P("");
|
|
1847
|
+
function zr(t, e, r) {
|
|
1848
|
+
let i = Mt("", e);
|
|
1847
1849
|
return i._data.type = t, i._data.title = r, i;
|
|
1848
1850
|
}
|
|
1849
|
-
function
|
|
1850
|
-
let s =
|
|
1851
|
+
function mt(t, e, r, i) {
|
|
1852
|
+
let s = Mt("", r);
|
|
1851
1853
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1852
1854
|
}
|
|
1853
|
-
function
|
|
1855
|
+
function xr() {
|
|
1854
1856
|
return {
|
|
1855
|
-
create:
|
|
1856
|
-
createTmp:
|
|
1857
|
-
template:
|
|
1857
|
+
create: zr,
|
|
1858
|
+
createTmp: mt,
|
|
1859
|
+
template: mt,
|
|
1858
1860
|
factory: P
|
|
1859
1861
|
};
|
|
1860
1862
|
}
|
|
1861
|
-
function
|
|
1863
|
+
function Xr(t, e, r) {
|
|
1862
1864
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1863
1865
|
return s.status = r.status, s.url = t, s;
|
|
1864
1866
|
}
|
|
1865
|
-
function
|
|
1867
|
+
function gt(t) {
|
|
1866
1868
|
const e = t.responseText || t.response;
|
|
1867
1869
|
if (!e)
|
|
1868
1870
|
return e;
|
|
@@ -1872,7 +1874,7 @@ function mt(t) {
|
|
|
1872
1874
|
return e;
|
|
1873
1875
|
}
|
|
1874
1876
|
}
|
|
1875
|
-
function
|
|
1877
|
+
function Nt(t) {
|
|
1876
1878
|
if (typeof XMLHttpRequest == "undefined")
|
|
1877
1879
|
return;
|
|
1878
1880
|
const e = new XMLHttpRequest();
|
|
@@ -1887,8 +1889,8 @@ function Mt(t) {
|
|
|
1887
1889
|
t.onError(o);
|
|
1888
1890
|
}, e.onload = function() {
|
|
1889
1891
|
if (e.status < 200 || e.status >= 300)
|
|
1890
|
-
return t.onError(
|
|
1891
|
-
t.onSuccess(
|
|
1892
|
+
return t.onError(Xr(r, t, e), gt(e));
|
|
1893
|
+
t.onSuccess(gt(e));
|
|
1892
1894
|
}, e.open(t.method || "get", r, !0);
|
|
1893
1895
|
let i;
|
|
1894
1896
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
@@ -1899,9 +1901,9 @@ function Mt(t) {
|
|
|
1899
1901
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1900
1902
|
}), e.send(i);
|
|
1901
1903
|
}
|
|
1902
|
-
function
|
|
1904
|
+
function yt(t, e, r) {
|
|
1903
1905
|
return new Promise((i, s) => {
|
|
1904
|
-
(e ||
|
|
1906
|
+
(e || Nt)(q(v({}, t), {
|
|
1905
1907
|
onSuccess(n) {
|
|
1906
1908
|
let o = (l) => l;
|
|
1907
1909
|
const a = x(t.parse);
|
|
@@ -1913,10 +1915,10 @@ function gt(t, e, r) {
|
|
|
1913
1915
|
}));
|
|
1914
1916
|
});
|
|
1915
1917
|
}
|
|
1916
|
-
function
|
|
1918
|
+
function ve(t) {
|
|
1917
1919
|
return K(t);
|
|
1918
1920
|
}
|
|
1919
|
-
function
|
|
1921
|
+
function Zr(t) {
|
|
1920
1922
|
function e(n) {
|
|
1921
1923
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1922
1924
|
}
|
|
@@ -1924,7 +1926,7 @@ function Xr(t) {
|
|
|
1924
1926
|
h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
|
|
1925
1927
|
const u = t.fieldCtx[l] || t.nameCtx[l];
|
|
1926
1928
|
u && u.forEach((f) => {
|
|
1927
|
-
|
|
1929
|
+
S(f.rule, o, a), t.$render.clearCache(f);
|
|
1928
1930
|
});
|
|
1929
1931
|
});
|
|
1930
1932
|
}
|
|
@@ -2000,14 +2002,14 @@ function Xr(t) {
|
|
|
2000
2002
|
if (n == null || typeof n == "boolean") {
|
|
2001
2003
|
const o = {};
|
|
2002
2004
|
return Object.keys(t.form).forEach((a) => {
|
|
2003
|
-
(n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] =
|
|
2005
|
+
(n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = ve(t.form[a]));
|
|
2004
2006
|
}), o;
|
|
2005
2007
|
} else
|
|
2006
2008
|
return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
|
|
2007
2009
|
},
|
|
2008
2010
|
getValue(n) {
|
|
2009
2011
|
const o = t.getFieldCtx(n);
|
|
2010
|
-
return o ?
|
|
2012
|
+
return o ? ve(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? ve(t.appendData[n]) : void 0;
|
|
2011
2013
|
},
|
|
2012
2014
|
coverValue(n) {
|
|
2013
2015
|
const o = v({}, n || {});
|
|
@@ -2094,7 +2096,7 @@ function Xr(t) {
|
|
|
2094
2096
|
disabled(n, o) {
|
|
2095
2097
|
e(o).forEach((a) => {
|
|
2096
2098
|
t.getCtxs(a).forEach((l) => {
|
|
2097
|
-
|
|
2099
|
+
S(l.rule.props, "disabled", !!n);
|
|
2098
2100
|
});
|
|
2099
2101
|
}), t.refresh();
|
|
2100
2102
|
},
|
|
@@ -2152,7 +2154,7 @@ function Xr(t) {
|
|
|
2152
2154
|
t.$manager.updateOptions(t.options), s.refresh();
|
|
2153
2155
|
},
|
|
2154
2156
|
hideForm: (n) => {
|
|
2155
|
-
|
|
2157
|
+
S(t.vm, "isShow", !n);
|
|
2156
2158
|
},
|
|
2157
2159
|
changeStatus: () => t.changeStatus,
|
|
2158
2160
|
clearChangeStatus: () => {
|
|
@@ -2197,7 +2199,7 @@ function Xr(t) {
|
|
|
2197
2199
|
},
|
|
2198
2200
|
setEffect(n, o, a) {
|
|
2199
2201
|
const l = t.getCtx(n);
|
|
2200
|
-
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) &&
|
|
2202
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) && S(l.rule, "$" + o, a), D(l.rule, "effect") || S(l.rule, "effect", {}), S(l.rule.effect, o, a));
|
|
2201
2203
|
},
|
|
2202
2204
|
clearEffectData(n, o) {
|
|
2203
2205
|
const a = t.getCtx(n);
|
|
@@ -2217,7 +2219,7 @@ function Xr(t) {
|
|
|
2217
2219
|
resetFields(n) {
|
|
2218
2220
|
e(n).forEach((o) => {
|
|
2219
2221
|
t.getCtxs(o).forEach((a) => {
|
|
2220
|
-
t.$render.clearCache(a), a.rule.value =
|
|
2222
|
+
t.$render.clearCache(a), a.rule.value = ve(a.defaultValue);
|
|
2221
2223
|
});
|
|
2222
2224
|
}), I(() => {
|
|
2223
2225
|
I(() => {
|
|
@@ -2230,7 +2232,7 @@ function Xr(t) {
|
|
|
2230
2232
|
method(n, o) {
|
|
2231
2233
|
const a = s.el(n);
|
|
2232
2234
|
if (!a || !a[o])
|
|
2233
|
-
throw new Error(
|
|
2235
|
+
throw new Error(jt("err", `${o} 方法不存在`));
|
|
2234
2236
|
return (...l) => a[o](...l);
|
|
2235
2237
|
},
|
|
2236
2238
|
exec(n, o, ...a) {
|
|
@@ -2278,7 +2280,7 @@ function Xr(t) {
|
|
|
2278
2280
|
}
|
|
2279
2281
|
},
|
|
2280
2282
|
getChildrenFormData(n, o) {
|
|
2281
|
-
return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] =
|
|
2283
|
+
return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = ve(u.value)), l), {});
|
|
2282
2284
|
},
|
|
2283
2285
|
setChildrenFormData(n, o, a) {
|
|
2284
2286
|
const l = s.getChildrenRuleList(n);
|
|
@@ -2324,7 +2326,7 @@ function Xr(t) {
|
|
|
2324
2326
|
bus: t.bus,
|
|
2325
2327
|
fetch(n) {
|
|
2326
2328
|
return new Promise((o, a) => {
|
|
2327
|
-
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2329
|
+
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((l) => {
|
|
2328
2330
|
F(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2329
2331
|
}).catch((l) => {
|
|
2330
2332
|
F(() => n.onError && n.onError(l)), a(l);
|
|
@@ -2335,7 +2337,7 @@ function Xr(t) {
|
|
|
2335
2337
|
watchFetch(n, o, a, l) {
|
|
2336
2338
|
return t.fc.watchLoadData((u, f) => {
|
|
2337
2339
|
let d = K(n);
|
|
2338
|
-
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() =>
|
|
2340
|
+
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => yt(d, t.fc.create.fetch, s).then((g) => {
|
|
2339
2341
|
F(() => d.onSuccess && d.onSuccess(g)), o && o(g, f);
|
|
2340
2342
|
}).catch((g) => {
|
|
2341
2343
|
F(() => d.onError && d.onError(g)), a && a(g);
|
|
@@ -2369,7 +2371,7 @@ function Xr(t) {
|
|
|
2369
2371
|
};
|
|
2370
2372
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2371
2373
|
}
|
|
2372
|
-
function
|
|
2374
|
+
function Qr(t) {
|
|
2373
2375
|
_(t.prototype, {
|
|
2374
2376
|
initCache() {
|
|
2375
2377
|
this.clearCacheAll();
|
|
@@ -2405,12 +2407,12 @@ function J(t) {
|
|
|
2405
2407
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2406
2408
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2407
2409
|
});
|
|
2408
|
-
return
|
|
2410
|
+
return qt(e);
|
|
2409
2411
|
}
|
|
2410
|
-
function
|
|
2412
|
+
function qt(t) {
|
|
2411
2413
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2412
2414
|
}
|
|
2413
|
-
function
|
|
2415
|
+
function Yr(t) {
|
|
2414
2416
|
_(t.prototype, {
|
|
2415
2417
|
initRender() {
|
|
2416
2418
|
this.cacheConfig = {};
|
|
@@ -2419,7 +2421,7 @@ function Qr(t) {
|
|
|
2419
2421
|
const r = (i) => {
|
|
2420
2422
|
if (i) {
|
|
2421
2423
|
let s;
|
|
2422
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2424
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + be(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + be(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2423
2425
|
}
|
|
2424
2426
|
};
|
|
2425
2427
|
return r(this.vm);
|
|
@@ -2492,20 +2494,20 @@ function Qr(t) {
|
|
|
2492
2494
|
l.length && i.slotUpdate && F(() => i.slotUpdate(u));
|
|
2493
2495
|
let f = [];
|
|
2494
2496
|
const d = e.loadChildrenPending();
|
|
2495
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((
|
|
2497
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((y) => {
|
|
2496
2498
|
f.push(this.renderRule({
|
|
2497
2499
|
type: "template",
|
|
2498
|
-
slot:
|
|
2500
|
+
slot: y
|
|
2499
2501
|
}, (() => {
|
|
2500
|
-
if (h.Function(n.renderSlots[
|
|
2501
|
-
return F(() => n.renderSlots[
|
|
2502
|
-
const w = this.parseSide(n.renderSlots[
|
|
2502
|
+
if (h.Function(n.renderSlots[y]))
|
|
2503
|
+
return F(() => n.renderSlots[y]());
|
|
2504
|
+
const w = this.parseSide(n.renderSlots[y], e);
|
|
2503
2505
|
return this.renderRule(w);
|
|
2504
2506
|
})()));
|
|
2505
2507
|
});
|
|
2506
2508
|
const g = this.getTypeSlot(e);
|
|
2507
2509
|
let m;
|
|
2508
|
-
return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(
|
|
2510
|
+
return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(Ke(f), e) : e.parser.render(Ke(f), e), m = this.renderSides(m, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), m = this.$manager.makeWrap(e, m)), e.none && (Array.isArray(m) ? m = m.map((y) => !y || !y.tag ? y : this.none(y)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
|
|
2509
2511
|
}, this.setCache(e, s, r);
|
|
2510
2512
|
}
|
|
2511
2513
|
return (...s) => {
|
|
@@ -2583,7 +2585,12 @@ function Qr(t) {
|
|
|
2583
2585
|
this.$manager.mergeProp(e), e.parser.mergeProp(e);
|
|
2584
2586
|
const n = v({}, e.prop.on || {}), o = {};
|
|
2585
2587
|
Object.keys(n).forEach((l) => {
|
|
2586
|
-
l.indexOf("native.") === 0
|
|
2588
|
+
if (l.indexOf("native.") === 0)
|
|
2589
|
+
o[l.replace("native.", "")] = n[l], delete n[l];
|
|
2590
|
+
else if (this.$handle.options.transformEventName !== !1) {
|
|
2591
|
+
const u = be(l);
|
|
2592
|
+
u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
|
|
2593
|
+
}
|
|
2587
2594
|
}), e.prop.on = n;
|
|
2588
2595
|
const a = [
|
|
2589
2596
|
{
|
|
@@ -2654,7 +2661,7 @@ function Qr(t) {
|
|
|
2654
2661
|
},
|
|
2655
2662
|
defaultRender(e, r) {
|
|
2656
2663
|
const i = e.prop;
|
|
2657
|
-
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(
|
|
2664
|
+
return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[e.type] ? this.vNode[e.type](i, r) : this.vNode[e.originType] ? this.vNode[e.originType](i, r) : this.vNode.make(qt(i.type), i, r);
|
|
2658
2665
|
},
|
|
2659
2666
|
createChildrenVnodes(e, r, i) {
|
|
2660
2667
|
this.force = i !== !1, this.tmpInput = r;
|
|
@@ -2687,8 +2694,8 @@ function Qr(t) {
|
|
|
2687
2694
|
}
|
|
2688
2695
|
});
|
|
2689
2696
|
}
|
|
2690
|
-
let
|
|
2691
|
-
function
|
|
2697
|
+
let ei = 1;
|
|
2698
|
+
function it(t) {
|
|
2692
2699
|
_(this, {
|
|
2693
2700
|
$handle: t,
|
|
2694
2701
|
fc: t.fc,
|
|
@@ -2697,8 +2704,8 @@ function rt(t) {
|
|
|
2697
2704
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2698
2705
|
force: !1,
|
|
2699
2706
|
tmpInput: null,
|
|
2700
|
-
id:
|
|
2701
|
-
}),
|
|
2707
|
+
id: ei++
|
|
2708
|
+
}), Tt(this, {
|
|
2702
2709
|
options() {
|
|
2703
2710
|
return t.options;
|
|
2704
2711
|
},
|
|
@@ -2707,9 +2714,9 @@ function rt(t) {
|
|
|
2707
2714
|
}
|
|
2708
2715
|
}), this.initCache(), this.initRender();
|
|
2709
2716
|
}
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
function
|
|
2717
|
+
Qr(it);
|
|
2718
|
+
Yr(it);
|
|
2719
|
+
function ti(t) {
|
|
2713
2720
|
_(t.prototype, {
|
|
2714
2721
|
parseInjectEvent(e, r) {
|
|
2715
2722
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2739,14 +2746,14 @@ function ei(t) {
|
|
|
2739
2746
|
let d, g = n || o || a;
|
|
2740
2747
|
if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
|
|
2741
2748
|
r || (g = `native-${g}`);
|
|
2742
|
-
const m =
|
|
2749
|
+
const m = be(`${g}-${f}`), y = (...w) => {
|
|
2743
2750
|
this.vm.$emit(m, ...w), this.vm.$emit("emit-event", m, ...w), this.bus.$emit(m, ...w);
|
|
2744
2751
|
};
|
|
2745
|
-
if (
|
|
2746
|
-
i[f] =
|
|
2752
|
+
if (y.__emit = !0, !d && l === !1)
|
|
2753
|
+
i[f] = y;
|
|
2747
2754
|
else {
|
|
2748
2755
|
let w = d || l || this.options.injectEvent;
|
|
2749
|
-
i[f] = h.Undef(w) ?
|
|
2756
|
+
i[f] = h.Undef(w) ? y : this.inject(s, y, w);
|
|
2750
2757
|
}
|
|
2751
2758
|
}
|
|
2752
2759
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2776,7 +2783,7 @@ function ei(t) {
|
|
|
2776
2783
|
},
|
|
2777
2784
|
loadStrVar(e, r, i) {
|
|
2778
2785
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2779
|
-
const s = e, n =
|
|
2786
|
+
const s = e, n = Kr(e);
|
|
2780
2787
|
let o;
|
|
2781
2788
|
if (n.forEach((a) => {
|
|
2782
2789
|
const l = a.split("||"), u = l[0].trim();
|
|
@@ -2812,13 +2819,13 @@ function ei(t) {
|
|
|
2812
2819
|
}
|
|
2813
2820
|
});
|
|
2814
2821
|
}
|
|
2815
|
-
const
|
|
2816
|
-
function
|
|
2822
|
+
const $t = ["hook:updated", "hook:mounted"];
|
|
2823
|
+
function ri(t) {
|
|
2817
2824
|
_(t.prototype, {
|
|
2818
2825
|
usePage() {
|
|
2819
2826
|
const e = this.options.page;
|
|
2820
2827
|
if (!e) return;
|
|
2821
|
-
let r = 25, i =
|
|
2828
|
+
let r = 25, i = ii(this.rules);
|
|
2822
2829
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), _(this, {
|
|
2823
2830
|
first: r,
|
|
2824
2831
|
limit: i,
|
|
@@ -2827,16 +2834,16 @@ function ti(t) {
|
|
|
2827
2834
|
},
|
|
2828
2835
|
pageLoad() {
|
|
2829
2836
|
const e = () => {
|
|
2830
|
-
this.pageEnd ? (this.vm.$off(
|
|
2837
|
+
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());
|
|
2831
2838
|
};
|
|
2832
|
-
this.vm.$on(
|
|
2839
|
+
this.vm.$on($t, e);
|
|
2833
2840
|
}
|
|
2834
2841
|
});
|
|
2835
2842
|
}
|
|
2836
|
-
function
|
|
2843
|
+
function ii(t) {
|
|
2837
2844
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2838
2845
|
}
|
|
2839
|
-
function
|
|
2846
|
+
function ni(t) {
|
|
2840
2847
|
_(t.prototype, {
|
|
2841
2848
|
clearNextTick() {
|
|
2842
2849
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2851,15 +2858,15 @@ function ii(t) {
|
|
|
2851
2858
|
}
|
|
2852
2859
|
});
|
|
2853
2860
|
}
|
|
2854
|
-
function
|
|
2861
|
+
function si(t) {
|
|
2855
2862
|
Object.defineProperties(t.origin, {
|
|
2856
|
-
__fc__:
|
|
2863
|
+
__fc__: xe(ge(t), !0)
|
|
2857
2864
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2858
|
-
__fc__:
|
|
2865
|
+
__fc__: xe(ge(t), !0)
|
|
2859
2866
|
});
|
|
2860
2867
|
}
|
|
2861
|
-
function
|
|
2862
|
-
const i =
|
|
2868
|
+
function Ut(t, e, r) {
|
|
2869
|
+
const i = Ve(), s = !!e.field;
|
|
2863
2870
|
_(this, {
|
|
2864
2871
|
id: i,
|
|
2865
2872
|
ref: i,
|
|
@@ -2886,9 +2893,9 @@ function qt(t, e, r) {
|
|
|
2886
2893
|
exportEl: void 0,
|
|
2887
2894
|
defaultValue: s ? K(r) : void 0,
|
|
2888
2895
|
field: e.field || void 0
|
|
2889
|
-
}), this.updateKey(),
|
|
2896
|
+
}), this.updateKey(), si(this), this.update(t, !0);
|
|
2890
2897
|
}
|
|
2891
|
-
_(
|
|
2898
|
+
_(Ut.prototype, {
|
|
2892
2899
|
getParentGroup() {
|
|
2893
2900
|
let t = this.parent;
|
|
2894
2901
|
for (; t; ) {
|
|
@@ -2958,7 +2965,7 @@ _(qt.prototype, {
|
|
|
2958
2965
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2959
2966
|
},
|
|
2960
2967
|
updateKey(t) {
|
|
2961
|
-
this.key =
|
|
2968
|
+
this.key = Ve(), t && this.parent && this.parent.updateKey(t);
|
|
2962
2969
|
},
|
|
2963
2970
|
updateType() {
|
|
2964
2971
|
this.originType = this.rule.type, this.type = J(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -3035,7 +3042,7 @@ _(qt.prototype, {
|
|
|
3035
3042
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3036
3043
|
}
|
|
3037
3044
|
});
|
|
3038
|
-
function
|
|
3045
|
+
function oi(t) {
|
|
3039
3046
|
_(t.prototype, {
|
|
3040
3047
|
nextRefresh(e) {
|
|
3041
3048
|
const r = this.loadedId;
|
|
@@ -3044,10 +3051,10 @@ function si(t) {
|
|
|
3044
3051
|
});
|
|
3045
3052
|
},
|
|
3046
3053
|
parseRule(e) {
|
|
3047
|
-
const r =
|
|
3054
|
+
const r = ht(e);
|
|
3048
3055
|
return Object.defineProperties(r, {
|
|
3049
|
-
__origin__:
|
|
3050
|
-
}),
|
|
3056
|
+
__origin__: xe(e, !0)
|
|
3057
|
+
}), ai(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3051
3058
|
i && this.loadFn(i, r);
|
|
3052
3059
|
}), this.loadCtrl(r), r.update && (r.update = x(r.update)), r;
|
|
3053
3060
|
},
|
|
@@ -3094,30 +3101,30 @@ function si(t) {
|
|
|
3094
3101
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3095
3102
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3096
3103
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3097
|
-
let l =
|
|
3104
|
+
let l = ht(o);
|
|
3098
3105
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3099
3106
|
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);
|
|
3100
3107
|
let f, d = !1, g = !!o.__fc__, m = l.value;
|
|
3101
3108
|
if (g) {
|
|
3102
3109
|
if (f = o.__fc__, m = f.defaultValue, f.deleted) {
|
|
3103
|
-
if (
|
|
3110
|
+
if (bt(f))
|
|
3104
3111
|
return;
|
|
3105
3112
|
f.update(this);
|
|
3106
3113
|
} else if (!f.check(this)) {
|
|
3107
|
-
if (
|
|
3114
|
+
if (bt(f))
|
|
3108
3115
|
return;
|
|
3109
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3116
|
+
e[a] = o = o._clone ? o._clone() : Vt(_e(o)), f = null, d = !0;
|
|
3110
3117
|
}
|
|
3111
3118
|
}
|
|
3112
3119
|
if (f)
|
|
3113
3120
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3114
3121
|
else {
|
|
3115
3122
|
const O = this.parseRule(o);
|
|
3116
|
-
f = new
|
|
3123
|
+
f = new Ut(this, O, m), this.bindParser(f);
|
|
3117
3124
|
}
|
|
3118
3125
|
[!1, !0].forEach((O) => this.parseEmit(f, O)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !g && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3119
|
-
const
|
|
3120
|
-
if (f.parser.loadChildren === !1 || s(
|
|
3126
|
+
const y = f.loadChildrenPending();
|
|
3127
|
+
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3121
3128
|
const O = i(a);
|
|
3122
3129
|
O > -1 || !a ? this.sort.splice(O + 1, 0, f.id) : this.sort.push(f.id);
|
|
3123
3130
|
}
|
|
@@ -3132,7 +3139,7 @@ function si(t) {
|
|
|
3132
3139
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3133
3140
|
},
|
|
3134
3141
|
useCtrl(e) {
|
|
3135
|
-
const r =
|
|
3142
|
+
const r = li(e), i = [], s = this.api;
|
|
3136
3143
|
if (!r.length) return !1;
|
|
3137
3144
|
for (let a = 0; a < r.length; a++) {
|
|
3138
3145
|
const l = r[a], u = l.handle || function(d) {
|
|
@@ -3141,7 +3148,7 @@ function si(t) {
|
|
|
3141
3148
|
if (!h.trueArray(l.rule)) continue;
|
|
3142
3149
|
const f = q(v({}, l), {
|
|
3143
3150
|
valid: F(() => u(e.rule.value, s)),
|
|
3144
|
-
ctrl:
|
|
3151
|
+
ctrl: ui(e, l.rule),
|
|
3145
3152
|
isHidden: h.String(l.rule[0])
|
|
3146
3153
|
});
|
|
3147
3154
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3150,16 +3157,16 @@ function si(t) {
|
|
|
3150
3157
|
const n = [];
|
|
3151
3158
|
let o = !1;
|
|
3152
3159
|
return this.deferSyncValue(() => {
|
|
3153
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method:
|
|
3160
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method: y }) => {
|
|
3154
3161
|
if (a) {
|
|
3155
3162
|
l ? e.ctrlRule.push({
|
|
3156
3163
|
__ctrl: !0,
|
|
3157
3164
|
children: u,
|
|
3158
3165
|
valid: l
|
|
3159
3166
|
}) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3160
|
-
|
|
3167
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((w) => {
|
|
3161
3168
|
this.api.setEffect(w, "required", l);
|
|
3162
|
-
}), l || this.api.clearValidateState(u)) :
|
|
3169
|
+
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3163
3170
|
});
|
|
3164
3171
|
return;
|
|
3165
3172
|
}
|
|
@@ -3204,27 +3211,27 @@ function si(t) {
|
|
|
3204
3211
|
}
|
|
3205
3212
|
});
|
|
3206
3213
|
}
|
|
3207
|
-
function
|
|
3208
|
-
const e =
|
|
3214
|
+
function ai(t) {
|
|
3215
|
+
const e = Bt();
|
|
3209
3216
|
return Object.keys(e).forEach((r) => {
|
|
3210
|
-
D(t, r) ||
|
|
3217
|
+
D(t, r) || S(t, r, e[r]);
|
|
3211
3218
|
}), t;
|
|
3212
3219
|
}
|
|
3213
|
-
function
|
|
3220
|
+
function li(t) {
|
|
3214
3221
|
const e = t.rule.control || [];
|
|
3215
3222
|
return h.Object(e) ? [e] : e;
|
|
3216
3223
|
}
|
|
3217
|
-
function
|
|
3224
|
+
function ui(t, e) {
|
|
3218
3225
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3219
3226
|
const i = t.ctrlRule[r];
|
|
3220
3227
|
if (i.children === e)
|
|
3221
3228
|
return i;
|
|
3222
3229
|
}
|
|
3223
3230
|
}
|
|
3224
|
-
function
|
|
3231
|
+
function bt(t) {
|
|
3225
3232
|
return !!t.rule.__ctrl;
|
|
3226
3233
|
}
|
|
3227
|
-
function
|
|
3234
|
+
function fi(t) {
|
|
3228
3235
|
_(t.prototype, {
|
|
3229
3236
|
setValue(e, r, i, s) {
|
|
3230
3237
|
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, {
|
|
@@ -3257,7 +3264,7 @@ function ui(t) {
|
|
|
3257
3264
|
setFormData(e, r) {
|
|
3258
3265
|
e.modelValue = r;
|
|
3259
3266
|
const i = e.getParentGroup();
|
|
3260
|
-
i && (this.subRuleData[i.id] ||
|
|
3267
|
+
i && (this.subRuleData[i.id] || S(this.subRuleData, i.id, {}), S(this.subRuleData[i.id], e.field, e.rule.value)), S(this.formData, e.id, r);
|
|
3261
3268
|
},
|
|
3262
3269
|
rmSubRuleData(e) {
|
|
3263
3270
|
const r = e.getParentGroup();
|
|
@@ -3268,9 +3275,9 @@ function ui(t) {
|
|
|
3268
3275
|
},
|
|
3269
3276
|
syncForm() {
|
|
3270
3277
|
const e = {}, r = this.fields(), i = [];
|
|
3271
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] =
|
|
3278
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Ae(this.appendData, n)), s), e), r.reduce((s, n) => {
|
|
3272
3279
|
const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
|
|
3273
|
-
return this.isIgnore(o.rule) && i.push(n), s[n] =
|
|
3280
|
+
return this.isIgnore(o.rule) && i.push(n), s[n] = Ae(o.rule, "value"), s;
|
|
3274
3281
|
}, e), this.form = ne(e), this.ignoreFields = i, this.syncValue();
|
|
3275
3282
|
},
|
|
3276
3283
|
isIgnore(e) {
|
|
@@ -3294,7 +3301,7 @@ function ui(t) {
|
|
|
3294
3301
|
}), this.vm.updateValue(e);
|
|
3295
3302
|
},
|
|
3296
3303
|
isChange(e, r) {
|
|
3297
|
-
return JSON.stringify(this.getFormData(e),
|
|
3304
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3298
3305
|
},
|
|
3299
3306
|
isQuote(e, r) {
|
|
3300
3307
|
return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -3327,10 +3334,10 @@ function ui(t) {
|
|
|
3327
3334
|
}
|
|
3328
3335
|
});
|
|
3329
3336
|
}
|
|
3330
|
-
function
|
|
3337
|
+
function vt(t, e) {
|
|
3331
3338
|
return typeof e == "function" ? "" + e : e;
|
|
3332
3339
|
}
|
|
3333
|
-
const
|
|
3340
|
+
const je = {
|
|
3334
3341
|
init(t) {
|
|
3335
3342
|
},
|
|
3336
3343
|
toFormValue(t, e) {
|
|
@@ -3349,8 +3356,8 @@ const De = {
|
|
|
3349
3356
|
},
|
|
3350
3357
|
mergeProp(t) {
|
|
3351
3358
|
}
|
|
3352
|
-
},
|
|
3353
|
-
function
|
|
3359
|
+
}, ci = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Ee = Symbol("oldValue");
|
|
3360
|
+
function hi(t) {
|
|
3354
3361
|
_(t.prototype, {
|
|
3355
3362
|
getCtx(e) {
|
|
3356
3363
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3385,7 +3392,7 @@ function ci(t) {
|
|
|
3385
3392
|
if (n)
|
|
3386
3393
|
return n;
|
|
3387
3394
|
}
|
|
3388
|
-
return r[e.originType] || r[J(e.type)] || r[e.trueType] ||
|
|
3395
|
+
return r[e.originType] || r[J(e.type)] || r[e.trueType] || je;
|
|
3389
3396
|
},
|
|
3390
3397
|
bindParser(e) {
|
|
3391
3398
|
e.setParser(this.getParser(e));
|
|
@@ -3398,8 +3405,8 @@ function ci(t) {
|
|
|
3398
3405
|
this.noWatchFn || (this.noWatchFn = e), F(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3399
3406
|
},
|
|
3400
3407
|
watchCtx(e) {
|
|
3401
|
-
if (
|
|
3402
|
-
const s =
|
|
3408
|
+
if (Dt().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
|
|
3409
|
+
const s = Ae(e.rule, i), n = i === "children";
|
|
3403
3410
|
e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3404
3411
|
let l = s.value;
|
|
3405
3412
|
if (!this.isBreakWatch()) {
|
|
@@ -3466,7 +3473,7 @@ function ci(t) {
|
|
|
3466
3473
|
return n;
|
|
3467
3474
|
});
|
|
3468
3475
|
}), e.input) {
|
|
3469
|
-
const i =
|
|
3476
|
+
const i = Ae(e.rule, "value");
|
|
3470
3477
|
e.watch.push(L(() => i.value, () => {
|
|
3471
3478
|
let s = e.parser.toFormValue(i.value, e);
|
|
3472
3479
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
@@ -3475,20 +3482,19 @@ function ci(t) {
|
|
|
3475
3482
|
this.bus.$once("load-end", () => {
|
|
3476
3483
|
let i = e.rule.computed;
|
|
3477
3484
|
i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : oe(e.rule, s, l);
|
|
3485
|
+
const n = ye(() => {
|
|
3486
|
+
const a = i[s];
|
|
3487
|
+
if (!a) return;
|
|
3488
|
+
const l = this.compute(e, a);
|
|
3489
|
+
return a.linkage && l === Ee ? Ee : l;
|
|
3490
|
+
}), o = (a) => {
|
|
3491
|
+
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : oe(e.rule, s, a);
|
|
3486
3492
|
};
|
|
3487
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 :
|
|
3488
|
-
|
|
3489
|
-
a
|
|
3493
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== B(e.rule, s)) && o(n.value), e.watch.push(L(n, (a, l) => {
|
|
3494
|
+
a === Ee || a === l || setTimeout(() => {
|
|
3495
|
+
o(a);
|
|
3490
3496
|
});
|
|
3491
|
-
}));
|
|
3497
|
+
}, { deep: !0 }));
|
|
3492
3498
|
}));
|
|
3493
3499
|
}), this.watchEffect(e);
|
|
3494
3500
|
},
|
|
@@ -3502,7 +3508,7 @@ function ci(t) {
|
|
|
3502
3508
|
}))) === !1)
|
|
3503
3509
|
n();
|
|
3504
3510
|
else {
|
|
3505
|
-
const a = this.validator(s, e);
|
|
3511
|
+
const a = this.validator(r, s, e);
|
|
3506
3512
|
if (a) {
|
|
3507
3513
|
let l = "";
|
|
3508
3514
|
typeof e.error == "object" && (l = e.error[a] || e.error.default), !l && typeof e.message == "string" && (l = e.message), l || (l = this.getValidateMessage(r, { key: a, rule: e[a] })), n(l);
|
|
@@ -3527,36 +3533,36 @@ function ci(t) {
|
|
|
3527
3533
|
title: (n = (s = e.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value
|
|
3528
3534
|
});
|
|
3529
3535
|
},
|
|
3530
|
-
validator(e, r) {
|
|
3531
|
-
if (h.empty(
|
|
3532
|
-
return
|
|
3533
|
-
for (const [
|
|
3534
|
-
switch (
|
|
3536
|
+
validator(e, r, i) {
|
|
3537
|
+
if (h.empty(r))
|
|
3538
|
+
return i.required ? "required" : void 0;
|
|
3539
|
+
for (const [n, o] of Object.entries(i))
|
|
3540
|
+
switch (n) {
|
|
3535
3541
|
case "len":
|
|
3536
3542
|
case "maxLen":
|
|
3537
3543
|
case "minLen":
|
|
3538
|
-
const
|
|
3539
|
-
if (Array.isArray(
|
|
3540
|
-
if (!
|
|
3541
|
-
return
|
|
3544
|
+
const a = (y) => n === "len" ? y === o : n === "maxLen" ? y <= o : y >= o;
|
|
3545
|
+
if (Array.isArray(r)) {
|
|
3546
|
+
if (!a(r.length))
|
|
3547
|
+
return n;
|
|
3542
3548
|
} else {
|
|
3543
|
-
if (typeof
|
|
3544
|
-
return
|
|
3545
|
-
if (!
|
|
3546
|
-
return
|
|
3549
|
+
if (typeof r == "object")
|
|
3550
|
+
return n;
|
|
3551
|
+
if (!a(("" + r).length))
|
|
3552
|
+
return n;
|
|
3547
3553
|
}
|
|
3548
3554
|
break;
|
|
3549
3555
|
case "pattern":
|
|
3550
|
-
if (!(typeof
|
|
3551
|
-
return
|
|
3556
|
+
if (!(typeof o == "string" ? new RegExp(o) : o).test("" + r))
|
|
3557
|
+
return n;
|
|
3552
3558
|
break;
|
|
3553
3559
|
case "uppercase":
|
|
3554
|
-
if (
|
|
3555
|
-
return
|
|
3560
|
+
if (o && (typeof r != "string" || !/^[A-Z]*$/.test(r)))
|
|
3561
|
+
return n;
|
|
3556
3562
|
break;
|
|
3557
3563
|
case "lowercase":
|
|
3558
|
-
if (
|
|
3559
|
-
return
|
|
3564
|
+
if (o && (typeof r != "string" || !/^[a-z]*$/.test(r)))
|
|
3565
|
+
return n;
|
|
3560
3566
|
break;
|
|
3561
3567
|
case "min":
|
|
3562
3568
|
case "max":
|
|
@@ -3564,40 +3570,44 @@ function ci(t) {
|
|
|
3564
3570
|
case "negative":
|
|
3565
3571
|
case "integer":
|
|
3566
3572
|
case "number":
|
|
3567
|
-
const
|
|
3568
|
-
if (Number.isNaN(
|
|
3569
|
-
return
|
|
3573
|
+
const u = Number(r);
|
|
3574
|
+
if (Number.isNaN(u) || n === "min" && u < o || n === "max" && u > o || n === "positive" && u <= 0 || n === "negative" && u >= 0 || n === "integer" && !Number.isInteger(u))
|
|
3575
|
+
return n;
|
|
3570
3576
|
break;
|
|
3571
3577
|
case "equal":
|
|
3572
|
-
if (
|
|
3573
|
-
return
|
|
3578
|
+
if (r !== o)
|
|
3579
|
+
return n;
|
|
3574
3580
|
break;
|
|
3575
3581
|
case "enum":
|
|
3576
|
-
if (Array.isArray(
|
|
3577
|
-
return
|
|
3582
|
+
if (Array.isArray(o) && !o.includes(r))
|
|
3583
|
+
return n;
|
|
3578
3584
|
break;
|
|
3579
3585
|
case "hasKeys":
|
|
3580
|
-
if (typeof
|
|
3581
|
-
return
|
|
3586
|
+
if (typeof r != "object" || Array.isArray(o) && o.some((y) => !(y in r)))
|
|
3587
|
+
return n;
|
|
3582
3588
|
break;
|
|
3583
3589
|
case "email":
|
|
3584
|
-
if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" +
|
|
3585
|
-
return
|
|
3590
|
+
if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" + r))
|
|
3591
|
+
return n;
|
|
3586
3592
|
break;
|
|
3587
3593
|
case "url":
|
|
3588
3594
|
if (!new RegExp(
|
|
3589
3595
|
"^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
|
|
3590
3596
|
"i"
|
|
3591
|
-
).test("" +
|
|
3592
|
-
return
|
|
3597
|
+
).test("" + r))
|
|
3598
|
+
return n;
|
|
3593
3599
|
break;
|
|
3594
3600
|
case "ip":
|
|
3595
|
-
if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" +
|
|
3596
|
-
return
|
|
3601
|
+
if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" + r))
|
|
3602
|
+
return n;
|
|
3597
3603
|
break;
|
|
3598
3604
|
case "phone":
|
|
3599
|
-
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" +
|
|
3600
|
-
return
|
|
3605
|
+
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" + r))
|
|
3606
|
+
return n;
|
|
3607
|
+
break;
|
|
3608
|
+
case "computed":
|
|
3609
|
+
if (!this.compute(e, o))
|
|
3610
|
+
return n;
|
|
3601
3611
|
break;
|
|
3602
3612
|
}
|
|
3603
3613
|
},
|
|
@@ -3615,18 +3625,18 @@ function ci(t) {
|
|
|
3615
3625
|
if (d.variable)
|
|
3616
3626
|
m = JSON.stringify(this.fc.getLoadData(d.variable) || "");
|
|
3617
3627
|
else if (d.field)
|
|
3618
|
-
m =
|
|
3628
|
+
m = pt(d.field || "");
|
|
3619
3629
|
else if (!d.mode)
|
|
3620
3630
|
return !0;
|
|
3621
|
-
let
|
|
3622
|
-
if (
|
|
3631
|
+
let y = d.compare;
|
|
3632
|
+
if (y && (y = pt(y || "")), d.mode ? g = n(d) : fe[d.condition] ? h.Function(d.handler) ? g = F(() => d.handler(this.api, e.rule)) : g = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${m}, ${y || "$val"}); }}}}`).call(this.api.form, fe, d.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : g = !1, l && g)
|
|
3623
3633
|
return !0;
|
|
3624
3634
|
l || (u = u && g);
|
|
3625
3635
|
}
|
|
3626
3636
|
return l ? !1 : u;
|
|
3627
3637
|
};
|
|
3628
3638
|
let o = n(r);
|
|
3629
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ? F(() => this.computeValue(r.linkage, e, s), void 0) :
|
|
3639
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? F(() => this.computeValue(r.linkage, e, s), void 0) : Ee : o;
|
|
3630
3640
|
} else if (h.Function(r))
|
|
3631
3641
|
i = () => r(this.api.form, this.api);
|
|
3632
3642
|
else {
|
|
@@ -3677,7 +3687,7 @@ function ci(t) {
|
|
|
3677
3687
|
}
|
|
3678
3688
|
});
|
|
3679
3689
|
}
|
|
3680
|
-
function
|
|
3690
|
+
function di(t) {
|
|
3681
3691
|
_(t.prototype, {
|
|
3682
3692
|
mounted() {
|
|
3683
3693
|
const e = () => {
|
|
@@ -3705,13 +3715,13 @@ function hi(t) {
|
|
|
3705
3715
|
}
|
|
3706
3716
|
});
|
|
3707
3717
|
}
|
|
3708
|
-
function
|
|
3718
|
+
function pi(t) {
|
|
3709
3719
|
_(t.prototype, {
|
|
3710
3720
|
useProvider() {
|
|
3711
3721
|
const e = this.fc.providers;
|
|
3712
3722
|
Object.keys(e).forEach((r) => {
|
|
3713
3723
|
let i = e[r];
|
|
3714
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3724
|
+
h.Function(i) && (i = i(this.fc)), i._c = gi(i), this.onEffect(i), this.providers[r] = i;
|
|
3715
3725
|
});
|
|
3716
3726
|
},
|
|
3717
3727
|
onEffect(e) {
|
|
@@ -3781,20 +3791,20 @@ function di(t) {
|
|
|
3781
3791
|
}
|
|
3782
3792
|
});
|
|
3783
3793
|
}
|
|
3784
|
-
function
|
|
3794
|
+
function mi(t) {
|
|
3785
3795
|
return t.filter(function(e, r, i) {
|
|
3786
3796
|
return i.indexOf(e, 0) === r;
|
|
3787
3797
|
});
|
|
3788
3798
|
}
|
|
3789
|
-
function
|
|
3799
|
+
function gi(t) {
|
|
3790
3800
|
const e = t.components;
|
|
3791
3801
|
if (Array.isArray(e)) {
|
|
3792
|
-
const r =
|
|
3802
|
+
const r = mi(e.filter((i) => i !== "*"));
|
|
3793
3803
|
return r.length ? r : !1;
|
|
3794
3804
|
} else return h.String(e) ? [e] : !1;
|
|
3795
3805
|
}
|
|
3796
3806
|
function X(t) {
|
|
3797
|
-
|
|
3807
|
+
Tt(this, {
|
|
3798
3808
|
options() {
|
|
3799
3809
|
return t.options.value || {};
|
|
3800
3810
|
},
|
|
@@ -3828,10 +3838,10 @@ function X(t) {
|
|
|
3828
3838
|
nextReload: () => {
|
|
3829
3839
|
this.lifecycle("reload");
|
|
3830
3840
|
}
|
|
3831
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3841
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3832
3842
|
const i = F(() => r(e, this));
|
|
3833
3843
|
return i && i !== e && _(e, i), e;
|
|
3834
|
-
},
|
|
3844
|
+
}, Zr(this));
|
|
3835
3845
|
}
|
|
3836
3846
|
_(X.prototype, {
|
|
3837
3847
|
initData(t) {
|
|
@@ -3871,26 +3881,26 @@ _(X.prototype, {
|
|
|
3871
3881
|
});
|
|
3872
3882
|
}
|
|
3873
3883
|
});
|
|
3874
|
-
ei(X);
|
|
3875
3884
|
ti(X);
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3885
|
+
ri(X);
|
|
3886
|
+
ni(X);
|
|
3887
|
+
oi(X);
|
|
3888
|
+
fi(X);
|
|
3880
3889
|
hi(X);
|
|
3881
3890
|
di(X);
|
|
3882
|
-
|
|
3883
|
-
|
|
3891
|
+
pi(X);
|
|
3892
|
+
const yi = "fcFragment", Me = {
|
|
3893
|
+
name: yi,
|
|
3884
3894
|
functional: !0,
|
|
3885
3895
|
props: ["vnode"],
|
|
3886
3896
|
render(t, e) {
|
|
3887
3897
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3888
3898
|
}
|
|
3889
3899
|
};
|
|
3890
|
-
function
|
|
3900
|
+
function $i(t) {
|
|
3891
3901
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3892
3902
|
}
|
|
3893
|
-
function
|
|
3903
|
+
function bi() {
|
|
3894
3904
|
const t = {};
|
|
3895
3905
|
function e(r) {
|
|
3896
3906
|
r && this.setVm(r);
|
|
@@ -3905,7 +3915,7 @@ function $i() {
|
|
|
3905
3915
|
},
|
|
3906
3916
|
makeComponent(r, i, s) {
|
|
3907
3917
|
var o;
|
|
3908
|
-
let n = this.$h(r,
|
|
3918
|
+
let n = this.$h(r, $i(i), s || []);
|
|
3909
3919
|
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3910
3920
|
const a = Object.keys(n.componentOptions.propsData);
|
|
3911
3921
|
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
@@ -3922,7 +3932,7 @@ function $i() {
|
|
|
3922
3932
|
},
|
|
3923
3933
|
use(r) {
|
|
3924
3934
|
Object.keys(r).forEach((i) => {
|
|
3925
|
-
const s =
|
|
3935
|
+
const s = be(i), n = At(i).toLocaleLowerCase(), o = r[i];
|
|
3926
3936
|
[i, s, n].forEach((a) => {
|
|
3927
3937
|
e.alias(i, o), e.prototype[a] = function(l, u) {
|
|
3928
3938
|
return this.make(o, l, u);
|
|
@@ -3932,12 +3942,12 @@ function $i() {
|
|
|
3932
3942
|
}
|
|
3933
3943
|
}), e;
|
|
3934
3944
|
}
|
|
3935
|
-
function
|
|
3936
|
-
class e extends
|
|
3945
|
+
function vi(t) {
|
|
3946
|
+
class e extends Ht {
|
|
3937
3947
|
}
|
|
3938
3948
|
return Object.assign(e.prototype, t), e;
|
|
3939
3949
|
}
|
|
3940
|
-
function
|
|
3950
|
+
function Ht(t) {
|
|
3941
3951
|
_(this, {
|
|
3942
3952
|
$handle: t,
|
|
3943
3953
|
vm: t.vm,
|
|
@@ -3948,12 +3958,12 @@ function Ut(t) {
|
|
|
3948
3958
|
}
|
|
3949
3959
|
}), this.updateKey(), this.init();
|
|
3950
3960
|
}
|
|
3951
|
-
_(
|
|
3961
|
+
_(Ht.prototype, {
|
|
3952
3962
|
__init() {
|
|
3953
3963
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
3954
3964
|
},
|
|
3955
3965
|
updateKey() {
|
|
3956
|
-
this.key =
|
|
3966
|
+
this.key = Ve();
|
|
3957
3967
|
},
|
|
3958
3968
|
//TODO interface
|
|
3959
3969
|
init() {
|
|
@@ -3996,7 +4006,7 @@ _(Ut.prototype, {
|
|
|
3996
4006
|
render(t) {
|
|
3997
4007
|
}
|
|
3998
4008
|
});
|
|
3999
|
-
const
|
|
4009
|
+
const _i = function(t) {
|
|
4000
4010
|
const e = {
|
|
4001
4011
|
name: "loadData",
|
|
4002
4012
|
_fn: [],
|
|
@@ -4008,9 +4018,11 @@ const vi = function(t) {
|
|
|
4008
4018
|
if (a && (a.attr || a.template)) {
|
|
4009
4019
|
let l = (d) => {
|
|
4010
4020
|
let g;
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
a.
|
|
4021
|
+
i && i.__fc__ && (g = i.__fc__.getParentGroup());
|
|
4022
|
+
let m;
|
|
4023
|
+
a.template ? m = t.$handle.loadStrVar(a.template, d, g ? { rule: i, value: t.$handle.subRuleData[g.id] || {} } : null) : a.handler && h.Function(a.handler) ? m = a.handler(d, i, s) : m = t.$handle.loadStrVar(`{{${a.attr}}}`, d, g ? { rule: i, value: t.$handle.subRuleData[g.id] || {} } : null), (m == null || m === "") && a.default != null && (m = a.default), a.copy !== !1 && (m = K(m));
|
|
4024
|
+
const y = a.modify ? i : r.getProp();
|
|
4025
|
+
a.to === "child" ? y.children ? S(y.children, 0, m) : S(y, "children", [m]) : oe(y, a.to || "options", m), s.sync(i);
|
|
4014
4026
|
}, u = (d) => l(d);
|
|
4015
4027
|
const f = t.watchLoadData(u);
|
|
4016
4028
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4025,7 +4037,7 @@ const vi = function(t) {
|
|
|
4025
4037
|
}
|
|
4026
4038
|
};
|
|
4027
4039
|
return e.watch = e.loaded, e;
|
|
4028
|
-
},
|
|
4040
|
+
}, Ci = function(t) {
|
|
4029
4041
|
const e = {
|
|
4030
4042
|
name: "t",
|
|
4031
4043
|
_fn: [],
|
|
@@ -4038,9 +4050,9 @@ const vi = function(t) {
|
|
|
4038
4050
|
if (l) {
|
|
4039
4051
|
const u = typeof l == "object";
|
|
4040
4052
|
let f = (m) => {
|
|
4041
|
-
let
|
|
4053
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, m);
|
|
4042
4054
|
const w = u && l.modify ? i : r.getProp();
|
|
4043
|
-
a === "child" ? w.children ?
|
|
4055
|
+
a === "child" ? w.children ? S(w.children, 0, y) : S(w, "children", [y]) : oe(w, a, y), s.sync(i);
|
|
4044
4056
|
}, d = (m) => f(m);
|
|
4045
4057
|
const g = t.watchLoadData(d);
|
|
4046
4058
|
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(g) : g();
|
|
@@ -4054,7 +4066,7 @@ const vi = function(t) {
|
|
|
4054
4066
|
}
|
|
4055
4067
|
};
|
|
4056
4068
|
return e.watch = e.loaded, e;
|
|
4057
|
-
},
|
|
4069
|
+
}, Gt = {
|
|
4058
4070
|
name: "componentValidate",
|
|
4059
4071
|
load(t, e, r) {
|
|
4060
4072
|
let i = t.getValue();
|
|
@@ -4077,9 +4089,9 @@ const vi = function(t) {
|
|
|
4077
4089
|
}
|
|
4078
4090
|
},
|
|
4079
4091
|
watch(...t) {
|
|
4080
|
-
|
|
4092
|
+
Gt.load(...t);
|
|
4081
4093
|
}
|
|
4082
|
-
},
|
|
4094
|
+
}, wi = function(t) {
|
|
4083
4095
|
function e(s) {
|
|
4084
4096
|
return h.String(s) && (s = {
|
|
4085
4097
|
action: s,
|
|
@@ -4115,7 +4127,7 @@ const vi = function(t) {
|
|
|
4115
4127
|
i._fn[s.id] = t.watchLoadData(se((d, g) => {
|
|
4116
4128
|
if (g && a.watch === !1)
|
|
4117
4129
|
return i._fn[s.id]();
|
|
4118
|
-
const m = t.$handle.loadFetchVar(K(a), d, n),
|
|
4130
|
+
const m = t.$handle.loadFetchVar(K(a), d, n), y = q(v({
|
|
4119
4131
|
headers: {}
|
|
4120
4132
|
}, m), {
|
|
4121
4133
|
onSuccess(w, O) {
|
|
@@ -4125,19 +4137,19 @@ const vi = function(t) {
|
|
|
4125
4137
|
h.Function(T) ? G = T : T && h.String(T) && (G = (M) => B(M, T)), l(G(w, n, o));
|
|
4126
4138
|
},
|
|
4127
4139
|
onError(w) {
|
|
4128
|
-
l(void 0), !f() && (u || ((O) =>
|
|
4140
|
+
l(void 0), !f() && (u || ((O) => tt(O.message || "fetch fail " + m.action)))(w, n, o);
|
|
4129
4141
|
}
|
|
4130
4142
|
});
|
|
4131
|
-
t.$handle.beforeFetch(
|
|
4143
|
+
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4132
4144
|
if (h.Function(m.action)) {
|
|
4133
4145
|
m.action(n, o).then((w) => {
|
|
4134
|
-
|
|
4146
|
+
y.onSuccess(w, !0);
|
|
4135
4147
|
}).catch((w) => {
|
|
4136
|
-
|
|
4148
|
+
y.onError(w);
|
|
4137
4149
|
});
|
|
4138
4150
|
return;
|
|
4139
4151
|
}
|
|
4140
|
-
F(() => t.create.fetch(
|
|
4152
|
+
F(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
|
|
4141
4153
|
}).catch((w) => {
|
|
4142
4154
|
});
|
|
4143
4155
|
}, a.wait || 600));
|
|
@@ -4156,13 +4168,13 @@ const vi = function(t) {
|
|
|
4156
4168
|
}
|
|
4157
4169
|
};
|
|
4158
4170
|
return i;
|
|
4159
|
-
},
|
|
4160
|
-
fetch:
|
|
4161
|
-
loadData:
|
|
4162
|
-
t:
|
|
4163
|
-
componentValidate:
|
|
4171
|
+
}, Fi = {
|
|
4172
|
+
fetch: wi,
|
|
4173
|
+
loadData: _i,
|
|
4174
|
+
t: Ci,
|
|
4175
|
+
componentValidate: Gt
|
|
4164
4176
|
};
|
|
4165
|
-
function
|
|
4177
|
+
function Oi(t) {
|
|
4166
4178
|
t = t || /* @__PURE__ */ new Map();
|
|
4167
4179
|
const e = {
|
|
4168
4180
|
$on(r, i) {
|
|
@@ -4186,8 +4198,8 @@ function Fi(t) {
|
|
|
4186
4198
|
};
|
|
4187
4199
|
return e;
|
|
4188
4200
|
}
|
|
4189
|
-
const
|
|
4190
|
-
name:
|
|
4201
|
+
const ki = "html", Si = {
|
|
4202
|
+
name: ki,
|
|
4191
4203
|
loadChildren: !1,
|
|
4192
4204
|
render(t, e) {
|
|
4193
4205
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4214,7 +4226,7 @@ function Ei(t) {
|
|
|
4214
4226
|
}
|
|
4215
4227
|
return null;
|
|
4216
4228
|
}
|
|
4217
|
-
function
|
|
4229
|
+
function Ri(t) {
|
|
4218
4230
|
const e = localStorage.getItem(t);
|
|
4219
4231
|
if (e)
|
|
4220
4232
|
try {
|
|
@@ -4224,7 +4236,7 @@ function Si(t) {
|
|
|
4224
4236
|
}
|
|
4225
4237
|
return null;
|
|
4226
4238
|
}
|
|
4227
|
-
function
|
|
4239
|
+
function Di(t) {
|
|
4228
4240
|
const e = sessionStorage.getItem(t);
|
|
4229
4241
|
if (e)
|
|
4230
4242
|
try {
|
|
@@ -4234,23 +4246,23 @@ function Ri(t) {
|
|
|
4234
4246
|
}
|
|
4235
4247
|
return null;
|
|
4236
4248
|
}
|
|
4237
|
-
function
|
|
4249
|
+
function nt(t, e) {
|
|
4238
4250
|
if (!e)
|
|
4239
4251
|
return null;
|
|
4240
4252
|
const r = e.split(".");
|
|
4241
4253
|
let i = t(r.shift());
|
|
4242
4254
|
return r.length ? i == null ? null : B(i, r) : i;
|
|
4243
4255
|
}
|
|
4244
|
-
function Di(t) {
|
|
4245
|
-
return it(Ei, t);
|
|
4246
|
-
}
|
|
4247
4256
|
function ji(t) {
|
|
4248
|
-
return
|
|
4257
|
+
return nt(Ei, t);
|
|
4249
4258
|
}
|
|
4250
4259
|
function Ai(t) {
|
|
4251
|
-
return
|
|
4260
|
+
return nt(Ri, t);
|
|
4252
4261
|
}
|
|
4253
|
-
|
|
4262
|
+
function Vi(t) {
|
|
4263
|
+
return nt(Di, t);
|
|
4264
|
+
}
|
|
4265
|
+
const Ii = {
|
|
4254
4266
|
en: {
|
|
4255
4267
|
required: "{title} is required",
|
|
4256
4268
|
validate: {
|
|
@@ -4300,17 +4312,17 @@ const Vi = {
|
|
|
4300
4312
|
}
|
|
4301
4313
|
}
|
|
4302
4314
|
};
|
|
4303
|
-
function
|
|
4315
|
+
function Pi(t, e) {
|
|
4304
4316
|
let r;
|
|
4305
4317
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4306
4318
|
}
|
|
4307
|
-
function
|
|
4308
|
-
return
|
|
4319
|
+
function Ne() {
|
|
4320
|
+
return Pi("name", ...arguments);
|
|
4309
4321
|
}
|
|
4310
|
-
function
|
|
4322
|
+
function Ti(t) {
|
|
4311
4323
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4312
4324
|
}
|
|
4313
|
-
function
|
|
4325
|
+
function Bi(t, e) {
|
|
4314
4326
|
const r = new Vue({
|
|
4315
4327
|
data() {
|
|
4316
4328
|
return { rule: t, option: e || {} };
|
|
@@ -4321,27 +4333,27 @@ function Ti(t, e) {
|
|
|
4321
4333
|
});
|
|
4322
4334
|
return r.$mount(), r;
|
|
4323
4335
|
}
|
|
4324
|
-
function
|
|
4336
|
+
function Li(t) {
|
|
4325
4337
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4326
|
-
|
|
4338
|
+
Rt.push(...e), Ye.push(...r), et.push(...i), Lt([...e, ...r, ...i]);
|
|
4327
4339
|
}
|
|
4328
|
-
let
|
|
4329
|
-
const U = {},
|
|
4330
|
-
function
|
|
4340
|
+
let Mi = 1;
|
|
4341
|
+
const U = {}, Re = Symbol("defValue");
|
|
4342
|
+
function Jt(t) {
|
|
4331
4343
|
const e = {
|
|
4332
|
-
[
|
|
4344
|
+
[Me.name]: Me
|
|
4333
4345
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4334
4346
|
t.extendApi
|
|
4335
|
-
], u = v({},
|
|
4347
|
+
], u = v({}, Fi), f = xr();
|
|
4336
4348
|
let d = { global: {} };
|
|
4337
4349
|
const g = t.isMobile === !0, m = ne({
|
|
4338
4350
|
$mobile: g
|
|
4339
|
-
}),
|
|
4340
|
-
|
|
4351
|
+
}), y = bi(), w = {}, O = {};
|
|
4352
|
+
Li(t.attrs || {});
|
|
4341
4353
|
function G(c) {
|
|
4342
4354
|
const p = U[c];
|
|
4343
4355
|
if (Array.isArray(p))
|
|
4344
|
-
return p.map((
|
|
4356
|
+
return p.map(($) => $.api());
|
|
4345
4357
|
if (p)
|
|
4346
4358
|
return p.api();
|
|
4347
4359
|
}
|
|
@@ -4349,51 +4361,51 @@ function Gt(t) {
|
|
|
4349
4361
|
o.push(c);
|
|
4350
4362
|
}
|
|
4351
4363
|
function M() {
|
|
4352
|
-
const c =
|
|
4364
|
+
const c = Ne(...arguments);
|
|
4353
4365
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4354
4366
|
}
|
|
4355
4367
|
function he() {
|
|
4356
|
-
const c =
|
|
4368
|
+
const c = Ne(...arguments);
|
|
4357
4369
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4358
4370
|
name: c.id
|
|
4359
4371
|
}));
|
|
4360
4372
|
}
|
|
4361
|
-
function
|
|
4362
|
-
|
|
4373
|
+
function Ie(c) {
|
|
4374
|
+
y.use(c);
|
|
4363
4375
|
}
|
|
4364
4376
|
function de() {
|
|
4365
|
-
const c =
|
|
4366
|
-
if (!c.id || !c.prop) return
|
|
4367
|
-
const p = J(c.id),
|
|
4368
|
-
r[p] =
|
|
4377
|
+
const c = Ne(...arguments);
|
|
4378
|
+
if (!c.id || !c.prop) return je;
|
|
4379
|
+
const p = J(c.id), $ = c.prop, b = $.merge === !0 ? r[p] : void 0;
|
|
4380
|
+
r[p] = Se($, b || je), f[p] = P(p), $.maker && _(f, $.maker);
|
|
4369
4381
|
}
|
|
4370
4382
|
function k(c, p) {
|
|
4371
|
-
let
|
|
4383
|
+
let $;
|
|
4372
4384
|
if (h.String(c)) {
|
|
4373
|
-
if (
|
|
4374
|
-
return ["form-create", "formcreate"].indexOf(
|
|
4385
|
+
if ($ = c, p === void 0)
|
|
4386
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? E() : e[$];
|
|
4375
4387
|
} else
|
|
4376
|
-
|
|
4377
|
-
if (
|
|
4378
|
-
const b = J(
|
|
4379
|
-
e[
|
|
4388
|
+
$ = J(c.name), p = c;
|
|
4389
|
+
if (!$ || !p) return;
|
|
4390
|
+
const b = J($);
|
|
4391
|
+
e[$] = p, e[b] = p, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], p.formCreateParser && de($, p.formCreateParser);
|
|
4380
4392
|
}
|
|
4381
|
-
function
|
|
4382
|
-
return
|
|
4393
|
+
function E() {
|
|
4394
|
+
return Wr(Te, e, i);
|
|
4383
4395
|
}
|
|
4384
4396
|
function N() {
|
|
4385
|
-
return
|
|
4397
|
+
return Me;
|
|
4386
4398
|
}
|
|
4387
4399
|
function pe(c, p) {
|
|
4388
4400
|
return h.Function(c.install) ? c.install(W, p) : h.Function(c) && c(W, p), this;
|
|
4389
4401
|
}
|
|
4390
|
-
function W(c, p,
|
|
4391
|
-
let b =
|
|
4402
|
+
function W(c, p, $) {
|
|
4403
|
+
let b = Bi(c, p || {});
|
|
4392
4404
|
const C = b.$refs.fc.formCreate;
|
|
4393
|
-
return C.$parent =
|
|
4405
|
+
return C.$parent = $, Ti(C.options).appendChild(b.$el), C.api();
|
|
4394
4406
|
}
|
|
4395
|
-
|
|
4396
|
-
function
|
|
4407
|
+
Se(W, O);
|
|
4408
|
+
function Wt(c) {
|
|
4397
4409
|
let p = v({}, t);
|
|
4398
4410
|
return c ? p.inherit = {
|
|
4399
4411
|
components: e,
|
|
@@ -4405,19 +4417,19 @@ function Gt(t) {
|
|
|
4405
4417
|
maker: f,
|
|
4406
4418
|
formulas: w,
|
|
4407
4419
|
loadData: m
|
|
4408
|
-
} : delete p.inherit,
|
|
4420
|
+
} : delete p.inherit, Jt(p);
|
|
4409
4421
|
}
|
|
4410
|
-
function
|
|
4422
|
+
function zt(c, p) {
|
|
4411
4423
|
s[c] = p;
|
|
4412
4424
|
}
|
|
4413
|
-
function
|
|
4425
|
+
function xt(c, p) {
|
|
4414
4426
|
w[c] = p;
|
|
4415
4427
|
}
|
|
4416
|
-
function
|
|
4417
|
-
const
|
|
4428
|
+
function Xt(c, p) {
|
|
4429
|
+
const $ = n[c] || {}, b = $.parsers || {};
|
|
4418
4430
|
p.parsers && Object.keys(p.parsers).forEach((C) => {
|
|
4419
|
-
b[C] =
|
|
4420
|
-
}), p.name = c, n[c] = q(v(v({},
|
|
4431
|
+
b[C] = Se(p.parsers[C], je);
|
|
4432
|
+
}), p.name = c, n[c] = q(v(v({}, $), p), { parsers: b });
|
|
4421
4433
|
}
|
|
4422
4434
|
function we(c) {
|
|
4423
4435
|
c && Object.keys(U).forEach((p) => {
|
|
@@ -4426,45 +4438,45 @@ function Gt(t) {
|
|
|
4426
4438
|
});
|
|
4427
4439
|
});
|
|
4428
4440
|
}
|
|
4429
|
-
function
|
|
4441
|
+
function Pe(c, p) {
|
|
4430
4442
|
oe(m, c, p), we(c);
|
|
4431
4443
|
}
|
|
4432
4444
|
function Fe(c, p) {
|
|
4433
|
-
const
|
|
4434
|
-
|
|
4445
|
+
const $ = (...b) => F(() => p(...b));
|
|
4446
|
+
$._driver = !0, Pe(c, $);
|
|
4435
4447
|
}
|
|
4436
|
-
function
|
|
4437
|
-
const
|
|
4438
|
-
c =
|
|
4439
|
-
const b =
|
|
4440
|
-
if (D(m, c) ||
|
|
4448
|
+
function st(c, p) {
|
|
4449
|
+
const $ = (c || "").split(".");
|
|
4450
|
+
c = $.shift();
|
|
4451
|
+
const b = $.join(".");
|
|
4452
|
+
if (D(m, c) || S(m, c, Re), m[c] !== Re) {
|
|
4441
4453
|
let C = m[c];
|
|
4442
|
-
return C && C._driver ? C = C(b) :
|
|
4454
|
+
return C && C._driver ? C = C(b) : $.length && (C = B(C, $)), C == null || C === "" ? p : C;
|
|
4443
4455
|
} else
|
|
4444
4456
|
return p;
|
|
4445
4457
|
}
|
|
4446
|
-
function
|
|
4458
|
+
function Zt(c) {
|
|
4447
4459
|
l.push(c);
|
|
4448
4460
|
}
|
|
4449
|
-
function
|
|
4461
|
+
function Qt(c) {
|
|
4450
4462
|
delete m[c], we(c);
|
|
4451
4463
|
}
|
|
4452
|
-
function
|
|
4464
|
+
function Yt(c, p) {
|
|
4453
4465
|
a.push({ name: c, callback: p });
|
|
4454
4466
|
}
|
|
4455
|
-
function
|
|
4467
|
+
function Te(c) {
|
|
4456
4468
|
_(this, {
|
|
4457
|
-
id:
|
|
4469
|
+
id: Mi++,
|
|
4458
4470
|
create: W,
|
|
4459
4471
|
vm: c,
|
|
4460
|
-
manager:
|
|
4472
|
+
manager: vi(t.manager),
|
|
4461
4473
|
parsers: r,
|
|
4462
4474
|
providers: u,
|
|
4463
4475
|
modelFields: s,
|
|
4464
4476
|
formulas: w,
|
|
4465
4477
|
isMobile: g,
|
|
4466
4478
|
rules: c.$options.propsData.rule,
|
|
4467
|
-
name: c.$options.propsData.name ||
|
|
4479
|
+
name: c.$options.propsData.name || Ve(),
|
|
4468
4480
|
inFor: c.$options.propsData.inFor,
|
|
4469
4481
|
prop: {
|
|
4470
4482
|
components: e,
|
|
@@ -4475,10 +4487,10 @@ function Gt(t) {
|
|
|
4475
4487
|
renderDriver: null,
|
|
4476
4488
|
refreshData: we,
|
|
4477
4489
|
loadData: m,
|
|
4478
|
-
CreateNode:
|
|
4479
|
-
bus: new
|
|
4490
|
+
CreateNode: y,
|
|
4491
|
+
bus: new Oi(),
|
|
4480
4492
|
unwatch: [],
|
|
4481
|
-
options:
|
|
4493
|
+
options: pr({}),
|
|
4482
4494
|
extendApiFn: l,
|
|
4483
4495
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4484
4496
|
tmpData: ne({})
|
|
@@ -4490,7 +4502,7 @@ function Gt(t) {
|
|
|
4490
4502
|
}, { deep: !0 });
|
|
4491
4503
|
}), _(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);
|
|
4492
4504
|
}
|
|
4493
|
-
|
|
4505
|
+
Te.isMobile = g, _(Te.prototype, {
|
|
4494
4506
|
init() {
|
|
4495
4507
|
this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
|
|
4496
4508
|
this.initOptions(), this.$handle.api.refresh();
|
|
@@ -4500,8 +4512,8 @@ function Gt(t) {
|
|
|
4500
4512
|
if (this.renderDriver && this.renderDriver[c])
|
|
4501
4513
|
return F(() => this.renderDriver[c](...p));
|
|
4502
4514
|
},
|
|
4503
|
-
t(c, p,
|
|
4504
|
-
let b =
|
|
4515
|
+
t(c, p, $) {
|
|
4516
|
+
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4505
4517
|
return b == null && (b = ""), b && p && Object.keys(p).forEach((C) => {
|
|
4506
4518
|
const j = new RegExp(`{${C}}`, "g");
|
|
4507
4519
|
b = b.replace(j, p[C]);
|
|
@@ -4509,7 +4521,7 @@ function Gt(t) {
|
|
|
4509
4521
|
},
|
|
4510
4522
|
globalDataDriver(c) {
|
|
4511
4523
|
let p = c.split(".");
|
|
4512
|
-
const
|
|
4524
|
+
const $ = p.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4513
4525
|
if (b) {
|
|
4514
4526
|
if (b.type === "static")
|
|
4515
4527
|
return B(b.data, p);
|
|
@@ -4525,9 +4537,9 @@ function Gt(t) {
|
|
|
4525
4537
|
const R = se(() => {
|
|
4526
4538
|
le();
|
|
4527
4539
|
const z = this.fetchCache.get(b);
|
|
4528
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." +
|
|
4540
|
+
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
4529
4541
|
}, b.wait || 600), ae = (z) => {
|
|
4530
|
-
this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." +
|
|
4542
|
+
this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." + $);
|
|
4531
4543
|
}, Z = (z, ue) => {
|
|
4532
4544
|
if (ue && b.watch === !1)
|
|
4533
4545
|
return le();
|
|
@@ -4535,7 +4547,7 @@ function Gt(t) {
|
|
|
4535
4547
|
R();
|
|
4536
4548
|
return;
|
|
4537
4549
|
}
|
|
4538
|
-
const me = this.$handle.loadFetchVar(
|
|
4550
|
+
const me = this.$handle.loadFetchVar(Ke(b), z);
|
|
4539
4551
|
this.$handle.api.fetch(me).then((re) => {
|
|
4540
4552
|
ae(re);
|
|
4541
4553
|
}).catch((re) => {
|
|
@@ -4551,91 +4563,91 @@ function Gt(t) {
|
|
|
4551
4563
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4552
4564
|
},
|
|
4553
4565
|
globalLanguageDriver(c) {
|
|
4554
|
-
let p = this.vm.top.$props.locale,
|
|
4555
|
-
if (p && typeof p == "object" && (
|
|
4566
|
+
let p = this.vm.top.$props.locale, $;
|
|
4567
|
+
if (p && typeof p == "object" && ($ = B(p, c)), $ == null) {
|
|
4556
4568
|
const b = this.options.value.language || {}, C = this.getLocale();
|
|
4557
|
-
|
|
4569
|
+
$ = B(b[C] || {}, c), $ == null && ($ = B(Ii[C] || {}, c));
|
|
4558
4570
|
}
|
|
4559
|
-
return
|
|
4571
|
+
return $;
|
|
4560
4572
|
},
|
|
4561
4573
|
globalVarDriver(c) {
|
|
4562
4574
|
let p = c.split(".");
|
|
4563
|
-
const
|
|
4575
|
+
const $ = p.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4564
4576
|
if (b) {
|
|
4565
4577
|
const C = h.Function(b) ? b : x(b.handle);
|
|
4566
4578
|
if (C) {
|
|
4567
4579
|
let j;
|
|
4568
4580
|
const R = this.watchLoadData((ae, Z) => {
|
|
4569
|
-
Z ? (this.bus.$emit("$loadData.$var." +
|
|
4581
|
+
Z ? (this.bus.$emit("$loadData.$var." + $), R()) : j = C(ae, this.$handle.api);
|
|
4570
4582
|
});
|
|
4571
4583
|
return this.unwatch.push(R), B(j, p);
|
|
4572
4584
|
}
|
|
4573
4585
|
}
|
|
4574
4586
|
},
|
|
4575
|
-
setData(c, p,
|
|
4576
|
-
|
|
4587
|
+
setData(c, p, $) {
|
|
4588
|
+
$ ? Pe(c, p) : (oe(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
|
|
4577
4589
|
},
|
|
4578
4590
|
getLoadData(c, p) {
|
|
4579
|
-
let
|
|
4591
|
+
let $ = null;
|
|
4580
4592
|
if (c != null) {
|
|
4581
4593
|
let b = c.split(".");
|
|
4582
4594
|
const C = b.shift();
|
|
4583
4595
|
if (C === "$topForm")
|
|
4584
|
-
|
|
4596
|
+
$ = this.$handle.api.top.formData(!0);
|
|
4585
4597
|
else if (C === "$scopeForm")
|
|
4586
|
-
|
|
4598
|
+
$ = this.$handle.api.scope.formData(!0);
|
|
4587
4599
|
else if (C === "$form")
|
|
4588
|
-
|
|
4600
|
+
$ = this.$handle.api.formData(!0);
|
|
4589
4601
|
else if (C === "$options")
|
|
4590
|
-
|
|
4602
|
+
$ = this.options.value;
|
|
4591
4603
|
else if (C === "$globalData")
|
|
4592
|
-
|
|
4604
|
+
$ = this.globalDataDriver(b.join(".")), b = [];
|
|
4593
4605
|
else if (C === "$var")
|
|
4594
|
-
|
|
4606
|
+
$ = this.globalVarDriver(b.join(".")), b = [];
|
|
4595
4607
|
else if (C === "$locale")
|
|
4596
|
-
|
|
4608
|
+
$ = this.getLocale(), b = [];
|
|
4597
4609
|
else if (C === "$t")
|
|
4598
|
-
|
|
4610
|
+
$ = this.globalLanguageDriver(b.join(".")), b = [];
|
|
4599
4611
|
else {
|
|
4600
4612
|
if (C === "$preview")
|
|
4601
4613
|
return this.$handle.preview;
|
|
4602
4614
|
{
|
|
4603
4615
|
const j = this.vm.top.fc.tmpData;
|
|
4604
|
-
D(j, C) ||
|
|
4616
|
+
D(j, C) || S(j, C, Re), $ = j[C] !== Re ? B(j, c) : st(c), b = [];
|
|
4605
4617
|
}
|
|
4606
4618
|
}
|
|
4607
|
-
|
|
4619
|
+
$ && b.length && ($ = B($, b));
|
|
4608
4620
|
}
|
|
4609
|
-
return
|
|
4621
|
+
return $ == null || $ === "" ? p : $;
|
|
4610
4622
|
},
|
|
4611
4623
|
watchLoadData(c, p) {
|
|
4612
|
-
let
|
|
4624
|
+
let $ = {};
|
|
4613
4625
|
const b = (R) => {
|
|
4614
4626
|
this.get || (this.get = C), F(() => {
|
|
4615
4627
|
c(C, R);
|
|
4616
4628
|
}), this.get === C && (this.get = void 0);
|
|
4617
4629
|
}, C = (R, ae) => {
|
|
4618
4630
|
let Z;
|
|
4619
|
-
if (typeof R == "object" && (Z = R.getValue, R = R.id),
|
|
4620
|
-
return
|
|
4631
|
+
if (typeof R == "object" && (Z = R.getValue, R = R.id), $[R])
|
|
4632
|
+
return $[R].val;
|
|
4621
4633
|
const le = ye(() => Z ? Z() : this.getLoadData(R, ae)), z = R.split("."), ue = z.shift(), me = z.shift() || "", re = se(() => {
|
|
4622
|
-
const
|
|
4623
|
-
if (
|
|
4624
|
-
JSON.stringify(
|
|
4634
|
+
const Be = Z ? Z() : this.getLoadData(R, ae);
|
|
4635
|
+
if ($[R])
|
|
4636
|
+
JSON.stringify(Be) !== JSON.stringify($[R].val) && ($[R].val = Be, b(!0));
|
|
4625
4637
|
else return;
|
|
4626
|
-
}, p || 0),
|
|
4638
|
+
}, p || 0), tr = L(le, (Be) => {
|
|
4627
4639
|
re();
|
|
4628
4640
|
});
|
|
4629
|
-
return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re),
|
|
4641
|
+
return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), $[R] = {
|
|
4630
4642
|
fn: () => {
|
|
4631
|
-
this.bus.$off("$loadData." + ue, re), me && this.bus.$off("$loadData." + ue + "." + me, re),
|
|
4643
|
+
this.bus.$off("$loadData." + ue, re), me && this.bus.$off("$loadData." + ue + "." + me, re), tr();
|
|
4632
4644
|
},
|
|
4633
4645
|
val: le.value
|
|
4634
4646
|
}, le.value;
|
|
4635
4647
|
};
|
|
4636
4648
|
b(!1);
|
|
4637
4649
|
const j = () => {
|
|
4638
|
-
Object.keys(
|
|
4650
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4639
4651
|
};
|
|
4640
4652
|
return this.unwatch.push(j), j;
|
|
4641
4653
|
},
|
|
@@ -4653,10 +4665,10 @@ function Gt(t) {
|
|
|
4653
4665
|
}, K(d));
|
|
4654
4666
|
this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
|
|
4655
4667
|
},
|
|
4656
|
-
mergeOptions(c, p,
|
|
4657
|
-
return p = v({}, p || {}),
|
|
4668
|
+
mergeOptions(c, p, $) {
|
|
4669
|
+
return p = v({}, p || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4658
4670
|
delete p[b];
|
|
4659
|
-
}), p.global && (c.global =
|
|
4671
|
+
}), p.global && (c.global = Gr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
|
|
4660
4672
|
},
|
|
4661
4673
|
updateOptions(c) {
|
|
4662
4674
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4685,65 +4697,65 @@ function Gt(t) {
|
|
|
4685
4697
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4686
4698
|
}
|
|
4687
4699
|
});
|
|
4688
|
-
function
|
|
4700
|
+
function ot(c) {
|
|
4689
4701
|
_(c, {
|
|
4690
4702
|
version: t.version,
|
|
4691
4703
|
ui: t.ui,
|
|
4692
4704
|
isMobile: g,
|
|
4693
|
-
extendApi:
|
|
4694
|
-
getData:
|
|
4705
|
+
extendApi: Zt,
|
|
4706
|
+
getData: st,
|
|
4695
4707
|
setDataDriver: Fe,
|
|
4696
|
-
setData:
|
|
4697
|
-
removeData:
|
|
4708
|
+
setData: Pe,
|
|
4709
|
+
removeData: Qt,
|
|
4698
4710
|
refreshData: we,
|
|
4699
4711
|
maker: f,
|
|
4700
4712
|
component: k,
|
|
4701
4713
|
directive: M,
|
|
4702
|
-
setModelField:
|
|
4703
|
-
setFormula:
|
|
4704
|
-
setDriver:
|
|
4714
|
+
setModelField: zt,
|
|
4715
|
+
setFormula: xt,
|
|
4716
|
+
setDriver: Xt,
|
|
4705
4717
|
register: he,
|
|
4706
4718
|
$vnode: N,
|
|
4707
4719
|
parser: de,
|
|
4708
4720
|
use: pe,
|
|
4709
|
-
factory:
|
|
4710
|
-
componentAlias:
|
|
4711
|
-
copyRule:
|
|
4712
|
-
copyRules:
|
|
4721
|
+
factory: Wt,
|
|
4722
|
+
componentAlias: Ie,
|
|
4723
|
+
copyRule: It,
|
|
4724
|
+
copyRules: Pt,
|
|
4713
4725
|
mergeRule: te,
|
|
4714
|
-
fetch:
|
|
4715
|
-
$form:
|
|
4726
|
+
fetch: Nt,
|
|
4727
|
+
$form: E,
|
|
4716
4728
|
parseFn: x,
|
|
4717
|
-
parseJson:
|
|
4729
|
+
parseJson: Vt,
|
|
4718
4730
|
toJson: _e,
|
|
4719
4731
|
useApp: T,
|
|
4720
4732
|
getApi: G,
|
|
4721
|
-
on:
|
|
4733
|
+
on: Yt
|
|
4722
4734
|
});
|
|
4723
4735
|
}
|
|
4724
|
-
function
|
|
4736
|
+
function er(c) {
|
|
4725
4737
|
_(c, {
|
|
4726
4738
|
create: W,
|
|
4727
|
-
install(p,
|
|
4728
|
-
if (d = v(v({}, d),
|
|
4739
|
+
install(p, $) {
|
|
4740
|
+
if (d = v(v({}, d), $ || {}), p._installedFormCreate === !0) return;
|
|
4729
4741
|
p._installedFormCreate = !0;
|
|
4730
4742
|
const b = function(j, R = {}) {
|
|
4731
4743
|
return W(j, R, this);
|
|
4732
4744
|
};
|
|
4733
|
-
|
|
4734
|
-
const C =
|
|
4745
|
+
ot(b), p.prototype.$formCreate = b;
|
|
4746
|
+
const C = E();
|
|
4735
4747
|
p.component(C.name, C), p.component("FcFragment", N()), o.forEach((j) => {
|
|
4736
4748
|
F(() => j(c, p));
|
|
4737
4749
|
});
|
|
4738
4750
|
}
|
|
4739
4751
|
});
|
|
4740
4752
|
}
|
|
4741
|
-
if (
|
|
4753
|
+
if (ot(O), er(O), Fe("$cookie", ji), Fe("$localStorage", Ai), Fe("$sessionStorage", Vi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), de(Si), t.inherit) {
|
|
4742
4754
|
const c = t.inherit;
|
|
4743
4755
|
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 && _(m, c.loadData), c.formulas && _(w, c.formulas);
|
|
4744
4756
|
}
|
|
4745
|
-
const Oe =
|
|
4746
|
-
return
|
|
4757
|
+
const Oe = E();
|
|
4758
|
+
return Se(Oe, O), Object.defineProperties(Oe, {
|
|
4747
4759
|
fetch: {
|
|
4748
4760
|
get() {
|
|
4749
4761
|
return O.fetch;
|
|
@@ -4754,7 +4766,7 @@ function Gt(t) {
|
|
|
4754
4766
|
}
|
|
4755
4767
|
}), Oe.util = O, Oe;
|
|
4756
4768
|
}
|
|
4757
|
-
const
|
|
4769
|
+
const _t = {
|
|
4758
4770
|
date: "yyyy-MM-dd",
|
|
4759
4771
|
month: "yyyy-MM",
|
|
4760
4772
|
datetime: "yyyy-MM-dd HH:mm:ss",
|
|
@@ -4763,73 +4775,73 @@ const vt = {
|
|
|
4763
4775
|
monthrange: "yyyy-MM",
|
|
4764
4776
|
datetimerange: "yyyy-MM-dd HH:mm:ss",
|
|
4765
4777
|
year: "yyyy"
|
|
4766
|
-
},
|
|
4767
|
-
name:
|
|
4778
|
+
}, Ct = "datePicker", Ni = {
|
|
4779
|
+
name: Ct,
|
|
4768
4780
|
maker: function() {
|
|
4769
|
-
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = P(
|
|
4781
|
+
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = P(Ct, { type: e.toLowerCase() }), t), {});
|
|
4770
4782
|
}(),
|
|
4771
4783
|
mergeProp(t) {
|
|
4772
4784
|
const e = t.prop.props;
|
|
4773
|
-
e.valueFormat || (e.valueFormat =
|
|
4785
|
+
e.valueFormat || (e.valueFormat = _t[e.type] || _t.date);
|
|
4774
4786
|
}
|
|
4775
|
-
},
|
|
4776
|
-
name:
|
|
4787
|
+
}, qe = "hidden", qi = {
|
|
4788
|
+
name: qe,
|
|
4777
4789
|
maker: {
|
|
4778
|
-
[
|
|
4790
|
+
[qe]: (t, e) => P(qe)("", t, e)
|
|
4779
4791
|
},
|
|
4780
4792
|
render() {
|
|
4781
4793
|
return [];
|
|
4782
4794
|
}
|
|
4783
|
-
},
|
|
4784
|
-
name:
|
|
4795
|
+
}, Ue = "input", Ui = {
|
|
4796
|
+
name: Ue,
|
|
4785
4797
|
maker: function() {
|
|
4786
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(
|
|
4787
|
-
return t.idate = P(
|
|
4798
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(Ue, { type: r }), e), {});
|
|
4799
|
+
return t.idate = P(Ue, { type: "date" }), t;
|
|
4788
4800
|
}(),
|
|
4789
4801
|
mergeProp(t) {
|
|
4790
4802
|
let { props: e } = t.prop;
|
|
4791
4803
|
e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4792
4804
|
}
|
|
4793
|
-
},
|
|
4794
|
-
name:
|
|
4805
|
+
}, wt = "slider", Hi = {
|
|
4806
|
+
name: wt,
|
|
4795
4807
|
maker: {
|
|
4796
|
-
sliderRange: P(
|
|
4808
|
+
sliderRange: P(wt, { range: !0 })
|
|
4797
4809
|
},
|
|
4798
4810
|
toFormValue(t, e) {
|
|
4799
4811
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4800
4812
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4801
4813
|
}
|
|
4802
|
-
},
|
|
4803
|
-
name:
|
|
4814
|
+
}, He = "timePicker", Gi = {
|
|
4815
|
+
name: He,
|
|
4804
4816
|
maker: {
|
|
4805
|
-
time: P(
|
|
4806
|
-
timeRange: P(
|
|
4817
|
+
time: P(He, (t) => t.props.isRange = !1),
|
|
4818
|
+
timeRange: P(He, (t) => t.props.isRange = !0)
|
|
4807
4819
|
},
|
|
4808
4820
|
mergeProp(t) {
|
|
4809
4821
|
const e = t.prop.props;
|
|
4810
4822
|
e.valueFormat || (e.valueFormat = "HH:mm:ss");
|
|
4811
4823
|
}
|
|
4812
|
-
},
|
|
4824
|
+
}, Ji = {
|
|
4813
4825
|
name: "FcRow",
|
|
4814
4826
|
render(t, e) {
|
|
4815
4827
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4816
4828
|
e.vNode.row(e.prop, t)
|
|
4817
4829
|
]);
|
|
4818
4830
|
}
|
|
4819
|
-
},
|
|
4820
|
-
name:
|
|
4831
|
+
}, Ki = "select", Wi = {
|
|
4832
|
+
name: Ki,
|
|
4821
4833
|
toFormValue(t, e) {
|
|
4822
4834
|
return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
|
|
4823
4835
|
}
|
|
4824
|
-
},
|
|
4825
|
-
Mi,
|
|
4836
|
+
}, zi = [
|
|
4826
4837
|
Ni,
|
|
4827
4838
|
qi,
|
|
4828
4839
|
Ui,
|
|
4829
4840
|
Hi,
|
|
4830
4841
|
Gi,
|
|
4831
|
-
|
|
4832
|
-
|
|
4842
|
+
Ji,
|
|
4843
|
+
Wi
|
|
4844
|
+
], A = "el", xi = {
|
|
4833
4845
|
button: A + "Button",
|
|
4834
4846
|
icon: "i",
|
|
4835
4847
|
slider: A + "Slider",
|
|
@@ -4862,7 +4874,7 @@ const vt = {
|
|
|
4862
4874
|
object: "fcSubForm",
|
|
4863
4875
|
subForm: "fcSubForm"
|
|
4864
4876
|
};
|
|
4865
|
-
function
|
|
4877
|
+
function Xi() {
|
|
4866
4878
|
return {
|
|
4867
4879
|
form: {
|
|
4868
4880
|
inline: !1,
|
|
@@ -4896,23 +4908,23 @@ function xi() {
|
|
|
4896
4908
|
}
|
|
4897
4909
|
};
|
|
4898
4910
|
}
|
|
4899
|
-
function
|
|
4911
|
+
function Zi(t) {
|
|
4900
4912
|
return t.type === "tooltip";
|
|
4901
4913
|
}
|
|
4902
|
-
function
|
|
4914
|
+
function Ft(t, e) {
|
|
4903
4915
|
D(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4904
4916
|
}
|
|
4905
4917
|
function Q(t) {
|
|
4906
4918
|
return t === !1;
|
|
4907
4919
|
}
|
|
4908
|
-
function
|
|
4920
|
+
function Qi(t, e) {
|
|
4909
4921
|
D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4910
4922
|
}
|
|
4911
|
-
function
|
|
4923
|
+
function Ge(t) {
|
|
4912
4924
|
const e = v({}, t);
|
|
4913
4925
|
return delete e.children, e;
|
|
4914
4926
|
}
|
|
4915
|
-
const
|
|
4927
|
+
const Yi = {
|
|
4916
4928
|
validate() {
|
|
4917
4929
|
const t = this.form();
|
|
4918
4930
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4931,11 +4943,11 @@ const Qi = {
|
|
|
4931
4943
|
},
|
|
4932
4944
|
tidyOptions(t) {
|
|
4933
4945
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4934
|
-
|
|
4946
|
+
Qi(t, e);
|
|
4935
4947
|
}), t;
|
|
4936
4948
|
},
|
|
4937
4949
|
tidyRule({ prop: t }) {
|
|
4938
|
-
return
|
|
4950
|
+
return Ft(t, "title"), Ft(t, "info"), t;
|
|
4939
4951
|
},
|
|
4940
4952
|
mergeProp(t) {
|
|
4941
4953
|
const e = {
|
|
@@ -4953,7 +4965,7 @@ const Qi = {
|
|
|
4953
4965
|
});
|
|
4954
4966
|
},
|
|
4955
4967
|
getDefaultOptions() {
|
|
4956
|
-
return
|
|
4968
|
+
return Xi();
|
|
4957
4969
|
},
|
|
4958
4970
|
update() {
|
|
4959
4971
|
const t = this.options.form;
|
|
@@ -4982,9 +4994,9 @@ const Qi = {
|
|
|
4982
4994
|
delete r.wrap.title;
|
|
4983
4995
|
const u = Q(r.wrap.show) ? e : this.$r(ee([r.wrap, {
|
|
4984
4996
|
props: q(v({
|
|
4985
|
-
labelWidth: o === void 0 ? o :
|
|
4997
|
+
labelWidth: o === void 0 ? o : At(o),
|
|
4986
4998
|
label: n ? r.title.title : void 0
|
|
4987
|
-
},
|
|
4999
|
+
}, Ge(r.wrap || {})), {
|
|
4988
5000
|
prop: t.id,
|
|
4989
5001
|
rules: t.injectValidate()
|
|
4990
5002
|
}),
|
|
@@ -5001,8 +5013,8 @@ const Qi = {
|
|
|
5001
5013
|
return !(!e.title && !e.native || Q(e.show));
|
|
5002
5014
|
},
|
|
5003
5015
|
makeInfo(t, e, r) {
|
|
5004
|
-
var f, d, g, m,
|
|
5005
|
-
const i = v({}, t.title), s = v({}, t.info), n =
|
|
5016
|
+
var f, d, g, m, y, w;
|
|
5017
|
+
const i = v({}, t.title), s = v({}, t.info), n = Zi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5006
5018
|
title: (d = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : d.value,
|
|
5007
5019
|
rule: r.rule,
|
|
5008
5020
|
options: this.options
|
|
@@ -5011,12 +5023,12 @@ const Qi = {
|
|
|
5011
5023
|
const O = {
|
|
5012
5024
|
type: s.type || "popover",
|
|
5013
5025
|
slot: "label",
|
|
5014
|
-
props:
|
|
5026
|
+
props: Ge(s),
|
|
5015
5027
|
key: `${e}pop`
|
|
5016
5028
|
};
|
|
5017
5029
|
delete O.props.icon, delete O.props.show, delete O.props.info, delete O.props.align, delete O.props.native;
|
|
5018
5030
|
const G = "content";
|
|
5019
|
-
s.info && !D(O.props, G) && (O.props[G] = (w = (
|
|
5031
|
+
s.info && !D(O.props, G) && (O.props[G] = (w = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : w.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(ee([s, O]), [
|
|
5020
5032
|
this.$r({
|
|
5021
5033
|
type: "i",
|
|
5022
5034
|
slot: n ? "default" : "reference",
|
|
@@ -5026,7 +5038,7 @@ const Qi = {
|
|
|
5026
5038
|
]));
|
|
5027
5039
|
}
|
|
5028
5040
|
const u = ee([i, {
|
|
5029
|
-
props:
|
|
5041
|
+
props: Ge(i),
|
|
5030
5042
|
key: `${e}tit`,
|
|
5031
5043
|
class: "fc-form-title",
|
|
5032
5044
|
slot: i.slot || "label",
|
|
@@ -5102,25 +5114,25 @@ const Qi = {
|
|
|
5102
5114
|
}, [e]);
|
|
5103
5115
|
}
|
|
5104
5116
|
}, ce = {};
|
|
5105
|
-
Yi(ce);
|
|
5106
5117
|
en(ce);
|
|
5107
5118
|
tn(ce);
|
|
5108
5119
|
rn(ce);
|
|
5109
5120
|
nn(ce);
|
|
5110
|
-
|
|
5121
|
+
sn(ce);
|
|
5122
|
+
function en(t) {
|
|
5111
5123
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5112
5124
|
t[e] = P(e);
|
|
5113
5125
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5114
5126
|
}
|
|
5115
|
-
function
|
|
5127
|
+
function tn(t) {
|
|
5116
5128
|
const e = "select", r = "multiple";
|
|
5117
5129
|
t.selectMultiple = P(e, { [r]: !0 }), t.selectOne = P(e, { [r]: !1 });
|
|
5118
5130
|
}
|
|
5119
|
-
function
|
|
5131
|
+
function rn(t) {
|
|
5120
5132
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5121
5133
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
|
|
5122
5134
|
}
|
|
5123
|
-
function
|
|
5135
|
+
function nn(t) {
|
|
5124
5136
|
const e = "upload", r = {
|
|
5125
5137
|
image: ["image", 0],
|
|
5126
5138
|
file: ["file", 0],
|
|
@@ -5129,7 +5141,7 @@ function rn(t) {
|
|
|
5129
5141
|
};
|
|
5130
5142
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
5131
5143
|
}
|
|
5132
|
-
function
|
|
5144
|
+
function sn(t) {
|
|
5133
5145
|
const e = {
|
|
5134
5146
|
frameInputs: ["input", 0],
|
|
5135
5147
|
frameFiles: ["file", 0],
|
|
@@ -5140,10 +5152,10 @@ function nn(t) {
|
|
|
5140
5152
|
};
|
|
5141
5153
|
return Object.keys(e).reduce((r, i) => (r[i] = P("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;
|
|
5142
5154
|
}
|
|
5143
|
-
function
|
|
5155
|
+
function Ot(t, e) {
|
|
5144
5156
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5145
5157
|
}
|
|
5146
|
-
function
|
|
5158
|
+
function on(t, e) {
|
|
5147
5159
|
return {
|
|
5148
5160
|
formEl() {
|
|
5149
5161
|
return e.$manager.form();
|
|
@@ -5219,11 +5231,11 @@ function sn(t, e) {
|
|
|
5219
5231
|
}
|
|
5220
5232
|
},
|
|
5221
5233
|
submitBtnProps: (r = {}) => {
|
|
5222
|
-
let i =
|
|
5234
|
+
let i = Ot(e.options.submitBtn, !0);
|
|
5223
5235
|
_(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
5224
5236
|
},
|
|
5225
5237
|
resetBtnProps: (r = {}) => {
|
|
5226
|
-
let i =
|
|
5238
|
+
let i = Ot(e.options.resetBtn, !1);
|
|
5227
5239
|
_(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
5228
5240
|
},
|
|
5229
5241
|
submit(r, i) {
|
|
@@ -5241,11 +5253,11 @@ function sn(t, e) {
|
|
|
5241
5253
|
}
|
|
5242
5254
|
};
|
|
5243
5255
|
}
|
|
5244
|
-
const
|
|
5256
|
+
const Kt = {
|
|
5245
5257
|
name: "required",
|
|
5246
5258
|
load(t, e, r) {
|
|
5247
5259
|
var s, n;
|
|
5248
|
-
const i =
|
|
5260
|
+
const i = an(t.getValue());
|
|
5249
5261
|
if (i.required === !1)
|
|
5250
5262
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5251
5263
|
else {
|
|
@@ -5266,28 +5278,28 @@ const Jt = {
|
|
|
5266
5278
|
r.sync(e);
|
|
5267
5279
|
},
|
|
5268
5280
|
watch(...t) {
|
|
5269
|
-
|
|
5281
|
+
Kt.load(...t);
|
|
5270
5282
|
}
|
|
5271
5283
|
};
|
|
5272
|
-
function
|
|
5284
|
+
function an(t) {
|
|
5273
5285
|
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 : {};
|
|
5274
5286
|
}
|
|
5275
|
-
function
|
|
5276
|
-
t.componentAlias(
|
|
5287
|
+
function ln(t) {
|
|
5288
|
+
t.componentAlias(xi), Nr.forEach((e) => {
|
|
5277
5289
|
t.component(e.name, e);
|
|
5278
|
-
}), t.register(
|
|
5290
|
+
}), t.register(Kt), zi.forEach((e) => {
|
|
5279
5291
|
t.parser(e);
|
|
5280
5292
|
}), Object.keys(ce).forEach((e) => {
|
|
5281
5293
|
t.maker[e] = ce[e];
|
|
5282
5294
|
});
|
|
5283
5295
|
}
|
|
5284
|
-
function
|
|
5285
|
-
return
|
|
5296
|
+
function un() {
|
|
5297
|
+
return Jt({
|
|
5286
5298
|
ui: "element-ui",
|
|
5287
|
-
version: "2.7.
|
|
5288
|
-
manager:
|
|
5289
|
-
extendApi:
|
|
5290
|
-
install:
|
|
5299
|
+
version: "2.7.8",
|
|
5300
|
+
manager: Yi,
|
|
5301
|
+
extendApi: on,
|
|
5302
|
+
install: ln,
|
|
5291
5303
|
attrs: {
|
|
5292
5304
|
normal: ["col", "wrap"],
|
|
5293
5305
|
array: ["className"],
|
|
@@ -5295,10 +5307,10 @@ function ln() {
|
|
|
5295
5307
|
}
|
|
5296
5308
|
});
|
|
5297
5309
|
}
|
|
5298
|
-
const
|
|
5299
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5300
|
-
const
|
|
5310
|
+
const Ze = un();
|
|
5311
|
+
typeof window != "undefined" && (window.formCreate = Ze, window.Vue && Ze.install(window.Vue));
|
|
5312
|
+
const hn = Ze.maker;
|
|
5301
5313
|
export {
|
|
5302
|
-
|
|
5303
|
-
|
|
5314
|
+
Ze as default,
|
|
5315
|
+
hn as maker
|
|
5304
5316
|
};
|