@form-create/iview 2.7.7 → 2.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/form-create.esm.js +570 -563
- package/dist/form-create.js +5 -3
- package/dist/form-create.min.js +5 -3
- package/package.json +11 -11
package/dist/form-create.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/iview v2.7.
|
|
3
|
+
* @form-create/iview v2.7.8
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
9
9
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .ivu-upload-list{margin-top:0}._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn,._fc-frame .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .ivu-upload-list{margin-top:0}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .ivu-form-item{margin-bottom:24px}.form-create .form-create .ivu-form-item .ivu-form-item{margin-bottom:0}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
-
var
|
|
10
|
+
var nr = Object.defineProperty, sr = Object.defineProperties;
|
|
11
|
+
var or = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var at = Object.getOwnPropertySymbols;
|
|
13
|
+
var ar = Object.prototype.hasOwnProperty, lr = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var lt = (t, e, r) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, v = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
|
|
16
|
+
ar.call(e, r) && lt(t, r, e[r]);
|
|
17
|
+
if (at)
|
|
18
|
+
for (var r of at(e))
|
|
19
|
+
lr.call(e, r) && lt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
}, U = (t, e) =>
|
|
22
|
-
import ye, { getCurrentInstance as
|
|
23
|
-
function
|
|
21
|
+
}, U = (t, e) => sr(t, or(e));
|
|
22
|
+
import ye, { getCurrentInstance as ur, provide as fr, inject as cr, toRefs as ut, reactive as ie, onBeforeMount as hr, watch as B, onMounted as dr, onBeforeUnmount as pr, onUpdated as mr, nextTick as A, markRaw as me, computed as ge, toRef as je, ref as gr } from "vue";
|
|
23
|
+
function yr(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function Je() {
|
|
27
|
+
return Je = Object.assign ? Object.assign.bind() : function(t) {
|
|
28
28
|
for (var e, r = 1; r < arguments.length; r++) for (var i in e = arguments[r], e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
|
|
29
29
|
return t;
|
|
30
|
-
},
|
|
30
|
+
}, Je.apply(this, arguments);
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var $r = ["attrs", "props", "domProps"], br = ["class", "style", "directives"], vr = ["on", "nativeOn"], _r = function(t) {
|
|
33
33
|
return t.reduce(function(e, r) {
|
|
34
34
|
for (var i in r) if (!e[i]) e[i] = r[i];
|
|
35
|
-
else if (
|
|
36
|
-
else if (
|
|
35
|
+
else if ($r.indexOf(i) !== -1) e[i] = Je({}, e[i], r[i]);
|
|
36
|
+
else if (br.indexOf(i) !== -1) {
|
|
37
37
|
var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
|
|
38
38
|
e[i] = [].concat(s, n);
|
|
39
|
-
} else if (
|
|
39
|
+
} else if (vr.indexOf(i) !== -1)
|
|
40
40
|
for (var o in r[i]) if (e[i][o]) {
|
|
41
41
|
var a = e[i][o] instanceof Array ? e[i][o] : [e[i][o]], l = r[i][o] instanceof Array ? r[i][o] : [r[i][o]];
|
|
42
42
|
e[i][o] = [].concat(a, l);
|
|
43
43
|
} else e[i][o] = r[i][o];
|
|
44
|
-
else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ?
|
|
44
|
+
else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? Cr(e[i][u], r[i][u]) : r[i][u];
|
|
45
45
|
else e[i] = r[i];
|
|
46
46
|
return e;
|
|
47
47
|
}, {});
|
|
48
|
-
},
|
|
48
|
+
}, Cr = function(t, e) {
|
|
49
49
|
return function() {
|
|
50
50
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
51
51
|
};
|
|
52
|
-
},
|
|
53
|
-
const I = /* @__PURE__ */
|
|
54
|
-
function
|
|
52
|
+
}, wr = _r;
|
|
53
|
+
const I = /* @__PURE__ */ yr(wr);
|
|
54
|
+
function Ae(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 Or = "fcCheckbox", Fr = {
|
|
58
|
+
name: Or,
|
|
59
59
|
props: {
|
|
60
60
|
formCreateInject: {
|
|
61
61
|
type: Object,
|
|
@@ -117,7 +117,7 @@ const wr = "fcCheckbox", Or = {
|
|
|
117
117
|
}, {
|
|
118
118
|
key: "" + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), Ae(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -126,10 +126,10 @@ const wr = "fcCheckbox", Or = {
|
|
|
126
126
|
function H(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const Sr = "fcFrame";
|
|
130
|
+
function Ft(t) {
|
|
131
131
|
return {
|
|
132
|
-
name:
|
|
132
|
+
name: Sr,
|
|
133
133
|
props: {
|
|
134
134
|
formCreateInject: {
|
|
135
135
|
type: Object,
|
|
@@ -503,16 +503,16 @@ function Ot(t) {
|
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const St = Ft({
|
|
507
507
|
fileIcon: "md-document",
|
|
508
508
|
fileUpIcon: "ios-folder-open"
|
|
509
509
|
});
|
|
510
|
-
|
|
510
|
+
St.v2 = Ft({
|
|
511
511
|
fileIcon: "document-text",
|
|
512
512
|
fileUpIcon: "folder"
|
|
513
513
|
});
|
|
514
|
-
const
|
|
515
|
-
name:
|
|
514
|
+
const kr = "fcRadio", Rr = {
|
|
515
|
+
name: kr,
|
|
516
516
|
props: {
|
|
517
517
|
formCreateInject: {
|
|
518
518
|
type: Object,
|
|
@@ -569,7 +569,7 @@ const Sr = "fcRadio", kr = {
|
|
|
569
569
|
}, {
|
|
570
570
|
key: "" + r + "-" + e.value
|
|
571
571
|
}]));
|
|
572
|
-
}),
|
|
572
|
+
}), Ae(this.$slots)]);
|
|
573
573
|
},
|
|
574
574
|
mounted() {
|
|
575
575
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -607,8 +607,8 @@ const Sr = "fcRadio", kr = {
|
|
|
607
607
|
function E(t, e) {
|
|
608
608
|
return {}.hasOwnProperty.call(t, e);
|
|
609
609
|
}
|
|
610
|
-
const
|
|
611
|
-
name:
|
|
610
|
+
const Er = "fcSelect", Dr = {
|
|
611
|
+
name: Er,
|
|
612
612
|
functional: !0,
|
|
613
613
|
props: {
|
|
614
614
|
formCreateInject: {
|
|
@@ -639,8 +639,8 @@ const Rr = "fcSelect", Er = {
|
|
|
639
639
|
mounted() {
|
|
640
640
|
this.$emit("fc.el", this.$refs.el);
|
|
641
641
|
}
|
|
642
|
-
},
|
|
643
|
-
name:
|
|
642
|
+
}, jr = "fcTree", Ir = {
|
|
643
|
+
name: jr,
|
|
644
644
|
props: {
|
|
645
645
|
formCreateInject: {
|
|
646
646
|
type: Object,
|
|
@@ -688,32 +688,32 @@ const Rr = "fcSelect", Er = {
|
|
|
688
688
|
ref: "tree"
|
|
689
689
|
}, {
|
|
690
690
|
on: e
|
|
691
|
-
}]), [
|
|
691
|
+
}]), [Ae(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: Ar(t)
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function ct(t) {
|
|
705
705
|
return U(v({}, t), {
|
|
706
706
|
file: t,
|
|
707
707
|
value: t
|
|
708
708
|
});
|
|
709
709
|
}
|
|
710
|
-
function
|
|
710
|
+
function Ar(t) {
|
|
711
711
|
return ("" + t).split("/").pop();
|
|
712
712
|
}
|
|
713
|
-
const
|
|
714
|
-
function
|
|
713
|
+
const Vr = "fcUpload";
|
|
714
|
+
function kt(t) {
|
|
715
715
|
return {
|
|
716
|
-
name:
|
|
716
|
+
name: Vr,
|
|
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, Ae(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 Rt = kt({
|
|
911
911
|
fileIcon: "md-document",
|
|
912
912
|
imgUpIcon: "md-images"
|
|
913
913
|
});
|
|
914
|
-
|
|
914
|
+
Rt.v2 = kt({
|
|
915
915
|
fileIcon: "document-text",
|
|
916
916
|
imgUpIcon: "image"
|
|
917
917
|
});
|
|
@@ -948,20 +948,20 @@ function _e(t, e = {}, r) {
|
|
|
948
948
|
function G(t) {
|
|
949
949
|
return _e({}, { value: t }).value;
|
|
950
950
|
}
|
|
951
|
-
const
|
|
951
|
+
const Pr = 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) && S(t, i, e[i]);
|
|
955
955
|
return t;
|
|
956
956
|
};
|
|
957
957
|
function C() {
|
|
958
|
-
return
|
|
958
|
+
return Pr.apply(this, arguments);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
960
|
+
function We(t) {
|
|
961
961
|
return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
|
|
962
962
|
}
|
|
963
|
-
const
|
|
964
|
-
name:
|
|
963
|
+
const Lr = "fcGroup", Br = {
|
|
964
|
+
name: Lr,
|
|
965
965
|
props: {
|
|
966
966
|
field: String,
|
|
967
967
|
rule: [Array, Object],
|
|
@@ -1265,8 +1265,8 @@ const Pr = "fcGroup", Lr = {
|
|
|
1265
1265
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1266
1266
|
}, [n]);
|
|
1267
1267
|
}
|
|
1268
|
-
},
|
|
1269
|
-
name:
|
|
1268
|
+
}, Tr = "fcSubForm", Nr = {
|
|
1269
|
+
name: Tr,
|
|
1270
1270
|
props: {
|
|
1271
1271
|
rule: Array,
|
|
1272
1272
|
options: Object,
|
|
@@ -1349,15 +1349,15 @@ const Pr = "fcGroup", Lr = {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
}]));
|
|
1351
1351
|
}
|
|
1352
|
-
},
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1352
|
+
}, Mr = [
|
|
1353
|
+
Fr,
|
|
1354
|
+
Rr,
|
|
1355
|
+
Dr,
|
|
1356
|
+
Ir,
|
|
1357
|
+
Nr,
|
|
1358
|
+
St,
|
|
1359
|
+
Rt,
|
|
1360
|
+
Br
|
|
1361
1361
|
];
|
|
1362
1362
|
function ne(t, e) {
|
|
1363
1363
|
var r = null;
|
|
@@ -1369,13 +1369,13 @@ function $e(t) {
|
|
|
1369
1369
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1370
1370
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1371
1371
|
}
|
|
1372
|
-
const
|
|
1373
|
-
const i = [...
|
|
1372
|
+
const Et = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style", "directives"], jt = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
|
|
1373
|
+
const i = [...Et, ...r.normal || []], s = [...Dt, ...r.array || []], n = [...jt, ...r.functional || []], o = r.props || [];
|
|
1374
1374
|
return t.reduce((a, l) => {
|
|
1375
1375
|
for (const u in l)
|
|
1376
1376
|
if (a[u])
|
|
1377
1377
|
if (o.indexOf(u) > -1)
|
|
1378
|
-
a[u] =
|
|
1378
|
+
a[u] = Y([l[u]], a[u]);
|
|
1379
1379
|
else if (i.indexOf(u) > -1)
|
|
1380
1380
|
a[u] = v(v({}, a[u]), l[u]);
|
|
1381
1381
|
else if (s.indexOf(u) > -1) {
|
|
@@ -1390,32 +1390,32 @@ const Rt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style"
|
|
|
1390
1390
|
a[u][f] = l[u][f];
|
|
1391
1391
|
else if (u === "hook")
|
|
1392
1392
|
for (let f in l[u])
|
|
1393
|
-
a[u][f] ? a[u][f] =
|
|
1393
|
+
a[u][f] ? a[u][f] = Ur(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1394
1394
|
else
|
|
1395
1395
|
a[u] = l[u];
|
|
1396
1396
|
else
|
|
1397
1397
|
i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = v({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? v({}, l[u]) : l[u] : a[u] = l[u];
|
|
1398
1398
|
return a;
|
|
1399
1399
|
}, e);
|
|
1400
|
-
},
|
|
1400
|
+
}, Ur = (t, e) => function() {
|
|
1401
1401
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1402
|
-
},
|
|
1403
|
-
function
|
|
1404
|
-
return [...
|
|
1402
|
+
}, It = ["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"], xe = ["validate", "children", "control"], et = ["effect", "deep", "renderSlots"];
|
|
1403
|
+
function At() {
|
|
1404
|
+
return [...It, ...Et, ...Dt, ...jt, ...xe, ...et];
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function Vt(t, e, r) {
|
|
1407
1407
|
return `[form-create ${t}]: ${e}`;
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
console.error(
|
|
1411
|
-
}
|
|
1412
|
-
function Ur(t) {
|
|
1413
|
-
et(t.toString()), console.error(t);
|
|
1409
|
+
function tt(t, e) {
|
|
1410
|
+
console.error(Vt("err", t));
|
|
1414
1411
|
}
|
|
1415
1412
|
function qr(t) {
|
|
1413
|
+
tt(t.toString()), console.error(t);
|
|
1414
|
+
}
|
|
1415
|
+
function Gr(t) {
|
|
1416
1416
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1417
1417
|
}
|
|
1418
|
-
const
|
|
1418
|
+
const Ke = "[[FORM-CREATE-PREFIX-", Xe = "-FORM-CREATE-SUFFIX]]";
|
|
1419
1419
|
function ve(t, e) {
|
|
1420
1420
|
return JSON.stringify(_e(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1421
1421
|
if (!(i && i._isVue === !0)) {
|
|
@@ -1424,19 +1424,19 @@ function ve(t, e) {
|
|
|
1424
1424
|
if (i.__json)
|
|
1425
1425
|
return i.__json;
|
|
1426
1426
|
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1427
|
-
return
|
|
1427
|
+
return Ke + i + Xe;
|
|
1428
1428
|
}
|
|
1429
1429
|
}, e);
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function Ne(t) {
|
|
1432
1432
|
return new Function("return " + t)();
|
|
1433
1433
|
}
|
|
1434
1434
|
function W(t, e) {
|
|
1435
1435
|
if (t && h.String(t) && t.length > 4) {
|
|
1436
1436
|
let r = t.trim(), i = !1;
|
|
1437
1437
|
try {
|
|
1438
|
-
if (r.indexOf(
|
|
1439
|
-
r = r.replace(
|
|
1438
|
+
if (r.indexOf(Xe) > 0 && r.indexOf(Ke) === 0)
|
|
1439
|
+
r = r.replace(Xe, "").replace(Ke, ""), i = !0;
|
|
1440
1440
|
else if (r.indexOf("$FN:") === 0)
|
|
1441
1441
|
r = r.substring(4), i = !0;
|
|
1442
1442
|
else if (r.indexOf("$EXEC:") === 0)
|
|
@@ -1450,19 +1450,21 @@ function W(t, e) {
|
|
|
1450
1450
|
}, r.__json = t, r.__inject = !0, r;
|
|
1451
1451
|
} else {
|
|
1452
1452
|
if (r.indexOf("$FNX:") === 0)
|
|
1453
|
-
return r =
|
|
1453
|
+
return r = Ne(`function($inject){
|
|
1454
|
+
` + r.substring(5) + `
|
|
1455
|
+
}`), r.__json = t, r.__inject = !0, r;
|
|
1454
1456
|
(!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
|
|
1455
1457
|
}
|
|
1456
1458
|
if (!i) return t;
|
|
1457
1459
|
let s;
|
|
1458
1460
|
try {
|
|
1459
|
-
s =
|
|
1461
|
+
s = Ne(r);
|
|
1460
1462
|
} catch (n) {
|
|
1461
|
-
s =
|
|
1463
|
+
s = Ne("function " + r);
|
|
1462
1464
|
}
|
|
1463
1465
|
return s.__json = t, s;
|
|
1464
1466
|
} catch (s) {
|
|
1465
|
-
|
|
1467
|
+
tt(`解析失败:${r}
|
|
1466
1468
|
|
|
1467
1469
|
err: ${s}`);
|
|
1468
1470
|
return;
|
|
@@ -1470,14 +1472,14 @@ err: ${s}`);
|
|
|
1470
1472
|
}
|
|
1471
1473
|
return t;
|
|
1472
1474
|
}
|
|
1473
|
-
function
|
|
1475
|
+
function Pt(t, e) {
|
|
1474
1476
|
return JSON.parse(t, function(r, i) {
|
|
1475
1477
|
return h.Undef(i) || !i.indexOf ? i : W(i, e);
|
|
1476
1478
|
});
|
|
1477
1479
|
}
|
|
1478
|
-
let
|
|
1479
|
-
function
|
|
1480
|
-
const t = 370 + ++
|
|
1480
|
+
let Hr = 0;
|
|
1481
|
+
function Ve() {
|
|
1482
|
+
const t = 370 + ++Hr;
|
|
1481
1483
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1482
1484
|
}
|
|
1483
1485
|
function se(t, e, r) {
|
|
@@ -1486,7 +1488,7 @@ function se(t, e, r) {
|
|
|
1486
1488
|
s && ((!i[s] || typeof i[s] != "object") && S(i, s, {}), i = i[s]), s = n;
|
|
1487
1489
|
}), S(i, s, r), i;
|
|
1488
1490
|
}
|
|
1489
|
-
function
|
|
1491
|
+
function Ze(t, e) {
|
|
1490
1492
|
return {
|
|
1491
1493
|
value: t,
|
|
1492
1494
|
enumerable: !1,
|
|
@@ -1494,25 +1496,25 @@ function Xe(t, e) {
|
|
|
1494
1496
|
writable: !!e
|
|
1495
1497
|
};
|
|
1496
1498
|
}
|
|
1497
|
-
function Pt(t, e) {
|
|
1498
|
-
return Lt([t], e || !1)[0];
|
|
1499
|
-
}
|
|
1500
1499
|
function Lt(t, e) {
|
|
1500
|
+
return Bt([t], e || !1)[0];
|
|
1501
|
+
}
|
|
1502
|
+
function Bt(t, e) {
|
|
1501
1503
|
return _e([], [...t], e || !1);
|
|
1502
1504
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return
|
|
1505
|
+
function x(t, e) {
|
|
1506
|
+
return Y(Array.isArray(e) ? e : [e], t, { array: xe, normal: et }), t;
|
|
1505
1507
|
}
|
|
1506
|
-
function
|
|
1508
|
+
function ht(t) {
|
|
1507
1509
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1508
1510
|
return e.type || (e.type = "input"), e;
|
|
1509
1511
|
}
|
|
1510
|
-
function
|
|
1512
|
+
function zr(t, e) {
|
|
1511
1513
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1512
|
-
e[r] && (t[r] =
|
|
1514
|
+
e[r] && (t[r] = x(t[r] || {}, e[r]));
|
|
1513
1515
|
}), t) : e;
|
|
1514
1516
|
}
|
|
1515
|
-
function
|
|
1517
|
+
function Tt(t, e) {
|
|
1516
1518
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1517
1519
|
get() {
|
|
1518
1520
|
return e[i]();
|
|
@@ -1526,26 +1528,26 @@ function O(t, e) {
|
|
|
1526
1528
|
try {
|
|
1527
1529
|
e = t();
|
|
1528
1530
|
} catch (r) {
|
|
1529
|
-
|
|
1531
|
+
qr(r);
|
|
1530
1532
|
}
|
|
1531
1533
|
return e;
|
|
1532
1534
|
}
|
|
1533
|
-
function
|
|
1535
|
+
function Qe(t, e) {
|
|
1534
1536
|
let r = null;
|
|
1535
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1537
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Qe(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1536
1538
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1537
1539
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1538
1540
|
});
|
|
1539
1541
|
}), r;
|
|
1540
1542
|
}
|
|
1541
|
-
function
|
|
1543
|
+
function Jr(t, e) {
|
|
1542
1544
|
if (h.Object(t)) {
|
|
1543
1545
|
const r = {};
|
|
1544
1546
|
return Object.keys(t).forEach((i) => {
|
|
1545
|
-
r[i] =
|
|
1547
|
+
r[i] = Qe(t[i], i);
|
|
1546
1548
|
}), r;
|
|
1547
1549
|
} else
|
|
1548
|
-
return
|
|
1550
|
+
return Qe(t, e);
|
|
1549
1551
|
}
|
|
1550
1552
|
function Fe() {
|
|
1551
1553
|
const t = {}, e = (r) => r || "default";
|
|
@@ -1563,7 +1565,7 @@ function Fe() {
|
|
|
1563
1565
|
const n = s();
|
|
1564
1566
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1565
1567
|
} else h.Undef(s) || i.push(s);
|
|
1566
|
-
}),
|
|
1568
|
+
}), Jr(i, r);
|
|
1567
1569
|
},
|
|
1568
1570
|
getSlots() {
|
|
1569
1571
|
let r = [];
|
|
@@ -1586,15 +1588,15 @@ function Fe() {
|
|
|
1586
1588
|
function Se(t, e) {
|
|
1587
1589
|
return Object.setPrototypeOf(t, e), t;
|
|
1588
1590
|
}
|
|
1589
|
-
const
|
|
1590
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1591
|
+
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
|
|
1592
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
|
|
1591
1593
|
"!=": (t, e) => !fe["=="](t, e),
|
|
1592
1594
|
">": (t, e) => t > e,
|
|
1593
1595
|
">=": (t, e) => t >= e,
|
|
1594
1596
|
"<": (t, e) => t < e,
|
|
1595
1597
|
"<=": (t, e) => t <= e,
|
|
1596
1598
|
on(t, e) {
|
|
1597
|
-
return t && t.indexOf && t.indexOf(
|
|
1599
|
+
return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
|
|
1598
1600
|
},
|
|
1599
1601
|
notOn(t, e) {
|
|
1600
1602
|
return !fe.on(t, e);
|
|
@@ -1626,7 +1628,7 @@ function L(t, e) {
|
|
|
1626
1628
|
t != null && (t = t[r]);
|
|
1627
1629
|
}), t;
|
|
1628
1630
|
}
|
|
1629
|
-
function
|
|
1631
|
+
function Wr(t) {
|
|
1630
1632
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1631
1633
|
let r;
|
|
1632
1634
|
const i = {};
|
|
@@ -1634,21 +1636,21 @@ function Jr(t) {
|
|
|
1634
1636
|
r[1] && (i[r[1]] = !0);
|
|
1635
1637
|
return Object.keys(i);
|
|
1636
1638
|
}
|
|
1637
|
-
function
|
|
1639
|
+
function pt(t) {
|
|
1638
1640
|
let e = t.split("."), r = [], i = "";
|
|
1639
1641
|
return e.forEach((s, n) => {
|
|
1640
1642
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1641
1643
|
}), r.join(" && ");
|
|
1642
1644
|
}
|
|
1643
|
-
const
|
|
1645
|
+
const Ee = (t, e) => {
|
|
1644
1646
|
if (!(!t || t === e || !t.$props)) {
|
|
1645
1647
|
if (t.$props.formCreateInject)
|
|
1646
1648
|
return t.$props.formCreateInject;
|
|
1647
1649
|
if (t.$parent)
|
|
1648
|
-
return
|
|
1650
|
+
return Ee(t.$parent, e);
|
|
1649
1651
|
}
|
|
1650
1652
|
};
|
|
1651
|
-
function
|
|
1653
|
+
function Kr(t, e, r) {
|
|
1652
1654
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1653
1655
|
return {
|
|
1654
1656
|
name: i,
|
|
@@ -1699,41 +1701,41 @@ function Wr(t, e, r) {
|
|
|
1699
1701
|
return this.fc.render();
|
|
1700
1702
|
},
|
|
1701
1703
|
setup(s) {
|
|
1702
|
-
const n =
|
|
1703
|
-
|
|
1704
|
-
const o =
|
|
1704
|
+
const n = ur().proxy;
|
|
1705
|
+
fr("parentFC", n);
|
|
1706
|
+
const o = cr("parentFC", null);
|
|
1705
1707
|
let a = o;
|
|
1706
1708
|
if (o)
|
|
1707
1709
|
for (; a.parent; )
|
|
1708
1710
|
a = a.parent;
|
|
1709
1711
|
else
|
|
1710
1712
|
a = n;
|
|
1711
|
-
const { rule: l, value: u, subForm: f, inFor: d } =
|
|
1713
|
+
const { rule: l, value: u, subForm: f, inFor: d } = ut(s), g = ie({
|
|
1712
1714
|
ctxInject: {},
|
|
1713
1715
|
destroyed: !1,
|
|
1714
1716
|
isShow: !0,
|
|
1715
1717
|
unique: 1,
|
|
1716
1718
|
renderRule: [...l.value || []],
|
|
1717
1719
|
updateValue: JSON.stringify(u.value || {})
|
|
1718
|
-
}), m = new t(n),
|
|
1720
|
+
}), m = new t(n), y = m.api(), _ = d.value, D = () => {
|
|
1719
1721
|
if (o) {
|
|
1720
|
-
const F =
|
|
1722
|
+
const F = Ee(n, o);
|
|
1721
1723
|
if (F) {
|
|
1722
1724
|
let k;
|
|
1723
|
-
_ ? (k = H(F.getSubForm()), k.push(
|
|
1725
|
+
_ ? (k = H(F.getSubForm()), k.push(y)) : k = y, F.subForm(k);
|
|
1724
1726
|
}
|
|
1725
1727
|
}
|
|
1726
1728
|
}, ee = () => {
|
|
1727
|
-
const F =
|
|
1729
|
+
const F = Ee(n, o);
|
|
1728
1730
|
if (F)
|
|
1729
1731
|
if (_) {
|
|
1730
|
-
const k = H(F.getSubForm()), N = k.indexOf(
|
|
1732
|
+
const k = H(F.getSubForm()), N = k.indexOf(y);
|
|
1731
1733
|
N > -1 && k.splice(N, 1);
|
|
1732
1734
|
} else
|
|
1733
1735
|
F.subForm();
|
|
1734
1736
|
};
|
|
1735
1737
|
let P = null;
|
|
1736
|
-
|
|
1738
|
+
hr(() => {
|
|
1737
1739
|
B(() => {
|
|
1738
1740
|
let F = "";
|
|
1739
1741
|
const k = s.option && s.option.globalClass || {};
|
|
@@ -1750,40 +1752,40 @@ function Wr(t, e, r) {
|
|
|
1750
1752
|
m.bus.$emit("$loadData.$topForm");
|
|
1751
1753
|
}, 100), ce = ne(function() {
|
|
1752
1754
|
m.bus.$emit("$loadData.$scopeForm");
|
|
1753
|
-
}, 100),
|
|
1755
|
+
}, 100), Pe = ne(() => {
|
|
1754
1756
|
m.bus.$emit("$loadData.$form");
|
|
1755
1757
|
}, 100), he = (F) => {
|
|
1756
1758
|
m.bus.$emit("change-$form." + F);
|
|
1757
1759
|
};
|
|
1758
|
-
return
|
|
1759
|
-
o && (
|
|
1760
|
-
}), dr(() => {
|
|
1761
|
-
o && ($.top.bus.$off("$loadData.$form", T), $.top.bus.$off("change", he)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", ce), P && document.head.removeChild(P), ee(), g.destroyed = !0, m.unmount();
|
|
1760
|
+
return dr(() => {
|
|
1761
|
+
o && (y.top.bus.$on("$loadData.$form", T), y.top.bus.$on("change", he)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", ce), m.mounted();
|
|
1762
1762
|
}), pr(() => {
|
|
1763
|
+
o && (y.top.bus.$off("$loadData.$form", T), y.top.bus.$off("change", he)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", ce), P && document.head.removeChild(P), ee(), g.destroyed = !0, m.unmount();
|
|
1764
|
+
}), mr(() => {
|
|
1763
1765
|
m.updated();
|
|
1764
1766
|
}), B(f, (F) => {
|
|
1765
1767
|
F ? D() : ee();
|
|
1766
1768
|
}, { immediate: !0 }), B(() => s.option, () => {
|
|
1767
|
-
m.initOptions(),
|
|
1769
|
+
m.initOptions(), y.refresh();
|
|
1768
1770
|
}, { deep: !0 }), B(() => [...l.value], (F) => {
|
|
1769
1771
|
m.$handle.isBreakWatch() || F.length === g.renderRule.length && F.every((k) => g.renderRule.indexOf(k) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
|
|
1770
1772
|
}), B(() => [s.disabled, s.preview], () => {
|
|
1771
|
-
|
|
1773
|
+
y.refresh();
|
|
1772
1774
|
}), B(u, (F) => {
|
|
1773
|
-
ve(F || {}) !== g.updateValue && (
|
|
1775
|
+
ve(F || {}) !== g.updateValue && (y.config.forceCoverValue ? y.coverValue(F || {}) : y.setValue(F || {}));
|
|
1774
1776
|
}, { deep: !0, flush: "post" }), B(() => s.index, () => {
|
|
1775
|
-
|
|
1777
|
+
y.coverValue({}), m.$handle.updateAppendData(), A(() => {
|
|
1776
1778
|
A(() => {
|
|
1777
|
-
|
|
1779
|
+
y.clearValidateState();
|
|
1778
1780
|
});
|
|
1779
1781
|
});
|
|
1780
1782
|
}, { flush: "sync" }), U(v({
|
|
1781
1783
|
fc: me(m),
|
|
1782
1784
|
parent: o && me(o),
|
|
1783
1785
|
top: me(a),
|
|
1784
|
-
fapi: me(
|
|
1785
|
-
},
|
|
1786
|
-
getGroupInject: () =>
|
|
1786
|
+
fapi: me(y)
|
|
1787
|
+
}, ut(g)), {
|
|
1788
|
+
getGroupInject: () => Ee(n, o),
|
|
1787
1789
|
refresh() {
|
|
1788
1790
|
++g.unique;
|
|
1789
1791
|
},
|
|
@@ -1794,7 +1796,7 @@ function Wr(t, e, r) {
|
|
|
1794
1796
|
if (g.destroyed) return;
|
|
1795
1797
|
const k = ve(F);
|
|
1796
1798
|
g.updateValue !== k && (g.updateValue = k, n.$emit("update:value", F), A(() => {
|
|
1797
|
-
|
|
1799
|
+
Pe(), o ? f.value || ce() : (T(), ce());
|
|
1798
1800
|
}));
|
|
1799
1801
|
}
|
|
1800
1802
|
});
|
|
@@ -1804,7 +1806,7 @@ function Wr(t, e, r) {
|
|
|
1804
1806
|
}
|
|
1805
1807
|
};
|
|
1806
1808
|
}
|
|
1807
|
-
function
|
|
1809
|
+
function Nt() {
|
|
1808
1810
|
return {
|
|
1809
1811
|
props: {},
|
|
1810
1812
|
on: {},
|
|
@@ -1818,14 +1820,14 @@ function Tt() {
|
|
|
1818
1820
|
}
|
|
1819
1821
|
function V(t, e) {
|
|
1820
1822
|
return (r, i, s, n = {}) => {
|
|
1821
|
-
const o = new
|
|
1823
|
+
const o = new rt(t, r, i, s, n);
|
|
1822
1824
|
return e && (h.Function(e) ? e(o) : o.props(e)), o;
|
|
1823
1825
|
};
|
|
1824
1826
|
}
|
|
1825
|
-
function
|
|
1826
|
-
this._data = C(
|
|
1827
|
+
function rt(t, e, r, i, s) {
|
|
1828
|
+
this._data = C(Nt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1827
1829
|
}
|
|
1828
|
-
C(
|
|
1830
|
+
C(rt.prototype, {
|
|
1829
1831
|
getRule() {
|
|
1830
1832
|
return this._data;
|
|
1831
1833
|
},
|
|
@@ -1834,39 +1836,39 @@ C(tt.prototype, {
|
|
|
1834
1836
|
},
|
|
1835
1837
|
_clone() {
|
|
1836
1838
|
const t = new this.constructor();
|
|
1837
|
-
return t._data =
|
|
1839
|
+
return t._data = Lt(this._data), t;
|
|
1838
1840
|
}
|
|
1839
1841
|
});
|
|
1840
|
-
function
|
|
1842
|
+
function Mt(t) {
|
|
1841
1843
|
t.forEach((e) => {
|
|
1842
|
-
|
|
1843
|
-
return
|
|
1844
|
+
rt.prototype[e] = function(r) {
|
|
1845
|
+
return x(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1844
1846
|
};
|
|
1845
1847
|
});
|
|
1846
1848
|
}
|
|
1847
|
-
|
|
1848
|
-
const
|
|
1849
|
-
function
|
|
1850
|
-
let i =
|
|
1849
|
+
Mt(At());
|
|
1850
|
+
const Ut = V("");
|
|
1851
|
+
function Xr(t, e, r) {
|
|
1852
|
+
let i = Ut("", e);
|
|
1851
1853
|
return i._data.type = t, i._data.title = r, i;
|
|
1852
1854
|
}
|
|
1853
|
-
function
|
|
1854
|
-
let s =
|
|
1855
|
+
function mt(t, e, r, i) {
|
|
1856
|
+
let s = Ut("", r);
|
|
1855
1857
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1856
1858
|
}
|
|
1857
|
-
function
|
|
1859
|
+
function Zr() {
|
|
1858
1860
|
return {
|
|
1859
|
-
create:
|
|
1860
|
-
createTmp:
|
|
1861
|
-
template:
|
|
1861
|
+
create: Xr,
|
|
1862
|
+
createTmp: mt,
|
|
1863
|
+
template: mt,
|
|
1862
1864
|
factory: V
|
|
1863
1865
|
};
|
|
1864
1866
|
}
|
|
1865
|
-
function
|
|
1867
|
+
function Qr(t, e, r) {
|
|
1866
1868
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1867
1869
|
return s.status = r.status, s.url = t, s;
|
|
1868
1870
|
}
|
|
1869
|
-
function
|
|
1871
|
+
function gt(t) {
|
|
1870
1872
|
const e = t.responseText || t.response;
|
|
1871
1873
|
if (!e)
|
|
1872
1874
|
return e;
|
|
@@ -1876,7 +1878,7 @@ function mt(t) {
|
|
|
1876
1878
|
return e;
|
|
1877
1879
|
}
|
|
1878
1880
|
}
|
|
1879
|
-
function
|
|
1881
|
+
function qt(t) {
|
|
1880
1882
|
if (typeof XMLHttpRequest == "undefined")
|
|
1881
1883
|
return;
|
|
1882
1884
|
const e = new XMLHttpRequest();
|
|
@@ -1891,8 +1893,8 @@ function Ut(t) {
|
|
|
1891
1893
|
t.onError(o);
|
|
1892
1894
|
}, e.onload = function() {
|
|
1893
1895
|
if (e.status < 200 || e.status >= 300)
|
|
1894
|
-
return t.onError(
|
|
1895
|
-
t.onSuccess(
|
|
1896
|
+
return t.onError(Qr(r, t, e), gt(e));
|
|
1897
|
+
t.onSuccess(gt(e));
|
|
1896
1898
|
}, e.open(t.method || "get", r, !0);
|
|
1897
1899
|
let i;
|
|
1898
1900
|
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
@@ -1903,9 +1905,9 @@ function Ut(t) {
|
|
|
1903
1905
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1904
1906
|
}), e.send(i);
|
|
1905
1907
|
}
|
|
1906
|
-
function
|
|
1908
|
+
function yt(t, e, r) {
|
|
1907
1909
|
return new Promise((i, s) => {
|
|
1908
|
-
(e ||
|
|
1910
|
+
(e || qt)(U(v({}, t), {
|
|
1909
1911
|
onSuccess(n) {
|
|
1910
1912
|
let o = (l) => l;
|
|
1911
1913
|
const a = W(t.parse);
|
|
@@ -1920,7 +1922,7 @@ function gt(t, e, r) {
|
|
|
1920
1922
|
function be(t) {
|
|
1921
1923
|
return G(t);
|
|
1922
1924
|
}
|
|
1923
|
-
function
|
|
1925
|
+
function Yr(t) {
|
|
1924
1926
|
function e(n) {
|
|
1925
1927
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1926
1928
|
}
|
|
@@ -2174,7 +2176,7 @@ function Qr(t) {
|
|
|
2174
2176
|
},
|
|
2175
2177
|
mergeRule: (n, o) => {
|
|
2176
2178
|
t.getCtxs(n).forEach((a) => {
|
|
2177
|
-
|
|
2179
|
+
x(a.rule, o);
|
|
2178
2180
|
});
|
|
2179
2181
|
},
|
|
2180
2182
|
mergeRules(n) {
|
|
@@ -2234,7 +2236,7 @@ function Qr(t) {
|
|
|
2234
2236
|
method(n, o) {
|
|
2235
2237
|
const a = s.el(n);
|
|
2236
2238
|
if (!a || !a[o])
|
|
2237
|
-
throw new Error(
|
|
2239
|
+
throw new Error(Vt("err", `${o} 方法不存在`));
|
|
2238
2240
|
return (...l) => a[o](...l);
|
|
2239
2241
|
},
|
|
2240
2242
|
exec(n, o, ...a) {
|
|
@@ -2328,7 +2330,7 @@ function Qr(t) {
|
|
|
2328
2330
|
bus: t.bus,
|
|
2329
2331
|
fetch(n) {
|
|
2330
2332
|
return new Promise((o, a) => {
|
|
2331
|
-
n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2333
|
+
n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((l) => {
|
|
2332
2334
|
O(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2333
2335
|
}).catch((l) => {
|
|
2334
2336
|
O(() => n.onError && n.onError(l)), a(l);
|
|
@@ -2339,7 +2341,7 @@ function Qr(t) {
|
|
|
2339
2341
|
watchFetch(n, o, a, l) {
|
|
2340
2342
|
return t.fc.watchLoadData((u, f) => {
|
|
2341
2343
|
let d = G(n);
|
|
2342
|
-
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() =>
|
|
2344
|
+
d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => yt(d, t.fc.create.fetch, s).then((g) => {
|
|
2343
2345
|
O(() => d.onSuccess && d.onSuccess(g)), o && o(g, f);
|
|
2344
2346
|
}).catch((g) => {
|
|
2345
2347
|
O(() => d.onError && d.onError(g)), a && a(g);
|
|
@@ -2409,12 +2411,12 @@ function q(t) {
|
|
|
2409
2411
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2410
2412
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2411
2413
|
});
|
|
2412
|
-
return
|
|
2414
|
+
return Gt(e);
|
|
2413
2415
|
}
|
|
2414
|
-
function
|
|
2416
|
+
function Gt(t) {
|
|
2415
2417
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2416
2418
|
}
|
|
2417
|
-
function
|
|
2419
|
+
function ei(t) {
|
|
2418
2420
|
C(t.prototype, {
|
|
2419
2421
|
initRender() {
|
|
2420
2422
|
this.cacheConfig = {};
|
|
@@ -2445,8 +2447,8 @@ function Yr(t) {
|
|
|
2445
2447
|
mergeGlobal(e) {
|
|
2446
2448
|
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = ge(() => {
|
|
2447
2449
|
const i = this.$handle.options.global;
|
|
2448
|
-
return
|
|
2449
|
-
})), e.prop =
|
|
2450
|
+
return x({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2451
|
+
})), e.prop = x({}, [this.cacheConfig[e.trueType].value, e.prop]));
|
|
2450
2452
|
},
|
|
2451
2453
|
setOptions(e) {
|
|
2452
2454
|
const r = e.loadPending({ key: "options", origin: e.prop.options, def: [] });
|
|
@@ -2459,7 +2461,7 @@ function Yr(t) {
|
|
|
2459
2461
|
});
|
|
2460
2462
|
},
|
|
2461
2463
|
parseSide(e, r) {
|
|
2462
|
-
return h.Object(e) ?
|
|
2464
|
+
return h.Object(e) ? x({ props: { formCreateInject: r.prop.props.formCreateInject } }, e) : e;
|
|
2463
2465
|
},
|
|
2464
2466
|
renderSides(e, r, i) {
|
|
2465
2467
|
const s = r[i ? "rule" : "prop"];
|
|
@@ -2496,20 +2498,20 @@ function Yr(t) {
|
|
|
2496
2498
|
l.length && i.slotUpdate && O(() => i.slotUpdate(u));
|
|
2497
2499
|
let f = [];
|
|
2498
2500
|
const d = e.loadChildrenPending();
|
|
2499
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((
|
|
2501
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach((y) => {
|
|
2500
2502
|
f.push(this.renderRule({
|
|
2501
2503
|
type: "template",
|
|
2502
|
-
slot:
|
|
2504
|
+
slot: y
|
|
2503
2505
|
}, (() => {
|
|
2504
|
-
if (h.Function(n.renderSlots[
|
|
2505
|
-
return O(() => n.renderSlots[
|
|
2506
|
-
const _ = this.parseSide(n.renderSlots[
|
|
2506
|
+
if (h.Function(n.renderSlots[y]))
|
|
2507
|
+
return O(() => n.renderSlots[y]());
|
|
2508
|
+
const _ = this.parseSide(n.renderSlots[y], e);
|
|
2507
2509
|
return this.renderRule(_);
|
|
2508
2510
|
})()));
|
|
2509
2511
|
});
|
|
2510
2512
|
const g = this.getTypeSlot(e);
|
|
2511
2513
|
let m;
|
|
2512
|
-
return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(
|
|
2514
|
+
return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(We(f), e) : e.parser.render(We(f), e), m = this.renderSides(m, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), m = this.$manager.makeWrap(e, m)), e.none && (Array.isArray(m) ? m = m.map((y) => !y || !y.tag ? y : this.none(y)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
|
|
2513
2515
|
}, this.setCache(e, s, r);
|
|
2514
2516
|
}
|
|
2515
2517
|
return (...s) => {
|
|
@@ -2629,7 +2631,7 @@ function Yr(t) {
|
|
|
2629
2631
|
}
|
|
2630
2632
|
});
|
|
2631
2633
|
}
|
|
2632
|
-
return
|
|
2634
|
+
return Y(a, e.prop), e.prop;
|
|
2633
2635
|
},
|
|
2634
2636
|
onMounted(e) {
|
|
2635
2637
|
e.el = this.vm.$refs[e.ref], e.el && ((e.el.$el || e.el).__rule__ = e.rule), e.parser.mounted(e), this.$handle.effect(e, "mounted"), this.$handle.targetHook(e, "mounted");
|
|
@@ -2663,7 +2665,7 @@ function Yr(t) {
|
|
|
2663
2665
|
},
|
|
2664
2666
|
defaultRender(e, r) {
|
|
2665
2667
|
const i = e.prop;
|
|
2666
|
-
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(
|
|
2668
|
+
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(Gt(i.type), i, r);
|
|
2667
2669
|
},
|
|
2668
2670
|
createChildrenVnodes(e, r, i) {
|
|
2669
2671
|
this.force = i !== !1, this.tmpInput = r;
|
|
@@ -2696,8 +2698,8 @@ function Yr(t) {
|
|
|
2696
2698
|
}
|
|
2697
2699
|
});
|
|
2698
2700
|
}
|
|
2699
|
-
let
|
|
2700
|
-
function
|
|
2701
|
+
let ti = 1;
|
|
2702
|
+
function it(t) {
|
|
2701
2703
|
C(this, {
|
|
2702
2704
|
$handle: t,
|
|
2703
2705
|
fc: t.fc,
|
|
@@ -2706,8 +2708,8 @@ function rt(t) {
|
|
|
2706
2708
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2707
2709
|
force: !1,
|
|
2708
2710
|
tmpInput: null,
|
|
2709
|
-
id:
|
|
2710
|
-
}),
|
|
2711
|
+
id: ti++
|
|
2712
|
+
}), Tt(this, {
|
|
2711
2713
|
options() {
|
|
2712
2714
|
return t.options;
|
|
2713
2715
|
},
|
|
@@ -2716,9 +2718,9 @@ function rt(t) {
|
|
|
2716
2718
|
}
|
|
2717
2719
|
}), this.initCache(), this.initRender();
|
|
2718
2720
|
}
|
|
2719
|
-
xr(
|
|
2720
|
-
|
|
2721
|
-
function
|
|
2721
|
+
xr(it);
|
|
2722
|
+
ei(it);
|
|
2723
|
+
function ri(t) {
|
|
2722
2724
|
C(t.prototype, {
|
|
2723
2725
|
parseInjectEvent(e, r) {
|
|
2724
2726
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2748,14 +2750,14 @@ function ti(t) {
|
|
|
2748
2750
|
let d, g = n || o || a;
|
|
2749
2751
|
if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
|
|
2750
2752
|
r || (g = `native-${g}`);
|
|
2751
|
-
const m = $e(`${g}-${f}`),
|
|
2753
|
+
const m = $e(`${g}-${f}`), y = (..._) => {
|
|
2752
2754
|
this.vm.$emit(m, ..._), this.vm.$emit("emit-event", m, ..._), this.bus.$emit(m, ..._);
|
|
2753
2755
|
};
|
|
2754
|
-
if (
|
|
2755
|
-
i[f] =
|
|
2756
|
+
if (y.__emit = !0, !d && l === !1)
|
|
2757
|
+
i[f] = y;
|
|
2756
2758
|
else {
|
|
2757
2759
|
let _ = d || l || this.options.injectEvent;
|
|
2758
|
-
i[f] = h.Undef(_) ?
|
|
2760
|
+
i[f] = h.Undef(_) ? y : this.inject(s, y, _);
|
|
2759
2761
|
}
|
|
2760
2762
|
}
|
|
2761
2763
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2785,7 +2787,7 @@ function ti(t) {
|
|
|
2785
2787
|
},
|
|
2786
2788
|
loadStrVar(e, r, i) {
|
|
2787
2789
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2788
|
-
const s = e, n =
|
|
2790
|
+
const s = e, n = Wr(e);
|
|
2789
2791
|
let o;
|
|
2790
2792
|
if (n.forEach((a) => {
|
|
2791
2793
|
const l = a.split("||"), u = l[0].trim();
|
|
@@ -2821,13 +2823,13 @@ function ti(t) {
|
|
|
2821
2823
|
}
|
|
2822
2824
|
});
|
|
2823
2825
|
}
|
|
2824
|
-
const
|
|
2825
|
-
function
|
|
2826
|
+
const $t = ["hook:updated", "hook:mounted"];
|
|
2827
|
+
function ii(t) {
|
|
2826
2828
|
C(t.prototype, {
|
|
2827
2829
|
usePage() {
|
|
2828
2830
|
const e = this.options.page;
|
|
2829
2831
|
if (!e) return;
|
|
2830
|
-
let r = 25, i =
|
|
2832
|
+
let r = 25, i = ni(this.rules);
|
|
2831
2833
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), C(this, {
|
|
2832
2834
|
first: r,
|
|
2833
2835
|
limit: i,
|
|
@@ -2836,16 +2838,16 @@ function ri(t) {
|
|
|
2836
2838
|
},
|
|
2837
2839
|
pageLoad() {
|
|
2838
2840
|
const e = () => {
|
|
2839
|
-
this.pageEnd ? (this.vm.$off(
|
|
2841
|
+
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());
|
|
2840
2842
|
};
|
|
2841
|
-
this.vm.$on(
|
|
2843
|
+
this.vm.$on($t, e);
|
|
2842
2844
|
}
|
|
2843
2845
|
});
|
|
2844
2846
|
}
|
|
2845
|
-
function
|
|
2847
|
+
function ni(t) {
|
|
2846
2848
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2847
2849
|
}
|
|
2848
|
-
function
|
|
2850
|
+
function si(t) {
|
|
2849
2851
|
C(t.prototype, {
|
|
2850
2852
|
clearNextTick() {
|
|
2851
2853
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2860,15 +2862,15 @@ function ni(t) {
|
|
|
2860
2862
|
}
|
|
2861
2863
|
});
|
|
2862
2864
|
}
|
|
2863
|
-
function
|
|
2865
|
+
function oi(t) {
|
|
2864
2866
|
Object.defineProperties(t.origin, {
|
|
2865
|
-
__fc__:
|
|
2867
|
+
__fc__: Ze(me(t), !0)
|
|
2866
2868
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2867
|
-
__fc__:
|
|
2869
|
+
__fc__: Ze(me(t), !0)
|
|
2868
2870
|
});
|
|
2869
2871
|
}
|
|
2870
|
-
function
|
|
2871
|
-
const i =
|
|
2872
|
+
function Ht(t, e, r) {
|
|
2873
|
+
const i = Ve(), s = !!e.field;
|
|
2872
2874
|
C(this, {
|
|
2873
2875
|
id: i,
|
|
2874
2876
|
ref: i,
|
|
@@ -2895,9 +2897,9 @@ function Gt(t, e, r) {
|
|
|
2895
2897
|
exportEl: void 0,
|
|
2896
2898
|
defaultValue: s ? G(r) : void 0,
|
|
2897
2899
|
field: e.field || void 0
|
|
2898
|
-
}), this.updateKey(),
|
|
2900
|
+
}), this.updateKey(), oi(this), this.update(t, !0);
|
|
2899
2901
|
}
|
|
2900
|
-
C(
|
|
2902
|
+
C(Ht.prototype, {
|
|
2901
2903
|
getParentGroup() {
|
|
2902
2904
|
let t = this.parent;
|
|
2903
2905
|
for (; t; ) {
|
|
@@ -2967,7 +2969,7 @@ C(Gt.prototype, {
|
|
|
2967
2969
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2968
2970
|
},
|
|
2969
2971
|
updateKey(t) {
|
|
2970
|
-
this.key =
|
|
2972
|
+
this.key = Ve(), t && this.parent && this.parent.updateKey(t);
|
|
2971
2973
|
},
|
|
2972
2974
|
updateType() {
|
|
2973
2975
|
this.originType = this.rule.type, this.type = q(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -2978,7 +2980,7 @@ C(Gt.prototype, {
|
|
|
2978
2980
|
initProp() {
|
|
2979
2981
|
var e, r;
|
|
2980
2982
|
const t = v({}, this.rule);
|
|
2981
|
-
delete t.children, delete t.validate, this.prop =
|
|
2983
|
+
delete t.children, delete t.validate, this.prop = x({}, [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 || []];
|
|
2982
2984
|
},
|
|
2983
2985
|
initNone() {
|
|
2984
2986
|
this.none = !(h.Undef(this.prop.display) || this.prop.display);
|
|
@@ -3044,7 +3046,7 @@ C(Gt.prototype, {
|
|
|
3044
3046
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3045
3047
|
}
|
|
3046
3048
|
});
|
|
3047
|
-
function
|
|
3049
|
+
function ai(t) {
|
|
3048
3050
|
C(t.prototype, {
|
|
3049
3051
|
nextRefresh(e) {
|
|
3050
3052
|
const r = this.loadedId;
|
|
@@ -3053,10 +3055,10 @@ function oi(t) {
|
|
|
3053
3055
|
});
|
|
3054
3056
|
},
|
|
3055
3057
|
parseRule(e) {
|
|
3056
|
-
const r =
|
|
3058
|
+
const r = ht(e);
|
|
3057
3059
|
return Object.defineProperties(r, {
|
|
3058
|
-
__origin__:
|
|
3059
|
-
}),
|
|
3060
|
+
__origin__: Ze(e, !0)
|
|
3061
|
+
}), li(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3060
3062
|
i && this.loadFn(i, r);
|
|
3061
3063
|
}), this.loadCtrl(r), r.update && (r.update = W(r.update)), r;
|
|
3062
3064
|
},
|
|
@@ -3072,7 +3074,7 @@ function oi(t) {
|
|
|
3072
3074
|
},
|
|
3073
3075
|
syncProp(e) {
|
|
3074
3076
|
const r = e.rule;
|
|
3075
|
-
h.trueArray(r.sync) &&
|
|
3077
|
+
h.trueArray(r.sync) && Y([{
|
|
3076
3078
|
on: r.sync.reduce((i, s) => (i[typeof s == "object" && s.event || `update:${s}`] = (n) => {
|
|
3077
3079
|
r.props[typeof s == "object" && s.prop || s] = n, this.vm.$emit("sync", s, n, r, this.fapi);
|
|
3078
3080
|
}, i), {})
|
|
@@ -3103,30 +3105,30 @@ function oi(t) {
|
|
|
3103
3105
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3104
3106
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3105
3107
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3106
|
-
let l =
|
|
3108
|
+
let l = ht(o);
|
|
3107
3109
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3108
3110
|
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);
|
|
3109
3111
|
let f, d = !1, g = !!o.__fc__, m = l.value;
|
|
3110
3112
|
if (g) {
|
|
3111
3113
|
if (f = o.__fc__, m = f.defaultValue, f.deleted) {
|
|
3112
|
-
if (
|
|
3114
|
+
if (bt(f))
|
|
3113
3115
|
return;
|
|
3114
3116
|
f.update(this);
|
|
3115
3117
|
} else if (!f.check(this)) {
|
|
3116
|
-
if (
|
|
3118
|
+
if (bt(f))
|
|
3117
3119
|
return;
|
|
3118
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3120
|
+
e[a] = o = o._clone ? o._clone() : Pt(ve(o)), f = null, d = !0;
|
|
3119
3121
|
}
|
|
3120
3122
|
}
|
|
3121
3123
|
if (f)
|
|
3122
3124
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3123
3125
|
else {
|
|
3124
3126
|
const D = this.parseRule(o);
|
|
3125
|
-
f = new
|
|
3127
|
+
f = new Ht(this, D, m), this.bindParser(f);
|
|
3126
3128
|
}
|
|
3127
3129
|
[!1, !0].forEach((D) => this.parseEmit(f, D)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !g && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3128
|
-
const
|
|
3129
|
-
if (f.parser.loadChildren === !1 || s(
|
|
3130
|
+
const y = f.loadChildrenPending();
|
|
3131
|
+
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3130
3132
|
const D = i(a);
|
|
3131
3133
|
D > -1 || !a ? this.sort.splice(D + 1, 0, f.id) : this.sort.push(f.id);
|
|
3132
3134
|
}
|
|
@@ -3141,7 +3143,7 @@ function oi(t) {
|
|
|
3141
3143
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3142
3144
|
},
|
|
3143
3145
|
useCtrl(e) {
|
|
3144
|
-
const r =
|
|
3146
|
+
const r = ui(e), i = [], s = this.api;
|
|
3145
3147
|
if (!r.length) return !1;
|
|
3146
3148
|
for (let a = 0; a < r.length; a++) {
|
|
3147
3149
|
const l = r[a], u = l.handle || function(d) {
|
|
@@ -3150,7 +3152,7 @@ function oi(t) {
|
|
|
3150
3152
|
if (!h.trueArray(l.rule)) continue;
|
|
3151
3153
|
const f = U(v({}, l), {
|
|
3152
3154
|
valid: O(() => u(e.rule.value, s)),
|
|
3153
|
-
ctrl:
|
|
3155
|
+
ctrl: fi(e, l.rule),
|
|
3154
3156
|
isHidden: h.String(l.rule[0])
|
|
3155
3157
|
});
|
|
3156
3158
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3159,16 +3161,16 @@ function oi(t) {
|
|
|
3159
3161
|
const n = [];
|
|
3160
3162
|
let o = !1;
|
|
3161
3163
|
return this.deferSyncValue(() => {
|
|
3162
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method:
|
|
3164
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method: y }) => {
|
|
3163
3165
|
if (a) {
|
|
3164
3166
|
l ? e.ctrlRule.push({
|
|
3165
3167
|
__ctrl: !0,
|
|
3166
3168
|
children: u,
|
|
3167
3169
|
valid: l
|
|
3168
3170
|
}) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3169
|
-
|
|
3171
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((_) => {
|
|
3170
3172
|
this.api.setEffect(_, "required", l);
|
|
3171
|
-
}), l || this.api.clearValidateState(u)) :
|
|
3173
|
+
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3172
3174
|
});
|
|
3173
3175
|
return;
|
|
3174
3176
|
}
|
|
@@ -3213,27 +3215,27 @@ function oi(t) {
|
|
|
3213
3215
|
}
|
|
3214
3216
|
});
|
|
3215
3217
|
}
|
|
3216
|
-
function
|
|
3217
|
-
const e =
|
|
3218
|
+
function li(t) {
|
|
3219
|
+
const e = Nt();
|
|
3218
3220
|
return Object.keys(e).forEach((r) => {
|
|
3219
3221
|
E(t, r) || S(t, r, e[r]);
|
|
3220
3222
|
}), t;
|
|
3221
3223
|
}
|
|
3222
|
-
function
|
|
3224
|
+
function ui(t) {
|
|
3223
3225
|
const e = t.rule.control || [];
|
|
3224
3226
|
return h.Object(e) ? [e] : e;
|
|
3225
3227
|
}
|
|
3226
|
-
function
|
|
3228
|
+
function fi(t, e) {
|
|
3227
3229
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3228
3230
|
const i = t.ctrlRule[r];
|
|
3229
3231
|
if (i.children === e)
|
|
3230
3232
|
return i;
|
|
3231
3233
|
}
|
|
3232
3234
|
}
|
|
3233
|
-
function
|
|
3235
|
+
function bt(t) {
|
|
3234
3236
|
return !!t.rule.__ctrl;
|
|
3235
3237
|
}
|
|
3236
|
-
function
|
|
3238
|
+
function ci(t) {
|
|
3237
3239
|
C(t.prototype, {
|
|
3238
3240
|
setValue(e, r, i, s) {
|
|
3239
3241
|
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, {
|
|
@@ -3277,9 +3279,9 @@ function fi(t) {
|
|
|
3277
3279
|
},
|
|
3278
3280
|
syncForm() {
|
|
3279
3281
|
const e = {}, r = this.fields(), i = [];
|
|
3280
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] =
|
|
3282
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = je(this.appendData, n)), s), e), r.reduce((s, n) => {
|
|
3281
3283
|
const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
|
|
3282
|
-
return this.isIgnore(o.rule) && i.push(n), s[n] =
|
|
3284
|
+
return this.isIgnore(o.rule) && i.push(n), s[n] = je(o.rule, "value"), s;
|
|
3283
3285
|
}, e), this.form = ie(e), this.ignoreFields = i, this.syncValue();
|
|
3284
3286
|
},
|
|
3285
3287
|
isIgnore(e) {
|
|
@@ -3303,7 +3305,7 @@ function fi(t) {
|
|
|
3303
3305
|
}), this.vm.updateValue(e);
|
|
3304
3306
|
},
|
|
3305
3307
|
isChange(e, r) {
|
|
3306
|
-
return JSON.stringify(this.getFormData(e),
|
|
3308
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3307
3309
|
},
|
|
3308
3310
|
isQuote(e, r) {
|
|
3309
3311
|
return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -3336,10 +3338,10 @@ function fi(t) {
|
|
|
3336
3338
|
}
|
|
3337
3339
|
});
|
|
3338
3340
|
}
|
|
3339
|
-
function
|
|
3341
|
+
function vt(t, e) {
|
|
3340
3342
|
return typeof e == "function" ? "" + e : e;
|
|
3341
3343
|
}
|
|
3342
|
-
const
|
|
3344
|
+
const De = {
|
|
3343
3345
|
init(t) {
|
|
3344
3346
|
},
|
|
3345
3347
|
toFormValue(t, e) {
|
|
@@ -3358,8 +3360,8 @@ const Ee = {
|
|
|
3358
3360
|
},
|
|
3359
3361
|
mergeProp(t) {
|
|
3360
3362
|
}
|
|
3361
|
-
},
|
|
3362
|
-
function
|
|
3363
|
+
}, hi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], ke = Symbol("oldValue");
|
|
3364
|
+
function di(t) {
|
|
3363
3365
|
C(t.prototype, {
|
|
3364
3366
|
getCtx(e) {
|
|
3365
3367
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3394,7 +3396,7 @@ function hi(t) {
|
|
|
3394
3396
|
if (n)
|
|
3395
3397
|
return n;
|
|
3396
3398
|
}
|
|
3397
|
-
return r[e.originType] || r[q(e.type)] || r[e.trueType] ||
|
|
3399
|
+
return r[e.originType] || r[q(e.type)] || r[e.trueType] || De;
|
|
3398
3400
|
},
|
|
3399
3401
|
bindParser(e) {
|
|
3400
3402
|
e.setParser(this.getParser(e));
|
|
@@ -3407,8 +3409,8 @@ function hi(t) {
|
|
|
3407
3409
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3408
3410
|
},
|
|
3409
3411
|
watchCtx(e) {
|
|
3410
|
-
if (
|
|
3411
|
-
const s =
|
|
3412
|
+
if (At().filter((i) => i[0] !== "_" && i[0] !== "$" && hi.indexOf(i) === -1).forEach((i) => {
|
|
3413
|
+
const s = je(e.rule, i), n = i === "children";
|
|
3412
3414
|
e.refRule[i] = s, e.watch.push(B(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3413
3415
|
let l = s.value;
|
|
3414
3416
|
if (!this.isBreakWatch()) {
|
|
@@ -3475,7 +3477,7 @@ function hi(t) {
|
|
|
3475
3477
|
return n;
|
|
3476
3478
|
});
|
|
3477
3479
|
}), e.input) {
|
|
3478
|
-
const i =
|
|
3480
|
+
const i = je(e.rule, "value");
|
|
3479
3481
|
e.watch.push(B(() => i.value, () => {
|
|
3480
3482
|
let s = e.parser.toFormValue(i.value, e);
|
|
3481
3483
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
@@ -3484,20 +3486,19 @@ function hi(t) {
|
|
|
3484
3486
|
this.bus.$once("load-end", () => {
|
|
3485
3487
|
let i = e.rule.computed;
|
|
3486
3488
|
i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : se(e.rule, s, l);
|
|
3489
|
+
const n = ge(() => {
|
|
3490
|
+
const a = i[s];
|
|
3491
|
+
if (!a) return;
|
|
3492
|
+
const l = this.compute(e, a);
|
|
3493
|
+
return a.linkage && l === ke ? ke : l;
|
|
3494
|
+
}), o = (a) => {
|
|
3495
|
+
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : se(e.rule, s, a);
|
|
3495
3496
|
};
|
|
3496
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 :
|
|
3497
|
-
|
|
3498
|
-
a
|
|
3497
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== L(e.rule, s)) && o(n.value), e.watch.push(B(n, (a, l) => {
|
|
3498
|
+
a === ke || a === l || setTimeout(() => {
|
|
3499
|
+
o(a);
|
|
3499
3500
|
});
|
|
3500
|
-
}));
|
|
3501
|
+
}, { deep: !0 }));
|
|
3501
3502
|
}));
|
|
3502
3503
|
}), this.watchEffect(e);
|
|
3503
3504
|
},
|
|
@@ -3511,7 +3512,7 @@ function hi(t) {
|
|
|
3511
3512
|
}))) === !1)
|
|
3512
3513
|
n();
|
|
3513
3514
|
else {
|
|
3514
|
-
const a = this.validator(s, e);
|
|
3515
|
+
const a = this.validator(r, s, e);
|
|
3515
3516
|
if (a) {
|
|
3516
3517
|
let l = "";
|
|
3517
3518
|
typeof e.error == "object" && (l = e.error[a] || e.error.default), !l && typeof e.message == "string" && (l = e.message), l || (l = this.getValidateMessage(r, { key: a, rule: e[a] })), n(l);
|
|
@@ -3536,36 +3537,36 @@ function hi(t) {
|
|
|
3536
3537
|
title: (n = (s = e.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value
|
|
3537
3538
|
});
|
|
3538
3539
|
},
|
|
3539
|
-
validator(e, r) {
|
|
3540
|
-
if (h.empty(
|
|
3541
|
-
return
|
|
3542
|
-
for (const [
|
|
3543
|
-
switch (
|
|
3540
|
+
validator(e, r, i) {
|
|
3541
|
+
if (h.empty(r))
|
|
3542
|
+
return i.required ? "required" : void 0;
|
|
3543
|
+
for (const [n, o] of Object.entries(i))
|
|
3544
|
+
switch (n) {
|
|
3544
3545
|
case "len":
|
|
3545
3546
|
case "maxLen":
|
|
3546
3547
|
case "minLen":
|
|
3547
|
-
const
|
|
3548
|
-
if (Array.isArray(
|
|
3549
|
-
if (!
|
|
3550
|
-
return
|
|
3548
|
+
const a = (y) => n === "len" ? y === o : n === "maxLen" ? y <= o : y >= o;
|
|
3549
|
+
if (Array.isArray(r)) {
|
|
3550
|
+
if (!a(r.length))
|
|
3551
|
+
return n;
|
|
3551
3552
|
} else {
|
|
3552
|
-
if (typeof
|
|
3553
|
-
return
|
|
3554
|
-
if (!
|
|
3555
|
-
return
|
|
3553
|
+
if (typeof r == "object")
|
|
3554
|
+
return n;
|
|
3555
|
+
if (!a(("" + r).length))
|
|
3556
|
+
return n;
|
|
3556
3557
|
}
|
|
3557
3558
|
break;
|
|
3558
3559
|
case "pattern":
|
|
3559
|
-
if (!(typeof
|
|
3560
|
-
return
|
|
3560
|
+
if (!(typeof o == "string" ? new RegExp(o) : o).test("" + r))
|
|
3561
|
+
return n;
|
|
3561
3562
|
break;
|
|
3562
3563
|
case "uppercase":
|
|
3563
|
-
if (
|
|
3564
|
-
return
|
|
3564
|
+
if (o && (typeof r != "string" || !/^[A-Z]*$/.test(r)))
|
|
3565
|
+
return n;
|
|
3565
3566
|
break;
|
|
3566
3567
|
case "lowercase":
|
|
3567
|
-
if (
|
|
3568
|
-
return
|
|
3568
|
+
if (o && (typeof r != "string" || !/^[a-z]*$/.test(r)))
|
|
3569
|
+
return n;
|
|
3569
3570
|
break;
|
|
3570
3571
|
case "min":
|
|
3571
3572
|
case "max":
|
|
@@ -3573,40 +3574,44 @@ function hi(t) {
|
|
|
3573
3574
|
case "negative":
|
|
3574
3575
|
case "integer":
|
|
3575
3576
|
case "number":
|
|
3576
|
-
const
|
|
3577
|
-
if (Number.isNaN(
|
|
3578
|
-
return
|
|
3577
|
+
const u = Number(r);
|
|
3578
|
+
if (Number.isNaN(u) || n === "min" && u < o || n === "max" && u > o || n === "positive" && u <= 0 || n === "negative" && u >= 0 || n === "integer" && !Number.isInteger(u))
|
|
3579
|
+
return n;
|
|
3579
3580
|
break;
|
|
3580
3581
|
case "equal":
|
|
3581
|
-
if (
|
|
3582
|
-
return
|
|
3582
|
+
if (r !== o)
|
|
3583
|
+
return n;
|
|
3583
3584
|
break;
|
|
3584
3585
|
case "enum":
|
|
3585
|
-
if (Array.isArray(
|
|
3586
|
-
return
|
|
3586
|
+
if (Array.isArray(o) && !o.includes(r))
|
|
3587
|
+
return n;
|
|
3587
3588
|
break;
|
|
3588
3589
|
case "hasKeys":
|
|
3589
|
-
if (typeof
|
|
3590
|
-
return
|
|
3590
|
+
if (typeof r != "object" || Array.isArray(o) && o.some((y) => !(y in r)))
|
|
3591
|
+
return n;
|
|
3591
3592
|
break;
|
|
3592
3593
|
case "email":
|
|
3593
|
-
if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" +
|
|
3594
|
-
return
|
|
3594
|
+
if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" + r))
|
|
3595
|
+
return n;
|
|
3595
3596
|
break;
|
|
3596
3597
|
case "url":
|
|
3597
3598
|
if (!new RegExp(
|
|
3598
3599
|
"^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
|
|
3599
3600
|
"i"
|
|
3600
|
-
).test("" +
|
|
3601
|
-
return
|
|
3601
|
+
).test("" + r))
|
|
3602
|
+
return n;
|
|
3602
3603
|
break;
|
|
3603
3604
|
case "ip":
|
|
3604
|
-
if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" +
|
|
3605
|
-
return
|
|
3605
|
+
if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" + r))
|
|
3606
|
+
return n;
|
|
3606
3607
|
break;
|
|
3607
3608
|
case "phone":
|
|
3608
|
-
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" +
|
|
3609
|
-
return
|
|
3609
|
+
if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" + r))
|
|
3610
|
+
return n;
|
|
3611
|
+
break;
|
|
3612
|
+
case "computed":
|
|
3613
|
+
if (!this.compute(e, o))
|
|
3614
|
+
return n;
|
|
3610
3615
|
break;
|
|
3611
3616
|
}
|
|
3612
3617
|
},
|
|
@@ -3624,18 +3629,18 @@ function hi(t) {
|
|
|
3624
3629
|
if (d.variable)
|
|
3625
3630
|
m = JSON.stringify(this.fc.getLoadData(d.variable) || "");
|
|
3626
3631
|
else if (d.field)
|
|
3627
|
-
m =
|
|
3632
|
+
m = pt(d.field || "");
|
|
3628
3633
|
else if (!d.mode)
|
|
3629
3634
|
return !0;
|
|
3630
|
-
let
|
|
3631
|
-
if (
|
|
3635
|
+
let y = d.compare;
|
|
3636
|
+
if (y && (y = pt(y || "")), d.mode ? g = n(d) : fe[d.condition] ? h.Function(d.handler) ? g = O(() => d.handler(this.api, e.rule)) : g = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${m}, ${y || "$val"}); }}}}`).call(this.api.form, fe, d.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : g = !1, l && g)
|
|
3632
3637
|
return !0;
|
|
3633
3638
|
l || (u = u && g);
|
|
3634
3639
|
}
|
|
3635
3640
|
return l ? !1 : u;
|
|
3636
3641
|
};
|
|
3637
3642
|
let o = n(r);
|
|
3638
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) :
|
|
3643
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : ke : o;
|
|
3639
3644
|
} else if (h.Function(r))
|
|
3640
3645
|
i = () => r(this.api.form, this.api);
|
|
3641
3646
|
else {
|
|
@@ -3686,7 +3691,7 @@ function hi(t) {
|
|
|
3686
3691
|
}
|
|
3687
3692
|
});
|
|
3688
3693
|
}
|
|
3689
|
-
function
|
|
3694
|
+
function pi(t) {
|
|
3690
3695
|
C(t.prototype, {
|
|
3691
3696
|
mounted() {
|
|
3692
3697
|
const e = () => {
|
|
@@ -3714,13 +3719,13 @@ function di(t) {
|
|
|
3714
3719
|
}
|
|
3715
3720
|
});
|
|
3716
3721
|
}
|
|
3717
|
-
function
|
|
3722
|
+
function mi(t) {
|
|
3718
3723
|
C(t.prototype, {
|
|
3719
3724
|
useProvider() {
|
|
3720
3725
|
const e = this.fc.providers;
|
|
3721
3726
|
Object.keys(e).forEach((r) => {
|
|
3722
3727
|
let i = e[r];
|
|
3723
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3728
|
+
h.Function(i) && (i = i(this.fc)), i._c = yi(i), this.onEffect(i), this.providers[r] = i;
|
|
3724
3729
|
});
|
|
3725
3730
|
},
|
|
3726
3731
|
onEffect(e) {
|
|
@@ -3785,25 +3790,25 @@ function pi(t) {
|
|
|
3785
3790
|
else
|
|
3786
3791
|
return;
|
|
3787
3792
|
const g = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3788
|
-
e && (g.getProp = () => e.effectData(u), g.clearProp = () => e.clearEffectData(u), g.mergeProp = (m) =>
|
|
3793
|
+
e && (g.getProp = () => e.effectData(u), g.clearProp = () => e.clearEffectData(u), g.mergeProp = (m) => x(g.getProp(), [m]), g.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [g, r, this.api]);
|
|
3789
3794
|
});
|
|
3790
3795
|
}
|
|
3791
3796
|
});
|
|
3792
3797
|
}
|
|
3793
|
-
function
|
|
3798
|
+
function gi(t) {
|
|
3794
3799
|
return t.filter(function(e, r, i) {
|
|
3795
3800
|
return i.indexOf(e, 0) === r;
|
|
3796
3801
|
});
|
|
3797
3802
|
}
|
|
3798
|
-
function
|
|
3803
|
+
function yi(t) {
|
|
3799
3804
|
const e = t.components;
|
|
3800
3805
|
if (Array.isArray(e)) {
|
|
3801
|
-
const r =
|
|
3806
|
+
const r = gi(e.filter((i) => i !== "*"));
|
|
3802
3807
|
return r.length ? r : !1;
|
|
3803
3808
|
} else return h.String(e) ? [e] : !1;
|
|
3804
3809
|
}
|
|
3805
3810
|
function K(t) {
|
|
3806
|
-
|
|
3811
|
+
Tt(this, {
|
|
3807
3812
|
options() {
|
|
3808
3813
|
return t.options.value || {};
|
|
3809
3814
|
},
|
|
@@ -3837,10 +3842,10 @@ function K(t) {
|
|
|
3837
3842
|
nextReload: () => {
|
|
3838
3843
|
this.lifecycle("reload");
|
|
3839
3844
|
}
|
|
3840
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3845
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3841
3846
|
const i = O(() => r(e, this));
|
|
3842
3847
|
return i && i !== e && C(e, i), e;
|
|
3843
|
-
},
|
|
3848
|
+
}, Yr(this));
|
|
3844
3849
|
}
|
|
3845
3850
|
C(K.prototype, {
|
|
3846
3851
|
initData(t) {
|
|
@@ -3880,26 +3885,26 @@ C(K.prototype, {
|
|
|
3880
3885
|
});
|
|
3881
3886
|
}
|
|
3882
3887
|
});
|
|
3883
|
-
ti(K);
|
|
3884
3888
|
ri(K);
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
+
ii(K);
|
|
3890
|
+
si(K);
|
|
3891
|
+
ai(K);
|
|
3892
|
+
ci(K);
|
|
3889
3893
|
di(K);
|
|
3890
3894
|
pi(K);
|
|
3891
|
-
|
|
3892
|
-
|
|
3895
|
+
mi(K);
|
|
3896
|
+
const $i = "fcFragment", Me = {
|
|
3897
|
+
name: $i,
|
|
3893
3898
|
functional: !0,
|
|
3894
3899
|
props: ["vnode"],
|
|
3895
3900
|
render(t, e) {
|
|
3896
3901
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3897
3902
|
}
|
|
3898
3903
|
};
|
|
3899
|
-
function
|
|
3904
|
+
function bi(t) {
|
|
3900
3905
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3901
3906
|
}
|
|
3902
|
-
function
|
|
3907
|
+
function vi() {
|
|
3903
3908
|
const t = {};
|
|
3904
3909
|
function e(r) {
|
|
3905
3910
|
r && this.setVm(r);
|
|
@@ -3914,7 +3919,7 @@ function bi() {
|
|
|
3914
3919
|
},
|
|
3915
3920
|
makeComponent(r, i, s) {
|
|
3916
3921
|
var o;
|
|
3917
|
-
let n = this.$h(r,
|
|
3922
|
+
let n = this.$h(r, bi(i), s || []);
|
|
3918
3923
|
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3919
3924
|
const a = Object.keys(n.componentOptions.propsData);
|
|
3920
3925
|
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
@@ -3931,7 +3936,7 @@ function bi() {
|
|
|
3931
3936
|
},
|
|
3932
3937
|
use(r) {
|
|
3933
3938
|
Object.keys(r).forEach((i) => {
|
|
3934
|
-
const s = $e(i), n =
|
|
3939
|
+
const s = $e(i), n = Gr(i).toLocaleLowerCase(), o = r[i];
|
|
3935
3940
|
[i, s, n].forEach((a) => {
|
|
3936
3941
|
e.alias(i, o), e.prototype[a] = function(l, u) {
|
|
3937
3942
|
return this.make(o, l, u);
|
|
@@ -3941,12 +3946,12 @@ function bi() {
|
|
|
3941
3946
|
}
|
|
3942
3947
|
}), e;
|
|
3943
3948
|
}
|
|
3944
|
-
function
|
|
3945
|
-
class e extends
|
|
3949
|
+
function _i(t) {
|
|
3950
|
+
class e extends zt {
|
|
3946
3951
|
}
|
|
3947
3952
|
return Object.assign(e.prototype, t), e;
|
|
3948
3953
|
}
|
|
3949
|
-
function
|
|
3954
|
+
function zt(t) {
|
|
3950
3955
|
C(this, {
|
|
3951
3956
|
$handle: t,
|
|
3952
3957
|
vm: t.vm,
|
|
@@ -3957,12 +3962,12 @@ function Ht(t) {
|
|
|
3957
3962
|
}
|
|
3958
3963
|
}), this.updateKey(), this.init();
|
|
3959
3964
|
}
|
|
3960
|
-
C(
|
|
3965
|
+
C(zt.prototype, {
|
|
3961
3966
|
__init() {
|
|
3962
3967
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
3963
3968
|
},
|
|
3964
3969
|
updateKey() {
|
|
3965
|
-
this.key =
|
|
3970
|
+
this.key = Ve();
|
|
3966
3971
|
},
|
|
3967
3972
|
//TODO interface
|
|
3968
3973
|
init() {
|
|
@@ -3987,7 +3992,7 @@ C(Ht.prototype, {
|
|
|
3987
3992
|
return e(this.vm);
|
|
3988
3993
|
},
|
|
3989
3994
|
mergeOptions(t, e) {
|
|
3990
|
-
return
|
|
3995
|
+
return Y(t.map((r) => this.tidyOptions(r)), e, this.mergeOptionsRule);
|
|
3991
3996
|
},
|
|
3992
3997
|
updateOptions(t) {
|
|
3993
3998
|
this.$handle.fc.targetFormDriver("updateOptions", t, { handle: this.$handle, api: this.$handle.api }), this.options = this.mergeOptions([t], this.getDefaultOptions()), this.update();
|
|
@@ -4005,7 +4010,7 @@ C(Ht.prototype, {
|
|
|
4005
4010
|
render(t) {
|
|
4006
4011
|
}
|
|
4007
4012
|
});
|
|
4008
|
-
const
|
|
4013
|
+
const Ci = function(t) {
|
|
4009
4014
|
const e = {
|
|
4010
4015
|
name: "loadData",
|
|
4011
4016
|
_fn: [],
|
|
@@ -4017,9 +4022,11 @@ const _i = function(t) {
|
|
|
4017
4022
|
if (a && (a.attr || a.template)) {
|
|
4018
4023
|
let l = (d) => {
|
|
4019
4024
|
let g;
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
a.
|
|
4025
|
+
i && i.__fc__ && (g = i.__fc__.getParentGroup());
|
|
4026
|
+
let m;
|
|
4027
|
+
a.template ? m = t.$handle.loadStrVar(a.template, d, g ? { rule: i, value: t.$handle.subRuleData[g.id] || {} } : null) : a.handler && h.Function(a.handler) ? m = a.handler(d, i, s) : m = t.$handle.loadStrVar(`{{${a.attr}}}`, d, g ? { rule: i, value: t.$handle.subRuleData[g.id] || {} } : null), (m == null || m === "") && a.default != null && (m = a.default), a.copy !== !1 && (m = G(m));
|
|
4028
|
+
const y = a.modify ? i : r.getProp();
|
|
4029
|
+
a.to === "child" ? y.children ? S(y.children, 0, m) : S(y, "children", [m]) : se(y, a.to || "options", m), s.sync(i);
|
|
4023
4030
|
}, u = (d) => l(d);
|
|
4024
4031
|
const f = t.watchLoadData(u);
|
|
4025
4032
|
l = ne(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4034,7 +4041,7 @@ const _i = function(t) {
|
|
|
4034
4041
|
}
|
|
4035
4042
|
};
|
|
4036
4043
|
return e.watch = e.loaded, e;
|
|
4037
|
-
},
|
|
4044
|
+
}, wi = function(t) {
|
|
4038
4045
|
const e = {
|
|
4039
4046
|
name: "t",
|
|
4040
4047
|
_fn: [],
|
|
@@ -4047,9 +4054,9 @@ const _i = function(t) {
|
|
|
4047
4054
|
if (l) {
|
|
4048
4055
|
const u = typeof l == "object";
|
|
4049
4056
|
let f = (m) => {
|
|
4050
|
-
let
|
|
4057
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, m);
|
|
4051
4058
|
const _ = u && l.modify ? i : r.getProp();
|
|
4052
|
-
a === "child" ? _.children ? S(_.children, 0,
|
|
4059
|
+
a === "child" ? _.children ? S(_.children, 0, y) : S(_, "children", [y]) : se(_, a, y), s.sync(i);
|
|
4053
4060
|
}, d = (m) => f(m);
|
|
4054
4061
|
const g = t.watchLoadData(d);
|
|
4055
4062
|
f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(g) : g();
|
|
@@ -4063,7 +4070,7 @@ const _i = function(t) {
|
|
|
4063
4070
|
}
|
|
4064
4071
|
};
|
|
4065
4072
|
return e.watch = e.loaded, e;
|
|
4066
|
-
},
|
|
4073
|
+
}, Jt = {
|
|
4067
4074
|
name: "componentValidate",
|
|
4068
4075
|
load(t, e, r) {
|
|
4069
4076
|
let i = t.getValue();
|
|
@@ -4086,9 +4093,9 @@ const _i = function(t) {
|
|
|
4086
4093
|
}
|
|
4087
4094
|
},
|
|
4088
4095
|
watch(...t) {
|
|
4089
|
-
|
|
4096
|
+
Jt.load(...t);
|
|
4090
4097
|
}
|
|
4091
|
-
},
|
|
4098
|
+
}, Oi = function(t) {
|
|
4092
4099
|
function e(s) {
|
|
4093
4100
|
return h.String(s) && (s = {
|
|
4094
4101
|
action: s,
|
|
@@ -4124,7 +4131,7 @@ const _i = function(t) {
|
|
|
4124
4131
|
i._fn[s.id] = t.watchLoadData(ne((d, g) => {
|
|
4125
4132
|
if (g && a.watch === !1)
|
|
4126
4133
|
return i._fn[s.id]();
|
|
4127
|
-
const m = t.$handle.loadFetchVar(G(a), d, n),
|
|
4134
|
+
const m = t.$handle.loadFetchVar(G(a), d, n), y = U(v({
|
|
4128
4135
|
headers: {}
|
|
4129
4136
|
}, m), {
|
|
4130
4137
|
onSuccess(_, D) {
|
|
@@ -4134,19 +4141,19 @@ const _i = function(t) {
|
|
|
4134
4141
|
h.Function(P) ? ee = P : P && h.String(P) && (ee = (T) => L(T, P)), l(ee(_, n, o));
|
|
4135
4142
|
},
|
|
4136
4143
|
onError(_) {
|
|
4137
|
-
l(void 0), !f() && (u || ((D) =>
|
|
4144
|
+
l(void 0), !f() && (u || ((D) => tt(D.message || "fetch fail " + m.action)))(_, n, o);
|
|
4138
4145
|
}
|
|
4139
4146
|
});
|
|
4140
|
-
t.$handle.beforeFetch(
|
|
4147
|
+
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4141
4148
|
if (h.Function(m.action)) {
|
|
4142
4149
|
m.action(n, o).then((_) => {
|
|
4143
|
-
|
|
4150
|
+
y.onSuccess(_, !0);
|
|
4144
4151
|
}).catch((_) => {
|
|
4145
|
-
|
|
4152
|
+
y.onError(_);
|
|
4146
4153
|
});
|
|
4147
4154
|
return;
|
|
4148
4155
|
}
|
|
4149
|
-
O(() => t.create.fetch(
|
|
4156
|
+
O(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
|
|
4150
4157
|
}).catch((_) => {
|
|
4151
4158
|
});
|
|
4152
4159
|
}, a.wait || 600));
|
|
@@ -4165,13 +4172,13 @@ const _i = function(t) {
|
|
|
4165
4172
|
}
|
|
4166
4173
|
};
|
|
4167
4174
|
return i;
|
|
4168
|
-
},
|
|
4169
|
-
fetch:
|
|
4170
|
-
loadData:
|
|
4171
|
-
t:
|
|
4172
|
-
componentValidate:
|
|
4175
|
+
}, Fi = {
|
|
4176
|
+
fetch: Oi,
|
|
4177
|
+
loadData: Ci,
|
|
4178
|
+
t: wi,
|
|
4179
|
+
componentValidate: Jt
|
|
4173
4180
|
};
|
|
4174
|
-
function
|
|
4181
|
+
function Si(t) {
|
|
4175
4182
|
t = t || /* @__PURE__ */ new Map();
|
|
4176
4183
|
const e = {
|
|
4177
4184
|
$on(r, i) {
|
|
@@ -4195,8 +4202,8 @@ function Fi(t) {
|
|
|
4195
4202
|
};
|
|
4196
4203
|
return e;
|
|
4197
4204
|
}
|
|
4198
|
-
const
|
|
4199
|
-
name:
|
|
4205
|
+
const ki = "html", Ri = {
|
|
4206
|
+
name: ki,
|
|
4200
4207
|
loadChildren: !1,
|
|
4201
4208
|
render(t, e) {
|
|
4202
4209
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4205,7 +4212,7 @@ const Si = "html", ki = {
|
|
|
4205
4212
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4206
4213
|
}
|
|
4207
4214
|
};
|
|
4208
|
-
function
|
|
4215
|
+
function Ei(t) {
|
|
4209
4216
|
t = t + "=";
|
|
4210
4217
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4211
4218
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4223,7 +4230,7 @@ function Ri(t) {
|
|
|
4223
4230
|
}
|
|
4224
4231
|
return null;
|
|
4225
4232
|
}
|
|
4226
|
-
function
|
|
4233
|
+
function Di(t) {
|
|
4227
4234
|
const e = localStorage.getItem(t);
|
|
4228
4235
|
if (e)
|
|
4229
4236
|
try {
|
|
@@ -4233,7 +4240,7 @@ function Ei(t) {
|
|
|
4233
4240
|
}
|
|
4234
4241
|
return null;
|
|
4235
4242
|
}
|
|
4236
|
-
function
|
|
4243
|
+
function ji(t) {
|
|
4237
4244
|
const e = sessionStorage.getItem(t);
|
|
4238
4245
|
if (e)
|
|
4239
4246
|
try {
|
|
@@ -4243,23 +4250,23 @@ function Di(t) {
|
|
|
4243
4250
|
}
|
|
4244
4251
|
return null;
|
|
4245
4252
|
}
|
|
4246
|
-
function
|
|
4253
|
+
function nt(t, e) {
|
|
4247
4254
|
if (!e)
|
|
4248
4255
|
return null;
|
|
4249
4256
|
const r = e.split(".");
|
|
4250
4257
|
let i = t(r.shift());
|
|
4251
4258
|
return r.length ? i == null ? null : L(i, r) : i;
|
|
4252
4259
|
}
|
|
4253
|
-
function ji(t) {
|
|
4254
|
-
return it(Ri, t);
|
|
4255
|
-
}
|
|
4256
4260
|
function Ii(t) {
|
|
4257
|
-
return
|
|
4261
|
+
return nt(Ei, t);
|
|
4258
4262
|
}
|
|
4259
4263
|
function Ai(t) {
|
|
4260
|
-
return
|
|
4264
|
+
return nt(Di, t);
|
|
4265
|
+
}
|
|
4266
|
+
function Vi(t) {
|
|
4267
|
+
return nt(ji, t);
|
|
4261
4268
|
}
|
|
4262
|
-
const
|
|
4269
|
+
const Pi = {
|
|
4263
4270
|
en: {
|
|
4264
4271
|
required: "{title} is required",
|
|
4265
4272
|
validate: {
|
|
@@ -4309,17 +4316,17 @@ const Vi = {
|
|
|
4309
4316
|
}
|
|
4310
4317
|
}
|
|
4311
4318
|
};
|
|
4312
|
-
function
|
|
4319
|
+
function Li(t, e) {
|
|
4313
4320
|
let r;
|
|
4314
4321
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4315
4322
|
}
|
|
4316
|
-
function
|
|
4317
|
-
return
|
|
4323
|
+
function Ue() {
|
|
4324
|
+
return Li("name", ...arguments);
|
|
4318
4325
|
}
|
|
4319
|
-
function
|
|
4326
|
+
function Bi(t) {
|
|
4320
4327
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4321
4328
|
}
|
|
4322
|
-
function
|
|
4329
|
+
function Ti(t, e) {
|
|
4323
4330
|
const r = new Vue({
|
|
4324
4331
|
data() {
|
|
4325
4332
|
return { rule: t, option: e || {} };
|
|
@@ -4330,27 +4337,27 @@ function Bi(t, e) {
|
|
|
4330
4337
|
});
|
|
4331
4338
|
return r.$mount(), r;
|
|
4332
4339
|
}
|
|
4333
|
-
function
|
|
4340
|
+
function Ni(t) {
|
|
4334
4341
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4335
|
-
|
|
4342
|
+
It.push(...e), xe.push(...r), et.push(...i), Mt([...e, ...r, ...i]);
|
|
4336
4343
|
}
|
|
4337
|
-
let
|
|
4338
|
-
const M = {},
|
|
4339
|
-
function
|
|
4344
|
+
let Mi = 1;
|
|
4345
|
+
const M = {}, Re = Symbol("defValue");
|
|
4346
|
+
function Wt(t) {
|
|
4340
4347
|
const e = {
|
|
4341
|
-
[
|
|
4348
|
+
[Me.name]: Me
|
|
4342
4349
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4343
4350
|
t.extendApi
|
|
4344
|
-
], u = v({},
|
|
4351
|
+
], u = v({}, Fi), f = Zr();
|
|
4345
4352
|
let d = { global: {} };
|
|
4346
4353
|
const g = t.isMobile === !0, m = ie({
|
|
4347
4354
|
$mobile: g
|
|
4348
|
-
}),
|
|
4349
|
-
|
|
4355
|
+
}), y = vi(), _ = {}, D = {};
|
|
4356
|
+
Ni(t.attrs || {});
|
|
4350
4357
|
function ee(c) {
|
|
4351
4358
|
const p = M[c];
|
|
4352
4359
|
if (Array.isArray(p))
|
|
4353
|
-
return p.map((
|
|
4360
|
+
return p.map(($) => $.api());
|
|
4354
4361
|
if (p)
|
|
4355
4362
|
return p.api();
|
|
4356
4363
|
}
|
|
@@ -4358,51 +4365,51 @@ function Jt(t) {
|
|
|
4358
4365
|
o.push(c);
|
|
4359
4366
|
}
|
|
4360
4367
|
function T() {
|
|
4361
|
-
const c =
|
|
4368
|
+
const c = Ue(...arguments);
|
|
4362
4369
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4363
4370
|
}
|
|
4364
4371
|
function ce() {
|
|
4365
|
-
const c =
|
|
4372
|
+
const c = Ue(...arguments);
|
|
4366
4373
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : U(v({}, c.prop), {
|
|
4367
4374
|
name: c.id
|
|
4368
4375
|
}));
|
|
4369
4376
|
}
|
|
4370
|
-
function
|
|
4371
|
-
|
|
4377
|
+
function Pe(c) {
|
|
4378
|
+
y.use(c);
|
|
4372
4379
|
}
|
|
4373
4380
|
function he() {
|
|
4374
|
-
const c =
|
|
4375
|
-
if (!c.id || !c.prop) return
|
|
4376
|
-
const p = q(c.id),
|
|
4377
|
-
r[p] = Se(
|
|
4381
|
+
const c = Ue(...arguments);
|
|
4382
|
+
if (!c.id || !c.prop) return De;
|
|
4383
|
+
const p = q(c.id), $ = c.prop, b = $.merge === !0 ? r[p] : void 0;
|
|
4384
|
+
r[p] = Se($, b || De), f[p] = V(p), $.maker && C(f, $.maker);
|
|
4378
4385
|
}
|
|
4379
4386
|
function F(c, p) {
|
|
4380
|
-
let
|
|
4387
|
+
let $;
|
|
4381
4388
|
if (h.String(c)) {
|
|
4382
|
-
if (
|
|
4383
|
-
return ["form-create", "formcreate"].indexOf(
|
|
4389
|
+
if ($ = c, p === void 0)
|
|
4390
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? k() : e[$];
|
|
4384
4391
|
} else
|
|
4385
|
-
|
|
4386
|
-
if (
|
|
4387
|
-
const b = q(
|
|
4388
|
-
e[
|
|
4392
|
+
$ = q(c.name), p = c;
|
|
4393
|
+
if (!$ || !p) return;
|
|
4394
|
+
const b = q($);
|
|
4395
|
+
e[$] = p, e[b] = p, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], p.formCreateParser && he($, p.formCreateParser);
|
|
4389
4396
|
}
|
|
4390
4397
|
function k() {
|
|
4391
|
-
return
|
|
4398
|
+
return Kr(Be, e, i);
|
|
4392
4399
|
}
|
|
4393
4400
|
function N() {
|
|
4394
|
-
return
|
|
4401
|
+
return Me;
|
|
4395
4402
|
}
|
|
4396
4403
|
function de(c, p) {
|
|
4397
4404
|
return h.Function(c.install) ? c.install(z, p) : h.Function(c) && c(z, p), this;
|
|
4398
4405
|
}
|
|
4399
|
-
function z(c, p,
|
|
4400
|
-
let b =
|
|
4406
|
+
function z(c, p, $) {
|
|
4407
|
+
let b = Ti(c, p || {});
|
|
4401
4408
|
const w = b.$refs.fc.formCreate;
|
|
4402
|
-
return w.$parent =
|
|
4409
|
+
return w.$parent = $, Bi(w.options).appendChild(b.$el), w.api();
|
|
4403
4410
|
}
|
|
4404
4411
|
Se(z, D);
|
|
4405
|
-
function
|
|
4412
|
+
function Xt(c) {
|
|
4406
4413
|
let p = v({}, t);
|
|
4407
4414
|
return c ? p.inherit = {
|
|
4408
4415
|
components: e,
|
|
@@ -4414,19 +4421,19 @@ function Jt(t) {
|
|
|
4414
4421
|
maker: f,
|
|
4415
4422
|
formulas: _,
|
|
4416
4423
|
loadData: m
|
|
4417
|
-
} : delete p.inherit,
|
|
4424
|
+
} : delete p.inherit, Wt(p);
|
|
4418
4425
|
}
|
|
4419
|
-
function
|
|
4426
|
+
function Zt(c, p) {
|
|
4420
4427
|
s[c] = p;
|
|
4421
4428
|
}
|
|
4422
|
-
function
|
|
4429
|
+
function Qt(c, p) {
|
|
4423
4430
|
_[c] = p;
|
|
4424
4431
|
}
|
|
4425
|
-
function
|
|
4426
|
-
const
|
|
4432
|
+
function Yt(c, p) {
|
|
4433
|
+
const $ = n[c] || {}, b = $.parsers || {};
|
|
4427
4434
|
p.parsers && Object.keys(p.parsers).forEach((w) => {
|
|
4428
|
-
b[w] = Se(p.parsers[w],
|
|
4429
|
-
}), p.name = c, n[c] = U(v(v({},
|
|
4435
|
+
b[w] = Se(p.parsers[w], De);
|
|
4436
|
+
}), p.name = c, n[c] = U(v(v({}, $), p), { parsers: b });
|
|
4430
4437
|
}
|
|
4431
4438
|
function Ce(c) {
|
|
4432
4439
|
c && Object.keys(M).forEach((p) => {
|
|
@@ -4435,45 +4442,45 @@ function Jt(t) {
|
|
|
4435
4442
|
});
|
|
4436
4443
|
});
|
|
4437
4444
|
}
|
|
4438
|
-
function
|
|
4445
|
+
function Le(c, p) {
|
|
4439
4446
|
se(m, c, p), Ce(c);
|
|
4440
4447
|
}
|
|
4441
4448
|
function we(c, p) {
|
|
4442
|
-
const
|
|
4443
|
-
|
|
4449
|
+
const $ = (...b) => O(() => p(...b));
|
|
4450
|
+
$._driver = !0, Le(c, $);
|
|
4444
4451
|
}
|
|
4445
|
-
function
|
|
4446
|
-
const
|
|
4447
|
-
c =
|
|
4448
|
-
const b =
|
|
4449
|
-
if (E(m, c) || S(m, c,
|
|
4452
|
+
function st(c, p) {
|
|
4453
|
+
const $ = (c || "").split(".");
|
|
4454
|
+
c = $.shift();
|
|
4455
|
+
const b = $.join(".");
|
|
4456
|
+
if (E(m, c) || S(m, c, Re), m[c] !== Re) {
|
|
4450
4457
|
let w = m[c];
|
|
4451
|
-
return w && w._driver ? w = w(b) :
|
|
4458
|
+
return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ? p : w;
|
|
4452
4459
|
} else
|
|
4453
4460
|
return p;
|
|
4454
4461
|
}
|
|
4455
4462
|
function xt(c) {
|
|
4456
4463
|
l.push(c);
|
|
4457
4464
|
}
|
|
4458
|
-
function
|
|
4465
|
+
function er(c) {
|
|
4459
4466
|
delete m[c], Ce(c);
|
|
4460
4467
|
}
|
|
4461
|
-
function
|
|
4468
|
+
function tr(c, p) {
|
|
4462
4469
|
a.push({ name: c, callback: p });
|
|
4463
4470
|
}
|
|
4464
|
-
function
|
|
4471
|
+
function Be(c) {
|
|
4465
4472
|
C(this, {
|
|
4466
|
-
id:
|
|
4473
|
+
id: Mi++,
|
|
4467
4474
|
create: z,
|
|
4468
4475
|
vm: c,
|
|
4469
|
-
manager:
|
|
4476
|
+
manager: _i(t.manager),
|
|
4470
4477
|
parsers: r,
|
|
4471
4478
|
providers: u,
|
|
4472
4479
|
modelFields: s,
|
|
4473
4480
|
formulas: _,
|
|
4474
4481
|
isMobile: g,
|
|
4475
4482
|
rules: c.$options.propsData.rule,
|
|
4476
|
-
name: c.$options.propsData.name ||
|
|
4483
|
+
name: c.$options.propsData.name || Ve(),
|
|
4477
4484
|
inFor: c.$options.propsData.inFor,
|
|
4478
4485
|
prop: {
|
|
4479
4486
|
components: e,
|
|
@@ -4484,10 +4491,10 @@ function Jt(t) {
|
|
|
4484
4491
|
renderDriver: null,
|
|
4485
4492
|
refreshData: Ce,
|
|
4486
4493
|
loadData: m,
|
|
4487
|
-
CreateNode:
|
|
4488
|
-
bus: new
|
|
4494
|
+
CreateNode: y,
|
|
4495
|
+
bus: new Si(),
|
|
4489
4496
|
unwatch: [],
|
|
4490
|
-
options:
|
|
4497
|
+
options: gr({}),
|
|
4491
4498
|
extendApiFn: l,
|
|
4492
4499
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4493
4500
|
tmpData: ie({})
|
|
@@ -4499,7 +4506,7 @@ function Jt(t) {
|
|
|
4499
4506
|
}, { deep: !0 });
|
|
4500
4507
|
}), 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);
|
|
4501
4508
|
}
|
|
4502
|
-
|
|
4509
|
+
Be.isMobile = g, C(Be.prototype, {
|
|
4503
4510
|
init() {
|
|
4504
4511
|
this.isSub() && this.unwatch.push(B(() => this.vm.parent.fc.options.value, () => {
|
|
4505
4512
|
this.initOptions(), this.$handle.api.refresh();
|
|
@@ -4509,8 +4516,8 @@ function Jt(t) {
|
|
|
4509
4516
|
if (this.renderDriver && this.renderDriver[c])
|
|
4510
4517
|
return O(() => this.renderDriver[c](...p));
|
|
4511
4518
|
},
|
|
4512
|
-
t(c, p,
|
|
4513
|
-
let b =
|
|
4519
|
+
t(c, p, $) {
|
|
4520
|
+
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4514
4521
|
return b == null && (b = ""), b && p && Object.keys(p).forEach((w) => {
|
|
4515
4522
|
const j = new RegExp(`{${w}}`, "g");
|
|
4516
4523
|
b = b.replace(j, p[w]);
|
|
@@ -4518,7 +4525,7 @@ function Jt(t) {
|
|
|
4518
4525
|
},
|
|
4519
4526
|
globalDataDriver(c) {
|
|
4520
4527
|
let p = c.split(".");
|
|
4521
|
-
const
|
|
4528
|
+
const $ = p.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4522
4529
|
if (b) {
|
|
4523
4530
|
if (b.type === "static")
|
|
4524
4531
|
return L(b.data, p);
|
|
@@ -4534,9 +4541,9 @@ function Jt(t) {
|
|
|
4534
4541
|
const R = ne(() => {
|
|
4535
4542
|
le();
|
|
4536
4543
|
const J = this.fetchCache.get(b);
|
|
4537
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (J && (J.loading = !0, this.fetchCache.set(b, J)), this.bus.$emit("$loadData.$globalData." +
|
|
4544
|
+
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (J && (J.loading = !0, this.fetchCache.set(b, J)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
4538
4545
|
}, b.wait || 600), ae = (J) => {
|
|
4539
|
-
this.fetchCache.set(b, { status: !0, data: J }), this.bus.$emit("$loadData.$globalData." +
|
|
4546
|
+
this.fetchCache.set(b, { status: !0, data: J }), this.bus.$emit("$loadData.$globalData." + $);
|
|
4540
4547
|
}, X = (J, ue) => {
|
|
4541
4548
|
if (ue && b.watch === !1)
|
|
4542
4549
|
return le();
|
|
@@ -4544,7 +4551,7 @@ function Jt(t) {
|
|
|
4544
4551
|
R();
|
|
4545
4552
|
return;
|
|
4546
4553
|
}
|
|
4547
|
-
const pe = this.$handle.loadFetchVar(
|
|
4554
|
+
const pe = this.$handle.loadFetchVar(We(b), J);
|
|
4548
4555
|
this.$handle.api.fetch(pe).then((te) => {
|
|
4549
4556
|
ae(te);
|
|
4550
4557
|
}).catch((te) => {
|
|
@@ -4560,91 +4567,91 @@ function Jt(t) {
|
|
|
4560
4567
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4561
4568
|
},
|
|
4562
4569
|
globalLanguageDriver(c) {
|
|
4563
|
-
let p = this.vm.top.$props.locale,
|
|
4564
|
-
if (p && typeof p == "object" && (
|
|
4570
|
+
let p = this.vm.top.$props.locale, $;
|
|
4571
|
+
if (p && typeof p == "object" && ($ = L(p, c)), $ == null) {
|
|
4565
4572
|
const b = this.options.value.language || {}, w = this.getLocale();
|
|
4566
|
-
|
|
4573
|
+
$ = L(b[w] || {}, c), $ == null && ($ = L(Pi[w] || {}, c));
|
|
4567
4574
|
}
|
|
4568
|
-
return
|
|
4575
|
+
return $;
|
|
4569
4576
|
},
|
|
4570
4577
|
globalVarDriver(c) {
|
|
4571
4578
|
let p = c.split(".");
|
|
4572
|
-
const
|
|
4579
|
+
const $ = p.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4573
4580
|
if (b) {
|
|
4574
4581
|
const w = h.Function(b) ? b : W(b.handle);
|
|
4575
4582
|
if (w) {
|
|
4576
4583
|
let j;
|
|
4577
4584
|
const R = this.watchLoadData((ae, X) => {
|
|
4578
|
-
X ? (this.bus.$emit("$loadData.$var." +
|
|
4585
|
+
X ? (this.bus.$emit("$loadData.$var." + $), R()) : j = w(ae, this.$handle.api);
|
|
4579
4586
|
});
|
|
4580
4587
|
return this.unwatch.push(R), L(j, p);
|
|
4581
4588
|
}
|
|
4582
4589
|
}
|
|
4583
4590
|
},
|
|
4584
|
-
setData(c, p,
|
|
4585
|
-
|
|
4591
|
+
setData(c, p, $) {
|
|
4592
|
+
$ ? Le(c, p) : (se(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
|
|
4586
4593
|
},
|
|
4587
4594
|
getLoadData(c, p) {
|
|
4588
|
-
let
|
|
4595
|
+
let $ = null;
|
|
4589
4596
|
if (c != null) {
|
|
4590
4597
|
let b = c.split(".");
|
|
4591
4598
|
const w = b.shift();
|
|
4592
4599
|
if (w === "$topForm")
|
|
4593
|
-
|
|
4600
|
+
$ = this.$handle.api.top.formData(!0);
|
|
4594
4601
|
else if (w === "$scopeForm")
|
|
4595
|
-
|
|
4602
|
+
$ = this.$handle.api.scope.formData(!0);
|
|
4596
4603
|
else if (w === "$form")
|
|
4597
|
-
|
|
4604
|
+
$ = this.$handle.api.formData(!0);
|
|
4598
4605
|
else if (w === "$options")
|
|
4599
|
-
|
|
4606
|
+
$ = this.options.value;
|
|
4600
4607
|
else if (w === "$globalData")
|
|
4601
|
-
|
|
4608
|
+
$ = this.globalDataDriver(b.join(".")), b = [];
|
|
4602
4609
|
else if (w === "$var")
|
|
4603
|
-
|
|
4610
|
+
$ = this.globalVarDriver(b.join(".")), b = [];
|
|
4604
4611
|
else if (w === "$locale")
|
|
4605
|
-
|
|
4612
|
+
$ = this.getLocale(), b = [];
|
|
4606
4613
|
else if (w === "$t")
|
|
4607
|
-
|
|
4614
|
+
$ = this.globalLanguageDriver(b.join(".")), b = [];
|
|
4608
4615
|
else {
|
|
4609
4616
|
if (w === "$preview")
|
|
4610
4617
|
return this.$handle.preview;
|
|
4611
4618
|
{
|
|
4612
4619
|
const j = this.vm.top.fc.tmpData;
|
|
4613
|
-
E(j, w) || S(j, w,
|
|
4620
|
+
E(j, w) || S(j, w, Re), $ = j[w] !== Re ? L(j, c) : st(c), b = [];
|
|
4614
4621
|
}
|
|
4615
4622
|
}
|
|
4616
|
-
|
|
4623
|
+
$ && b.length && ($ = L($, b));
|
|
4617
4624
|
}
|
|
4618
|
-
return
|
|
4625
|
+
return $ == null || $ === "" ? p : $;
|
|
4619
4626
|
},
|
|
4620
4627
|
watchLoadData(c, p) {
|
|
4621
|
-
let
|
|
4628
|
+
let $ = {};
|
|
4622
4629
|
const b = (R) => {
|
|
4623
4630
|
this.get || (this.get = w), O(() => {
|
|
4624
4631
|
c(w, R);
|
|
4625
4632
|
}), this.get === w && (this.get = void 0);
|
|
4626
4633
|
}, w = (R, ae) => {
|
|
4627
4634
|
let X;
|
|
4628
|
-
if (typeof R == "object" && (X = R.getValue, R = R.id),
|
|
4629
|
-
return
|
|
4635
|
+
if (typeof R == "object" && (X = R.getValue, R = R.id), $[R])
|
|
4636
|
+
return $[R].val;
|
|
4630
4637
|
const le = ge(() => X ? X() : this.getLoadData(R, ae)), J = R.split("."), ue = J.shift(), pe = J.shift() || "", te = ne(() => {
|
|
4631
|
-
const
|
|
4632
|
-
if (
|
|
4633
|
-
JSON.stringify(
|
|
4638
|
+
const Te = X ? X() : this.getLoadData(R, ae);
|
|
4639
|
+
if ($[R])
|
|
4640
|
+
JSON.stringify(Te) !== JSON.stringify($[R].val) && ($[R].val = Te, b(!0));
|
|
4634
4641
|
else return;
|
|
4635
|
-
}, p || 0),
|
|
4642
|
+
}, p || 0), ir = B(le, (Te) => {
|
|
4636
4643
|
te();
|
|
4637
4644
|
});
|
|
4638
|
-
return this.bus.$on("$loadData." + ue, te), pe && this.bus.$on("$loadData." + ue + "." + pe, te),
|
|
4645
|
+
return this.bus.$on("$loadData." + ue, te), pe && this.bus.$on("$loadData." + ue + "." + pe, te), $[R] = {
|
|
4639
4646
|
fn: () => {
|
|
4640
|
-
this.bus.$off("$loadData." + ue, te), pe && this.bus.$off("$loadData." + ue + "." + pe, te),
|
|
4647
|
+
this.bus.$off("$loadData." + ue, te), pe && this.bus.$off("$loadData." + ue + "." + pe, te), ir();
|
|
4641
4648
|
},
|
|
4642
4649
|
val: le.value
|
|
4643
4650
|
}, le.value;
|
|
4644
4651
|
};
|
|
4645
4652
|
b(!1);
|
|
4646
4653
|
const j = () => {
|
|
4647
|
-
Object.keys(
|
|
4654
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4648
4655
|
};
|
|
4649
4656
|
return this.unwatch.push(j), j;
|
|
4650
4657
|
},
|
|
@@ -4662,10 +4669,10 @@ function Jt(t) {
|
|
|
4662
4669
|
}, G(d));
|
|
4663
4670
|
this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
|
|
4664
4671
|
},
|
|
4665
|
-
mergeOptions(c, p,
|
|
4666
|
-
return p = v({}, p || {}),
|
|
4672
|
+
mergeOptions(c, p, $) {
|
|
4673
|
+
return p = v({}, p || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4667
4674
|
delete p[b];
|
|
4668
|
-
}), p.global && (c.global =
|
|
4675
|
+
}), p.global && (c.global = zr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
|
|
4669
4676
|
},
|
|
4670
4677
|
updateOptions(c) {
|
|
4671
4678
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4694,52 +4701,52 @@ function Jt(t) {
|
|
|
4694
4701
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4695
4702
|
}
|
|
4696
4703
|
});
|
|
4697
|
-
function
|
|
4704
|
+
function ot(c) {
|
|
4698
4705
|
C(c, {
|
|
4699
4706
|
version: t.version,
|
|
4700
4707
|
ui: t.ui,
|
|
4701
4708
|
isMobile: g,
|
|
4702
4709
|
extendApi: xt,
|
|
4703
|
-
getData:
|
|
4710
|
+
getData: st,
|
|
4704
4711
|
setDataDriver: we,
|
|
4705
|
-
setData:
|
|
4706
|
-
removeData:
|
|
4712
|
+
setData: Le,
|
|
4713
|
+
removeData: er,
|
|
4707
4714
|
refreshData: Ce,
|
|
4708
4715
|
maker: f,
|
|
4709
4716
|
component: F,
|
|
4710
4717
|
directive: T,
|
|
4711
|
-
setModelField:
|
|
4712
|
-
setFormula:
|
|
4713
|
-
setDriver:
|
|
4718
|
+
setModelField: Zt,
|
|
4719
|
+
setFormula: Qt,
|
|
4720
|
+
setDriver: Yt,
|
|
4714
4721
|
register: ce,
|
|
4715
4722
|
$vnode: N,
|
|
4716
4723
|
parser: he,
|
|
4717
4724
|
use: de,
|
|
4718
|
-
factory:
|
|
4719
|
-
componentAlias:
|
|
4720
|
-
copyRule:
|
|
4721
|
-
copyRules:
|
|
4722
|
-
mergeRule:
|
|
4723
|
-
fetch:
|
|
4725
|
+
factory: Xt,
|
|
4726
|
+
componentAlias: Pe,
|
|
4727
|
+
copyRule: Lt,
|
|
4728
|
+
copyRules: Bt,
|
|
4729
|
+
mergeRule: x,
|
|
4730
|
+
fetch: qt,
|
|
4724
4731
|
$form: k,
|
|
4725
4732
|
parseFn: W,
|
|
4726
|
-
parseJson:
|
|
4733
|
+
parseJson: Pt,
|
|
4727
4734
|
toJson: ve,
|
|
4728
4735
|
useApp: P,
|
|
4729
4736
|
getApi: ee,
|
|
4730
|
-
on:
|
|
4737
|
+
on: tr
|
|
4731
4738
|
});
|
|
4732
4739
|
}
|
|
4733
|
-
function
|
|
4740
|
+
function rr(c) {
|
|
4734
4741
|
C(c, {
|
|
4735
4742
|
create: z,
|
|
4736
|
-
install(p,
|
|
4737
|
-
if (d = v(v({}, d),
|
|
4743
|
+
install(p, $) {
|
|
4744
|
+
if (d = v(v({}, d), $ || {}), p._installedFormCreate === !0) return;
|
|
4738
4745
|
p._installedFormCreate = !0;
|
|
4739
4746
|
const b = function(j, R = {}) {
|
|
4740
4747
|
return z(j, R, this);
|
|
4741
4748
|
};
|
|
4742
|
-
|
|
4749
|
+
ot(b), p.prototype.$formCreate = b;
|
|
4743
4750
|
const w = k();
|
|
4744
4751
|
p.component(w.name, w), p.component("FcFragment", N()), o.forEach((j) => {
|
|
4745
4752
|
O(() => j(c, p));
|
|
@@ -4747,7 +4754,7 @@ function Jt(t) {
|
|
|
4747
4754
|
}
|
|
4748
4755
|
});
|
|
4749
4756
|
}
|
|
4750
|
-
if (
|
|
4757
|
+
if (ot(D), rr(D), we("$cookie", Ii), we("$localStorage", Ai), we("$sessionStorage", Vi), y.use({ fragment: "fcFragment" }), t.install && z.use(t), he(Ri), t.inherit) {
|
|
4751
4758
|
const c = t.inherit;
|
|
4752
4759
|
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(m, c.loadData), c.formulas && C(_, c.formulas);
|
|
4753
4760
|
}
|
|
@@ -4763,7 +4770,7 @@ function Jt(t) {
|
|
|
4763
4770
|
}
|
|
4764
4771
|
}), Oe.util = D, Oe;
|
|
4765
4772
|
}
|
|
4766
|
-
function
|
|
4773
|
+
function qe(t) {
|
|
4767
4774
|
if (h.Date(t))
|
|
4768
4775
|
return t;
|
|
4769
4776
|
{
|
|
@@ -4771,14 +4778,14 @@ function Ue(t) {
|
|
|
4771
4778
|
return e.toString() === "Invalid Date" ? t : e;
|
|
4772
4779
|
}
|
|
4773
4780
|
}
|
|
4774
|
-
const
|
|
4775
|
-
name:
|
|
4781
|
+
const _t = "datePicker", Ui = {
|
|
4782
|
+
name: _t,
|
|
4776
4783
|
maker: function() {
|
|
4777
|
-
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = V(
|
|
4784
|
+
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = V(_t, { type: e.toLowerCase() }), t), {});
|
|
4778
4785
|
}(),
|
|
4779
4786
|
mergeProp(t) {
|
|
4780
4787
|
let e = t.prop.props;
|
|
4781
|
-
e.startDate && (e.startDate = e.startDate &&
|
|
4788
|
+
e.startDate && (e.startDate = e.startDate && qe(e.startDate));
|
|
4782
4789
|
},
|
|
4783
4790
|
isRange(t) {
|
|
4784
4791
|
return t.type.includes("range") || t.multiple;
|
|
@@ -4797,60 +4804,60 @@ const vt = "datePicker", Mi = {
|
|
|
4797
4804
|
return this.isRange(e.el) ? r : r[0];
|
|
4798
4805
|
} else {
|
|
4799
4806
|
let r = Array.isArray(t), i = e.prop.props, s, n = i.type || "date";
|
|
4800
|
-
return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ?
|
|
4807
|
+
return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ? qe(o) : "") : s = ["", ""] : n === "date" && i.multiple === !0 ? s = toString(t) : (s = r ? t[0] || "" : t, s = s ? qe(s) : ""), s;
|
|
4801
4808
|
}
|
|
4802
4809
|
},
|
|
4803
4810
|
mounted(t) {
|
|
4804
4811
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
4805
4812
|
}
|
|
4806
|
-
},
|
|
4807
|
-
name:
|
|
4813
|
+
}, Ge = "hidden", qi = {
|
|
4814
|
+
name: Ge,
|
|
4808
4815
|
maker: {
|
|
4809
|
-
[
|
|
4816
|
+
[Ge]: (t, e) => V(Ge)("", t, e)
|
|
4810
4817
|
},
|
|
4811
4818
|
render() {
|
|
4812
4819
|
return [];
|
|
4813
4820
|
}
|
|
4814
|
-
},
|
|
4815
|
-
name:
|
|
4821
|
+
}, He = "input", Gi = {
|
|
4822
|
+
name: He,
|
|
4816
4823
|
maker: function() {
|
|
4817
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = V(
|
|
4818
|
-
return t.idate = V(
|
|
4824
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = V(He, { type: r }), e), {});
|
|
4825
|
+
return t.idate = V(He, { type: "date" }), t;
|
|
4819
4826
|
}(),
|
|
4820
4827
|
mergeProp(t) {
|
|
4821
4828
|
let { props: e } = t.prop;
|
|
4822
4829
|
e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4823
4830
|
}
|
|
4824
|
-
},
|
|
4825
|
-
name:
|
|
4831
|
+
}, Ct = "slider", Hi = {
|
|
4832
|
+
name: Ct,
|
|
4826
4833
|
maker: {
|
|
4827
|
-
sliderRange: V(
|
|
4834
|
+
sliderRange: V(Ct, { range: !0 })
|
|
4828
4835
|
},
|
|
4829
4836
|
toFormValue(t, e) {
|
|
4830
4837
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4831
4838
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4832
4839
|
}
|
|
4833
|
-
},
|
|
4840
|
+
}, zi = {
|
|
4834
4841
|
name: "switch",
|
|
4835
4842
|
mergeProp(t) {
|
|
4836
4843
|
const e = t.prop.props.slot || {}, r = t.prop.scopedSlots || {};
|
|
4837
4844
|
e.open && (r.open = () => e.open), e.close && (r.close = () => e.close), t.prop.scopedSlots = r;
|
|
4838
4845
|
}
|
|
4839
|
-
},
|
|
4846
|
+
}, Ji = {
|
|
4840
4847
|
name: "FcRow",
|
|
4841
4848
|
render(t, e) {
|
|
4842
4849
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4843
4850
|
e.vNode.row(e.prop, t)
|
|
4844
4851
|
]);
|
|
4845
4852
|
}
|
|
4846
|
-
},
|
|
4847
|
-
Mi,
|
|
4853
|
+
}, Wi = [
|
|
4848
4854
|
Ui,
|
|
4849
4855
|
qi,
|
|
4850
4856
|
Gi,
|
|
4851
4857
|
Hi,
|
|
4852
|
-
zi
|
|
4853
|
-
|
|
4858
|
+
zi,
|
|
4859
|
+
Ji
|
|
4860
|
+
], Ki = {
|
|
4854
4861
|
button: "iButton",
|
|
4855
4862
|
icon: "Icon",
|
|
4856
4863
|
slider: "Slider",
|
|
@@ -4877,21 +4884,21 @@ const vt = "datePicker", Mi = {
|
|
|
4877
4884
|
array: "fcGroup",
|
|
4878
4885
|
subForm: "fcSubForm",
|
|
4879
4886
|
object: "fcSubForm"
|
|
4880
|
-
},
|
|
4887
|
+
}, Ie = {
|
|
4881
4888
|
resetBtnType: "default",
|
|
4882
4889
|
resetBtnIcon: "md-refresh",
|
|
4883
4890
|
infoIcon: "ios-information-circle-outline"
|
|
4884
4891
|
};
|
|
4885
|
-
function
|
|
4892
|
+
function Xi() {
|
|
4886
4893
|
return {
|
|
4887
4894
|
type: "poptip",
|
|
4888
4895
|
trigger: "hover",
|
|
4889
4896
|
placement: "top-start",
|
|
4890
4897
|
wordWrap: !0,
|
|
4891
|
-
icon:
|
|
4898
|
+
icon: Ie.infoIcon
|
|
4892
4899
|
};
|
|
4893
4900
|
}
|
|
4894
|
-
function
|
|
4901
|
+
function Zi() {
|
|
4895
4902
|
return {
|
|
4896
4903
|
form: {
|
|
4897
4904
|
inline: !1,
|
|
@@ -4913,9 +4920,9 @@ function Xi() {
|
|
|
4913
4920
|
click: void 0
|
|
4914
4921
|
},
|
|
4915
4922
|
resetBtn: {
|
|
4916
|
-
type:
|
|
4923
|
+
type: Ie.resetBtnType,
|
|
4917
4924
|
disabled: !1,
|
|
4918
|
-
icon:
|
|
4925
|
+
icon: Ie.resetBtnIcon,
|
|
4919
4926
|
innerText: "",
|
|
4920
4927
|
loading: !1,
|
|
4921
4928
|
show: !1,
|
|
@@ -4923,20 +4930,20 @@ function Xi() {
|
|
|
4923
4930
|
}
|
|
4924
4931
|
};
|
|
4925
4932
|
}
|
|
4926
|
-
function
|
|
4933
|
+
function wt(t, e) {
|
|
4927
4934
|
E(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4928
4935
|
}
|
|
4929
4936
|
function Z(t) {
|
|
4930
4937
|
return t === !1;
|
|
4931
4938
|
}
|
|
4932
|
-
function
|
|
4939
|
+
function Qi(t, e) {
|
|
4933
4940
|
E(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4934
4941
|
}
|
|
4935
|
-
function
|
|
4942
|
+
function ze(t) {
|
|
4936
4943
|
const e = v({}, t);
|
|
4937
4944
|
return delete e.children, e;
|
|
4938
4945
|
}
|
|
4939
|
-
const
|
|
4946
|
+
const Yi = {
|
|
4940
4947
|
validate() {
|
|
4941
4948
|
const t = this.form();
|
|
4942
4949
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4955,28 +4962,28 @@ const Qi = {
|
|
|
4955
4962
|
},
|
|
4956
4963
|
tidyOptions(t) {
|
|
4957
4964
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4958
|
-
|
|
4965
|
+
Qi(t, e);
|
|
4959
4966
|
}), t;
|
|
4960
4967
|
},
|
|
4961
4968
|
tidyRule({ prop: t }) {
|
|
4962
|
-
return
|
|
4969
|
+
return wt(t, "title"), wt(t, "info"), t;
|
|
4963
4970
|
},
|
|
4964
4971
|
mergeProp(t) {
|
|
4965
4972
|
const e = {
|
|
4966
|
-
info:
|
|
4973
|
+
info: Xi(),
|
|
4967
4974
|
title: {},
|
|
4968
4975
|
col: { span: 24 },
|
|
4969
4976
|
wrap: {}
|
|
4970
4977
|
};
|
|
4971
4978
|
["info", "wrap", "col", "title"].forEach((r) => {
|
|
4972
|
-
t.prop[r] =
|
|
4979
|
+
t.prop[r] = Y([this.options[r] || {}, t.prop[r] || {}], e[r]);
|
|
4973
4980
|
}), this.setSize(t.prop.props);
|
|
4974
4981
|
},
|
|
4975
4982
|
setSize(t) {
|
|
4976
4983
|
!t.size && this.options.form.size && (t.size = this.options.form.size);
|
|
4977
4984
|
},
|
|
4978
4985
|
getDefaultOptions() {
|
|
4979
|
-
return
|
|
4986
|
+
return Zi();
|
|
4980
4987
|
},
|
|
4981
4988
|
update() {
|
|
4982
4989
|
const t = this.options.form;
|
|
@@ -5003,10 +5010,10 @@ const Qi = {
|
|
|
5003
5010
|
makeWrap(t, e) {
|
|
5004
5011
|
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;
|
|
5005
5012
|
delete r.wrap.title;
|
|
5006
|
-
const u = Z(r.wrap.show) ? e : this.$r(
|
|
5013
|
+
const u = Z(r.wrap.show) ? e : this.$r(Y([r.wrap, {
|
|
5007
5014
|
props: U(v({
|
|
5008
5015
|
labelWidth: o
|
|
5009
|
-
},
|
|
5016
|
+
}, ze(r.wrap || {})), {
|
|
5010
5017
|
prop: t.id,
|
|
5011
5018
|
rules: t.injectValidate()
|
|
5012
5019
|
}),
|
|
@@ -5023,7 +5030,7 @@ const Qi = {
|
|
|
5023
5030
|
return !(!e.title && !e.native || Z(e.show));
|
|
5024
5031
|
},
|
|
5025
5032
|
makeInfo(t, e, r) {
|
|
5026
|
-
var u, f, d, g, m,
|
|
5033
|
+
var u, f, d, g, m, y;
|
|
5027
5034
|
const i = v({}, t.title), s = v({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
|
|
5028
5035
|
title: (f = (u = r.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value,
|
|
5029
5036
|
rule: r.rule,
|
|
@@ -5032,23 +5039,23 @@ const Qi = {
|
|
|
5032
5039
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5033
5040
|
const _ = {
|
|
5034
5041
|
type: s.type || "poptip",
|
|
5035
|
-
props:
|
|
5042
|
+
props: ze(s),
|
|
5036
5043
|
key: `${e}pop`,
|
|
5037
5044
|
slot: "label"
|
|
5038
5045
|
};
|
|
5039
5046
|
delete _.props.icon, delete _.props.show, delete _.props.info, delete _.props.align, delete _.props.native;
|
|
5040
5047
|
const D = "content";
|
|
5041
|
-
s.info && !E(_.props, D) && (_.props[D] = (
|
|
5048
|
+
s.info && !E(_.props, D) && (_.props[D] = (y = (m = r.refRule) == null ? void 0 : m.__$info) == null ? void 0 : y.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, _]), [
|
|
5042
5049
|
this.$r({
|
|
5043
5050
|
type: "icon",
|
|
5044
|
-
props: { type: s.icon === !0 ?
|
|
5051
|
+
props: { type: s.icon === !0 ? Ie.infoIcon : s.icon, size: 16 },
|
|
5045
5052
|
style: "margin-top: -1px",
|
|
5046
5053
|
key: `${e}i`
|
|
5047
5054
|
})
|
|
5048
5055
|
]));
|
|
5049
5056
|
}
|
|
5050
|
-
const l =
|
|
5051
|
-
props:
|
|
5057
|
+
const l = Y([i, {
|
|
5058
|
+
props: ze(i),
|
|
5052
5059
|
key: `${e}tit`,
|
|
5053
5060
|
class: "fc-form-title",
|
|
5054
5061
|
slot: i.slot || "label",
|
|
@@ -5124,12 +5131,12 @@ const Qi = {
|
|
|
5124
5131
|
}, [e]);
|
|
5125
5132
|
}
|
|
5126
5133
|
}, oe = {}, xi = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
|
|
5127
|
-
function
|
|
5134
|
+
function en(t) {
|
|
5128
5135
|
xi.forEach((e) => {
|
|
5129
5136
|
t[e] = V(e);
|
|
5130
5137
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5131
5138
|
}
|
|
5132
|
-
function
|
|
5139
|
+
function tn(t) {
|
|
5133
5140
|
const e = "upload", r = {
|
|
5134
5141
|
image: ["image", 0],
|
|
5135
5142
|
file: ["file", 0],
|
|
@@ -5138,19 +5145,19 @@ function en(t) {
|
|
|
5138
5145
|
};
|
|
5139
5146
|
Object.keys(r).reduce((i, s) => (i[s] = V(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
5140
5147
|
}
|
|
5141
|
-
function
|
|
5148
|
+
function rn(t) {
|
|
5142
5149
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5143
5150
|
Object.keys(r).reduce((i, s) => (i[s] = V(e, { type: r[s] }), i), t);
|
|
5144
5151
|
}
|
|
5145
|
-
function
|
|
5152
|
+
function nn(t) {
|
|
5146
5153
|
const e = "timePicker";
|
|
5147
5154
|
t.time = V(e, { type: "time" }), t.timeRange = V(e, { type: "timerange" });
|
|
5148
5155
|
}
|
|
5149
|
-
function
|
|
5156
|
+
function sn(t) {
|
|
5150
5157
|
const e = "select";
|
|
5151
5158
|
t.selectMultiple = V(e, { multiple: !0 }), t.selectOne = V(e, { multiple: !1 });
|
|
5152
5159
|
}
|
|
5153
|
-
function
|
|
5160
|
+
function on(t) {
|
|
5154
5161
|
const e = "frame", r = {
|
|
5155
5162
|
frameInputs: ["input", 0],
|
|
5156
5163
|
frameFiles: ["file", 0],
|
|
@@ -5161,16 +5168,16 @@ function sn(t) {
|
|
|
5161
5168
|
};
|
|
5162
5169
|
Object.keys(r).reduce((i, s) => (i[s] = V(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;
|
|
5163
5170
|
}
|
|
5164
|
-
Yi(oe);
|
|
5165
5171
|
en(oe);
|
|
5166
5172
|
tn(oe);
|
|
5167
|
-
nn(oe);
|
|
5168
|
-
sn(oe);
|
|
5169
5173
|
rn(oe);
|
|
5170
|
-
|
|
5174
|
+
sn(oe);
|
|
5175
|
+
on(oe);
|
|
5176
|
+
nn(oe);
|
|
5177
|
+
function Ot(t, e) {
|
|
5171
5178
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5172
5179
|
}
|
|
5173
|
-
function
|
|
5180
|
+
function an(t, e) {
|
|
5174
5181
|
return {
|
|
5175
5182
|
formEl() {
|
|
5176
5183
|
return e.$manager.form();
|
|
@@ -5246,11 +5253,11 @@ function on(t, e) {
|
|
|
5246
5253
|
}
|
|
5247
5254
|
},
|
|
5248
5255
|
submitBtnProps: (r = {}) => {
|
|
5249
|
-
let i =
|
|
5256
|
+
let i = Ot(e.options.submitBtn, !0);
|
|
5250
5257
|
C(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
5251
5258
|
},
|
|
5252
5259
|
resetBtnProps: (r = {}) => {
|
|
5253
|
-
let i =
|
|
5260
|
+
let i = Ot(e.options.resetBtn, !1);
|
|
5254
5261
|
C(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
5255
5262
|
},
|
|
5256
5263
|
submit(r, i) {
|
|
@@ -5268,11 +5275,11 @@ function on(t, e) {
|
|
|
5268
5275
|
}
|
|
5269
5276
|
};
|
|
5270
5277
|
}
|
|
5271
|
-
const
|
|
5278
|
+
const Kt = {
|
|
5272
5279
|
name: "required",
|
|
5273
5280
|
load(t, e, r) {
|
|
5274
5281
|
var s, n;
|
|
5275
|
-
const i =
|
|
5282
|
+
const i = ln(t.getValue());
|
|
5276
5283
|
if (i.required === !1)
|
|
5277
5284
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5278
5285
|
else {
|
|
@@ -5293,28 +5300,28 @@ const Wt = {
|
|
|
5293
5300
|
r.sync(e);
|
|
5294
5301
|
},
|
|
5295
5302
|
watch(...t) {
|
|
5296
|
-
|
|
5303
|
+
Kt.load(...t);
|
|
5297
5304
|
}
|
|
5298
5305
|
};
|
|
5299
|
-
function
|
|
5306
|
+
function ln(t) {
|
|
5300
5307
|
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 : {};
|
|
5301
5308
|
}
|
|
5302
|
-
function
|
|
5303
|
-
t.componentAlias(
|
|
5309
|
+
function un(t) {
|
|
5310
|
+
t.componentAlias(Ki), Mr.forEach((e) => {
|
|
5304
5311
|
t.component(e.name, e);
|
|
5305
|
-
}), t.register(
|
|
5312
|
+
}), t.register(Kt), Wi.forEach((e) => {
|
|
5306
5313
|
t.parser(e);
|
|
5307
5314
|
}), Object.keys(oe).forEach((e) => {
|
|
5308
5315
|
t.maker[e] = oe[e];
|
|
5309
5316
|
});
|
|
5310
5317
|
}
|
|
5311
|
-
function
|
|
5312
|
-
return
|
|
5318
|
+
function fn() {
|
|
5319
|
+
return Wt({
|
|
5313
5320
|
ui: "iview",
|
|
5314
|
-
version: "2.7.
|
|
5315
|
-
manager:
|
|
5316
|
-
install:
|
|
5317
|
-
extendApi:
|
|
5321
|
+
version: "2.7.8",
|
|
5322
|
+
manager: Yi,
|
|
5323
|
+
install: un,
|
|
5324
|
+
extendApi: an,
|
|
5318
5325
|
attrs: {
|
|
5319
5326
|
normal: ["col", "wrap"],
|
|
5320
5327
|
array: ["className"],
|
|
@@ -5322,10 +5329,10 @@ function un() {
|
|
|
5322
5329
|
}
|
|
5323
5330
|
});
|
|
5324
5331
|
}
|
|
5325
|
-
const
|
|
5326
|
-
typeof window != "undefined" && (window.formCreate =
|
|
5327
|
-
const
|
|
5332
|
+
const Ye = fn();
|
|
5333
|
+
typeof window != "undefined" && (window.formCreate = Ye, window.Vue && Ye.install(window.Vue));
|
|
5334
|
+
const dn = Ye.maker;
|
|
5328
5335
|
export {
|
|
5329
|
-
|
|
5330
|
-
|
|
5336
|
+
Ye as default,
|
|
5337
|
+
dn as maker
|
|
5331
5338
|
};
|