@form-create/element-ui 2.7.20 → 2.7.21
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 +261 -237
- 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.21
|
|
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
|
}
|
|
@@ -913,10 +913,10 @@ 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
921
|
function Oe(t, e = {}, r) {
|
|
922
922
|
let i = !1;
|
|
@@ -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
|
}
|
|
@@ -1598,9 +1598,9 @@ function Re() {
|
|
|
1598
1598
|
function Se(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];
|
|
@@ -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
1745
|
const E = je(n, o);
|
|
1746
1746
|
if (E) {
|
|
1747
|
-
let
|
|
1748
|
-
_ ? (
|
|
1747
|
+
let S;
|
|
1748
|
+
_ ? (S = H(E.getSubForm()), S.push(y)) : S = y, E.subForm(S);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
1751
|
}, G = () => {
|
|
1752
1752
|
const E = je(n, o);
|
|
1753
1753
|
if (E)
|
|
1754
1754
|
if (_) {
|
|
1755
|
-
const
|
|
1756
|
-
M > -1 &&
|
|
1755
|
+
const S = H(E.getSubForm()), M = S.indexOf(y);
|
|
1756
|
+
M > -1 && S.splice(M, 1);
|
|
1757
1757
|
} else
|
|
1758
1758
|
E.subForm();
|
|
1759
1759
|
};
|
|
@@ -1761,52 +1761,52 @@ 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), G(), 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
1790
|
E ? F() : G();
|
|
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
|
we(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
1811
|
getGroupInject: () => je(n, o),
|
|
1812
1812
|
refresh() {
|
|
@@ -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 = we(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
|
});
|
|
@@ -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
|
},
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -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) {
|
|
@@ -3177,9 +3194,9 @@ 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);
|
|
@@ -3193,7 +3210,7 @@ function fi(t) {
|
|
|
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
|
});
|
|
@@ -3500,21 +3517,21 @@ 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*\}\}$/);
|
|
@@ -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
|
}
|
|
@@ -3781,12 +3798,13 @@ 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
3803
|
O(() => y(q(v({}, i || {}), {
|
|
3804
|
+
args: Object.values(i),
|
|
3787
3805
|
self: e.rule,
|
|
3788
3806
|
rule: e.rule,
|
|
3789
|
-
parent:
|
|
3807
|
+
parent: m == null ? void 0 : m.rule,
|
|
3790
3808
|
$f: this.api,
|
|
3791
3809
|
api: this.api,
|
|
3792
3810
|
option: this.vm.$props.option
|
|
@@ -3873,7 +3891,7 @@ function $i(t) {
|
|
|
3873
3891
|
else
|
|
3874
3892
|
return;
|
|
3875
3893
|
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 = (
|
|
3894
|
+
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
3895
|
});
|
|
3878
3896
|
}
|
|
3879
3897
|
});
|
|
@@ -3998,7 +4016,7 @@ function wi() {
|
|
|
3998
4016
|
},
|
|
3999
4017
|
make(r, i, s) {
|
|
4000
4018
|
var n, o, a;
|
|
4001
|
-
return (
|
|
4019
|
+
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
4020
|
},
|
|
4003
4021
|
makeComponent(r, i, s) {
|
|
4004
4022
|
var a;
|
|
@@ -4021,7 +4039,7 @@ function wi() {
|
|
|
4021
4039
|
},
|
|
4022
4040
|
use(r) {
|
|
4023
4041
|
Object.keys(r).forEach((i) => {
|
|
4024
|
-
const s =
|
|
4042
|
+
const s = ve(i), n = Et(i).toLocaleLowerCase(), o = r[i];
|
|
4025
4043
|
e.alias(i, o), [i, s, n].forEach((a) => {
|
|
4026
4044
|
e.prototype[a] = function(l, u) {
|
|
4027
4045
|
return this.make(t[i] || a, l, u);
|
|
@@ -4110,10 +4128,10 @@ const Fi = function(t) {
|
|
|
4110
4128
|
let l = (p) => {
|
|
4111
4129
|
let d;
|
|
4112
4130
|
i && i.__fc__ && (d = i.__fc__.getParentGroup());
|
|
4113
|
-
let
|
|
4114
|
-
a.template ?
|
|
4131
|
+
let m;
|
|
4132
|
+
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
4133
|
const y = a.modify ? i : r.getProp();
|
|
4116
|
-
a.to === "child" ? y.children ? k(y.children, 0,
|
|
4134
|
+
a.to === "child" ? y.children ? k(y.children, 0, m) : k(y, "children", [m]) : oe(y, a.to || "options", m), s.sync(i);
|
|
4117
4135
|
}, u = (p) => l(p);
|
|
4118
4136
|
const f = t.watchLoadData(u);
|
|
4119
4137
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4140,11 +4158,11 @@ const Fi = function(t) {
|
|
|
4140
4158
|
const l = n[a];
|
|
4141
4159
|
if (l) {
|
|
4142
4160
|
const u = typeof l == "object";
|
|
4143
|
-
let f = (
|
|
4144
|
-
let y = t.t(u ? l.attr : l, u ? l.params : null,
|
|
4161
|
+
let f = (m) => {
|
|
4162
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, m);
|
|
4145
4163
|
const _ = u && l.modify ? i : r.getProp();
|
|
4146
4164
|
a === "child" ? _.children ? k(_.children, 0, y) : k(_, "children", [y]) : oe(_, a, y), s.sync(i);
|
|
4147
|
-
}, p = (
|
|
4165
|
+
}, p = (m) => f(m);
|
|
4148
4166
|
const d = t.watchLoadData(p);
|
|
4149
4167
|
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
4150
4168
|
}
|
|
@@ -4218,24 +4236,24 @@ const Fi = function(t) {
|
|
|
4218
4236
|
i._fn[s.id] = t.watchLoadData(se((p, d) => {
|
|
4219
4237
|
if (d && a.watch === !1)
|
|
4220
4238
|
return i._fn[s.id]();
|
|
4221
|
-
const
|
|
4239
|
+
const m = t.$handle.loadFetchVar(K(a), p, n), y = q(v({
|
|
4222
4240
|
headers: {}
|
|
4223
|
-
},
|
|
4241
|
+
}, m), {
|
|
4224
4242
|
onSuccess(_, F) {
|
|
4225
4243
|
if (f()) return;
|
|
4226
4244
|
let G = (L) => F ? L : j(L, "data") ? L.data : L;
|
|
4227
|
-
const A = z(
|
|
4245
|
+
const A = z(m.parse);
|
|
4228
4246
|
h.Function(A) ? G = A : A && h.String(A) && (G = (L) => B(L, A)), Ae(G(_, n, o)).then((L) => {
|
|
4229
4247
|
l(L);
|
|
4230
4248
|
});
|
|
4231
4249
|
},
|
|
4232
4250
|
onError(_) {
|
|
4233
|
-
l(void 0), !f() && (u || ((F) => Ye(F.message || "fetch fail " +
|
|
4251
|
+
l(void 0), !f() && (u || ((F) => Ye(F.message || "fetch fail " + m.action)))(_, n, o);
|
|
4234
4252
|
}
|
|
4235
4253
|
});
|
|
4236
4254
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4237
|
-
if (h.Function(
|
|
4238
|
-
Ae(
|
|
4255
|
+
if (h.Function(m.action)) {
|
|
4256
|
+
Ae(m.action(n, o)).then((_) => {
|
|
4239
4257
|
y.onSuccess(_, !0);
|
|
4240
4258
|
}).catch((_) => {
|
|
4241
4259
|
y.onError(_);
|
|
@@ -4439,16 +4457,16 @@ function Wt(t) {
|
|
|
4439
4457
|
t.extendApi
|
|
4440
4458
|
], u = v({}, Ri), f = Yr();
|
|
4441
4459
|
let p = { global: {} };
|
|
4442
|
-
const d = t.isMobile === !0,
|
|
4460
|
+
const d = t.isMobile === !0, m = ne({
|
|
4443
4461
|
$mobile: d
|
|
4444
4462
|
}), y = wi(), _ = {}, F = {};
|
|
4445
4463
|
Ui(t.attrs || {});
|
|
4446
4464
|
function G(c) {
|
|
4447
|
-
const
|
|
4448
|
-
if (Array.isArray(
|
|
4449
|
-
return
|
|
4450
|
-
if (
|
|
4451
|
-
return
|
|
4465
|
+
const g = U[c];
|
|
4466
|
+
if (Array.isArray(g))
|
|
4467
|
+
return g.map(($) => $.api());
|
|
4468
|
+
if (g)
|
|
4469
|
+
return g.api();
|
|
4452
4470
|
}
|
|
4453
4471
|
function A(c) {
|
|
4454
4472
|
o.push(c);
|
|
@@ -4457,7 +4475,7 @@ function Wt(t) {
|
|
|
4457
4475
|
const c = Me(...arguments);
|
|
4458
4476
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4459
4477
|
}
|
|
4460
|
-
function
|
|
4478
|
+
function pe() {
|
|
4461
4479
|
const c = Me(...arguments);
|
|
4462
4480
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4463
4481
|
name: c.id
|
|
@@ -4466,41 +4484,41 @@ function Wt(t) {
|
|
|
4466
4484
|
function Pe(c) {
|
|
4467
4485
|
y.use(c);
|
|
4468
4486
|
}
|
|
4469
|
-
function
|
|
4487
|
+
function me() {
|
|
4470
4488
|
const c = Me(...arguments);
|
|
4471
4489
|
if (!c.id || !c.prop) return De;
|
|
4472
|
-
const
|
|
4473
|
-
r[
|
|
4490
|
+
const g = J(c.id), $ = c.prop, b = $.merge === !0 ? r[g] : void 0;
|
|
4491
|
+
r[g] = Se($, b || De), f[g] = T(g), $.maker && C(f, $.maker);
|
|
4474
4492
|
}
|
|
4475
|
-
function E(c,
|
|
4493
|
+
function E(c, g) {
|
|
4476
4494
|
let $;
|
|
4477
4495
|
if (h.String(c)) {
|
|
4478
|
-
if ($ = c,
|
|
4479
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4496
|
+
if ($ = c, g === void 0)
|
|
4497
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? S() : e[$];
|
|
4480
4498
|
} else
|
|
4481
|
-
$ = J(c.name),
|
|
4482
|
-
if (!$ || !
|
|
4499
|
+
$ = J(c.name), g = c;
|
|
4500
|
+
if (!$ || !g) return;
|
|
4483
4501
|
const b = J($);
|
|
4484
|
-
e[$] =
|
|
4502
|
+
e[$] = g, e[b] = g, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], g.formCreateParser && me($, g.formCreateParser);
|
|
4485
4503
|
}
|
|
4486
|
-
function
|
|
4504
|
+
function S() {
|
|
4487
4505
|
return Zr(Be, e, i);
|
|
4488
4506
|
}
|
|
4489
4507
|
function M() {
|
|
4490
4508
|
return Ne;
|
|
4491
4509
|
}
|
|
4492
|
-
function
|
|
4493
|
-
return h.Function(c.install) ? c.install(W,
|
|
4510
|
+
function ge(c, g) {
|
|
4511
|
+
return h.Function(c.install) ? c.install(W, g) : h.Function(c) && c(W, g), this;
|
|
4494
4512
|
}
|
|
4495
|
-
function W(c,
|
|
4496
|
-
let b = qi(c,
|
|
4513
|
+
function W(c, g, $) {
|
|
4514
|
+
let b = qi(c, g || {});
|
|
4497
4515
|
const w = b.$refs.fc.formCreate;
|
|
4498
4516
|
return w.$parent = $, Mi(w.options).appendChild(b.$el), w.api();
|
|
4499
4517
|
}
|
|
4500
4518
|
Se(W, F);
|
|
4501
4519
|
function zt(c) {
|
|
4502
|
-
let
|
|
4503
|
-
return c ?
|
|
4520
|
+
let g = v({}, t);
|
|
4521
|
+
return c ? g.inherit = {
|
|
4504
4522
|
components: e,
|
|
4505
4523
|
parsers: r,
|
|
4506
4524
|
directives: i,
|
|
@@ -4509,53 +4527,53 @@ function Wt(t) {
|
|
|
4509
4527
|
useApps: o,
|
|
4510
4528
|
maker: f,
|
|
4511
4529
|
formulas: _,
|
|
4512
|
-
loadData:
|
|
4513
|
-
} : delete
|
|
4530
|
+
loadData: m
|
|
4531
|
+
} : delete g.inherit, Wt(g);
|
|
4514
4532
|
}
|
|
4515
|
-
function Xt(c,
|
|
4516
|
-
s[c] =
|
|
4533
|
+
function Xt(c, g) {
|
|
4534
|
+
s[c] = g;
|
|
4517
4535
|
}
|
|
4518
|
-
function Zt(c,
|
|
4519
|
-
_[c] =
|
|
4536
|
+
function Zt(c, g) {
|
|
4537
|
+
_[c] = g;
|
|
4520
4538
|
}
|
|
4521
|
-
function Qt(c,
|
|
4539
|
+
function Qt(c, g) {
|
|
4522
4540
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4523
|
-
|
|
4524
|
-
b[w] = Se(
|
|
4525
|
-
}),
|
|
4541
|
+
g.parsers && Object.keys(g.parsers).forEach((w) => {
|
|
4542
|
+
b[w] = Se(g.parsers[w], De);
|
|
4543
|
+
}), g.name = c, n[c] = q(v(v({}, $), g), { parsers: b });
|
|
4526
4544
|
}
|
|
4527
4545
|
function Fe(c) {
|
|
4528
|
-
c && Object.keys(U).forEach((
|
|
4529
|
-
(Array.isArray(U[
|
|
4546
|
+
c && Object.keys(U).forEach((g) => {
|
|
4547
|
+
(Array.isArray(U[g]) ? U[g] : [U[g]]).forEach((b) => {
|
|
4530
4548
|
b.bus.$emit("$loadData." + c);
|
|
4531
4549
|
});
|
|
4532
4550
|
});
|
|
4533
4551
|
}
|
|
4534
|
-
function Te(c,
|
|
4535
|
-
oe(
|
|
4552
|
+
function Te(c, g) {
|
|
4553
|
+
oe(m, c, g), Fe(c);
|
|
4536
4554
|
}
|
|
4537
|
-
function ke(c,
|
|
4538
|
-
const $ = (...b) => O(() =>
|
|
4555
|
+
function ke(c, g) {
|
|
4556
|
+
const $ = (...b) => O(() => g(...b));
|
|
4539
4557
|
$._driver = !0, Te(c, $);
|
|
4540
4558
|
}
|
|
4541
|
-
function st(c,
|
|
4559
|
+
function st(c, g) {
|
|
4542
4560
|
const $ = (c || "").split(".");
|
|
4543
4561
|
c = $.shift();
|
|
4544
4562
|
const b = $.join(".");
|
|
4545
|
-
if (j(
|
|
4546
|
-
let w =
|
|
4547
|
-
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ?
|
|
4563
|
+
if (j(m, c) || k(m, c, _t), m[c] !== _t) {
|
|
4564
|
+
let w = m[c];
|
|
4565
|
+
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ? g : w;
|
|
4548
4566
|
} else
|
|
4549
|
-
return
|
|
4567
|
+
return g;
|
|
4550
4568
|
}
|
|
4551
4569
|
function Yt(c) {
|
|
4552
4570
|
l.push(c);
|
|
4553
4571
|
}
|
|
4554
4572
|
function er(c) {
|
|
4555
|
-
delete
|
|
4573
|
+
delete m[c], Fe(c);
|
|
4556
4574
|
}
|
|
4557
|
-
function tr(c,
|
|
4558
|
-
a.push({ name: c, callback:
|
|
4575
|
+
function tr(c, g) {
|
|
4576
|
+
a.push({ name: c, callback: g });
|
|
4559
4577
|
}
|
|
4560
4578
|
function Be(c) {
|
|
4561
4579
|
C(this, {
|
|
@@ -4579,7 +4597,7 @@ function Wt(t) {
|
|
|
4579
4597
|
drivers: n,
|
|
4580
4598
|
renderDriver: null,
|
|
4581
4599
|
refreshData: Fe,
|
|
4582
|
-
loadData:
|
|
4600
|
+
loadData: m,
|
|
4583
4601
|
CreateNode: y,
|
|
4584
4602
|
bus: new Si(),
|
|
4585
4603
|
unwatch: [],
|
|
@@ -4587,8 +4605,8 @@ function Wt(t) {
|
|
|
4587
4605
|
extendApiFn: l,
|
|
4588
4606
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4589
4607
|
tmpData: ne({})
|
|
4590
|
-
}), a.forEach((
|
|
4591
|
-
this.bus.$on(
|
|
4608
|
+
}), a.forEach((g) => {
|
|
4609
|
+
this.bus.$on(g.name, g.callback);
|
|
4592
4610
|
}), P(() => {
|
|
4593
4611
|
N(this.options, () => {
|
|
4594
4612
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
@@ -4601,52 +4619,52 @@ function Wt(t) {
|
|
|
4601
4619
|
this.initOptions(), this.$handle.api.refresh();
|
|
4602
4620
|
}, { 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
4621
|
},
|
|
4604
|
-
targetFormDriver(c, ...
|
|
4605
|
-
if (this.bus.$emit(c, ...
|
|
4606
|
-
return O(() => this.renderDriver[c](...
|
|
4622
|
+
targetFormDriver(c, ...g) {
|
|
4623
|
+
if (this.bus.$emit(c, ...g), this.renderDriver && this.renderDriver[c])
|
|
4624
|
+
return O(() => this.renderDriver[c](...g));
|
|
4607
4625
|
},
|
|
4608
|
-
t(c,
|
|
4626
|
+
t(c, g, $) {
|
|
4609
4627
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4610
|
-
return b == null && (b = ""), b &&
|
|
4628
|
+
return b == null && (b = ""), b && g && Object.keys(g).forEach((w) => {
|
|
4611
4629
|
const V = new RegExp(`{${w}}`, "g");
|
|
4612
|
-
b = b.replace(V,
|
|
4630
|
+
b = b.replace(V, g[w]);
|
|
4613
4631
|
}), b;
|
|
4614
4632
|
},
|
|
4615
4633
|
globalDataDriver(c) {
|
|
4616
|
-
let
|
|
4617
|
-
const $ =
|
|
4634
|
+
let g = c.split(".");
|
|
4635
|
+
const $ = g.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4618
4636
|
if (b) {
|
|
4619
4637
|
if (b.type === "static")
|
|
4620
|
-
return B(b.data,
|
|
4638
|
+
return B(b.data, g);
|
|
4621
4639
|
{
|
|
4622
4640
|
let w;
|
|
4623
4641
|
const V = this.fetchCache.get(b);
|
|
4624
4642
|
if (V) {
|
|
4625
|
-
if (V.status && (w = B(V.data,
|
|
4643
|
+
if (V.status && (w = B(V.data, g)), !V.loading)
|
|
4626
4644
|
return w;
|
|
4627
4645
|
V.loading = !1, this.fetchCache.set(b, V);
|
|
4628
4646
|
} else
|
|
4629
4647
|
this.fetchCache.set(b, { status: !1 });
|
|
4630
|
-
const
|
|
4648
|
+
const R = se(() => {
|
|
4631
4649
|
te();
|
|
4632
4650
|
const x = this.fetchCache.get(b);
|
|
4633
4651
|
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),
|
|
4652
|
+
}, b.wait || 600), ae = (x) => {
|
|
4635
4653
|
this.fetchCache.set(b, { status: !0, data: x }), this.bus.$emit("$loadData.$globalData." + $);
|
|
4636
|
-
},
|
|
4637
|
-
if (
|
|
4654
|
+
}, le = (x, ue) => {
|
|
4655
|
+
if (ue && b.watch === !1)
|
|
4638
4656
|
return te();
|
|
4639
|
-
if (
|
|
4640
|
-
|
|
4657
|
+
if (ue) {
|
|
4658
|
+
R();
|
|
4641
4659
|
return;
|
|
4642
4660
|
}
|
|
4643
|
-
const
|
|
4644
|
-
|
|
4645
|
-
|
|
4661
|
+
const fe = this.$handle.loadFetchVar(Ke(b), x);
|
|
4662
|
+
fe.targetRule = this.targetRule, this.$handle.api.fetch(fe).then((re) => {
|
|
4663
|
+
ae(re);
|
|
4646
4664
|
}).catch((re) => {
|
|
4647
|
-
|
|
4665
|
+
ae(null);
|
|
4648
4666
|
});
|
|
4649
|
-
}, te = this.watchLoadData(
|
|
4667
|
+
}, te = this.watchLoadData(le);
|
|
4650
4668
|
return b.watch === !1 && te(), this.unwatch.push(te), w;
|
|
4651
4669
|
}
|
|
4652
4670
|
}
|
|
@@ -4656,28 +4674,28 @@ function Wt(t) {
|
|
|
4656
4674
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4657
4675
|
},
|
|
4658
4676
|
globalLanguageDriver(c) {
|
|
4659
|
-
let
|
|
4660
|
-
if (
|
|
4677
|
+
let g = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4678
|
+
if (g && (b = O(() => g(c))), b == null && $ && typeof $ == "object" && (b = B($, c)), b == null) {
|
|
4661
4679
|
const w = this.options.value.language || {}, V = this.getLocale();
|
|
4662
4680
|
b = B(w[V] || {}, c), b == null && (b = B(Li[V] || {}, c));
|
|
4663
4681
|
}
|
|
4664
4682
|
return b;
|
|
4665
4683
|
},
|
|
4666
4684
|
globalVarDriver(c) {
|
|
4667
|
-
let
|
|
4668
|
-
const $ =
|
|
4685
|
+
let g = c.split(".");
|
|
4686
|
+
const $ = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4669
4687
|
if (b) {
|
|
4670
4688
|
const w = h.Function(b) ? b : z(b.handle);
|
|
4671
4689
|
if (w) {
|
|
4672
|
-
let V = w((...
|
|
4673
|
-
return B(V,
|
|
4690
|
+
let V = w((...R) => this.$handle.api.getData(...R), this.$handle.api);
|
|
4691
|
+
return B(V, g);
|
|
4674
4692
|
}
|
|
4675
4693
|
}
|
|
4676
4694
|
},
|
|
4677
|
-
setData(c,
|
|
4678
|
-
$ ? Te(c,
|
|
4695
|
+
setData(c, g, $) {
|
|
4696
|
+
$ ? Te(c, g) : (oe(this.vm.top.fc.tmpData, c, g), this.bus.$emit("$loadData." + c));
|
|
4679
4697
|
},
|
|
4680
|
-
getLoadData(c,
|
|
4698
|
+
getLoadData(c, g) {
|
|
4681
4699
|
let $ = null;
|
|
4682
4700
|
if (c != null) {
|
|
4683
4701
|
let b = c.split(".");
|
|
@@ -4707,36 +4725,36 @@ function Wt(t) {
|
|
|
4707
4725
|
}
|
|
4708
4726
|
$ && b.length && ($ = B($, b));
|
|
4709
4727
|
}
|
|
4710
|
-
return $ == null || $ === "" ?
|
|
4728
|
+
return $ == null || $ === "" ? g : $;
|
|
4711
4729
|
},
|
|
4712
|
-
watchLoadData(c,
|
|
4730
|
+
watchLoadData(c, g) {
|
|
4713
4731
|
let $ = {};
|
|
4714
|
-
const b = (
|
|
4732
|
+
const b = (R) => {
|
|
4715
4733
|
this.get || (this.get = w), O(() => {
|
|
4716
|
-
c(w,
|
|
4734
|
+
c(w, R);
|
|
4717
4735
|
}), this.get === w && (this.get = void 0);
|
|
4718
|
-
}, w = (
|
|
4719
|
-
let
|
|
4720
|
-
if (typeof
|
|
4721
|
-
return $[
|
|
4722
|
-
const te =
|
|
4723
|
-
const
|
|
4724
|
-
if ($[
|
|
4725
|
-
((
|
|
4736
|
+
}, w = (R, ae) => {
|
|
4737
|
+
let le;
|
|
4738
|
+
if (typeof R == "object" && (le = R.getValue, R = R.id), $[R])
|
|
4739
|
+
return $[R].val;
|
|
4740
|
+
const te = $e(() => le ? le() : this.getLoadData(R, ae)), x = R.split("."), ue = x.shift(), fe = x.shift() || "", re = se(() => {
|
|
4741
|
+
const ce = le ? le() : this.getLoadData(R, ae);
|
|
4742
|
+
if ($[R])
|
|
4743
|
+
((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
4744
|
else return;
|
|
4727
|
-
},
|
|
4745
|
+
}, g || 0), ir = N(te, (ce) => {
|
|
4728
4746
|
re();
|
|
4729
4747
|
});
|
|
4730
|
-
return this.bus.$on("$loadData." +
|
|
4748
|
+
return this.bus.$on("$loadData." + ue, re), fe && this.bus.$on("$loadData." + ue + "." + fe, re), $[R] = {
|
|
4731
4749
|
fn: () => {
|
|
4732
|
-
this.bus.$off("$loadData." +
|
|
4750
|
+
this.bus.$off("$loadData." + ue, re), fe && this.bus.$off("$loadData." + ue + "." + fe, re), ir();
|
|
4733
4751
|
},
|
|
4734
4752
|
val: te.value
|
|
4735
4753
|
}, te.value;
|
|
4736
4754
|
};
|
|
4737
4755
|
b(!1);
|
|
4738
4756
|
const V = () => {
|
|
4739
|
-
Object.keys($).forEach((
|
|
4757
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4740
4758
|
};
|
|
4741
4759
|
return this.unwatch.push(V), V;
|
|
4742
4760
|
},
|
|
@@ -4752,15 +4770,15 @@ function Wt(t) {
|
|
|
4752
4770
|
globalEvent: {},
|
|
4753
4771
|
globalData: {}
|
|
4754
4772
|
}, K(p));
|
|
4755
|
-
const
|
|
4756
|
-
|
|
4773
|
+
const g = this.isSub();
|
|
4774
|
+
g && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$props.option || {});
|
|
4757
4775
|
const $ = this.api();
|
|
4758
|
-
this.targetFormDriver("initOptions", c, { api: $, isSubForm:
|
|
4776
|
+
this.targetFormDriver("initOptions", c, { api: $, isSubForm: g }), this.updateOptions(c);
|
|
4759
4777
|
},
|
|
4760
|
-
mergeOptions(c,
|
|
4761
|
-
return
|
|
4762
|
-
delete
|
|
4763
|
-
}),
|
|
4778
|
+
mergeOptions(c, g, $) {
|
|
4779
|
+
return g = v({}, g || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4780
|
+
delete g[b];
|
|
4781
|
+
}), g.global && (c.global = xr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
|
|
4764
4782
|
},
|
|
4765
4783
|
updateOptions(c) {
|
|
4766
4784
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4806,17 +4824,17 @@ function Wt(t) {
|
|
|
4806
4824
|
setModelField: Xt,
|
|
4807
4825
|
setFormula: Zt,
|
|
4808
4826
|
setDriver: Qt,
|
|
4809
|
-
register:
|
|
4827
|
+
register: pe,
|
|
4810
4828
|
$vnode: M,
|
|
4811
|
-
parser:
|
|
4812
|
-
use:
|
|
4829
|
+
parser: me,
|
|
4830
|
+
use: ge,
|
|
4813
4831
|
factory: zt,
|
|
4814
4832
|
componentAlias: Pe,
|
|
4815
4833
|
copyRule: Pt,
|
|
4816
4834
|
copyRules: Tt,
|
|
4817
4835
|
mergeRule: ee,
|
|
4818
4836
|
fetch: Ut,
|
|
4819
|
-
$form:
|
|
4837
|
+
$form: S,
|
|
4820
4838
|
parseFn: z,
|
|
4821
4839
|
parseJson: St,
|
|
4822
4840
|
toJson: we,
|
|
@@ -4828,25 +4846,27 @@ function Wt(t) {
|
|
|
4828
4846
|
function rr(c) {
|
|
4829
4847
|
C(c, {
|
|
4830
4848
|
create: W,
|
|
4831
|
-
install(
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4849
|
+
install(g, $) {
|
|
4850
|
+
p = v(v({}, p), $ || {});
|
|
4851
|
+
const b = `_installedFormCreate${d ? "Mobile" : ""}_${t.ui}`;
|
|
4852
|
+
if (g[b] === !0) return;
|
|
4853
|
+
g[b] = !0;
|
|
4854
|
+
const w = function(R, ae = {}) {
|
|
4855
|
+
return W(R, ae, this);
|
|
4836
4856
|
};
|
|
4837
|
-
ot(
|
|
4838
|
-
const
|
|
4839
|
-
|
|
4840
|
-
O(() =>
|
|
4857
|
+
ot(w), g.prototype.$formCreate = w;
|
|
4858
|
+
const V = S();
|
|
4859
|
+
g.component(V.name, V), g.component("FcFragment", M()), o.forEach((R) => {
|
|
4860
|
+
O(() => R(c, g));
|
|
4841
4861
|
});
|
|
4842
4862
|
}
|
|
4843
4863
|
});
|
|
4844
4864
|
}
|
|
4845
|
-
if (ot(F), rr(F), ke("$cookie", Pi), ke("$localStorage", Ti), ke("$sessionStorage", Bi), y.use({ fragment: "fcFragment" }), t.install && W.use(t),
|
|
4865
|
+
if (ot(F), rr(F), ke("$cookie", Pi), ke("$localStorage", Ti), ke("$sessionStorage", Bi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), me(Di), t.inherit) {
|
|
4846
4866
|
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(
|
|
4867
|
+
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
4868
|
}
|
|
4849
|
-
const Ee =
|
|
4869
|
+
const Ee = S();
|
|
4850
4870
|
return Se(Ee, F), Object.defineProperties(Ee, {
|
|
4851
4871
|
fetch: {
|
|
4852
4872
|
get() {
|
|
@@ -5117,12 +5137,12 @@ const on = {
|
|
|
5117
5137
|
return !(!e.title && !e.native || Z(e.show));
|
|
5118
5138
|
},
|
|
5119
5139
|
makeInfo(t, e, r) {
|
|
5120
|
-
var f, p, d,
|
|
5140
|
+
var f, p, d, m, y, _;
|
|
5121
5141
|
const i = v({}, t.title), s = v({}, t.info), n = nn(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5122
5142
|
title: (p = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : p.value,
|
|
5123
5143
|
rule: r.rule,
|
|
5124
5144
|
options: this.options
|
|
5125
|
-
}) : ((
|
|
5145
|
+
}) : ((m = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : m.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5126
5146
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5127
5147
|
const F = {
|
|
5128
5148
|
type: s.type || "popover",
|
|
@@ -5222,12 +5242,12 @@ const on = {
|
|
|
5222
5242
|
key: `${this.key}b1`
|
|
5223
5243
|
}, [e]);
|
|
5224
5244
|
}
|
|
5225
|
-
},
|
|
5226
|
-
an(
|
|
5227
|
-
ln(
|
|
5228
|
-
un(
|
|
5229
|
-
fn(
|
|
5230
|
-
cn(
|
|
5245
|
+
}, de = {};
|
|
5246
|
+
an(de);
|
|
5247
|
+
ln(de);
|
|
5248
|
+
un(de);
|
|
5249
|
+
fn(de);
|
|
5250
|
+
cn(de);
|
|
5231
5251
|
function an(t) {
|
|
5232
5252
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5233
5253
|
t[e] = T(e);
|
|
@@ -5365,24 +5385,28 @@ function hn(t, e) {
|
|
|
5365
5385
|
const xt = {
|
|
5366
5386
|
name: "required",
|
|
5367
5387
|
load(t, e, r) {
|
|
5368
|
-
var s, n;
|
|
5369
5388
|
const i = dn(t.getValue());
|
|
5389
|
+
let s;
|
|
5370
5390
|
if (i.required === !1)
|
|
5371
5391
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5372
5392
|
else {
|
|
5373
|
-
const
|
|
5393
|
+
const n = v({
|
|
5374
5394
|
required: !0,
|
|
5375
|
-
validator(l, u
|
|
5376
|
-
h.empty(
|
|
5395
|
+
validator(a, l, u) {
|
|
5396
|
+
o(), h.empty(l) ? u(n.message) : u();
|
|
5377
5397
|
}
|
|
5378
|
-
}, i),
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5398
|
+
}, i), o = () => {
|
|
5399
|
+
var l, u;
|
|
5400
|
+
const a = (u = (l = e.__fc__.refRule) == null ? void 0 : l.__$title) == null ? void 0 : u.value;
|
|
5401
|
+
if (s !== a)
|
|
5402
|
+
if (s = a, !i.message)
|
|
5403
|
+
n.message = r.t("required", { title: a }) || a + (r.getLocale() === "en" ? " is required" : "不能为空");
|
|
5404
|
+
else {
|
|
5405
|
+
const f = i.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
5406
|
+
f && (n.message = r.t(f[1], { title: a }));
|
|
5407
|
+
}
|
|
5408
|
+
};
|
|
5409
|
+
o(), t.getProp().validate = [n];
|
|
5386
5410
|
}
|
|
5387
5411
|
r.sync(e);
|
|
5388
5412
|
},
|
|
@@ -5398,14 +5422,14 @@ function pn(t) {
|
|
|
5398
5422
|
t.component(e.name, e);
|
|
5399
5423
|
}), t.register(xt), en.forEach((e) => {
|
|
5400
5424
|
t.parser(e);
|
|
5401
|
-
}), Object.keys(
|
|
5402
|
-
t.maker[e] =
|
|
5425
|
+
}), Object.keys(de).forEach((e) => {
|
|
5426
|
+
t.maker[e] = de[e];
|
|
5403
5427
|
});
|
|
5404
5428
|
}
|
|
5405
5429
|
function mn() {
|
|
5406
5430
|
return Wt({
|
|
5407
5431
|
ui: "element-ui",
|
|
5408
|
-
version: "2.7.
|
|
5432
|
+
version: "2.7.21",
|
|
5409
5433
|
manager: on,
|
|
5410
5434
|
extendApi: hn,
|
|
5411
5435
|
install: pn,
|