@form-create/element-ui 2.7.20 → 2.7.22
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 +328 -299
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +3 -3
- package/src/core/provider.js +16 -7
- package/src/style/index.css +1 -0
package/dist/form-create.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/element-ui v2.7.
|
|
3
|
+
* @form-create/element-ui v2.7.22
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
9
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame .fc-upload-btn,.fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.fc-form-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.fc-wrap-top.el-form-item>.el-form-item__content{margin-left:0!important}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
9
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame .fc-upload-btn,.fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.fc-form-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left;float:unset}.fc-wrap-top.el-form-item>.el-form-item__content{margin-left:0!important}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
10
10
|
var nr = Object.defineProperty, sr = Object.defineProperties;
|
|
11
11
|
var or = Object.getOwnPropertyDescriptors;
|
|
12
12
|
var at = Object.getOwnPropertySymbols;
|
|
@@ -19,7 +19,7 @@ var lt = (t, e, r) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
19
19
|
lr.call(e, r) && lt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
21
|
}, q = (t, e) => sr(t, or(e));
|
|
22
|
-
import
|
|
22
|
+
import be, { getCurrentInstance as ur, provide as fr, inject as cr, toRefs as ut, reactive as ne, onBeforeMount as hr, watch as N, onMounted as dr, onBeforeUnmount as pr, onUpdated as mr, nextTick as P, markRaw as ye, computed as $e, toRef as Ve, ref as gr } from "vue";
|
|
23
23
|
function yr(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
@@ -123,7 +123,7 @@ const Or = "fcCheckbox", Fr = {
|
|
|
123
123
|
this.$emit("fc.el", this.$refs.el);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
-
function
|
|
126
|
+
function G(t) {
|
|
127
127
|
return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
|
|
128
128
|
}
|
|
129
129
|
const kr = "fcFrame", Er = {
|
|
@@ -248,7 +248,7 @@ const kr = "fcFrame", Er = {
|
|
|
248
248
|
},
|
|
249
249
|
data() {
|
|
250
250
|
return {
|
|
251
|
-
fileList:
|
|
251
|
+
fileList: G(this.value),
|
|
252
252
|
previewVisible: !1,
|
|
253
253
|
frameVisible: !1,
|
|
254
254
|
previewImage: ""
|
|
@@ -256,7 +256,7 @@ const kr = "fcFrame", Er = {
|
|
|
256
256
|
},
|
|
257
257
|
watch: {
|
|
258
258
|
value(t) {
|
|
259
|
-
this.fileList =
|
|
259
|
+
this.fileList = G(t);
|
|
260
260
|
},
|
|
261
261
|
fileList(t) {
|
|
262
262
|
const e = this.maxLength === 1 ? t[0] || "" : t;
|
|
@@ -666,7 +666,7 @@ const jr = "fcSelect", Dr = {
|
|
|
666
666
|
t === "selected" ? e = this.$refs.tree.getCurrentKey() : e = this.$refs.tree.getCheckedKeys(), this.$emit("input", e);
|
|
667
667
|
},
|
|
668
668
|
setValue() {
|
|
669
|
-
this.type.toLocaleLowerCase() === "selected" ? this.$refs.tree.setCurrentKey(this.value) : this.$refs.tree.setCheckedKeys(
|
|
669
|
+
this.type.toLocaleLowerCase() === "selected" ? this.$refs.tree.setCurrentKey(this.value) : this.$refs.tree.setCheckedKeys(G(this.value));
|
|
670
670
|
}
|
|
671
671
|
},
|
|
672
672
|
render() {
|
|
@@ -750,11 +750,11 @@ const Pr = "fcUpload", Tr = {
|
|
|
750
750
|
};
|
|
751
751
|
},
|
|
752
752
|
created() {
|
|
753
|
-
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList =
|
|
753
|
+
this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = G(this.value).map(ft).map(ct);
|
|
754
754
|
},
|
|
755
755
|
watch: {
|
|
756
756
|
value(t) {
|
|
757
|
-
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles =
|
|
757
|
+
this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = G(t).map(ft).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
|
|
758
758
|
},
|
|
759
759
|
limit(t, e) {
|
|
760
760
|
(e === 1 || t === 1) && this.update();
|
|
@@ -913,12 +913,12 @@ const Pr = "fcUpload", Tr = {
|
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
function k(t, e, r) {
|
|
916
|
-
|
|
916
|
+
be.set(t, e, r);
|
|
917
917
|
}
|
|
918
918
|
function ie(t, e) {
|
|
919
|
-
(
|
|
919
|
+
(be.del || be.delete)(t, e);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Fe(t, e = {}, r) {
|
|
922
922
|
let i = !1;
|
|
923
923
|
for (let s in e)
|
|
924
924
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
@@ -936,14 +936,14 @@ function Oe(t, e = {}, r) {
|
|
|
936
936
|
}
|
|
937
937
|
else
|
|
938
938
|
o && k(t, s, {});
|
|
939
|
-
t[s] =
|
|
939
|
+
t[s] = Fe(t[s], n, r);
|
|
940
940
|
} else
|
|
941
941
|
k(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
942
942
|
}
|
|
943
943
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
944
944
|
}
|
|
945
945
|
function K(t) {
|
|
946
|
-
return
|
|
946
|
+
return Fe({}, { value: t }).value;
|
|
947
947
|
}
|
|
948
948
|
const Br = Object.assign || function(t) {
|
|
949
949
|
for (let e, r = 1; r < arguments.length; r++)
|
|
@@ -972,7 +972,7 @@ function Lr(t) {
|
|
|
972
972
|
function Ae(t) {
|
|
973
973
|
return Lr(t) ? t : Promise.resolve(t);
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function ve(t) {
|
|
976
976
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
977
977
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
978
978
|
}
|
|
@@ -989,8 +989,8 @@ function Mr(t) {
|
|
|
989
989
|
Ye(t.toString()), console.error(t);
|
|
990
990
|
}
|
|
991
991
|
const We = "[[FORM-CREATE-PREFIX-", xe = "-FORM-CREATE-SUFFIX]]";
|
|
992
|
-
function
|
|
993
|
-
return JSON.stringify(
|
|
992
|
+
function Oe(t, e) {
|
|
993
|
+
return JSON.stringify(Fe(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
994
994
|
if (!(i && i._isVue === !0)) {
|
|
995
995
|
if (typeof i != "function")
|
|
996
996
|
return i;
|
|
@@ -1143,7 +1143,7 @@ const Ur = "fcGroup", Hr = {
|
|
|
1143
1143
|
const s = i.$f.formData();
|
|
1144
1144
|
if (t === e)
|
|
1145
1145
|
i.$f.deferSyncValue(() => {
|
|
1146
|
-
|
|
1146
|
+
Fe(i.rule, t), i.$f.setValue(s);
|
|
1147
1147
|
}, !0);
|
|
1148
1148
|
else {
|
|
1149
1149
|
const n = i.$f.formData();
|
|
@@ -1510,7 +1510,7 @@ function Pt(t, e) {
|
|
|
1510
1510
|
return Tt([t], e || !1)[0];
|
|
1511
1511
|
}
|
|
1512
1512
|
function Tt(t, e) {
|
|
1513
|
-
return
|
|
1513
|
+
return Fe([], [...t], e || !1);
|
|
1514
1514
|
}
|
|
1515
1515
|
function ee(t, e) {
|
|
1516
1516
|
return Y(Array.isArray(e) ? e : [e], t, { array: et, normal: tt }), t;
|
|
@@ -1544,7 +1544,7 @@ function O(t, e) {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
function Xe(t, e) {
|
|
1546
1546
|
let r = null;
|
|
1547
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e &&
|
|
1547
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && G(r).forEach((i) => {
|
|
1548
1548
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1549
1549
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1550
1550
|
});
|
|
@@ -1559,7 +1559,7 @@ function zr(t, e) {
|
|
|
1559
1559
|
} else
|
|
1560
1560
|
return Xe(t, e);
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Se() {
|
|
1563
1563
|
const t = {}, e = (r) => r || "default";
|
|
1564
1564
|
return {
|
|
1565
1565
|
setSlot(r, i) {
|
|
@@ -1595,12 +1595,12 @@ function Re() {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1598
|
+
function je(t, e) {
|
|
1599
1599
|
return Object.setPrototypeOf(t, e), t;
|
|
1600
1600
|
}
|
|
1601
|
-
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e,
|
|
1601
|
+
const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, he = {
|
|
1602
1602
|
"==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
|
|
1603
|
-
"!=": (t, e) => !
|
|
1603
|
+
"!=": (t, e) => !he["=="](t, e),
|
|
1604
1604
|
">": (t, e) => t > e,
|
|
1605
1605
|
">=": (t, e) => t >= e,
|
|
1606
1606
|
"<": (t, e) => t < e,
|
|
@@ -1609,13 +1609,13 @@ const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
|
|
|
1609
1609
|
return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
|
|
1610
1610
|
},
|
|
1611
1611
|
notOn(t, e) {
|
|
1612
|
-
return !
|
|
1612
|
+
return !he.on(t, e);
|
|
1613
1613
|
},
|
|
1614
1614
|
in(t, e) {
|
|
1615
1615
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1616
1616
|
},
|
|
1617
1617
|
notIn(t, e) {
|
|
1618
|
-
return !
|
|
1618
|
+
return !he.in(t, e);
|
|
1619
1619
|
},
|
|
1620
1620
|
between(t, e) {
|
|
1621
1621
|
return t > e[0] && t < e[1];
|
|
@@ -1664,12 +1664,12 @@ function Lt(t) {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
1666
1666
|
}
|
|
1667
|
-
const
|
|
1667
|
+
const De = (t, e) => {
|
|
1668
1668
|
if (!(!t || t === e || !t.$props)) {
|
|
1669
1669
|
if (t.$props.formCreateInject)
|
|
1670
1670
|
return t.$props.formCreateInject;
|
|
1671
1671
|
if (t.$parent)
|
|
1672
|
-
return
|
|
1672
|
+
return De(t.$parent, e);
|
|
1673
1673
|
}
|
|
1674
1674
|
};
|
|
1675
1675
|
function Zr(t, e, r) {
|
|
@@ -1740,20 +1740,20 @@ function Zr(t, e, r) {
|
|
|
1740
1740
|
unique: 1,
|
|
1741
1741
|
renderRule: [...l.value || []],
|
|
1742
1742
|
updateValue: JSON.stringify(u.value || {})
|
|
1743
|
-
}),
|
|
1743
|
+
}), m = new t(n), y = m.api(), _ = p.value, F = () => {
|
|
1744
1744
|
if (o) {
|
|
1745
|
-
const E =
|
|
1745
|
+
const E = De(n, o);
|
|
1746
1746
|
if (E) {
|
|
1747
|
-
let
|
|
1748
|
-
_ ? (
|
|
1747
|
+
let S;
|
|
1748
|
+
_ ? (S = G(E.getSubForm()), S.push(y)) : S = y, E.subForm(S);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
},
|
|
1752
|
-
const E =
|
|
1751
|
+
}, J = () => {
|
|
1752
|
+
const E = De(n, o);
|
|
1753
1753
|
if (E)
|
|
1754
1754
|
if (_) {
|
|
1755
|
-
const
|
|
1756
|
-
M > -1 &&
|
|
1755
|
+
const S = G(E.getSubForm()), M = S.indexOf(y);
|
|
1756
|
+
M > -1 && S.splice(M, 1);
|
|
1757
1757
|
} else
|
|
1758
1758
|
E.subForm();
|
|
1759
1759
|
};
|
|
@@ -1761,54 +1761,54 @@ function Zr(t, e, r) {
|
|
|
1761
1761
|
hr(() => {
|
|
1762
1762
|
N(() => {
|
|
1763
1763
|
let E = "";
|
|
1764
|
-
const
|
|
1765
|
-
Object.keys(
|
|
1766
|
-
let
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
}),
|
|
1764
|
+
const S = s.option && s.option.globalClass || {};
|
|
1765
|
+
Object.keys(S).forEach((M) => {
|
|
1766
|
+
let ge = "";
|
|
1767
|
+
S[M].style && Object.keys(S[M].style).forEach((W) => {
|
|
1768
|
+
ge += ve(W) + ":" + S[M].style[W] + ";";
|
|
1769
|
+
}), S[M].content && (ge += S[M].content + ";"), ge && (E += `.${M}{${ge}}`);
|
|
1770
1770
|
}), s.option && s.option.style && (E += s.option.style), A || (A = document.createElement("style"), A.type = "text/css", document.head.appendChild(A)), A.innerHTML = E || "";
|
|
1771
1771
|
}, () => {
|
|
1772
1772
|
});
|
|
1773
1773
|
});
|
|
1774
1774
|
const L = se(() => {
|
|
1775
|
-
|
|
1776
|
-
}, 100),
|
|
1777
|
-
|
|
1775
|
+
m.bus.$emit("$loadData.$topForm");
|
|
1776
|
+
}, 100), pe = se(function() {
|
|
1777
|
+
m.bus.$emit("$loadData.$scopeForm");
|
|
1778
1778
|
}, 100), Pe = se(() => {
|
|
1779
|
-
|
|
1780
|
-
}, 100),
|
|
1781
|
-
|
|
1779
|
+
m.bus.$emit("$loadData.$form");
|
|
1780
|
+
}, 100), me = (E) => {
|
|
1781
|
+
m.bus.$emit("change-$form." + E);
|
|
1782
1782
|
};
|
|
1783
1783
|
return dr(() => {
|
|
1784
|
-
o && (y.top.bus.$on("$loadData.$form", L), y.top.bus.$on("change",
|
|
1784
|
+
o && (y.top.bus.$on("$loadData.$form", L), y.top.bus.$on("change", me)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", pe), m.mounted();
|
|
1785
1785
|
}), pr(() => {
|
|
1786
|
-
o && (y.top.bus.$off("$loadData.$form", L), y.top.bus.$off("change",
|
|
1786
|
+
o && (y.top.bus.$off("$loadData.$form", L), y.top.bus.$off("change", me)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", pe), J(), d.destroyed = !0, m.unmount(), A && (A.parentNode || A.parentElement) && document.head.removeChild(A);
|
|
1787
1787
|
}), mr(() => {
|
|
1788
|
-
|
|
1788
|
+
m.updated();
|
|
1789
1789
|
}), N(f, (E) => {
|
|
1790
|
-
E ? F() :
|
|
1790
|
+
E ? F() : J();
|
|
1791
1791
|
}, { immediate: !0 }), N(() => s.option, () => {
|
|
1792
|
-
|
|
1792
|
+
m.initOptions(), y.refresh();
|
|
1793
1793
|
}, { deep: !0, flush: "sync" }), N(() => [...l.value], (E) => {
|
|
1794
|
-
|
|
1794
|
+
m.$handle.isBreakWatch() || E.length === d.renderRule.length && E.every((S) => d.renderRule.indexOf(S) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
|
|
1795
1795
|
}), N(() => [s.disabled, s.preview], () => {
|
|
1796
1796
|
y.refresh();
|
|
1797
1797
|
}), N(u, (E) => {
|
|
1798
|
-
|
|
1798
|
+
Oe(E || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(E || {}) : y.setValue(E || {}));
|
|
1799
1799
|
}, { deep: !0, flush: "post" }), N(() => s.index, () => {
|
|
1800
|
-
y.coverValue({}),
|
|
1800
|
+
y.coverValue({}), m.$handle.updateAppendData(), P(() => {
|
|
1801
1801
|
P(() => {
|
|
1802
1802
|
y.clearValidateState();
|
|
1803
1803
|
});
|
|
1804
1804
|
});
|
|
1805
1805
|
}, { flush: "sync" }), q(v({
|
|
1806
|
-
fc:
|
|
1807
|
-
parent: o &&
|
|
1808
|
-
top:
|
|
1809
|
-
fapi:
|
|
1806
|
+
fc: ye(m),
|
|
1807
|
+
parent: o && ye(o),
|
|
1808
|
+
top: ye(a),
|
|
1809
|
+
fapi: ye(y)
|
|
1810
1810
|
}, ut(d)), {
|
|
1811
|
-
getGroupInject: () =>
|
|
1811
|
+
getGroupInject: () => De(n, o),
|
|
1812
1812
|
refresh() {
|
|
1813
1813
|
++d.unique;
|
|
1814
1814
|
},
|
|
@@ -1817,9 +1817,9 @@ function Zr(t, e, r) {
|
|
|
1817
1817
|
},
|
|
1818
1818
|
updateValue(E) {
|
|
1819
1819
|
if (d.destroyed) return;
|
|
1820
|
-
const
|
|
1821
|
-
d.updateValue !==
|
|
1822
|
-
Pe(), o ? f.value ||
|
|
1820
|
+
const S = Oe(E);
|
|
1821
|
+
d.updateValue !== S && (d.updateValue = S, n.$emit("update:value", E), P(() => {
|
|
1822
|
+
Pe(), o ? f.value || pe() : (L(), pe());
|
|
1823
1823
|
}));
|
|
1824
1824
|
}
|
|
1825
1825
|
});
|
|
@@ -2282,7 +2282,7 @@ function ti(t) {
|
|
|
2282
2282
|
return O(() => s.method(n, o)(...a));
|
|
2283
2283
|
},
|
|
2284
2284
|
toJson(n) {
|
|
2285
|
-
return
|
|
2285
|
+
return Oe(s.rule, n);
|
|
2286
2286
|
},
|
|
2287
2287
|
trigger(n, o, ...a) {
|
|
2288
2288
|
const l = s.el(n);
|
|
@@ -2346,6 +2346,13 @@ function ti(t) {
|
|
|
2346
2346
|
}).catch(a) : o(l.data) : o(t.fc.loadData[n]);
|
|
2347
2347
|
});
|
|
2348
2348
|
},
|
|
2349
|
+
emitGlobalEvent(n, ...o) {
|
|
2350
|
+
const a = s.getGlobalEvent(n);
|
|
2351
|
+
if (a) {
|
|
2352
|
+
const l = t.getInjectData({}, void 0);
|
|
2353
|
+
return l.args = [...o], o.unshift(l), a.apply(null, o);
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
2349
2356
|
setGlobalData(n, o) {
|
|
2350
2357
|
s.setData("$globalData." + n, o);
|
|
2351
2358
|
},
|
|
@@ -2379,22 +2386,32 @@ function ti(t) {
|
|
|
2379
2386
|
},
|
|
2380
2387
|
fetch(n) {
|
|
2381
2388
|
return new Promise((o, a) => {
|
|
2382
|
-
n = K(n), n = t.loadFetchVar(n)
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2389
|
+
n = K(n), n = t.loadFetchVar(n);
|
|
2390
|
+
const l = (u) => {
|
|
2391
|
+
O(() => n.onError && n.onError(u)), a(u);
|
|
2392
|
+
};
|
|
2393
|
+
t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((u) => {
|
|
2394
|
+
O(() => n.onSuccess && n.onSuccess(u)), o(u);
|
|
2395
|
+
}).catch((u) => {
|
|
2396
|
+
l(u);
|
|
2397
|
+
})).catch((u) => {
|
|
2398
|
+
l(u);
|
|
2387
2399
|
});
|
|
2388
2400
|
});
|
|
2389
2401
|
},
|
|
2390
2402
|
watchFetch(n, o, a, l) {
|
|
2391
2403
|
return t.fc.watchLoadData((u, f) => {
|
|
2392
2404
|
let p = K(n);
|
|
2393
|
-
p = t.loadFetchVar(p, u)
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2405
|
+
p = t.loadFetchVar(p, u);
|
|
2406
|
+
const d = (m) => {
|
|
2407
|
+
O(() => p.onError && p.onError(m)), a && a(m);
|
|
2408
|
+
};
|
|
2409
|
+
l && l(p, f) === !1 || t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((m) => {
|
|
2410
|
+
O(() => p.onSuccess && p.onSuccess(m)), o && o(m, f);
|
|
2411
|
+
}).catch((m) => {
|
|
2412
|
+
d(m);
|
|
2413
|
+
})).catch((m) => {
|
|
2414
|
+
d(m);
|
|
2398
2415
|
});
|
|
2399
2416
|
}, n.wait == null ? 1e3 : n.wait);
|
|
2400
2417
|
},
|
|
@@ -2456,7 +2473,7 @@ function ri(t) {
|
|
|
2456
2473
|
}
|
|
2457
2474
|
});
|
|
2458
2475
|
}
|
|
2459
|
-
function
|
|
2476
|
+
function H(t) {
|
|
2460
2477
|
const e = t.replace(/(-[a-z])/g, function(r) {
|
|
2461
2478
|
return r.replace("-", "").toLocaleUpperCase();
|
|
2462
2479
|
});
|
|
@@ -2474,7 +2491,7 @@ function ii(t) {
|
|
|
2474
2491
|
const r = (i) => {
|
|
2475
2492
|
if (i) {
|
|
2476
2493
|
let s;
|
|
2477
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2494
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + ve(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + ve(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2478
2495
|
}
|
|
2479
2496
|
};
|
|
2480
2497
|
return r(this.vm);
|
|
@@ -2483,7 +2500,7 @@ function ii(t) {
|
|
|
2483
2500
|
if (!this.vm.isShow)
|
|
2484
2501
|
return;
|
|
2485
2502
|
this.$manager.beforeRender();
|
|
2486
|
-
const e =
|
|
2503
|
+
const e = Se();
|
|
2487
2504
|
return this.sort.forEach((r) => {
|
|
2488
2505
|
this.renderSlot(e, this.$handle.ctxs[r]);
|
|
2489
2506
|
}), this.$manager.render(e);
|
|
@@ -2494,7 +2511,7 @@ function ii(t) {
|
|
|
2494
2511
|
})) : e.setSlot(r.rule.slot, this.renderCtx(r, i));
|
|
2495
2512
|
},
|
|
2496
2513
|
mergeGlobal(e) {
|
|
2497
|
-
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] =
|
|
2514
|
+
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = $e(() => {
|
|
2498
2515
|
const i = this.$handle.options.global;
|
|
2499
2516
|
return ee({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2500
2517
|
})), e.prop = ee({}, [this.cacheConfig[e.trueType].value, e.prop]));
|
|
@@ -2559,8 +2576,8 @@ function ii(t) {
|
|
|
2559
2576
|
})()));
|
|
2560
2577
|
});
|
|
2561
2578
|
const d = this.getTypeSlot(e);
|
|
2562
|
-
let
|
|
2563
|
-
return d ? (u.children = f,
|
|
2579
|
+
let m;
|
|
2580
|
+
return d ? (u.children = f, m = d(u)) : m = a ? e.parser.preview(Ke(f), e) : e.parser.render(Ke(f), e), m = this.renderSides(m, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), m = this.$manager.makeWrap(e, m)), e.none && (Array.isArray(m) ? m = m.map((y) => !y || !y.tag ? y : this.none(y)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
|
|
2564
2581
|
}, this.setCache(e, s, r);
|
|
2565
2582
|
}
|
|
2566
2583
|
return (...s) => {
|
|
@@ -2644,7 +2661,7 @@ function ii(t) {
|
|
|
2644
2661
|
if (l.indexOf("native.") === 0)
|
|
2645
2662
|
o[l.replace("native.", "")] = n[l], delete n[l];
|
|
2646
2663
|
else if (this.$handle.options.transformEventName !== !1) {
|
|
2647
|
-
const u =
|
|
2664
|
+
const u = ve(l);
|
|
2648
2665
|
u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
|
|
2649
2666
|
}
|
|
2650
2667
|
}), e.prop.on = n;
|
|
@@ -2700,7 +2717,7 @@ function ii(t) {
|
|
|
2700
2717
|
},
|
|
2701
2718
|
renderChildren(e, r, i) {
|
|
2702
2719
|
if (!h.trueArray(e)) return [];
|
|
2703
|
-
const s =
|
|
2720
|
+
const s = Se();
|
|
2704
2721
|
return e.map((n) => {
|
|
2705
2722
|
if (n) {
|
|
2706
2723
|
if (h.String(n) || h.Number(n)) return s.setSlot(null, i ? this.renderRule({
|
|
@@ -2726,7 +2743,7 @@ function ii(t) {
|
|
|
2726
2743
|
},
|
|
2727
2744
|
createRuleVnode(e, r, i) {
|
|
2728
2745
|
this.force = i !== !1, this.tmpInput = r;
|
|
2729
|
-
const s =
|
|
2746
|
+
const s = Se();
|
|
2730
2747
|
return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
|
|
2731
2748
|
},
|
|
2732
2749
|
renderRule(e, r, i) {
|
|
@@ -2736,12 +2753,12 @@ function ii(t) {
|
|
|
2736
2753
|
if (i)
|
|
2737
2754
|
s = e.type;
|
|
2738
2755
|
else if (s = e.is, e.type) {
|
|
2739
|
-
s =
|
|
2756
|
+
s = H(e.type);
|
|
2740
2757
|
const a = this.vNode.aliasMap[s];
|
|
2741
|
-
a && (s =
|
|
2758
|
+
a && (s = H(a));
|
|
2742
2759
|
}
|
|
2743
2760
|
if (!s) return;
|
|
2744
|
-
const n =
|
|
2761
|
+
const n = Se();
|
|
2745
2762
|
h.trueArray(e.children) && e.children.forEach((a) => {
|
|
2746
2763
|
a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2747
2764
|
});
|
|
@@ -2802,8 +2819,8 @@ function si(t) {
|
|
|
2802
2819
|
let p, d = n || o || a;
|
|
2803
2820
|
if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
|
|
2804
2821
|
r || (d = `native-${d}`);
|
|
2805
|
-
const
|
|
2806
|
-
this.vm.$emit(
|
|
2822
|
+
const m = ve(`${d}-${f}`), y = (..._) => {
|
|
2823
|
+
this.vm.$emit(m, ..._), this.vm.$emit("emit-event", m, ..._), this.bus.$emit(m, ..._);
|
|
2807
2824
|
};
|
|
2808
2825
|
if (y.__emit = !0, !p && l === !1)
|
|
2809
2826
|
i[f] = y;
|
|
@@ -2855,16 +2872,16 @@ function si(t) {
|
|
|
2855
2872
|
d.key ? f.push(d.key) : d.children && f.push(a(d.children));
|
|
2856
2873
|
});
|
|
2857
2874
|
let p = !1;
|
|
2858
|
-
return f.forEach((d,
|
|
2859
|
-
d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[
|
|
2875
|
+
return f.forEach((d, m) => {
|
|
2876
|
+
d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[m] = d.slice(1, -1), p = !0);
|
|
2860
2877
|
}), f.length === 1 && (p || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
|
|
2861
2878
|
};
|
|
2862
2879
|
let l;
|
|
2863
2880
|
if (n.forEach((u) => {
|
|
2864
2881
|
const f = u.split("||"), p = f[0].trim();
|
|
2865
2882
|
if (p) {
|
|
2866
|
-
const d = (f[1] || "").trim(),
|
|
2867
|
-
let y = O(() => a(
|
|
2883
|
+
const d = (f[1] || "").trim(), m = Lt(p);
|
|
2884
|
+
let y = O(() => a(m));
|
|
2868
2885
|
(y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2869
2886
|
}
|
|
2870
2887
|
}), n.length === 1 && s === `{{${n[0]}}}`)
|
|
@@ -2928,9 +2945,9 @@ function li(t) {
|
|
|
2928
2945
|
}
|
|
2929
2946
|
function ui(t) {
|
|
2930
2947
|
Object.defineProperties(t.origin, {
|
|
2931
|
-
__fc__: ze(
|
|
2948
|
+
__fc__: ze(ye(t), !0)
|
|
2932
2949
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2933
|
-
__fc__: ze(
|
|
2950
|
+
__fc__: ze(ye(t), !0)
|
|
2934
2951
|
});
|
|
2935
2952
|
}
|
|
2936
2953
|
function Gt(t, e, r) {
|
|
@@ -3036,7 +3053,7 @@ C(Gt.prototype, {
|
|
|
3036
3053
|
this.key = Ie(), t && this.parent && this.parent.updateKey(t);
|
|
3037
3054
|
},
|
|
3038
3055
|
updateType() {
|
|
3039
|
-
this.originType = this.rule.type, this.type =
|
|
3056
|
+
this.originType = this.rule.type, this.type = H(this.rule.type), this.trueType = this.$handle.getType(this.originType);
|
|
3040
3057
|
},
|
|
3041
3058
|
setParser(t) {
|
|
3042
3059
|
this.parser = t, t.init(this);
|
|
@@ -3177,23 +3194,23 @@ function fi(t) {
|
|
|
3177
3194
|
let l = ht(o);
|
|
3178
3195
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3179
3196
|
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);
|
|
3180
|
-
let f, p = !1, d = !!o.__fc__,
|
|
3197
|
+
let f, p = !1, d = !!o.__fc__, m = l.value;
|
|
3181
3198
|
if (d) {
|
|
3182
|
-
if (f = o.__fc__,
|
|
3199
|
+
if (f = o.__fc__, m = f.defaultValue, f.deleted) {
|
|
3183
3200
|
if (bt(f))
|
|
3184
3201
|
return;
|
|
3185
3202
|
f.update(this);
|
|
3186
3203
|
} else if (!f.check(this)) {
|
|
3187
3204
|
if (bt(f))
|
|
3188
3205
|
return;
|
|
3189
|
-
e[a] = o = o._clone ? o._clone() : St(
|
|
3206
|
+
e[a] = o = o._clone ? o._clone() : St(Oe(o)), f = null, p = !0;
|
|
3190
3207
|
}
|
|
3191
3208
|
}
|
|
3192
3209
|
if (f)
|
|
3193
3210
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3194
3211
|
else {
|
|
3195
3212
|
const F = this.parseRule(o);
|
|
3196
|
-
f = new Gt(this, F,
|
|
3213
|
+
f = new Gt(this, F, m), this.bindParser(f);
|
|
3197
3214
|
}
|
|
3198
3215
|
[!1, !0].forEach((F) => this.parseEmit(f, F)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !p && !d && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3199
3216
|
const y = f.loadChildrenPending();
|
|
@@ -3216,7 +3233,7 @@ function fi(t) {
|
|
|
3216
3233
|
if (!r.length) return !1;
|
|
3217
3234
|
for (let a = 0; a < r.length; a++) {
|
|
3218
3235
|
const l = r[a], u = l.handle || function(p) {
|
|
3219
|
-
return (
|
|
3236
|
+
return (he[l.condition || "=="] || he["=="])(p, l.value);
|
|
3220
3237
|
};
|
|
3221
3238
|
if (!h.trueArray(l.rule)) continue;
|
|
3222
3239
|
const f = q(v({}, l), {
|
|
@@ -3230,13 +3247,13 @@ function fi(t) {
|
|
|
3230
3247
|
const n = [];
|
|
3231
3248
|
let o = !1;
|
|
3232
3249
|
return this.deferSyncValue(() => {
|
|
3233
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl:
|
|
3250
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl: m, method: y }) => {
|
|
3234
3251
|
if (a) {
|
|
3235
3252
|
l ? e.ctrlRule.push({
|
|
3236
3253
|
__ctrl: !0,
|
|
3237
3254
|
children: u,
|
|
3238
3255
|
valid: l
|
|
3239
|
-
}) :
|
|
3256
|
+
}) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3240
3257
|
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((_) => {
|
|
3241
3258
|
this.api.setEffect(_, "required", l);
|
|
3242
3259
|
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
@@ -3255,8 +3272,8 @@ function fi(t) {
|
|
|
3255
3272
|
f ? s.prepend(_, f, d) : p || d ? s.append(_, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
|
|
3256
3273
|
});
|
|
3257
3274
|
} else {
|
|
3258
|
-
e.ctrlRule.splice(e.ctrlRule.indexOf(
|
|
3259
|
-
const _ = Q(
|
|
3275
|
+
e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
|
|
3276
|
+
const _ = Q(m);
|
|
3260
3277
|
_ && _.rm();
|
|
3261
3278
|
}
|
|
3262
3279
|
});
|
|
@@ -3410,7 +3427,7 @@ function pi(t) {
|
|
|
3410
3427
|
function vt(t, e) {
|
|
3411
3428
|
return typeof e == "function" ? "" + e : e;
|
|
3412
3429
|
}
|
|
3413
|
-
const
|
|
3430
|
+
const we = {
|
|
3414
3431
|
init(t) {
|
|
3415
3432
|
},
|
|
3416
3433
|
toFormValue(t, e) {
|
|
@@ -3461,18 +3478,18 @@ function gi(t) {
|
|
|
3461
3478
|
getParser(e) {
|
|
3462
3479
|
const r = this.fc.parsers, i = this.fc.renderDriver;
|
|
3463
3480
|
if (i) {
|
|
3464
|
-
const s = i.parsers || {}, n = s[e.originType] || s[
|
|
3481
|
+
const s = i.parsers || {}, n = s[e.originType] || s[H(e.type)] || s[e.trueType];
|
|
3465
3482
|
if (n)
|
|
3466
3483
|
return n;
|
|
3467
3484
|
}
|
|
3468
|
-
return r[e.originType] || r[
|
|
3485
|
+
return r[e.originType] || r[H(e.type)] || r[e.trueType] || we;
|
|
3469
3486
|
},
|
|
3470
3487
|
bindParser(e) {
|
|
3471
3488
|
e.setParser(this.getParser(e));
|
|
3472
3489
|
},
|
|
3473
3490
|
getType(e) {
|
|
3474
|
-
const r = this.fc.CreateNode.aliasMap, i = r[e] || r[
|
|
3475
|
-
return
|
|
3491
|
+
const r = this.fc.CreateNode.aliasMap, i = r[e] || r[H(e)] || e;
|
|
3492
|
+
return H(i);
|
|
3476
3493
|
},
|
|
3477
3494
|
noWatch(e) {
|
|
3478
3495
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
@@ -3500,27 +3517,27 @@ function gi(t) {
|
|
|
3500
3517
|
this.$render.clearCache(e), this.refresh(), this.watching = !1;
|
|
3501
3518
|
}
|
|
3502
3519
|
}, { deep: !n, sync: n }));
|
|
3503
|
-
}), e.refRule.__$title =
|
|
3520
|
+
}), e.refRule.__$title = $e(() => {
|
|
3504
3521
|
let i = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
|
|
3505
3522
|
if (i) {
|
|
3506
3523
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3507
3524
|
s && (i = this.api.t(s[1]));
|
|
3508
3525
|
}
|
|
3509
3526
|
return i;
|
|
3510
|
-
}), e.refRule.__$info =
|
|
3527
|
+
}), e.refRule.__$info = $e(() => {
|
|
3511
3528
|
let i = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
|
|
3512
3529
|
if (i) {
|
|
3513
3530
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3514
3531
|
s && (i = this.api.t(s[1]));
|
|
3515
3532
|
}
|
|
3516
3533
|
return i;
|
|
3517
|
-
}), e.refRule.__$validate =
|
|
3534
|
+
}), e.refRule.__$validate = $e(() => {
|
|
3518
3535
|
const i = (s) => {
|
|
3519
3536
|
var o, a;
|
|
3520
3537
|
const n = s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3521
3538
|
return n ? this.api.t(n[1], { title: (a = (o = e.refRule) == null ? void 0 : o.__$title) == null ? void 0 : a.value }) : s;
|
|
3522
3539
|
};
|
|
3523
|
-
return
|
|
3540
|
+
return G(e.rule.validate).map((s) => {
|
|
3524
3541
|
const n = v({}, s);
|
|
3525
3542
|
if (n.message && (n.message = i(n.message)), h.Function(n.validator)) {
|
|
3526
3543
|
const o = e;
|
|
@@ -3555,7 +3572,7 @@ function gi(t) {
|
|
|
3555
3572
|
this.bus.$once("load-end", () => {
|
|
3556
3573
|
let i = e.rule.computed;
|
|
3557
3574
|
i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
|
|
3558
|
-
const n =
|
|
3575
|
+
const n = $e(() => {
|
|
3559
3576
|
const a = i[s];
|
|
3560
3577
|
if (!a) return;
|
|
3561
3578
|
const l = this.compute(e, a);
|
|
@@ -3694,15 +3711,15 @@ function gi(t) {
|
|
|
3694
3711
|
let u = !0;
|
|
3695
3712
|
for (let f = 0; f < a.group.length; f++) {
|
|
3696
3713
|
const p = a.group[f];
|
|
3697
|
-
let d,
|
|
3714
|
+
let d, m = null, y = null;
|
|
3698
3715
|
if (p.variable)
|
|
3699
3716
|
y = this.fc.getLoadData(p.variable);
|
|
3700
3717
|
else if (p.field)
|
|
3701
|
-
|
|
3718
|
+
m = pt(p.field || "");
|
|
3702
3719
|
else if (!p.mode)
|
|
3703
3720
|
return !0;
|
|
3704
3721
|
let _ = p.compare;
|
|
3705
|
-
if (_ && (_ = pt(_ || "")), p.mode ? d = n(p) :
|
|
3722
|
+
if (_ && (_ = pt(_ || "")), p.mode ? d = n(p) : he[p.condition] ? h.Function(p.handler) ? d = O(() => p.handler(this.api, e.rule)) : d = O(() => new Function("$condition", "$variableVal", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${p.variable ? "$variableVal" : m}, ${_ || "$val"}); }}}}`).call(this.api.form, he, y, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : d = !1, l && d)
|
|
3706
3723
|
return !0;
|
|
3707
3724
|
l || (u = u && d);
|
|
3708
3725
|
}
|
|
@@ -3772,7 +3789,7 @@ function yi(t) {
|
|
|
3772
3789
|
this.fc.targetFormDriver(e, this.api, this.fc), this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
|
|
3773
3790
|
},
|
|
3774
3791
|
emitEvent(e, ...r) {
|
|
3775
|
-
const i = this.options[e] || this.options[
|
|
3792
|
+
const i = this.options[e] || this.options[H("on-" + e)];
|
|
3776
3793
|
if (i) {
|
|
3777
3794
|
const s = z(i);
|
|
3778
3795
|
h.Function(s) && O(() => s(...r));
|
|
@@ -3781,12 +3798,14 @@ function yi(t) {
|
|
|
3781
3798
|
},
|
|
3782
3799
|
targetHook(e, r, i) {
|
|
3783
3800
|
var l, u, f, p;
|
|
3784
|
-
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d,
|
|
3801
|
+
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, m) => {
|
|
3785
3802
|
d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
|
|
3786
|
-
O(() => y(q(v({
|
|
3803
|
+
O(() => y(q(v({
|
|
3804
|
+
args: Object.values(i || {})
|
|
3805
|
+
}, i || {}), {
|
|
3787
3806
|
self: e.rule,
|
|
3788
3807
|
rule: e.rule,
|
|
3789
|
-
parent:
|
|
3808
|
+
parent: m == null ? void 0 : m.rule,
|
|
3790
3809
|
$f: this.api,
|
|
3791
3810
|
api: this.api,
|
|
3792
3811
|
option: this.vm.$props.option
|
|
@@ -3873,7 +3892,7 @@ function $i(t) {
|
|
|
3873
3892
|
else
|
|
3874
3893
|
return;
|
|
3875
3894
|
const d = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3876
|
-
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (
|
|
3895
|
+
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (m) => ee(d.getProp(), [m]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
|
|
3877
3896
|
});
|
|
3878
3897
|
}
|
|
3879
3898
|
});
|
|
@@ -3998,7 +4017,7 @@ function wi() {
|
|
|
3998
4017
|
},
|
|
3999
4018
|
make(r, i, s) {
|
|
4000
4019
|
var n, o, a;
|
|
4001
|
-
return (
|
|
4020
|
+
return (be.isReservedTag ? be.isReservedTag(r) : (o = (n = be) == 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);
|
|
4002
4021
|
},
|
|
4003
4022
|
makeComponent(r, i, s) {
|
|
4004
4023
|
var a;
|
|
@@ -4021,7 +4040,7 @@ function wi() {
|
|
|
4021
4040
|
},
|
|
4022
4041
|
use(r) {
|
|
4023
4042
|
Object.keys(r).forEach((i) => {
|
|
4024
|
-
const s =
|
|
4043
|
+
const s = ve(i), n = Et(i).toLocaleLowerCase(), o = r[i];
|
|
4025
4044
|
e.alias(i, o), [i, s, n].forEach((a) => {
|
|
4026
4045
|
e.prototype[a] = function(l, u) {
|
|
4027
4046
|
return this.make(t[i] || a, l, u);
|
|
@@ -4103,17 +4122,17 @@ const Fi = function(t) {
|
|
|
4103
4122
|
_fn: [],
|
|
4104
4123
|
loaded(r, i, s) {
|
|
4105
4124
|
this.deleted(r), P(() => {
|
|
4106
|
-
let n =
|
|
4125
|
+
let n = G(r.getValue());
|
|
4107
4126
|
const o = [];
|
|
4108
4127
|
n.forEach((a) => {
|
|
4109
4128
|
if (a && (a.attr || a.template)) {
|
|
4110
4129
|
let l = (p) => {
|
|
4111
4130
|
let d;
|
|
4112
4131
|
i && i.__fc__ && (d = i.__fc__.getParentGroup());
|
|
4113
|
-
let
|
|
4114
|
-
a.template ?
|
|
4132
|
+
let m;
|
|
4133
|
+
a.template ? m = t.$handle.loadStrVar(a.template, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null) : a.handler && h.Function(a.handler) ? m = a.handler(p, i, s) : m = t.$handle.loadStrVar(`{{${a.attr}}}`, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null), (m == null || m === "") && a.default != null && (m = a.default), a.copy !== !1 && (m = K(m));
|
|
4115
4134
|
const y = a.modify ? i : r.getProp();
|
|
4116
|
-
a.to === "child" ? y.children ? k(y.children, 0,
|
|
4135
|
+
a.to === "child" ? y.children ? k(y.children, 0, m) : k(y, "children", [m]) : oe(y, a.to || "options", m), s.sync(i);
|
|
4117
4136
|
}, u = (p) => l(p);
|
|
4118
4137
|
const f = t.watchLoadData(u);
|
|
4119
4138
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4140,11 +4159,11 @@ const Fi = function(t) {
|
|
|
4140
4159
|
const l = n[a];
|
|
4141
4160
|
if (l) {
|
|
4142
4161
|
const u = typeof l == "object";
|
|
4143
|
-
let f = (
|
|
4144
|
-
let y = t.t(u ? l.attr : l, u ? l.params : null,
|
|
4162
|
+
let f = (m) => {
|
|
4163
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, m);
|
|
4145
4164
|
const _ = u && l.modify ? i : r.getProp();
|
|
4146
4165
|
a === "child" ? _.children ? k(_.children, 0, y) : k(_, "children", [y]) : oe(_, a, y), s.sync(i);
|
|
4147
|
-
}, p = (
|
|
4166
|
+
}, p = (m) => f(m);
|
|
4148
4167
|
const d = t.watchLoadData(p);
|
|
4149
4168
|
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
4150
4169
|
}
|
|
@@ -4218,24 +4237,24 @@ const Fi = function(t) {
|
|
|
4218
4237
|
i._fn[s.id] = t.watchLoadData(se((p, d) => {
|
|
4219
4238
|
if (d && a.watch === !1)
|
|
4220
4239
|
return i._fn[s.id]();
|
|
4221
|
-
const
|
|
4240
|
+
const m = t.$handle.loadFetchVar(K(a), p, n), y = q(v({
|
|
4222
4241
|
headers: {}
|
|
4223
|
-
},
|
|
4242
|
+
}, m), {
|
|
4224
4243
|
onSuccess(_, F) {
|
|
4225
4244
|
if (f()) return;
|
|
4226
|
-
let
|
|
4227
|
-
const A = z(
|
|
4228
|
-
h.Function(A) ?
|
|
4245
|
+
let J = (L) => F ? L : j(L, "data") ? L.data : L;
|
|
4246
|
+
const A = z(m.parse);
|
|
4247
|
+
h.Function(A) ? J = A : A && h.String(A) && (J = (L) => B(L, A)), Ae(J(_, n, o)).then((L) => {
|
|
4229
4248
|
l(L);
|
|
4230
4249
|
});
|
|
4231
4250
|
},
|
|
4232
4251
|
onError(_) {
|
|
4233
|
-
l(void 0), !f() && (u || ((F) => Ye(F.message || "fetch fail " +
|
|
4252
|
+
l(void 0), !f() && (u || ((F) => Ye(F.message || "fetch fail " + m.action)))(_, n, o);
|
|
4234
4253
|
}
|
|
4235
4254
|
});
|
|
4236
4255
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4237
|
-
if (h.Function(
|
|
4238
|
-
Ae(
|
|
4256
|
+
if (h.Function(m.action)) {
|
|
4257
|
+
Ae(m.action(n, o)).then((_) => {
|
|
4239
4258
|
y.onSuccess(_, !0);
|
|
4240
4259
|
}).catch((_) => {
|
|
4241
4260
|
y.onError(_);
|
|
@@ -4439,16 +4458,16 @@ function Wt(t) {
|
|
|
4439
4458
|
t.extendApi
|
|
4440
4459
|
], u = v({}, Ri), f = Yr();
|
|
4441
4460
|
let p = { global: {} };
|
|
4442
|
-
const d = t.isMobile === !0,
|
|
4461
|
+
const d = t.isMobile === !0, m = ne({
|
|
4443
4462
|
$mobile: d
|
|
4444
4463
|
}), y = wi(), _ = {}, F = {};
|
|
4445
4464
|
Ui(t.attrs || {});
|
|
4446
|
-
function
|
|
4447
|
-
const
|
|
4448
|
-
if (Array.isArray(
|
|
4449
|
-
return
|
|
4450
|
-
if (
|
|
4451
|
-
return
|
|
4465
|
+
function J(c) {
|
|
4466
|
+
const g = U[c];
|
|
4467
|
+
if (Array.isArray(g))
|
|
4468
|
+
return g.map(($) => $.api());
|
|
4469
|
+
if (g)
|
|
4470
|
+
return g.api();
|
|
4452
4471
|
}
|
|
4453
4472
|
function A(c) {
|
|
4454
4473
|
o.push(c);
|
|
@@ -4457,7 +4476,7 @@ function Wt(t) {
|
|
|
4457
4476
|
const c = Me(...arguments);
|
|
4458
4477
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4459
4478
|
}
|
|
4460
|
-
function
|
|
4479
|
+
function pe() {
|
|
4461
4480
|
const c = Me(...arguments);
|
|
4462
4481
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4463
4482
|
name: c.id
|
|
@@ -4466,41 +4485,45 @@ function Wt(t) {
|
|
|
4466
4485
|
function Pe(c) {
|
|
4467
4486
|
y.use(c);
|
|
4468
4487
|
}
|
|
4469
|
-
function
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4488
|
+
function me(c) {
|
|
4489
|
+
if (arguments.length === 0)
|
|
4490
|
+
return we;
|
|
4491
|
+
if (typeof c == "string" && arguments.length === 1)
|
|
4492
|
+
return r[H(c)];
|
|
4493
|
+
const g = Me(...arguments);
|
|
4494
|
+
if (!g.id || !g.prop) return we;
|
|
4495
|
+
const $ = H(g.id), b = g.prop, w = b.merge === !0 ? r[$] : void 0;
|
|
4496
|
+
r[$] = je(b, w || we), f[$] = T($), b.maker && C(f, b.maker);
|
|
4474
4497
|
}
|
|
4475
|
-
function E(c,
|
|
4498
|
+
function E(c, g) {
|
|
4476
4499
|
let $;
|
|
4477
4500
|
if (h.String(c)) {
|
|
4478
|
-
if ($ = c,
|
|
4479
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4501
|
+
if ($ = c, g === void 0)
|
|
4502
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? S() : e[$];
|
|
4480
4503
|
} else
|
|
4481
|
-
$ =
|
|
4482
|
-
if (!$ || !
|
|
4483
|
-
const b =
|
|
4484
|
-
e[$] =
|
|
4504
|
+
$ = H(c.name), g = c;
|
|
4505
|
+
if (!$ || !g) return;
|
|
4506
|
+
const b = H($);
|
|
4507
|
+
e[$] = g, e[b] = g, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], g.formCreateParser && me($, g.formCreateParser);
|
|
4485
4508
|
}
|
|
4486
|
-
function
|
|
4509
|
+
function S() {
|
|
4487
4510
|
return Zr(Be, e, i);
|
|
4488
4511
|
}
|
|
4489
4512
|
function M() {
|
|
4490
4513
|
return Ne;
|
|
4491
4514
|
}
|
|
4492
|
-
function
|
|
4493
|
-
return h.Function(c.install) ? c.install(W,
|
|
4515
|
+
function ge(c, g) {
|
|
4516
|
+
return h.Function(c.install) ? c.install(W, g) : h.Function(c) && c(W, g), this;
|
|
4494
4517
|
}
|
|
4495
|
-
function W(c,
|
|
4496
|
-
let b = qi(c,
|
|
4518
|
+
function W(c, g, $) {
|
|
4519
|
+
let b = qi(c, g || {});
|
|
4497
4520
|
const w = b.$refs.fc.formCreate;
|
|
4498
4521
|
return w.$parent = $, Mi(w.options).appendChild(b.$el), w.api();
|
|
4499
4522
|
}
|
|
4500
|
-
|
|
4523
|
+
je(W, F);
|
|
4501
4524
|
function zt(c) {
|
|
4502
|
-
let
|
|
4503
|
-
return c ?
|
|
4525
|
+
let g = v({}, t);
|
|
4526
|
+
return c ? g.inherit = {
|
|
4504
4527
|
components: e,
|
|
4505
4528
|
parsers: r,
|
|
4506
4529
|
directives: i,
|
|
@@ -4509,53 +4532,53 @@ function Wt(t) {
|
|
|
4509
4532
|
useApps: o,
|
|
4510
4533
|
maker: f,
|
|
4511
4534
|
formulas: _,
|
|
4512
|
-
loadData:
|
|
4513
|
-
} : delete
|
|
4535
|
+
loadData: m
|
|
4536
|
+
} : delete g.inherit, Wt(g);
|
|
4514
4537
|
}
|
|
4515
|
-
function Xt(c,
|
|
4516
|
-
s[c] =
|
|
4538
|
+
function Xt(c, g) {
|
|
4539
|
+
s[c] = g;
|
|
4517
4540
|
}
|
|
4518
|
-
function Zt(c,
|
|
4519
|
-
_[c] =
|
|
4541
|
+
function Zt(c, g) {
|
|
4542
|
+
_[c] = g;
|
|
4520
4543
|
}
|
|
4521
|
-
function Qt(c,
|
|
4544
|
+
function Qt(c, g) {
|
|
4522
4545
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4523
|
-
|
|
4524
|
-
b[w] =
|
|
4525
|
-
}),
|
|
4546
|
+
g.parsers && Object.keys(g.parsers).forEach((w) => {
|
|
4547
|
+
b[w] = je(g.parsers[w], we);
|
|
4548
|
+
}), g.name = c, n[c] = q(v(v({}, $), g), { parsers: b });
|
|
4526
4549
|
}
|
|
4527
|
-
function
|
|
4528
|
-
c && Object.keys(U).forEach((
|
|
4529
|
-
(Array.isArray(U[
|
|
4550
|
+
function ke(c) {
|
|
4551
|
+
c && Object.keys(U).forEach((g) => {
|
|
4552
|
+
(Array.isArray(U[g]) ? U[g] : [U[g]]).forEach((b) => {
|
|
4530
4553
|
b.bus.$emit("$loadData." + c);
|
|
4531
4554
|
});
|
|
4532
4555
|
});
|
|
4533
4556
|
}
|
|
4534
|
-
function Te(c,
|
|
4535
|
-
oe(
|
|
4557
|
+
function Te(c, g) {
|
|
4558
|
+
oe(m, c, g), ke(c);
|
|
4536
4559
|
}
|
|
4537
|
-
function
|
|
4538
|
-
const $ = (...b) => O(() =>
|
|
4560
|
+
function Ee(c, g) {
|
|
4561
|
+
const $ = (...b) => O(() => g(...b));
|
|
4539
4562
|
$._driver = !0, Te(c, $);
|
|
4540
4563
|
}
|
|
4541
|
-
function st(c,
|
|
4564
|
+
function st(c, g) {
|
|
4542
4565
|
const $ = (c || "").split(".");
|
|
4543
4566
|
c = $.shift();
|
|
4544
4567
|
const b = $.join(".");
|
|
4545
|
-
if (j(
|
|
4546
|
-
let w =
|
|
4547
|
-
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ?
|
|
4568
|
+
if (j(m, c) || k(m, c, _t), m[c] !== _t) {
|
|
4569
|
+
let w = m[c];
|
|
4570
|
+
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ? g : w;
|
|
4548
4571
|
} else
|
|
4549
|
-
return
|
|
4572
|
+
return g;
|
|
4550
4573
|
}
|
|
4551
4574
|
function Yt(c) {
|
|
4552
4575
|
l.push(c);
|
|
4553
4576
|
}
|
|
4554
4577
|
function er(c) {
|
|
4555
|
-
delete
|
|
4578
|
+
delete m[c], ke(c);
|
|
4556
4579
|
}
|
|
4557
|
-
function tr(c,
|
|
4558
|
-
a.push({ name: c, callback:
|
|
4580
|
+
function tr(c, g) {
|
|
4581
|
+
a.push({ name: c, callback: g });
|
|
4559
4582
|
}
|
|
4560
4583
|
function Be(c) {
|
|
4561
4584
|
C(this, {
|
|
@@ -4578,8 +4601,8 @@ function Wt(t) {
|
|
|
4578
4601
|
get: null,
|
|
4579
4602
|
drivers: n,
|
|
4580
4603
|
renderDriver: null,
|
|
4581
|
-
refreshData:
|
|
4582
|
-
loadData:
|
|
4604
|
+
refreshData: ke,
|
|
4605
|
+
loadData: m,
|
|
4583
4606
|
CreateNode: y,
|
|
4584
4607
|
bus: new Si(),
|
|
4585
4608
|
unwatch: [],
|
|
@@ -4587,8 +4610,8 @@ function Wt(t) {
|
|
|
4587
4610
|
extendApiFn: l,
|
|
4588
4611
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4589
4612
|
tmpData: ne({})
|
|
4590
|
-
}), a.forEach((
|
|
4591
|
-
this.bus.$on(
|
|
4613
|
+
}), a.forEach((g) => {
|
|
4614
|
+
this.bus.$on(g.name, g.callback);
|
|
4592
4615
|
}), P(() => {
|
|
4593
4616
|
N(this.options, () => {
|
|
4594
4617
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
@@ -4601,52 +4624,52 @@ function Wt(t) {
|
|
|
4601
4624
|
this.initOptions(), this.$handle.api.refresh();
|
|
4602
4625
|
}, { deep: !0, flush: "sync" })), this.vm.$props.driver && (this.renderDriver = typeof this.vm.$props.driver == "object" ? this.vm.$props.driver : this.drivers[this.vm.$props.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4603
4626
|
},
|
|
4604
|
-
targetFormDriver(c, ...
|
|
4605
|
-
if (this.bus.$emit(c, ...
|
|
4606
|
-
return O(() => this.renderDriver[c](...
|
|
4627
|
+
targetFormDriver(c, ...g) {
|
|
4628
|
+
if (this.bus.$emit(c, ...g), this.renderDriver && this.renderDriver[c])
|
|
4629
|
+
return O(() => this.renderDriver[c](...g));
|
|
4607
4630
|
},
|
|
4608
|
-
t(c,
|
|
4631
|
+
t(c, g, $) {
|
|
4609
4632
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4610
|
-
return b == null && (b = ""), b &&
|
|
4633
|
+
return b == null && (b = ""), b && g && Object.keys(g).forEach((w) => {
|
|
4611
4634
|
const V = new RegExp(`{${w}}`, "g");
|
|
4612
|
-
b = b.replace(V,
|
|
4635
|
+
b = b.replace(V, g[w]);
|
|
4613
4636
|
}), b;
|
|
4614
4637
|
},
|
|
4615
4638
|
globalDataDriver(c) {
|
|
4616
|
-
let
|
|
4617
|
-
const $ =
|
|
4639
|
+
let g = c.split(".");
|
|
4640
|
+
const $ = g.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4618
4641
|
if (b) {
|
|
4619
4642
|
if (b.type === "static")
|
|
4620
|
-
return B(b.data,
|
|
4643
|
+
return B(b.data, g);
|
|
4621
4644
|
{
|
|
4622
4645
|
let w;
|
|
4623
4646
|
const V = this.fetchCache.get(b);
|
|
4624
4647
|
if (V) {
|
|
4625
|
-
if (V.status && (w = B(V.data,
|
|
4648
|
+
if (V.status && (w = B(V.data, g)), !V.loading)
|
|
4626
4649
|
return w;
|
|
4627
4650
|
V.loading = !1, this.fetchCache.set(b, V);
|
|
4628
4651
|
} else
|
|
4629
4652
|
this.fetchCache.set(b, { status: !1 });
|
|
4630
|
-
const
|
|
4653
|
+
const R = se(() => {
|
|
4631
4654
|
te();
|
|
4632
4655
|
const x = this.fetchCache.get(b);
|
|
4633
4656
|
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (x && (x.loading = !0, this.fetchCache.set(b, x)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
4634
|
-
}, b.wait || 600),
|
|
4657
|
+
}, b.wait || 600), ae = (x) => {
|
|
4635
4658
|
this.fetchCache.set(b, { status: !0, data: x }), this.bus.$emit("$loadData.$globalData." + $);
|
|
4636
|
-
},
|
|
4637
|
-
if (
|
|
4659
|
+
}, le = (x, ue) => {
|
|
4660
|
+
if (ue && b.watch === !1)
|
|
4638
4661
|
return te();
|
|
4639
|
-
if (
|
|
4640
|
-
|
|
4662
|
+
if (ue) {
|
|
4663
|
+
R();
|
|
4641
4664
|
return;
|
|
4642
4665
|
}
|
|
4643
|
-
const
|
|
4644
|
-
|
|
4645
|
-
|
|
4666
|
+
const fe = this.$handle.loadFetchVar(Ke(b), x);
|
|
4667
|
+
fe.targetRule = this.targetRule, this.$handle.api.fetch(fe).then((re) => {
|
|
4668
|
+
ae(re);
|
|
4646
4669
|
}).catch((re) => {
|
|
4647
|
-
|
|
4670
|
+
ae(null);
|
|
4648
4671
|
});
|
|
4649
|
-
}, te = this.watchLoadData(
|
|
4672
|
+
}, te = this.watchLoadData(le);
|
|
4650
4673
|
return b.watch === !1 && te(), this.unwatch.push(te), w;
|
|
4651
4674
|
}
|
|
4652
4675
|
}
|
|
@@ -4656,28 +4679,28 @@ function Wt(t) {
|
|
|
4656
4679
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4657
4680
|
},
|
|
4658
4681
|
globalLanguageDriver(c) {
|
|
4659
|
-
let
|
|
4660
|
-
if (
|
|
4682
|
+
let g = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4683
|
+
if (g && (b = O(() => g(c))), b == null && $ && typeof $ == "object" && (b = B($, c)), b == null) {
|
|
4661
4684
|
const w = this.options.value.language || {}, V = this.getLocale();
|
|
4662
4685
|
b = B(w[V] || {}, c), b == null && (b = B(Li[V] || {}, c));
|
|
4663
4686
|
}
|
|
4664
4687
|
return b;
|
|
4665
4688
|
},
|
|
4666
4689
|
globalVarDriver(c) {
|
|
4667
|
-
let
|
|
4668
|
-
const $ =
|
|
4690
|
+
let g = c.split(".");
|
|
4691
|
+
const $ = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4669
4692
|
if (b) {
|
|
4670
4693
|
const w = h.Function(b) ? b : z(b.handle);
|
|
4671
4694
|
if (w) {
|
|
4672
|
-
let V = w((...
|
|
4673
|
-
return B(V,
|
|
4695
|
+
let V = w((...R) => this.$handle.api.getData(...R), this.$handle.api);
|
|
4696
|
+
return B(V, g);
|
|
4674
4697
|
}
|
|
4675
4698
|
}
|
|
4676
4699
|
},
|
|
4677
|
-
setData(c,
|
|
4678
|
-
$ ? Te(c,
|
|
4700
|
+
setData(c, g, $) {
|
|
4701
|
+
$ ? Te(c, g) : (oe(this.vm.top.fc.tmpData, c, g), this.bus.$emit("$loadData." + c));
|
|
4679
4702
|
},
|
|
4680
|
-
getLoadData(c,
|
|
4703
|
+
getLoadData(c, g) {
|
|
4681
4704
|
let $ = null;
|
|
4682
4705
|
if (c != null) {
|
|
4683
4706
|
let b = c.split(".");
|
|
@@ -4707,36 +4730,36 @@ function Wt(t) {
|
|
|
4707
4730
|
}
|
|
4708
4731
|
$ && b.length && ($ = B($, b));
|
|
4709
4732
|
}
|
|
4710
|
-
return $ == null || $ === "" ?
|
|
4733
|
+
return $ == null || $ === "" ? g : $;
|
|
4711
4734
|
},
|
|
4712
|
-
watchLoadData(c,
|
|
4735
|
+
watchLoadData(c, g) {
|
|
4713
4736
|
let $ = {};
|
|
4714
|
-
const b = (
|
|
4737
|
+
const b = (R) => {
|
|
4715
4738
|
this.get || (this.get = w), O(() => {
|
|
4716
|
-
c(w,
|
|
4739
|
+
c(w, R);
|
|
4717
4740
|
}), this.get === w && (this.get = void 0);
|
|
4718
|
-
}, w = (
|
|
4719
|
-
let
|
|
4720
|
-
if (typeof
|
|
4721
|
-
return $[
|
|
4722
|
-
const te =
|
|
4723
|
-
const
|
|
4724
|
-
if ($[
|
|
4725
|
-
((
|
|
4741
|
+
}, w = (R, ae) => {
|
|
4742
|
+
let le;
|
|
4743
|
+
if (typeof R == "object" && (le = R.getValue, R = R.id), $[R])
|
|
4744
|
+
return $[R].val;
|
|
4745
|
+
const te = $e(() => le ? le() : this.getLoadData(R, ae)), x = R.split("."), ue = x.shift(), fe = x.shift() || "", re = se(() => {
|
|
4746
|
+
const ce = le ? le() : this.getLoadData(R, ae);
|
|
4747
|
+
if ($[R])
|
|
4748
|
+
((ce instanceof Function || h.Object(ce) || Array.isArray(ce)) && ce === $[R].val || JSON.stringify(ce) !== JSON.stringify($[R].val)) && ($[R].val = ce, b(!0));
|
|
4726
4749
|
else return;
|
|
4727
|
-
},
|
|
4750
|
+
}, g || 0), ir = N(te, (ce) => {
|
|
4728
4751
|
re();
|
|
4729
4752
|
});
|
|
4730
|
-
return this.bus.$on("$loadData." +
|
|
4753
|
+
return this.bus.$on("$loadData." + ue, re), fe && this.bus.$on("$loadData." + ue + "." + fe, re), $[R] = {
|
|
4731
4754
|
fn: () => {
|
|
4732
|
-
this.bus.$off("$loadData." +
|
|
4755
|
+
this.bus.$off("$loadData." + ue, re), fe && this.bus.$off("$loadData." + ue + "." + fe, re), ir();
|
|
4733
4756
|
},
|
|
4734
4757
|
val: te.value
|
|
4735
4758
|
}, te.value;
|
|
4736
4759
|
};
|
|
4737
4760
|
b(!1);
|
|
4738
4761
|
const V = () => {
|
|
4739
|
-
Object.keys($).forEach((
|
|
4762
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4740
4763
|
};
|
|
4741
4764
|
return this.unwatch.push(V), V;
|
|
4742
4765
|
},
|
|
@@ -4752,15 +4775,15 @@ function Wt(t) {
|
|
|
4752
4775
|
globalEvent: {},
|
|
4753
4776
|
globalData: {}
|
|
4754
4777
|
}, K(p));
|
|
4755
|
-
const
|
|
4756
|
-
|
|
4778
|
+
const g = this.isSub();
|
|
4779
|
+
g && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$props.option || {});
|
|
4757
4780
|
const $ = this.api();
|
|
4758
|
-
this.targetFormDriver("initOptions", c, { api: $, isSubForm:
|
|
4781
|
+
this.targetFormDriver("initOptions", c, { api: $, isSubForm: g }), this.updateOptions(c);
|
|
4759
4782
|
},
|
|
4760
|
-
mergeOptions(c,
|
|
4761
|
-
return
|
|
4762
|
-
delete
|
|
4763
|
-
}),
|
|
4783
|
+
mergeOptions(c, g, $) {
|
|
4784
|
+
return g = v({}, g || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4785
|
+
delete g[b];
|
|
4786
|
+
}), g.global && (c.global = xr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
|
|
4764
4787
|
},
|
|
4765
4788
|
updateOptions(c) {
|
|
4766
4789
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4796,58 +4819,60 @@ function Wt(t) {
|
|
|
4796
4819
|
isMobile: d,
|
|
4797
4820
|
extendApi: Yt,
|
|
4798
4821
|
getData: st,
|
|
4799
|
-
setDataDriver:
|
|
4822
|
+
setDataDriver: Ee,
|
|
4800
4823
|
setData: Te,
|
|
4801
4824
|
removeData: er,
|
|
4802
|
-
refreshData:
|
|
4825
|
+
refreshData: ke,
|
|
4803
4826
|
maker: f,
|
|
4804
4827
|
component: E,
|
|
4805
4828
|
directive: L,
|
|
4806
4829
|
setModelField: Xt,
|
|
4807
4830
|
setFormula: Zt,
|
|
4808
4831
|
setDriver: Qt,
|
|
4809
|
-
register:
|
|
4832
|
+
register: pe,
|
|
4810
4833
|
$vnode: M,
|
|
4811
|
-
parser:
|
|
4812
|
-
use:
|
|
4834
|
+
parser: me,
|
|
4835
|
+
use: ge,
|
|
4813
4836
|
factory: zt,
|
|
4814
4837
|
componentAlias: Pe,
|
|
4815
4838
|
copyRule: Pt,
|
|
4816
4839
|
copyRules: Tt,
|
|
4817
4840
|
mergeRule: ee,
|
|
4818
4841
|
fetch: Ut,
|
|
4819
|
-
$form:
|
|
4842
|
+
$form: S,
|
|
4820
4843
|
parseFn: z,
|
|
4821
4844
|
parseJson: St,
|
|
4822
|
-
toJson:
|
|
4845
|
+
toJson: Oe,
|
|
4823
4846
|
useApp: A,
|
|
4824
|
-
getApi:
|
|
4847
|
+
getApi: J,
|
|
4825
4848
|
on: tr
|
|
4826
4849
|
});
|
|
4827
4850
|
}
|
|
4828
4851
|
function rr(c) {
|
|
4829
4852
|
C(c, {
|
|
4830
4853
|
create: W,
|
|
4831
|
-
install(
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4854
|
+
install(g, $) {
|
|
4855
|
+
p = v(v({}, p), $ || {});
|
|
4856
|
+
const b = `_installedFormCreate${d ? "Mobile" : ""}_${t.ui}`;
|
|
4857
|
+
if (g[b] === !0) return;
|
|
4858
|
+
g[b] = !0;
|
|
4859
|
+
const w = function(R, ae = {}) {
|
|
4860
|
+
return W(R, ae, this);
|
|
4836
4861
|
};
|
|
4837
|
-
ot(
|
|
4838
|
-
const
|
|
4839
|
-
|
|
4840
|
-
O(() =>
|
|
4862
|
+
ot(w), g.prototype.$formCreate = w;
|
|
4863
|
+
const V = S();
|
|
4864
|
+
g.component(V.name, V), g.component("FcFragment", M()), o.forEach((R) => {
|
|
4865
|
+
O(() => R(c, g));
|
|
4841
4866
|
});
|
|
4842
4867
|
}
|
|
4843
4868
|
});
|
|
4844
4869
|
}
|
|
4845
|
-
if (ot(F), rr(F),
|
|
4870
|
+
if (ot(F), rr(F), Ee("$cookie", Pi), Ee("$localStorage", Ti), Ee("$sessionStorage", Bi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), me(Di), t.inherit) {
|
|
4846
4871
|
const c = t.inherit;
|
|
4847
|
-
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(
|
|
4872
|
+
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(m, c.loadData), c.formulas && C(_, c.formulas);
|
|
4848
4873
|
}
|
|
4849
|
-
const
|
|
4850
|
-
return
|
|
4874
|
+
const Re = S();
|
|
4875
|
+
return je(Re, F), Object.defineProperties(Re, {
|
|
4851
4876
|
fetch: {
|
|
4852
4877
|
get() {
|
|
4853
4878
|
return F.fetch;
|
|
@@ -4856,7 +4881,7 @@ function Wt(t) {
|
|
|
4856
4881
|
F.fetch = c;
|
|
4857
4882
|
}
|
|
4858
4883
|
}
|
|
4859
|
-
}),
|
|
4884
|
+
}), Re.util = F, Re;
|
|
4860
4885
|
}
|
|
4861
4886
|
const Ct = {
|
|
4862
4887
|
date: "yyyy-MM-dd",
|
|
@@ -4929,7 +4954,7 @@ const Ct = {
|
|
|
4929
4954
|
}, Qi = "select", Yi = {
|
|
4930
4955
|
name: Qi,
|
|
4931
4956
|
toFormValue(t, e) {
|
|
4932
|
-
return e.prop.props.multiple && !Array.isArray(t) ?
|
|
4957
|
+
return e.prop.props.multiple && !Array.isArray(t) ? G(t) : t;
|
|
4933
4958
|
}
|
|
4934
4959
|
}, en = [
|
|
4935
4960
|
Gi,
|
|
@@ -5117,12 +5142,12 @@ const on = {
|
|
|
5117
5142
|
return !(!e.title && !e.native || Z(e.show));
|
|
5118
5143
|
},
|
|
5119
5144
|
makeInfo(t, e, r) {
|
|
5120
|
-
var f, p, d,
|
|
5145
|
+
var f, p, d, m, y, _;
|
|
5121
5146
|
const i = v({}, t.title), s = v({}, t.info), n = nn(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5122
5147
|
title: (p = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : p.value,
|
|
5123
5148
|
rule: r.rule,
|
|
5124
5149
|
options: this.options
|
|
5125
|
-
}) : ((
|
|
5150
|
+
}) : ((m = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : m.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5126
5151
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5127
5152
|
const F = {
|
|
5128
5153
|
type: s.type || "popover",
|
|
@@ -5131,8 +5156,8 @@ const on = {
|
|
|
5131
5156
|
key: `${e}pop`
|
|
5132
5157
|
};
|
|
5133
5158
|
delete F.props.icon, delete F.props.show, delete F.props.info, delete F.props.align, delete F.props.native;
|
|
5134
|
-
const
|
|
5135
|
-
s.info && !j(F.props,
|
|
5159
|
+
const J = "content";
|
|
5160
|
+
s.info && !j(F.props, J) && (F.props[J] = (_ = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : _.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, F]), [
|
|
5136
5161
|
this.$r({
|
|
5137
5162
|
type: "i",
|
|
5138
5163
|
slot: n ? "default" : "reference",
|
|
@@ -5222,12 +5247,12 @@ const on = {
|
|
|
5222
5247
|
key: `${this.key}b1`
|
|
5223
5248
|
}, [e]);
|
|
5224
5249
|
}
|
|
5225
|
-
},
|
|
5226
|
-
an(
|
|
5227
|
-
ln(
|
|
5228
|
-
un(
|
|
5229
|
-
fn(
|
|
5230
|
-
cn(
|
|
5250
|
+
}, de = {};
|
|
5251
|
+
an(de);
|
|
5252
|
+
ln(de);
|
|
5253
|
+
un(de);
|
|
5254
|
+
fn(de);
|
|
5255
|
+
cn(de);
|
|
5231
5256
|
function an(t) {
|
|
5232
5257
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5233
5258
|
t[e] = T(e);
|
|
@@ -5291,7 +5316,7 @@ function hn(t, e) {
|
|
|
5291
5316
|
const o = e.getFieldCtx(r);
|
|
5292
5317
|
if (!o) return;
|
|
5293
5318
|
const a = e.subForm[o.id], l = [e.$manager.validateField(o.id)];
|
|
5294
|
-
|
|
5319
|
+
G(a).filter((u) => !u.isScope).forEach((u) => {
|
|
5295
5320
|
l.push(u.validate());
|
|
5296
5321
|
}), Promise.all(l).then(() => {
|
|
5297
5322
|
s(null), i && i(null);
|
|
@@ -5365,24 +5390,28 @@ function hn(t, e) {
|
|
|
5365
5390
|
const xt = {
|
|
5366
5391
|
name: "required",
|
|
5367
5392
|
load(t, e, r) {
|
|
5368
|
-
var s, n;
|
|
5369
5393
|
const i = dn(t.getValue());
|
|
5394
|
+
let s;
|
|
5370
5395
|
if (i.required === !1)
|
|
5371
5396
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5372
5397
|
else {
|
|
5373
|
-
const
|
|
5398
|
+
const n = v({
|
|
5374
5399
|
required: !0,
|
|
5375
|
-
validator(l, u
|
|
5376
|
-
h.empty(
|
|
5400
|
+
validator(a, l, u) {
|
|
5401
|
+
o(), h.empty(l) ? u(n.message) : u();
|
|
5377
5402
|
}
|
|
5378
|
-
}, i),
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5403
|
+
}, i), o = () => {
|
|
5404
|
+
var l, u;
|
|
5405
|
+
const a = (u = (l = e.__fc__.refRule) == null ? void 0 : l.__$title) == null ? void 0 : u.value;
|
|
5406
|
+
if (s !== a)
|
|
5407
|
+
if (s = a, !i.message)
|
|
5408
|
+
n.message = r.t("required", { title: a }) || a + (r.getLocale() === "en" ? " is required" : "不能为空");
|
|
5409
|
+
else {
|
|
5410
|
+
const f = i.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
5411
|
+
f && (n.message = r.t(f[1], { title: a }));
|
|
5412
|
+
}
|
|
5413
|
+
};
|
|
5414
|
+
o(), t.getProp().validate = [n];
|
|
5386
5415
|
}
|
|
5387
5416
|
r.sync(e);
|
|
5388
5417
|
},
|
|
@@ -5398,14 +5427,14 @@ function pn(t) {
|
|
|
5398
5427
|
t.component(e.name, e);
|
|
5399
5428
|
}), t.register(xt), en.forEach((e) => {
|
|
5400
5429
|
t.parser(e);
|
|
5401
|
-
}), Object.keys(
|
|
5402
|
-
t.maker[e] =
|
|
5430
|
+
}), Object.keys(de).forEach((e) => {
|
|
5431
|
+
t.maker[e] = de[e];
|
|
5403
5432
|
});
|
|
5404
5433
|
}
|
|
5405
5434
|
function mn() {
|
|
5406
5435
|
return Wt({
|
|
5407
5436
|
ui: "element-ui",
|
|
5408
|
-
version: "2.7.
|
|
5437
|
+
version: "2.7.22",
|
|
5409
5438
|
manager: on,
|
|
5410
5439
|
extendApi: hn,
|
|
5411
5440
|
install: pn,
|