@form-create/iview 2.7.1 → 2.7.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 +505 -462
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +4 -4
- package/src/core/config.js +2 -2
- package/src/core/manager.js +5 -5
- package/src/core/provider.js +3 -2
package/dist/form-create.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/iview v2.7.
|
|
3
|
+
* @form-create/iview v2.7.2
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -9,17 +9,17 @@
|
|
|
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
10
|
var rr = Object.defineProperty, ir = Object.defineProperties;
|
|
11
11
|
var nr = Object.getOwnPropertyDescriptors;
|
|
12
|
-
var
|
|
12
|
+
var ot = Object.getOwnPropertySymbols;
|
|
13
13
|
var sr = Object.prototype.hasOwnProperty, or = Object.prototype.propertyIsEnumerable;
|
|
14
|
-
var
|
|
14
|
+
var at = (t, e, r) => e in t ? rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
|
|
15
15
|
for (var r in e || (e = {}))
|
|
16
|
-
sr.call(e, r) &&
|
|
17
|
-
if (
|
|
18
|
-
for (var r of
|
|
19
|
-
or.call(e, r) &&
|
|
16
|
+
sr.call(e, r) && at(t, r, e[r]);
|
|
17
|
+
if (ot)
|
|
18
|
+
for (var r of ot(e))
|
|
19
|
+
or.call(e, r) && at(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
|
-
},
|
|
22
|
-
import he, { getCurrentInstance as ar, provide as lr, inject as ur, toRefs as
|
|
21
|
+
}, q = (t, e) => ir(t, nr(e));
|
|
22
|
+
import he, { getCurrentInstance as ar, provide as lr, inject as ur, toRefs as lt, reactive as x, onBeforeMount as fr, watch as L, onMounted as cr, onBeforeUnmount as hr, onUpdated as dr, nextTick as P, markRaw as fe, computed as ce, toRef as Re, ref as pr } from "vue";
|
|
23
23
|
function mr(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ var gr = ["attrs", "props", "domProps"], yr = ["class", "style", "directives"],
|
|
|
51
51
|
};
|
|
52
52
|
}, _r = vr;
|
|
53
53
|
const D = /* @__PURE__ */ mr(_r);
|
|
54
|
-
function
|
|
54
|
+
function De(t, e) {
|
|
55
55
|
return Object.keys(t).reduce((r, i) => ((!e || e.indexOf(i) === -1) && r.push(t[i]), r), []);
|
|
56
56
|
}
|
|
57
57
|
const Cr = "fcCheckbox", wr = {
|
|
@@ -117,17 +117,17 @@ const Cr = "fcCheckbox", wr = {
|
|
|
117
117
|
}, {
|
|
118
118
|
key: "" + r + "-" + e.value
|
|
119
119
|
}]));
|
|
120
|
-
}),
|
|
120
|
+
}), De(this.$slots)]);
|
|
121
121
|
},
|
|
122
122
|
mounted() {
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function H(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
129
|
const Or = "fcFrame";
|
|
130
|
-
function
|
|
130
|
+
function Ot(t) {
|
|
131
131
|
return {
|
|
132
132
|
name: Or,
|
|
133
133
|
props: {
|
|
@@ -170,11 +170,11 @@ function wt(t) {
|
|
|
170
170
|
},
|
|
171
171
|
okBtnText: {
|
|
172
172
|
type: String,
|
|
173
|
-
default: "
|
|
173
|
+
default: ""
|
|
174
174
|
},
|
|
175
175
|
closeBtnText: {
|
|
176
176
|
type: String,
|
|
177
|
-
default: "
|
|
177
|
+
default: ""
|
|
178
178
|
},
|
|
179
179
|
modalTitle: String,
|
|
180
180
|
handleIcon: {
|
|
@@ -250,7 +250,7 @@ function wt(t) {
|
|
|
250
250
|
},
|
|
251
251
|
data() {
|
|
252
252
|
return {
|
|
253
|
-
fileList:
|
|
253
|
+
fileList: H(this.value),
|
|
254
254
|
previewVisible: !1,
|
|
255
255
|
frameVisible: !1,
|
|
256
256
|
previewImage: ""
|
|
@@ -258,7 +258,7 @@ function wt(t) {
|
|
|
258
258
|
},
|
|
259
259
|
watch: {
|
|
260
260
|
value(e) {
|
|
261
|
-
this.fileList =
|
|
261
|
+
this.fileList = H(e);
|
|
262
262
|
},
|
|
263
263
|
fileList(e) {
|
|
264
264
|
const r = this.maxLength === 1 ? e[0] || "" : e;
|
|
@@ -425,14 +425,14 @@ function wt(t) {
|
|
|
425
425
|
on: {
|
|
426
426
|
click: () => this.onCancel() !== !1 && this.closeModel(!0)
|
|
427
427
|
}
|
|
428
|
-
}, [i])), n && a.push(e("Button", {
|
|
428
|
+
}, [i || this.formCreateInject.t("close") || "关闭"])), n && a.push(e("Button", {
|
|
429
429
|
attrs: {
|
|
430
430
|
type: "primary"
|
|
431
431
|
},
|
|
432
432
|
on: {
|
|
433
433
|
click: () => this.onOk() !== !1 && this.closeModel()
|
|
434
434
|
}
|
|
435
|
-
}, [r]))), a;
|
|
435
|
+
}, [r || this.formCreateInject.t("ok") || "确定"]))), a;
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
render() {
|
|
@@ -503,15 +503,15 @@ function wt(t) {
|
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
505
|
}
|
|
506
|
-
const
|
|
506
|
+
const Ft = Ot({
|
|
507
507
|
fileIcon: "md-document",
|
|
508
508
|
fileUpIcon: "ios-folder-open"
|
|
509
509
|
});
|
|
510
|
-
|
|
510
|
+
Ft.v2 = Ot({
|
|
511
511
|
fileIcon: "document-text",
|
|
512
512
|
fileUpIcon: "folder"
|
|
513
513
|
});
|
|
514
|
-
const Fr = "fcRadio",
|
|
514
|
+
const Fr = "fcRadio", Sr = {
|
|
515
515
|
name: Fr,
|
|
516
516
|
props: {
|
|
517
517
|
formCreateInject: {
|
|
@@ -569,7 +569,7 @@ const Fr = "fcRadio", kr = {
|
|
|
569
569
|
}, {
|
|
570
570
|
key: "" + r + "-" + e.value
|
|
571
571
|
}]));
|
|
572
|
-
}),
|
|
572
|
+
}), De(this.$slots)]);
|
|
573
573
|
},
|
|
574
574
|
mounted() {
|
|
575
575
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -604,11 +604,11 @@ const Fr = "fcRadio", kr = {
|
|
|
604
604
|
return h.type(e, t);
|
|
605
605
|
};
|
|
606
606
|
});
|
|
607
|
-
function
|
|
607
|
+
function k(t, e) {
|
|
608
608
|
return {}.hasOwnProperty.call(t, e);
|
|
609
609
|
}
|
|
610
|
-
const
|
|
611
|
-
name:
|
|
610
|
+
const kr = "fcSelect", Rr = {
|
|
611
|
+
name: kr,
|
|
612
612
|
functional: !0,
|
|
613
613
|
props: {
|
|
614
614
|
formCreateInject: {
|
|
@@ -634,7 +634,7 @@ const Rr = "fcSelect", Sr = {
|
|
|
634
634
|
}, [h.trueArray(n.options) && n.options.map((a, l) => r(a, l))]), s = e.props.formCreateInject.options;
|
|
635
635
|
return t("Select", D([{}, e.data, {
|
|
636
636
|
ref: "el"
|
|
637
|
-
}]), [(Array.isArray(s) ? s : []).map((n, o) =>
|
|
637
|
+
}]), [(Array.isArray(s) ? s : []).map((n, o) => k(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
|
|
638
638
|
},
|
|
639
639
|
mounted() {
|
|
640
640
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -670,7 +670,7 @@ const Rr = "fcSelect", Sr = {
|
|
|
670
670
|
},
|
|
671
671
|
methods: {
|
|
672
672
|
setStatus(t) {
|
|
673
|
-
const e =
|
|
673
|
+
const e = H(t), r = this.formCreateInject.prop.props.data;
|
|
674
674
|
this.type === "selected" ? this.checked(r, e, "selected") : this.checked(r, e, "checked"), this.$forceUpdate();
|
|
675
675
|
},
|
|
676
676
|
checked(t, e, r) {
|
|
@@ -688,21 +688,21 @@ const Rr = "fcSelect", Sr = {
|
|
|
688
688
|
ref: "tree"
|
|
689
689
|
}, {
|
|
690
690
|
on: e
|
|
691
|
-
}]), [
|
|
691
|
+
}]), [De(this.$slots)]);
|
|
692
692
|
},
|
|
693
693
|
mounted() {
|
|
694
694
|
this.$emit("fc.el", this.$refs.tree);
|
|
695
695
|
}
|
|
696
696
|
};
|
|
697
|
-
function
|
|
697
|
+
function ut(t) {
|
|
698
698
|
return typeof t == "object" ? t : {
|
|
699
699
|
url: t,
|
|
700
700
|
is_string: !0,
|
|
701
701
|
name: jr(t)
|
|
702
702
|
};
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
return
|
|
704
|
+
function ft(t) {
|
|
705
|
+
return q(b({}, t), {
|
|
706
706
|
file: t,
|
|
707
707
|
value: t
|
|
708
708
|
});
|
|
@@ -711,7 +711,7 @@ function jr(t) {
|
|
|
711
711
|
return ("" + t).split("/").pop();
|
|
712
712
|
}
|
|
713
713
|
const Ir = "fcUpload";
|
|
714
|
-
function
|
|
714
|
+
function St(t) {
|
|
715
715
|
return {
|
|
716
716
|
name: Ir,
|
|
717
717
|
props: {
|
|
@@ -754,11 +754,11 @@ function Ft(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 =
|
|
757
|
+
this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = H(this.value).map(ut).map(ft);
|
|
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 =
|
|
761
|
+
this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = H(e).map(ut).map(ft), 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 Ft(t) {
|
|
|
864
864
|
type: this.uploadType === "file" ? "ios-cloud-upload-outline" : t.imgUpIcon,
|
|
865
865
|
size: 20
|
|
866
866
|
}
|
|
867
|
-
}]))])]) : null,
|
|
867
|
+
}]))])]) : null, De(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,15 +907,15 @@ function Ft(t) {
|
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
const kt =
|
|
910
|
+
const kt = St({
|
|
911
911
|
fileIcon: "md-document",
|
|
912
912
|
imgUpIcon: "md-images"
|
|
913
913
|
});
|
|
914
|
-
kt.v2 =
|
|
914
|
+
kt.v2 = St({
|
|
915
915
|
fileIcon: "document-text",
|
|
916
916
|
imgUpIcon: "image"
|
|
917
917
|
});
|
|
918
|
-
function
|
|
918
|
+
function S(t, e, r) {
|
|
919
919
|
he.set(t, e, r);
|
|
920
920
|
}
|
|
921
921
|
function Y(t, e) {
|
|
@@ -929,19 +929,19 @@ function ye(t, e = {}, r) {
|
|
|
929
929
|
if ((i = Array.isArray(n)) || h.Object(n)) {
|
|
930
930
|
let o = t[s] === void 0;
|
|
931
931
|
if (i)
|
|
932
|
-
i = !1, o &&
|
|
932
|
+
i = !1, o && S(t, s, []);
|
|
933
933
|
else if (n._clone && r !== void 0)
|
|
934
934
|
if (r)
|
|
935
|
-
n = n.getRule(), o &&
|
|
935
|
+
n = n.getRule(), o && S(t, s, {});
|
|
936
936
|
else {
|
|
937
|
-
|
|
937
|
+
S(t, s, n._clone());
|
|
938
938
|
continue;
|
|
939
939
|
}
|
|
940
940
|
else
|
|
941
|
-
o &&
|
|
941
|
+
o && S(t, s, {});
|
|
942
942
|
t[s] = ye(t[s], n, r);
|
|
943
943
|
} else
|
|
944
|
-
|
|
944
|
+
S(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
945
945
|
}
|
|
946
946
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
947
947
|
}
|
|
@@ -951,7 +951,7 @@ function J(t) {
|
|
|
951
951
|
const Ar = 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
|
-
Object.prototype.hasOwnProperty.call(e, i) &&
|
|
954
|
+
Object.prototype.hasOwnProperty.call(e, i) && S(t, i, e[i]);
|
|
955
955
|
return t;
|
|
956
956
|
};
|
|
957
957
|
function _() {
|
|
@@ -1080,7 +1080,7 @@ const Vr = "fcGroup", Pr = {
|
|
|
1080
1080
|
},
|
|
1081
1081
|
methods: {
|
|
1082
1082
|
_value(t) {
|
|
1083
|
-
return t &&
|
|
1083
|
+
return t && k(t, this.field) ? t[this.field] : t;
|
|
1084
1084
|
},
|
|
1085
1085
|
cache(t, e) {
|
|
1086
1086
|
this.cacheValue[t] = JSON.stringify(e);
|
|
@@ -1234,9 +1234,9 @@ const Vr = "fcGroup", Pr = {
|
|
|
1234
1234
|
key: o
|
|
1235
1235
|
}, {
|
|
1236
1236
|
on: {
|
|
1237
|
-
"update:value": (
|
|
1238
|
-
"emit-event": (
|
|
1239
|
-
input: (
|
|
1237
|
+
"update:value": (m) => this.formData(o, m),
|
|
1238
|
+
"emit-event": (m, ...p) => this.emitEvent(m, p, a, o),
|
|
1239
|
+
input: (m) => this.add$f(a, o, m)
|
|
1240
1240
|
}
|
|
1241
1241
|
}, {}, {
|
|
1242
1242
|
props: {
|
|
@@ -1346,11 +1346,11 @@ const Vr = "fcGroup", Pr = {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
}, Tr = [
|
|
1348
1348
|
wr,
|
|
1349
|
-
kr,
|
|
1350
1349
|
Sr,
|
|
1350
|
+
Rr,
|
|
1351
1351
|
Dr,
|
|
1352
1352
|
Lr,
|
|
1353
|
-
|
|
1353
|
+
Ft,
|
|
1354
1354
|
kt,
|
|
1355
1355
|
Pr
|
|
1356
1356
|
];
|
|
@@ -1364,12 +1364,12 @@ function ge(t) {
|
|
|
1364
1364
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1365
1365
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1366
1366
|
}
|
|
1367
|
-
const
|
|
1367
|
+
const Se = (t, e) => {
|
|
1368
1368
|
if (!(!t || t === e || !t.$props)) {
|
|
1369
1369
|
if (t.$props.formCreateInject)
|
|
1370
1370
|
return t.$props.formCreateInject;
|
|
1371
1371
|
if (t.$parent)
|
|
1372
|
-
return
|
|
1372
|
+
return Se(t.$parent, e);
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
1375
|
function Nr(t, e, r) {
|
|
@@ -1432,91 +1432,91 @@ function Nr(t, e, r) {
|
|
|
1432
1432
|
a = a.parent;
|
|
1433
1433
|
else
|
|
1434
1434
|
a = n;
|
|
1435
|
-
const { rule: l, value: u, subForm: f, inFor:
|
|
1435
|
+
const { rule: l, value: u, subForm: f, inFor: m } = lt(s), p = x({
|
|
1436
1436
|
ctxInject: {},
|
|
1437
1437
|
destroyed: !1,
|
|
1438
1438
|
isShow: !0,
|
|
1439
1439
|
unique: 1,
|
|
1440
1440
|
renderRule: [...l.value || []],
|
|
1441
1441
|
updateValue: JSON.stringify(u.value || {})
|
|
1442
|
-
}), y = new t(n), v = y.api(), w =
|
|
1442
|
+
}), y = new t(n), v = y.api(), w = m.value, j = () => {
|
|
1443
1443
|
if (o) {
|
|
1444
|
-
const O =
|
|
1444
|
+
const O = Se(n, o);
|
|
1445
1445
|
if (O) {
|
|
1446
1446
|
let E;
|
|
1447
|
-
w ? (E =
|
|
1447
|
+
w ? (E = H(O.getSubForm()), E.push(v)) : E = v, O.subForm(E);
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
1450
1450
|
}, Z = () => {
|
|
1451
|
-
const O =
|
|
1451
|
+
const O = Se(n, o);
|
|
1452
1452
|
if (O)
|
|
1453
1453
|
if (w) {
|
|
1454
|
-
const E =
|
|
1455
|
-
|
|
1454
|
+
const E = H(O.getSubForm()), B = E.indexOf(v);
|
|
1455
|
+
B > -1 && E.splice(B, 1);
|
|
1456
1456
|
} else
|
|
1457
1457
|
O.subForm();
|
|
1458
1458
|
};
|
|
1459
1459
|
let V = null;
|
|
1460
1460
|
fr(() => {
|
|
1461
|
-
|
|
1461
|
+
L(() => {
|
|
1462
1462
|
let O = "";
|
|
1463
1463
|
const E = s.option && s.option.globalClass || {};
|
|
1464
|
-
Object.keys(E).forEach((
|
|
1464
|
+
Object.keys(E).forEach((B) => {
|
|
1465
1465
|
let re = "";
|
|
1466
|
-
E[
|
|
1467
|
-
re += ge(ve) + ":" + E[
|
|
1468
|
-
}), E[
|
|
1466
|
+
E[B].style && Object.keys(E[B].style).forEach((ve) => {
|
|
1467
|
+
re += ge(ve) + ":" + E[B].style[ve] + ";";
|
|
1468
|
+
}), E[B].content && (re += E[B].content + ";"), re && (O += `.${B}{${re}}`);
|
|
1469
1469
|
}), s.option && s.option.style && (O += s.option.style), V || (V = document.createElement("style"), V.type = "text/css", document.head.appendChild(V)), V.innerHTML = O || "";
|
|
1470
1470
|
}, () => {
|
|
1471
1471
|
});
|
|
1472
1472
|
});
|
|
1473
|
-
const
|
|
1473
|
+
const T = le(() => {
|
|
1474
1474
|
y.bus.$emit("$loadData.$topForm");
|
|
1475
|
-
}, 100),
|
|
1475
|
+
}, 100), Ie = le(() => {
|
|
1476
1476
|
y.bus.$emit("$loadData.$form");
|
|
1477
1477
|
}, 100), $e = (O) => {
|
|
1478
1478
|
y.bus.$emit("change-$form." + O);
|
|
1479
1479
|
};
|
|
1480
1480
|
return cr(() => {
|
|
1481
|
-
o && (v.top.bus.$on("$loadData.$form",
|
|
1481
|
+
o && (v.top.bus.$on("$loadData.$form", T), v.top.bus.$on("change", $e)), y.mounted();
|
|
1482
1482
|
}), hr(() => {
|
|
1483
|
-
o && (v.top.bus.$off("$loadData.$form",
|
|
1483
|
+
o && (v.top.bus.$off("$loadData.$form", T), v.top.bus.$off("change", $e)), V && document.head.removeChild(V), Z(), p.destroyed = !0, y.unmount();
|
|
1484
1484
|
}), dr(() => {
|
|
1485
1485
|
y.updated();
|
|
1486
|
-
}),
|
|
1486
|
+
}), L(f, (O) => {
|
|
1487
1487
|
O ? j() : Z();
|
|
1488
|
-
}, { immediate: !0 }),
|
|
1489
|
-
y.$handle.isBreakWatch() || O.length ===
|
|
1490
|
-
}),
|
|
1488
|
+
}, { immediate: !0 }), L(() => [...l.value], (O) => {
|
|
1489
|
+
y.$handle.isBreakWatch() || O.length === p.renderRule.length && O.every((E) => p.renderRule.indexOf(E) > -1) || (y.$handle.updateAppendData(), y.$handle.reloadRule(l.value), n.renderRule());
|
|
1490
|
+
}), L(() => s.option, () => {
|
|
1491
1491
|
y.initOptions(), v.refresh();
|
|
1492
|
-
}, { deep: !0 }),
|
|
1492
|
+
}, { deep: !0 }), L(() => [s.disabled, s.preview], () => {
|
|
1493
1493
|
v.refresh();
|
|
1494
|
-
}),
|
|
1495
|
-
JSON.stringify(O || {}) !==
|
|
1496
|
-
}, { deep: !0, flush: "post" }),
|
|
1497
|
-
v.coverValue({}), y.$handle.updateAppendData(),
|
|
1498
|
-
|
|
1494
|
+
}), L(u, (O) => {
|
|
1495
|
+
JSON.stringify(O || {}) !== p.updateValue && (v.config.forceCoverValue ? v.coverValue(O || {}) : v.setValue(O || {}));
|
|
1496
|
+
}, { deep: !0, flush: "post" }), L(() => s.index, () => {
|
|
1497
|
+
v.coverValue({}), y.$handle.updateAppendData(), P(() => {
|
|
1498
|
+
P(() => {
|
|
1499
1499
|
v.clearValidateState();
|
|
1500
1500
|
});
|
|
1501
1501
|
});
|
|
1502
|
-
}, { flush: "sync" }),
|
|
1502
|
+
}, { flush: "sync" }), q(b({
|
|
1503
1503
|
fc: fe(y),
|
|
1504
1504
|
parent: o && fe(o),
|
|
1505
1505
|
top: fe(a),
|
|
1506
1506
|
fapi: fe(v)
|
|
1507
|
-
},
|
|
1508
|
-
getGroupInject: () =>
|
|
1507
|
+
}, lt(p)), {
|
|
1508
|
+
getGroupInject: () => Se(n, o),
|
|
1509
1509
|
refresh() {
|
|
1510
|
-
++
|
|
1510
|
+
++p.unique;
|
|
1511
1511
|
},
|
|
1512
1512
|
renderRule() {
|
|
1513
|
-
|
|
1513
|
+
p.renderRule = [...l.value || []];
|
|
1514
1514
|
},
|
|
1515
1515
|
updateValue(O) {
|
|
1516
|
-
if (
|
|
1516
|
+
if (p.destroyed) return;
|
|
1517
1517
|
const E = JSON.stringify(O);
|
|
1518
|
-
|
|
1519
|
-
|
|
1518
|
+
p.updateValue !== E && (p.updateValue = E, n.$emit("update:value", O), P(() => {
|
|
1519
|
+
Ie(), o || T();
|
|
1520
1520
|
}));
|
|
1521
1521
|
}
|
|
1522
1522
|
});
|
|
@@ -1526,8 +1526,8 @@ function Nr(t, e, r) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
|
-
const Rt = ["attrs", "props", "domProps", "scopedSlots"],
|
|
1530
|
-
const i = [...Rt, ...r.normal || []], s = [...
|
|
1529
|
+
const Rt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], Dt = ["on", "nativeOn", "hook"], X = (t, e = {}, r = {}) => {
|
|
1530
|
+
const i = [...Rt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...Dt, ...r.functional || []], o = r.props || [];
|
|
1531
1531
|
return t.reduce((a, l) => {
|
|
1532
1532
|
for (const u in l)
|
|
1533
1533
|
if (a[u])
|
|
@@ -1536,13 +1536,13 @@ const Rt = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style"
|
|
|
1536
1536
|
else if (i.indexOf(u) > -1)
|
|
1537
1537
|
a[u] = b(b({}, a[u]), l[u]);
|
|
1538
1538
|
else if (s.indexOf(u) > -1) {
|
|
1539
|
-
const f = a[u] instanceof Array ? a[u] : [a[u]],
|
|
1540
|
-
a[u] = [...f, ...
|
|
1539
|
+
const f = a[u] instanceof Array ? a[u] : [a[u]], m = l[u] instanceof Array ? l[u] : [l[u]];
|
|
1540
|
+
a[u] = [...f, ...m];
|
|
1541
1541
|
} else if (n.indexOf(u) > -1)
|
|
1542
1542
|
for (const f in l[u])
|
|
1543
1543
|
if (a[u][f]) {
|
|
1544
|
-
const
|
|
1545
|
-
a[u][f] = [...
|
|
1544
|
+
const m = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], p = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
|
|
1545
|
+
a[u][f] = [...m, ...p];
|
|
1546
1546
|
} else
|
|
1547
1547
|
a[u][f] = l[u][f];
|
|
1548
1548
|
else if (u === "hook")
|
|
@@ -1556,15 +1556,15 @@ const Rt = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style"
|
|
|
1556
1556
|
}, e);
|
|
1557
1557
|
}, Mr = (t, e) => function() {
|
|
1558
1558
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1559
|
-
},
|
|
1560
|
-
function
|
|
1561
|
-
return [...
|
|
1559
|
+
}, jt = ["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"], Ze = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
|
|
1560
|
+
function It() {
|
|
1561
|
+
return [...jt, ...Rt, ...Et, ...Dt, ...Ze, ...Ye];
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function At(t, e, r) {
|
|
1564
1564
|
return `[form-create ${t}]: ${e}`;
|
|
1565
1565
|
}
|
|
1566
1566
|
function xe(t, e) {
|
|
1567
|
-
console.error(
|
|
1567
|
+
console.error(At("err", t));
|
|
1568
1568
|
}
|
|
1569
1569
|
function Ur(t) {
|
|
1570
1570
|
xe(t.toString()), console.error(t);
|
|
@@ -1627,21 +1627,21 @@ err: ${s}`);
|
|
|
1627
1627
|
}
|
|
1628
1628
|
return t;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1630
|
+
function Vt(t, e) {
|
|
1631
1631
|
return JSON.parse(t, function(r, i) {
|
|
1632
1632
|
return h.Undef(i) || !i.indexOf ? i : W(i, e);
|
|
1633
1633
|
});
|
|
1634
1634
|
}
|
|
1635
1635
|
let Gr = 0;
|
|
1636
|
-
function
|
|
1636
|
+
function je() {
|
|
1637
1637
|
const t = 370 + ++Gr;
|
|
1638
1638
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1639
1639
|
}
|
|
1640
1640
|
function ee(t, e, r) {
|
|
1641
1641
|
let i = t, s;
|
|
1642
1642
|
return (e || "").split(".").forEach((n) => {
|
|
1643
|
-
s && ((!i[s] || typeof i[s] != "object") &&
|
|
1644
|
-
}),
|
|
1643
|
+
s && ((!i[s] || typeof i[s] != "object") && S(i, s, {}), i = i[s]), s = n;
|
|
1644
|
+
}), S(i, s, r), i;
|
|
1645
1645
|
}
|
|
1646
1646
|
function Ke(t, e) {
|
|
1647
1647
|
return {
|
|
@@ -1651,16 +1651,16 @@ function Ke(t, e) {
|
|
|
1651
1651
|
writable: !!e
|
|
1652
1652
|
};
|
|
1653
1653
|
}
|
|
1654
|
-
function Vt(t, e) {
|
|
1655
|
-
return Pt([t], e || !1)[0];
|
|
1656
|
-
}
|
|
1657
1654
|
function Pt(t, e) {
|
|
1655
|
+
return Bt([t], e || !1)[0];
|
|
1656
|
+
}
|
|
1657
|
+
function Bt(t, e) {
|
|
1658
1658
|
return ye([], [...t], e || !1);
|
|
1659
1659
|
}
|
|
1660
1660
|
function Q(t, e) {
|
|
1661
1661
|
return X(Array.isArray(e) ? e : [e], t, { array: Ze, normal: Ye }), t;
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1663
|
+
function ct(t) {
|
|
1664
1664
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1665
1665
|
return e.type || (e.type = "input"), e;
|
|
1666
1666
|
}
|
|
@@ -1669,7 +1669,7 @@ function Hr(t, e) {
|
|
|
1669
1669
|
e[r] && (t[r] = Q(t[r] || {}, e[r]));
|
|
1670
1670
|
}), t) : e;
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1672
|
+
function Lt(t, e) {
|
|
1673
1673
|
Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
|
|
1674
1674
|
get() {
|
|
1675
1675
|
return e[i]();
|
|
@@ -1689,7 +1689,7 @@ function F(t, e) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
function Xe(t, e) {
|
|
1691
1691
|
let r = null;
|
|
1692
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e &&
|
|
1692
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1693
1693
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1694
1694
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1695
1695
|
});
|
|
@@ -1740,18 +1740,18 @@ function Le() {
|
|
|
1740
1740
|
}
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Oe(t, e) {
|
|
1744
1744
|
return Object.setPrototypeOf(t, e), t;
|
|
1745
1745
|
}
|
|
1746
|
-
const
|
|
1747
|
-
"==": (t, e) => JSON.stringify(t) === JSON.stringify(
|
|
1746
|
+
const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ae = {
|
|
1747
|
+
"==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
|
|
1748
1748
|
"!=": (t, e) => !ae["=="](t, e),
|
|
1749
1749
|
">": (t, e) => t > e,
|
|
1750
1750
|
">=": (t, e) => t >= e,
|
|
1751
1751
|
"<": (t, e) => t < e,
|
|
1752
1752
|
"<=": (t, e) => t <= e,
|
|
1753
1753
|
on(t, e) {
|
|
1754
|
-
return t && t.indexOf && t.indexOf(
|
|
1754
|
+
return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
|
|
1755
1755
|
},
|
|
1756
1756
|
notOn(t, e) {
|
|
1757
1757
|
return !ae.on(t, e);
|
|
@@ -1778,7 +1778,7 @@ const ct = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
|
|
|
1778
1778
|
return new RegExp(e, "g").test(t);
|
|
1779
1779
|
}
|
|
1780
1780
|
};
|
|
1781
|
-
function
|
|
1781
|
+
function U(t, e) {
|
|
1782
1782
|
return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
|
|
1783
1783
|
t != null && (t = t[r]);
|
|
1784
1784
|
}), t;
|
|
@@ -1791,13 +1791,13 @@ function Wr(t) {
|
|
|
1791
1791
|
r[1] && (i[r[1]] = !0);
|
|
1792
1792
|
return Object.keys(i);
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function dt(t) {
|
|
1795
1795
|
let e = t.split("."), r = [], i = "";
|
|
1796
1796
|
return e.forEach((s, n) => {
|
|
1797
1797
|
n === 0 ? i = s : i += "." + s, r.push(i);
|
|
1798
1798
|
}), r.join(" && ");
|
|
1799
1799
|
}
|
|
1800
|
-
function
|
|
1800
|
+
function Tt() {
|
|
1801
1801
|
return {
|
|
1802
1802
|
props: {},
|
|
1803
1803
|
on: {},
|
|
@@ -1816,42 +1816,42 @@ function A(t, e) {
|
|
|
1816
1816
|
};
|
|
1817
1817
|
}
|
|
1818
1818
|
function tt(t, e, r, i, s) {
|
|
1819
|
-
this._data = _(
|
|
1819
|
+
this._data = _(Tt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1820
1820
|
}
|
|
1821
1821
|
_(tt.prototype, {
|
|
1822
1822
|
getRule() {
|
|
1823
1823
|
return this._data;
|
|
1824
1824
|
},
|
|
1825
1825
|
setProp(t, e) {
|
|
1826
|
-
return
|
|
1826
|
+
return S(this._data, t, e), this;
|
|
1827
1827
|
},
|
|
1828
1828
|
_clone() {
|
|
1829
1829
|
const t = new this.constructor();
|
|
1830
|
-
return t._data =
|
|
1830
|
+
return t._data = Pt(this._data), t;
|
|
1831
1831
|
}
|
|
1832
1832
|
});
|
|
1833
|
-
function
|
|
1833
|
+
function Nt(t) {
|
|
1834
1834
|
t.forEach((e) => {
|
|
1835
1835
|
tt.prototype[e] = function(r) {
|
|
1836
1836
|
return Q(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1837
1837
|
};
|
|
1838
1838
|
});
|
|
1839
1839
|
}
|
|
1840
|
-
|
|
1841
|
-
const
|
|
1840
|
+
Nt(It());
|
|
1841
|
+
const Mt = A("");
|
|
1842
1842
|
function zr(t, e, r) {
|
|
1843
|
-
let i =
|
|
1843
|
+
let i = Mt("", e);
|
|
1844
1844
|
return i._data.type = t, i._data.title = r, i;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1847
|
-
let s =
|
|
1846
|
+
function pt(t, e, r, i) {
|
|
1847
|
+
let s = Mt("", r);
|
|
1848
1848
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1849
1849
|
}
|
|
1850
1850
|
function Kr() {
|
|
1851
1851
|
return {
|
|
1852
1852
|
create: zr,
|
|
1853
|
-
createTmp:
|
|
1854
|
-
template:
|
|
1853
|
+
createTmp: pt,
|
|
1854
|
+
template: pt,
|
|
1855
1855
|
factory: A
|
|
1856
1856
|
};
|
|
1857
1857
|
}
|
|
@@ -1859,7 +1859,7 @@ function Xr(t, e, r) {
|
|
|
1859
1859
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1860
1860
|
return s.status = r.status, s.url = t, s;
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function mt(t) {
|
|
1863
1863
|
const e = t.responseText || t.response;
|
|
1864
1864
|
if (!e)
|
|
1865
1865
|
return e;
|
|
@@ -1869,12 +1869,14 @@ function pt(t) {
|
|
|
1869
1869
|
return e;
|
|
1870
1870
|
}
|
|
1871
1871
|
}
|
|
1872
|
-
function
|
|
1872
|
+
function Ut(t) {
|
|
1873
1873
|
if (typeof XMLHttpRequest == "undefined")
|
|
1874
1874
|
return;
|
|
1875
1875
|
const e = new XMLHttpRequest();
|
|
1876
1876
|
let r = t.action || "";
|
|
1877
|
-
if (t.
|
|
1877
|
+
if (e.upload && t.onProgress && e.upload.addEventListener("progress", (n) => {
|
|
1878
|
+
n.percent = n.total > 0 ? n.loaded / n.total * 100 : 0, t.onProgress(n);
|
|
1879
|
+
}), t.query) {
|
|
1878
1880
|
const n = new URLSearchParams(t.query).toString();
|
|
1879
1881
|
r.includes("?") ? r += `&${n}` : r += `?${n}`;
|
|
1880
1882
|
}
|
|
@@ -1882,25 +1884,25 @@ function Mt(t) {
|
|
|
1882
1884
|
t.onError(o);
|
|
1883
1885
|
}, e.onload = function() {
|
|
1884
1886
|
if (e.status < 200 || e.status >= 300)
|
|
1885
|
-
return t.onError(Xr(r, t, e),
|
|
1886
|
-
t.onSuccess(
|
|
1887
|
+
return t.onError(Xr(r, t, e), mt(e));
|
|
1888
|
+
t.onSuccess(mt(e));
|
|
1887
1889
|
}, e.open(t.method || "get", r, !0);
|
|
1888
1890
|
let i;
|
|
1889
|
-
t.data && ((t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data).map((n) => {
|
|
1891
|
+
(t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
|
|
1890
1892
|
i.append(n, t.data[n]);
|
|
1891
|
-
})) : (i = JSON.stringify(t.data), e.setRequestHeader("content-type", "application/json"))), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0);
|
|
1893
|
+
})) : (i = JSON.stringify(t.data || {}), e.setRequestHeader("content-type", "application/json"))), t.file && i.append(t.filename, t.file, t.file.name), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0);
|
|
1892
1894
|
const s = t.headers || {};
|
|
1893
1895
|
Object.keys(s).forEach((n) => {
|
|
1894
1896
|
s[n] != null && e.setRequestHeader(n, s[n]);
|
|
1895
1897
|
}), e.send(i);
|
|
1896
1898
|
}
|
|
1897
|
-
function
|
|
1899
|
+
function gt(t, e, r) {
|
|
1898
1900
|
return new Promise((i, s) => {
|
|
1899
|
-
(e ||
|
|
1901
|
+
(e || Ut)(q(b({}, t), {
|
|
1900
1902
|
onSuccess(n) {
|
|
1901
1903
|
let o = (l) => l;
|
|
1902
1904
|
const a = W(t.parse);
|
|
1903
|
-
h.Function(a) ? o = a : a && h.String(a) && (o = (l) =>
|
|
1905
|
+
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => U(l, a)), i(o(n, void 0, r));
|
|
1904
1906
|
},
|
|
1905
1907
|
onError(n) {
|
|
1906
1908
|
s(n);
|
|
@@ -1918,7 +1920,7 @@ function Qr(t) {
|
|
|
1918
1920
|
function r(n, o, a) {
|
|
1919
1921
|
e(n).forEach((l) => {
|
|
1920
1922
|
t.getCtxs(l).forEach((u) => {
|
|
1921
|
-
|
|
1923
|
+
S(u.rule, o, a), t.$render.clearCache(u);
|
|
1922
1924
|
});
|
|
1923
1925
|
});
|
|
1924
1926
|
}
|
|
@@ -1983,7 +1985,7 @@ function Qr(t) {
|
|
|
1983
1985
|
},
|
|
1984
1986
|
getValue(n) {
|
|
1985
1987
|
const o = t.getFieldCtx(n);
|
|
1986
|
-
return o ? me(o.rule.value) : t.options.appendValue !== !1 &&
|
|
1988
|
+
return o ? me(o.rule.value) : t.options.appendValue !== !1 && k(t.appendData, n) ? me(t.appendData[n]) : void 0;
|
|
1987
1989
|
},
|
|
1988
1990
|
coverValue(n) {
|
|
1989
1991
|
const o = b({}, n || {});
|
|
@@ -1991,7 +1993,7 @@ function Qr(t) {
|
|
|
1991
1993
|
t.appendData = {}, s.fields().forEach((a) => {
|
|
1992
1994
|
const l = t.fieldCtx[a];
|
|
1993
1995
|
if (l) {
|
|
1994
|
-
const u =
|
|
1996
|
+
const u = k(n, a);
|
|
1995
1997
|
l.forEach((f) => {
|
|
1996
1998
|
f.rule.value = u ? n[a] : void 0;
|
|
1997
1999
|
}), delete o[a];
|
|
@@ -2070,7 +2072,7 @@ function Qr(t) {
|
|
|
2070
2072
|
disabled(n, o) {
|
|
2071
2073
|
e(o).forEach((a) => {
|
|
2072
2074
|
t.getCtxs(a).forEach((l) => {
|
|
2073
|
-
|
|
2075
|
+
S(l.rule.props, "disabled", !!n);
|
|
2074
2076
|
});
|
|
2075
2077
|
}), t.refresh();
|
|
2076
2078
|
},
|
|
@@ -2128,7 +2130,7 @@ function Qr(t) {
|
|
|
2128
2130
|
t.$manager.updateOptions(t.options), s.refresh();
|
|
2129
2131
|
},
|
|
2130
2132
|
hideForm: (n) => {
|
|
2131
|
-
|
|
2133
|
+
S(t.vm, "isShow", !n);
|
|
2132
2134
|
},
|
|
2133
2135
|
changeStatus: () => t.changeStatus,
|
|
2134
2136
|
clearChangeStatus: () => {
|
|
@@ -2173,7 +2175,7 @@ function Qr(t) {
|
|
|
2173
2175
|
},
|
|
2174
2176
|
setEffect(n, o, a) {
|
|
2175
2177
|
const l = t.getCtx(n);
|
|
2176
|
-
l && o && (o[0] === "$" && (o = o.substr(1)),
|
|
2178
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), k(l.rule, "$" + o) && S(l.rule, "$" + o, a), k(l.rule, "effect") || S(l.rule, "effect", {}), S(l.rule.effect, o, a));
|
|
2177
2179
|
},
|
|
2178
2180
|
clearEffectData(n, o) {
|
|
2179
2181
|
const a = t.getCtx(n);
|
|
@@ -2195,14 +2197,18 @@ function Qr(t) {
|
|
|
2195
2197
|
t.getCtxs(o).forEach((a) => {
|
|
2196
2198
|
t.$render.clearCache(a), a.rule.value = me(a.defaultValue);
|
|
2197
2199
|
});
|
|
2198
|
-
}),
|
|
2199
|
-
|
|
2200
|
+
}), P(() => {
|
|
2201
|
+
P(() => {
|
|
2202
|
+
P(() => {
|
|
2203
|
+
s.clearValidateState(n);
|
|
2204
|
+
});
|
|
2205
|
+
});
|
|
2200
2206
|
}), n == null && (h.Function(t.options.onReset) && F(() => t.options.onReset(s)), t.vm.$emit("reset", s));
|
|
2201
2207
|
},
|
|
2202
2208
|
method(n, o) {
|
|
2203
2209
|
const a = s.el(n);
|
|
2204
2210
|
if (!a || !a[o])
|
|
2205
|
-
throw new Error(
|
|
2211
|
+
throw new Error(At("err", `${o} 方法不存在`));
|
|
2206
2212
|
return (...l) => a[o](...l);
|
|
2207
2213
|
},
|
|
2208
2214
|
exec(n, o, ...a) {
|
|
@@ -2232,9 +2238,9 @@ function Qr(t) {
|
|
|
2232
2238
|
if (!l)
|
|
2233
2239
|
return [];
|
|
2234
2240
|
const u = [];
|
|
2235
|
-
return ((
|
|
2236
|
-
|
|
2237
|
-
typeof
|
|
2241
|
+
return ((m) => {
|
|
2242
|
+
m && m.forEach((p) => {
|
|
2243
|
+
typeof p == "object" && (p.field && u.push(p), u.push(...s.getChildrenRuleList(p)));
|
|
2238
2244
|
});
|
|
2239
2245
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2240
2246
|
},
|
|
@@ -2256,7 +2262,7 @@ function Qr(t) {
|
|
|
2256
2262
|
const l = s.getChildrenRuleList(n);
|
|
2257
2263
|
t.deferSyncValue(() => {
|
|
2258
2264
|
l.forEach((u) => {
|
|
2259
|
-
|
|
2265
|
+
k(o, u.field) ? u.value = o[u.field] : a && (u.value = void 0);
|
|
2260
2266
|
});
|
|
2261
2267
|
});
|
|
2262
2268
|
},
|
|
@@ -2288,7 +2294,7 @@ function Qr(t) {
|
|
|
2288
2294
|
bus: t.bus,
|
|
2289
2295
|
fetch(n) {
|
|
2290
2296
|
return new Promise((o, a) => {
|
|
2291
|
-
n = J(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() =>
|
|
2297
|
+
n = J(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
|
|
2292
2298
|
F(() => n.onSuccess && n.onSuccess(l)), o(l);
|
|
2293
2299
|
}).catch((l) => {
|
|
2294
2300
|
F(() => n.onError && n.onError(l)), a(l);
|
|
@@ -2297,11 +2303,11 @@ function Qr(t) {
|
|
|
2297
2303
|
},
|
|
2298
2304
|
watchFetch(n, o, a, l) {
|
|
2299
2305
|
return t.fc.watchLoadData((u, f) => {
|
|
2300
|
-
let
|
|
2301
|
-
|
|
2302
|
-
F(() =>
|
|
2303
|
-
}).catch((
|
|
2304
|
-
F(() =>
|
|
2306
|
+
let m = J(n);
|
|
2307
|
+
m = t.loadFetchVar(m, u), !(l && l(m, f) === !1) && t.beforeFetch(m).then(() => gt(m, t.fc.create.fetch, s).then((p) => {
|
|
2308
|
+
F(() => m.onSuccess && m.onSuccess(p)), o && o(p, f);
|
|
2309
|
+
}).catch((p) => {
|
|
2310
|
+
F(() => m.onError && m.onError(p)), a && a(p);
|
|
2305
2311
|
}));
|
|
2306
2312
|
}, n.wait == null ? 1e3 : n.wait);
|
|
2307
2313
|
},
|
|
@@ -2363,13 +2369,13 @@ function Zr(t) {
|
|
|
2363
2369
|
}
|
|
2364
2370
|
});
|
|
2365
2371
|
}
|
|
2366
|
-
function
|
|
2372
|
+
function G(t) {
|
|
2367
2373
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2368
2374
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2369
2375
|
});
|
|
2370
|
-
return
|
|
2376
|
+
return qt(e);
|
|
2371
2377
|
}
|
|
2372
|
-
function
|
|
2378
|
+
function qt(t) {
|
|
2373
2379
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2374
2380
|
}
|
|
2375
2381
|
function Yr(t) {
|
|
@@ -2403,7 +2409,7 @@ function Yr(t) {
|
|
|
2403
2409
|
mergeGlobal(e) {
|
|
2404
2410
|
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = ce(() => {
|
|
2405
2411
|
const i = this.$handle.options.global;
|
|
2406
|
-
return Q({}, [i["*"], i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2412
|
+
return Q({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2407
2413
|
})), e.prop = Q({}, [this.cacheConfig[e.trueType].value, e.prop]));
|
|
2408
2414
|
},
|
|
2409
2415
|
setOptions(e) {
|
|
@@ -2452,12 +2458,20 @@ function Yr(t) {
|
|
|
2452
2458
|
slotValue: l
|
|
2453
2459
|
};
|
|
2454
2460
|
l.length && i.slotUpdate && F(() => i.slotUpdate(u));
|
|
2455
|
-
let f =
|
|
2456
|
-
const
|
|
2457
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(
|
|
2458
|
-
|
|
2461
|
+
let f = [];
|
|
2462
|
+
const m = e.loadChildrenPending();
|
|
2463
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(m, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(m, e)), Object.keys(n.renderSlots || {}).forEach((v) => {
|
|
2464
|
+
f.push(this.renderRule({
|
|
2465
|
+
type: "template",
|
|
2466
|
+
slot: v
|
|
2467
|
+
}, (() => {
|
|
2468
|
+
const w = this.parseSide(n.renderSlots[v], e);
|
|
2469
|
+
return this.renderRule(w);
|
|
2470
|
+
})()));
|
|
2471
|
+
});
|
|
2472
|
+
const p = this.getTypeSlot(e);
|
|
2459
2473
|
let y;
|
|
2460
|
-
return
|
|
2474
|
+
return p ? (u.children = f, y = p(u)) : y = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(f), e), y = this.renderSides(y, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), y = this.$manager.makeWrap(e, y)), e.none && (Array.isArray(y) ? y = y.map((v) => !v || !v.tag ? v : this.none(v)) : y = this.none(y)), o && this.setCache(e, () => this.stable(y), r), y;
|
|
2461
2475
|
}, this.setCache(e, s, r);
|
|
2462
2476
|
}
|
|
2463
2477
|
return (...s) => {
|
|
@@ -2514,6 +2528,7 @@ function Yr(t) {
|
|
|
2514
2528
|
field: e.field,
|
|
2515
2529
|
rule: e.rule,
|
|
2516
2530
|
input: e.input,
|
|
2531
|
+
t: (...s) => this.$handle.api.t(...s),
|
|
2517
2532
|
updateValue: (s) => {
|
|
2518
2533
|
this.$handle.onUpdateValue(e, s);
|
|
2519
2534
|
}
|
|
@@ -2586,7 +2601,7 @@ function Yr(t) {
|
|
|
2586
2601
|
}) : n);
|
|
2587
2602
|
if (n.__fc__)
|
|
2588
2603
|
return this.renderSlot(s, n.__fc__, r);
|
|
2589
|
-
n.type &&
|
|
2604
|
+
n.type && P(() => {
|
|
2590
2605
|
this.$handle.loadChildren(e, r), this.$handle.refresh();
|
|
2591
2606
|
});
|
|
2592
2607
|
}
|
|
@@ -2594,7 +2609,7 @@ function Yr(t) {
|
|
|
2594
2609
|
},
|
|
2595
2610
|
defaultRender(e, r) {
|
|
2596
2611
|
const i = e.prop;
|
|
2597
|
-
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(
|
|
2612
|
+
return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[e.type] ? this.vNode[e.type](i, r) : this.vNode[e.originType] ? this.vNode[e.originType](i, r) : this.vNode.make(qt(i.type), i, r);
|
|
2598
2613
|
},
|
|
2599
2614
|
renderRule(e, r, i) {
|
|
2600
2615
|
if (!e) return;
|
|
@@ -2603,9 +2618,9 @@ function Yr(t) {
|
|
|
2603
2618
|
if (i)
|
|
2604
2619
|
s = e.type;
|
|
2605
2620
|
else if (s = e.is, e.type) {
|
|
2606
|
-
s =
|
|
2621
|
+
s = G(e.type);
|
|
2607
2622
|
const a = this.vNode.aliasMap[s];
|
|
2608
|
-
a && (s =
|
|
2623
|
+
a && (s = G(a));
|
|
2609
2624
|
}
|
|
2610
2625
|
if (!s) return;
|
|
2611
2626
|
const n = Le();
|
|
@@ -2626,7 +2641,7 @@ function rt(t) {
|
|
|
2626
2641
|
$manager: t.$manager,
|
|
2627
2642
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2628
2643
|
id: xr++
|
|
2629
|
-
}),
|
|
2644
|
+
}), Lt(this, {
|
|
2630
2645
|
options() {
|
|
2631
2646
|
return t.options;
|
|
2632
2647
|
},
|
|
@@ -2664,16 +2679,16 @@ function ei(t) {
|
|
|
2664
2679
|
let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
|
|
2665
2680
|
return h.trueArray(u) && u.forEach((f) => {
|
|
2666
2681
|
if (!f) return;
|
|
2667
|
-
let
|
|
2668
|
-
if (h.Object(f) && (
|
|
2669
|
-
r || (
|
|
2670
|
-
const y = ge(`${
|
|
2682
|
+
let m, p = n || o || a;
|
|
2683
|
+
if (h.Object(f) && (m = f.inject, f = f.name, p = f.prefix || p), p) {
|
|
2684
|
+
r || (p = `native-${p}`);
|
|
2685
|
+
const y = ge(`${p}-${f}`), v = (...w) => {
|
|
2671
2686
|
this.vm.$emit(y, ...w), this.vm.$emit("emit-event", y, ...w), this.bus.$emit(y, ...w);
|
|
2672
2687
|
};
|
|
2673
|
-
if (v.__emit = !0, !
|
|
2688
|
+
if (v.__emit = !0, !m && l === !1)
|
|
2674
2689
|
i[f] = v;
|
|
2675
2690
|
else {
|
|
2676
|
-
let w =
|
|
2691
|
+
let w = m || l || this.options.injectEvent;
|
|
2677
2692
|
i[f] = h.Undef(w) ? v : this.inject(s, v, w);
|
|
2678
2693
|
}
|
|
2679
2694
|
}
|
|
@@ -2730,7 +2745,7 @@ function ei(t) {
|
|
|
2730
2745
|
}
|
|
2731
2746
|
});
|
|
2732
2747
|
}
|
|
2733
|
-
const
|
|
2748
|
+
const yt = ["hook:updated", "hook:mounted"];
|
|
2734
2749
|
function ti(t) {
|
|
2735
2750
|
_(t.prototype, {
|
|
2736
2751
|
usePage() {
|
|
@@ -2745,9 +2760,9 @@ function ti(t) {
|
|
|
2745
2760
|
},
|
|
2746
2761
|
pageLoad() {
|
|
2747
2762
|
const e = () => {
|
|
2748
|
-
this.pageEnd ? (this.vm.$off(
|
|
2763
|
+
this.pageEnd ? (this.vm.$off(yt, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
|
|
2749
2764
|
};
|
|
2750
|
-
this.vm.$on(
|
|
2765
|
+
this.vm.$on(yt, e);
|
|
2751
2766
|
}
|
|
2752
2767
|
});
|
|
2753
2768
|
}
|
|
@@ -2776,8 +2791,8 @@ function ni(t) {
|
|
|
2776
2791
|
__fc__: Ke(fe(t), !0)
|
|
2777
2792
|
});
|
|
2778
2793
|
}
|
|
2779
|
-
function
|
|
2780
|
-
const i =
|
|
2794
|
+
function Gt(t, e, r) {
|
|
2795
|
+
const i = je(), s = !!e.field;
|
|
2781
2796
|
_(this, {
|
|
2782
2797
|
id: i,
|
|
2783
2798
|
ref: i,
|
|
@@ -2806,7 +2821,7 @@ function qt(t, e, r) {
|
|
|
2806
2821
|
field: e.field || void 0
|
|
2807
2822
|
}), this.updateKey(), ni(this), this.update(t, !0);
|
|
2808
2823
|
}
|
|
2809
|
-
_(
|
|
2824
|
+
_(Gt.prototype, {
|
|
2810
2825
|
getParentGroup() {
|
|
2811
2826
|
let t = this.parent;
|
|
2812
2827
|
for (; t; ) {
|
|
@@ -2843,8 +2858,8 @@ _(qt.prototype, {
|
|
|
2843
2858
|
rule: this.rule,
|
|
2844
2859
|
api: this.$api,
|
|
2845
2860
|
update: (u) => {
|
|
2846
|
-
const f = u || i,
|
|
2847
|
-
this.setPending(e, r, f), o && o(f,
|
|
2861
|
+
const f = u || i, m = this.getPending(e, i);
|
|
2862
|
+
this.setPending(e, r, f), o && o(f, m);
|
|
2848
2863
|
},
|
|
2849
2864
|
reload: () => {
|
|
2850
2865
|
const u = this.getPending(e, i);
|
|
@@ -2876,17 +2891,18 @@ _(qt.prototype, {
|
|
|
2876
2891
|
t === void 0 ? this.payload = {} : delete this.payload[t];
|
|
2877
2892
|
},
|
|
2878
2893
|
updateKey(t) {
|
|
2879
|
-
this.key =
|
|
2894
|
+
this.key = je(), t && this.parent && this.parent.updateKey(t);
|
|
2880
2895
|
},
|
|
2881
2896
|
updateType() {
|
|
2882
|
-
this.originType = this.rule.type, this.type =
|
|
2897
|
+
this.originType = this.rule.type, this.type = G(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
2883
2898
|
},
|
|
2884
2899
|
setParser(t) {
|
|
2885
2900
|
this.parser = t, t.init(this);
|
|
2886
2901
|
},
|
|
2887
2902
|
initProp() {
|
|
2903
|
+
var e, r;
|
|
2888
2904
|
const t = b({}, this.rule);
|
|
2889
|
-
delete t.children, delete t.validate, this.prop = Q({}, [t, ...Object.keys(this.payload).map((
|
|
2905
|
+
delete t.children, delete t.validate, this.prop = Q({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
|
|
2890
2906
|
},
|
|
2891
2907
|
initNone() {
|
|
2892
2908
|
this.none = !(h.Undef(this.prop.display) || this.prop.display);
|
|
@@ -2956,12 +2972,12 @@ function si(t) {
|
|
|
2956
2972
|
_(t.prototype, {
|
|
2957
2973
|
nextRefresh(e) {
|
|
2958
2974
|
const r = this.loadedId;
|
|
2959
|
-
|
|
2975
|
+
P(() => {
|
|
2960
2976
|
r === this.loadedId && (e ? e() : this.refresh());
|
|
2961
2977
|
});
|
|
2962
2978
|
},
|
|
2963
2979
|
parseRule(e) {
|
|
2964
|
-
const r =
|
|
2980
|
+
const r = ct(e);
|
|
2965
2981
|
return Object.defineProperties(r, {
|
|
2966
2982
|
__origin__: Ke(e, !0)
|
|
2967
2983
|
}), oi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
@@ -3011,28 +3027,28 @@ function si(t) {
|
|
|
3011
3027
|
if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
|
|
3012
3028
|
if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
|
|
3013
3029
|
return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
|
|
3014
|
-
let l =
|
|
3030
|
+
let l = ct(o);
|
|
3015
3031
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3016
3032
|
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);
|
|
3017
|
-
let f,
|
|
3018
|
-
if (
|
|
3033
|
+
let f, m = !1, p = !!o.__fc__, y = l.value;
|
|
3034
|
+
if (p) {
|
|
3019
3035
|
if (f = o.__fc__, y = f.defaultValue, f.deleted) {
|
|
3020
|
-
if (
|
|
3036
|
+
if ($t(f))
|
|
3021
3037
|
return;
|
|
3022
3038
|
f.update(this);
|
|
3023
3039
|
} else if (!f.check(this)) {
|
|
3024
|
-
if (
|
|
3040
|
+
if ($t(f))
|
|
3025
3041
|
return;
|
|
3026
|
-
e[a] = o = o._clone ? o._clone() :
|
|
3042
|
+
e[a] = o = o._clone ? o._clone() : Vt(et(o)), f = null, m = !0;
|
|
3027
3043
|
}
|
|
3028
3044
|
}
|
|
3029
3045
|
if (f)
|
|
3030
3046
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3031
3047
|
else {
|
|
3032
3048
|
const j = this.parseRule(o);
|
|
3033
|
-
f = new
|
|
3049
|
+
f = new Gt(this, j, y), this.bindParser(f);
|
|
3034
3050
|
}
|
|
3035
|
-
[!1, !0].forEach((j) => this.parseEmit(f, j)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !
|
|
3051
|
+
[!1, !0].forEach((j) => this.parseEmit(f, j)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !m && !p && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3036
3052
|
const v = f.loadChildrenPending();
|
|
3037
3053
|
if (f.parser.loadChildren === !1 || s(v, f), !r) {
|
|
3038
3054
|
const j = i(a);
|
|
@@ -3052,11 +3068,11 @@ function si(t) {
|
|
|
3052
3068
|
const r = ai(e), i = [], s = this.api;
|
|
3053
3069
|
if (!r.length) return !1;
|
|
3054
3070
|
for (let a = 0; a < r.length; a++) {
|
|
3055
|
-
const l = r[a], u = l.handle || function(
|
|
3056
|
-
return (ae[l.condition || "=="] || ae["=="])(
|
|
3071
|
+
const l = r[a], u = l.handle || function(m) {
|
|
3072
|
+
return (ae[l.condition || "=="] || ae["=="])(m, l.value);
|
|
3057
3073
|
};
|
|
3058
3074
|
if (!h.trueArray(l.rule)) continue;
|
|
3059
|
-
const f =
|
|
3075
|
+
const f = q(b({}, l), {
|
|
3060
3076
|
valid: F(() => u(e.rule.value, s)),
|
|
3061
3077
|
ctrl: li(e, l.rule),
|
|
3062
3078
|
isHidden: h.String(l.rule[0])
|
|
@@ -3067,7 +3083,7 @@ function si(t) {
|
|
|
3067
3083
|
const n = [];
|
|
3068
3084
|
let o = !1;
|
|
3069
3085
|
return this.deferSyncValue(() => {
|
|
3070
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append:
|
|
3086
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: m, child: p, ctrl: y, method: v }) => {
|
|
3071
3087
|
if (a) {
|
|
3072
3088
|
l ? e.ctrlRule.push({
|
|
3073
3089
|
__ctrl: !0,
|
|
@@ -3089,7 +3105,7 @@ function si(t) {
|
|
|
3089
3105
|
children: u
|
|
3090
3106
|
};
|
|
3091
3107
|
e.ctrlRule.push(w), this.bus.$once("load-start", () => {
|
|
3092
|
-
f ? s.prepend(w, f,
|
|
3108
|
+
f ? s.prepend(w, f, p) : m || p ? s.append(w, m || e.id, p) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
|
|
3093
3109
|
});
|
|
3094
3110
|
} else {
|
|
3095
3111
|
e.ctrlRule.splice(e.ctrlRule.indexOf(y), 1);
|
|
@@ -3099,7 +3115,7 @@ function si(t) {
|
|
|
3099
3115
|
});
|
|
3100
3116
|
}), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
|
|
3101
3117
|
n.forEach((a) => a());
|
|
3102
|
-
}) : n.length &&
|
|
3118
|
+
}) : n.length && P(() => {
|
|
3103
3119
|
n.forEach((a) => a());
|
|
3104
3120
|
})), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
|
|
3105
3121
|
},
|
|
@@ -3122,9 +3138,9 @@ function si(t) {
|
|
|
3122
3138
|
});
|
|
3123
3139
|
}
|
|
3124
3140
|
function oi(t) {
|
|
3125
|
-
const e =
|
|
3141
|
+
const e = Tt();
|
|
3126
3142
|
return Object.keys(e).forEach((r) => {
|
|
3127
|
-
|
|
3143
|
+
k(t, r) || S(t, r, e[r]);
|
|
3128
3144
|
}), t;
|
|
3129
3145
|
}
|
|
3130
3146
|
function ai(t) {
|
|
@@ -3138,7 +3154,7 @@ function li(t, e) {
|
|
|
3138
3154
|
return i;
|
|
3139
3155
|
}
|
|
3140
3156
|
}
|
|
3141
|
-
function
|
|
3157
|
+
function $t(t) {
|
|
3142
3158
|
return !!t.rule.__ctrl;
|
|
3143
3159
|
}
|
|
3144
3160
|
function ui(t) {
|
|
@@ -3148,6 +3164,12 @@ function ui(t) {
|
|
|
3148
3164
|
rule: e.origin,
|
|
3149
3165
|
api: this.api,
|
|
3150
3166
|
setFlag: s || !1
|
|
3167
|
+
}), s && P(() => {
|
|
3168
|
+
P(() => {
|
|
3169
|
+
P(() => {
|
|
3170
|
+
this.api.clearValidateState(e.id);
|
|
3171
|
+
});
|
|
3172
|
+
});
|
|
3151
3173
|
}));
|
|
3152
3174
|
},
|
|
3153
3175
|
onInput(e, r) {
|
|
@@ -3158,7 +3180,7 @@ function ui(t) {
|
|
|
3158
3180
|
this.deferSyncValue(() => {
|
|
3159
3181
|
const i = e.getParentGroup(), s = i ? this.subRuleData[i.id] : null, n = {};
|
|
3160
3182
|
Object.keys(r || {}).forEach((o) => {
|
|
3161
|
-
s &&
|
|
3183
|
+
s && k(s, o) ? n[o] = r[o] : k(this.api.form, o) ? this.api.form[o] = r[o] : this.api.top !== this.api && k(this.api.top.form, o) && (this.api.top.form[o] = r[o]);
|
|
3162
3184
|
}), Object.keys(n).length && this.api.setChildrenFormData(i.rule, n);
|
|
3163
3185
|
});
|
|
3164
3186
|
},
|
|
@@ -3168,7 +3190,7 @@ function ui(t) {
|
|
|
3168
3190
|
setFormData(e, r) {
|
|
3169
3191
|
e.modelValue = r;
|
|
3170
3192
|
const i = e.getParentGroup();
|
|
3171
|
-
i && (this.subRuleData[i.id] ||
|
|
3193
|
+
i && (this.subRuleData[i.id] || S(this.subRuleData, i.id, {}), S(this.subRuleData[i.id], e.field, e.rule.value)), S(this.formData, e.id, r);
|
|
3172
3194
|
},
|
|
3173
3195
|
rmSubRuleData(e) {
|
|
3174
3196
|
const r = e.getParentGroup();
|
|
@@ -3188,7 +3210,7 @@ function ui(t) {
|
|
|
3188
3210
|
return e.ignore === !0 || e.ignore === "hidden" && e.hidden || this.options.ignoreHiddenFields && e.hidden;
|
|
3189
3211
|
},
|
|
3190
3212
|
appendValue(e) {
|
|
3191
|
-
(!e.field || !
|
|
3213
|
+
(!e.field || !k(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3192
3214
|
},
|
|
3193
3215
|
addSubForm(e, r) {
|
|
3194
3216
|
this.subForm[e.id] = r;
|
|
@@ -3205,7 +3227,7 @@ function ui(t) {
|
|
|
3205
3227
|
}), this.vm.updateValue(e);
|
|
3206
3228
|
},
|
|
3207
3229
|
isChange(e, r) {
|
|
3208
|
-
return JSON.stringify(this.getFormData(e),
|
|
3230
|
+
return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
|
|
3209
3231
|
},
|
|
3210
3232
|
isQuote(e, r) {
|
|
3211
3233
|
return (h.Object(r) || Array.isArray(r)) && r === e.rule.value;
|
|
@@ -3238,7 +3260,7 @@ function ui(t) {
|
|
|
3238
3260
|
}
|
|
3239
3261
|
});
|
|
3240
3262
|
}
|
|
3241
|
-
function
|
|
3263
|
+
function vt(t, e) {
|
|
3242
3264
|
return typeof e == "function" ? "" + e : e;
|
|
3243
3265
|
}
|
|
3244
3266
|
const ke = {
|
|
@@ -3292,35 +3314,35 @@ function ci(t) {
|
|
|
3292
3314
|
getParser(e) {
|
|
3293
3315
|
const r = this.fc.parsers, i = this.fc.renderDriver;
|
|
3294
3316
|
if (i) {
|
|
3295
|
-
const s = i.parsers || {}, n = s[e.originType] || s[
|
|
3317
|
+
const s = i.parsers || {}, n = s[e.originType] || s[G(e.type)] || s[e.trueType];
|
|
3296
3318
|
if (n)
|
|
3297
3319
|
return n;
|
|
3298
3320
|
}
|
|
3299
|
-
return r[e.originType] || r[
|
|
3321
|
+
return r[e.originType] || r[G(e.type)] || r[e.trueType] || ke;
|
|
3300
3322
|
},
|
|
3301
3323
|
bindParser(e) {
|
|
3302
3324
|
e.setParser(this.getParser(e));
|
|
3303
3325
|
},
|
|
3304
3326
|
getType(e) {
|
|
3305
|
-
const r = this.fc.CreateNode.aliasMap, i = r[e] || r[
|
|
3306
|
-
return
|
|
3327
|
+
const r = this.fc.CreateNode.aliasMap, i = r[e] || r[G(e)] || e;
|
|
3328
|
+
return G(i);
|
|
3307
3329
|
},
|
|
3308
3330
|
noWatch(e) {
|
|
3309
3331
|
this.noWatchFn || (this.noWatchFn = e), F(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3310
3332
|
},
|
|
3311
3333
|
watchCtx(e) {
|
|
3312
|
-
if (
|
|
3334
|
+
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && fi.indexOf(i) === -1).forEach((i) => {
|
|
3313
3335
|
const s = Re(e.rule, i), n = i === "children";
|
|
3314
|
-
e.refRule[i] = s, e.watch.push(
|
|
3336
|
+
e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3315
3337
|
let l = s.value;
|
|
3316
3338
|
if (!this.isBreakWatch()) {
|
|
3317
3339
|
if (n && e.parser.loadChildren === !1) {
|
|
3318
3340
|
this.$render.clearCache(e), this.nextRefresh();
|
|
3319
3341
|
return;
|
|
3320
3342
|
}
|
|
3321
|
-
if (this.watching = !0,
|
|
3343
|
+
if (this.watching = !0, P(() => {
|
|
3322
3344
|
this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
|
|
3323
|
-
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(),
|
|
3345
|
+
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), P(() => {
|
|
3324
3346
|
this.targetHook(e, "hidden", { value: l });
|
|
3325
3347
|
})), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
|
|
3326
3348
|
this.syncForm();
|
|
@@ -3345,7 +3367,7 @@ function ci(t) {
|
|
|
3345
3367
|
s && (i = this.api.t(s[1]));
|
|
3346
3368
|
}
|
|
3347
3369
|
return i;
|
|
3348
|
-
}), e.refRule.__$validate = ce(() =>
|
|
3370
|
+
}), e.refRule.__$validate = ce(() => H(e.rule.validate).map((i) => {
|
|
3349
3371
|
const s = b({}, i);
|
|
3350
3372
|
if (s.message) {
|
|
3351
3373
|
const n = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
@@ -3366,7 +3388,7 @@ function ci(t) {
|
|
|
3366
3388
|
return s;
|
|
3367
3389
|
})), e.input) {
|
|
3368
3390
|
const i = Re(e.rule, "value");
|
|
3369
|
-
e.watch.push(
|
|
3391
|
+
e.watch.push(L(() => i.value, () => {
|
|
3370
3392
|
let s = e.parser.toFormValue(i.value, e);
|
|
3371
3393
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
3372
3394
|
}));
|
|
@@ -3383,7 +3405,7 @@ function ci(t) {
|
|
|
3383
3405
|
}), a = (l) => {
|
|
3384
3406
|
s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : ee(e.rule, s, l);
|
|
3385
3407
|
};
|
|
3386
|
-
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !==
|
|
3408
|
+
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== U(e.rule, s)) && a(o.value), e.watch.push(L(o, (l) => {
|
|
3387
3409
|
n = l, setTimeout(() => {
|
|
3388
3410
|
a(l);
|
|
3389
3411
|
});
|
|
@@ -3400,18 +3422,18 @@ function ci(t) {
|
|
|
3400
3422
|
const l = a.mode === "OR";
|
|
3401
3423
|
let u = !0;
|
|
3402
3424
|
for (let f = 0; f < a.group.length; f++) {
|
|
3403
|
-
const
|
|
3404
|
-
let
|
|
3405
|
-
if (
|
|
3406
|
-
y = JSON.stringify(this.fc.getLoadData(
|
|
3407
|
-
else if (
|
|
3408
|
-
y =
|
|
3425
|
+
const m = a.group[f];
|
|
3426
|
+
let p, y = null;
|
|
3427
|
+
if (m.variable)
|
|
3428
|
+
y = JSON.stringify(this.fc.getLoadData(m.variable) || "");
|
|
3429
|
+
else if (m.field)
|
|
3430
|
+
y = dt(m.field || "");
|
|
3409
3431
|
else
|
|
3410
3432
|
return !0;
|
|
3411
|
-
let v =
|
|
3412
|
-
if (v && (v =
|
|
3433
|
+
let v = m.compare;
|
|
3434
|
+
if (v && (v = dt(v || "")), m.mode ? p = n(m) : ae[m.condition] ? h.Function(m.handler) ? p = F(() => m.handler(this.api, e.rule)) : p = new Function("$condition", "$val", "$form", "$group", "$rule", `with($form){with(this){with($group){ return $condition['${m.condition}'](${y}, ${v || "$val"}); }}}`).call(this.api.form, ae, m.value, this.api.top.form, s ? this.subRuleData[s.id] || {} : {}, e.rule) : p = !1, l && p)
|
|
3413
3435
|
return !0;
|
|
3414
|
-
l || (u = u &&
|
|
3436
|
+
l || (u = u && p);
|
|
3415
3437
|
}
|
|
3416
3438
|
return l ? !1 : u;
|
|
3417
3439
|
};
|
|
@@ -3453,7 +3475,7 @@ function ci(t) {
|
|
|
3453
3475
|
const { id: r, field: i, input: s, name: n } = e;
|
|
3454
3476
|
Y(this.ctxs, r), Y(this.formData, r), Y(this.subForm, r), Y(this.vm.ctxInject, r);
|
|
3455
3477
|
const o = e.getParentGroup();
|
|
3456
|
-
o && this.subRuleData[o.id] && Y(this.subRuleData[o.id], i), e.group && Y(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !
|
|
3478
|
+
o && this.subRuleData[o.id] && Y(this.subRuleData[o.id], i), e.group && Y(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !k(this.fieldCtx, i) && Y(this.form, i), this.deferSyncValue(() => {
|
|
3457
3479
|
if (!this.reloading) {
|
|
3458
3480
|
if (e.parser.loadChildren !== !1) {
|
|
3459
3481
|
const l = e.getPending("children", e.rule.children);
|
|
@@ -3479,7 +3501,7 @@ function hi(t) {
|
|
|
3479
3501
|
this.fc.targetFormDriver(e, this.api, this.fc), this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
|
|
3480
3502
|
},
|
|
3481
3503
|
emitEvent(e, ...r) {
|
|
3482
|
-
const i = this.options[e] || this.options[
|
|
3504
|
+
const i = this.options[e] || this.options[G("on-" + e)];
|
|
3483
3505
|
if (i) {
|
|
3484
3506
|
const s = W(i);
|
|
3485
3507
|
h.Function(s) && F(() => s(...r));
|
|
@@ -3490,7 +3512,7 @@ function hi(t) {
|
|
|
3490
3512
|
var n, o;
|
|
3491
3513
|
let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
|
|
3492
3514
|
s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
|
|
3493
|
-
F(() => a(
|
|
3515
|
+
F(() => a(q(b({}, i || {}), { rule: e.rule, api: this.api })));
|
|
3494
3516
|
}));
|
|
3495
3517
|
}
|
|
3496
3518
|
});
|
|
@@ -3517,7 +3539,7 @@ function di(t) {
|
|
|
3517
3539
|
let r = {
|
|
3518
3540
|
required: () => {
|
|
3519
3541
|
var i, s;
|
|
3520
|
-
return (
|
|
3542
|
+
return (k(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
|
|
3521
3543
|
}
|
|
3522
3544
|
};
|
|
3523
3545
|
Object.keys(e.rule.effect || {}).forEach((i) => {
|
|
@@ -3525,7 +3547,7 @@ function di(t) {
|
|
|
3525
3547
|
}), Object.keys(e.rule).forEach((i) => {
|
|
3526
3548
|
i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
|
|
3527
3549
|
}), Object.keys(r).forEach((i) => {
|
|
3528
|
-
e.watch.push(
|
|
3550
|
+
e.watch.push(L(r[i], (s) => {
|
|
3529
3551
|
this.effect(e, "watch", { [i]: s });
|
|
3530
3552
|
}, { deep: !0 }));
|
|
3531
3553
|
});
|
|
@@ -3547,9 +3569,9 @@ function di(t) {
|
|
|
3547
3569
|
}, r);
|
|
3548
3570
|
},
|
|
3549
3571
|
getEffect(e, r) {
|
|
3550
|
-
if (
|
|
3572
|
+
if (k(e, "$" + r))
|
|
3551
3573
|
return e["$" + r];
|
|
3552
|
-
if (
|
|
3574
|
+
if (k(e, "effect") && k(e.effect, r))
|
|
3553
3575
|
return e.effect[r];
|
|
3554
3576
|
},
|
|
3555
3577
|
emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
|
|
@@ -3558,15 +3580,15 @@ function di(t) {
|
|
|
3558
3580
|
Object.keys(l).forEach((u) => {
|
|
3559
3581
|
const f = this.providers[u];
|
|
3560
3582
|
if (!f || f.input && !i) return;
|
|
3561
|
-
let
|
|
3583
|
+
let m;
|
|
3562
3584
|
if (!f._c)
|
|
3563
|
-
|
|
3585
|
+
m = "*";
|
|
3564
3586
|
else if (f._used.indexOf(s) > -1)
|
|
3565
|
-
|
|
3587
|
+
m = s;
|
|
3566
3588
|
else
|
|
3567
3589
|
return;
|
|
3568
|
-
const
|
|
3569
|
-
e && (
|
|
3590
|
+
const p = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3591
|
+
e && (p.getProp = () => e.effectData(u), p.clearProp = () => e.clearEffectData(u), p.mergeProp = (y) => Q(p.getProp(), [y]), p.id = e.id), this.bus.$emit(`p:${u}:${m}:${f.input ? 1 : 0}`, o, [p, r, this.api]);
|
|
3570
3592
|
});
|
|
3571
3593
|
}
|
|
3572
3594
|
});
|
|
@@ -3584,7 +3606,7 @@ function mi(t) {
|
|
|
3584
3606
|
} else return h.String(e) ? [e] : !1;
|
|
3585
3607
|
}
|
|
3586
3608
|
function z(t) {
|
|
3587
|
-
|
|
3609
|
+
Lt(this, {
|
|
3588
3610
|
options() {
|
|
3589
3611
|
return t.options.value || {};
|
|
3590
3612
|
},
|
|
@@ -3682,7 +3704,14 @@ function $i() {
|
|
|
3682
3704
|
return (he.isReservedTag ? he.isReservedTag(r) : (o = (n = he) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
|
|
3683
3705
|
},
|
|
3684
3706
|
makeComponent(r, i, s) {
|
|
3707
|
+
var o;
|
|
3685
3708
|
let n = this.$h(r, yi(i), s || []);
|
|
3709
|
+
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3710
|
+
const a = Object.keys(n.componentOptions.propsData);
|
|
3711
|
+
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
3712
|
+
n.data.attrs[l] == null && a.indexOf(l) === -1 && ["string", "number", "boolean"].indexOf(typeof i.props[l]) > -1 && (n.data.attrs[l] = i.props[l]);
|
|
3713
|
+
});
|
|
3714
|
+
}
|
|
3686
3715
|
return n.context = this.vm, n;
|
|
3687
3716
|
},
|
|
3688
3717
|
aliasMap: t
|
|
@@ -3704,11 +3733,11 @@ function $i() {
|
|
|
3704
3733
|
}), e;
|
|
3705
3734
|
}
|
|
3706
3735
|
function vi(t) {
|
|
3707
|
-
class e extends
|
|
3736
|
+
class e extends Ht {
|
|
3708
3737
|
}
|
|
3709
3738
|
return Object.assign(e.prototype, t), e;
|
|
3710
3739
|
}
|
|
3711
|
-
function
|
|
3740
|
+
function Ht(t) {
|
|
3712
3741
|
_(this, {
|
|
3713
3742
|
$handle: t,
|
|
3714
3743
|
vm: t.vm,
|
|
@@ -3719,12 +3748,12 @@ function Gt(t) {
|
|
|
3719
3748
|
}
|
|
3720
3749
|
}), this.updateKey(), this.init();
|
|
3721
3750
|
}
|
|
3722
|
-
_(
|
|
3751
|
+
_(Ht.prototype, {
|
|
3723
3752
|
__init() {
|
|
3724
3753
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
3725
3754
|
},
|
|
3726
3755
|
updateKey() {
|
|
3727
|
-
this.key =
|
|
3756
|
+
this.key = je();
|
|
3728
3757
|
},
|
|
3729
3758
|
//TODO interface
|
|
3730
3759
|
init() {
|
|
@@ -3768,18 +3797,18 @@ const bi = function(t) {
|
|
|
3768
3797
|
const e = {
|
|
3769
3798
|
name: "loadData",
|
|
3770
3799
|
_fn: [],
|
|
3771
|
-
|
|
3800
|
+
loaded(r, i, s) {
|
|
3772
3801
|
this.deleted(r);
|
|
3773
|
-
let n =
|
|
3802
|
+
let n = H(r.getValue());
|
|
3774
3803
|
const o = [];
|
|
3775
3804
|
n.forEach((a) => {
|
|
3776
3805
|
if (a && (a.attr || a.template)) {
|
|
3777
|
-
let l = (
|
|
3778
|
-
let
|
|
3779
|
-
a.template ?
|
|
3806
|
+
let l = (m) => {
|
|
3807
|
+
let p;
|
|
3808
|
+
a.template ? p = t.$handle.loadStrVar(a.template, m) : a.handler && h.Function(a.handler) ? p = a.handler(m, i, s) : p = m(a.attr, a.default), a.copy !== !1 && (p = J(p));
|
|
3780
3809
|
const y = a.modify ? i : r.getProp();
|
|
3781
|
-
a.to === "child" ? y.children ?
|
|
3782
|
-
}, u = (
|
|
3810
|
+
a.to === "child" ? y.children ? S(y.children, 0, p) : S(y, "children", [p]) : ee(y, a.to || "options", p), s.sync(i);
|
|
3811
|
+
}, u = (m) => l(m);
|
|
3783
3812
|
const f = t.watchLoadData(u);
|
|
3784
3813
|
l = le(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
3785
3814
|
}
|
|
@@ -3807,10 +3836,10 @@ const bi = function(t) {
|
|
|
3807
3836
|
let f = (y) => {
|
|
3808
3837
|
let v = t.t(u ? l.attr : l, u ? l.params : null, y);
|
|
3809
3838
|
const w = u && l.modify ? i : r.getProp();
|
|
3810
|
-
a === "child" ? w.children ?
|
|
3811
|
-
},
|
|
3812
|
-
const
|
|
3813
|
-
f = le(f, l.wait || 300), l.watch !== !1 ? o.push(
|
|
3839
|
+
a === "child" ? w.children ? S(w.children, 0, v) : S(w, "children", [v]) : ee(w, a, v), s.sync(i);
|
|
3840
|
+
}, m = (y) => f(y);
|
|
3841
|
+
const p = t.watchLoadData(m);
|
|
3842
|
+
f = le(f, l.wait || 300), l.watch !== !1 ? o.push(p) : p();
|
|
3814
3843
|
}
|
|
3815
3844
|
}), this._fn[r.id] = o;
|
|
3816
3845
|
},
|
|
@@ -3821,7 +3850,7 @@ const bi = function(t) {
|
|
|
3821
3850
|
}
|
|
3822
3851
|
};
|
|
3823
3852
|
return e.watch = e.loaded, e;
|
|
3824
|
-
},
|
|
3853
|
+
}, Jt = {
|
|
3825
3854
|
name: "componentValidate",
|
|
3826
3855
|
load(t, e, r) {
|
|
3827
3856
|
let i = t.getValue();
|
|
@@ -3830,7 +3859,7 @@ const bi = function(t) {
|
|
|
3830
3859
|
else {
|
|
3831
3860
|
h.Object(i) || (i = { method: i });
|
|
3832
3861
|
const s = i.method;
|
|
3833
|
-
delete i.method, t.getProp().validate = [
|
|
3862
|
+
delete i.method, t.getProp().validate = [q(b({}, i), {
|
|
3834
3863
|
validator(...n) {
|
|
3835
3864
|
const o = oe(e);
|
|
3836
3865
|
if (o)
|
|
@@ -3844,7 +3873,7 @@ const bi = function(t) {
|
|
|
3844
3873
|
}
|
|
3845
3874
|
},
|
|
3846
3875
|
watch(...t) {
|
|
3847
|
-
|
|
3876
|
+
Jt.load(...t);
|
|
3848
3877
|
}
|
|
3849
3878
|
}, Ci = function(t) {
|
|
3850
3879
|
function e(s) {
|
|
@@ -3856,40 +3885,40 @@ const bi = function(t) {
|
|
|
3856
3885
|
function r(s, n, o) {
|
|
3857
3886
|
let a = s.value;
|
|
3858
3887
|
i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
|
|
3859
|
-
const l = (
|
|
3860
|
-
|
|
3888
|
+
const l = (m) => {
|
|
3889
|
+
m === void 0 ? s.clearProp() : ee(s.getProp(), a.to || "options", m), o.sync(n);
|
|
3861
3890
|
};
|
|
3862
3891
|
if (!a || !a.action && !a.key) {
|
|
3863
3892
|
l(void 0);
|
|
3864
3893
|
return;
|
|
3865
3894
|
}
|
|
3866
3895
|
if (a = J(a), a.to || (a.to = "options"), a.key) {
|
|
3867
|
-
const
|
|
3868
|
-
if (!
|
|
3896
|
+
const m = t.$handle.options.globalData[a.key];
|
|
3897
|
+
if (!m) {
|
|
3869
3898
|
l(void 0);
|
|
3870
3899
|
return;
|
|
3871
3900
|
}
|
|
3872
|
-
if (
|
|
3873
|
-
l(
|
|
3901
|
+
if (m.type === "static") {
|
|
3902
|
+
l(m.data);
|
|
3874
3903
|
return;
|
|
3875
3904
|
} else
|
|
3876
|
-
a = b(b({}, a),
|
|
3905
|
+
a = b(b({}, a), m);
|
|
3877
3906
|
}
|
|
3878
3907
|
const u = a.onError, f = () => {
|
|
3879
3908
|
if (!s.getValue())
|
|
3880
3909
|
return s.clearProp(), o.sync(n), !0;
|
|
3881
3910
|
};
|
|
3882
|
-
i._fn[s.id] = t.watchLoadData(le((
|
|
3883
|
-
if (
|
|
3911
|
+
i._fn[s.id] = t.watchLoadData(le((m, p) => {
|
|
3912
|
+
if (p && a.watch === !1)
|
|
3884
3913
|
return i._fn[s.id]();
|
|
3885
|
-
const y = t.$handle.loadFetchVar(J(a),
|
|
3914
|
+
const y = t.$handle.loadFetchVar(J(a), m), v = q(b({
|
|
3886
3915
|
headers: {}
|
|
3887
3916
|
}, y), {
|
|
3888
3917
|
onSuccess(w, j) {
|
|
3889
3918
|
if (f()) return;
|
|
3890
|
-
let Z = (
|
|
3919
|
+
let Z = (T) => j ? T : k(T, "data") ? T.data : T;
|
|
3891
3920
|
const V = W(y.parse);
|
|
3892
|
-
h.Function(V) ? Z = V : V && h.String(V) && (Z = (
|
|
3921
|
+
h.Function(V) ? Z = V : V && h.String(V) && (Z = (T) => U(T, V)), l(Z(w, n, o)), o.sync(n);
|
|
3893
3922
|
},
|
|
3894
3923
|
onError(w) {
|
|
3895
3924
|
l(void 0), !f() && (u || ((j) => xe(j.message || "fetch fail " + y.action)))(w, n, o);
|
|
@@ -3911,7 +3940,7 @@ const bi = function(t) {
|
|
|
3911
3940
|
const i = {
|
|
3912
3941
|
name: "fetch",
|
|
3913
3942
|
_fn: [],
|
|
3914
|
-
|
|
3943
|
+
loaded(...s) {
|
|
3915
3944
|
r(...s);
|
|
3916
3945
|
},
|
|
3917
3946
|
watch(...s) {
|
|
@@ -3926,7 +3955,7 @@ const bi = function(t) {
|
|
|
3926
3955
|
fetch: Ci,
|
|
3927
3956
|
loadData: bi,
|
|
3928
3957
|
t: _i,
|
|
3929
|
-
componentValidate:
|
|
3958
|
+
componentValidate: Jt
|
|
3930
3959
|
};
|
|
3931
3960
|
function Oi(t) {
|
|
3932
3961
|
t = t || /* @__PURE__ */ new Map();
|
|
@@ -3952,7 +3981,7 @@ function Oi(t) {
|
|
|
3952
3981
|
};
|
|
3953
3982
|
return e;
|
|
3954
3983
|
}
|
|
3955
|
-
const Fi = "html",
|
|
3984
|
+
const Fi = "html", Si = {
|
|
3956
3985
|
name: Fi,
|
|
3957
3986
|
loadChildren: !1,
|
|
3958
3987
|
render(t, e) {
|
|
@@ -3962,7 +3991,7 @@ const Fi = "html", ki = {
|
|
|
3962
3991
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
3963
3992
|
}
|
|
3964
3993
|
};
|
|
3965
|
-
function
|
|
3994
|
+
function ki(t) {
|
|
3966
3995
|
t = t + "=";
|
|
3967
3996
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
3968
3997
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -3980,7 +4009,7 @@ function Ri(t) {
|
|
|
3980
4009
|
}
|
|
3981
4010
|
return null;
|
|
3982
4011
|
}
|
|
3983
|
-
function
|
|
4012
|
+
function Ri(t) {
|
|
3984
4013
|
const e = localStorage.getItem(t);
|
|
3985
4014
|
if (e)
|
|
3986
4015
|
try {
|
|
@@ -3990,30 +4019,43 @@ function Si(t) {
|
|
|
3990
4019
|
}
|
|
3991
4020
|
return null;
|
|
3992
4021
|
}
|
|
3993
|
-
function
|
|
4022
|
+
function Ei(t) {
|
|
4023
|
+
const e = sessionStorage.getItem(t);
|
|
4024
|
+
if (e)
|
|
4025
|
+
try {
|
|
4026
|
+
return JSON.parse(e);
|
|
4027
|
+
} catch (r) {
|
|
4028
|
+
return e;
|
|
4029
|
+
}
|
|
4030
|
+
return null;
|
|
4031
|
+
}
|
|
4032
|
+
function it(t, e) {
|
|
3994
4033
|
if (!e)
|
|
3995
4034
|
return null;
|
|
3996
4035
|
const r = e.split(".");
|
|
3997
4036
|
let i = t(r.shift());
|
|
3998
|
-
return r.length ? i == null ? null :
|
|
3999
|
-
}
|
|
4000
|
-
function Ei(t) {
|
|
4001
|
-
return Jt(Ri, t);
|
|
4037
|
+
return r.length ? i == null ? null : U(i, r) : i;
|
|
4002
4038
|
}
|
|
4003
4039
|
function Di(t) {
|
|
4004
|
-
return
|
|
4040
|
+
return it(ki, t);
|
|
4041
|
+
}
|
|
4042
|
+
function ji(t) {
|
|
4043
|
+
return it(Ri, t);
|
|
4044
|
+
}
|
|
4045
|
+
function Ii(t) {
|
|
4046
|
+
return it(Ei, t);
|
|
4005
4047
|
}
|
|
4006
|
-
function
|
|
4048
|
+
function Ai(t, e) {
|
|
4007
4049
|
let r;
|
|
4008
4050
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4009
4051
|
}
|
|
4010
4052
|
function Ne() {
|
|
4011
|
-
return
|
|
4053
|
+
return Ai("name", ...arguments);
|
|
4012
4054
|
}
|
|
4013
|
-
function
|
|
4055
|
+
function Vi(t) {
|
|
4014
4056
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4015
4057
|
}
|
|
4016
|
-
function
|
|
4058
|
+
function Pi(t, e) {
|
|
4017
4059
|
const r = new Vue({
|
|
4018
4060
|
data() {
|
|
4019
4061
|
return { rule: t, option: e || {} };
|
|
@@ -4024,23 +4066,23 @@ function Ai(t, e) {
|
|
|
4024
4066
|
});
|
|
4025
4067
|
return r.$mount(), r;
|
|
4026
4068
|
}
|
|
4027
|
-
function
|
|
4069
|
+
function Bi(t) {
|
|
4028
4070
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4029
|
-
|
|
4071
|
+
jt.push(...e), Ze.push(...r), Ye.push(...i), Nt([...e, ...r, ...i]);
|
|
4030
4072
|
}
|
|
4031
|
-
let
|
|
4032
|
-
const
|
|
4073
|
+
let Li = 1;
|
|
4074
|
+
const M = {}, Fe = Symbol("defValue");
|
|
4033
4075
|
function Wt(t) {
|
|
4034
4076
|
const e = {
|
|
4035
4077
|
[Te.name]: Te
|
|
4036
4078
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4037
4079
|
t.extendApi
|
|
4038
4080
|
], u = b({}, wi), f = Kr();
|
|
4039
|
-
let
|
|
4040
|
-
const
|
|
4041
|
-
|
|
4081
|
+
let m = { global: {} };
|
|
4082
|
+
const p = x({}), y = $i(), v = {}, w = t.isMobile === !0, j = {};
|
|
4083
|
+
Bi(t.attrs || {});
|
|
4042
4084
|
function Z(c) {
|
|
4043
|
-
const d =
|
|
4085
|
+
const d = M[c];
|
|
4044
4086
|
if (Array.isArray(d))
|
|
4045
4087
|
return d.map((g) => g.api());
|
|
4046
4088
|
if (d)
|
|
@@ -4049,13 +4091,13 @@ function Wt(t) {
|
|
|
4049
4091
|
function V(c) {
|
|
4050
4092
|
o.push(c);
|
|
4051
4093
|
}
|
|
4052
|
-
function
|
|
4094
|
+
function T() {
|
|
4053
4095
|
const c = Ne(...arguments);
|
|
4054
4096
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4055
4097
|
}
|
|
4056
|
-
function
|
|
4098
|
+
function Ie() {
|
|
4057
4099
|
const c = Ne(...arguments);
|
|
4058
|
-
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop :
|
|
4100
|
+
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(b({}, c.prop), {
|
|
4059
4101
|
name: c.id
|
|
4060
4102
|
}));
|
|
4061
4103
|
}
|
|
@@ -4065,21 +4107,21 @@ function Wt(t) {
|
|
|
4065
4107
|
function O() {
|
|
4066
4108
|
const c = Ne(...arguments);
|
|
4067
4109
|
if (!c.id || !c.prop) return ke;
|
|
4068
|
-
const d =
|
|
4069
|
-
r[d] =
|
|
4110
|
+
const d = G(c.id), g = c.prop, $ = g.merge === !0 ? r[d] : void 0;
|
|
4111
|
+
r[d] = Oe(g, $ || ke), f[d] = A(d), g.maker && _(f, g.maker);
|
|
4070
4112
|
}
|
|
4071
4113
|
function E(c, d) {
|
|
4072
4114
|
let g;
|
|
4073
4115
|
if (h.String(c)) {
|
|
4074
4116
|
if (g = c, d === void 0)
|
|
4075
|
-
return ["form-create", "formcreate"].indexOf(g) > -1 ?
|
|
4117
|
+
return ["form-create", "formcreate"].indexOf(g) > -1 ? B() : e[g];
|
|
4076
4118
|
} else
|
|
4077
|
-
g =
|
|
4119
|
+
g = G(c.name), d = c;
|
|
4078
4120
|
if (!g || !d) return;
|
|
4079
|
-
const $ =
|
|
4121
|
+
const $ = G(g);
|
|
4080
4122
|
e[g] = d, e[$] = d, delete y.aliasMap[g], delete y.aliasMap[$], delete r[g], delete r[$], d.formCreateParser && O(g, d.formCreateParser);
|
|
4081
4123
|
}
|
|
4082
|
-
function
|
|
4124
|
+
function B() {
|
|
4083
4125
|
return Nr(Ve, e, i);
|
|
4084
4126
|
}
|
|
4085
4127
|
function re() {
|
|
@@ -4089,11 +4131,11 @@ function Wt(t) {
|
|
|
4089
4131
|
return h.Function(c.install) ? c.install(ie, d) : h.Function(c) && c(ie, d), this;
|
|
4090
4132
|
}
|
|
4091
4133
|
function ie(c, d, g) {
|
|
4092
|
-
let $ =
|
|
4134
|
+
let $ = Pi(c, d || {});
|
|
4093
4135
|
const C = $.$refs.fc.formCreate;
|
|
4094
|
-
return C.$parent = g,
|
|
4136
|
+
return C.$parent = g, Vi(C.options).appendChild($.$el), C.api();
|
|
4095
4137
|
}
|
|
4096
|
-
|
|
4138
|
+
Oe(ie, j);
|
|
4097
4139
|
function Kt(c) {
|
|
4098
4140
|
let d = b({}, t);
|
|
4099
4141
|
return c ? d.inherit = {
|
|
@@ -4105,7 +4147,7 @@ function Wt(t) {
|
|
|
4105
4147
|
useApps: o,
|
|
4106
4148
|
maker: f,
|
|
4107
4149
|
formulas: v,
|
|
4108
|
-
loadData:
|
|
4150
|
+
loadData: p
|
|
4109
4151
|
} : delete d.inherit, Wt(d);
|
|
4110
4152
|
}
|
|
4111
4153
|
function Xt(c, d) {
|
|
@@ -4117,30 +4159,30 @@ function Wt(t) {
|
|
|
4117
4159
|
function Zt(c, d) {
|
|
4118
4160
|
const g = n[c] || {}, $ = g.parsers || {};
|
|
4119
4161
|
d.parsers && Object.keys(d.parsers).forEach((C) => {
|
|
4120
|
-
$[C] =
|
|
4121
|
-
}), d.name = c, n[c] =
|
|
4162
|
+
$[C] = Oe(d.parsers[C], ke);
|
|
4163
|
+
}), d.name = c, n[c] = q(b(b({}, g), d), { parsers: $ });
|
|
4122
4164
|
}
|
|
4123
4165
|
function be(c) {
|
|
4124
|
-
c && Object.keys(
|
|
4125
|
-
(Array.isArray(
|
|
4166
|
+
c && Object.keys(M).forEach((d) => {
|
|
4167
|
+
(Array.isArray(M[d]) ? M[d] : [M[d]]).forEach(($) => {
|
|
4126
4168
|
$.bus.$emit("$loadData." + c);
|
|
4127
4169
|
});
|
|
4128
4170
|
});
|
|
4129
4171
|
}
|
|
4130
|
-
function Ie(c, d) {
|
|
4131
|
-
ee(m, c, d), be(c);
|
|
4132
|
-
}
|
|
4133
4172
|
function Ae(c, d) {
|
|
4173
|
+
ee(p, c, d), be(c);
|
|
4174
|
+
}
|
|
4175
|
+
function _e(c, d) {
|
|
4134
4176
|
const g = (...$) => F(() => d(...$));
|
|
4135
|
-
g._driver = !0,
|
|
4177
|
+
g._driver = !0, Ae(c, g);
|
|
4136
4178
|
}
|
|
4137
|
-
function
|
|
4179
|
+
function nt(c, d) {
|
|
4138
4180
|
const g = (c || "").split(".");
|
|
4139
4181
|
c = g.shift();
|
|
4140
4182
|
const $ = g.join(".");
|
|
4141
|
-
if (
|
|
4142
|
-
let C =
|
|
4143
|
-
return C && C._driver ? C = C($) : g.length && (C =
|
|
4183
|
+
if (k(p, c) || S(p, c, Fe), p[c] !== Fe) {
|
|
4184
|
+
let C = p[c];
|
|
4185
|
+
return C && C._driver ? C = C($) : g.length && (C = U(C, g)), C == null || C === "" ? d : C;
|
|
4144
4186
|
} else
|
|
4145
4187
|
return d;
|
|
4146
4188
|
}
|
|
@@ -4148,14 +4190,14 @@ function Wt(t) {
|
|
|
4148
4190
|
l.push(c);
|
|
4149
4191
|
}
|
|
4150
4192
|
function xt(c) {
|
|
4151
|
-
delete
|
|
4193
|
+
delete p[c], be(c);
|
|
4152
4194
|
}
|
|
4153
4195
|
function er(c, d) {
|
|
4154
4196
|
a.push({ name: c, callback: d });
|
|
4155
4197
|
}
|
|
4156
4198
|
function Ve(c) {
|
|
4157
4199
|
_(this, {
|
|
4158
|
-
id:
|
|
4200
|
+
id: Li++,
|
|
4159
4201
|
create: ie,
|
|
4160
4202
|
vm: c,
|
|
4161
4203
|
manager: vi(t.manager),
|
|
@@ -4165,7 +4207,7 @@ function Wt(t) {
|
|
|
4165
4207
|
formulas: v,
|
|
4166
4208
|
isMobile: w,
|
|
4167
4209
|
rules: c.$options.propsData.rule,
|
|
4168
|
-
name: c.$options.propsData.name ||
|
|
4210
|
+
name: c.$options.propsData.name || je(),
|
|
4169
4211
|
inFor: c.$options.propsData.inFor,
|
|
4170
4212
|
prop: {
|
|
4171
4213
|
components: e,
|
|
@@ -4175,7 +4217,7 @@ function Wt(t) {
|
|
|
4175
4217
|
renderDriver: null,
|
|
4176
4218
|
get: null,
|
|
4177
4219
|
refreshData: be,
|
|
4178
|
-
loadData:
|
|
4220
|
+
loadData: p,
|
|
4179
4221
|
CreateNode: y,
|
|
4180
4222
|
bus: new Oi(),
|
|
4181
4223
|
unwatch: [],
|
|
@@ -4185,15 +4227,15 @@ function Wt(t) {
|
|
|
4185
4227
|
tmpData: x({})
|
|
4186
4228
|
}), a.forEach((d) => {
|
|
4187
4229
|
this.bus.$on(d.name, d.callback);
|
|
4188
|
-
}),
|
|
4189
|
-
|
|
4230
|
+
}), P(() => {
|
|
4231
|
+
L(this.options, () => {
|
|
4190
4232
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4191
4233
|
}, { deep: !0 });
|
|
4192
|
-
}), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new z(this), this.name && (this.inFor ? (
|
|
4234
|
+
}), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new z(this), this.name && (this.inFor ? (M[this.name] || (M[this.name] = []), M[this.name].push(this)) : M[this.name] = this);
|
|
4193
4235
|
}
|
|
4194
4236
|
Ve.isMobile = w, _(Ve.prototype, {
|
|
4195
4237
|
init() {
|
|
4196
|
-
this.isSub() && this.unwatch.push(
|
|
4238
|
+
this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
|
|
4197
4239
|
this.initOptions(), this.$handle.api.refresh();
|
|
4198
4240
|
}, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4199
4241
|
},
|
|
@@ -4204,8 +4246,8 @@ function Wt(t) {
|
|
|
4204
4246
|
t(c, d, g) {
|
|
4205
4247
|
let $ = g ? g("$t." + c) : this.globalLanguageDriver(c);
|
|
4206
4248
|
return $ == null && ($ = ""), $ && d && Object.keys(d).forEach((C) => {
|
|
4207
|
-
const
|
|
4208
|
-
$ = $.replace(
|
|
4249
|
+
const R = new RegExp(`{${C}}`, "g");
|
|
4250
|
+
$ = $.replace(R, d[C]);
|
|
4209
4251
|
}), $;
|
|
4210
4252
|
},
|
|
4211
4253
|
globalDataDriver(c) {
|
|
@@ -4213,33 +4255,33 @@ function Wt(t) {
|
|
|
4213
4255
|
const g = d.shift(), $ = this.options.value.globalData && this.options.value.globalData[g];
|
|
4214
4256
|
if ($) {
|
|
4215
4257
|
if ($.type === "static")
|
|
4216
|
-
return
|
|
4258
|
+
return U($.data, d);
|
|
4217
4259
|
{
|
|
4218
4260
|
let C;
|
|
4219
|
-
const
|
|
4220
|
-
if (
|
|
4221
|
-
if (
|
|
4261
|
+
const R = this.fetchCache.get($);
|
|
4262
|
+
if (R) {
|
|
4263
|
+
if (R.status && (C = U(R.data, d)), !R.loading)
|
|
4222
4264
|
return C;
|
|
4223
|
-
|
|
4265
|
+
R.loading = !1, this.fetchCache.set($, R);
|
|
4224
4266
|
} else
|
|
4225
4267
|
this.fetchCache.set($, { status: !1 });
|
|
4226
4268
|
const I = le(() => {
|
|
4227
4269
|
ue();
|
|
4228
|
-
const
|
|
4229
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (
|
|
4230
|
-
}, $.wait || 600), de = (
|
|
4231
|
-
this.fetchCache.set($, { status: !0, data:
|
|
4232
|
-
}, pe = (
|
|
4270
|
+
const N = this.fetchCache.get($);
|
|
4271
|
+
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (N && (N.loading = !0, this.fetchCache.set($, N)), this.bus.$emit("$loadData.$globalData." + g)) : this.fetchCache.delete($);
|
|
4272
|
+
}, $.wait || 600), de = (N) => {
|
|
4273
|
+
this.fetchCache.set($, { status: !0, data: N }), this.bus.$emit("$loadData.$globalData." + g);
|
|
4274
|
+
}, pe = (N, ne) => {
|
|
4233
4275
|
if (ne && $.watch === !1)
|
|
4234
4276
|
return ue();
|
|
4235
4277
|
if (ne) {
|
|
4236
4278
|
I();
|
|
4237
4279
|
return;
|
|
4238
4280
|
}
|
|
4239
|
-
const se = this.$handle.loadFetchVar(Je($),
|
|
4240
|
-
this.$handle.api.fetch(se).then((
|
|
4241
|
-
de(
|
|
4242
|
-
}).catch((
|
|
4281
|
+
const se = this.$handle.loadFetchVar(Je($), N);
|
|
4282
|
+
this.$handle.api.fetch(se).then((we) => {
|
|
4283
|
+
de(we);
|
|
4284
|
+
}).catch((we) => {
|
|
4243
4285
|
de(null);
|
|
4244
4286
|
});
|
|
4245
4287
|
}, ue = this.watchLoadData(pe);
|
|
@@ -4253,9 +4295,9 @@ function Wt(t) {
|
|
|
4253
4295
|
},
|
|
4254
4296
|
globalLanguageDriver(c) {
|
|
4255
4297
|
let d = this.vm.top.$props.locale, g;
|
|
4256
|
-
if (d && typeof d == "object" && (g =
|
|
4298
|
+
if (d && typeof d == "object" && (g = U(d, c)), g == null) {
|
|
4257
4299
|
const $ = this.options.value.language || {}, C = this.getLocale();
|
|
4258
|
-
g =
|
|
4300
|
+
g = U($[C], c);
|
|
4259
4301
|
}
|
|
4260
4302
|
return g;
|
|
4261
4303
|
},
|
|
@@ -4265,11 +4307,11 @@ function Wt(t) {
|
|
|
4265
4307
|
if ($) {
|
|
4266
4308
|
const C = h.Function($) ? $ : W($.handle);
|
|
4267
4309
|
if (C)
|
|
4268
|
-
return
|
|
4310
|
+
return U(F(() => C(this.get || ((...R) => this.getLoadData(...R)), this.$handle.api)), d);
|
|
4269
4311
|
}
|
|
4270
4312
|
},
|
|
4271
4313
|
setData(c, d, g) {
|
|
4272
|
-
g ?
|
|
4314
|
+
g ? Ae(c, d) : (ee(this.vm.top.fc.tmpData, c, d), this.bus.$emit("$loadData." + c));
|
|
4273
4315
|
},
|
|
4274
4316
|
getLoadData(c, d) {
|
|
4275
4317
|
let g = null;
|
|
@@ -4291,10 +4333,10 @@ function Wt(t) {
|
|
|
4291
4333
|
else if (C === "$t")
|
|
4292
4334
|
g = this.globalLanguageDriver($.join(".")), $ = [];
|
|
4293
4335
|
else {
|
|
4294
|
-
const
|
|
4295
|
-
R
|
|
4336
|
+
const R = this.vm.top.fc.tmpData;
|
|
4337
|
+
k(R, C) || S(R, C, Fe), g = R[C] !== Fe ? U(R, c) : nt(c), $ = [];
|
|
4296
4338
|
}
|
|
4297
|
-
g && $.length && (g =
|
|
4339
|
+
g && $.length && (g = U(g, $));
|
|
4298
4340
|
}
|
|
4299
4341
|
return g == null || g === "" ? d : g;
|
|
4300
4342
|
},
|
|
@@ -4307,26 +4349,26 @@ function Wt(t) {
|
|
|
4307
4349
|
}, C = (I, de) => {
|
|
4308
4350
|
if (g[I])
|
|
4309
4351
|
return g[I].val;
|
|
4310
|
-
const pe = ce(() => this.getLoadData(I, de)), ue = I.split("."),
|
|
4352
|
+
const pe = ce(() => this.getLoadData(I, de)), ue = I.split("."), N = ue.shift(), ne = ue.shift() || "", se = le(() => {
|
|
4311
4353
|
const Pe = this.getLoadData(I, de);
|
|
4312
4354
|
if (g[I])
|
|
4313
4355
|
JSON.stringify(Pe) !== JSON.stringify(g[I].val) && (g[I].val = Pe, $(!0));
|
|
4314
4356
|
else return;
|
|
4315
|
-
}, d || 0),
|
|
4357
|
+
}, d || 0), we = L(pe, (Pe) => {
|
|
4316
4358
|
se();
|
|
4317
4359
|
});
|
|
4318
|
-
return this.bus.$on("$loadData." +
|
|
4360
|
+
return this.bus.$on("$loadData." + N, se), ne && this.bus.$on("$loadData." + N + "." + ne, se), g[I] = {
|
|
4319
4361
|
fn: () => {
|
|
4320
|
-
this.bus.$off("$loadData." +
|
|
4362
|
+
this.bus.$off("$loadData." + N, se), ne && this.bus.$off("$loadData." + N + "." + ne, se), we();
|
|
4321
4363
|
},
|
|
4322
4364
|
val: pe.value
|
|
4323
4365
|
}, pe.value;
|
|
4324
4366
|
};
|
|
4325
4367
|
$(!1);
|
|
4326
|
-
const
|
|
4368
|
+
const R = () => {
|
|
4327
4369
|
Object.keys(g).forEach((I) => g[I].fn()), g = {};
|
|
4328
4370
|
};
|
|
4329
|
-
return this.unwatch.push(
|
|
4371
|
+
return this.unwatch.push(R), R;
|
|
4330
4372
|
},
|
|
4331
4373
|
isSub() {
|
|
4332
4374
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4339,7 +4381,7 @@ function Wt(t) {
|
|
|
4339
4381
|
resetBtn: {},
|
|
4340
4382
|
globalEvent: {},
|
|
4341
4383
|
globalData: {}
|
|
4342
|
-
}, J(
|
|
4384
|
+
}, J(m));
|
|
4343
4385
|
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);
|
|
4344
4386
|
},
|
|
4345
4387
|
mergeOptions(c, d, g) {
|
|
@@ -4362,10 +4404,10 @@ function Wt(t) {
|
|
|
4362
4404
|
unmount() {
|
|
4363
4405
|
if (this.name)
|
|
4364
4406
|
if (this.inFor) {
|
|
4365
|
-
const c =
|
|
4366
|
-
|
|
4407
|
+
const c = M[this.name].indexOf(this);
|
|
4408
|
+
M[this.name].splice(c, 1);
|
|
4367
4409
|
} else
|
|
4368
|
-
delete
|
|
4410
|
+
delete M[this.name];
|
|
4369
4411
|
a.forEach((c) => {
|
|
4370
4412
|
this.bus.$off(c.name, c.callback);
|
|
4371
4413
|
}), this.tmpData = {}, this.unwatch.forEach((c) => c()), this.unwatch = [], this.$handle.reloadRule([]);
|
|
@@ -4374,36 +4416,36 @@ function Wt(t) {
|
|
|
4374
4416
|
this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
|
|
4375
4417
|
}
|
|
4376
4418
|
});
|
|
4377
|
-
function
|
|
4419
|
+
function st(c) {
|
|
4378
4420
|
_(c, {
|
|
4379
4421
|
version: t.version,
|
|
4380
4422
|
ui: t.ui,
|
|
4381
4423
|
isMobile: w,
|
|
4382
4424
|
extendApi: Yt,
|
|
4383
|
-
getData:
|
|
4384
|
-
setDataDriver:
|
|
4385
|
-
setData:
|
|
4425
|
+
getData: nt,
|
|
4426
|
+
setDataDriver: _e,
|
|
4427
|
+
setData: Ae,
|
|
4386
4428
|
removeData: xt,
|
|
4387
4429
|
refreshData: be,
|
|
4388
4430
|
maker: f,
|
|
4389
4431
|
component: E,
|
|
4390
|
-
directive:
|
|
4432
|
+
directive: T,
|
|
4391
4433
|
setModelField: Xt,
|
|
4392
4434
|
setFormula: Qt,
|
|
4393
4435
|
setDriver: Zt,
|
|
4394
|
-
register:
|
|
4436
|
+
register: Ie,
|
|
4395
4437
|
$vnode: re,
|
|
4396
4438
|
parser: O,
|
|
4397
4439
|
use: ve,
|
|
4398
4440
|
factory: Kt,
|
|
4399
4441
|
componentAlias: $e,
|
|
4400
|
-
copyRule:
|
|
4401
|
-
copyRules:
|
|
4442
|
+
copyRule: Pt,
|
|
4443
|
+
copyRules: Bt,
|
|
4402
4444
|
mergeRule: Q,
|
|
4403
|
-
fetch:
|
|
4404
|
-
$form:
|
|
4445
|
+
fetch: Ut,
|
|
4446
|
+
$form: B,
|
|
4405
4447
|
parseFn: W,
|
|
4406
|
-
parseJson:
|
|
4448
|
+
parseJson: Vt,
|
|
4407
4449
|
toJson: et,
|
|
4408
4450
|
useApp: V,
|
|
4409
4451
|
getApi: Z,
|
|
@@ -4414,25 +4456,25 @@ function Wt(t) {
|
|
|
4414
4456
|
_(c, {
|
|
4415
4457
|
create: ie,
|
|
4416
4458
|
install(d, g) {
|
|
4417
|
-
if (
|
|
4459
|
+
if (m = b(b({}, m), g || {}), d._installedFormCreate === !0) return;
|
|
4418
4460
|
d._installedFormCreate = !0;
|
|
4419
|
-
const $ = function(
|
|
4420
|
-
return ie(
|
|
4461
|
+
const $ = function(R, I = {}) {
|
|
4462
|
+
return ie(R, I, this);
|
|
4421
4463
|
};
|
|
4422
|
-
|
|
4423
|
-
const C =
|
|
4424
|
-
d.component(C.name, C), d.component("FcFragment", re()), o.forEach((
|
|
4425
|
-
F(() =>
|
|
4464
|
+
st($), d.prototype.$formCreate = $;
|
|
4465
|
+
const C = B();
|
|
4466
|
+
d.component(C.name, C), d.component("FcFragment", re()), o.forEach((R) => {
|
|
4467
|
+
F(() => R(c, d));
|
|
4426
4468
|
});
|
|
4427
4469
|
}
|
|
4428
4470
|
});
|
|
4429
4471
|
}
|
|
4430
|
-
if (
|
|
4472
|
+
if (st(j), tr(j), _e("$cookie", Di), _e("$localStorage", ji), _e("$sessionStorage", Ii), y.use({ fragment: "fcFragment" }), t.install && ie.use(t), O(Si), t.inherit) {
|
|
4431
4473
|
const c = t.inherit;
|
|
4432
|
-
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(
|
|
4474
|
+
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(p, c.loadData), c.formulas && _(v, c.formulas);
|
|
4433
4475
|
}
|
|
4434
|
-
const
|
|
4435
|
-
return
|
|
4476
|
+
const Ce = B();
|
|
4477
|
+
return Oe(Ce, j), Object.defineProperties(Ce, {
|
|
4436
4478
|
fetch: {
|
|
4437
4479
|
get() {
|
|
4438
4480
|
return j.fetch;
|
|
@@ -4441,7 +4483,7 @@ function Wt(t) {
|
|
|
4441
4483
|
j.fetch = c;
|
|
4442
4484
|
}
|
|
4443
4485
|
}
|
|
4444
|
-
}),
|
|
4486
|
+
}), Ce.util = j, Ce;
|
|
4445
4487
|
}
|
|
4446
4488
|
function Me(t) {
|
|
4447
4489
|
if (h.Date(t))
|
|
@@ -4451,10 +4493,10 @@ function Me(t) {
|
|
|
4451
4493
|
return e.toString() === "Invalid Date" ? t : e;
|
|
4452
4494
|
}
|
|
4453
4495
|
}
|
|
4454
|
-
const
|
|
4455
|
-
name:
|
|
4496
|
+
const bt = "datePicker", Ti = {
|
|
4497
|
+
name: bt,
|
|
4456
4498
|
maker: function() {
|
|
4457
|
-
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = A(
|
|
4499
|
+
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = A(bt, { type: e.toLowerCase() }), t), {});
|
|
4458
4500
|
}(),
|
|
4459
4501
|
mergeProp(t) {
|
|
4460
4502
|
let e = t.prop.props;
|
|
@@ -4483,7 +4525,7 @@ const vt = "datePicker", Bi = {
|
|
|
4483
4525
|
mounted(t) {
|
|
4484
4526
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
4485
4527
|
}
|
|
4486
|
-
}, Ue = "hidden",
|
|
4528
|
+
}, Ue = "hidden", Ni = {
|
|
4487
4529
|
name: Ue,
|
|
4488
4530
|
maker: {
|
|
4489
4531
|
[Ue]: (t, e) => A(Ue)("", t, e)
|
|
@@ -4491,7 +4533,7 @@ const vt = "datePicker", Bi = {
|
|
|
4491
4533
|
render() {
|
|
4492
4534
|
return [];
|
|
4493
4535
|
}
|
|
4494
|
-
}, qe = "input",
|
|
4536
|
+
}, qe = "input", Mi = {
|
|
4495
4537
|
name: qe,
|
|
4496
4538
|
maker: function() {
|
|
4497
4539
|
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = A(qe, { type: r }), e), {});
|
|
@@ -4501,36 +4543,36 @@ const vt = "datePicker", Bi = {
|
|
|
4501
4543
|
let { props: e } = t.prop;
|
|
4502
4544
|
e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4503
4545
|
}
|
|
4504
|
-
},
|
|
4505
|
-
name:
|
|
4546
|
+
}, _t = "slider", Ui = {
|
|
4547
|
+
name: _t,
|
|
4506
4548
|
maker: {
|
|
4507
|
-
sliderRange: A(
|
|
4549
|
+
sliderRange: A(_t, { range: !0 })
|
|
4508
4550
|
},
|
|
4509
4551
|
toFormValue(t, e) {
|
|
4510
4552
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4511
4553
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4512
4554
|
}
|
|
4513
|
-
},
|
|
4555
|
+
}, qi = {
|
|
4514
4556
|
name: "switch",
|
|
4515
4557
|
mergeProp(t) {
|
|
4516
4558
|
const e = t.prop.props.slot || {}, r = t.prop.scopedSlots || {};
|
|
4517
4559
|
e.open && (r.open = () => e.open), e.close && (r.close = () => e.close), t.prop.scopedSlots = r;
|
|
4518
4560
|
}
|
|
4519
|
-
},
|
|
4561
|
+
}, Gi = {
|
|
4520
4562
|
name: "FcRow",
|
|
4521
4563
|
render(t, e) {
|
|
4522
4564
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4523
4565
|
e.vNode.row(e.prop, t)
|
|
4524
4566
|
]);
|
|
4525
4567
|
}
|
|
4526
|
-
},
|
|
4527
|
-
Bi,
|
|
4528
|
-
Li,
|
|
4568
|
+
}, Hi = [
|
|
4529
4569
|
Ti,
|
|
4530
4570
|
Ni,
|
|
4531
4571
|
Mi,
|
|
4532
|
-
Ui
|
|
4533
|
-
|
|
4572
|
+
Ui,
|
|
4573
|
+
qi,
|
|
4574
|
+
Gi
|
|
4575
|
+
], Ji = {
|
|
4534
4576
|
button: "iButton",
|
|
4535
4577
|
icon: "Icon",
|
|
4536
4578
|
slider: "Slider",
|
|
@@ -4557,21 +4599,21 @@ const vt = "datePicker", Bi = {
|
|
|
4557
4599
|
array: "fcGroup",
|
|
4558
4600
|
subForm: "fcSubForm",
|
|
4559
4601
|
object: "fcSubForm"
|
|
4560
|
-
},
|
|
4602
|
+
}, Ee = {
|
|
4561
4603
|
resetBtnType: "default",
|
|
4562
4604
|
resetBtnIcon: "md-refresh",
|
|
4563
4605
|
infoIcon: "ios-information-circle-outline"
|
|
4564
4606
|
};
|
|
4565
|
-
function
|
|
4607
|
+
function Wi() {
|
|
4566
4608
|
return {
|
|
4567
4609
|
type: "poptip",
|
|
4568
4610
|
trigger: "hover",
|
|
4569
4611
|
placement: "top-start",
|
|
4570
4612
|
wordWrap: !0,
|
|
4571
|
-
icon:
|
|
4613
|
+
icon: Ee.infoIcon
|
|
4572
4614
|
};
|
|
4573
4615
|
}
|
|
4574
|
-
function
|
|
4616
|
+
function zi() {
|
|
4575
4617
|
return {
|
|
4576
4618
|
form: {
|
|
4577
4619
|
inline: !1,
|
|
@@ -4587,36 +4629,36 @@ function Ji() {
|
|
|
4587
4629
|
submitBtn: {
|
|
4588
4630
|
type: "primary",
|
|
4589
4631
|
disabled: !1,
|
|
4590
|
-
innerText: "
|
|
4632
|
+
innerText: "",
|
|
4591
4633
|
loading: !1,
|
|
4592
4634
|
show: !0,
|
|
4593
4635
|
click: void 0
|
|
4594
4636
|
},
|
|
4595
4637
|
resetBtn: {
|
|
4596
|
-
type:
|
|
4638
|
+
type: Ee.resetBtnType,
|
|
4597
4639
|
disabled: !1,
|
|
4598
|
-
icon:
|
|
4599
|
-
innerText: "
|
|
4640
|
+
icon: Ee.resetBtnIcon,
|
|
4641
|
+
innerText: "",
|
|
4600
4642
|
loading: !1,
|
|
4601
4643
|
show: !1,
|
|
4602
4644
|
click: void 0
|
|
4603
4645
|
}
|
|
4604
4646
|
};
|
|
4605
4647
|
}
|
|
4606
|
-
function
|
|
4607
|
-
|
|
4648
|
+
function Ct(t, e) {
|
|
4649
|
+
k(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4608
4650
|
}
|
|
4609
4651
|
function K(t) {
|
|
4610
4652
|
return t === !1;
|
|
4611
4653
|
}
|
|
4612
|
-
function
|
|
4613
|
-
|
|
4654
|
+
function Ki(t, e) {
|
|
4655
|
+
k(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4614
4656
|
}
|
|
4615
4657
|
function Ge(t) {
|
|
4616
4658
|
const e = b({}, t);
|
|
4617
4659
|
return delete e.children, e;
|
|
4618
4660
|
}
|
|
4619
|
-
const
|
|
4661
|
+
const Xi = {
|
|
4620
4662
|
validate() {
|
|
4621
4663
|
const t = this.form();
|
|
4622
4664
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4635,15 +4677,15 @@ const zi = {
|
|
|
4635
4677
|
},
|
|
4636
4678
|
tidyOptions(t) {
|
|
4637
4679
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4638
|
-
|
|
4680
|
+
Ki(t, e);
|
|
4639
4681
|
}), t;
|
|
4640
4682
|
},
|
|
4641
4683
|
tidyRule({ prop: t }) {
|
|
4642
|
-
return
|
|
4684
|
+
return Ct(t, "title"), Ct(t, "info"), t;
|
|
4643
4685
|
},
|
|
4644
4686
|
mergeProp(t) {
|
|
4645
4687
|
const e = {
|
|
4646
|
-
info:
|
|
4688
|
+
info: Wi(),
|
|
4647
4689
|
title: {},
|
|
4648
4690
|
col: { span: 24 },
|
|
4649
4691
|
wrap: {}
|
|
@@ -4656,7 +4698,7 @@ const zi = {
|
|
|
4656
4698
|
!t.size && this.options.form.size && (t.size = this.options.form.size);
|
|
4657
4699
|
},
|
|
4658
4700
|
getDefaultOptions() {
|
|
4659
|
-
return
|
|
4701
|
+
return zi();
|
|
4660
4702
|
},
|
|
4661
4703
|
update() {
|
|
4662
4704
|
const t = this.options.form;
|
|
@@ -4685,7 +4727,7 @@ const zi = {
|
|
|
4685
4727
|
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;
|
|
4686
4728
|
delete r.wrap.title;
|
|
4687
4729
|
const u = K(r.wrap.show) ? e : this.$r(X([r.wrap, {
|
|
4688
|
-
props:
|
|
4730
|
+
props: q(b({
|
|
4689
4731
|
labelWidth: o
|
|
4690
4732
|
}, Ge(r.wrap || {})), {
|
|
4691
4733
|
prop: t.id,
|
|
@@ -4704,24 +4746,25 @@ const zi = {
|
|
|
4704
4746
|
return !(!e.title && !e.native || K(e.show));
|
|
4705
4747
|
},
|
|
4706
4748
|
makeInfo(t, e, r) {
|
|
4749
|
+
var u, f, m;
|
|
4707
4750
|
const i = b({}, t.title), s = b({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
|
|
4708
|
-
title: r.refRule.__$title.value,
|
|
4751
|
+
title: (u = r.refRule) == null ? void 0 : u.__$title.value,
|
|
4709
4752
|
rule: r.rule,
|
|
4710
4753
|
options: this.options
|
|
4711
|
-
}) : r.refRule.__$title.value + (n.labelSuffix || n["label-suffix"] || "")];
|
|
4754
|
+
}) : ((f = r.refRule) == null ? void 0 : f.__$title.value) + (n.labelSuffix || n["label-suffix"] || "")];
|
|
4712
4755
|
if (!K(s.show) && (s.info || s.native) && !K(s.icon)) {
|
|
4713
|
-
const
|
|
4756
|
+
const p = {
|
|
4714
4757
|
type: s.type || "poptip",
|
|
4715
4758
|
props: Ge(s),
|
|
4716
4759
|
key: `${e}pop`,
|
|
4717
4760
|
slot: "label"
|
|
4718
4761
|
};
|
|
4719
|
-
delete
|
|
4720
|
-
const
|
|
4721
|
-
s.info && !
|
|
4762
|
+
delete p.props.icon, delete p.props.show, delete p.props.info, delete p.props.align, delete p.props.native;
|
|
4763
|
+
const y = "content";
|
|
4764
|
+
s.info && !k(p.props, y) && (p.props[y] = (m = r.refRule) == null ? void 0 : m.__$info.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(X([s, p]), [
|
|
4722
4765
|
this.$r({
|
|
4723
4766
|
type: "icon",
|
|
4724
|
-
props: { type: s.icon === !0 ?
|
|
4767
|
+
props: { type: s.icon === !0 ? Ee.infoIcon : s.icon, size: 16 },
|
|
4725
4768
|
style: "margin-top: -1px",
|
|
4726
4769
|
key: `${e}i`
|
|
4727
4770
|
})
|
|
@@ -4771,7 +4814,7 @@ const zi = {
|
|
|
4771
4814
|
}, [e]);
|
|
4772
4815
|
},
|
|
4773
4816
|
makeResetBtn() {
|
|
4774
|
-
const t = b({}, this.options.resetBtn), e = t.innerText;
|
|
4817
|
+
const t = b({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
|
|
4775
4818
|
return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
|
|
4776
4819
|
type: "button",
|
|
4777
4820
|
props: t,
|
|
@@ -4787,7 +4830,7 @@ const zi = {
|
|
|
4787
4830
|
}, [e]);
|
|
4788
4831
|
},
|
|
4789
4832
|
makeSubmitBtn() {
|
|
4790
|
-
const t = b({}, this.options.submitBtn), e = t.innerText;
|
|
4833
|
+
const t = b({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
|
|
4791
4834
|
return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
|
|
4792
4835
|
type: "button",
|
|
4793
4836
|
props: t,
|
|
@@ -4803,13 +4846,13 @@ const zi = {
|
|
|
4803
4846
|
key: `${this.key}b1`
|
|
4804
4847
|
}, [e]);
|
|
4805
4848
|
}
|
|
4806
|
-
}, te = {},
|
|
4807
|
-
function
|
|
4808
|
-
|
|
4849
|
+
}, te = {}, Qi = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
|
|
4850
|
+
function Zi(t) {
|
|
4851
|
+
Qi.forEach((e) => {
|
|
4809
4852
|
t[e] = A(e);
|
|
4810
4853
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
4811
4854
|
}
|
|
4812
|
-
function
|
|
4855
|
+
function Yi(t) {
|
|
4813
4856
|
const e = "upload", r = {
|
|
4814
4857
|
image: ["image", 0],
|
|
4815
4858
|
file: ["file", 0],
|
|
@@ -4818,19 +4861,19 @@ function Qi(t) {
|
|
|
4818
4861
|
};
|
|
4819
4862
|
Object.keys(r).reduce((i, s) => (i[s] = A(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
4820
4863
|
}
|
|
4821
|
-
function
|
|
4864
|
+
function xi(t) {
|
|
4822
4865
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
4823
4866
|
Object.keys(r).reduce((i, s) => (i[s] = A(e, { type: r[s] }), i), t);
|
|
4824
4867
|
}
|
|
4825
|
-
function
|
|
4868
|
+
function en(t) {
|
|
4826
4869
|
const e = "timePicker";
|
|
4827
4870
|
t.time = A(e, { type: "time" }), t.timeRange = A(e, { type: "timerange" });
|
|
4828
4871
|
}
|
|
4829
|
-
function
|
|
4872
|
+
function tn(t) {
|
|
4830
4873
|
const e = "select";
|
|
4831
4874
|
t.selectMultiple = A(e, { multiple: !0 }), t.selectOne = A(e, { multiple: !1 });
|
|
4832
4875
|
}
|
|
4833
|
-
function
|
|
4876
|
+
function rn(t) {
|
|
4834
4877
|
const e = "frame", r = {
|
|
4835
4878
|
frameInputs: ["input", 0],
|
|
4836
4879
|
frameFiles: ["file", 0],
|
|
@@ -4841,16 +4884,16 @@ function en(t) {
|
|
|
4841
4884
|
};
|
|
4842
4885
|
Object.keys(r).reduce((i, s) => (i[s] = A(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;
|
|
4843
4886
|
}
|
|
4844
|
-
Xi(te);
|
|
4845
|
-
Qi(te);
|
|
4846
4887
|
Zi(te);
|
|
4888
|
+
Yi(te);
|
|
4847
4889
|
xi(te);
|
|
4890
|
+
tn(te);
|
|
4891
|
+
rn(te);
|
|
4848
4892
|
en(te);
|
|
4849
|
-
|
|
4850
|
-
function Ct(t, e) {
|
|
4893
|
+
function wt(t, e) {
|
|
4851
4894
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
4852
4895
|
}
|
|
4853
|
-
function
|
|
4896
|
+
function nn(t, e) {
|
|
4854
4897
|
return {
|
|
4855
4898
|
formEl() {
|
|
4856
4899
|
return e.$manager.form();
|
|
@@ -4877,7 +4920,7 @@ function tn(t, e) {
|
|
|
4877
4920
|
const o = e.getFieldCtx(r);
|
|
4878
4921
|
if (!o) return;
|
|
4879
4922
|
const a = e.subForm[o.id], l = [e.$manager.validateField(o.id)];
|
|
4880
|
-
|
|
4923
|
+
H(a).forEach((u) => {
|
|
4881
4924
|
l.push(u.validate());
|
|
4882
4925
|
}), Promise.all(l).then(() => {
|
|
4883
4926
|
s(null), i && i(null);
|
|
@@ -4926,11 +4969,11 @@ function tn(t, e) {
|
|
|
4926
4969
|
}
|
|
4927
4970
|
},
|
|
4928
4971
|
submitBtnProps: (r = {}) => {
|
|
4929
|
-
let i =
|
|
4972
|
+
let i = wt(e.options.submitBtn, !0);
|
|
4930
4973
|
_(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
4931
4974
|
},
|
|
4932
4975
|
resetBtnProps: (r = {}) => {
|
|
4933
|
-
let i =
|
|
4976
|
+
let i = wt(e.options.resetBtn, !1);
|
|
4934
4977
|
_(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
4935
4978
|
},
|
|
4936
4979
|
submit(r, i) {
|
|
@@ -4948,21 +4991,21 @@ function tn(t, e) {
|
|
|
4948
4991
|
const zt = {
|
|
4949
4992
|
name: "required",
|
|
4950
4993
|
load(t, e, r) {
|
|
4951
|
-
const i =
|
|
4994
|
+
const i = sn(t.getValue());
|
|
4952
4995
|
if (i.required === !1)
|
|
4953
4996
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
4954
4997
|
else {
|
|
4955
4998
|
const s = b({
|
|
4956
4999
|
required: !0,
|
|
4957
|
-
validator(
|
|
4958
|
-
h.empty(
|
|
5000
|
+
validator(o, a, l) {
|
|
5001
|
+
h.empty(a) ? l(s.message) : l();
|
|
4959
5002
|
}
|
|
4960
|
-
}, i);
|
|
5003
|
+
}, i), n = e.__fc__.refRule.__$title.value;
|
|
4961
5004
|
if (!s.message)
|
|
4962
|
-
s.message =
|
|
5005
|
+
s.message = r.t("required", { title: n }) || n + (r.getLocale() === "en" ? " is required" : "不能为空");
|
|
4963
5006
|
else {
|
|
4964
|
-
const
|
|
4965
|
-
|
|
5007
|
+
const o = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
5008
|
+
o && (s.message = r.t(o[1], { title: n }));
|
|
4966
5009
|
}
|
|
4967
5010
|
t.getProp().validate = [s];
|
|
4968
5011
|
}
|
|
@@ -4972,25 +5015,25 @@ const zt = {
|
|
|
4972
5015
|
zt.load(...t);
|
|
4973
5016
|
}
|
|
4974
5017
|
};
|
|
4975
|
-
function
|
|
5018
|
+
function sn(t) {
|
|
4976
5019
|
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 : {};
|
|
4977
5020
|
}
|
|
4978
|
-
function
|
|
4979
|
-
t.componentAlias(
|
|
5021
|
+
function on(t) {
|
|
5022
|
+
t.componentAlias(Ji), Tr.forEach((e) => {
|
|
4980
5023
|
t.component(e.name, e);
|
|
4981
|
-
}), t.register(zt),
|
|
5024
|
+
}), t.register(zt), Hi.forEach((e) => {
|
|
4982
5025
|
t.parser(e);
|
|
4983
5026
|
}), Object.keys(te).forEach((e) => {
|
|
4984
5027
|
t.maker[e] = te[e];
|
|
4985
5028
|
});
|
|
4986
5029
|
}
|
|
4987
|
-
function
|
|
5030
|
+
function an() {
|
|
4988
5031
|
return Wt({
|
|
4989
5032
|
ui: "iview",
|
|
4990
|
-
version: "2.7.
|
|
4991
|
-
manager:
|
|
4992
|
-
install:
|
|
4993
|
-
extendApi:
|
|
5033
|
+
version: "2.7.2",
|
|
5034
|
+
manager: Xi,
|
|
5035
|
+
install: on,
|
|
5036
|
+
extendApi: nn,
|
|
4994
5037
|
attrs: {
|
|
4995
5038
|
normal: ["col", "wrap"],
|
|
4996
5039
|
array: ["className"],
|
|
@@ -4998,10 +5041,10 @@ function sn() {
|
|
|
4998
5041
|
}
|
|
4999
5042
|
});
|
|
5000
5043
|
}
|
|
5001
|
-
const Qe =
|
|
5044
|
+
const Qe = an();
|
|
5002
5045
|
typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
|
|
5003
|
-
const
|
|
5046
|
+
const fn = Qe.maker;
|
|
5004
5047
|
export {
|
|
5005
5048
|
Qe as default,
|
|
5006
|
-
|
|
5049
|
+
fn as maker
|
|
5007
5050
|
};
|