@form-create/view-design 2.7.15 → 2.7.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-create.esm.js +658 -637
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +4 -4
package/dist/form-create.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/view-design v2.7.
|
|
3
|
+
* @form-create/view-design v2.7.17
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
9
9
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .ivu-upload-list{margin-top:0}._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn,._fc-frame .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .ivu-upload-list{margin-top:0}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .ivu-form-item{margin-bottom:24px}.form-create .form-create .ivu-form-item .ivu-form-item{margin-bottom:0}.form-create.is-preview .fc-clock,.form-create .fc-none{display:none!important}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
var or = Object.defineProperty, ar = Object.defineProperties;
|
|
11
|
+
var lr = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var at = Object.getOwnPropertySymbols;
|
|
13
|
+
var ur = Object.prototype.hasOwnProperty, fr = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var lt = (t, e, r) => e in t ? or(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
|
+
ur.call(e, r) && lt(t, r, e[r]);
|
|
17
|
+
if (at)
|
|
18
|
+
for (var r of at(e))
|
|
19
|
+
fr.call(e, r) && lt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
},
|
|
22
|
-
import ye, { getCurrentInstance as
|
|
23
|
-
function
|
|
21
|
+
}, q = (t, e) => ar(t, lr(e));
|
|
22
|
+
import ye, { getCurrentInstance as cr, provide as hr, inject as dr, toRefs as ut, reactive as ie, onBeforeMount as pr, watch as T, onMounted as mr, onBeforeUnmount as gr, onUpdated as yr, nextTick as V, markRaw as me, computed as ge, toRef as De, ref as $r } from "vue";
|
|
23
|
+
function br(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 vr = ["attrs", "props", "domProps"], _r = ["class", "style", "directives"], Cr = ["on", "nativeOn"], wr = 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 (vr.indexOf(i) !== -1) e[i] = Je({}, e[i], r[i]);
|
|
36
|
+
else if (_r.indexOf(i) !== -1) {
|
|
37
37
|
var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
|
|
38
38
|
e[i] = [].concat(s, n);
|
|
39
|
-
} else if (
|
|
39
|
+
} else if (Cr.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] ? Or(e[i][u], r[i][u]) : r[i][u];
|
|
45
45
|
else e[i] = r[i];
|
|
46
46
|
return e;
|
|
47
47
|
}, {});
|
|
48
|
-
},
|
|
48
|
+
}, Or = function(t, e) {
|
|
49
49
|
return function() {
|
|
50
50
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
51
51
|
};
|
|
52
|
-
},
|
|
53
|
-
const D = /* @__PURE__ */
|
|
54
|
-
function
|
|
52
|
+
}, Fr = wr;
|
|
53
|
+
const D = /* @__PURE__ */ br(Fr);
|
|
54
|
+
function Ve(t, e) {
|
|
55
55
|
return Object.keys(t).reduce((r, i) => ((!e || e.indexOf(i) === -1) && r.push(t[i]), r), []);
|
|
56
56
|
}
|
|
57
|
-
const
|
|
58
|
-
name:
|
|
57
|
+
const kr = "fcCheckbox", Sr = {
|
|
58
|
+
name: kr,
|
|
59
59
|
props: {
|
|
60
60
|
formCreateInject: {
|
|
61
61
|
type: Object,
|
|
@@ -111,13 +111,13 @@ const Fr = "fcCheckbox", kr = {
|
|
|
111
111
|
input: this.onInput
|
|
112
112
|
}
|
|
113
113
|
}]), [this.options().map((e, r) => {
|
|
114
|
-
const i =
|
|
114
|
+
const i = v({}, e);
|
|
115
115
|
return delete i.value, t("Checkbox", D([{}, {
|
|
116
116
|
props: i
|
|
117
117
|
}, {
|
|
118
118
|
key: "" + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), Ve(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -126,10 +126,10 @@ const Fr = "fcCheckbox", kr = {
|
|
|
126
126
|
function H(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const Rr = "fcFrame";
|
|
130
|
+
function kt(t) {
|
|
131
131
|
return {
|
|
132
|
-
name:
|
|
132
|
+
name: Rr,
|
|
133
133
|
props: {
|
|
134
134
|
formCreateInject: {
|
|
135
135
|
type: Object,
|
|
@@ -469,7 +469,7 @@ function Ft(t) {
|
|
|
469
469
|
src: this.previewImage
|
|
470
470
|
}
|
|
471
471
|
})]), e("Modal", D([{}, {
|
|
472
|
-
props:
|
|
472
|
+
props: v({
|
|
473
473
|
width: s,
|
|
474
474
|
title: a
|
|
475
475
|
}, this.modal)
|
|
@@ -503,16 +503,16 @@ function Ft(t) {
|
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const St = kt({
|
|
507
507
|
fileIcon: "md-document",
|
|
508
508
|
fileUpIcon: "ios-folder-open"
|
|
509
509
|
});
|
|
510
|
-
|
|
510
|
+
St.v2 = kt({
|
|
511
511
|
fileIcon: "document-text",
|
|
512
512
|
fileUpIcon: "folder"
|
|
513
513
|
});
|
|
514
|
-
const
|
|
515
|
-
name:
|
|
514
|
+
const Er = "fcRadio", jr = {
|
|
515
|
+
name: Er,
|
|
516
516
|
props: {
|
|
517
517
|
formCreateInject: {
|
|
518
518
|
type: Object,
|
|
@@ -563,13 +563,13 @@ const Rr = "fcRadio", Er = {
|
|
|
563
563
|
input: this.onInput
|
|
564
564
|
}
|
|
565
565
|
}]), [this.options().map((e, r) => {
|
|
566
|
-
const i =
|
|
566
|
+
const i = v({}, e);
|
|
567
567
|
return delete i.value, t("Radio", D([{}, {
|
|
568
568
|
props: i
|
|
569
569
|
}, {
|
|
570
570
|
key: "" + r + "-" + e.value
|
|
571
571
|
}]));
|
|
572
|
-
}),
|
|
572
|
+
}), Ve(this.$slots)]);
|
|
573
573
|
},
|
|
574
574
|
mounted() {
|
|
575
575
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -607,8 +607,8 @@ const Rr = "fcRadio", Er = {
|
|
|
607
607
|
function j(t, e) {
|
|
608
608
|
return {}.hasOwnProperty.call(t, e);
|
|
609
609
|
}
|
|
610
|
-
const
|
|
611
|
-
name:
|
|
610
|
+
const Dr = "fcSelect", Ar = {
|
|
611
|
+
name: Dr,
|
|
612
612
|
functional: !0,
|
|
613
613
|
props: {
|
|
614
614
|
formCreateInject: {
|
|
@@ -639,8 +639,8 @@ const jr = "fcSelect", Dr = {
|
|
|
639
639
|
mounted() {
|
|
640
640
|
this.$emit("fc.el", this.$refs.el);
|
|
641
641
|
}
|
|
642
|
-
},
|
|
643
|
-
name:
|
|
642
|
+
}, Ir = "fcTree", Vr = {
|
|
643
|
+
name: Ir,
|
|
644
644
|
props: {
|
|
645
645
|
formCreateInject: {
|
|
646
646
|
type: Object,
|
|
@@ -688,32 +688,32 @@ const jr = "fcSelect", Dr = {
|
|
|
688
688
|
ref: "tree"
|
|
689
689
|
}, {
|
|
690
690
|
on: e
|
|
691
|
-
}]), [
|
|
691
|
+
}]), [Ve(this.$slots)]);
|
|
692
692
|
},
|
|
693
693
|
mounted() {
|
|
694
694
|
this.$emit("fc.el", this.$refs.tree);
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
-
function
|
|
697
|
+
function ft(t) {
|
|
698
698
|
return typeof t == "object" ? t : {
|
|
699
699
|
url: t,
|
|
700
700
|
is_string: !0,
|
|
701
|
-
name:
|
|
701
|
+
name: Pr(t)
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
return
|
|
704
|
+
function ct(t) {
|
|
705
|
+
return q(v({}, t), {
|
|
706
706
|
file: t,
|
|
707
707
|
value: t
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Pr(t) {
|
|
711
711
|
return ("" + t).split("/").pop();
|
|
712
712
|
}
|
|
713
|
-
const
|
|
714
|
-
function
|
|
713
|
+
const Lr = "fcUpload";
|
|
714
|
+
function Rt(t) {
|
|
715
715
|
return {
|
|
716
|
-
name:
|
|
716
|
+
name: Lr,
|
|
717
717
|
props: {
|
|
718
718
|
formCreateInject: {
|
|
719
719
|
type: Object,
|
|
@@ -754,11 +754,11 @@ function St(t) {
|
|
|
754
754
|
};
|
|
755
755
|
},
|
|
756
756
|
created() {
|
|
757
|
-
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = H(this.value).map(
|
|
757
|
+
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = H(this.value).map(ft).map(ct);
|
|
758
758
|
},
|
|
759
759
|
watch: {
|
|
760
760
|
value(e) {
|
|
761
|
-
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = H(e).map(
|
|
761
|
+
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = H(e).map(ft).map(ct), this.uploadList = this.$refs.upload.fileList);
|
|
762
762
|
},
|
|
763
763
|
maxLength(e, r) {
|
|
764
764
|
(r === 1 || e === 1) && this.update();
|
|
@@ -864,7 +864,7 @@ function St(t) {
|
|
|
864
864
|
type: this.uploadType === "file" ? "ios-cloud-upload-outline" : t.imgUpIcon,
|
|
865
865
|
size: 20
|
|
866
866
|
}
|
|
867
|
-
}]))])]) : null,
|
|
867
|
+
}]))])]) : null, Ve(this.$slots, ["default"])]);
|
|
868
868
|
},
|
|
869
869
|
update() {
|
|
870
870
|
let e = this.$refs.upload.fileList.map((r) => r.is_string ? r.url : r.value || r.url).filter((r) => r !== void 0);
|
|
@@ -907,11 +907,11 @@ function St(t) {
|
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
const
|
|
910
|
+
const Et = Rt({
|
|
911
911
|
fileIcon: "md-document",
|
|
912
912
|
imgUpIcon: "md-images"
|
|
913
913
|
});
|
|
914
|
-
|
|
914
|
+
Et.v2 = Rt({
|
|
915
915
|
fileIcon: "document-text",
|
|
916
916
|
imgUpIcon: "image"
|
|
917
917
|
});
|
|
@@ -948,20 +948,124 @@ function we(t, e = {}, r) {
|
|
|
948
948
|
function G(t) {
|
|
949
949
|
return we({}, { value: t }).value;
|
|
950
950
|
}
|
|
951
|
-
const
|
|
951
|
+
const Br = Object.assign || function(t) {
|
|
952
952
|
for (let e, r = 1; r < arguments.length; r++)
|
|
953
953
|
for (let i in e = arguments[r], e)
|
|
954
954
|
Object.prototype.hasOwnProperty.call(e, i) && F(t, i, e[i]);
|
|
955
955
|
return t;
|
|
956
956
|
};
|
|
957
957
|
function C() {
|
|
958
|
-
return
|
|
958
|
+
return Br.apply(this, arguments);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] :
|
|
960
|
+
function We(t) {
|
|
961
|
+
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
|
|
962
|
+
}
|
|
963
|
+
function ne(t, e) {
|
|
964
|
+
var r = null;
|
|
965
|
+
return function(...i) {
|
|
966
|
+
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
967
|
+
};
|
|
968
|
+
}
|
|
969
|
+
function Tr(t) {
|
|
970
|
+
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
971
|
+
}
|
|
972
|
+
function Nr(t) {
|
|
973
|
+
return t && typeof t == "object" && typeof t.then == "function";
|
|
974
|
+
}
|
|
975
|
+
function Ae(t) {
|
|
976
|
+
return Nr(t) ? t : Promise.resolve(t);
|
|
977
|
+
}
|
|
978
|
+
function $e(t) {
|
|
979
|
+
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
980
|
+
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
962
981
|
}
|
|
963
|
-
|
|
964
|
-
|
|
982
|
+
function Mr(t) {
|
|
983
|
+
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
984
|
+
}
|
|
985
|
+
function jt(t, e, r) {
|
|
986
|
+
return `[form-create ${t}]: ${e}`;
|
|
987
|
+
}
|
|
988
|
+
function Ye(t, e) {
|
|
989
|
+
console.error(jt("err", t));
|
|
990
|
+
}
|
|
991
|
+
function qr(t) {
|
|
992
|
+
Ye(t.toString()), console.error(t);
|
|
993
|
+
}
|
|
994
|
+
const Ke = "[[FORM-CREATE-PREFIX-", Xe = "-FORM-CREATE-SUFFIX]]";
|
|
995
|
+
function Ce(t, e) {
|
|
996
|
+
return JSON.stringify(we(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
997
|
+
if (!(i && i._isVue === !0)) {
|
|
998
|
+
if (typeof i != "function")
|
|
999
|
+
return i;
|
|
1000
|
+
if (i.__json)
|
|
1001
|
+
return i.__json;
|
|
1002
|
+
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1003
|
+
return Ke + i + Xe;
|
|
1004
|
+
}
|
|
1005
|
+
}, e);
|
|
1006
|
+
}
|
|
1007
|
+
function Ne(t) {
|
|
1008
|
+
return new Function("return " + t)();
|
|
1009
|
+
}
|
|
1010
|
+
function W(t, e) {
|
|
1011
|
+
if (t && h.String(t) && t.length > 4) {
|
|
1012
|
+
let r = t.trim(), i = !1;
|
|
1013
|
+
try {
|
|
1014
|
+
if (r.indexOf(Xe) > 0 && r.indexOf(Ke) === 0)
|
|
1015
|
+
r = r.replace(Xe, "").replace(Ke, ""), i = !0;
|
|
1016
|
+
else if (r.indexOf("$FN:") === 0)
|
|
1017
|
+
r = r.substring(4), i = !0;
|
|
1018
|
+
else if (r.indexOf("$EXEC:") === 0)
|
|
1019
|
+
r = r.substring(6), i = !0;
|
|
1020
|
+
else if (r.indexOf("$GLOBAL:") === 0) {
|
|
1021
|
+
const n = r.substring(8);
|
|
1022
|
+
return r = function(...o) {
|
|
1023
|
+
const a = o[0].api.getGlobalEvent(n);
|
|
1024
|
+
if (a)
|
|
1025
|
+
return a.call(this, ...o);
|
|
1026
|
+
}, r.__json = t, r.__inject = !0, r;
|
|
1027
|
+
} else {
|
|
1028
|
+
if (r.indexOf("$FNX:") === 0)
|
|
1029
|
+
return r = Ne(`function($inject){
|
|
1030
|
+
` + r.substring(5) + `
|
|
1031
|
+
}`), r.__json = t, r.__inject = !0, r;
|
|
1032
|
+
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1033
|
+
}
|
|
1034
|
+
if (!i) return t;
|
|
1035
|
+
let s;
|
|
1036
|
+
try {
|
|
1037
|
+
s = Ne(r);
|
|
1038
|
+
} catch (n) {
|
|
1039
|
+
s = Ne("function " + r);
|
|
1040
|
+
}
|
|
1041
|
+
return s.__json = t, s;
|
|
1042
|
+
} catch (s) {
|
|
1043
|
+
Ye(`解析失败:${r}
|
|
1044
|
+
|
|
1045
|
+
err: ${s}`);
|
|
1046
|
+
return;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
return t;
|
|
1050
|
+
}
|
|
1051
|
+
function Dt(t, e) {
|
|
1052
|
+
return JSON.parse(t, function(r, i) {
|
|
1053
|
+
return h.Undef(i) || !i.indexOf ? i : W(i, e);
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
let Ur = 0;
|
|
1057
|
+
function Pe() {
|
|
1058
|
+
const t = 370 + ++Ur;
|
|
1059
|
+
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1060
|
+
}
|
|
1061
|
+
function se(t, e, r) {
|
|
1062
|
+
let i = t, s;
|
|
1063
|
+
return (e || "").split(".").forEach((n) => {
|
|
1064
|
+
s && ((!i[s] || typeof i[s] != "object") && F(i, s, {}), i = i[s]), s = n;
|
|
1065
|
+
}), F(i, s, r), i;
|
|
1066
|
+
}
|
|
1067
|
+
const Gr = "fcGroup", Hr = {
|
|
1068
|
+
name: Gr,
|
|
965
1069
|
props: {
|
|
966
1070
|
field: String,
|
|
967
1071
|
rule: [Array, Object],
|
|
@@ -1095,7 +1199,7 @@ const Br = "fcGroup", Tr = {
|
|
|
1095
1199
|
if (i.filter((n) => r[n].$f).length !== i.length)
|
|
1096
1200
|
return;
|
|
1097
1201
|
const s = i.map((n) => {
|
|
1098
|
-
const o = t === n ? e :
|
|
1202
|
+
const o = t === n ? e : v({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
|
|
1099
1203
|
return this.cache(n, a), a;
|
|
1100
1204
|
});
|
|
1101
1205
|
this.input(s);
|
|
@@ -1107,7 +1211,7 @@ const Br = "fcGroup", Tr = {
|
|
|
1107
1211
|
}), this.cacheValue[t] !== JSON.stringify(r ? e[r] : e) && (this.cache(t, e), i && i.coverValue(e || {}));
|
|
1108
1212
|
},
|
|
1109
1213
|
addRule(t, e) {
|
|
1110
|
-
const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ?
|
|
1214
|
+
const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? v({}, this.options) : {
|
|
1111
1215
|
submitBtn: !1,
|
|
1112
1216
|
resetBtn: !1
|
|
1113
1217
|
};
|
|
@@ -1143,11 +1247,16 @@ const Br = "fcGroup", Tr = {
|
|
|
1143
1247
|
e.push(this.defaultValue ? G(this.defaultValue) : this.field ? null : {}), this.input(e);
|
|
1144
1248
|
},
|
|
1145
1249
|
del(t, e) {
|
|
1146
|
-
if (this.disabled
|
|
1250
|
+
if (this.disabled)
|
|
1147
1251
|
return;
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1252
|
+
const r = () => {
|
|
1253
|
+
this.removeRule(e, !0);
|
|
1254
|
+
const i = [...this.value];
|
|
1255
|
+
i.splice(t, 1), this.input(i);
|
|
1256
|
+
};
|
|
1257
|
+
Ae(this.onBeforeRemove(this.modelValue, t)).then((i) => {
|
|
1258
|
+
i !== !1 && r();
|
|
1259
|
+
});
|
|
1151
1260
|
},
|
|
1152
1261
|
addIcon(t) {
|
|
1153
1262
|
const e = this.$createElement;
|
|
@@ -1265,8 +1374,8 @@ const Br = "fcGroup", Tr = {
|
|
|
1265
1374
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1266
1375
|
}, [n]);
|
|
1267
1376
|
}
|
|
1268
|
-
},
|
|
1269
|
-
name:
|
|
1377
|
+
}, zr = "fcSubForm", Jr = {
|
|
1378
|
+
name: zr,
|
|
1270
1379
|
props: {
|
|
1271
1380
|
rule: Array,
|
|
1272
1381
|
options: Object,
|
|
@@ -1312,7 +1421,7 @@ const Br = "fcGroup", Tr = {
|
|
|
1312
1421
|
submitBtn: !1,
|
|
1313
1422
|
resetBtn: !1
|
|
1314
1423
|
};
|
|
1315
|
-
t.formData =
|
|
1424
|
+
t.formData = v({}, this.value || {}), this.cacheRule = {
|
|
1316
1425
|
rule: this.rule,
|
|
1317
1426
|
options: t
|
|
1318
1427
|
};
|
|
@@ -1349,38 +1458,24 @@ const Br = "fcGroup", Tr = {
|
|
|
1349
1458
|
}
|
|
1350
1459
|
}]));
|
|
1351
1460
|
}
|
|
1352
|
-
},
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
]
|
|
1362
|
-
|
|
1363
|
-
var r = null;
|
|
1364
|
-
return function(...i) {
|
|
1365
|
-
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1366
|
-
};
|
|
1367
|
-
}
|
|
1368
|
-
function $e(t) {
|
|
1369
|
-
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1370
|
-
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1371
|
-
}
|
|
1372
|
-
function qr(t) {
|
|
1373
|
-
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
1374
|
-
}
|
|
1375
|
-
const Et = ["attrs", "props", "domProps", "scopedSlots"], jt = ["class", "style", "directives"], Dt = ["on", "nativeOn", "hook"], x = (t, e = {}, r = {}) => {
|
|
1376
|
-
const i = [...Et, ...r.normal || []], s = [...jt, ...r.array || []], n = [...Dt, ...r.functional || []], o = r.props || [];
|
|
1461
|
+
}, Wr = [
|
|
1462
|
+
Sr,
|
|
1463
|
+
jr,
|
|
1464
|
+
Ar,
|
|
1465
|
+
Vr,
|
|
1466
|
+
Jr,
|
|
1467
|
+
St,
|
|
1468
|
+
Et,
|
|
1469
|
+
Hr
|
|
1470
|
+
], At = ["attrs", "props", "domProps", "scopedSlots"], It = ["class", "style", "directives"], Vt = ["on", "nativeOn", "hook"], x = (t, e = {}, r = {}) => {
|
|
1471
|
+
const i = [...At, ...r.normal || []], s = [...It, ...r.array || []], n = [...Vt, ...r.functional || []], o = r.props || [];
|
|
1377
1472
|
return t.reduce((a, l) => {
|
|
1378
1473
|
for (const u in l)
|
|
1379
1474
|
if (a[u])
|
|
1380
1475
|
if (o.indexOf(u) > -1)
|
|
1381
1476
|
a[u] = x([l[u]], a[u]);
|
|
1382
1477
|
else if (i.indexOf(u) > -1)
|
|
1383
|
-
a[u] =
|
|
1478
|
+
a[u] = v(v({}, a[u]), l[u]);
|
|
1384
1479
|
else if (s.indexOf(u) > -1) {
|
|
1385
1480
|
const f = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
|
|
1386
1481
|
a[u] = [...f, ...p];
|
|
@@ -1393,105 +1488,20 @@ const Et = ["attrs", "props", "domProps", "scopedSlots"], jt = ["class", "style"
|
|
|
1393
1488
|
a[u][f] = l[u][f];
|
|
1394
1489
|
else if (u === "hook")
|
|
1395
1490
|
for (let f in l[u])
|
|
1396
|
-
a[u][f] ? a[u][f] =
|
|
1491
|
+
a[u][f] ? a[u][f] = Kr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1397
1492
|
else
|
|
1398
1493
|
a[u] = l[u];
|
|
1399
1494
|
else
|
|
1400
|
-
i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] =
|
|
1495
|
+
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];
|
|
1401
1496
|
return a;
|
|
1402
1497
|
}, e);
|
|
1403
|
-
},
|
|
1498
|
+
}, Kr = (t, e) => function() {
|
|
1404
1499
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1405
|
-
},
|
|
1406
|
-
function
|
|
1407
|
-
return [...
|
|
1408
|
-
}
|
|
1409
|
-
function Vt(t, e, r) {
|
|
1410
|
-
return `[form-create ${t}]: ${e}`;
|
|
1411
|
-
}
|
|
1412
|
-
function et(t, e) {
|
|
1413
|
-
console.error(Vt("err", t));
|
|
1414
|
-
}
|
|
1415
|
-
function Hr(t) {
|
|
1416
|
-
et(t.toString()), console.error(t);
|
|
1417
|
-
}
|
|
1418
|
-
function zr(t) {
|
|
1419
|
-
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1420
|
-
}
|
|
1421
|
-
const We = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
|
|
1422
|
-
function Ce(t, e) {
|
|
1423
|
-
return JSON.stringify(we(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1424
|
-
if (!(i && i._isVue === !0)) {
|
|
1425
|
-
if (typeof i != "function")
|
|
1426
|
-
return i;
|
|
1427
|
-
if (i.__json)
|
|
1428
|
-
return i.__json;
|
|
1429
|
-
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1430
|
-
return We + i + Ke;
|
|
1431
|
-
}
|
|
1432
|
-
}, e);
|
|
1433
|
-
}
|
|
1434
|
-
function Te(t) {
|
|
1435
|
-
return new Function("return " + t)();
|
|
1500
|
+
}, Pt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], et = ["validate", "children", "control"], tt = ["effect", "deep", "renderSlots"];
|
|
1501
|
+
function Lt() {
|
|
1502
|
+
return [...Pt, ...At, ...It, ...Vt, ...et, ...tt];
|
|
1436
1503
|
}
|
|
1437
|
-
function
|
|
1438
|
-
if (t && h.String(t) && t.length > 4) {
|
|
1439
|
-
let r = t.trim(), i = !1;
|
|
1440
|
-
try {
|
|
1441
|
-
if (r.indexOf(Ke) > 0 && r.indexOf(We) === 0)
|
|
1442
|
-
r = r.replace(Ke, "").replace(We, ""), i = !0;
|
|
1443
|
-
else if (r.indexOf("$FN:") === 0)
|
|
1444
|
-
r = r.substring(4), i = !0;
|
|
1445
|
-
else if (r.indexOf("$EXEC:") === 0)
|
|
1446
|
-
r = r.substring(6), i = !0;
|
|
1447
|
-
else if (r.indexOf("$GLOBAL:") === 0) {
|
|
1448
|
-
const n = r.substring(8);
|
|
1449
|
-
return r = function(...o) {
|
|
1450
|
-
const a = o[0].api.getGlobalEvent(n);
|
|
1451
|
-
if (a)
|
|
1452
|
-
return a.call(this, ...o);
|
|
1453
|
-
}, r.__json = t, r.__inject = !0, r;
|
|
1454
|
-
} else {
|
|
1455
|
-
if (r.indexOf("$FNX:") === 0)
|
|
1456
|
-
return r = Te(`function($inject){
|
|
1457
|
-
` + r.substring(5) + `
|
|
1458
|
-
}`), r.__json = t, r.__inject = !0, r;
|
|
1459
|
-
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1460
|
-
}
|
|
1461
|
-
if (!i) return t;
|
|
1462
|
-
let s;
|
|
1463
|
-
try {
|
|
1464
|
-
s = Te(r);
|
|
1465
|
-
} catch (n) {
|
|
1466
|
-
s = Te("function " + r);
|
|
1467
|
-
}
|
|
1468
|
-
return s.__json = t, s;
|
|
1469
|
-
} catch (s) {
|
|
1470
|
-
et(`解析失败:${r}
|
|
1471
|
-
|
|
1472
|
-
err: ${s}`);
|
|
1473
|
-
return;
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
return t;
|
|
1477
|
-
}
|
|
1478
|
-
function Pt(t, e) {
|
|
1479
|
-
return JSON.parse(t, function(r, i) {
|
|
1480
|
-
return h.Undef(i) || !i.indexOf ? i : W(i, e);
|
|
1481
|
-
});
|
|
1482
|
-
}
|
|
1483
|
-
let Jr = 0;
|
|
1484
|
-
function Ve() {
|
|
1485
|
-
const t = 370 + ++Jr;
|
|
1486
|
-
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1487
|
-
}
|
|
1488
|
-
function se(t, e, r) {
|
|
1489
|
-
let i = t, s;
|
|
1490
|
-
return (e || "").split(".").forEach((n) => {
|
|
1491
|
-
s && ((!i[s] || typeof i[s] != "object") && F(i, s, {}), i = i[s]), s = n;
|
|
1492
|
-
}), F(i, s, r), i;
|
|
1493
|
-
}
|
|
1494
|
-
function Xe(t, e) {
|
|
1504
|
+
function Ze(t, e) {
|
|
1495
1505
|
return {
|
|
1496
1506
|
value: t,
|
|
1497
1507
|
enumerable: !1,
|
|
@@ -1499,25 +1509,25 @@ function Xe(t, e) {
|
|
|
1499
1509
|
writable: !!e
|
|
1500
1510
|
};
|
|
1501
1511
|
}
|
|
1502
|
-
function Lt(t, e) {
|
|
1503
|
-
return Bt([t], e || !1)[0];
|
|
1504
|
-
}
|
|
1505
1512
|
function Bt(t, e) {
|
|
1513
|
+
return Tt([t], e || !1)[0];
|
|
1514
|
+
}
|
|
1515
|
+
function Tt(t, e) {
|
|
1506
1516
|
return we([], [...t], e || !1);
|
|
1507
1517
|
}
|
|
1508
1518
|
function Q(t, e) {
|
|
1509
|
-
return x(Array.isArray(e) ? e : [e], t, { array:
|
|
1519
|
+
return x(Array.isArray(e) ? e : [e], t, { array: et, normal: tt }), t;
|
|
1510
1520
|
}
|
|
1511
|
-
function
|
|
1521
|
+
function ht(t) {
|
|
1512
1522
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1513
1523
|
return e.type || (e.type = "input"), e;
|
|
1514
1524
|
}
|
|
1515
|
-
function
|
|
1525
|
+
function Xr(t, e) {
|
|
1516
1526
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1517
1527
|
e[r] && (t[r] = Q(t[r] || {}, e[r]));
|
|
1518
1528
|
}), t) : e;
|
|
1519
1529
|
}
|
|
1520
|
-
function
|
|
1530
|
+
function Nt(t, e) {
|
|
1521
1531
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1522
1532
|
get() {
|
|
1523
1533
|
return e[i]();
|
|
@@ -1531,26 +1541,26 @@ function O(t, e) {
|
|
|
1531
1541
|
try {
|
|
1532
1542
|
e = t();
|
|
1533
1543
|
} catch (r) {
|
|
1534
|
-
|
|
1544
|
+
qr(r);
|
|
1535
1545
|
}
|
|
1536
1546
|
return e;
|
|
1537
1547
|
}
|
|
1538
|
-
function
|
|
1548
|
+
function xe(t, e) {
|
|
1539
1549
|
let r = null;
|
|
1540
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1550
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1541
1551
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1542
1552
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1543
1553
|
});
|
|
1544
1554
|
}), r;
|
|
1545
1555
|
}
|
|
1546
|
-
function
|
|
1556
|
+
function Zr(t, e) {
|
|
1547
1557
|
if (h.Object(t)) {
|
|
1548
1558
|
const r = {};
|
|
1549
1559
|
return Object.keys(t).forEach((i) => {
|
|
1550
|
-
r[i] =
|
|
1560
|
+
r[i] = xe(t[i], i);
|
|
1551
1561
|
}), r;
|
|
1552
1562
|
} else
|
|
1553
|
-
return
|
|
1563
|
+
return xe(t, e);
|
|
1554
1564
|
}
|
|
1555
1565
|
function Se() {
|
|
1556
1566
|
const t = {}, e = (r) => r || "default";
|
|
@@ -1568,7 +1578,7 @@ function Se() {
|
|
|
1568
1578
|
const n = s();
|
|
1569
1579
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1570
1580
|
} else h.Undef(s) || i.push(s);
|
|
1571
|
-
}),
|
|
1581
|
+
}), Zr(i, r);
|
|
1572
1582
|
},
|
|
1573
1583
|
getSlots() {
|
|
1574
1584
|
let r = [];
|
|
@@ -1591,24 +1601,24 @@ function Se() {
|
|
|
1591
1601
|
function Re(t, e) {
|
|
1592
1602
|
return Object.setPrototypeOf(t, e), t;
|
|
1593
1603
|
}
|
|
1594
|
-
const
|
|
1595
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1596
|
-
"!=": (t, e) => !
|
|
1604
|
+
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
|
|
1605
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
|
|
1606
|
+
"!=": (t, e) => !ce["=="](t, e),
|
|
1597
1607
|
">": (t, e) => t > e,
|
|
1598
1608
|
">=": (t, e) => t >= e,
|
|
1599
1609
|
"<": (t, e) => t < e,
|
|
1600
1610
|
"<=": (t, e) => t <= e,
|
|
1601
1611
|
on(t, e) {
|
|
1602
|
-
return t && t.indexOf && t.indexOf(
|
|
1612
|
+
return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
|
|
1603
1613
|
},
|
|
1604
1614
|
notOn(t, e) {
|
|
1605
|
-
return !
|
|
1615
|
+
return !ce.on(t, e);
|
|
1606
1616
|
},
|
|
1607
1617
|
in(t, e) {
|
|
1608
1618
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1609
1619
|
},
|
|
1610
1620
|
notIn(t, e) {
|
|
1611
|
-
return !
|
|
1621
|
+
return !ce.in(t, e);
|
|
1612
1622
|
},
|
|
1613
1623
|
between(t, e) {
|
|
1614
1624
|
return t > e[0] && t < e[1];
|
|
@@ -1631,7 +1641,7 @@ function L(t, e) {
|
|
|
1631
1641
|
t != null && (t = t[r]);
|
|
1632
1642
|
}), t;
|
|
1633
1643
|
}
|
|
1634
|
-
function
|
|
1644
|
+
function xr(t) {
|
|
1635
1645
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1636
1646
|
let r;
|
|
1637
1647
|
const i = {};
|
|
@@ -1639,20 +1649,20 @@ function Xr(t) {
|
|
|
1639
1649
|
r[1] && (i[r[1]] = !0);
|
|
1640
1650
|
return Object.keys(i);
|
|
1641
1651
|
}
|
|
1642
|
-
function
|
|
1652
|
+
function pt(t) {
|
|
1643
1653
|
let e = t.split("."), r = [], i = "";
|
|
1644
1654
|
return e.forEach((s, n) => {
|
|
1645
1655
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1646
1656
|
}), r.join(" && ");
|
|
1647
1657
|
}
|
|
1648
|
-
function
|
|
1658
|
+
function Mt(t) {
|
|
1649
1659
|
const e = [];
|
|
1650
1660
|
let r = "", i = 0;
|
|
1651
1661
|
for (let s = 0; s < t.length; s++) {
|
|
1652
1662
|
const n = t[s];
|
|
1653
1663
|
n === "[" ? (i === 0 && r && (e.push({ type: "key", value: r }), r = ""), i++, r += n) : n === "]" ? (i--, r += n, i === 0 && (e.push({
|
|
1654
1664
|
type: "bracket",
|
|
1655
|
-
value:
|
|
1665
|
+
value: Mt(r.slice(1, -1))
|
|
1656
1666
|
}), r = "")) : n === "." && i === 0 ? r && (e.push({ type: "key", value: r }), r = "") : r += n;
|
|
1657
1667
|
}
|
|
1658
1668
|
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
@@ -1665,7 +1675,7 @@ const Ee = (t, e) => {
|
|
|
1665
1675
|
return Ee(t.$parent, e);
|
|
1666
1676
|
}
|
|
1667
1677
|
};
|
|
1668
|
-
function
|
|
1678
|
+
function Qr(t, e, r) {
|
|
1669
1679
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1670
1680
|
return {
|
|
1671
1681
|
name: i,
|
|
@@ -1717,90 +1727,90 @@ function Zr(t, e, r) {
|
|
|
1717
1727
|
return this.fc.render();
|
|
1718
1728
|
},
|
|
1719
1729
|
setup(s) {
|
|
1720
|
-
const n =
|
|
1721
|
-
|
|
1722
|
-
const o =
|
|
1730
|
+
const n = cr().proxy;
|
|
1731
|
+
hr("parentFC", n);
|
|
1732
|
+
const o = dr("parentFC", null);
|
|
1723
1733
|
let a = o;
|
|
1724
1734
|
if (o)
|
|
1725
1735
|
for (; a.parent; )
|
|
1726
1736
|
a = a.parent;
|
|
1727
1737
|
else
|
|
1728
1738
|
a = n;
|
|
1729
|
-
const { rule: l, value: u, subForm: f, inFor: p } =
|
|
1739
|
+
const { rule: l, value: u, subForm: f, inFor: p } = ut(s), d = ie({
|
|
1730
1740
|
ctxInject: {},
|
|
1731
1741
|
destroyed: !1,
|
|
1732
1742
|
isShow: !0,
|
|
1733
1743
|
unique: 1,
|
|
1734
1744
|
renderRule: [...l.value || []],
|
|
1735
1745
|
updateValue: JSON.stringify(u.value || {})
|
|
1736
|
-
}), g = new t(n), y = g.api(),
|
|
1746
|
+
}), g = new t(n), y = g.api(), _ = p.value, E = () => {
|
|
1737
1747
|
if (o) {
|
|
1738
1748
|
const k = Ee(n, o);
|
|
1739
1749
|
if (k) {
|
|
1740
1750
|
let S;
|
|
1741
|
-
|
|
1751
|
+
_ ? (S = H(k.getSubForm()), S.push(y)) : S = y, k.subForm(S);
|
|
1742
1752
|
}
|
|
1743
1753
|
}
|
|
1744
1754
|
}, Y = () => {
|
|
1745
1755
|
const k = Ee(n, o);
|
|
1746
1756
|
if (k)
|
|
1747
|
-
if (
|
|
1757
|
+
if (_) {
|
|
1748
1758
|
const S = H(k.getSubForm()), N = S.indexOf(y);
|
|
1749
1759
|
N > -1 && S.splice(N, 1);
|
|
1750
1760
|
} else
|
|
1751
1761
|
k.subForm();
|
|
1752
1762
|
};
|
|
1753
1763
|
let I = null;
|
|
1754
|
-
|
|
1755
|
-
|
|
1764
|
+
pr(() => {
|
|
1765
|
+
T(() => {
|
|
1756
1766
|
let k = "";
|
|
1757
1767
|
const S = s.option && s.option.globalClass || {};
|
|
1758
1768
|
Object.keys(S).forEach((N) => {
|
|
1759
|
-
let
|
|
1769
|
+
let pe = "";
|
|
1760
1770
|
S[N].style && Object.keys(S[N].style).forEach((z) => {
|
|
1761
|
-
|
|
1762
|
-
}), S[N].content && (
|
|
1771
|
+
pe += $e(z) + ":" + S[N].style[z] + ";";
|
|
1772
|
+
}), S[N].content && (pe += S[N].content + ";"), pe && (k += `.${N}{${pe}}`);
|
|
1763
1773
|
}), s.option && s.option.style && (k += s.option.style), I || (I = document.createElement("style"), I.type = "text/css", document.head.appendChild(I)), I.innerHTML = k || "";
|
|
1764
1774
|
}, () => {
|
|
1765
1775
|
});
|
|
1766
1776
|
});
|
|
1767
|
-
const
|
|
1777
|
+
const B = ne(() => {
|
|
1768
1778
|
g.bus.$emit("$loadData.$topForm");
|
|
1769
|
-
}, 100),
|
|
1779
|
+
}, 100), he = ne(function() {
|
|
1770
1780
|
g.bus.$emit("$loadData.$scopeForm");
|
|
1771
|
-
}, 100),
|
|
1781
|
+
}, 100), Le = ne(() => {
|
|
1772
1782
|
g.bus.$emit("$loadData.$form");
|
|
1773
|
-
}, 100),
|
|
1783
|
+
}, 100), de = (k) => {
|
|
1774
1784
|
g.bus.$emit("change-$form." + k);
|
|
1775
1785
|
};
|
|
1776
|
-
return
|
|
1777
|
-
o && (y.top.bus.$on("$loadData.$form",
|
|
1778
|
-
}), mr(() => {
|
|
1779
|
-
o && (y.top.bus.$off("$loadData.$form", T), y.top.bus.$off("change", he)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", ce), Y(), d.destroyed = !0, g.unmount(), I && (I.parentNode || I.parentElement) && document.head.removeChild(I);
|
|
1786
|
+
return mr(() => {
|
|
1787
|
+
o && (y.top.bus.$on("$loadData.$form", B), y.top.bus.$on("change", de)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
|
|
1780
1788
|
}), gr(() => {
|
|
1789
|
+
o && (y.top.bus.$off("$loadData.$form", B), y.top.bus.$off("change", de)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", he), Y(), d.destroyed = !0, g.unmount(), I && (I.parentNode || I.parentElement) && document.head.removeChild(I);
|
|
1790
|
+
}), yr(() => {
|
|
1781
1791
|
g.updated();
|
|
1782
|
-
}),
|
|
1792
|
+
}), T(f, (k) => {
|
|
1783
1793
|
k ? E() : Y();
|
|
1784
|
-
}, { immediate: !0 }),
|
|
1794
|
+
}, { immediate: !0 }), T(() => s.option, () => {
|
|
1785
1795
|
g.initOptions(), y.refresh();
|
|
1786
|
-
}, { deep: !0, flush: "sync" }),
|
|
1796
|
+
}, { deep: !0, flush: "sync" }), T(() => [...l.value], (k) => {
|
|
1787
1797
|
g.$handle.isBreakWatch() || k.length === d.renderRule.length && k.every((S) => d.renderRule.indexOf(S) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
|
|
1788
|
-
}),
|
|
1798
|
+
}), T(() => [s.disabled, s.preview], () => {
|
|
1789
1799
|
y.refresh();
|
|
1790
|
-
}),
|
|
1800
|
+
}), T(u, (k) => {
|
|
1791
1801
|
Ce(k || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(k || {}) : y.setValue(k || {}));
|
|
1792
|
-
}, { deep: !0, flush: "post" }),
|
|
1802
|
+
}, { deep: !0, flush: "post" }), T(() => s.index, () => {
|
|
1793
1803
|
y.coverValue({}), g.$handle.updateAppendData(), V(() => {
|
|
1794
1804
|
V(() => {
|
|
1795
1805
|
y.clearValidateState();
|
|
1796
1806
|
});
|
|
1797
1807
|
});
|
|
1798
|
-
}, { flush: "sync" }),
|
|
1808
|
+
}, { flush: "sync" }), q(v({
|
|
1799
1809
|
fc: me(g),
|
|
1800
1810
|
parent: o && me(o),
|
|
1801
1811
|
top: me(a),
|
|
1802
1812
|
fapi: me(y)
|
|
1803
|
-
},
|
|
1813
|
+
}, ut(d)), {
|
|
1804
1814
|
getGroupInject: () => Ee(n, o),
|
|
1805
1815
|
refresh() {
|
|
1806
1816
|
++d.unique;
|
|
@@ -1812,7 +1822,7 @@ function Zr(t, e, r) {
|
|
|
1812
1822
|
if (d.destroyed) return;
|
|
1813
1823
|
const S = Ce(k);
|
|
1814
1824
|
d.updateValue !== S && (d.updateValue = S, n.$emit("update:value", k), V(() => {
|
|
1815
|
-
|
|
1825
|
+
Le(), o ? f.value || he() : (B(), he());
|
|
1816
1826
|
}));
|
|
1817
1827
|
}
|
|
1818
1828
|
});
|
|
@@ -1822,7 +1832,7 @@ function Zr(t, e, r) {
|
|
|
1822
1832
|
}
|
|
1823
1833
|
};
|
|
1824
1834
|
}
|
|
1825
|
-
function
|
|
1835
|
+
function qt() {
|
|
1826
1836
|
return {
|
|
1827
1837
|
props: {},
|
|
1828
1838
|
on: {},
|
|
@@ -1836,14 +1846,14 @@ function Mt() {
|
|
|
1836
1846
|
}
|
|
1837
1847
|
function P(t, e) {
|
|
1838
1848
|
return (r, i, s, n = {}) => {
|
|
1839
|
-
const o = new
|
|
1849
|
+
const o = new rt(t, r, i, s, n);
|
|
1840
1850
|
return e && (h.Function(e) ? e(o) : o.props(e)), o;
|
|
1841
1851
|
};
|
|
1842
1852
|
}
|
|
1843
|
-
function
|
|
1844
|
-
this._data = C(
|
|
1853
|
+
function rt(t, e, r, i, s) {
|
|
1854
|
+
this._data = C(qt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1845
1855
|
}
|
|
1846
|
-
C(
|
|
1856
|
+
C(rt.prototype, {
|
|
1847
1857
|
getRule() {
|
|
1848
1858
|
return this._data;
|
|
1849
1859
|
},
|
|
@@ -1852,39 +1862,39 @@ C(tt.prototype, {
|
|
|
1852
1862
|
},
|
|
1853
1863
|
_clone() {
|
|
1854
1864
|
const t = new this.constructor();
|
|
1855
|
-
return t._data =
|
|
1865
|
+
return t._data = Bt(this._data), t;
|
|
1856
1866
|
}
|
|
1857
1867
|
});
|
|
1858
1868
|
function Ut(t) {
|
|
1859
1869
|
t.forEach((e) => {
|
|
1860
|
-
|
|
1870
|
+
rt.prototype[e] = function(r) {
|
|
1861
1871
|
return Q(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1862
1872
|
};
|
|
1863
1873
|
});
|
|
1864
1874
|
}
|
|
1865
|
-
Ut(
|
|
1866
|
-
const
|
|
1867
|
-
function
|
|
1868
|
-
let i =
|
|
1875
|
+
Ut(Lt());
|
|
1876
|
+
const Gt = P("");
|
|
1877
|
+
function Yr(t, e, r) {
|
|
1878
|
+
let i = Gt("", e);
|
|
1869
1879
|
return i._data.type = t, i._data.title = r, i;
|
|
1870
1880
|
}
|
|
1871
|
-
function
|
|
1872
|
-
let s =
|
|
1881
|
+
function mt(t, e, r, i) {
|
|
1882
|
+
let s = Gt("", r);
|
|
1873
1883
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1874
1884
|
}
|
|
1875
|
-
function
|
|
1885
|
+
function ei() {
|
|
1876
1886
|
return {
|
|
1877
|
-
create:
|
|
1878
|
-
createTmp:
|
|
1879
|
-
template:
|
|
1887
|
+
create: Yr,
|
|
1888
|
+
createTmp: mt,
|
|
1889
|
+
template: mt,
|
|
1880
1890
|
factory: P
|
|
1881
1891
|
};
|
|
1882
1892
|
}
|
|
1883
|
-
function
|
|
1893
|
+
function ti(t, e, r) {
|
|
1884
1894
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1885
1895
|
return s.status = r.status, s.url = t, s;
|
|
1886
1896
|
}
|
|
1887
|
-
function
|
|
1897
|
+
function gt(t) {
|
|
1888
1898
|
const e = t.responseText || t.response;
|
|
1889
1899
|
if (!e)
|
|
1890
1900
|
return e;
|
|
@@ -1894,7 +1904,7 @@ function mt(t) {
|
|
|
1894
1904
|
return e;
|
|
1895
1905
|
}
|
|
1896
1906
|
}
|
|
1897
|
-
function
|
|
1907
|
+
function Ht(t) {
|
|
1898
1908
|
if (typeof XMLHttpRequest == "undefined")
|
|
1899
1909
|
return;
|
|
1900
1910
|
const e = new XMLHttpRequest();
|
|
@@ -1902,15 +1912,15 @@ function Gt(t) {
|
|
|
1902
1912
|
if (e.upload && t.onProgress && e.upload.addEventListener("progress", (n) => {
|
|
1903
1913
|
n.percent = n.total > 0 ? n.loaded / n.total * 100 : 0, t.onProgress(n);
|
|
1904
1914
|
}), t.query) {
|
|
1905
|
-
const n =
|
|
1906
|
-
|
|
1915
|
+
const n = h.String(t.query) ? t.query : Object.keys(t.query).reduce((a, l) => (a[l] = t.query[l] === null || t.query[l] === void 0 ? "" : t.query[l], a), {}), o = new URLSearchParams(n).toString();
|
|
1916
|
+
o && (r.includes("?") ? r += `&${o}` : r += `?${o}`);
|
|
1907
1917
|
}
|
|
1908
1918
|
e.onerror = function(o) {
|
|
1909
1919
|
t.onError(o);
|
|
1910
1920
|
}, e.onload = function() {
|
|
1911
1921
|
if (e.status < 200 || e.status >= 300)
|
|
1912
|
-
return t.onError(
|
|
1913
|
-
t.onSuccess(
|
|
1922
|
+
return t.onError(ti(r, t, e), gt(e));
|
|
1923
|
+
t.onSuccess(gt(e));
|
|
1914
1924
|
}, e.open(t.method || "get", r, !0);
|
|
1915
1925
|
let i;
|
|
1916
1926
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
@@ -1921,13 +1931,15 @@ function Gt(t) {
|
|
|
1921
1931
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1922
1932
|
}), e.send(i);
|
|
1923
1933
|
}
|
|
1924
|
-
function
|
|
1934
|
+
function yt(t, e, r) {
|
|
1925
1935
|
return new Promise((i, s) => {
|
|
1926
|
-
(e ||
|
|
1936
|
+
(e || Ht)(q(v({}, t), {
|
|
1927
1937
|
onSuccess(n) {
|
|
1928
1938
|
let o = (l) => l;
|
|
1929
1939
|
const a = W(t.parse);
|
|
1930
|
-
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => L(l, a)),
|
|
1940
|
+
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => L(l, a)), Ae(o(n, t.targetRule, r)).then((l) => {
|
|
1941
|
+
i(l);
|
|
1942
|
+
});
|
|
1931
1943
|
},
|
|
1932
1944
|
onError(n) {
|
|
1933
1945
|
s(n);
|
|
@@ -1938,12 +1950,12 @@ function gt(t, e, r) {
|
|
|
1938
1950
|
function ve(t) {
|
|
1939
1951
|
return G(t);
|
|
1940
1952
|
}
|
|
1941
|
-
function
|
|
1953
|
+
function ri(t) {
|
|
1942
1954
|
function e(n) {
|
|
1943
1955
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1944
1956
|
}
|
|
1945
1957
|
function r(n, o, a) {
|
|
1946
|
-
h.Undef(n) ? n = Object.keys(
|
|
1958
|
+
h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
|
|
1947
1959
|
const u = t.fieldCtx[l] || t.nameCtx[l];
|
|
1948
1960
|
u && u.forEach((f) => {
|
|
1949
1961
|
F(f.rule, o, a), t.$render.clearCache(f);
|
|
@@ -2016,7 +2028,7 @@ function ei(t) {
|
|
|
2016
2028
|
}
|
|
2017
2029
|
},
|
|
2018
2030
|
get formulas() {
|
|
2019
|
-
return
|
|
2031
|
+
return v({}, t.fc.formulas);
|
|
2020
2032
|
},
|
|
2021
2033
|
formData(n) {
|
|
2022
2034
|
if (n == null || typeof n == "boolean") {
|
|
@@ -2032,7 +2044,7 @@ function ei(t) {
|
|
|
2032
2044
|
return o ? ve(o.rule.value) : t.options.appendValue !== !1 && j(t.appendData, n) ? ve(t.appendData[n]) : void 0;
|
|
2033
2045
|
},
|
|
2034
2046
|
coverValue(n) {
|
|
2035
|
-
const o =
|
|
2047
|
+
const o = v({}, n || {});
|
|
2036
2048
|
t.deferSyncValue(() => {
|
|
2037
2049
|
t.appendData = {}, s.fields().forEach((a) => {
|
|
2038
2050
|
const l = t.fieldCtx[a];
|
|
@@ -2266,7 +2278,7 @@ function ei(t) {
|
|
|
2266
2278
|
method(n, o) {
|
|
2267
2279
|
const a = s.el(n);
|
|
2268
2280
|
if (!a || !a[o])
|
|
2269
|
-
throw new Error(
|
|
2281
|
+
throw new Error(jt("err", `${o} 方法不存在`));
|
|
2270
2282
|
return (...l) => a[o](...l);
|
|
2271
2283
|
},
|
|
2272
2284
|
exec(n, o, ...a) {
|
|
@@ -2370,7 +2382,7 @@ function ei(t) {
|
|
|
2370
2382
|
},
|
|
2371
2383
|
fetch(n) {
|
|
2372
2384
|
return new Promise((o, a) => {
|
|
2373
|
-
n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2385
|
+
n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((l) => {
|
|
2374
2386
|
O(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2375
2387
|
}).catch((l) => {
|
|
2376
2388
|
O(() => n.onError && n.onError(l)), a(l);
|
|
@@ -2381,7 +2393,7 @@ function ei(t) {
|
|
|
2381
2393
|
watchFetch(n, o, a, l) {
|
|
2382
2394
|
return t.fc.watchLoadData((u, f) => {
|
|
2383
2395
|
let p = G(n);
|
|
2384
|
-
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() =>
|
|
2396
|
+
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((d) => {
|
|
2385
2397
|
O(() => p.onSuccess && p.onSuccess(d)), o && o(d, f);
|
|
2386
2398
|
}).catch((d) => {
|
|
2387
2399
|
O(() => p.onError && p.onError(d)), a && a(d);
|
|
@@ -2415,7 +2427,7 @@ function ei(t) {
|
|
|
2415
2427
|
};
|
|
2416
2428
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2417
2429
|
}
|
|
2418
|
-
function
|
|
2430
|
+
function ii(t) {
|
|
2419
2431
|
C(t.prototype, {
|
|
2420
2432
|
initCache() {
|
|
2421
2433
|
this.clearCacheAll();
|
|
@@ -2447,16 +2459,16 @@ function ti(t) {
|
|
|
2447
2459
|
}
|
|
2448
2460
|
});
|
|
2449
2461
|
}
|
|
2450
|
-
function
|
|
2462
|
+
function U(t) {
|
|
2451
2463
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2452
2464
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2453
2465
|
});
|
|
2454
|
-
return
|
|
2466
|
+
return zt(e);
|
|
2455
2467
|
}
|
|
2456
|
-
function
|
|
2468
|
+
function zt(t) {
|
|
2457
2469
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2458
2470
|
}
|
|
2459
|
-
function
|
|
2471
|
+
function ni(t) {
|
|
2460
2472
|
C(t.prototype, {
|
|
2461
2473
|
initRender() {
|
|
2462
2474
|
this.cacheConfig = {};
|
|
@@ -2545,13 +2557,13 @@ function ri(t) {
|
|
|
2545
2557
|
}, (() => {
|
|
2546
2558
|
if (h.Function(n.renderSlots[y]))
|
|
2547
2559
|
return O(() => n.renderSlots[y]());
|
|
2548
|
-
const
|
|
2549
|
-
return this.renderRule(
|
|
2560
|
+
const _ = this.parseSide(n.renderSlots[y], e);
|
|
2561
|
+
return this.renderRule(_);
|
|
2550
2562
|
})()));
|
|
2551
2563
|
});
|
|
2552
2564
|
const d = this.getTypeSlot(e);
|
|
2553
2565
|
let g;
|
|
2554
|
-
return d ? (u.children = f, g = d(u)) : g = a ? e.parser.preview(
|
|
2566
|
+
return d ? (u.children = f, g = d(u)) : g = a ? e.parser.preview(We(f), e) : e.parser.render(We(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map((y) => !y || !y.tag ? y : this.none(y)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
|
|
2555
2567
|
}, this.setCache(e, s, r);
|
|
2556
2568
|
}
|
|
2557
2569
|
return (...s) => {
|
|
@@ -2593,11 +2605,11 @@ function ri(t) {
|
|
|
2593
2605
|
},
|
|
2594
2606
|
injectProp(e) {
|
|
2595
2607
|
const r = this.vm;
|
|
2596
|
-
r.ctxInject[e.id] || (r.ctxInject
|
|
2608
|
+
r.ctxInject[e.id] || F(r.ctxInject, e.id, {
|
|
2597
2609
|
api: this.$handle.api,
|
|
2598
2610
|
form: this.fc.create,
|
|
2599
|
-
subForm: (
|
|
2600
|
-
this.$handle.addSubForm(e,
|
|
2611
|
+
subForm: (n) => {
|
|
2612
|
+
this.$handle.addSubForm(e, n);
|
|
2601
2613
|
},
|
|
2602
2614
|
getSubForm: () => this.$handle.subForm[e.id],
|
|
2603
2615
|
slots: () => this.vm.top.$scopedSlots,
|
|
@@ -2609,26 +2621,28 @@ function ri(t) {
|
|
|
2609
2621
|
field: e.field,
|
|
2610
2622
|
rule: e.rule,
|
|
2611
2623
|
input: e.input,
|
|
2612
|
-
t: (...
|
|
2613
|
-
updateValue: (
|
|
2614
|
-
this.$handle.onUpdateValue(e,
|
|
2624
|
+
t: (...n) => this.$handle.api.t(...n),
|
|
2625
|
+
updateValue: (n) => {
|
|
2626
|
+
this.$handle.onUpdateValue(e, n);
|
|
2615
2627
|
}
|
|
2616
2628
|
});
|
|
2617
|
-
const i = r.ctxInject[e.id]
|
|
2618
|
-
return C(i, {
|
|
2629
|
+
const i = r.ctxInject[e.id], s = {
|
|
2619
2630
|
preview: e.prop.preview,
|
|
2620
2631
|
options: e.prop.options,
|
|
2621
2632
|
prop: function() {
|
|
2622
|
-
const
|
|
2623
|
-
return
|
|
2633
|
+
const n = v({}, e.prop);
|
|
2634
|
+
return n.on = n.on ? v({}, n.on) : {}, delete n.model, n;
|
|
2624
2635
|
}(),
|
|
2625
2636
|
children: e.loadChildrenPending()
|
|
2637
|
+
};
|
|
2638
|
+
return Object.keys(s).forEach((n) => {
|
|
2639
|
+
F(i, n, s[n]);
|
|
2626
2640
|
}), i;
|
|
2627
2641
|
},
|
|
2628
2642
|
ctxProp(e) {
|
|
2629
2643
|
const { ref: r, key: i, rule: s } = e;
|
|
2630
2644
|
this.$manager.mergeProp(e), e.parser.mergeProp(e);
|
|
2631
|
-
const n =
|
|
2645
|
+
const n = v({}, e.prop.on || {}), o = {};
|
|
2632
2646
|
Object.keys(n).forEach((l) => {
|
|
2633
2647
|
if (l.indexOf("native.") === 0)
|
|
2634
2648
|
o[l.replace("native.", "")] = n[l], delete n[l];
|
|
@@ -2706,7 +2720,7 @@ function ri(t) {
|
|
|
2706
2720
|
},
|
|
2707
2721
|
defaultRender(e, r) {
|
|
2708
2722
|
const i = e.prop;
|
|
2709
|
-
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(
|
|
2723
|
+
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(zt(i.type), i, r);
|
|
2710
2724
|
},
|
|
2711
2725
|
createChildrenVnodes(e, r, i) {
|
|
2712
2726
|
this.force = i !== !1, this.tmpInput = r;
|
|
@@ -2725,22 +2739,22 @@ function ri(t) {
|
|
|
2725
2739
|
if (i)
|
|
2726
2740
|
s = e.type;
|
|
2727
2741
|
else if (s = e.is, e.type) {
|
|
2728
|
-
s =
|
|
2742
|
+
s = U(e.type);
|
|
2729
2743
|
const a = this.vNode.aliasMap[s];
|
|
2730
|
-
a && (s =
|
|
2744
|
+
a && (s = U(a));
|
|
2731
2745
|
}
|
|
2732
2746
|
if (!s) return;
|
|
2733
2747
|
const n = Se();
|
|
2734
2748
|
h.trueArray(e.children) && e.children.forEach((a) => {
|
|
2735
2749
|
a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2736
2750
|
});
|
|
2737
|
-
const o =
|
|
2751
|
+
const o = v({}, e);
|
|
2738
2752
|
return delete o.type, delete o.is, this.vNode.make(s, o, n.mergeBag(r).getSlots());
|
|
2739
2753
|
}
|
|
2740
2754
|
});
|
|
2741
2755
|
}
|
|
2742
|
-
let
|
|
2743
|
-
function
|
|
2756
|
+
let si = 1;
|
|
2757
|
+
function it(t) {
|
|
2744
2758
|
C(this, {
|
|
2745
2759
|
$handle: t,
|
|
2746
2760
|
fc: t.fc,
|
|
@@ -2749,8 +2763,8 @@ function rt(t) {
|
|
|
2749
2763
|
vNode: new t.fc.CreateNode(t),
|
|
2750
2764
|
force: !1,
|
|
2751
2765
|
tmpInput: null,
|
|
2752
|
-
id:
|
|
2753
|
-
}),
|
|
2766
|
+
id: si++
|
|
2767
|
+
}), Nt(this, {
|
|
2754
2768
|
options() {
|
|
2755
2769
|
return t.options;
|
|
2756
2770
|
},
|
|
@@ -2759,9 +2773,9 @@ function rt(t) {
|
|
|
2759
2773
|
}
|
|
2760
2774
|
}), this.initCache(), this.initRender();
|
|
2761
2775
|
}
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
function
|
|
2776
|
+
ii(it);
|
|
2777
|
+
ni(it);
|
|
2778
|
+
function oi(t) {
|
|
2765
2779
|
C(t.prototype, {
|
|
2766
2780
|
parseInjectEvent(e, r) {
|
|
2767
2781
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2791,14 +2805,14 @@ function ni(t) {
|
|
|
2791
2805
|
let p, d = n || o || a;
|
|
2792
2806
|
if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
|
|
2793
2807
|
r || (d = `native-${d}`);
|
|
2794
|
-
const g = $e(`${d}-${f}`), y = (...
|
|
2795
|
-
this.vm.$emit(g, ...
|
|
2808
|
+
const g = $e(`${d}-${f}`), y = (..._) => {
|
|
2809
|
+
this.vm.$emit(g, ..._), this.vm.$emit("emit-event", g, ..._), this.bus.$emit(g, ..._);
|
|
2796
2810
|
};
|
|
2797
2811
|
if (y.__emit = !0, !p && l === !1)
|
|
2798
2812
|
i[f] = y;
|
|
2799
2813
|
else {
|
|
2800
|
-
let
|
|
2801
|
-
i[f] = h.Undef(
|
|
2814
|
+
let _ = p || l || this.options.injectEvent;
|
|
2815
|
+
i[f] = h.Undef(_) ? y : this.inject(s, y, _);
|
|
2802
2816
|
}
|
|
2803
2817
|
}
|
|
2804
2818
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2828,7 +2842,7 @@ function ni(t) {
|
|
|
2828
2842
|
},
|
|
2829
2843
|
loadStrVar(e, r, i) {
|
|
2830
2844
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2831
|
-
const s = e, n =
|
|
2845
|
+
const s = e, n = xr(e), o = (u) => {
|
|
2832
2846
|
let f = !1, p;
|
|
2833
2847
|
if (i && u.indexOf("$form.") === 0) {
|
|
2834
2848
|
const d = u.split(".");
|
|
@@ -2852,7 +2866,7 @@ function ni(t) {
|
|
|
2852
2866
|
if (n.forEach((u) => {
|
|
2853
2867
|
const f = u.split("||"), p = f[0].trim();
|
|
2854
2868
|
if (p) {
|
|
2855
|
-
const d = (f[1] || "").trim(), g =
|
|
2869
|
+
const d = (f[1] || "").trim(), g = Mt(p);
|
|
2856
2870
|
let y = O(() => a(g));
|
|
2857
2871
|
(y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2858
2872
|
}
|
|
@@ -2867,7 +2881,7 @@ function ni(t) {
|
|
|
2867
2881
|
const n = (o) => this.loadStrVar(o, r, s ? { rule: i, value: this.subRuleData[s.id] || {} } : null);
|
|
2868
2882
|
return e.action = n(e.action || ""), ["headers", "data", "query"].forEach((o) => {
|
|
2869
2883
|
if (e[o]) {
|
|
2870
|
-
const a = {};
|
|
2884
|
+
const a = Array.isArray(e[o]) ? [] : {};
|
|
2871
2885
|
Object.keys(e[o]).forEach((l) => {
|
|
2872
2886
|
a[n(l)] = n(e[o][l]);
|
|
2873
2887
|
}), e[o] = a;
|
|
@@ -2876,13 +2890,13 @@ function ni(t) {
|
|
|
2876
2890
|
}
|
|
2877
2891
|
});
|
|
2878
2892
|
}
|
|
2879
|
-
const
|
|
2880
|
-
function
|
|
2893
|
+
const $t = ["hook:updated", "hook:mounted"];
|
|
2894
|
+
function ai(t) {
|
|
2881
2895
|
C(t.prototype, {
|
|
2882
2896
|
usePage() {
|
|
2883
2897
|
const e = this.options.page;
|
|
2884
2898
|
if (!e) return;
|
|
2885
|
-
let r = 25, i =
|
|
2899
|
+
let r = 25, i = li(this.rules);
|
|
2886
2900
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), C(this, {
|
|
2887
2901
|
first: r,
|
|
2888
2902
|
limit: i,
|
|
@@ -2891,16 +2905,16 @@ function si(t) {
|
|
|
2891
2905
|
},
|
|
2892
2906
|
pageLoad() {
|
|
2893
2907
|
const e = () => {
|
|
2894
|
-
this.pageEnd ? (this.vm.$off(
|
|
2908
|
+
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());
|
|
2895
2909
|
};
|
|
2896
|
-
this.vm.$on(
|
|
2910
|
+
this.vm.$on($t, e);
|
|
2897
2911
|
}
|
|
2898
2912
|
});
|
|
2899
2913
|
}
|
|
2900
|
-
function
|
|
2914
|
+
function li(t) {
|
|
2901
2915
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2902
2916
|
}
|
|
2903
|
-
function
|
|
2917
|
+
function ui(t) {
|
|
2904
2918
|
C(t.prototype, {
|
|
2905
2919
|
clearNextTick() {
|
|
2906
2920
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2915,15 +2929,15 @@ function ai(t) {
|
|
|
2915
2929
|
}
|
|
2916
2930
|
});
|
|
2917
2931
|
}
|
|
2918
|
-
function
|
|
2932
|
+
function fi(t) {
|
|
2919
2933
|
Object.defineProperties(t.origin, {
|
|
2920
|
-
__fc__:
|
|
2934
|
+
__fc__: Ze(me(t), !0)
|
|
2921
2935
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2922
|
-
__fc__:
|
|
2936
|
+
__fc__: Ze(me(t), !0)
|
|
2923
2937
|
});
|
|
2924
2938
|
}
|
|
2925
|
-
function
|
|
2926
|
-
const i =
|
|
2939
|
+
function Jt(t, e, r) {
|
|
2940
|
+
const i = Pe(), s = !!e.field;
|
|
2927
2941
|
C(this, {
|
|
2928
2942
|
id: i,
|
|
2929
2943
|
ref: i,
|
|
@@ -2941,7 +2955,7 @@ function zt(t, e, r) {
|
|
|
2941
2955
|
parent: null,
|
|
2942
2956
|
group: e.subRule ? this : null,
|
|
2943
2957
|
cacheConfig: null,
|
|
2944
|
-
prop:
|
|
2958
|
+
prop: v({}, e),
|
|
2945
2959
|
computed: {},
|
|
2946
2960
|
payload: {},
|
|
2947
2961
|
refRule: {},
|
|
@@ -2950,9 +2964,9 @@ function zt(t, e, r) {
|
|
|
2950
2964
|
exportEl: void 0,
|
|
2951
2965
|
defaultValue: s ? G(r) : void 0,
|
|
2952
2966
|
field: e.field || void 0
|
|
2953
|
-
}), this.updateKey(),
|
|
2967
|
+
}), this.updateKey(), fi(this), this.update(t, !0);
|
|
2954
2968
|
}
|
|
2955
|
-
C(
|
|
2969
|
+
C(Jt.prototype, {
|
|
2956
2970
|
getParentGroup() {
|
|
2957
2971
|
let t = this.parent;
|
|
2958
2972
|
for (; t; ) {
|
|
@@ -3022,17 +3036,17 @@ C(zt.prototype, {
|
|
|
3022
3036
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
3023
3037
|
},
|
|
3024
3038
|
updateKey(t) {
|
|
3025
|
-
this.key =
|
|
3039
|
+
this.key = Pe(), t && this.parent && this.parent.updateKey(t);
|
|
3026
3040
|
},
|
|
3027
3041
|
updateType() {
|
|
3028
|
-
this.originType = this.rule.type, this.type =
|
|
3042
|
+
this.originType = this.rule.type, this.type = U(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
3029
3043
|
},
|
|
3030
3044
|
setParser(t) {
|
|
3031
3045
|
this.parser = t, t.init(this);
|
|
3032
3046
|
},
|
|
3033
3047
|
initProp() {
|
|
3034
3048
|
var e, r;
|
|
3035
|
-
const t =
|
|
3049
|
+
const t = v({}, this.rule);
|
|
3036
3050
|
delete t.children, delete t.validate, this.prop = Q({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
|
|
3037
3051
|
},
|
|
3038
3052
|
initNone() {
|
|
@@ -3048,7 +3062,9 @@ C(zt.prototype, {
|
|
|
3048
3062
|
return this.vm === t.vm;
|
|
3049
3063
|
},
|
|
3050
3064
|
unwatch() {
|
|
3051
|
-
this.watch.forEach((t) => t()), this.watch = [], this.refRule
|
|
3065
|
+
this.watch.forEach((t) => t()), this.watch = [], Object.keys(this.refRule).forEach((t) => {
|
|
3066
|
+
t.indexOf("__$") !== 0 && delete this.refRule[t];
|
|
3067
|
+
});
|
|
3052
3068
|
},
|
|
3053
3069
|
unlink() {
|
|
3054
3070
|
this.linkOn.forEach((t) => t()), this.linkOn = [];
|
|
@@ -3102,7 +3118,7 @@ C(zt.prototype, {
|
|
|
3102
3118
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3103
3119
|
}
|
|
3104
3120
|
});
|
|
3105
|
-
function
|
|
3121
|
+
function ci(t) {
|
|
3106
3122
|
C(t.prototype, {
|
|
3107
3123
|
nextRefresh(e) {
|
|
3108
3124
|
const r = this.loadedId;
|
|
@@ -3111,10 +3127,10 @@ function ui(t) {
|
|
|
3111
3127
|
});
|
|
3112
3128
|
},
|
|
3113
3129
|
parseRule(e) {
|
|
3114
|
-
const r =
|
|
3130
|
+
const r = ht(e);
|
|
3115
3131
|
return Object.defineProperties(r, {
|
|
3116
|
-
__origin__:
|
|
3117
|
-
}),
|
|
3132
|
+
__origin__: Ze(e, !0)
|
|
3133
|
+
}), hi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3118
3134
|
i && this.loadFn(i, r);
|
|
3119
3135
|
}), this.loadCtrl(r), r.update && (r.update = W(r.update)), r;
|
|
3120
3136
|
},
|
|
@@ -3161,26 +3177,26 @@ function ui(t) {
|
|
|
3161
3177
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3162
3178
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3163
3179
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3164
|
-
let l =
|
|
3180
|
+
let l = ht(o);
|
|
3165
3181
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3166
3182
|
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);
|
|
3167
3183
|
let f, p = !1, d = !!o.__fc__, g = l.value;
|
|
3168
3184
|
if (d) {
|
|
3169
3185
|
if (f = o.__fc__, g = f.defaultValue, f.deleted) {
|
|
3170
|
-
if (
|
|
3186
|
+
if (bt(f))
|
|
3171
3187
|
return;
|
|
3172
3188
|
f.update(this);
|
|
3173
3189
|
} else if (!f.check(this)) {
|
|
3174
|
-
if (
|
|
3190
|
+
if (bt(f))
|
|
3175
3191
|
return;
|
|
3176
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3192
|
+
e[a] = o = o._clone ? o._clone() : Dt(Ce(o)), f = null, p = !0;
|
|
3177
3193
|
}
|
|
3178
3194
|
}
|
|
3179
3195
|
if (f)
|
|
3180
3196
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3181
3197
|
else {
|
|
3182
3198
|
const E = this.parseRule(o);
|
|
3183
|
-
f = new
|
|
3199
|
+
f = new Jt(this, E, g), this.bindParser(f);
|
|
3184
3200
|
}
|
|
3185
3201
|
[!1, !0].forEach((E) => this.parseEmit(f, E)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !p && !d && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3186
3202
|
const y = f.loadChildrenPending();
|
|
@@ -3188,9 +3204,9 @@ function ui(t) {
|
|
|
3188
3204
|
const E = i(a);
|
|
3189
3205
|
E > -1 || !a ? this.sort.splice(E + 1, 0, f.id) : this.sort.push(f.id);
|
|
3190
3206
|
}
|
|
3191
|
-
const
|
|
3192
|
-
return f.updated || (f.updated = !0, h.Function(
|
|
3193
|
-
this.refreshUpdate(f,
|
|
3207
|
+
const _ = f.rule;
|
|
3208
|
+
return f.updated || (f.updated = !0, h.Function(_.update) && this.bus.$once("load-end", () => {
|
|
3209
|
+
this.refreshUpdate(f, _.value, "init");
|
|
3194
3210
|
}), this.effect(f, "loaded")), this.refreshControl(f) && (this.cycleLoad = !0), f;
|
|
3195
3211
|
}).filter((o) => !!o);
|
|
3196
3212
|
r && (r.children = n);
|
|
@@ -3199,16 +3215,16 @@ function ui(t) {
|
|
|
3199
3215
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3200
3216
|
},
|
|
3201
3217
|
useCtrl(e) {
|
|
3202
|
-
const r =
|
|
3218
|
+
const r = di(e), i = [], s = this.api;
|
|
3203
3219
|
if (!r.length) return !1;
|
|
3204
3220
|
for (let a = 0; a < r.length; a++) {
|
|
3205
3221
|
const l = r[a], u = l.handle || function(p) {
|
|
3206
|
-
return (
|
|
3222
|
+
return (ce[l.condition || "=="] || ce["=="])(p, l.value);
|
|
3207
3223
|
};
|
|
3208
3224
|
if (!h.trueArray(l.rule)) continue;
|
|
3209
|
-
const f =
|
|
3225
|
+
const f = q(v({}, l), {
|
|
3210
3226
|
valid: O(() => u(e.rule.value, s)),
|
|
3211
|
-
ctrl:
|
|
3227
|
+
ctrl: pi(e, l.rule),
|
|
3212
3228
|
isHidden: h.String(l.rule[0])
|
|
3213
3229
|
});
|
|
3214
3230
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3224,27 +3240,27 @@ function ui(t) {
|
|
|
3224
3240
|
children: u,
|
|
3225
3241
|
valid: l
|
|
3226
3242
|
}) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3227
|
-
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((
|
|
3228
|
-
this.api.setEffect(
|
|
3243
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((_) => {
|
|
3244
|
+
this.api.setEffect(_, "required", l);
|
|
3229
3245
|
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3230
3246
|
});
|
|
3231
3247
|
return;
|
|
3232
3248
|
}
|
|
3233
3249
|
if (l) {
|
|
3234
3250
|
o = !0;
|
|
3235
|
-
const
|
|
3251
|
+
const _ = {
|
|
3236
3252
|
type: "fragment",
|
|
3237
3253
|
native: !0,
|
|
3238
3254
|
__ctrl: !0,
|
|
3239
3255
|
children: u
|
|
3240
3256
|
};
|
|
3241
|
-
e.ctrlRule.push(
|
|
3242
|
-
f ? s.prepend(
|
|
3257
|
+
e.ctrlRule.push(_), this.bus.$once("load-start", () => {
|
|
3258
|
+
f ? s.prepend(_, f, d) : p || d ? s.append(_, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
|
|
3243
3259
|
});
|
|
3244
3260
|
} else {
|
|
3245
3261
|
e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
|
|
3246
|
-
const
|
|
3247
|
-
|
|
3262
|
+
const _ = Z(g);
|
|
3263
|
+
_ && _.rm();
|
|
3248
3264
|
}
|
|
3249
3265
|
});
|
|
3250
3266
|
}), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
|
|
@@ -3258,7 +3274,7 @@ function ui(t) {
|
|
|
3258
3274
|
},
|
|
3259
3275
|
_reloadRule(e) {
|
|
3260
3276
|
e || (e = this.rules);
|
|
3261
|
-
const r =
|
|
3277
|
+
const r = v({}, this.ctxs);
|
|
3262
3278
|
this.clearNextTick(), this.initData(e), this.fc.rules = e, this.deferSyncValue(() => {
|
|
3263
3279
|
this.bus.$once("load-end", () => {
|
|
3264
3280
|
Object.keys(r).filter((i) => this.ctxs[i] === void 0).forEach((i) => this.rmCtx(r[i])), this.$render.clearCacheAll();
|
|
@@ -3271,27 +3287,27 @@ function ui(t) {
|
|
|
3271
3287
|
}
|
|
3272
3288
|
});
|
|
3273
3289
|
}
|
|
3274
|
-
function
|
|
3275
|
-
const e =
|
|
3290
|
+
function hi(t) {
|
|
3291
|
+
const e = qt();
|
|
3276
3292
|
return Object.keys(e).forEach((r) => {
|
|
3277
3293
|
j(t, r) || F(t, r, e[r]);
|
|
3278
3294
|
}), t;
|
|
3279
3295
|
}
|
|
3280
|
-
function
|
|
3296
|
+
function di(t) {
|
|
3281
3297
|
const e = t.rule.control || [];
|
|
3282
3298
|
return h.Object(e) ? [e] : e;
|
|
3283
3299
|
}
|
|
3284
|
-
function
|
|
3300
|
+
function pi(t, e) {
|
|
3285
3301
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3286
3302
|
const i = t.ctrlRule[r];
|
|
3287
3303
|
if (i.children === e)
|
|
3288
3304
|
return i;
|
|
3289
3305
|
}
|
|
3290
3306
|
}
|
|
3291
|
-
function
|
|
3307
|
+
function bt(t) {
|
|
3292
3308
|
return !!t.rule.__ctrl;
|
|
3293
3309
|
}
|
|
3294
|
-
function
|
|
3310
|
+
function mi(t) {
|
|
3295
3311
|
C(t.prototype, {
|
|
3296
3312
|
setValue(e, r, i, s) {
|
|
3297
3313
|
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, {
|
|
@@ -3344,7 +3360,7 @@ function di(t) {
|
|
|
3344
3360
|
return e.rule.ignore === !0 || (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields) && e.hasHidden();
|
|
3345
3361
|
},
|
|
3346
3362
|
appendValue(e) {
|
|
3347
|
-
(!e.field || !j(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3363
|
+
(!e.field || !j(this.appendData, e.field)) && (!h.Undef(e.value) || !this.options.forceCoverValue) || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3348
3364
|
},
|
|
3349
3365
|
addSubForm(e, r) {
|
|
3350
3366
|
this.subForm[e.id] = r;
|
|
@@ -3361,7 +3377,7 @@ function di(t) {
|
|
|
3361
3377
|
}), this.vm.updateValue(e);
|
|
3362
3378
|
},
|
|
3363
3379
|
isChange(e, r) {
|
|
3364
|
-
return JSON.stringify(this.getFormData(e),
|
|
3380
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3365
3381
|
},
|
|
3366
3382
|
isQuote(e, r) {
|
|
3367
3383
|
return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -3394,7 +3410,7 @@ function di(t) {
|
|
|
3394
3410
|
}
|
|
3395
3411
|
});
|
|
3396
3412
|
}
|
|
3397
|
-
function
|
|
3413
|
+
function vt(t, e) {
|
|
3398
3414
|
return typeof e == "function" ? "" + e : e;
|
|
3399
3415
|
}
|
|
3400
3416
|
const je = {
|
|
@@ -3416,8 +3432,8 @@ const je = {
|
|
|
3416
3432
|
},
|
|
3417
3433
|
mergeProp(t) {
|
|
3418
3434
|
}
|
|
3419
|
-
},
|
|
3420
|
-
function
|
|
3435
|
+
}, gi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], _e = Symbol("oldValue");
|
|
3436
|
+
function yi(t) {
|
|
3421
3437
|
C(t.prototype, {
|
|
3422
3438
|
getCtx(e) {
|
|
3423
3439
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3448,26 +3464,26 @@ function mi(t) {
|
|
|
3448
3464
|
getParser(e) {
|
|
3449
3465
|
const r = this.fc.parsers, i = this.fc.renderDriver;
|
|
3450
3466
|
if (i) {
|
|
3451
|
-
const s = i.parsers || {}, n = s[e.originType] || s[
|
|
3467
|
+
const s = i.parsers || {}, n = s[e.originType] || s[U(e.type)] || s[e.trueType];
|
|
3452
3468
|
if (n)
|
|
3453
3469
|
return n;
|
|
3454
3470
|
}
|
|
3455
|
-
return r[e.originType] || r[
|
|
3471
|
+
return r[e.originType] || r[U(e.type)] || r[e.trueType] || je;
|
|
3456
3472
|
},
|
|
3457
3473
|
bindParser(e) {
|
|
3458
3474
|
e.setParser(this.getParser(e));
|
|
3459
3475
|
},
|
|
3460
3476
|
getType(e) {
|
|
3461
|
-
const r = this.fc.CreateNode.aliasMap, i = r[e] || r[
|
|
3462
|
-
return
|
|
3477
|
+
const r = this.fc.CreateNode.aliasMap, i = r[e] || r[U(e)] || e;
|
|
3478
|
+
return U(i);
|
|
3463
3479
|
},
|
|
3464
3480
|
noWatch(e) {
|
|
3465
3481
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3466
3482
|
},
|
|
3467
3483
|
watchCtx(e) {
|
|
3468
|
-
if (
|
|
3484
|
+
if (Lt().filter((i) => i[0] !== "_" && i[0] !== "$" && gi.indexOf(i) === -1).forEach((i) => {
|
|
3469
3485
|
const s = De(e.rule, i), n = i === "children";
|
|
3470
|
-
e.refRule[i] = s, e.watch.push(
|
|
3486
|
+
e.refRule[i] = s, e.watch.push(T(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3471
3487
|
let l = s.value;
|
|
3472
3488
|
if (!this.isBreakWatch()) {
|
|
3473
3489
|
if (n && e.parser.loadChildren === !1) {
|
|
@@ -3508,7 +3524,7 @@ function mi(t) {
|
|
|
3508
3524
|
return n ? this.api.t(n[1], { title: (a = (o = e.refRule) == null ? void 0 : o.__$title) == null ? void 0 : a.value }) : s;
|
|
3509
3525
|
};
|
|
3510
3526
|
return H(e.rule.validate).map((s) => {
|
|
3511
|
-
const n =
|
|
3527
|
+
const n = v({}, s);
|
|
3512
3528
|
if (n.message && (n.message = i(n.message)), h.Function(n.validator)) {
|
|
3513
3529
|
const o = e;
|
|
3514
3530
|
n.validator = function(...a) {
|
|
@@ -3523,7 +3539,7 @@ function mi(t) {
|
|
|
3523
3539
|
}
|
|
3524
3540
|
if (n.adapter) {
|
|
3525
3541
|
if (typeof n.error == "object") {
|
|
3526
|
-
const o =
|
|
3542
|
+
const o = v({}, n.error);
|
|
3527
3543
|
Object.keys(o).forEach((a) => {
|
|
3528
3544
|
o[a] = i(o[a]);
|
|
3529
3545
|
}), n.error = o;
|
|
@@ -3534,7 +3550,7 @@ function mi(t) {
|
|
|
3534
3550
|
});
|
|
3535
3551
|
}), e.input) {
|
|
3536
3552
|
const i = De(e.rule, "value");
|
|
3537
|
-
e.watch.push(
|
|
3553
|
+
e.watch.push(T(() => i.value, () => {
|
|
3538
3554
|
let s = e.parser.toFormValue(i.value, e);
|
|
3539
3555
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
3540
3556
|
}));
|
|
@@ -3550,7 +3566,7 @@ function mi(t) {
|
|
|
3550
3566
|
}), o = (a) => {
|
|
3551
3567
|
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : se(e.rule, s, a);
|
|
3552
3568
|
};
|
|
3553
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== L(e.rule, s)) && o(n.value), e.watch.push(
|
|
3569
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== L(e.rule, s)) && o(n.value), e.watch.push(T(n, (a, l) => {
|
|
3554
3570
|
a === _e || a === l || setTimeout(() => {
|
|
3555
3571
|
o(a);
|
|
3556
3572
|
});
|
|
@@ -3685,11 +3701,11 @@ function mi(t) {
|
|
|
3685
3701
|
if (p.variable)
|
|
3686
3702
|
g = JSON.stringify(this.fc.getLoadData(p.variable)) || "";
|
|
3687
3703
|
else if (p.field)
|
|
3688
|
-
g =
|
|
3704
|
+
g = pt(p.field || "");
|
|
3689
3705
|
else if (!p.mode)
|
|
3690
3706
|
return !0;
|
|
3691
3707
|
let y = p.compare;
|
|
3692
|
-
if (y && (y =
|
|
3708
|
+
if (y && (y = pt(y || "")), p.mode ? d = n(p) : ce[p.condition] ? h.Function(p.handler) ? d = O(() => p.handler(this.api, e.rule)) : d = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${y || "$val"}); }}}}`).call(this.api.form, ce, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : d = !1, l && d)
|
|
3693
3709
|
return !0;
|
|
3694
3710
|
l || (u = u && d);
|
|
3695
3711
|
}
|
|
@@ -3698,7 +3714,7 @@ function mi(t) {
|
|
|
3698
3714
|
let o = n(r);
|
|
3699
3715
|
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : _e : r.linkageVariable ? o ? O(() => this.fc.getLoadData(r.linkageVariable), void 0) : _e : o;
|
|
3700
3716
|
} else if (h.Function(r))
|
|
3701
|
-
i = () => r(this.api.form, this.api);
|
|
3717
|
+
i = () => r(this.api.form, this.api, e.rule);
|
|
3702
3718
|
else {
|
|
3703
3719
|
const s = e.getParentGroup();
|
|
3704
3720
|
i = () => this.computeValue(r, e, s);
|
|
@@ -3747,7 +3763,7 @@ function mi(t) {
|
|
|
3747
3763
|
}
|
|
3748
3764
|
});
|
|
3749
3765
|
}
|
|
3750
|
-
function
|
|
3766
|
+
function $i(t) {
|
|
3751
3767
|
C(t.prototype, {
|
|
3752
3768
|
mounted() {
|
|
3753
3769
|
const e = () => {
|
|
@@ -3759,7 +3775,7 @@ function gi(t) {
|
|
|
3759
3775
|
this.fc.targetFormDriver(e, this.api, this.fc), this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
|
|
3760
3776
|
},
|
|
3761
3777
|
emitEvent(e, ...r) {
|
|
3762
|
-
const i = this.options[e] || this.options[
|
|
3778
|
+
const i = this.options[e] || this.options[U("on-" + e)];
|
|
3763
3779
|
if (i) {
|
|
3764
3780
|
const s = W(i);
|
|
3765
3781
|
h.Function(s) && O(() => s(...r));
|
|
@@ -3770,7 +3786,7 @@ function gi(t) {
|
|
|
3770
3786
|
var l, u, f, p;
|
|
3771
3787
|
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, g) => {
|
|
3772
3788
|
d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
|
|
3773
|
-
O(() => y(
|
|
3789
|
+
O(() => y(q(v({}, i || {}), {
|
|
3774
3790
|
self: e.rule,
|
|
3775
3791
|
rule: e.rule,
|
|
3776
3792
|
parent: g == null ? void 0 : g.rule,
|
|
@@ -3781,7 +3797,7 @@ function gi(t) {
|
|
|
3781
3797
|
}));
|
|
3782
3798
|
};
|
|
3783
3799
|
n(s);
|
|
3784
|
-
let o = "deep" +
|
|
3800
|
+
let o = "deep" + Mr(r), a = e.parent;
|
|
3785
3801
|
for (; a; ) {
|
|
3786
3802
|
let d = (p = (f = a.prop) == null ? void 0 : f.hook) == null ? void 0 : p[o];
|
|
3787
3803
|
n(d, a), a = a.parent;
|
|
@@ -3789,13 +3805,13 @@ function gi(t) {
|
|
|
3789
3805
|
}
|
|
3790
3806
|
});
|
|
3791
3807
|
}
|
|
3792
|
-
function
|
|
3808
|
+
function bi(t) {
|
|
3793
3809
|
C(t.prototype, {
|
|
3794
3810
|
useProvider() {
|
|
3795
3811
|
const e = this.fc.providers;
|
|
3796
3812
|
Object.keys(e).forEach((r) => {
|
|
3797
3813
|
let i = e[r];
|
|
3798
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3814
|
+
h.Function(i) && (i = i(this.fc)), i._c = _i(i), this.onEffect(i, r), this.providers[r] = i;
|
|
3799
3815
|
});
|
|
3800
3816
|
},
|
|
3801
3817
|
onEffect(e, r) {
|
|
@@ -3819,7 +3835,7 @@ function yi(t) {
|
|
|
3819
3835
|
}), Object.keys(e.rule).forEach((i) => {
|
|
3820
3836
|
i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
|
|
3821
3837
|
}), Object.keys(r).forEach((i) => {
|
|
3822
|
-
e.watch.push(
|
|
3838
|
+
e.watch.push(T(r[i], (s) => {
|
|
3823
3839
|
this.effect(e, "watch", { [i]: s });
|
|
3824
3840
|
}, { deep: !0 }));
|
|
3825
3841
|
});
|
|
@@ -3848,7 +3864,7 @@ function yi(t) {
|
|
|
3848
3864
|
},
|
|
3849
3865
|
emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
|
|
3850
3866
|
if (!s || ["fcFragment", "fragment"].indexOf(s) > -1) return;
|
|
3851
|
-
const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u),
|
|
3867
|
+
const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u), v({}, r.effect || {}));
|
|
3852
3868
|
Object.keys(l).forEach((u) => {
|
|
3853
3869
|
const f = this.providers[u];
|
|
3854
3870
|
if (!f || f.input && !i) return;
|
|
@@ -3859,26 +3875,26 @@ function yi(t) {
|
|
|
3859
3875
|
p = s;
|
|
3860
3876
|
else
|
|
3861
3877
|
return;
|
|
3862
|
-
const d =
|
|
3878
|
+
const d = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3863
3879
|
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (g) => Q(d.getProp(), [g]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
|
|
3864
3880
|
});
|
|
3865
3881
|
}
|
|
3866
3882
|
});
|
|
3867
3883
|
}
|
|
3868
|
-
function
|
|
3884
|
+
function vi(t) {
|
|
3869
3885
|
return t.filter(function(e, r, i) {
|
|
3870
3886
|
return i.indexOf(e, 0) === r;
|
|
3871
3887
|
});
|
|
3872
3888
|
}
|
|
3873
|
-
function
|
|
3889
|
+
function _i(t) {
|
|
3874
3890
|
const e = t.components;
|
|
3875
3891
|
if (Array.isArray(e)) {
|
|
3876
|
-
const r =
|
|
3892
|
+
const r = vi(e.filter((i) => i !== "*"));
|
|
3877
3893
|
return r.length ? r : !1;
|
|
3878
3894
|
} else return h.String(e) ? [e] : !1;
|
|
3879
3895
|
}
|
|
3880
3896
|
function K(t) {
|
|
3881
|
-
|
|
3897
|
+
Nt(this, {
|
|
3882
3898
|
options() {
|
|
3883
3899
|
return t.options.value || {};
|
|
3884
3900
|
},
|
|
@@ -3912,10 +3928,10 @@ function K(t) {
|
|
|
3912
3928
|
nextReload: () => {
|
|
3913
3929
|
this.lifecycle("reload");
|
|
3914
3930
|
}
|
|
3915
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3931
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3916
3932
|
const i = O(() => r(e, this));
|
|
3917
3933
|
return i && i !== e && C(e, i), e;
|
|
3918
|
-
},
|
|
3934
|
+
}, ri(this));
|
|
3919
3935
|
}
|
|
3920
3936
|
C(K.prototype, {
|
|
3921
3937
|
initData(t) {
|
|
@@ -3931,7 +3947,7 @@ C(K.prototype, {
|
|
|
3931
3947
|
this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created");
|
|
3932
3948
|
},
|
|
3933
3949
|
updateAppendData() {
|
|
3934
|
-
this.appendData =
|
|
3950
|
+
this.appendData = v(v(v({}, this.options.formData || {}), this.fc.vm.$props.value || {}), this.appendData);
|
|
3935
3951
|
},
|
|
3936
3952
|
isBreakWatch() {
|
|
3937
3953
|
return this.loading || this.noWatchFn || this.reloading;
|
|
@@ -3955,26 +3971,26 @@ C(K.prototype, {
|
|
|
3955
3971
|
});
|
|
3956
3972
|
}
|
|
3957
3973
|
});
|
|
3958
|
-
|
|
3959
|
-
si(K);
|
|
3974
|
+
oi(K);
|
|
3960
3975
|
ai(K);
|
|
3961
3976
|
ui(K);
|
|
3962
|
-
|
|
3977
|
+
ci(K);
|
|
3963
3978
|
mi(K);
|
|
3964
|
-
gi(K);
|
|
3965
3979
|
yi(K);
|
|
3966
|
-
|
|
3967
|
-
|
|
3980
|
+
$i(K);
|
|
3981
|
+
bi(K);
|
|
3982
|
+
const Ci = "fcFragment", Me = {
|
|
3983
|
+
name: Ci,
|
|
3968
3984
|
functional: !0,
|
|
3969
3985
|
props: ["vnode"],
|
|
3970
3986
|
render(t, e) {
|
|
3971
3987
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3972
3988
|
}
|
|
3973
3989
|
};
|
|
3974
|
-
function
|
|
3990
|
+
function wi(t) {
|
|
3975
3991
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3976
3992
|
}
|
|
3977
|
-
function
|
|
3993
|
+
function Oi() {
|
|
3978
3994
|
const t = {};
|
|
3979
3995
|
function e(r) {
|
|
3980
3996
|
r && this.setVm(r);
|
|
@@ -3991,7 +4007,7 @@ function Ci() {
|
|
|
3991
4007
|
var a;
|
|
3992
4008
|
const n = this.handle.fc.prop.components[r];
|
|
3993
4009
|
n && (r = n);
|
|
3994
|
-
let o = this.$h(r,
|
|
4010
|
+
let o = this.$h(r, wi(i), s || []);
|
|
3995
4011
|
if ((a = o == null ? void 0 : o.componentOptions) != null && a.propsData && (i != null && i.props)) {
|
|
3996
4012
|
const l = Object.keys(o.componentOptions.propsData);
|
|
3997
4013
|
o.data.attrs || (o.data.attrs = {}), Object.keys(i.props).forEach((u) => {
|
|
@@ -4008,7 +4024,7 @@ function Ci() {
|
|
|
4008
4024
|
},
|
|
4009
4025
|
use(r) {
|
|
4010
4026
|
Object.keys(r).forEach((i) => {
|
|
4011
|
-
const s = $e(i), n =
|
|
4027
|
+
const s = $e(i), n = Tr(i).toLocaleLowerCase(), o = r[i];
|
|
4012
4028
|
e.alias(i, o), [i, s, n].forEach((a) => {
|
|
4013
4029
|
e.prototype[a] = function(l, u) {
|
|
4014
4030
|
return this.make(t[i] || a, l, u);
|
|
@@ -4018,12 +4034,12 @@ function Ci() {
|
|
|
4018
4034
|
}
|
|
4019
4035
|
}), e;
|
|
4020
4036
|
}
|
|
4021
|
-
function
|
|
4022
|
-
class e extends
|
|
4037
|
+
function Fi(t) {
|
|
4038
|
+
class e extends Wt {
|
|
4023
4039
|
}
|
|
4024
4040
|
return Object.assign(e.prototype, t), e;
|
|
4025
4041
|
}
|
|
4026
|
-
function
|
|
4042
|
+
function Wt(t) {
|
|
4027
4043
|
C(this, {
|
|
4028
4044
|
$handle: t,
|
|
4029
4045
|
vm: t.vm,
|
|
@@ -4034,12 +4050,12 @@ function Jt(t) {
|
|
|
4034
4050
|
}
|
|
4035
4051
|
}), this.updateKey(), this.init();
|
|
4036
4052
|
}
|
|
4037
|
-
C(
|
|
4053
|
+
C(Wt.prototype, {
|
|
4038
4054
|
__init() {
|
|
4039
4055
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
4040
4056
|
},
|
|
4041
4057
|
updateKey() {
|
|
4042
|
-
this.key =
|
|
4058
|
+
this.key = Pe();
|
|
4043
4059
|
},
|
|
4044
4060
|
//TODO interface
|
|
4045
4061
|
init() {
|
|
@@ -4084,7 +4100,7 @@ C(Jt.prototype, {
|
|
|
4084
4100
|
render(t) {
|
|
4085
4101
|
}
|
|
4086
4102
|
});
|
|
4087
|
-
const
|
|
4103
|
+
const ki = function(t) {
|
|
4088
4104
|
const e = {
|
|
4089
4105
|
name: "loadData",
|
|
4090
4106
|
_fn: [],
|
|
@@ -4115,7 +4131,7 @@ const Oi = function(t) {
|
|
|
4115
4131
|
}
|
|
4116
4132
|
};
|
|
4117
4133
|
return e.watch = e.loaded, e;
|
|
4118
|
-
},
|
|
4134
|
+
}, Si = function(t) {
|
|
4119
4135
|
const e = {
|
|
4120
4136
|
name: "t",
|
|
4121
4137
|
_fn: [],
|
|
@@ -4129,8 +4145,8 @@ const Oi = function(t) {
|
|
|
4129
4145
|
const u = typeof l == "object";
|
|
4130
4146
|
let f = (g) => {
|
|
4131
4147
|
let y = t.t(u ? l.attr : l, u ? l.params : null, g);
|
|
4132
|
-
const
|
|
4133
|
-
a === "child" ?
|
|
4148
|
+
const _ = u && l.modify ? i : r.getProp();
|
|
4149
|
+
a === "child" ? _.children ? F(_.children, 0, y) : F(_, "children", [y]) : se(_, a, y), s.sync(i);
|
|
4134
4150
|
}, p = (g) => f(g);
|
|
4135
4151
|
const d = t.watchLoadData(p);
|
|
4136
4152
|
f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
@@ -4144,7 +4160,7 @@ const Oi = function(t) {
|
|
|
4144
4160
|
}
|
|
4145
4161
|
};
|
|
4146
4162
|
return e.watch = e.loaded, e;
|
|
4147
|
-
},
|
|
4163
|
+
}, Kt = {
|
|
4148
4164
|
name: "componentValidate",
|
|
4149
4165
|
load(t, e, r) {
|
|
4150
4166
|
let i = t.getValue();
|
|
@@ -4152,7 +4168,7 @@ const Oi = function(t) {
|
|
|
4152
4168
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
4153
4169
|
else {
|
|
4154
4170
|
h.Object(i) || (i = { method: i });
|
|
4155
|
-
const s = i.method, n =
|
|
4171
|
+
const s = i.method, n = q(v({}, i), {
|
|
4156
4172
|
validator(...o) {
|
|
4157
4173
|
const a = Z(e);
|
|
4158
4174
|
if (a)
|
|
@@ -4167,9 +4183,9 @@ const Oi = function(t) {
|
|
|
4167
4183
|
}
|
|
4168
4184
|
},
|
|
4169
4185
|
watch(...t) {
|
|
4170
|
-
|
|
4186
|
+
Kt.load(...t);
|
|
4171
4187
|
}
|
|
4172
|
-
},
|
|
4188
|
+
}, Ri = function(t) {
|
|
4173
4189
|
function e(s) {
|
|
4174
4190
|
return h.String(s) && (s = {
|
|
4175
4191
|
action: s,
|
|
@@ -4186,7 +4202,18 @@ const Oi = function(t) {
|
|
|
4186
4202
|
l(void 0);
|
|
4187
4203
|
return;
|
|
4188
4204
|
}
|
|
4189
|
-
a = G(a), a.to || (a.to = "options")
|
|
4205
|
+
if (a = G(a), a.to || (a.to = "options"), a.key) {
|
|
4206
|
+
const p = t.$handle.options.globalData[a.key];
|
|
4207
|
+
if (!p) {
|
|
4208
|
+
l(void 0);
|
|
4209
|
+
return;
|
|
4210
|
+
}
|
|
4211
|
+
if (p.type === "static") {
|
|
4212
|
+
l(p.data);
|
|
4213
|
+
return;
|
|
4214
|
+
} else
|
|
4215
|
+
a = v(v({}, a), p);
|
|
4216
|
+
}
|
|
4190
4217
|
const u = a.onError, f = () => {
|
|
4191
4218
|
if (!s.getValue())
|
|
4192
4219
|
return s.clearProp(), o.sync(n), !0;
|
|
@@ -4194,38 +4221,32 @@ const Oi = function(t) {
|
|
|
4194
4221
|
i._fn[s.id] = t.watchLoadData(ne((p, d) => {
|
|
4195
4222
|
if (d && a.watch === !1)
|
|
4196
4223
|
return i._fn[s.id]();
|
|
4197
|
-
|
|
4198
|
-
const v = p("$globalData." + a.key);
|
|
4199
|
-
if (v) {
|
|
4200
|
-
if (f()) return;
|
|
4201
|
-
l(v);
|
|
4202
|
-
}
|
|
4203
|
-
return;
|
|
4204
|
-
}
|
|
4205
|
-
const g = t.$handle.loadFetchVar(G(a), p, n), y = U(_({
|
|
4224
|
+
const g = t.$handle.loadFetchVar(G(a), p, n), y = q(v({
|
|
4206
4225
|
headers: {}
|
|
4207
4226
|
}, g), {
|
|
4208
|
-
onSuccess(
|
|
4227
|
+
onSuccess(_, E) {
|
|
4209
4228
|
if (f()) return;
|
|
4210
|
-
let Y = (
|
|
4229
|
+
let Y = (B) => E ? B : j(B, "data") ? B.data : B;
|
|
4211
4230
|
const I = W(g.parse);
|
|
4212
|
-
h.Function(I) ? Y = I : I && h.String(I) && (Y = (
|
|
4231
|
+
h.Function(I) ? Y = I : I && h.String(I) && (Y = (B) => L(B, I)), Ae(Y(_, n, o)).then((B) => {
|
|
4232
|
+
l(B);
|
|
4233
|
+
});
|
|
4213
4234
|
},
|
|
4214
|
-
onError(
|
|
4215
|
-
l(void 0), !f() && (u || ((E) =>
|
|
4235
|
+
onError(_) {
|
|
4236
|
+
l(void 0), !f() && (u || ((E) => Ye(E.message || "fetch fail " + g.action)))(_, n, o);
|
|
4216
4237
|
}
|
|
4217
4238
|
});
|
|
4218
4239
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4219
4240
|
if (h.Function(g.action)) {
|
|
4220
|
-
g.action(n, o).then((
|
|
4221
|
-
y.onSuccess(
|
|
4222
|
-
}).catch((
|
|
4223
|
-
y.onError(
|
|
4241
|
+
Ae(g.action(n, o)).then((_) => {
|
|
4242
|
+
y.onSuccess(_, !0);
|
|
4243
|
+
}).catch((_) => {
|
|
4244
|
+
y.onError(_);
|
|
4224
4245
|
});
|
|
4225
4246
|
return;
|
|
4226
4247
|
}
|
|
4227
4248
|
O(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
|
|
4228
|
-
}).catch((
|
|
4249
|
+
}).catch((_) => {
|
|
4229
4250
|
});
|
|
4230
4251
|
}, a.wait || 600));
|
|
4231
4252
|
}
|
|
@@ -4243,13 +4264,13 @@ const Oi = function(t) {
|
|
|
4243
4264
|
}
|
|
4244
4265
|
};
|
|
4245
4266
|
return i;
|
|
4246
|
-
},
|
|
4247
|
-
fetch:
|
|
4248
|
-
loadData:
|
|
4249
|
-
t:
|
|
4250
|
-
componentValidate:
|
|
4267
|
+
}, Ei = {
|
|
4268
|
+
fetch: Ri,
|
|
4269
|
+
loadData: ki,
|
|
4270
|
+
t: Si,
|
|
4271
|
+
componentValidate: Kt
|
|
4251
4272
|
};
|
|
4252
|
-
function
|
|
4273
|
+
function ji(t) {
|
|
4253
4274
|
t = t || /* @__PURE__ */ new Map();
|
|
4254
4275
|
const e = {
|
|
4255
4276
|
$on(r, i) {
|
|
@@ -4273,8 +4294,8 @@ function Ri(t) {
|
|
|
4273
4294
|
};
|
|
4274
4295
|
return e;
|
|
4275
4296
|
}
|
|
4276
|
-
const
|
|
4277
|
-
name:
|
|
4297
|
+
const Di = "html", Ai = {
|
|
4298
|
+
name: Di,
|
|
4278
4299
|
loadChildren: !1,
|
|
4279
4300
|
render(t, e) {
|
|
4280
4301
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4283,7 +4304,7 @@ const Ei = "html", ji = {
|
|
|
4283
4304
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4284
4305
|
}
|
|
4285
4306
|
};
|
|
4286
|
-
function
|
|
4307
|
+
function Ii(t) {
|
|
4287
4308
|
t = t + "=";
|
|
4288
4309
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4289
4310
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4301,7 +4322,7 @@ function Di(t) {
|
|
|
4301
4322
|
}
|
|
4302
4323
|
return null;
|
|
4303
4324
|
}
|
|
4304
|
-
function
|
|
4325
|
+
function Vi(t) {
|
|
4305
4326
|
const e = localStorage.getItem(t);
|
|
4306
4327
|
if (e)
|
|
4307
4328
|
try {
|
|
@@ -4311,7 +4332,7 @@ function Ai(t) {
|
|
|
4311
4332
|
}
|
|
4312
4333
|
return null;
|
|
4313
4334
|
}
|
|
4314
|
-
function
|
|
4335
|
+
function Pi(t) {
|
|
4315
4336
|
const e = sessionStorage.getItem(t);
|
|
4316
4337
|
if (e)
|
|
4317
4338
|
try {
|
|
@@ -4321,23 +4342,23 @@ function Ii(t) {
|
|
|
4321
4342
|
}
|
|
4322
4343
|
return null;
|
|
4323
4344
|
}
|
|
4324
|
-
function
|
|
4345
|
+
function nt(t, e) {
|
|
4325
4346
|
if (!e)
|
|
4326
4347
|
return null;
|
|
4327
4348
|
const r = e.split(".");
|
|
4328
4349
|
let i = t(r.shift());
|
|
4329
4350
|
return r.length ? i == null ? null : L(i, r) : i;
|
|
4330
4351
|
}
|
|
4331
|
-
function
|
|
4332
|
-
return
|
|
4352
|
+
function Li(t) {
|
|
4353
|
+
return nt(Ii, t);
|
|
4333
4354
|
}
|
|
4334
|
-
function
|
|
4335
|
-
return
|
|
4355
|
+
function Bi(t) {
|
|
4356
|
+
return nt(Vi, t);
|
|
4336
4357
|
}
|
|
4337
|
-
function
|
|
4338
|
-
return
|
|
4358
|
+
function Ti(t) {
|
|
4359
|
+
return nt(Pi, t);
|
|
4339
4360
|
}
|
|
4340
|
-
const
|
|
4361
|
+
const Ni = {
|
|
4341
4362
|
en: {
|
|
4342
4363
|
required: "{title} is required",
|
|
4343
4364
|
validate: {
|
|
@@ -4387,17 +4408,17 @@ const Bi = {
|
|
|
4387
4408
|
}
|
|
4388
4409
|
}
|
|
4389
4410
|
};
|
|
4390
|
-
function
|
|
4411
|
+
function Mi(t, e) {
|
|
4391
4412
|
let r;
|
|
4392
4413
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4393
4414
|
}
|
|
4394
|
-
function
|
|
4395
|
-
return
|
|
4415
|
+
function qe() {
|
|
4416
|
+
return Mi("name", ...arguments);
|
|
4396
4417
|
}
|
|
4397
|
-
function
|
|
4418
|
+
function qi(t) {
|
|
4398
4419
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4399
4420
|
}
|
|
4400
|
-
function
|
|
4421
|
+
function Ui(t, e) {
|
|
4401
4422
|
const r = new Vue({
|
|
4402
4423
|
data() {
|
|
4403
4424
|
return { rule: t, option: e || {} };
|
|
@@ -4408,23 +4429,23 @@ function Mi(t, e) {
|
|
|
4408
4429
|
});
|
|
4409
4430
|
return r.$mount(), r;
|
|
4410
4431
|
}
|
|
4411
|
-
function
|
|
4432
|
+
function Gi(t) {
|
|
4412
4433
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4413
|
-
|
|
4434
|
+
Pt.push(...e), et.push(...r), tt.push(...i), Ut([...e, ...r, ...i]);
|
|
4414
4435
|
}
|
|
4415
|
-
let
|
|
4416
|
-
const M = {},
|
|
4417
|
-
function
|
|
4436
|
+
let Hi = 1;
|
|
4437
|
+
const M = {}, _t = Symbol("defValue");
|
|
4438
|
+
function Xt(t) {
|
|
4418
4439
|
const e = {
|
|
4419
|
-
[
|
|
4440
|
+
[Me.name]: Me
|
|
4420
4441
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4421
4442
|
t.extendApi
|
|
4422
|
-
], u =
|
|
4443
|
+
], u = v({}, Ei), f = ei();
|
|
4423
4444
|
let p = { global: {} };
|
|
4424
4445
|
const d = t.isMobile === !0, g = ie({
|
|
4425
4446
|
$mobile: d
|
|
4426
|
-
}), y =
|
|
4427
|
-
|
|
4447
|
+
}), y = Oi(), _ = {}, E = {};
|
|
4448
|
+
Gi(t.attrs || {});
|
|
4428
4449
|
function Y(c) {
|
|
4429
4450
|
const m = M[c];
|
|
4430
4451
|
if (Array.isArray(m))
|
|
@@ -4435,23 +4456,23 @@ function Kt(t) {
|
|
|
4435
4456
|
function I(c) {
|
|
4436
4457
|
o.push(c);
|
|
4437
4458
|
}
|
|
4438
|
-
function
|
|
4439
|
-
const c =
|
|
4459
|
+
function B() {
|
|
4460
|
+
const c = qe(...arguments);
|
|
4440
4461
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4441
4462
|
}
|
|
4442
|
-
function
|
|
4443
|
-
const c =
|
|
4444
|
-
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop :
|
|
4463
|
+
function he() {
|
|
4464
|
+
const c = qe(...arguments);
|
|
4465
|
+
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4445
4466
|
name: c.id
|
|
4446
4467
|
}));
|
|
4447
4468
|
}
|
|
4448
|
-
function
|
|
4469
|
+
function Le(c) {
|
|
4449
4470
|
y.use(c);
|
|
4450
4471
|
}
|
|
4451
|
-
function
|
|
4452
|
-
const c =
|
|
4472
|
+
function de() {
|
|
4473
|
+
const c = qe(...arguments);
|
|
4453
4474
|
if (!c.id || !c.prop) return je;
|
|
4454
|
-
const m =
|
|
4475
|
+
const m = U(c.id), $ = c.prop, b = $.merge === !0 ? r[m] : void 0;
|
|
4455
4476
|
r[m] = Re($, b || je), f[m] = P(m), $.maker && C(f, $.maker);
|
|
4456
4477
|
}
|
|
4457
4478
|
function k(c, m) {
|
|
@@ -4460,28 +4481,28 @@ function Kt(t) {
|
|
|
4460
4481
|
if ($ = c, m === void 0)
|
|
4461
4482
|
return ["form-create", "formcreate"].indexOf($) > -1 ? S() : e[$];
|
|
4462
4483
|
} else
|
|
4463
|
-
$ =
|
|
4484
|
+
$ = U(c.name), m = c;
|
|
4464
4485
|
if (!$ || !m) return;
|
|
4465
|
-
const b =
|
|
4466
|
-
e[$] = m, e[b] = m, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], m.formCreateParser &&
|
|
4486
|
+
const b = U($);
|
|
4487
|
+
e[$] = m, e[b] = m, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], m.formCreateParser && de($, m.formCreateParser);
|
|
4467
4488
|
}
|
|
4468
4489
|
function S() {
|
|
4469
|
-
return
|
|
4490
|
+
return Qr(Te, e, i);
|
|
4470
4491
|
}
|
|
4471
4492
|
function N() {
|
|
4472
|
-
return
|
|
4493
|
+
return Me;
|
|
4473
4494
|
}
|
|
4474
|
-
function
|
|
4495
|
+
function pe(c, m) {
|
|
4475
4496
|
return h.Function(c.install) ? c.install(z, m) : h.Function(c) && c(z, m), this;
|
|
4476
4497
|
}
|
|
4477
4498
|
function z(c, m, $) {
|
|
4478
|
-
let b =
|
|
4499
|
+
let b = Ui(c, m || {});
|
|
4479
4500
|
const w = b.$refs.fc.formCreate;
|
|
4480
|
-
return w.$parent = $,
|
|
4501
|
+
return w.$parent = $, qi(w.options).appendChild(b.$el), w.api();
|
|
4481
4502
|
}
|
|
4482
4503
|
Re(z, E);
|
|
4483
|
-
function
|
|
4484
|
-
let m =
|
|
4504
|
+
function xt(c) {
|
|
4505
|
+
let m = v({}, t);
|
|
4485
4506
|
return c ? m.inherit = {
|
|
4486
4507
|
components: e,
|
|
4487
4508
|
parsers: r,
|
|
@@ -4490,21 +4511,21 @@ function Kt(t) {
|
|
|
4490
4511
|
providers: u,
|
|
4491
4512
|
useApps: o,
|
|
4492
4513
|
maker: f,
|
|
4493
|
-
formulas:
|
|
4514
|
+
formulas: _,
|
|
4494
4515
|
loadData: g
|
|
4495
|
-
} : delete m.inherit,
|
|
4496
|
-
}
|
|
4497
|
-
function xt(c, m) {
|
|
4498
|
-
s[c] = m;
|
|
4516
|
+
} : delete m.inherit, Xt(m);
|
|
4499
4517
|
}
|
|
4500
4518
|
function Qt(c, m) {
|
|
4501
|
-
|
|
4519
|
+
s[c] = m;
|
|
4502
4520
|
}
|
|
4503
4521
|
function Yt(c, m) {
|
|
4522
|
+
_[c] = m;
|
|
4523
|
+
}
|
|
4524
|
+
function er(c, m) {
|
|
4504
4525
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4505
4526
|
m.parsers && Object.keys(m.parsers).forEach((w) => {
|
|
4506
4527
|
b[w] = Re(m.parsers[w], je);
|
|
4507
|
-
}), m.name = c, n[c] =
|
|
4528
|
+
}), m.name = c, n[c] = q(v(v({}, $), m), { parsers: b });
|
|
4508
4529
|
}
|
|
4509
4530
|
function Oe(c) {
|
|
4510
4531
|
c && Object.keys(M).forEach((m) => {
|
|
@@ -4513,45 +4534,45 @@ function Kt(t) {
|
|
|
4513
4534
|
});
|
|
4514
4535
|
});
|
|
4515
4536
|
}
|
|
4516
|
-
function
|
|
4537
|
+
function Be(c, m) {
|
|
4517
4538
|
se(g, c, m), Oe(c);
|
|
4518
4539
|
}
|
|
4519
4540
|
function Fe(c, m) {
|
|
4520
4541
|
const $ = (...b) => O(() => m(...b));
|
|
4521
|
-
$._driver = !0,
|
|
4542
|
+
$._driver = !0, Be(c, $);
|
|
4522
4543
|
}
|
|
4523
|
-
function
|
|
4544
|
+
function st(c, m) {
|
|
4524
4545
|
const $ = (c || "").split(".");
|
|
4525
4546
|
c = $.shift();
|
|
4526
4547
|
const b = $.join(".");
|
|
4527
|
-
if (j(g, c) || F(g, c,
|
|
4548
|
+
if (j(g, c) || F(g, c, _t), g[c] !== _t) {
|
|
4528
4549
|
let w = g[c];
|
|
4529
4550
|
return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ? m : w;
|
|
4530
4551
|
} else
|
|
4531
4552
|
return m;
|
|
4532
4553
|
}
|
|
4533
|
-
function
|
|
4554
|
+
function tr(c) {
|
|
4534
4555
|
l.push(c);
|
|
4535
4556
|
}
|
|
4536
|
-
function
|
|
4557
|
+
function rr(c) {
|
|
4537
4558
|
delete g[c], Oe(c);
|
|
4538
4559
|
}
|
|
4539
|
-
function
|
|
4560
|
+
function ir(c, m) {
|
|
4540
4561
|
a.push({ name: c, callback: m });
|
|
4541
4562
|
}
|
|
4542
|
-
function
|
|
4563
|
+
function Te(c) {
|
|
4543
4564
|
C(this, {
|
|
4544
|
-
id:
|
|
4565
|
+
id: Hi++,
|
|
4545
4566
|
create: z,
|
|
4546
4567
|
vm: c,
|
|
4547
|
-
manager:
|
|
4568
|
+
manager: Fi(t.manager),
|
|
4548
4569
|
parsers: r,
|
|
4549
4570
|
providers: u,
|
|
4550
4571
|
modelFields: s,
|
|
4551
|
-
formulas:
|
|
4572
|
+
formulas: _,
|
|
4552
4573
|
isMobile: d,
|
|
4553
4574
|
rules: c.$props.rule,
|
|
4554
|
-
name: c.$props.name ||
|
|
4575
|
+
name: c.$props.name || Pe(),
|
|
4555
4576
|
inFor: c.$props.inFor,
|
|
4556
4577
|
prop: {
|
|
4557
4578
|
components: e,
|
|
@@ -4563,23 +4584,23 @@ function Kt(t) {
|
|
|
4563
4584
|
refreshData: Oe,
|
|
4564
4585
|
loadData: g,
|
|
4565
4586
|
CreateNode: y,
|
|
4566
|
-
bus: new
|
|
4587
|
+
bus: new ji(),
|
|
4567
4588
|
unwatch: [],
|
|
4568
|
-
options:
|
|
4589
|
+
options: $r({}),
|
|
4569
4590
|
extendApiFn: l,
|
|
4570
4591
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4571
4592
|
tmpData: ie({})
|
|
4572
4593
|
}), a.forEach((m) => {
|
|
4573
4594
|
this.bus.$on(m.name, m.callback);
|
|
4574
4595
|
}), V(() => {
|
|
4575
|
-
|
|
4596
|
+
T(this.options, () => {
|
|
4576
4597
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4577
4598
|
}, { deep: !0 });
|
|
4578
4599
|
}), C(c.$options.components, e), C(c.$options.directives, i), this.$handle = new K(this), this.name && (this.inFor ? (M[this.name] || (M[this.name] = []), M[this.name].push(this)) : M[this.name] = this);
|
|
4579
4600
|
}
|
|
4580
|
-
|
|
4601
|
+
Te.isMobile = d, C(Te.prototype, {
|
|
4581
4602
|
init() {
|
|
4582
|
-
this.isSub() && this.unwatch.push(
|
|
4603
|
+
this.isSub() && this.unwatch.push(T(() => this.vm.parent.fc.options.value, () => {
|
|
4583
4604
|
this.initOptions(), this.$handle.api.refresh();
|
|
4584
4605
|
}, { deep: !0, flush: "sync" })), this.vm.$props.driver && (this.renderDriver = typeof this.vm.$props.driver == "object" ? this.vm.$props.driver : this.drivers[this.vm.$props.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4585
4606
|
},
|
|
@@ -4622,8 +4643,8 @@ function Kt(t) {
|
|
|
4622
4643
|
R();
|
|
4623
4644
|
return;
|
|
4624
4645
|
}
|
|
4625
|
-
const
|
|
4626
|
-
this.$handle.api.fetch(
|
|
4646
|
+
const ue = this.$handle.loadFetchVar(We(b), J);
|
|
4647
|
+
ue.targetRule = this.targetRule, this.$handle.api.fetch(ue).then((te) => {
|
|
4627
4648
|
be(te);
|
|
4628
4649
|
}).catch((te) => {
|
|
4629
4650
|
be(null);
|
|
@@ -4641,7 +4662,7 @@ function Kt(t) {
|
|
|
4641
4662
|
let m = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4642
4663
|
if (m && (b = O(() => m(c))), b == null && $ && typeof $ == "object" && (b = L($, c)), b == null) {
|
|
4643
4664
|
const w = this.options.value.language || {}, A = this.getLocale();
|
|
4644
|
-
b = L(w[A] || {}, c), b == null && (b = L(
|
|
4665
|
+
b = L(w[A] || {}, c), b == null && (b = L(Ni[A] || {}, c));
|
|
4645
4666
|
}
|
|
4646
4667
|
return b;
|
|
4647
4668
|
},
|
|
@@ -4657,7 +4678,7 @@ function Kt(t) {
|
|
|
4657
4678
|
}
|
|
4658
4679
|
},
|
|
4659
4680
|
setData(c, m, $) {
|
|
4660
|
-
$ ?
|
|
4681
|
+
$ ? Be(c, m) : (se(this.vm.top.fc.tmpData, c, m), this.bus.$emit("$loadData." + c));
|
|
4661
4682
|
},
|
|
4662
4683
|
getLoadData(c, m) {
|
|
4663
4684
|
let $ = null;
|
|
@@ -4685,7 +4706,7 @@ function Kt(t) {
|
|
|
4685
4706
|
else {
|
|
4686
4707
|
if (w === "$preview")
|
|
4687
4708
|
return this.$handle.preview;
|
|
4688
|
-
$ =
|
|
4709
|
+
$ = st(c), b = [];
|
|
4689
4710
|
}
|
|
4690
4711
|
$ && b.length && ($ = L($, b));
|
|
4691
4712
|
}
|
|
@@ -4701,17 +4722,17 @@ function Kt(t) {
|
|
|
4701
4722
|
let ae;
|
|
4702
4723
|
if (typeof R == "object" && (ae = R.getValue, R = R.id), $[R])
|
|
4703
4724
|
return $[R].val;
|
|
4704
|
-
const ee = ge(() => ae ? ae() : this.getLoadData(R, be)), J = R.split("."), le = J.shift(),
|
|
4705
|
-
const
|
|
4725
|
+
const ee = ge(() => ae ? ae() : this.getLoadData(R, be)), J = R.split("."), le = J.shift(), ue = J.shift() || "", te = ne(() => {
|
|
4726
|
+
const fe = ae ? ae() : this.getLoadData(R, be);
|
|
4706
4727
|
if ($[R])
|
|
4707
|
-
((
|
|
4728
|
+
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[R].val || JSON.stringify(fe) !== JSON.stringify($[R].val)) && ($[R].val = fe, b(!0));
|
|
4708
4729
|
else return;
|
|
4709
|
-
}, m || 0),
|
|
4730
|
+
}, m || 0), sr = T(ee, (fe) => {
|
|
4710
4731
|
te();
|
|
4711
4732
|
});
|
|
4712
|
-
return this.bus.$on("$loadData." + le, te),
|
|
4733
|
+
return this.bus.$on("$loadData." + le, te), ue && this.bus.$on("$loadData." + le + "." + ue, te), $[R] = {
|
|
4713
4734
|
fn: () => {
|
|
4714
|
-
this.bus.$off("$loadData." + le, te),
|
|
4735
|
+
this.bus.$off("$loadData." + le, te), ue && this.bus.$off("$loadData." + le + "." + ue, te), sr();
|
|
4715
4736
|
},
|
|
4716
4737
|
val: ee.value
|
|
4717
4738
|
}, ee.value;
|
|
@@ -4727,7 +4748,7 @@ function Kt(t) {
|
|
|
4727
4748
|
},
|
|
4728
4749
|
initOptions() {
|
|
4729
4750
|
this.options.value = {};
|
|
4730
|
-
let c =
|
|
4751
|
+
let c = v({
|
|
4731
4752
|
formData: {},
|
|
4732
4753
|
submitBtn: {},
|
|
4733
4754
|
resetBtn: {},
|
|
@@ -4740,9 +4761,9 @@ function Kt(t) {
|
|
|
4740
4761
|
this.targetFormDriver("initOptions", c, { api: $, isSubForm: m }), this.updateOptions(c);
|
|
4741
4762
|
},
|
|
4742
4763
|
mergeOptions(c, m, $) {
|
|
4743
|
-
return m =
|
|
4764
|
+
return m = v({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4744
4765
|
delete m[b];
|
|
4745
|
-
}), m.global && (c.global =
|
|
4766
|
+
}), m.global && (c.global = Xr(c.global, m.global), delete m.global), this.$handle.$manager.mergeOptions([m], c), c;
|
|
4746
4767
|
},
|
|
4747
4768
|
updateOptions(c) {
|
|
4748
4769
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4771,52 +4792,52 @@ function Kt(t) {
|
|
|
4771
4792
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4772
4793
|
}
|
|
4773
4794
|
});
|
|
4774
|
-
function
|
|
4795
|
+
function ot(c) {
|
|
4775
4796
|
C(c, {
|
|
4776
4797
|
version: t.version,
|
|
4777
4798
|
ui: t.ui,
|
|
4778
4799
|
isMobile: d,
|
|
4779
|
-
extendApi:
|
|
4780
|
-
getData:
|
|
4800
|
+
extendApi: tr,
|
|
4801
|
+
getData: st,
|
|
4781
4802
|
setDataDriver: Fe,
|
|
4782
|
-
setData:
|
|
4783
|
-
removeData:
|
|
4803
|
+
setData: Be,
|
|
4804
|
+
removeData: rr,
|
|
4784
4805
|
refreshData: Oe,
|
|
4785
4806
|
maker: f,
|
|
4786
4807
|
component: k,
|
|
4787
|
-
directive:
|
|
4788
|
-
setModelField:
|
|
4789
|
-
setFormula:
|
|
4790
|
-
setDriver:
|
|
4791
|
-
register:
|
|
4808
|
+
directive: B,
|
|
4809
|
+
setModelField: Qt,
|
|
4810
|
+
setFormula: Yt,
|
|
4811
|
+
setDriver: er,
|
|
4812
|
+
register: he,
|
|
4792
4813
|
$vnode: N,
|
|
4793
|
-
parser:
|
|
4794
|
-
use:
|
|
4795
|
-
factory:
|
|
4796
|
-
componentAlias:
|
|
4797
|
-
copyRule:
|
|
4798
|
-
copyRules:
|
|
4814
|
+
parser: de,
|
|
4815
|
+
use: pe,
|
|
4816
|
+
factory: xt,
|
|
4817
|
+
componentAlias: Le,
|
|
4818
|
+
copyRule: Bt,
|
|
4819
|
+
copyRules: Tt,
|
|
4799
4820
|
mergeRule: Q,
|
|
4800
|
-
fetch:
|
|
4821
|
+
fetch: Ht,
|
|
4801
4822
|
$form: S,
|
|
4802
4823
|
parseFn: W,
|
|
4803
|
-
parseJson:
|
|
4824
|
+
parseJson: Dt,
|
|
4804
4825
|
toJson: Ce,
|
|
4805
4826
|
useApp: I,
|
|
4806
4827
|
getApi: Y,
|
|
4807
|
-
on:
|
|
4828
|
+
on: ir
|
|
4808
4829
|
});
|
|
4809
4830
|
}
|
|
4810
|
-
function
|
|
4831
|
+
function nr(c) {
|
|
4811
4832
|
C(c, {
|
|
4812
4833
|
create: z,
|
|
4813
4834
|
install(m, $) {
|
|
4814
|
-
if (p =
|
|
4835
|
+
if (p = v(v({}, p), $ || {}), m._installedFormCreate === !0) return;
|
|
4815
4836
|
m._installedFormCreate = !0;
|
|
4816
4837
|
const b = function(A, R = {}) {
|
|
4817
4838
|
return z(A, R, this);
|
|
4818
4839
|
};
|
|
4819
|
-
|
|
4840
|
+
ot(b), m.prototype.$formCreate = b;
|
|
4820
4841
|
const w = S();
|
|
4821
4842
|
m.component(w.name, w), m.component("FcFragment", N()), o.forEach((A) => {
|
|
4822
4843
|
O(() => A(c, m));
|
|
@@ -4824,9 +4845,9 @@ function Kt(t) {
|
|
|
4824
4845
|
}
|
|
4825
4846
|
});
|
|
4826
4847
|
}
|
|
4827
|
-
if (
|
|
4848
|
+
if (ot(E), nr(E), Fe("$cookie", Li), Fe("$localStorage", Bi), Fe("$sessionStorage", Ti), y.use({ fragment: "fcFragment" }), t.install && z.use(t), de(Ai), t.inherit) {
|
|
4828
4849
|
const c = t.inherit;
|
|
4829
|
-
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(g, c.loadData), c.formulas && C(
|
|
4850
|
+
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(g, c.loadData), c.formulas && C(_, c.formulas);
|
|
4830
4851
|
}
|
|
4831
4852
|
const ke = S();
|
|
4832
4853
|
return Re(ke, E), Object.defineProperties(ke, {
|
|
@@ -4848,10 +4869,10 @@ function Ue(t) {
|
|
|
4848
4869
|
return e.toString() === "Invalid Date" ? t : e;
|
|
4849
4870
|
}
|
|
4850
4871
|
}
|
|
4851
|
-
const
|
|
4852
|
-
name:
|
|
4872
|
+
const Ct = "datePicker", zi = {
|
|
4873
|
+
name: Ct,
|
|
4853
4874
|
maker: function() {
|
|
4854
|
-
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = P(
|
|
4875
|
+
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = P(Ct, { type: e.toLowerCase() }), t), {});
|
|
4855
4876
|
}(),
|
|
4856
4877
|
mergeProp(t) {
|
|
4857
4878
|
let e = t.prop.props;
|
|
@@ -4880,54 +4901,54 @@ const _t = "datePicker", Gi = {
|
|
|
4880
4901
|
mounted(t) {
|
|
4881
4902
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
4882
4903
|
}
|
|
4883
|
-
},
|
|
4884
|
-
name:
|
|
4904
|
+
}, Ge = "hidden", Ji = {
|
|
4905
|
+
name: Ge,
|
|
4885
4906
|
maker: {
|
|
4886
|
-
[
|
|
4907
|
+
[Ge]: (t, e) => P(Ge)("", t, e)
|
|
4887
4908
|
},
|
|
4888
4909
|
render() {
|
|
4889
4910
|
return [];
|
|
4890
4911
|
}
|
|
4891
|
-
},
|
|
4892
|
-
name:
|
|
4912
|
+
}, He = "input", Wi = {
|
|
4913
|
+
name: He,
|
|
4893
4914
|
maker: function() {
|
|
4894
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(
|
|
4895
|
-
return t.idate = P(
|
|
4915
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(He, { type: r }), e), {});
|
|
4916
|
+
return t.idate = P(He, { type: "date" }), t;
|
|
4896
4917
|
}(),
|
|
4897
4918
|
mergeProp(t) {
|
|
4898
4919
|
let { props: e } = t.prop;
|
|
4899
4920
|
e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4900
4921
|
}
|
|
4901
|
-
},
|
|
4902
|
-
name:
|
|
4922
|
+
}, wt = "slider", Ki = {
|
|
4923
|
+
name: wt,
|
|
4903
4924
|
maker: {
|
|
4904
|
-
sliderRange: P(
|
|
4925
|
+
sliderRange: P(wt, { range: !0 })
|
|
4905
4926
|
},
|
|
4906
4927
|
toFormValue(t, e) {
|
|
4907
4928
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4908
4929
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4909
4930
|
}
|
|
4910
|
-
},
|
|
4931
|
+
}, Xi = {
|
|
4911
4932
|
name: "switch",
|
|
4912
4933
|
mergeProp(t) {
|
|
4913
4934
|
const e = t.prop.props.slot || {}, r = t.prop.scopedSlots || {};
|
|
4914
4935
|
e.open && (r.open = () => e.open), e.close && (r.close = () => e.close), t.prop.scopedSlots = r;
|
|
4915
4936
|
}
|
|
4916
|
-
},
|
|
4937
|
+
}, Zi = {
|
|
4917
4938
|
name: "FcRow",
|
|
4918
4939
|
render(t, e) {
|
|
4919
4940
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4920
4941
|
e.vNode.row(e.prop, t)
|
|
4921
4942
|
]);
|
|
4922
4943
|
}
|
|
4923
|
-
},
|
|
4924
|
-
Gi,
|
|
4925
|
-
Hi,
|
|
4944
|
+
}, xi = [
|
|
4926
4945
|
zi,
|
|
4927
4946
|
Ji,
|
|
4928
4947
|
Wi,
|
|
4929
|
-
Ki
|
|
4930
|
-
|
|
4948
|
+
Ki,
|
|
4949
|
+
Xi,
|
|
4950
|
+
Zi
|
|
4951
|
+
], Qi = {
|
|
4931
4952
|
button: "iButton",
|
|
4932
4953
|
icon: "Icon",
|
|
4933
4954
|
slider: "Slider",
|
|
@@ -4954,21 +4975,21 @@ const _t = "datePicker", Gi = {
|
|
|
4954
4975
|
array: "fcGroup",
|
|
4955
4976
|
subForm: "fcSubForm",
|
|
4956
4977
|
object: "fcSubForm"
|
|
4957
|
-
},
|
|
4978
|
+
}, Ie = {
|
|
4958
4979
|
resetBtnType: "default",
|
|
4959
4980
|
resetBtnIcon: "md-refresh",
|
|
4960
4981
|
infoIcon: "ios-information-circle-outline"
|
|
4961
4982
|
};
|
|
4962
|
-
function
|
|
4983
|
+
function Yi() {
|
|
4963
4984
|
return {
|
|
4964
4985
|
type: "poptip",
|
|
4965
4986
|
trigger: "hover",
|
|
4966
4987
|
placement: "top-start",
|
|
4967
4988
|
wordWrap: !0,
|
|
4968
|
-
icon:
|
|
4989
|
+
icon: Ie.infoIcon
|
|
4969
4990
|
};
|
|
4970
4991
|
}
|
|
4971
|
-
function
|
|
4992
|
+
function en() {
|
|
4972
4993
|
return {
|
|
4973
4994
|
form: {
|
|
4974
4995
|
inline: !1,
|
|
@@ -4990,9 +5011,9 @@ function Qi() {
|
|
|
4990
5011
|
click: void 0
|
|
4991
5012
|
},
|
|
4992
5013
|
resetBtn: {
|
|
4993
|
-
type:
|
|
5014
|
+
type: Ie.resetBtnType,
|
|
4994
5015
|
disabled: !1,
|
|
4995
|
-
icon:
|
|
5016
|
+
icon: Ie.resetBtnIcon,
|
|
4996
5017
|
innerText: "",
|
|
4997
5018
|
loading: !1,
|
|
4998
5019
|
show: !1,
|
|
@@ -5000,20 +5021,20 @@ function Qi() {
|
|
|
5000
5021
|
}
|
|
5001
5022
|
};
|
|
5002
5023
|
}
|
|
5003
|
-
function
|
|
5024
|
+
function Ot(t, e) {
|
|
5004
5025
|
j(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
5005
5026
|
}
|
|
5006
5027
|
function X(t) {
|
|
5007
5028
|
return t === !1;
|
|
5008
5029
|
}
|
|
5009
|
-
function
|
|
5030
|
+
function tn(t, e) {
|
|
5010
5031
|
j(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
5011
5032
|
}
|
|
5012
|
-
function
|
|
5013
|
-
const e =
|
|
5033
|
+
function ze(t) {
|
|
5034
|
+
const e = v({}, t);
|
|
5014
5035
|
return delete e.children, e;
|
|
5015
5036
|
}
|
|
5016
|
-
const
|
|
5037
|
+
const rn = {
|
|
5017
5038
|
validate() {
|
|
5018
5039
|
const t = this.form();
|
|
5019
5040
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -5032,15 +5053,15 @@ const en = {
|
|
|
5032
5053
|
},
|
|
5033
5054
|
tidyOptions(t) {
|
|
5034
5055
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
5035
|
-
|
|
5056
|
+
tn(t, e);
|
|
5036
5057
|
}), t;
|
|
5037
5058
|
},
|
|
5038
5059
|
tidyRule({ prop: t }) {
|
|
5039
|
-
return
|
|
5060
|
+
return Ot(t, "title"), Ot(t, "info"), t;
|
|
5040
5061
|
},
|
|
5041
5062
|
mergeProp(t) {
|
|
5042
5063
|
const e = {
|
|
5043
|
-
info:
|
|
5064
|
+
info: Yi(),
|
|
5044
5065
|
title: {},
|
|
5045
5066
|
col: { span: 24 },
|
|
5046
5067
|
wrap: {}
|
|
@@ -5053,12 +5074,12 @@ const en = {
|
|
|
5053
5074
|
!t.size && this.options.form.size && (t.size = this.options.form.size);
|
|
5054
5075
|
},
|
|
5055
5076
|
getDefaultOptions() {
|
|
5056
|
-
return
|
|
5077
|
+
return en();
|
|
5057
5078
|
},
|
|
5058
5079
|
update() {
|
|
5059
5080
|
const t = this.options.form;
|
|
5060
5081
|
this.rule = {
|
|
5061
|
-
props:
|
|
5082
|
+
props: v({}, t),
|
|
5062
5083
|
nativeOn: {
|
|
5063
5084
|
submit: (e) => {
|
|
5064
5085
|
e.preventDefault();
|
|
@@ -5081,9 +5102,9 @@ const en = {
|
|
|
5081
5102
|
const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props, u = r.wrap.class;
|
|
5082
5103
|
delete r.wrap.class, delete r.wrap.title;
|
|
5083
5104
|
const f = X(r.wrap.show) ? e : this.$r(x([r.wrap, {
|
|
5084
|
-
props:
|
|
5105
|
+
props: q(v({
|
|
5085
5106
|
labelWidth: o
|
|
5086
|
-
},
|
|
5107
|
+
}, ze(r.wrap || {})), {
|
|
5087
5108
|
prop: t.id,
|
|
5088
5109
|
rules: t.injectValidate()
|
|
5089
5110
|
}),
|
|
@@ -5091,7 +5112,7 @@ const en = {
|
|
|
5091
5112
|
key: `${i}fi`,
|
|
5092
5113
|
ref: t.wrapRef,
|
|
5093
5114
|
type: "formItem"
|
|
5094
|
-
}]),
|
|
5115
|
+
}]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
|
|
5095
5116
|
return a === !0 || X(l) || X(s.show) ? f : this.makeCol(r, i, [f]);
|
|
5096
5117
|
},
|
|
5097
5118
|
isTitle(t) {
|
|
@@ -5101,31 +5122,31 @@ const en = {
|
|
|
5101
5122
|
},
|
|
5102
5123
|
makeInfo(t, e, r) {
|
|
5103
5124
|
var u, f, p, d, g, y;
|
|
5104
|
-
const i =
|
|
5125
|
+
const i = v({}, t.title), s = v({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
|
|
5105
5126
|
title: (f = (u = r.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value,
|
|
5106
5127
|
rule: r.rule,
|
|
5107
5128
|
options: this.options
|
|
5108
5129
|
}) : ((d = (p = r.refRule) == null ? void 0 : p.__$title) == null ? void 0 : d.value) + (n.labelSuffix || n["label-suffix"] || "")];
|
|
5109
5130
|
if (!X(s.show) && (s.info || s.native) && !X(s.icon)) {
|
|
5110
|
-
const
|
|
5131
|
+
const _ = {
|
|
5111
5132
|
type: s.type || "poptip",
|
|
5112
|
-
props:
|
|
5133
|
+
props: ze(s),
|
|
5113
5134
|
key: `${e}pop`,
|
|
5114
5135
|
slot: "label"
|
|
5115
5136
|
};
|
|
5116
|
-
delete
|
|
5137
|
+
delete _.props.icon, delete _.props.show, delete _.props.info, delete _.props.align, delete _.props.native;
|
|
5117
5138
|
const E = "content";
|
|
5118
|
-
s.info && !j(
|
|
5139
|
+
s.info && !j(_.props, E) && (_.props[E] = (y = (g = r.refRule) == null ? void 0 : g.__$info) == null ? void 0 : y.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(x([s, _]), [
|
|
5119
5140
|
this.$r({
|
|
5120
5141
|
type: "icon",
|
|
5121
|
-
props: { type: s.icon === !0 ?
|
|
5142
|
+
props: { type: s.icon === !0 ? Ie.infoIcon : s.icon, size: 16 },
|
|
5122
5143
|
style: "margin-top: -1px",
|
|
5123
5144
|
key: `${e}i`
|
|
5124
5145
|
})
|
|
5125
5146
|
]));
|
|
5126
5147
|
}
|
|
5127
5148
|
const l = x([i, {
|
|
5128
|
-
props:
|
|
5149
|
+
props: ze(i),
|
|
5129
5150
|
key: `${e}tit`,
|
|
5130
5151
|
class: "fc-form-title",
|
|
5131
5152
|
slot: i.slot || "label",
|
|
@@ -5168,7 +5189,7 @@ const en = {
|
|
|
5168
5189
|
}, [e]);
|
|
5169
5190
|
},
|
|
5170
5191
|
makeResetBtn() {
|
|
5171
|
-
const t =
|
|
5192
|
+
const t = v({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
|
|
5172
5193
|
return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
|
|
5173
5194
|
type: "button",
|
|
5174
5195
|
props: t,
|
|
@@ -5184,7 +5205,7 @@ const en = {
|
|
|
5184
5205
|
}, [e]);
|
|
5185
5206
|
},
|
|
5186
5207
|
makeSubmitBtn() {
|
|
5187
|
-
const t =
|
|
5208
|
+
const t = v({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
|
|
5188
5209
|
return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
|
|
5189
5210
|
type: "button",
|
|
5190
5211
|
props: t,
|
|
@@ -5200,13 +5221,13 @@ const en = {
|
|
|
5200
5221
|
key: `${this.key}b1`
|
|
5201
5222
|
}, [e]);
|
|
5202
5223
|
}
|
|
5203
|
-
}, oe = {},
|
|
5204
|
-
function
|
|
5205
|
-
|
|
5224
|
+
}, oe = {}, nn = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
|
|
5225
|
+
function sn(t) {
|
|
5226
|
+
nn.forEach((e) => {
|
|
5206
5227
|
t[e] = P(e);
|
|
5207
5228
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5208
5229
|
}
|
|
5209
|
-
function
|
|
5230
|
+
function on(t) {
|
|
5210
5231
|
const e = "upload", r = {
|
|
5211
5232
|
image: ["image", 0],
|
|
5212
5233
|
file: ["file", 0],
|
|
@@ -5215,19 +5236,19 @@ function nn(t) {
|
|
|
5215
5236
|
};
|
|
5216
5237
|
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;
|
|
5217
5238
|
}
|
|
5218
|
-
function
|
|
5239
|
+
function an(t) {
|
|
5219
5240
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5220
5241
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
|
|
5221
5242
|
}
|
|
5222
|
-
function
|
|
5243
|
+
function ln(t) {
|
|
5223
5244
|
const e = "timePicker";
|
|
5224
5245
|
t.time = P(e, { type: "time" }), t.timeRange = P(e, { type: "timerange" });
|
|
5225
5246
|
}
|
|
5226
|
-
function
|
|
5247
|
+
function un(t) {
|
|
5227
5248
|
const e = "select";
|
|
5228
5249
|
t.selectMultiple = P(e, { multiple: !0 }), t.selectOne = P(e, { multiple: !1 });
|
|
5229
5250
|
}
|
|
5230
|
-
function
|
|
5251
|
+
function fn(t) {
|
|
5231
5252
|
const e = "frame", r = {
|
|
5232
5253
|
frameInputs: ["input", 0],
|
|
5233
5254
|
frameFiles: ["file", 0],
|
|
@@ -5238,16 +5259,16 @@ function ln(t) {
|
|
|
5238
5259
|
};
|
|
5239
5260
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ type: r[s][0], maxLength: r[s][1] })), i), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages;
|
|
5240
5261
|
}
|
|
5241
|
-
rn(oe);
|
|
5242
|
-
nn(oe);
|
|
5243
5262
|
sn(oe);
|
|
5263
|
+
on(oe);
|
|
5244
5264
|
an(oe);
|
|
5265
|
+
un(oe);
|
|
5266
|
+
fn(oe);
|
|
5245
5267
|
ln(oe);
|
|
5246
|
-
|
|
5247
|
-
function Ot(t, e) {
|
|
5268
|
+
function Ft(t, e) {
|
|
5248
5269
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5249
5270
|
}
|
|
5250
|
-
function
|
|
5271
|
+
function cn(t, e) {
|
|
5251
5272
|
return {
|
|
5252
5273
|
formEl() {
|
|
5253
5274
|
return e.$manager.form();
|
|
@@ -5323,11 +5344,11 @@ function un(t, e) {
|
|
|
5323
5344
|
}
|
|
5324
5345
|
},
|
|
5325
5346
|
submitBtnProps: (r = {}) => {
|
|
5326
|
-
let i =
|
|
5347
|
+
let i = Ft(e.options.submitBtn, !0);
|
|
5327
5348
|
C(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
5328
5349
|
},
|
|
5329
5350
|
resetBtnProps: (r = {}) => {
|
|
5330
|
-
let i =
|
|
5351
|
+
let i = Ft(e.options.resetBtn, !1);
|
|
5331
5352
|
C(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
5332
5353
|
},
|
|
5333
5354
|
submit(r, i) {
|
|
@@ -5345,15 +5366,15 @@ function un(t, e) {
|
|
|
5345
5366
|
}
|
|
5346
5367
|
};
|
|
5347
5368
|
}
|
|
5348
|
-
const
|
|
5369
|
+
const Zt = {
|
|
5349
5370
|
name: "required",
|
|
5350
5371
|
load(t, e, r) {
|
|
5351
5372
|
var s, n;
|
|
5352
|
-
const i =
|
|
5373
|
+
const i = hn(t.getValue());
|
|
5353
5374
|
if (i.required === !1)
|
|
5354
5375
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5355
5376
|
else {
|
|
5356
|
-
const o =
|
|
5377
|
+
const o = v({
|
|
5357
5378
|
required: !0,
|
|
5358
5379
|
validator(l, u, f) {
|
|
5359
5380
|
h.empty(u) ? f(o.message) : f();
|
|
@@ -5370,28 +5391,28 @@ const Xt = {
|
|
|
5370
5391
|
r.sync(e);
|
|
5371
5392
|
},
|
|
5372
5393
|
watch(...t) {
|
|
5373
|
-
|
|
5394
|
+
Zt.load(...t);
|
|
5374
5395
|
}
|
|
5375
5396
|
};
|
|
5376
|
-
function
|
|
5397
|
+
function hn(t) {
|
|
5377
5398
|
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 : {};
|
|
5378
5399
|
}
|
|
5379
|
-
function
|
|
5380
|
-
t.componentAlias(
|
|
5400
|
+
function dn(t) {
|
|
5401
|
+
t.componentAlias(Qi), Wr.forEach((e) => {
|
|
5381
5402
|
t.component(e.name, e);
|
|
5382
|
-
}), t.register(
|
|
5403
|
+
}), t.register(Zt), xi.forEach((e) => {
|
|
5383
5404
|
t.parser(e);
|
|
5384
5405
|
}), Object.keys(oe).forEach((e) => {
|
|
5385
5406
|
t.maker[e] = oe[e];
|
|
5386
5407
|
});
|
|
5387
5408
|
}
|
|
5388
|
-
function
|
|
5389
|
-
return
|
|
5409
|
+
function pn() {
|
|
5410
|
+
return Xt({
|
|
5390
5411
|
ui: "view-design",
|
|
5391
|
-
version: "2.7.
|
|
5392
|
-
manager:
|
|
5393
|
-
install:
|
|
5394
|
-
extendApi:
|
|
5412
|
+
version: "2.7.17",
|
|
5413
|
+
manager: rn,
|
|
5414
|
+
install: dn,
|
|
5415
|
+
extendApi: cn,
|
|
5395
5416
|
attrs: {
|
|
5396
5417
|
normal: ["col", "wrap"],
|
|
5397
5418
|
array: ["className"],
|
|
@@ -5399,10 +5420,10 @@ function hn() {
|
|
|
5399
5420
|
}
|
|
5400
5421
|
});
|
|
5401
5422
|
}
|
|
5402
|
-
const
|
|
5403
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5404
|
-
const
|
|
5423
|
+
const Qe = pn();
|
|
5424
|
+
typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
|
|
5425
|
+
const yn = Qe.maker;
|
|
5405
5426
|
export {
|
|
5406
|
-
|
|
5407
|
-
|
|
5427
|
+
Qe as default,
|
|
5428
|
+
yn as maker
|
|
5408
5429
|
};
|