@form-create/view-design 2.6.1 → 2.6.2
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 +402 -399
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +5 -5
package/dist/form-create.esm.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/view-design v2.6.
|
|
3
|
+
* @form-create/view-design v2.6.2
|
|
4
4
|
* (c) 2018-2024 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 $t = Object.defineProperty, vt = Object.defineProperties;
|
|
11
|
+
var bt = Object.getOwnPropertyDescriptors;
|
|
12
|
+
var we = Object.getOwnPropertySymbols;
|
|
13
|
+
var Ct = Object.prototype.hasOwnProperty, _t = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var Fe = (t, e, r) => e in t ? $t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, y = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
|
|
16
|
+
Ct.call(e, r) && Fe(t, r, e[r]);
|
|
17
|
+
if (we)
|
|
18
|
+
for (var r of we(e))
|
|
19
|
+
_t.call(e, r) && Fe(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
}, q = (t, e) =>
|
|
21
|
+
}, q = (t, e) => vt(t, bt(e));
|
|
22
22
|
import P from "vue";
|
|
23
|
-
function
|
|
23
|
+
function Ot(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
26
|
+
function oe() {
|
|
27
|
+
return oe = 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
|
+
}, oe.apply(this, arguments);
|
|
31
31
|
}
|
|
32
|
-
var
|
|
32
|
+
var kt = ["attrs", "props", "domProps"], wt = ["class", "style", "directives"], Ft = ["on", "nativeOn"], St = 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 (kt.indexOf(i) !== -1) e[i] = oe({}, e[i], r[i]);
|
|
36
|
+
else if (wt.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 (Ft.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]], u = r[i][o] instanceof Array ? r[i][o] : [r[i][o]];
|
|
42
42
|
e[i][o] = [].concat(a, u);
|
|
43
43
|
} else e[i][o] = r[i][o];
|
|
44
|
-
else if (i === "hook") for (var l in r[i]) e[i][l] = e[i][l] ?
|
|
44
|
+
else if (i === "hook") for (var l in r[i]) e[i][l] = e[i][l] ? Et(e[i][l], r[i][l]) : r[i][l];
|
|
45
45
|
else e[i] = r[i];
|
|
46
46
|
return e;
|
|
47
47
|
}, {});
|
|
48
|
-
},
|
|
48
|
+
}, Et = function(t, e) {
|
|
49
49
|
return function() {
|
|
50
50
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
51
51
|
};
|
|
52
|
-
},
|
|
53
|
-
const C = /* @__PURE__ */
|
|
54
|
-
function
|
|
52
|
+
}, Rt = St;
|
|
53
|
+
const C = /* @__PURE__ */ Ot(Rt);
|
|
54
|
+
function Y(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 It = "fcCheckbox", jt = {
|
|
58
|
+
name: It,
|
|
59
59
|
props: {
|
|
60
60
|
formCreateInject: {
|
|
61
61
|
type: Object,
|
|
@@ -117,7 +117,7 @@ const jt = "fcCheckbox", At = {
|
|
|
117
117
|
}, {
|
|
118
118
|
key: "" + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), Y(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -126,10 +126,10 @@ const jt = "fcCheckbox", At = {
|
|
|
126
126
|
function I(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const At = "fcFrame";
|
|
130
|
+
function We(t) {
|
|
131
131
|
return {
|
|
132
|
-
name:
|
|
132
|
+
name: At,
|
|
133
133
|
props: {
|
|
134
134
|
formCreateInject: {
|
|
135
135
|
type: Object,
|
|
@@ -503,16 +503,16 @@ function xe(t) {
|
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const xe = We({
|
|
507
507
|
fileIcon: "md-document",
|
|
508
508
|
fileUpIcon: "ios-folder-open"
|
|
509
509
|
});
|
|
510
|
-
|
|
510
|
+
xe.v2 = We({
|
|
511
511
|
fileIcon: "document-text",
|
|
512
512
|
fileUpIcon: "folder"
|
|
513
513
|
});
|
|
514
|
-
const
|
|
515
|
-
name:
|
|
514
|
+
const Vt = "fcRadio", Pt = {
|
|
515
|
+
name: Vt,
|
|
516
516
|
props: {
|
|
517
517
|
formCreateInject: {
|
|
518
518
|
type: Object,
|
|
@@ -569,7 +569,7 @@ const Pt = "fcRadio", Dt = {
|
|
|
569
569
|
}, {
|
|
570
570
|
key: "" + r + "-" + e.value
|
|
571
571
|
}]));
|
|
572
|
-
}),
|
|
572
|
+
}), Y(this.$slots)]);
|
|
573
573
|
},
|
|
574
574
|
mounted() {
|
|
575
575
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -607,8 +607,8 @@ const Pt = "fcRadio", Dt = {
|
|
|
607
607
|
function k(t, e) {
|
|
608
608
|
return {}.hasOwnProperty.call(t, e);
|
|
609
609
|
}
|
|
610
|
-
const
|
|
611
|
-
name:
|
|
610
|
+
const Dt = "fcSelect", Tt = {
|
|
611
|
+
name: Dt,
|
|
612
612
|
functional: !0,
|
|
613
613
|
props: {
|
|
614
614
|
formCreateInject: {
|
|
@@ -639,8 +639,8 @@ const Tt = "fcSelect", Bt = {
|
|
|
639
639
|
mounted() {
|
|
640
640
|
this.$emit("fc.el", this.$refs.el);
|
|
641
641
|
}
|
|
642
|
-
},
|
|
643
|
-
name:
|
|
642
|
+
}, Bt = "fcTree", Lt = {
|
|
643
|
+
name: Bt,
|
|
644
644
|
props: {
|
|
645
645
|
formCreateInject: {
|
|
646
646
|
type: Object,
|
|
@@ -688,25 +688,25 @@ const Tt = "fcSelect", Bt = {
|
|
|
688
688
|
ref: "tree"
|
|
689
689
|
}, {
|
|
690
690
|
on: e
|
|
691
|
-
}]), [
|
|
691
|
+
}]), [Y(this.$slots)]);
|
|
692
692
|
},
|
|
693
693
|
mounted() {
|
|
694
694
|
this.$emit("fc.el", this.$refs.tree);
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
-
function
|
|
697
|
+
function Se(t) {
|
|
698
698
|
return {
|
|
699
699
|
url: t,
|
|
700
|
-
name:
|
|
700
|
+
name: Nt(t)
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Nt(t) {
|
|
704
704
|
return ("" + t).split("/").pop();
|
|
705
705
|
}
|
|
706
|
-
const
|
|
707
|
-
function
|
|
706
|
+
const Mt = "fcUpload";
|
|
707
|
+
function Ge(t) {
|
|
708
708
|
return {
|
|
709
|
-
name:
|
|
709
|
+
name: Mt,
|
|
710
710
|
props: {
|
|
711
711
|
formCreateInject: {
|
|
712
712
|
type: Object,
|
|
@@ -747,11 +747,11 @@ function Ke(t) {
|
|
|
747
747
|
};
|
|
748
748
|
},
|
|
749
749
|
created() {
|
|
750
|
-
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = I(this.value).map(
|
|
750
|
+
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = I(this.value).map(Se);
|
|
751
751
|
},
|
|
752
752
|
watch: {
|
|
753
753
|
value(e) {
|
|
754
|
-
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = I(e).map(
|
|
754
|
+
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = I(e).map(Se), this.uploadList = this.$refs.upload.fileList);
|
|
755
755
|
},
|
|
756
756
|
maxLength(e, r) {
|
|
757
757
|
(r === 1 || e === 1) && this.update();
|
|
@@ -857,7 +857,7 @@ function Ke(t) {
|
|
|
857
857
|
type: this.uploadType === "file" ? "ios-cloud-upload-outline" : t.imgUpIcon,
|
|
858
858
|
size: 20
|
|
859
859
|
}
|
|
860
|
-
}]))])]) : null,
|
|
860
|
+
}]))])]) : null, Y(this.$slots, ["default"])]);
|
|
861
861
|
},
|
|
862
862
|
update() {
|
|
863
863
|
let e = this.$refs.upload.fileList.map((r) => r.url).filter((r) => r !== void 0);
|
|
@@ -900,11 +900,11 @@ function Ke(t) {
|
|
|
900
900
|
}
|
|
901
901
|
};
|
|
902
902
|
}
|
|
903
|
-
const
|
|
903
|
+
const Ke = Ge({
|
|
904
904
|
fileIcon: "md-document",
|
|
905
905
|
imgUpIcon: "md-images"
|
|
906
906
|
});
|
|
907
|
-
|
|
907
|
+
Ke.v2 = Ge({
|
|
908
908
|
fileIcon: "document-text",
|
|
909
909
|
imgUpIcon: "image"
|
|
910
910
|
});
|
|
@@ -914,7 +914,7 @@ function w(t, e, r) {
|
|
|
914
914
|
function T(t, e) {
|
|
915
915
|
P.delete(t, e);
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function z(t, e = {}, r) {
|
|
918
918
|
let i = !1;
|
|
919
919
|
for (let s in e)
|
|
920
920
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
@@ -932,26 +932,26 @@ function W(t, e = {}, r) {
|
|
|
932
932
|
}
|
|
933
933
|
else
|
|
934
934
|
o && w(t, s, {});
|
|
935
|
-
t[s] =
|
|
935
|
+
t[s] = z(t[s], n, r);
|
|
936
936
|
} else
|
|
937
937
|
w(t, s, n), f.Undef(n) || (f.Undef(n.__json) || (t[s].__json = n.__json), f.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
938
938
|
}
|
|
939
939
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
940
940
|
}
|
|
941
941
|
function B(t) {
|
|
942
|
-
return
|
|
942
|
+
return z({}, { value: t }).value;
|
|
943
943
|
}
|
|
944
|
-
const
|
|
944
|
+
const Ut = Object.assign || function(t) {
|
|
945
945
|
for (let e, r = 1; r < arguments.length; r++)
|
|
946
946
|
for (let i in e = arguments[r], e)
|
|
947
947
|
Object.prototype.hasOwnProperty.call(e, i) && w(t, i, e[i]);
|
|
948
948
|
return t;
|
|
949
949
|
};
|
|
950
950
|
function p() {
|
|
951
|
-
return
|
|
951
|
+
return Ut.apply(this, arguments);
|
|
952
952
|
}
|
|
953
|
-
const
|
|
954
|
-
name:
|
|
953
|
+
const qt = "fcGroup", Ht = {
|
|
954
|
+
name: qt,
|
|
955
955
|
props: {
|
|
956
956
|
field: String,
|
|
957
957
|
rule: [Array, Object],
|
|
@@ -1032,7 +1032,7 @@ const Ht = "fcGroup", Jt = {
|
|
|
1032
1032
|
const s = i.$f.formData();
|
|
1033
1033
|
if (t === e)
|
|
1034
1034
|
i.$f.deferSyncValue(() => {
|
|
1035
|
-
|
|
1035
|
+
z(i.rule, t), i.$f.setValue(s);
|
|
1036
1036
|
}, !0);
|
|
1037
1037
|
else {
|
|
1038
1038
|
const n = i.$f.formData();
|
|
@@ -1250,8 +1250,8 @@ const Ht = "fcGroup", Jt = {
|
|
|
1250
1250
|
class: "_fc-group " + (s ? "_fc-group-disabled" : "")
|
|
1251
1251
|
}, [n]);
|
|
1252
1252
|
}
|
|
1253
|
-
},
|
|
1254
|
-
name:
|
|
1253
|
+
}, Jt = "fcSubForm", zt = {
|
|
1254
|
+
name: Jt,
|
|
1255
1255
|
props: {
|
|
1256
1256
|
rule: Array,
|
|
1257
1257
|
options: Object,
|
|
@@ -1334,27 +1334,27 @@ const Ht = "fcGroup", Jt = {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
}]));
|
|
1336
1336
|
}
|
|
1337
|
-
},
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
],
|
|
1337
|
+
}, Wt = [
|
|
1338
|
+
jt,
|
|
1339
|
+
Pt,
|
|
1340
|
+
Tt,
|
|
1341
|
+
Lt,
|
|
1342
|
+
zt,
|
|
1343
|
+
xe,
|
|
1344
|
+
Ke,
|
|
1345
|
+
Ht
|
|
1346
|
+
], Ee = "FormCreate", ae = (t, e) => {
|
|
1347
1347
|
if (!(!t || t === e)) {
|
|
1348
1348
|
if (t.formCreateInject)
|
|
1349
1349
|
return t.formCreateInject;
|
|
1350
1350
|
if (t.$parent)
|
|
1351
|
-
return
|
|
1351
|
+
return ae(t.$parent, e);
|
|
1352
1352
|
}
|
|
1353
1353
|
};
|
|
1354
|
-
function
|
|
1354
|
+
function xt(t, e, r) {
|
|
1355
1355
|
return {
|
|
1356
|
-
name:
|
|
1357
|
-
componentName:
|
|
1356
|
+
name: Ee,
|
|
1357
|
+
componentName: Ee,
|
|
1358
1358
|
model: {
|
|
1359
1359
|
prop: "api"
|
|
1360
1360
|
},
|
|
@@ -1430,8 +1430,8 @@ function Gt(t, e, r) {
|
|
|
1430
1430
|
},
|
|
1431
1431
|
deep: !0
|
|
1432
1432
|
},
|
|
1433
|
-
rule(i) {
|
|
1434
|
-
i.length === this.renderRule.length && i.every((
|
|
1433
|
+
rule(i, s) {
|
|
1434
|
+
i.length === this.renderRule.length && i.every((n) => this.renderRule.indexOf(n) > -1) || (this.formCreate.$handle.reloadRule(i), this._renderRule(), i !== s && this.formCreate.$handle.targetReload());
|
|
1435
1435
|
},
|
|
1436
1436
|
disabled() {
|
|
1437
1437
|
this.$f.refresh();
|
|
@@ -1445,14 +1445,14 @@ function Gt(t, e, r) {
|
|
|
1445
1445
|
created() {
|
|
1446
1446
|
const i = this, s = this.formCreate.api(), n = () => {
|
|
1447
1447
|
if (i.$pfc) {
|
|
1448
|
-
const a =
|
|
1448
|
+
const a = ae(i, i.$pfc);
|
|
1449
1449
|
if (a) {
|
|
1450
1450
|
let u;
|
|
1451
1451
|
i.isMore ? (u = I(a.getSubForm()), u.push(s)) : u = s, a.subForm(u);
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
}, o = () => {
|
|
1455
|
-
const a =
|
|
1455
|
+
const a = ae(i, i.$pfc);
|
|
1456
1456
|
if (a)
|
|
1457
1457
|
if (i.isMore) {
|
|
1458
1458
|
const u = I(a.getSubForm()), l = u.indexOf(s);
|
|
@@ -1468,8 +1468,8 @@ function Gt(t, e, r) {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
};
|
|
1470
1470
|
}
|
|
1471
|
-
const
|
|
1472
|
-
const i = [...
|
|
1471
|
+
const Xe = ["attrs", "props", "domProps", "scopedSlots"], Qe = ["class", "style", "directives"], Ze = ["on", "nativeOn"], D = (t, e = {}, r = {}) => {
|
|
1472
|
+
const i = [...Xe, ...r.normal || []], s = [...Qe, ...r.array || []], n = [...Ze, ...r.functional || []], o = r.props || [];
|
|
1473
1473
|
return t.reduce((a, u) => {
|
|
1474
1474
|
for (const l in u)
|
|
1475
1475
|
if (a[l])
|
|
@@ -1489,65 +1489,65 @@ const Qe = ["attrs", "props", "domProps", "scopedSlots"], Ze = ["class", "style"
|
|
|
1489
1489
|
a[l][c] = u[l][c];
|
|
1490
1490
|
else if (l === "hook")
|
|
1491
1491
|
for (let c in u[l])
|
|
1492
|
-
a[l][c] ? a[l][c] =
|
|
1492
|
+
a[l][c] ? a[l][c] = Gt(a[l][c], u[l][c]) : a[l][c] = u[l][c];
|
|
1493
1493
|
else
|
|
1494
1494
|
a[l] = u[l];
|
|
1495
1495
|
else
|
|
1496
1496
|
i.indexOf(l) > -1 || n.indexOf(l) > -1 || o.indexOf(l) > -1 ? a[l] = y({}, u[l]) : s.indexOf(l) > -1 ? a[l] = u[l] instanceof Array ? [...u[l]] : typeof u[l] == "object" ? y({}, u[l]) : u[l] : a[l] = u[l];
|
|
1497
1497
|
return a;
|
|
1498
1498
|
}, e);
|
|
1499
|
-
},
|
|
1499
|
+
}, Gt = (t, e) => function() {
|
|
1500
1500
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1501
|
-
},
|
|
1502
|
-
function
|
|
1503
|
-
return [...
|
|
1501
|
+
}, Ye = ["type", "slot", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "preview", "component", "cache"], ce = ["validate", "children", "control"], de = ["effect", "deep"];
|
|
1502
|
+
function Kt() {
|
|
1503
|
+
return [...Ye, ...Xe, ...Qe, ...Ze, ...ce, ...de];
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function pe(t, e, r) {
|
|
1506
1506
|
return `[form-create ${t}]: ${e}`;
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
console.warn(
|
|
1508
|
+
function Xt(t, e) {
|
|
1509
|
+
console.warn(pe("tip", t));
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1512
|
-
console.error(
|
|
1511
|
+
function me(t, e) {
|
|
1512
|
+
console.error(pe("err", t));
|
|
1513
1513
|
}
|
|
1514
|
-
function
|
|
1515
|
-
|
|
1514
|
+
function Qt(t) {
|
|
1515
|
+
me(t.toString()), console.error(t);
|
|
1516
1516
|
}
|
|
1517
|
-
const
|
|
1518
|
-
function
|
|
1519
|
-
return JSON.stringify(
|
|
1517
|
+
const le = "[[FORM-CREATE-PREFIX-", ue = "-FORM-CREATE-SUFFIX]]", Re = "$FN:", Ie = "$FNX:";
|
|
1518
|
+
function et(t, e) {
|
|
1519
|
+
return JSON.stringify(z(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1520
1520
|
if (!(i && i._isVue === !0)) {
|
|
1521
|
-
if (typeof i
|
|
1521
|
+
if (typeof i != "function")
|
|
1522
1522
|
return i;
|
|
1523
1523
|
if (i.__json)
|
|
1524
1524
|
return i.__json;
|
|
1525
1525
|
if (i.__origin && (i = i.__origin), !i.__emit)
|
|
1526
|
-
return
|
|
1526
|
+
return le + i + ue;
|
|
1527
1527
|
}
|
|
1528
1528
|
}, e);
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function je(t) {
|
|
1531
1531
|
return new Function("return " + t)();
|
|
1532
1532
|
}
|
|
1533
1533
|
function M(t, e) {
|
|
1534
1534
|
if (t && f.String(t) && t.length > 4) {
|
|
1535
1535
|
let r = t.trim(), i = !1;
|
|
1536
1536
|
try {
|
|
1537
|
-
if (r.indexOf(
|
|
1538
|
-
r = r.replace(
|
|
1539
|
-
else if (r.indexOf(
|
|
1540
|
-
r = r.replace(
|
|
1537
|
+
if (r.indexOf(ue) > 0 && r.indexOf(le) === 0)
|
|
1538
|
+
r = r.replace(ue, "").replace(le, ""), i = !0;
|
|
1539
|
+
else if (r.indexOf(Re) === 0)
|
|
1540
|
+
r = r.replace(Re, ""), i = !0;
|
|
1541
1541
|
else {
|
|
1542
|
-
if (r.indexOf(
|
|
1543
|
-
return r =
|
|
1544
|
-
!e && r.indexOf(
|
|
1542
|
+
if (r.indexOf(Ie) === 0)
|
|
1543
|
+
return r = je("function($inject){" + r.replace(Ie, "") + "}"), r.__json = t, r.__inject = !0, r;
|
|
1544
|
+
!e && r.indexOf("function ") === 0 && r !== "function " && (i = !0);
|
|
1545
1545
|
}
|
|
1546
1546
|
if (!i) return t;
|
|
1547
|
-
const s =
|
|
1547
|
+
const s = je(r.indexOf("function ") === -1 && r.indexOf("(") !== 0 ? "function " + r : r);
|
|
1548
1548
|
return s.__json = t, s;
|
|
1549
1549
|
} catch (s) {
|
|
1550
|
-
|
|
1550
|
+
me(`解析失败:${r}
|
|
1551
1551
|
|
|
1552
1552
|
err: ${s}`);
|
|
1553
1553
|
return;
|
|
@@ -1555,12 +1555,12 @@ err: ${s}`);
|
|
|
1555
1555
|
}
|
|
1556
1556
|
return t;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function Zt(t, e) {
|
|
1559
1559
|
return JSON.parse(t, function(r, i) {
|
|
1560
1560
|
return f.Undef(i) || !i.indexOf ? i : M(i, e);
|
|
1561
1561
|
});
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function tt(t, e) {
|
|
1564
1564
|
return {
|
|
1565
1565
|
value: t,
|
|
1566
1566
|
enumerable: !1,
|
|
@@ -1568,60 +1568,60 @@ function rt(t, e) {
|
|
|
1568
1568
|
writable: !!e
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1572
|
-
return
|
|
1571
|
+
function ye(t) {
|
|
1572
|
+
return rt([t])[0];
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1575
|
-
return
|
|
1574
|
+
function rt(t, e) {
|
|
1575
|
+
return z([], [...t], e || !1);
|
|
1576
1576
|
}
|
|
1577
1577
|
function U(t, e) {
|
|
1578
|
-
return D(Array.isArray(e) ? e : [e], t, { array:
|
|
1578
|
+
return D(Array.isArray(e) ? e : [e], t, { array: ce, normal: de }), t;
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function Ae(t) {
|
|
1581
1581
|
const e = f.Function(t.getRule) ? t.getRule() : t;
|
|
1582
1582
|
return e.type || (e.type = "input"), e;
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Yt(t, e) {
|
|
1585
1585
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1586
1586
|
e[r] && (t[r] = U(t[r] || {}, e[r]));
|
|
1587
1587
|
}), t) : e;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function it(t, e) {
|
|
1590
1590
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1591
1591
|
get() {
|
|
1592
1592
|
return e[i]();
|
|
1593
1593
|
}
|
|
1594
1594
|
}, r), {}));
|
|
1595
1595
|
}
|
|
1596
|
-
function
|
|
1596
|
+
function K(t) {
|
|
1597
1597
|
return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
|
|
1598
1598
|
}
|
|
1599
1599
|
function E(t, e) {
|
|
1600
1600
|
try {
|
|
1601
1601
|
e = t();
|
|
1602
1602
|
} catch (r) {
|
|
1603
|
-
|
|
1603
|
+
Qt(r);
|
|
1604
1604
|
}
|
|
1605
1605
|
return e;
|
|
1606
1606
|
}
|
|
1607
|
-
const
|
|
1608
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1609
|
-
"!=": (t, e) => !
|
|
1607
|
+
const Ve = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, J = {
|
|
1608
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(Ve(t, e)),
|
|
1609
|
+
"!=": (t, e) => !J["=="](t, e),
|
|
1610
1610
|
">": (t, e) => t > e,
|
|
1611
1611
|
">=": (t, e) => t >= e,
|
|
1612
1612
|
"<": (t, e) => t < e,
|
|
1613
1613
|
"<=": (t, e) => t <= e,
|
|
1614
1614
|
on(t, e) {
|
|
1615
|
-
return t && t.indexOf && t.indexOf(
|
|
1615
|
+
return t && t.indexOf && t.indexOf(Ve(t[0], e)) > -1;
|
|
1616
1616
|
},
|
|
1617
1617
|
notOn(t, e) {
|
|
1618
|
-
return !
|
|
1618
|
+
return !J.on(t, e);
|
|
1619
1619
|
},
|
|
1620
1620
|
in(t, e) {
|
|
1621
1621
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1622
1622
|
},
|
|
1623
1623
|
notIn(t, e) {
|
|
1624
|
-
return !
|
|
1624
|
+
return !J.in(t, e);
|
|
1625
1625
|
},
|
|
1626
1626
|
between(t, e) {
|
|
1627
1627
|
return t > e[0] && t < e[1];
|
|
@@ -1639,7 +1639,7 @@ const Pe = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
|
|
|
1639
1639
|
return new RegExp(e, "g").test(t);
|
|
1640
1640
|
}
|
|
1641
1641
|
};
|
|
1642
|
-
function
|
|
1642
|
+
function nt() {
|
|
1643
1643
|
return {
|
|
1644
1644
|
props: {},
|
|
1645
1645
|
on: {},
|
|
@@ -1653,14 +1653,14 @@ function st() {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
function F(t, e) {
|
|
1655
1655
|
return (r, i, s, n = {}) => {
|
|
1656
|
-
const o = new
|
|
1656
|
+
const o = new ge(t, r, i, s, n);
|
|
1657
1657
|
return e && (f.Function(e) ? e(o) : o.props(e)), o;
|
|
1658
1658
|
};
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1661
|
-
this._data = p(
|
|
1660
|
+
function ge(t, e, r, i, s) {
|
|
1661
|
+
this._data = p(nt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1662
1662
|
}
|
|
1663
|
-
p(
|
|
1663
|
+
p(ge.prototype, {
|
|
1664
1664
|
getRule() {
|
|
1665
1665
|
return this._data;
|
|
1666
1666
|
},
|
|
@@ -1669,39 +1669,39 @@ p($e.prototype, {
|
|
|
1669
1669
|
},
|
|
1670
1670
|
_clone() {
|
|
1671
1671
|
const t = new this.constructor();
|
|
1672
|
-
return t._data =
|
|
1672
|
+
return t._data = ye(this._data), t;
|
|
1673
1673
|
}
|
|
1674
1674
|
});
|
|
1675
|
-
function
|
|
1675
|
+
function st(t) {
|
|
1676
1676
|
t.forEach((e) => {
|
|
1677
|
-
|
|
1677
|
+
ge.prototype[e] = function(r) {
|
|
1678
1678
|
return U(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1679
1679
|
};
|
|
1680
1680
|
});
|
|
1681
1681
|
}
|
|
1682
|
-
|
|
1683
|
-
const
|
|
1684
|
-
function
|
|
1685
|
-
let i =
|
|
1682
|
+
st(Kt());
|
|
1683
|
+
const ot = F("");
|
|
1684
|
+
function er(t, e, r) {
|
|
1685
|
+
let i = ot("", e);
|
|
1686
1686
|
return i._data.type = t, i._data.title = r, i;
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1689
|
-
let s =
|
|
1688
|
+
function Pe(t, e, r, i) {
|
|
1689
|
+
let s = ot("", r);
|
|
1690
1690
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1692
|
+
function tr() {
|
|
1693
1693
|
return {
|
|
1694
|
-
create:
|
|
1695
|
-
createTmp:
|
|
1696
|
-
template:
|
|
1694
|
+
create: er,
|
|
1695
|
+
createTmp: Pe,
|
|
1696
|
+
template: Pe,
|
|
1697
1697
|
factory: F
|
|
1698
1698
|
};
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function rr(t, e, r) {
|
|
1701
1701
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1702
1702
|
return s.status = r.status, s.url = t, s;
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1704
|
+
function De(t) {
|
|
1705
1705
|
const e = t.responseText || t.response;
|
|
1706
1706
|
if (!e)
|
|
1707
1707
|
return e;
|
|
@@ -1711,7 +1711,7 @@ function Te(t) {
|
|
|
1711
1711
|
return e;
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function at(t) {
|
|
1715
1715
|
if (typeof XMLHttpRequest == "undefined")
|
|
1716
1716
|
return;
|
|
1717
1717
|
const e = new XMLHttpRequest(), r = t.action;
|
|
@@ -1719,8 +1719,8 @@ function lt(t) {
|
|
|
1719
1719
|
t.onError(o);
|
|
1720
1720
|
}, e.onload = function() {
|
|
1721
1721
|
if (e.status < 200 || e.status >= 300)
|
|
1722
|
-
return t.onError(
|
|
1723
|
-
t.onSuccess(
|
|
1722
|
+
return t.onError(rr(r, t, e), De(e));
|
|
1723
|
+
t.onSuccess(De(e));
|
|
1724
1724
|
}, e.open(t.method || "get", r, !0);
|
|
1725
1725
|
let i;
|
|
1726
1726
|
t.data && ((t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data).map((n) => {
|
|
@@ -1731,9 +1731,9 @@ function lt(t) {
|
|
|
1731
1731
|
s[n] !== null && e.setRequestHeader(n, s[n]);
|
|
1732
1732
|
}), e.send(i);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function ir(t) {
|
|
1735
1735
|
return new Promise((e, r) => {
|
|
1736
|
-
|
|
1736
|
+
at(q(y({}, t), {
|
|
1737
1737
|
onSuccess(i) {
|
|
1738
1738
|
let s = (o) => o;
|
|
1739
1739
|
const n = M(t.parse);
|
|
@@ -1747,10 +1747,10 @@ function nr(t) {
|
|
|
1747
1747
|
}));
|
|
1748
1748
|
});
|
|
1749
1749
|
}
|
|
1750
|
-
function
|
|
1750
|
+
function G(t) {
|
|
1751
1751
|
return B(t);
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function nr(t) {
|
|
1754
1754
|
function e(n) {
|
|
1755
1755
|
return f.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1756
1756
|
}
|
|
@@ -1793,13 +1793,13 @@ function sr(t) {
|
|
|
1793
1793
|
formData(n) {
|
|
1794
1794
|
return e(n).reduce((o, a) => {
|
|
1795
1795
|
const u = t.getFieldCtx(a);
|
|
1796
|
-
return u && (o[u.field] =
|
|
1797
|
-
}, t.options.appendValue !== !1 ?
|
|
1796
|
+
return u && (o[u.field] = G(u.rule.value)), o;
|
|
1797
|
+
}, t.options.appendValue !== !1 ? G(t.appendData) : {});
|
|
1798
1798
|
},
|
|
1799
1799
|
getValue(n) {
|
|
1800
1800
|
const o = t.getFieldCtx(n);
|
|
1801
1801
|
if (o)
|
|
1802
|
-
return
|
|
1802
|
+
return G(o.rule.value);
|
|
1803
1803
|
},
|
|
1804
1804
|
coverValue(n) {
|
|
1805
1805
|
const o = y({}, n || {});
|
|
@@ -1836,7 +1836,7 @@ function sr(t) {
|
|
|
1836
1836
|
}, !0), o ? o.origin : void 0;
|
|
1837
1837
|
},
|
|
1838
1838
|
removeRule(n) {
|
|
1839
|
-
const o = n &&
|
|
1839
|
+
const o = n && K(n);
|
|
1840
1840
|
if (o)
|
|
1841
1841
|
return o.rm(), o.origin;
|
|
1842
1842
|
},
|
|
@@ -1912,7 +1912,7 @@ function sr(t) {
|
|
|
1912
1912
|
n.forEach((a) => s.sync(a));
|
|
1913
1913
|
return;
|
|
1914
1914
|
}
|
|
1915
|
-
let o = f.Object(n) ?
|
|
1915
|
+
let o = f.Object(n) ? K(n) : t.getCtxs(n);
|
|
1916
1916
|
o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
|
|
1917
1917
|
if (!a.deleted) {
|
|
1918
1918
|
const u = t.subForm[a.id];
|
|
@@ -1996,7 +1996,7 @@ function sr(t) {
|
|
|
1996
1996
|
resetFields(n) {
|
|
1997
1997
|
e(n).forEach((o) => {
|
|
1998
1998
|
t.getCtxs(o).forEach((a) => {
|
|
1999
|
-
t.$render.clearCache(a), a.rule.value =
|
|
1999
|
+
t.$render.clearCache(a), a.rule.value = G(a.defaultValue);
|
|
2000
2000
|
});
|
|
2001
2001
|
}), t.vm.$nextTick(() => {
|
|
2002
2002
|
s.clearValidateState();
|
|
@@ -2005,14 +2005,14 @@ function sr(t) {
|
|
|
2005
2005
|
method(n, o) {
|
|
2006
2006
|
const a = s.el(n);
|
|
2007
2007
|
if (!a || !a[o])
|
|
2008
|
-
throw new Error(
|
|
2008
|
+
throw new Error(pe("err", `${o}方法不存在`));
|
|
2009
2009
|
return (...u) => a[o](...u);
|
|
2010
2010
|
},
|
|
2011
2011
|
exec(n, o, ...a) {
|
|
2012
2012
|
return E(() => s.method(n, o)(...a));
|
|
2013
2013
|
},
|
|
2014
2014
|
toJson(n) {
|
|
2015
|
-
return
|
|
2015
|
+
return et(s.rule, n);
|
|
2016
2016
|
},
|
|
2017
2017
|
trigger(n, o, ...a) {
|
|
2018
2018
|
const u = s.el(n);
|
|
@@ -2044,7 +2044,7 @@ function sr(t) {
|
|
|
2044
2044
|
},
|
|
2045
2045
|
fetch(n) {
|
|
2046
2046
|
return new Promise((o, a) => {
|
|
2047
|
-
t.beforeFetch(n).then(() =>
|
|
2047
|
+
t.beforeFetch(n).then(() => ir(n).then(o).catch(a));
|
|
2048
2048
|
});
|
|
2049
2049
|
},
|
|
2050
2050
|
getData(n, o) {
|
|
@@ -2064,7 +2064,7 @@ function sr(t) {
|
|
|
2064
2064
|
};
|
|
2065
2065
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2067
|
+
function sr(t) {
|
|
2068
2068
|
p(t.prototype, {
|
|
2069
2069
|
initCache() {
|
|
2070
2070
|
this.clearCacheAll();
|
|
@@ -2102,30 +2102,30 @@ function R(t) {
|
|
|
2102
2102
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2103
2103
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2104
2104
|
});
|
|
2105
|
-
return
|
|
2105
|
+
return lt(e);
|
|
2106
2106
|
}
|
|
2107
|
-
function
|
|
2107
|
+
function lt(t) {
|
|
2108
2108
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function or(t) {
|
|
2111
2111
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function X(t) {
|
|
2114
2114
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
2115
2115
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
2116
2116
|
}
|
|
2117
|
-
let
|
|
2118
|
-
function
|
|
2119
|
-
const t = 370 + ++
|
|
2117
|
+
let ar = 0;
|
|
2118
|
+
function ee() {
|
|
2119
|
+
const t = 370 + ++ar;
|
|
2120
2120
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2122
|
+
function Q(t, e, r) {
|
|
2123
2123
|
let i = t, s;
|
|
2124
2124
|
return (e || "").split(".").forEach((n) => {
|
|
2125
2125
|
s && ((!i[s] || typeof i[s] != "object") && (i[s] = {}), i = i[s]), s = n;
|
|
2126
2126
|
}), i[s] = r, i;
|
|
2127
2127
|
}
|
|
2128
|
-
function
|
|
2128
|
+
function lr(t) {
|
|
2129
2129
|
p(t.prototype, {
|
|
2130
2130
|
initRender() {
|
|
2131
2131
|
this.tempList = {}, this.clearOrgChildren();
|
|
@@ -2147,7 +2147,7 @@ function ur(t) {
|
|
|
2147
2147
|
const r = (i) => {
|
|
2148
2148
|
if (i) {
|
|
2149
2149
|
let s;
|
|
2150
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2150
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + X(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + X(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2151
2151
|
}
|
|
2152
2152
|
};
|
|
2153
2153
|
return r(this.vm);
|
|
@@ -2178,12 +2178,12 @@ function ur(t) {
|
|
|
2178
2178
|
r && (e.cacheConfig || (e.cacheConfig = r[e.originType] || r[e.type] || r[e.trueType] || {}), e.prop = U({}, [r["*"], e.cacheConfig, e.prop]));
|
|
2179
2179
|
},
|
|
2180
2180
|
setOptions(e) {
|
|
2181
|
-
e.prop.optionsTo && e.prop.options &&
|
|
2181
|
+
e.prop.optionsTo && e.prop.options && Q(e.prop, e.prop.optionsTo, e.prop.options);
|
|
2182
2182
|
},
|
|
2183
2183
|
deepSet(e) {
|
|
2184
2184
|
const r = e.rule.deep;
|
|
2185
2185
|
r && Object.keys(r).sort((i, s) => i.length < s.length ? -1 : 1).forEach((i) => {
|
|
2186
|
-
|
|
2186
|
+
Q(e.prop, i, r[i]);
|
|
2187
2187
|
});
|
|
2188
2188
|
},
|
|
2189
2189
|
setTempProps(e, r) {
|
|
@@ -2197,7 +2197,7 @@ function ur(t) {
|
|
|
2197
2197
|
},
|
|
2198
2198
|
renderTemp(e) {
|
|
2199
2199
|
if (!P.compile)
|
|
2200
|
-
return
|
|
2200
|
+
return Xt("当前使用的Vue构建版本不支持compile,无法使用template功能"), [];
|
|
2201
2201
|
const r = e.prop, { id: i, key: s } = e;
|
|
2202
2202
|
if (!this.tempList[i]) {
|
|
2203
2203
|
e.el || (e.el = this.makeVm(r), this.vm.$nextTick(() => e.parser.mounted(e)));
|
|
@@ -2374,7 +2374,7 @@ function ur(t) {
|
|
|
2374
2374
|
},
|
|
2375
2375
|
defaultRender(e, r) {
|
|
2376
2376
|
const i = e.prop;
|
|
2377
|
-
return i.component ? 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(
|
|
2377
|
+
return i.component ? 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(lt(e.originType), i, r);
|
|
2378
2378
|
},
|
|
2379
2379
|
renderRule(e, r, i) {
|
|
2380
2380
|
if (!e) return;
|
|
@@ -2393,14 +2393,14 @@ function ur(t) {
|
|
|
2393
2393
|
}
|
|
2394
2394
|
});
|
|
2395
2395
|
}
|
|
2396
|
-
function
|
|
2396
|
+
function $e(t) {
|
|
2397
2397
|
p(this, {
|
|
2398
2398
|
$handle: t,
|
|
2399
2399
|
fc: t.fc,
|
|
2400
2400
|
vm: t.vm,
|
|
2401
2401
|
$manager: t.$manager,
|
|
2402
2402
|
vNode: new t.fc.CreateNode(t.vm)
|
|
2403
|
-
}),
|
|
2403
|
+
}), it(this, {
|
|
2404
2404
|
options() {
|
|
2405
2405
|
return t.options;
|
|
2406
2406
|
},
|
|
@@ -2409,9 +2409,9 @@ function ve(t) {
|
|
|
2409
2409
|
}
|
|
2410
2410
|
}), this.initCache(), this.initRender();
|
|
2411
2411
|
}
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
function
|
|
2412
|
+
sr($e);
|
|
2413
|
+
lr($e);
|
|
2414
|
+
function ur(t) {
|
|
2415
2415
|
p(t.prototype, {
|
|
2416
2416
|
parseInjectEvent(e, r) {
|
|
2417
2417
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2441,7 +2441,7 @@ function hr(t) {
|
|
|
2441
2441
|
let m, v = n || o || a;
|
|
2442
2442
|
if (f.Object(c) && (m = c.inject, c = c.name, v = c.prefix || v), v) {
|
|
2443
2443
|
r || (v = `native-${v}`);
|
|
2444
|
-
const _ =
|
|
2444
|
+
const _ = X(`${v}-${c}`), g = (...O) => {
|
|
2445
2445
|
this.vm.$emit(_, ...O), this.vm.$emit("emit-event", _, ...O);
|
|
2446
2446
|
};
|
|
2447
2447
|
if (g.__emit = !0, !m && u === !1)
|
|
@@ -2478,13 +2478,13 @@ function hr(t) {
|
|
|
2478
2478
|
}
|
|
2479
2479
|
});
|
|
2480
2480
|
}
|
|
2481
|
-
const
|
|
2482
|
-
function
|
|
2481
|
+
const Te = ["hook:updated", "hook:mounted"];
|
|
2482
|
+
function hr(t) {
|
|
2483
2483
|
p(t.prototype, {
|
|
2484
2484
|
usePage() {
|
|
2485
2485
|
const e = this.options.page;
|
|
2486
2486
|
if (!e) return;
|
|
2487
|
-
let r = 25, i =
|
|
2487
|
+
let r = 25, i = fr(this.rules);
|
|
2488
2488
|
f.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), p(this, {
|
|
2489
2489
|
first: r,
|
|
2490
2490
|
limit: i,
|
|
@@ -2493,16 +2493,16 @@ function fr(t) {
|
|
|
2493
2493
|
},
|
|
2494
2494
|
pageLoad() {
|
|
2495
2495
|
const e = () => {
|
|
2496
|
-
this.pageEnd ? (this.vm.$off(
|
|
2496
|
+
this.pageEnd ? (this.vm.$off(Te, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2497
2497
|
};
|
|
2498
|
-
this.vm.$on(
|
|
2498
|
+
this.vm.$on(Te, e);
|
|
2499
2499
|
}
|
|
2500
2500
|
});
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function fr(t) {
|
|
2503
2503
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function cr(t) {
|
|
2506
2506
|
p(t.prototype, {
|
|
2507
2507
|
clearNextTick() {
|
|
2508
2508
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2517,13 +2517,13 @@ function dr(t) {
|
|
|
2517
2517
|
}
|
|
2518
2518
|
});
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function dr(t) {
|
|
2521
2521
|
Object.defineProperties(t.origin, {
|
|
2522
|
-
__fc__:
|
|
2522
|
+
__fc__: tt(t, !0)
|
|
2523
2523
|
});
|
|
2524
2524
|
}
|
|
2525
|
-
function
|
|
2526
|
-
const i =
|
|
2525
|
+
function ut(t, e, r) {
|
|
2526
|
+
const i = ee();
|
|
2527
2527
|
p(this, {
|
|
2528
2528
|
id: i,
|
|
2529
2529
|
ref: i,
|
|
@@ -2545,9 +2545,9 @@ function ht(t, e, r) {
|
|
|
2545
2545
|
exportEl: void 0,
|
|
2546
2546
|
defaultValue: e.field ? B(r) : void 0,
|
|
2547
2547
|
field: e.field || void 0
|
|
2548
|
-
}), this.updateKey(),
|
|
2548
|
+
}), this.updateKey(), dr(this), this.update(t, !0);
|
|
2549
2549
|
}
|
|
2550
|
-
p(
|
|
2550
|
+
p(ut.prototype, {
|
|
2551
2551
|
effectData(t) {
|
|
2552
2552
|
return this.payload[t] || (this.payload[t] = {}), this.payload[t];
|
|
2553
2553
|
},
|
|
@@ -2555,7 +2555,7 @@ p(ht.prototype, {
|
|
|
2555
2555
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2556
2556
|
},
|
|
2557
2557
|
updateKey(t) {
|
|
2558
|
-
this.key =
|
|
2558
|
+
this.key = ee(), t && this.parent && this.parent.updateKey(t);
|
|
2559
2559
|
},
|
|
2560
2560
|
updateType() {
|
|
2561
2561
|
this.originType = this.rule.type, this.type = R(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
@@ -2647,7 +2647,7 @@ p(ht.prototype, {
|
|
|
2647
2647
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
2648
2648
|
}
|
|
2649
2649
|
});
|
|
2650
|
-
function
|
|
2650
|
+
function pr(t) {
|
|
2651
2651
|
p(t.prototype, {
|
|
2652
2652
|
nextRefresh(e) {
|
|
2653
2653
|
const r = this.loadedId;
|
|
@@ -2656,10 +2656,10 @@ function mr(t) {
|
|
|
2656
2656
|
});
|
|
2657
2657
|
},
|
|
2658
2658
|
parseRule(e) {
|
|
2659
|
-
const r =
|
|
2659
|
+
const r = Ae(e);
|
|
2660
2660
|
return Object.defineProperties(r, {
|
|
2661
|
-
__origin__:
|
|
2662
|
-
}),
|
|
2661
|
+
__origin__: tt(e, !0)
|
|
2662
|
+
}), mr(r), this.appendValue(r), r.options = Array.isArray(r.options) ? r.options : [], [r, r.prefix, r.suffix].forEach((i) => {
|
|
2663
2663
|
i && this.loadFn(i, r);
|
|
2664
2664
|
}), this.loadCtrl(r), r.update && (r.update = M(r.update)), r;
|
|
2665
2665
|
},
|
|
@@ -2707,7 +2707,7 @@ function mr(t) {
|
|
|
2707
2707
|
if (r && !f.Object(n) || !this.pageEnd && !r && o >= this.first) return;
|
|
2708
2708
|
if (n.__fc__ && n.__fc__.root === e && this.ctxs[n.__fc__.id])
|
|
2709
2709
|
return s(n.__fc__.rule.children, n.__fc__), n.__fc__;
|
|
2710
|
-
let a =
|
|
2710
|
+
let a = Ae(n);
|
|
2711
2711
|
const u = () => !!(a.field && this.fieldCtx[a.field] && this.fieldCtx[a.field][0] !== n.__fc__);
|
|
2712
2712
|
this.ruleEffect(a, "init", { repeat: u() }), u() && this.vm.$emit("repeat-field", n, this.api);
|
|
2713
2713
|
let l, c = !1, m = !!n.__fc__, v = a.value;
|
|
@@ -2716,21 +2716,21 @@ function mr(t) {
|
|
|
2716
2716
|
const g = !l.check(this);
|
|
2717
2717
|
if (l.deleted) {
|
|
2718
2718
|
if (g) {
|
|
2719
|
-
if (
|
|
2719
|
+
if (Be(l))
|
|
2720
2720
|
return;
|
|
2721
2721
|
l.update(this);
|
|
2722
2722
|
}
|
|
2723
2723
|
} else if (g) {
|
|
2724
|
-
if (
|
|
2724
|
+
if (Be(l))
|
|
2725
2725
|
return;
|
|
2726
|
-
e[o] = n = n._clone ? n._clone() :
|
|
2726
|
+
e[o] = n = n._clone ? n._clone() : ye(n), l = null, c = !0;
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
2729
|
if (l)
|
|
2730
2730
|
l.originType !== l.rule.type && l.updateType(), this.bindParser(l), this.appendValue(l.rule);
|
|
2731
2731
|
else {
|
|
2732
2732
|
const g = this.parseRule(n);
|
|
2733
|
-
l = new
|
|
2733
|
+
l = new ut(this, g, v), this.bindParser(l);
|
|
2734
2734
|
}
|
|
2735
2735
|
if ([!1, !0].forEach((g) => this.parseEmit(l, g)), this.syncProp(l), l.parent = r || null, l.root = e, this.setCtx(l), !c && !m && this.effect(l, "load"), this.effect(l, "created"), l.parser.loadChildren === !1 || s(l.rule.children, l), !r) {
|
|
2736
2736
|
const g = i(o);
|
|
@@ -2746,16 +2746,16 @@ function mr(t) {
|
|
|
2746
2746
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
2747
2747
|
},
|
|
2748
2748
|
useCtrl(e) {
|
|
2749
|
-
const r =
|
|
2749
|
+
const r = yr(e), i = [], s = this.api;
|
|
2750
2750
|
if (!r.length) return !1;
|
|
2751
2751
|
for (let a = 0; a < r.length; a++) {
|
|
2752
2752
|
const u = r[a], l = u.handle || function(m) {
|
|
2753
|
-
return (
|
|
2753
|
+
return (J[u.condition || "=="] || J["=="])(m, u.value);
|
|
2754
2754
|
};
|
|
2755
2755
|
if (!f.trueArray(u.rule)) continue;
|
|
2756
2756
|
const c = q(y({}, u), {
|
|
2757
2757
|
valid: E(() => l(e.rule.value, s)),
|
|
2758
|
-
ctrl:
|
|
2758
|
+
ctrl: gr(e, u.rule),
|
|
2759
2759
|
isHidden: f.String(u.rule[0])
|
|
2760
2760
|
});
|
|
2761
2761
|
c.valid && c.ctrl || !c.valid && !c.ctrl && !c.isHidden || i.push(c);
|
|
@@ -2790,7 +2790,7 @@ function mr(t) {
|
|
|
2790
2790
|
});
|
|
2791
2791
|
} else {
|
|
2792
2792
|
e.ctrlRule.splice(e.ctrlRule.indexOf(_), 1);
|
|
2793
|
-
const O =
|
|
2793
|
+
const O = K(_);
|
|
2794
2794
|
O && O.rm();
|
|
2795
2795
|
}
|
|
2796
2796
|
});
|
|
@@ -2808,7 +2808,7 @@ function mr(t) {
|
|
|
2808
2808
|
this.bus.$once("load-end", () => {
|
|
2809
2809
|
Object.keys(r).filter((i) => this.ctxs[i] === void 0).forEach((i) => this.rmCtx(r[i])), this.$render.clearCacheAll();
|
|
2810
2810
|
}), this.reloading = !0, this.loadRule(), this.reloading = !1, this.refresh(), this.vm.$emit("reloading", this.api);
|
|
2811
|
-
}), this.
|
|
2811
|
+
}), this.vm.$emit("update", this.api);
|
|
2812
2812
|
},
|
|
2813
2813
|
//todo 组件生成全部通过 alias
|
|
2814
2814
|
refresh() {
|
|
@@ -2816,27 +2816,27 @@ function mr(t) {
|
|
|
2816
2816
|
}
|
|
2817
2817
|
});
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2820
|
-
const e =
|
|
2819
|
+
function mr(t) {
|
|
2820
|
+
const e = nt();
|
|
2821
2821
|
return Object.keys(e).forEach((r) => {
|
|
2822
2822
|
k(t, r) || w(t, r, e[r]);
|
|
2823
2823
|
}), t;
|
|
2824
2824
|
}
|
|
2825
|
-
function
|
|
2825
|
+
function yr(t) {
|
|
2826
2826
|
const e = t.rule.control || [];
|
|
2827
2827
|
return f.Object(e) ? [e] : e;
|
|
2828
2828
|
}
|
|
2829
|
-
function
|
|
2829
|
+
function gr(t, e) {
|
|
2830
2830
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
2831
2831
|
const i = t.ctrlRule[r];
|
|
2832
2832
|
if (i.children === e)
|
|
2833
2833
|
return i;
|
|
2834
2834
|
}
|
|
2835
2835
|
}
|
|
2836
|
-
function
|
|
2836
|
+
function Be(t) {
|
|
2837
2837
|
return !!t.rule.__ctrl;
|
|
2838
2838
|
}
|
|
2839
|
-
function
|
|
2839
|
+
function $r(t) {
|
|
2840
2840
|
p(t.prototype, {
|
|
2841
2841
|
getValue(e) {
|
|
2842
2842
|
return f.Undef(e.cacheValue) && (e.cacheValue = e.parser.toValue(this.getFormData(e), e)), e.cacheValue;
|
|
@@ -2859,14 +2859,14 @@ function vr(t) {
|
|
|
2859
2859
|
return this.formData[e.id];
|
|
2860
2860
|
},
|
|
2861
2861
|
validate() {
|
|
2862
|
-
return
|
|
2862
|
+
return Ne(this.vm.validate), this.fields().forEach((e) => {
|
|
2863
2863
|
this.fieldCtx[e].forEach((r) => {
|
|
2864
2864
|
this.vm.validate[r.id] = I(r.rule.validate);
|
|
2865
2865
|
});
|
|
2866
2866
|
}), this.vm.validate;
|
|
2867
2867
|
},
|
|
2868
2868
|
syncForm() {
|
|
2869
|
-
|
|
2869
|
+
Ne(this.form), Object.defineProperties(this.form, this.fields().reduce((e, r) => {
|
|
2870
2870
|
const i = this.getFieldCtx(r), s = this.valueHandle(i);
|
|
2871
2871
|
return s.configurable = !0, e[r] = s, e;
|
|
2872
2872
|
}, this.options.appendValue !== !1 ? Object.keys(this.appendData).reduce((e, r) => (e[r] = {
|
|
@@ -2902,7 +2902,7 @@ function vr(t) {
|
|
|
2902
2902
|
this.vm._updateValue(y(y({}, this.options.appendValue !== !1 ? this.appendData : {}), this.form));
|
|
2903
2903
|
},
|
|
2904
2904
|
isChange(e, r) {
|
|
2905
|
-
return JSON.stringify(e.rule.value,
|
|
2905
|
+
return JSON.stringify(e.rule.value, Le) !== JSON.stringify(r === null ? void 0 : r, Le);
|
|
2906
2906
|
},
|
|
2907
2907
|
isQuote(e, r) {
|
|
2908
2908
|
return (f.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -2935,13 +2935,13 @@ function vr(t) {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
});
|
|
2937
2937
|
}
|
|
2938
|
-
function
|
|
2938
|
+
function Le(t, e) {
|
|
2939
2939
|
return typeof e == "function" ? "" + e : e;
|
|
2940
2940
|
}
|
|
2941
|
-
function
|
|
2941
|
+
function Ne(t) {
|
|
2942
2942
|
Object.keys(t).forEach((e) => delete t[e]);
|
|
2943
2943
|
}
|
|
2944
|
-
const
|
|
2944
|
+
const he = {
|
|
2945
2945
|
init(t) {
|
|
2946
2946
|
},
|
|
2947
2947
|
toFormValue(t, e) {
|
|
@@ -2960,8 +2960,8 @@ const fe = {
|
|
|
2960
2960
|
},
|
|
2961
2961
|
mergeProp(t) {
|
|
2962
2962
|
}
|
|
2963
|
-
},
|
|
2964
|
-
function
|
|
2963
|
+
}, vr = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "component", "cache"];
|
|
2964
|
+
function br(t) {
|
|
2965
2965
|
p(t.prototype, {
|
|
2966
2966
|
getCtx(e) {
|
|
2967
2967
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -2991,7 +2991,7 @@ function Cr(t) {
|
|
|
2991
2991
|
},
|
|
2992
2992
|
getParser(e) {
|
|
2993
2993
|
const r = this.fc.parsers;
|
|
2994
|
-
return r[e.originType] || r[R(e.type)] || r[e.trueType] ||
|
|
2994
|
+
return r[e.originType] || r[R(e.type)] || r[e.trueType] || he;
|
|
2995
2995
|
},
|
|
2996
2996
|
bindParser(e) {
|
|
2997
2997
|
e.setParser(this.getParser(e));
|
|
@@ -3005,7 +3005,7 @@ function Cr(t) {
|
|
|
3005
3005
|
},
|
|
3006
3006
|
watchCtx(e) {
|
|
3007
3007
|
const r = this.vm;
|
|
3008
|
-
Object.keys(e.rule).filter((i) => i[0] !== "_" && i[0] !== "$" &&
|
|
3008
|
+
Object.keys(e.rule).filter((i) => i[0] !== "_" && i[0] !== "$" && vr.indexOf(i) === -1).forEach((i) => {
|
|
3009
3009
|
const s = i === "children";
|
|
3010
3010
|
e.watch.push(r.$watch(() => e.rule[i], (n, o) => {
|
|
3011
3011
|
if (!(this.loading || this.noWatchFn || this.reloading)) {
|
|
@@ -3054,7 +3054,7 @@ function Cr(t) {
|
|
|
3054
3054
|
}
|
|
3055
3055
|
});
|
|
3056
3056
|
}
|
|
3057
|
-
function
|
|
3057
|
+
function Cr(t) {
|
|
3058
3058
|
p(t.prototype, {
|
|
3059
3059
|
mounted() {
|
|
3060
3060
|
const e = () => {
|
|
@@ -3065,6 +3065,9 @@ function _r(t) {
|
|
|
3065
3065
|
lifecycle(e) {
|
|
3066
3066
|
this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
|
|
3067
3067
|
},
|
|
3068
|
+
targetReload() {
|
|
3069
|
+
this.bus.$off("next-tick", this.nextReload), this.bus.$once("next-tick", this.nextReload);
|
|
3070
|
+
},
|
|
3068
3071
|
emitEvent(e, ...r) {
|
|
3069
3072
|
const i = this.options[e] || this.options[R("on-" + e)];
|
|
3070
3073
|
if (i) {
|
|
@@ -3075,13 +3078,13 @@ function _r(t) {
|
|
|
3075
3078
|
}
|
|
3076
3079
|
});
|
|
3077
3080
|
}
|
|
3078
|
-
function
|
|
3081
|
+
function _r(t) {
|
|
3079
3082
|
p(t.prototype, {
|
|
3080
3083
|
useProvider() {
|
|
3081
3084
|
const e = this.fc.providers;
|
|
3082
3085
|
Object.keys(e).forEach((r) => {
|
|
3083
3086
|
let i = e[r];
|
|
3084
|
-
f.Function(i) && (i = i(this.fc)), i._c =
|
|
3087
|
+
f.Function(i) && (i = i(this.fc)), i._c = kr(i), this.onEffect(i), this.providers[r] = i;
|
|
3085
3088
|
});
|
|
3086
3089
|
},
|
|
3087
3090
|
onEffect(e) {
|
|
@@ -3152,15 +3155,15 @@ function Or(t) {
|
|
|
3152
3155
|
}
|
|
3153
3156
|
});
|
|
3154
3157
|
}
|
|
3155
|
-
function
|
|
3158
|
+
function Or(t) {
|
|
3156
3159
|
return t.filter(function(e, r, i) {
|
|
3157
3160
|
return i.indexOf(e, 0) === r;
|
|
3158
3161
|
});
|
|
3159
3162
|
}
|
|
3160
|
-
function
|
|
3163
|
+
function kr(t) {
|
|
3161
3164
|
const e = t.components;
|
|
3162
3165
|
if (Array.isArray(e)) {
|
|
3163
|
-
const r =
|
|
3166
|
+
const r = Or(e.filter((i) => i !== "*"));
|
|
3164
3167
|
return r.length ? r : !1;
|
|
3165
3168
|
} else return f.String(e) ? [e] : !1;
|
|
3166
3169
|
}
|
|
@@ -3187,14 +3190,14 @@ function A(t) {
|
|
|
3187
3190
|
nextReload: () => {
|
|
3188
3191
|
this.lifecycle("reload");
|
|
3189
3192
|
}
|
|
3190
|
-
}),
|
|
3193
|
+
}), it(this, {
|
|
3191
3194
|
options() {
|
|
3192
3195
|
return t.options;
|
|
3193
3196
|
},
|
|
3194
3197
|
bus() {
|
|
3195
3198
|
return t.bus;
|
|
3196
3199
|
}
|
|
3197
|
-
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new
|
|
3200
|
+
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new $e(this), this.api = t.extendApi(nr(this), this);
|
|
3198
3201
|
}
|
|
3199
3202
|
p(A.prototype, {
|
|
3200
3203
|
initData(t) {
|
|
@@ -3216,26 +3219,26 @@ p(A.prototype, {
|
|
|
3216
3219
|
});
|
|
3217
3220
|
}
|
|
3218
3221
|
});
|
|
3222
|
+
ur(A);
|
|
3219
3223
|
hr(A);
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
+
cr(A);
|
|
3225
|
+
pr(A);
|
|
3226
|
+
$r(A);
|
|
3227
|
+
br(A);
|
|
3224
3228
|
Cr(A);
|
|
3225
3229
|
_r(A);
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
name: Fr,
|
|
3230
|
+
const wr = "fcFragment", te = {
|
|
3231
|
+
name: wr,
|
|
3229
3232
|
functional: !0,
|
|
3230
3233
|
props: ["vnode"],
|
|
3231
3234
|
render(t, e) {
|
|
3232
3235
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3233
3236
|
}
|
|
3234
3237
|
};
|
|
3235
|
-
function
|
|
3238
|
+
function Fr(t) {
|
|
3236
3239
|
return f.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3237
3240
|
}
|
|
3238
|
-
function
|
|
3241
|
+
function Sr() {
|
|
3239
3242
|
const t = {};
|
|
3240
3243
|
function e(r) {
|
|
3241
3244
|
r && this.setVm(r);
|
|
@@ -3248,7 +3251,7 @@ function Er() {
|
|
|
3248
3251
|
return P.config.isReservedTag(r) && i.nativeOn && delete i.nativeOn, this.makeComponent(r, i, s);
|
|
3249
3252
|
},
|
|
3250
3253
|
makeComponent(r, i, s) {
|
|
3251
|
-
let n = this.$h(r,
|
|
3254
|
+
let n = this.$h(r, Fr(i), s || []);
|
|
3252
3255
|
return n.context = this.vm, n;
|
|
3253
3256
|
},
|
|
3254
3257
|
aliasMap: t
|
|
@@ -3259,7 +3262,7 @@ function Er() {
|
|
|
3259
3262
|
},
|
|
3260
3263
|
use(r) {
|
|
3261
3264
|
Object.keys(r).forEach((i) => {
|
|
3262
|
-
const s =
|
|
3265
|
+
const s = X(i), n = or(i).toLocaleLowerCase(), o = r[i];
|
|
3263
3266
|
[i, s, n].forEach((a) => {
|
|
3264
3267
|
e.alias(i, o), e.prototype[a] = function(u, l) {
|
|
3265
3268
|
return this.make(o, u, l);
|
|
@@ -3269,12 +3272,12 @@ function Er() {
|
|
|
3269
3272
|
}
|
|
3270
3273
|
}), e;
|
|
3271
3274
|
}
|
|
3272
|
-
function
|
|
3273
|
-
class e extends
|
|
3275
|
+
function Er(t) {
|
|
3276
|
+
class e extends ht {
|
|
3274
3277
|
}
|
|
3275
3278
|
return Object.assign(e.prototype, t), e;
|
|
3276
3279
|
}
|
|
3277
|
-
function
|
|
3280
|
+
function ht(t) {
|
|
3278
3281
|
p(this, {
|
|
3279
3282
|
$handle: t,
|
|
3280
3283
|
vm: t.vm,
|
|
@@ -3285,12 +3288,12 @@ function ft(t) {
|
|
|
3285
3288
|
}
|
|
3286
3289
|
}), this.updateKey(), this.init();
|
|
3287
3290
|
}
|
|
3288
|
-
p(
|
|
3291
|
+
p(ht.prototype, {
|
|
3289
3292
|
__init() {
|
|
3290
3293
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
3291
3294
|
},
|
|
3292
3295
|
updateKey() {
|
|
3293
|
-
this.key =
|
|
3296
|
+
this.key = ee();
|
|
3294
3297
|
},
|
|
3295
3298
|
//TODO interface
|
|
3296
3299
|
init() {
|
|
@@ -3330,7 +3333,7 @@ p(ft.prototype, {
|
|
|
3330
3333
|
render(t) {
|
|
3331
3334
|
}
|
|
3332
3335
|
});
|
|
3333
|
-
const
|
|
3336
|
+
const Rr = function(t) {
|
|
3334
3337
|
const e = {
|
|
3335
3338
|
name: "loadData",
|
|
3336
3339
|
_fn: [],
|
|
@@ -3343,7 +3346,7 @@ const Ir = function(t) {
|
|
|
3343
3346
|
const u = () => {
|
|
3344
3347
|
a.watch !== !1 && (t.bus.$off("p.loadData." + a.attr, u), t.bus.$once("p.loadData." + a.attr, u));
|
|
3345
3348
|
let l;
|
|
3346
|
-
a.attr && (l = t.loadData[a.attr] || a.default, a.copy !== !1 && (l = B(l))),
|
|
3349
|
+
a.attr && (l = t.loadData[a.attr] || a.default, a.copy !== !1 && (l = B(l))), Q(r.getProp(), a.to || "options", l), s.sync(i);
|
|
3347
3350
|
};
|
|
3348
3351
|
o.push(() => t.bus.$off("p.loadData." + a.attr, u)), u();
|
|
3349
3352
|
}
|
|
@@ -3356,13 +3359,13 @@ const Ir = function(t) {
|
|
|
3356
3359
|
}
|
|
3357
3360
|
};
|
|
3358
3361
|
return e.watch = e.created, e;
|
|
3359
|
-
},
|
|
3362
|
+
}, ft = {
|
|
3360
3363
|
name: "componentValidate",
|
|
3361
3364
|
load(t, e, r) {
|
|
3362
3365
|
const i = t.getValue();
|
|
3363
3366
|
i ? t.getProp().validate = [{
|
|
3364
3367
|
validator(...s) {
|
|
3365
|
-
const n =
|
|
3368
|
+
const n = K(e);
|
|
3366
3369
|
if (n)
|
|
3367
3370
|
return r.exec(n.id, i === !0 ? "formCreateValidate" : i, ...s, {
|
|
3368
3371
|
attr: t,
|
|
@@ -3373,9 +3376,9 @@ const Ir = function(t) {
|
|
|
3373
3376
|
}] : (t.clearProp(), r.clearValidateState([e.field]));
|
|
3374
3377
|
},
|
|
3375
3378
|
watch(...t) {
|
|
3376
|
-
|
|
3379
|
+
ft.load(...t);
|
|
3377
3380
|
}
|
|
3378
|
-
},
|
|
3381
|
+
}, Ir = function(t) {
|
|
3379
3382
|
function e(i) {
|
|
3380
3383
|
return f.String(i) && (i = {
|
|
3381
3384
|
action: i,
|
|
@@ -3385,7 +3388,7 @@ const Ir = function(t) {
|
|
|
3385
3388
|
function r(i, s, n) {
|
|
3386
3389
|
let o = i.value;
|
|
3387
3390
|
const a = (m) => {
|
|
3388
|
-
m === void 0 ? (i.clearProp(), n.sync(s)) :
|
|
3391
|
+
m === void 0 ? (i.clearProp(), n.sync(s)) : Q(i.getProp(), o.to || "options", m);
|
|
3389
3392
|
};
|
|
3390
3393
|
if (f.Function(o) && (o = o(s, n)), o = e(o), !o || !o.action) {
|
|
3391
3394
|
a(void 0);
|
|
@@ -3406,7 +3409,7 @@ const Ir = function(t) {
|
|
|
3406
3409
|
}), g)), a(_(m, s, n)), n.sync(s);
|
|
3407
3410
|
},
|
|
3408
3411
|
onError(m) {
|
|
3409
|
-
a(void 0), !l() && (u || ((v) =>
|
|
3412
|
+
a(void 0), !l() && (u || ((v) => me(v.message || "fetch fail " + o.action)))(m, s, n);
|
|
3410
3413
|
}
|
|
3411
3414
|
});
|
|
3412
3415
|
t.$handle.beforeFetch(c, { rule: s, api: n }).then(() => {
|
|
@@ -3430,10 +3433,10 @@ const Ir = function(t) {
|
|
|
3430
3433
|
r(...i);
|
|
3431
3434
|
}
|
|
3432
3435
|
};
|
|
3433
|
-
},
|
|
3436
|
+
}, ct = {
|
|
3434
3437
|
name: "required",
|
|
3435
3438
|
load(t, e, r) {
|
|
3436
|
-
const i =
|
|
3439
|
+
const i = jr(t.getValue());
|
|
3437
3440
|
if (i.required === !1)
|
|
3438
3441
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
3439
3442
|
else {
|
|
@@ -3452,19 +3455,19 @@ const Ir = function(t) {
|
|
|
3452
3455
|
r.sync(e);
|
|
3453
3456
|
},
|
|
3454
3457
|
watch(...t) {
|
|
3455
|
-
|
|
3458
|
+
ct.load(...t);
|
|
3456
3459
|
}
|
|
3457
3460
|
};
|
|
3458
|
-
function
|
|
3461
|
+
function jr(t) {
|
|
3459
3462
|
return f.Boolean(t) ? { required: t } : f.String(t) ? { message: t } : f.Undef(t) ? { required: !1 } : f.Function(t) ? { validator: t } : f.Object(t) ? t : {};
|
|
3460
3463
|
}
|
|
3461
|
-
const
|
|
3462
|
-
fetch:
|
|
3463
|
-
loadData:
|
|
3464
|
-
required:
|
|
3465
|
-
componentValidate:
|
|
3466
|
-
},
|
|
3467
|
-
name:
|
|
3464
|
+
const Ar = {
|
|
3465
|
+
fetch: Ir,
|
|
3466
|
+
loadData: Rr,
|
|
3467
|
+
required: ct,
|
|
3468
|
+
componentValidate: ft
|
|
3469
|
+
}, Vr = "html", Pr = {
|
|
3470
|
+
name: Vr,
|
|
3468
3471
|
loadChildren: !1,
|
|
3469
3472
|
render(t, e) {
|
|
3470
3473
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -3473,17 +3476,17 @@ const Vr = {
|
|
|
3473
3476
|
return Array.isArray(t.rule.children) ? t.rule.children.filter((e) => f.String(e)).join("") : "";
|
|
3474
3477
|
}
|
|
3475
3478
|
};
|
|
3476
|
-
function
|
|
3479
|
+
function Dr(t, e) {
|
|
3477
3480
|
let r;
|
|
3478
3481
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
3479
3482
|
}
|
|
3480
|
-
function
|
|
3481
|
-
return
|
|
3483
|
+
function re() {
|
|
3484
|
+
return Dr("name", ...arguments);
|
|
3482
3485
|
}
|
|
3483
|
-
function
|
|
3486
|
+
function Me(t) {
|
|
3484
3487
|
return !t || !t.el ? window.document.body : f.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
3485
3488
|
}
|
|
3486
|
-
function
|
|
3489
|
+
function Ue(t, e) {
|
|
3487
3490
|
const r = new P({
|
|
3488
3491
|
data() {
|
|
3489
3492
|
return { rule: t, option: e || {} };
|
|
@@ -3494,19 +3497,19 @@ function qe(t, e) {
|
|
|
3494
3497
|
});
|
|
3495
3498
|
return r.$mount(), r;
|
|
3496
3499
|
}
|
|
3497
|
-
function
|
|
3500
|
+
function Tr(t) {
|
|
3498
3501
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
3499
|
-
|
|
3502
|
+
Ye.push(...e), ce.push(...r), de.push(...i), st([...e, ...r, ...i]);
|
|
3500
3503
|
}
|
|
3501
|
-
let
|
|
3504
|
+
let Br = 1;
|
|
3502
3505
|
const S = {};
|
|
3503
|
-
function
|
|
3506
|
+
function dt(t) {
|
|
3504
3507
|
const e = {
|
|
3505
|
-
[
|
|
3506
|
-
}, r = {}, i = {}, s = y({},
|
|
3508
|
+
[te.name]: te
|
|
3509
|
+
}, r = {}, i = {}, s = y({}, Ar), n = tr();
|
|
3507
3510
|
let o = { global: {} };
|
|
3508
|
-
const a = {}, u =
|
|
3509
|
-
|
|
3511
|
+
const a = {}, u = Sr(), l = {};
|
|
3512
|
+
Tr(t.attrs || {});
|
|
3510
3513
|
function c(h) {
|
|
3511
3514
|
const d = S[h];
|
|
3512
3515
|
if (Array.isArray(d))
|
|
@@ -3515,27 +3518,27 @@ function pt(t) {
|
|
|
3515
3518
|
return d.api();
|
|
3516
3519
|
}
|
|
3517
3520
|
function m() {
|
|
3518
|
-
const h =
|
|
3521
|
+
const h = re(...arguments);
|
|
3519
3522
|
h.id && h.prop && (i[h.id] = h.prop);
|
|
3520
3523
|
}
|
|
3521
3524
|
function v() {
|
|
3522
|
-
const h =
|
|
3525
|
+
const h = re(...arguments);
|
|
3523
3526
|
h.id && h.prop && (s[h.id] = q(y({}, h.prop), { name: h.id }));
|
|
3524
3527
|
}
|
|
3525
3528
|
function _(h) {
|
|
3526
3529
|
u.use(h);
|
|
3527
3530
|
}
|
|
3528
3531
|
function g() {
|
|
3529
|
-
const h =
|
|
3530
|
-
if (!h.id || !h.prop) return
|
|
3532
|
+
const h = re(...arguments);
|
|
3533
|
+
if (!h.id || !h.prop) return he;
|
|
3531
3534
|
const d = R(h.id), $ = h.prop, b = $.merge === !0 ? r[d] : void 0;
|
|
3532
|
-
r[d] = $, Object.setPrototypeOf($, b ||
|
|
3535
|
+
r[d] = $, Object.setPrototypeOf($, b || he), n[d] = F(d), $.maker && p(n, $.maker);
|
|
3533
3536
|
}
|
|
3534
3537
|
function O(h, d) {
|
|
3535
3538
|
let $;
|
|
3536
3539
|
if (f.String(h)) {
|
|
3537
3540
|
if ($ = R(h), ["form-create", "formcreate"].indexOf($) > -1)
|
|
3538
|
-
return
|
|
3541
|
+
return W();
|
|
3539
3542
|
if (d === void 0)
|
|
3540
3543
|
return e[$];
|
|
3541
3544
|
} else
|
|
@@ -3544,38 +3547,38 @@ function pt(t) {
|
|
|
3544
3547
|
const b = R($);
|
|
3545
3548
|
e[$] = d, e[b] = d, delete u.aliasMap[$], delete u.aliasMap[b], delete r[$], delete r[b], d.formCreateParser && g($, d.formCreateParser);
|
|
3546
3549
|
}
|
|
3547
|
-
function
|
|
3550
|
+
function ve(h) {
|
|
3548
3551
|
Object.keys(S).forEach((d) => {
|
|
3549
3552
|
(Array.isArray(S[d]) ? S[d] : [S[d]]).forEach((b) => {
|
|
3550
3553
|
b.bus.$emit("p.loadData." + h);
|
|
3551
3554
|
});
|
|
3552
3555
|
});
|
|
3553
3556
|
}
|
|
3554
|
-
function
|
|
3555
|
-
a[h] = d,
|
|
3557
|
+
function be(h, d) {
|
|
3558
|
+
a[h] = d, ve(h);
|
|
3556
3559
|
}
|
|
3557
|
-
function
|
|
3560
|
+
function Ce(h, d) {
|
|
3558
3561
|
return k(a, h) ? a[h] : d;
|
|
3559
3562
|
}
|
|
3560
|
-
function
|
|
3561
|
-
delete a[h],
|
|
3563
|
+
function pt(h) {
|
|
3564
|
+
delete a[h], ve(h);
|
|
3562
3565
|
}
|
|
3563
|
-
function
|
|
3564
|
-
return
|
|
3566
|
+
function W() {
|
|
3567
|
+
return xt(Oe, e, i);
|
|
3565
3568
|
}
|
|
3566
|
-
function
|
|
3567
|
-
return
|
|
3569
|
+
function _e() {
|
|
3570
|
+
return te;
|
|
3568
3571
|
}
|
|
3569
|
-
function
|
|
3572
|
+
function mt(h, d) {
|
|
3570
3573
|
return f.Function(h.install) ? h.install(N, d) : f.Function(h) && h(N, d), this;
|
|
3571
3574
|
}
|
|
3572
3575
|
function N(h, d, $) {
|
|
3573
|
-
let b =
|
|
3576
|
+
let b = Ue(h, d || {});
|
|
3574
3577
|
const j = b.$refs.fc.formCreate;
|
|
3575
|
-
return j.$parent = $,
|
|
3578
|
+
return j.$parent = $, Me(j.options).appendChild(b.$el), j.api();
|
|
3576
3579
|
}
|
|
3577
3580
|
Object.setPrototypeOf(N, l);
|
|
3578
|
-
function
|
|
3581
|
+
function yt(h) {
|
|
3579
3582
|
let d = y({}, t);
|
|
3580
3583
|
return h ? d.inherit = {
|
|
3581
3584
|
components: e,
|
|
@@ -3584,26 +3587,26 @@ function pt(t) {
|
|
|
3584
3587
|
providers: s,
|
|
3585
3588
|
maker: n,
|
|
3586
3589
|
loadData: a
|
|
3587
|
-
} : delete d.inherit,
|
|
3590
|
+
} : delete d.inherit, dt(d);
|
|
3588
3591
|
}
|
|
3589
|
-
function
|
|
3592
|
+
function Oe(h) {
|
|
3590
3593
|
const d = h.$options.propsData.rule;
|
|
3591
3594
|
p(this, {
|
|
3592
|
-
id:
|
|
3595
|
+
id: Br++,
|
|
3593
3596
|
vm: h,
|
|
3594
3597
|
create: N,
|
|
3595
|
-
manager:
|
|
3598
|
+
manager: Er(t.manager),
|
|
3596
3599
|
parsers: r,
|
|
3597
3600
|
providers: s,
|
|
3598
3601
|
rules: Array.isArray(d) ? d : [],
|
|
3599
|
-
name: h.$options.propsData.name ||
|
|
3602
|
+
name: h.$options.propsData.name || ee(),
|
|
3600
3603
|
inFor: h.$options.propsData.inFor,
|
|
3601
3604
|
prop: {
|
|
3602
3605
|
components: e,
|
|
3603
3606
|
directives: i
|
|
3604
3607
|
},
|
|
3605
|
-
setData:
|
|
3606
|
-
getData:
|
|
3608
|
+
setData: be,
|
|
3609
|
+
getData: Ce,
|
|
3607
3610
|
loadData: a,
|
|
3608
3611
|
CreateNode: u,
|
|
3609
3612
|
bus: new P(),
|
|
@@ -3612,7 +3615,7 @@ function pt(t) {
|
|
|
3612
3615
|
extendApi: t.extendApi || (($) => $)
|
|
3613
3616
|
}), this.init(), this.initOptions(), this.name && (this.inFor ? (S[this.name] || (S[this.name] = []), S[this.name].push(this)) : S[this.name] = this);
|
|
3614
3617
|
}
|
|
3615
|
-
p(
|
|
3618
|
+
p(Oe.prototype, {
|
|
3616
3619
|
init() {
|
|
3617
3620
|
const h = this.vm, d = new A(this);
|
|
3618
3621
|
this.$handle = d, h.$f = d.api, h.$emit("input", d.api), h.$on("hook:created", () => {
|
|
@@ -3641,9 +3644,9 @@ function pt(t) {
|
|
|
3641
3644
|
this.isSub() && this.mergeOptions(this.options, this.vm.$pfc.$f.config || {}, !0), h = this.mergeOptions(h, this.vm.$options.propsData.option), this.updateOptions(h);
|
|
3642
3645
|
},
|
|
3643
3646
|
mergeOptions(h, d, $) {
|
|
3644
|
-
return d = B(d), $ && ["page", "onSubmit", "mounted", "reload", "formData", "el"].forEach((b) => {
|
|
3647
|
+
return d = B(d), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el"].forEach((b) => {
|
|
3645
3648
|
delete d[b];
|
|
3646
|
-
}), d.global && (h.global =
|
|
3649
|
+
}), d.global && (h.global = Yt(h.global, d.global), delete d.global), this.$handle.$manager.mergeOptions([d], h), h;
|
|
3647
3650
|
},
|
|
3648
3651
|
updateOptions(h) {
|
|
3649
3652
|
this.mergeOptions(this.options, h), this.$handle.$manager.updateOptions(this.options);
|
|
@@ -3661,35 +3664,35 @@ function pt(t) {
|
|
|
3661
3664
|
this.$handle.mounted();
|
|
3662
3665
|
}
|
|
3663
3666
|
});
|
|
3664
|
-
function
|
|
3667
|
+
function ke(h) {
|
|
3665
3668
|
p(h, {
|
|
3666
3669
|
version: t.version,
|
|
3667
3670
|
ui: t.ui,
|
|
3668
|
-
setData:
|
|
3669
|
-
getData:
|
|
3670
|
-
removeData:
|
|
3671
|
+
setData: be,
|
|
3672
|
+
getData: Ce,
|
|
3673
|
+
removeData: pt,
|
|
3671
3674
|
maker: n,
|
|
3672
3675
|
component: O,
|
|
3673
3676
|
directive: m,
|
|
3674
3677
|
register: v,
|
|
3675
|
-
$vnode:
|
|
3678
|
+
$vnode: _e,
|
|
3676
3679
|
parser: g,
|
|
3677
|
-
use:
|
|
3678
|
-
factory:
|
|
3680
|
+
use: mt,
|
|
3681
|
+
factory: yt,
|
|
3679
3682
|
componentAlias: _,
|
|
3680
|
-
copyRule:
|
|
3681
|
-
copyRules:
|
|
3682
|
-
fetch:
|
|
3683
|
-
$form:
|
|
3683
|
+
copyRule: ye,
|
|
3684
|
+
copyRules: rt,
|
|
3685
|
+
fetch: at,
|
|
3686
|
+
$form: W,
|
|
3684
3687
|
parseFn: M,
|
|
3685
|
-
parseJson:
|
|
3686
|
-
toJson:
|
|
3688
|
+
parseJson: Zt,
|
|
3689
|
+
toJson: et,
|
|
3687
3690
|
getApi: c,
|
|
3688
3691
|
init(d, $ = {}) {
|
|
3689
|
-
let b =
|
|
3692
|
+
let b = Ue(d, $), j = b.$refs.fc.formCreate;
|
|
3690
3693
|
return {
|
|
3691
3694
|
mount(H) {
|
|
3692
|
-
return H && f.Element(H) && (j.options.el = H),
|
|
3695
|
+
return H && f.Element(H) && (j.options.el = H), Me(j.options).appendChild(b.$el), j.api();
|
|
3693
3696
|
},
|
|
3694
3697
|
remove() {
|
|
3695
3698
|
b.$el.parentNode && b.$el.parentNode.removeChild(b.$el);
|
|
@@ -3702,7 +3705,7 @@ function pt(t) {
|
|
|
3702
3705
|
}
|
|
3703
3706
|
});
|
|
3704
3707
|
}
|
|
3705
|
-
function
|
|
3708
|
+
function gt(h) {
|
|
3706
3709
|
p(h, {
|
|
3707
3710
|
create: N,
|
|
3708
3711
|
install(d, $) {
|
|
@@ -3711,16 +3714,16 @@ function pt(t) {
|
|
|
3711
3714
|
const b = function(j, H = {}) {
|
|
3712
3715
|
return N(j, H, this);
|
|
3713
3716
|
};
|
|
3714
|
-
|
|
3717
|
+
ke(b), d.prototype.$formCreate = b, d.component("FormCreate", W()), d.component("FcFragment", _e());
|
|
3715
3718
|
}
|
|
3716
3719
|
});
|
|
3717
3720
|
}
|
|
3718
|
-
if (
|
|
3721
|
+
if (ke(l), gt(l), u.use({ fragment: "fcFragment" }), g(Pr), t.install && N.use(t), t.inherit) {
|
|
3719
3722
|
const h = t.inherit;
|
|
3720
3723
|
h.components && p(e, h.components), h.parsers && p(r, h.parsers), h.directives && p(i, h.directives), h.providers && p(s, h.providers), h.maker && p(n, h.maker), h.loadData && p(a, h.loadData);
|
|
3721
3724
|
}
|
|
3722
|
-
const
|
|
3723
|
-
return Object.setPrototypeOf(
|
|
3725
|
+
const x = W();
|
|
3726
|
+
return Object.setPrototypeOf(x, l), Object.defineProperties(x, {
|
|
3724
3727
|
fetch: {
|
|
3725
3728
|
get() {
|
|
3726
3729
|
return l.fetch;
|
|
@@ -3729,9 +3732,9 @@ function pt(t) {
|
|
|
3729
3732
|
l.fetch = h;
|
|
3730
3733
|
}
|
|
3731
3734
|
}
|
|
3732
|
-
}),
|
|
3735
|
+
}), x.util = l, x;
|
|
3733
3736
|
}
|
|
3734
|
-
function
|
|
3737
|
+
function ie(t) {
|
|
3735
3738
|
if (f.Date(t))
|
|
3736
3739
|
return t;
|
|
3737
3740
|
{
|
|
@@ -3739,14 +3742,14 @@ function ne(t) {
|
|
|
3739
3742
|
return e.toString() === "Invalid Date" ? t : e;
|
|
3740
3743
|
}
|
|
3741
3744
|
}
|
|
3742
|
-
const
|
|
3743
|
-
name:
|
|
3745
|
+
const qe = "datePicker", Lr = {
|
|
3746
|
+
name: qe,
|
|
3744
3747
|
maker: function() {
|
|
3745
|
-
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = F(
|
|
3748
|
+
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = F(qe, { type: e.toLowerCase() }), t), {});
|
|
3746
3749
|
}(),
|
|
3747
3750
|
mergeProp(t) {
|
|
3748
3751
|
let e = t.prop.props;
|
|
3749
|
-
e.startDate && (e.startDate = e.startDate &&
|
|
3752
|
+
e.startDate && (e.startDate = e.startDate && ie(e.startDate));
|
|
3750
3753
|
},
|
|
3751
3754
|
isRange(t) {
|
|
3752
3755
|
return t.type.includes("range") || t.multiple;
|
|
@@ -3765,60 +3768,60 @@ const He = "datePicker", Nr = {
|
|
|
3765
3768
|
return this.isRange(e.el) ? r : r[0];
|
|
3766
3769
|
} else {
|
|
3767
3770
|
let r = Array.isArray(t), i = e.prop.props, s, n = i.type || "date";
|
|
3768
|
-
return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ?
|
|
3771
|
+
return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ? ie(o) : "") : s = ["", ""] : n === "date" && i.multiple === !0 ? s = toString(t) : (s = r ? t[0] || "" : t, s = s ? ie(s) : ""), s;
|
|
3769
3772
|
}
|
|
3770
3773
|
},
|
|
3771
3774
|
mounted(t) {
|
|
3772
3775
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
3773
3776
|
}
|
|
3774
|
-
},
|
|
3775
|
-
name:
|
|
3777
|
+
}, ne = "hidden", Nr = {
|
|
3778
|
+
name: ne,
|
|
3776
3779
|
maker: {
|
|
3777
|
-
[
|
|
3780
|
+
[ne]: (t, e) => F(ne)("", t, e)
|
|
3778
3781
|
},
|
|
3779
3782
|
render() {
|
|
3780
3783
|
return [];
|
|
3781
3784
|
}
|
|
3782
|
-
},
|
|
3783
|
-
name:
|
|
3785
|
+
}, se = "input", Mr = {
|
|
3786
|
+
name: se,
|
|
3784
3787
|
maker: function() {
|
|
3785
|
-
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = F(
|
|
3786
|
-
return t.idate = F(
|
|
3788
|
+
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = F(se, { type: r }), e), {});
|
|
3789
|
+
return t.idate = F(se, { type: "date" }), t;
|
|
3787
3790
|
}(),
|
|
3788
3791
|
mergeProp(t) {
|
|
3789
3792
|
let { props: e } = t.prop;
|
|
3790
3793
|
e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
3791
3794
|
}
|
|
3792
|
-
},
|
|
3793
|
-
name:
|
|
3795
|
+
}, He = "slider", Ur = {
|
|
3796
|
+
name: He,
|
|
3794
3797
|
maker: {
|
|
3795
|
-
sliderRange: F(
|
|
3798
|
+
sliderRange: F(He, { range: !0 })
|
|
3796
3799
|
},
|
|
3797
3800
|
toFormValue(t, e) {
|
|
3798
3801
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
3799
3802
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
3800
3803
|
}
|
|
3801
|
-
},
|
|
3804
|
+
}, qr = {
|
|
3802
3805
|
name: "switch",
|
|
3803
3806
|
mergeProp(t) {
|
|
3804
3807
|
const e = t.prop.props.slot || {}, r = t.prop.scopedSlots || {};
|
|
3805
3808
|
e.open && (r.open = () => e.open), e.close && (r.close = () => e.close), t.prop.scopedSlots = r;
|
|
3806
3809
|
}
|
|
3807
|
-
},
|
|
3810
|
+
}, Hr = {
|
|
3808
3811
|
name: "FcRow",
|
|
3809
3812
|
render(t, e) {
|
|
3810
3813
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
3811
3814
|
e.vNode.row(e.prop, t)
|
|
3812
3815
|
]);
|
|
3813
3816
|
}
|
|
3814
|
-
},
|
|
3817
|
+
}, Jr = [
|
|
3818
|
+
Lr,
|
|
3815
3819
|
Nr,
|
|
3816
3820
|
Mr,
|
|
3817
3821
|
Ur,
|
|
3818
3822
|
qr,
|
|
3819
|
-
Hr
|
|
3820
|
-
|
|
3821
|
-
], Wr = {
|
|
3823
|
+
Hr
|
|
3824
|
+
], zr = {
|
|
3822
3825
|
button: "iButton",
|
|
3823
3826
|
icon: "Icon",
|
|
3824
3827
|
slider: "Slider",
|
|
@@ -3844,21 +3847,21 @@ const He = "datePicker", Nr = {
|
|
|
3844
3847
|
group: "fcGroup",
|
|
3845
3848
|
subForm: "fcSubForm",
|
|
3846
3849
|
object: "fcSubForm"
|
|
3847
|
-
},
|
|
3850
|
+
}, Z = {
|
|
3848
3851
|
resetBtnType: "default",
|
|
3849
3852
|
resetBtnIcon: "md-refresh",
|
|
3850
3853
|
infoIcon: "ios-information-circle-outline"
|
|
3851
3854
|
};
|
|
3852
|
-
function
|
|
3855
|
+
function Wr() {
|
|
3853
3856
|
return {
|
|
3854
3857
|
type: "poptip",
|
|
3855
3858
|
trigger: "hover",
|
|
3856
3859
|
placement: "top-start",
|
|
3857
3860
|
wordWrap: !0,
|
|
3858
|
-
icon:
|
|
3861
|
+
icon: Z.infoIcon
|
|
3859
3862
|
};
|
|
3860
3863
|
}
|
|
3861
|
-
function
|
|
3864
|
+
function xr() {
|
|
3862
3865
|
return {
|
|
3863
3866
|
form: {
|
|
3864
3867
|
inline: !1,
|
|
@@ -3880,9 +3883,9 @@ function Gr() {
|
|
|
3880
3883
|
click: void 0
|
|
3881
3884
|
},
|
|
3882
3885
|
resetBtn: {
|
|
3883
|
-
type:
|
|
3886
|
+
type: Z.resetBtnType,
|
|
3884
3887
|
disabled: !1,
|
|
3885
|
-
icon:
|
|
3888
|
+
icon: Z.resetBtnIcon,
|
|
3886
3889
|
innerText: "重置",
|
|
3887
3890
|
loading: !1,
|
|
3888
3891
|
show: !1,
|
|
@@ -3890,16 +3893,16 @@ function Gr() {
|
|
|
3890
3893
|
}
|
|
3891
3894
|
};
|
|
3892
3895
|
}
|
|
3893
|
-
function
|
|
3896
|
+
function Je(t, e) {
|
|
3894
3897
|
k(t, e) && f.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
3895
3898
|
}
|
|
3896
3899
|
function V(t) {
|
|
3897
3900
|
return t === !1;
|
|
3898
3901
|
}
|
|
3899
|
-
function
|
|
3902
|
+
function Gr(t, e) {
|
|
3900
3903
|
k(t, e) && !f.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
3901
3904
|
}
|
|
3902
|
-
const
|
|
3905
|
+
const Kr = {
|
|
3903
3906
|
validate() {
|
|
3904
3907
|
const t = this.form();
|
|
3905
3908
|
return t ? new Promise((e, r) => {
|
|
@@ -3922,11 +3925,11 @@ const Xr = {
|
|
|
3922
3925
|
},
|
|
3923
3926
|
tidyOptions(t) {
|
|
3924
3927
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
3925
|
-
|
|
3928
|
+
Gr(t, e);
|
|
3926
3929
|
}), t;
|
|
3927
3930
|
},
|
|
3928
3931
|
tidyRule({ prop: t }) {
|
|
3929
|
-
return
|
|
3932
|
+
return Je(t, "title"), Je(t, "info"), t;
|
|
3930
3933
|
},
|
|
3931
3934
|
mergeProp(t) {
|
|
3932
3935
|
t.prop = D([{
|
|
@@ -3935,7 +3938,7 @@ const Xr = {
|
|
|
3935
3938
|
col: this.options.col || {},
|
|
3936
3939
|
title: this.options.title || {}
|
|
3937
3940
|
}, t.prop], {
|
|
3938
|
-
info:
|
|
3941
|
+
info: Wr(),
|
|
3939
3942
|
title: {},
|
|
3940
3943
|
col: { span: 24 },
|
|
3941
3944
|
wrap: {}
|
|
@@ -3945,7 +3948,7 @@ const Xr = {
|
|
|
3945
3948
|
!t.size && this.options.form.size && (t.size = this.options.form.size);
|
|
3946
3949
|
},
|
|
3947
3950
|
getDefaultOptions() {
|
|
3948
|
-
return
|
|
3951
|
+
return xr();
|
|
3949
3952
|
},
|
|
3950
3953
|
update() {
|
|
3951
3954
|
const t = this.options.form;
|
|
@@ -4003,7 +4006,7 @@ const Xr = {
|
|
|
4003
4006
|
s.info && !k(a.props, u) && (a.props[u] = s.info), o[s.align !== "left" ? "unshift" : "push"](this.$r(D([s, a]), [
|
|
4004
4007
|
this.$r({
|
|
4005
4008
|
type: "icon",
|
|
4006
|
-
props: { type: s.icon === !0 ?
|
|
4009
|
+
props: { type: s.icon === !0 ? Z.infoIcon : s.icon, size: 16 },
|
|
4007
4010
|
style: "margin-top: -1px",
|
|
4008
4011
|
key: `${e}i`
|
|
4009
4012
|
})
|
|
@@ -4078,13 +4081,13 @@ const Xr = {
|
|
|
4078
4081
|
key: `${this.key}b1`
|
|
4079
4082
|
}, [t.innerText]);
|
|
4080
4083
|
}
|
|
4081
|
-
}, L = {},
|
|
4082
|
-
function
|
|
4083
|
-
|
|
4084
|
+
}, L = {}, Xr = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
|
|
4085
|
+
function Qr(t) {
|
|
4086
|
+
Xr.forEach((e) => {
|
|
4084
4087
|
t[e] = F(e);
|
|
4085
4088
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
4086
4089
|
}
|
|
4087
|
-
function
|
|
4090
|
+
function Zr(t) {
|
|
4088
4091
|
const e = "upload", r = {
|
|
4089
4092
|
image: ["image", 0],
|
|
4090
4093
|
file: ["file", 0],
|
|
@@ -4093,19 +4096,19 @@ function Yr(t) {
|
|
|
4093
4096
|
};
|
|
4094
4097
|
Object.keys(r).reduce((i, s) => (i[s] = F(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
4095
4098
|
}
|
|
4096
|
-
function
|
|
4099
|
+
function Yr(t) {
|
|
4097
4100
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
4098
4101
|
Object.keys(r).reduce((i, s) => (i[s] = F(e, { type: r[s] }), i), t);
|
|
4099
4102
|
}
|
|
4100
|
-
function
|
|
4103
|
+
function ei(t) {
|
|
4101
4104
|
const e = "timePicker";
|
|
4102
4105
|
t.time = F(e, { type: "time" }), t.timeRange = F(e, { type: "timerange" });
|
|
4103
4106
|
}
|
|
4104
|
-
function
|
|
4107
|
+
function ti(t) {
|
|
4105
4108
|
const e = "select";
|
|
4106
4109
|
t.selectMultiple = F(e, { multiple: !0 }), t.selectOne = F(e, { multiple: !1 });
|
|
4107
4110
|
}
|
|
4108
|
-
function
|
|
4111
|
+
function ri(t) {
|
|
4109
4112
|
const e = "frame", r = {
|
|
4110
4113
|
frameInputs: ["input", 0],
|
|
4111
4114
|
frameFiles: ["file", 0],
|
|
@@ -4116,16 +4119,16 @@ function ii(t) {
|
|
|
4116
4119
|
};
|
|
4117
4120
|
Object.keys(r).reduce((i, s) => (i[s] = F(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;
|
|
4118
4121
|
}
|
|
4122
|
+
Qr(L);
|
|
4119
4123
|
Zr(L);
|
|
4120
4124
|
Yr(L);
|
|
4121
|
-
ei(L);
|
|
4122
|
-
ri(L);
|
|
4123
|
-
ii(L);
|
|
4124
4125
|
ti(L);
|
|
4125
|
-
|
|
4126
|
+
ri(L);
|
|
4127
|
+
ei(L);
|
|
4128
|
+
function ze(t, e) {
|
|
4126
4129
|
return f.Boolean(t) ? t = { show: t } : !f.Undef(t) && !f.Object(t) && (t = { show: e }), t;
|
|
4127
4130
|
}
|
|
4128
|
-
function
|
|
4131
|
+
function ii(t, e) {
|
|
4129
4132
|
return p(t, {
|
|
4130
4133
|
formEl() {
|
|
4131
4134
|
return e.$manager.form();
|
|
@@ -4199,11 +4202,11 @@ function ni(t, e) {
|
|
|
4199
4202
|
}
|
|
4200
4203
|
},
|
|
4201
4204
|
submitBtnProps: (r = {}) => {
|
|
4202
|
-
let i =
|
|
4205
|
+
let i = ze(e.options.submitBtn, !0);
|
|
4203
4206
|
p(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
4204
4207
|
},
|
|
4205
4208
|
resetBtnProps: (r = {}) => {
|
|
4206
|
-
let i =
|
|
4209
|
+
let i = ze(e.options.resetBtn, !1);
|
|
4207
4210
|
p(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
4208
4211
|
},
|
|
4209
4212
|
submit(r, i) {
|
|
@@ -4218,22 +4221,22 @@ function ni(t, e) {
|
|
|
4218
4221
|
}
|
|
4219
4222
|
}), t;
|
|
4220
4223
|
}
|
|
4221
|
-
function
|
|
4222
|
-
t.componentAlias(
|
|
4224
|
+
function ni(t) {
|
|
4225
|
+
t.componentAlias(zr), Wt.forEach((e) => {
|
|
4223
4226
|
t.component(e.name, e);
|
|
4224
|
-
}),
|
|
4227
|
+
}), Jr.forEach((e) => {
|
|
4225
4228
|
t.parser(e);
|
|
4226
4229
|
}), Object.keys(L).forEach((e) => {
|
|
4227
4230
|
t.maker[e] = L[e];
|
|
4228
4231
|
});
|
|
4229
4232
|
}
|
|
4230
|
-
function
|
|
4231
|
-
return
|
|
4233
|
+
function si() {
|
|
4234
|
+
return dt({
|
|
4232
4235
|
ui: "view-design",
|
|
4233
|
-
version: "2.6.
|
|
4234
|
-
manager:
|
|
4235
|
-
install:
|
|
4236
|
-
extendApi:
|
|
4236
|
+
version: "2.6.2",
|
|
4237
|
+
manager: Kr,
|
|
4238
|
+
install: ni,
|
|
4239
|
+
extendApi: ii,
|
|
4237
4240
|
attrs: {
|
|
4238
4241
|
normal: ["col", "wrap"],
|
|
4239
4242
|
array: ["className"],
|
|
@@ -4241,10 +4244,10 @@ function oi() {
|
|
|
4241
4244
|
}
|
|
4242
4245
|
});
|
|
4243
4246
|
}
|
|
4244
|
-
const
|
|
4245
|
-
typeof window != "undefined" && (window.formCreate =
|
|
4246
|
-
const
|
|
4247
|
+
const fe = si();
|
|
4248
|
+
typeof window != "undefined" && (window.formCreate = fe, window.Vue && fe.install(window.Vue));
|
|
4249
|
+
const li = fe.maker;
|
|
4247
4250
|
export {
|
|
4248
|
-
|
|
4249
|
-
|
|
4251
|
+
fe as default,
|
|
4252
|
+
li as maker
|
|
4250
4253
|
};
|