@form-create/element-ui 2.7.9 → 2.7.11
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 +461 -442
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +4 -4
- package/src/core/manager.js +3 -1
package/dist/form-create.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/element-ui v2.7.
|
|
3
|
+
* @form-create/element-ui v2.7.11
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -591,7 +591,7 @@ const Fr = "fcFrame", kr = {
|
|
|
591
591
|
return h.type(e, t);
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
|
-
function
|
|
594
|
+
function j(t, e) {
|
|
595
595
|
return {}.hasOwnProperty.call(t, e);
|
|
596
596
|
}
|
|
597
597
|
const Rr = "fcSelect", Dr = {
|
|
@@ -621,7 +621,7 @@ const Rr = "fcSelect", Dr = {
|
|
|
621
621
|
}, [h.trueArray(n.options) && n.options.map((a, l) => r(a, l))]), s = e.props.formCreateInject.options;
|
|
622
622
|
return t("ElSelect", I([{}, e.data, {
|
|
623
623
|
ref: "el"
|
|
624
|
-
}]), [(Array.isArray(s) ? s : []).map((n, o) =>
|
|
624
|
+
}]), [(Array.isArray(s) ? s : []).map((n, o) => j(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
|
|
625
625
|
},
|
|
626
626
|
mounted() {
|
|
627
627
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -738,6 +738,7 @@ const Ir = "fcUpload", Pr = {
|
|
|
738
738
|
default: () => {
|
|
739
739
|
}
|
|
740
740
|
},
|
|
741
|
+
uploadText: String,
|
|
741
742
|
value: [Array, String]
|
|
742
743
|
},
|
|
743
744
|
data() {
|
|
@@ -846,7 +847,7 @@ const Ir = "fcUpload", Pr = {
|
|
|
846
847
|
attrs: {
|
|
847
848
|
type: "primary"
|
|
848
849
|
}
|
|
849
|
-
}, [this.formCreateInject.t("clickToUpload") || "点击上传"]) : t("i", {
|
|
850
|
+
}, [this.formCreateInject.t("clickToUpload") || this.uploadText || "点击上传"]) : t("i", {
|
|
850
851
|
class: "el-icon-upload2"
|
|
851
852
|
});
|
|
852
853
|
},
|
|
@@ -1078,7 +1079,7 @@ const Br = "fcGroup", Lr = {
|
|
|
1078
1079
|
},
|
|
1079
1080
|
methods: {
|
|
1080
1081
|
_value(t) {
|
|
1081
|
-
return t &&
|
|
1082
|
+
return t && j(t, this.field) ? t[this.field] : t;
|
|
1082
1083
|
},
|
|
1083
1084
|
cache(t, e) {
|
|
1084
1085
|
this.cacheValue[t] = JSON.stringify(e);
|
|
@@ -1235,9 +1236,9 @@ const Br = "fcGroup", Lr = {
|
|
|
1235
1236
|
key: o
|
|
1236
1237
|
}, {
|
|
1237
1238
|
on: {
|
|
1238
|
-
"update:value": (
|
|
1239
|
-
"emit-event": (
|
|
1240
|
-
input: (
|
|
1239
|
+
"update:value": (p) => this.formData(o, p),
|
|
1240
|
+
"emit-event": (p, ...d) => this.emitEvent(p, d, a, o),
|
|
1241
|
+
input: (p) => this.add$f(a, o, p)
|
|
1241
1242
|
}
|
|
1242
1243
|
}, {}, {
|
|
1243
1244
|
props: {
|
|
@@ -1365,6 +1366,9 @@ function ve(t) {
|
|
|
1365
1366
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1366
1367
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1367
1368
|
}
|
|
1369
|
+
function Ur(t) {
|
|
1370
|
+
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
1371
|
+
}
|
|
1368
1372
|
const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], St = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
|
|
1369
1373
|
const i = [...kt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...St, ...r.functional || []], o = r.props || [];
|
|
1370
1374
|
return t.reduce((a, l) => {
|
|
@@ -1375,25 +1379,25 @@ const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style"
|
|
|
1375
1379
|
else if (i.indexOf(u) > -1)
|
|
1376
1380
|
a[u] = v(v({}, a[u]), l[u]);
|
|
1377
1381
|
else if (s.indexOf(u) > -1) {
|
|
1378
|
-
const f = a[u] instanceof Array ? a[u] : [a[u]],
|
|
1379
|
-
a[u] = [...f, ...
|
|
1382
|
+
const f = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
|
|
1383
|
+
a[u] = [...f, ...p];
|
|
1380
1384
|
} else if (n.indexOf(u) > -1)
|
|
1381
1385
|
for (const f in l[u])
|
|
1382
1386
|
if (a[u][f]) {
|
|
1383
|
-
const
|
|
1384
|
-
a[u][f] = [...
|
|
1387
|
+
const p = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], d = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
|
|
1388
|
+
a[u][f] = [...p, ...d];
|
|
1385
1389
|
} else
|
|
1386
1390
|
a[u][f] = l[u][f];
|
|
1387
1391
|
else if (u === "hook")
|
|
1388
1392
|
for (let f in l[u])
|
|
1389
|
-
a[u][f] ? a[u][f] =
|
|
1393
|
+
a[u][f] ? a[u][f] = Hr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1390
1394
|
else
|
|
1391
1395
|
a[u] = l[u];
|
|
1392
1396
|
else
|
|
1393
1397
|
i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = v({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? v({}, l[u]) : l[u] : a[u] = l[u];
|
|
1394
1398
|
return a;
|
|
1395
1399
|
}, e);
|
|
1396
|
-
},
|
|
1400
|
+
}, Hr = (t, e) => function() {
|
|
1397
1401
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1398
1402
|
}, Rt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], et = ["effect", "deep", "renderSlots"];
|
|
1399
1403
|
function Dt() {
|
|
@@ -1405,7 +1409,7 @@ function jt(t, e, r) {
|
|
|
1405
1409
|
function tt(t, e) {
|
|
1406
1410
|
console.error(jt("err", t));
|
|
1407
1411
|
}
|
|
1408
|
-
function
|
|
1412
|
+
function Gr(t) {
|
|
1409
1413
|
tt(t.toString()), console.error(t);
|
|
1410
1414
|
}
|
|
1411
1415
|
function At(t) {
|
|
@@ -1473,9 +1477,9 @@ function Vt(t, e) {
|
|
|
1473
1477
|
return h.Undef(i) || !i.indexOf ? i : x(i, e);
|
|
1474
1478
|
});
|
|
1475
1479
|
}
|
|
1476
|
-
let
|
|
1480
|
+
let Jr = 0;
|
|
1477
1481
|
function Ie() {
|
|
1478
|
-
const t = 370 + ++
|
|
1482
|
+
const t = 370 + ++Jr;
|
|
1479
1483
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1480
1484
|
}
|
|
1481
1485
|
function oe(t, e, r) {
|
|
@@ -1505,7 +1509,7 @@ function ht(t) {
|
|
|
1505
1509
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1506
1510
|
return e.type || (e.type = "input"), e;
|
|
1507
1511
|
}
|
|
1508
|
-
function
|
|
1512
|
+
function Kr(t, e) {
|
|
1509
1513
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1510
1514
|
e[r] && (t[r] = te(t[r] || {}, e[r]));
|
|
1511
1515
|
}), t) : e;
|
|
@@ -1524,7 +1528,7 @@ function O(t, e) {
|
|
|
1524
1528
|
try {
|
|
1525
1529
|
e = t();
|
|
1526
1530
|
} catch (r) {
|
|
1527
|
-
|
|
1531
|
+
Gr(r);
|
|
1528
1532
|
}
|
|
1529
1533
|
return e;
|
|
1530
1534
|
}
|
|
@@ -1536,7 +1540,7 @@ function Xe(t, e) {
|
|
|
1536
1540
|
});
|
|
1537
1541
|
}), r;
|
|
1538
1542
|
}
|
|
1539
|
-
function
|
|
1543
|
+
function Wr(t, e) {
|
|
1540
1544
|
if (h.Object(t)) {
|
|
1541
1545
|
const r = {};
|
|
1542
1546
|
return Object.keys(t).forEach((i) => {
|
|
@@ -1561,7 +1565,7 @@ function Ee() {
|
|
|
1561
1565
|
const n = s();
|
|
1562
1566
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1563
1567
|
} else h.Undef(s) || i.push(s);
|
|
1564
|
-
}),
|
|
1568
|
+
}), Wr(i, r);
|
|
1565
1569
|
},
|
|
1566
1570
|
getSlots() {
|
|
1567
1571
|
let r = [];
|
|
@@ -1624,7 +1628,7 @@ function B(t, e) {
|
|
|
1624
1628
|
t != null && (t = t[r]);
|
|
1625
1629
|
}), t;
|
|
1626
1630
|
}
|
|
1627
|
-
function
|
|
1631
|
+
function zr(t) {
|
|
1628
1632
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1629
1633
|
let r;
|
|
1630
1634
|
const i = {};
|
|
@@ -1658,7 +1662,7 @@ const je = (t, e) => {
|
|
|
1658
1662
|
return je(t.$parent, e);
|
|
1659
1663
|
}
|
|
1660
1664
|
};
|
|
1661
|
-
function
|
|
1665
|
+
function xr(t, e, r) {
|
|
1662
1666
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1663
1667
|
return {
|
|
1664
1668
|
name: i,
|
|
@@ -1698,6 +1702,7 @@ function zr(t, e, r) {
|
|
|
1698
1702
|
index: [String, Number],
|
|
1699
1703
|
api: Object,
|
|
1700
1704
|
locale: [String, Object],
|
|
1705
|
+
t: Function,
|
|
1701
1706
|
name: String,
|
|
1702
1707
|
subForm: {
|
|
1703
1708
|
type: Boolean,
|
|
@@ -1718,27 +1723,27 @@ function zr(t, e, r) {
|
|
|
1718
1723
|
a = a.parent;
|
|
1719
1724
|
else
|
|
1720
1725
|
a = n;
|
|
1721
|
-
const { rule: l, value: u, subForm: f, inFor:
|
|
1726
|
+
const { rule: l, value: u, subForm: f, inFor: p } = ut(s), d = ne({
|
|
1722
1727
|
ctxInject: {},
|
|
1723
1728
|
destroyed: !1,
|
|
1724
1729
|
isShow: !0,
|
|
1725
1730
|
unique: 1,
|
|
1726
1731
|
renderRule: [...l.value || []],
|
|
1727
1732
|
updateValue: JSON.stringify(u.value || {})
|
|
1728
|
-
}),
|
|
1733
|
+
}), m = new t(n), y = m.api(), w = p.value, F = () => {
|
|
1729
1734
|
if (o) {
|
|
1730
1735
|
const E = je(n, o);
|
|
1731
1736
|
if (E) {
|
|
1732
|
-
let
|
|
1733
|
-
w ? (
|
|
1737
|
+
let D;
|
|
1738
|
+
w ? (D = H(E.getSubForm()), D.push(y)) : D = y, E.subForm(D);
|
|
1734
1739
|
}
|
|
1735
1740
|
}
|
|
1736
1741
|
}, G = () => {
|
|
1737
1742
|
const E = je(n, o);
|
|
1738
1743
|
if (E)
|
|
1739
1744
|
if (w) {
|
|
1740
|
-
const
|
|
1741
|
-
M > -1 &&
|
|
1745
|
+
const D = H(E.getSubForm()), M = D.indexOf(y);
|
|
1746
|
+
M > -1 && D.splice(M, 1);
|
|
1742
1747
|
} else
|
|
1743
1748
|
E.subForm();
|
|
1744
1749
|
};
|
|
@@ -1746,64 +1751,64 @@ function zr(t, e, r) {
|
|
|
1746
1751
|
cr(() => {
|
|
1747
1752
|
L(() => {
|
|
1748
1753
|
let E = "";
|
|
1749
|
-
const
|
|
1750
|
-
Object.keys(
|
|
1754
|
+
const D = s.option && s.option.globalClass || {};
|
|
1755
|
+
Object.keys(D).forEach((M) => {
|
|
1751
1756
|
let me = "";
|
|
1752
|
-
|
|
1753
|
-
me += ve(W) + ":" +
|
|
1754
|
-
}),
|
|
1757
|
+
D[M].style && Object.keys(D[M].style).forEach((W) => {
|
|
1758
|
+
me += ve(W) + ":" + D[M].style[W] + ";";
|
|
1759
|
+
}), D[M].content && (me += D[M].content + ";"), me && (E += `.${M}{${me}}`);
|
|
1755
1760
|
}), s.option && s.option.style && (E += s.option.style), V || (V = document.createElement("style"), V.type = "text/css", document.head.appendChild(V)), V.innerHTML = E || "";
|
|
1756
1761
|
}, () => {
|
|
1757
1762
|
});
|
|
1758
1763
|
});
|
|
1759
1764
|
const N = se(() => {
|
|
1760
|
-
|
|
1765
|
+
m.bus.$emit("$loadData.$topForm");
|
|
1761
1766
|
}, 100), de = se(function() {
|
|
1762
|
-
|
|
1767
|
+
m.bus.$emit("$loadData.$scopeForm");
|
|
1763
1768
|
}, 100), Pe = se(() => {
|
|
1764
|
-
|
|
1769
|
+
m.bus.$emit("$loadData.$form");
|
|
1765
1770
|
}, 100), pe = (E) => {
|
|
1766
|
-
|
|
1771
|
+
m.bus.$emit("change-$form." + E);
|
|
1767
1772
|
};
|
|
1768
1773
|
return hr(() => {
|
|
1769
|
-
o && (
|
|
1774
|
+
o && (y.top.bus.$on("$loadData.$form", N), y.top.bus.$on("change", pe)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", de), m.mounted();
|
|
1770
1775
|
}), dr(() => {
|
|
1771
|
-
o && (
|
|
1776
|
+
o && (y.top.bus.$off("$loadData.$form", N), y.top.bus.$off("change", pe)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", de), G(), d.destroyed = !0, m.unmount(), V && (V.parentNode || V.parentElement) && document.head.removeChild(V);
|
|
1772
1777
|
}), pr(() => {
|
|
1773
|
-
|
|
1778
|
+
m.updated();
|
|
1774
1779
|
}), L(f, (E) => {
|
|
1775
1780
|
E ? F() : G();
|
|
1776
1781
|
}, { immediate: !0 }), L(() => s.option, () => {
|
|
1777
|
-
|
|
1782
|
+
m.initOptions(), y.refresh();
|
|
1778
1783
|
}, { deep: !0 }), L(() => [...l.value], (E) => {
|
|
1779
|
-
|
|
1784
|
+
m.$handle.isBreakWatch() || E.length === d.renderRule.length && E.every((D) => d.renderRule.indexOf(D) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
|
|
1780
1785
|
}), L(() => [s.disabled, s.preview], () => {
|
|
1781
|
-
|
|
1786
|
+
y.refresh();
|
|
1782
1787
|
}), L(u, (E) => {
|
|
1783
|
-
Ce(E || {}) !==
|
|
1788
|
+
Ce(E || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(E || {}) : y.setValue(E || {}));
|
|
1784
1789
|
}, { deep: !0, flush: "post" }), L(() => s.index, () => {
|
|
1785
|
-
|
|
1790
|
+
y.coverValue({}), m.$handle.updateAppendData(), P(() => {
|
|
1786
1791
|
P(() => {
|
|
1787
|
-
|
|
1792
|
+
y.clearValidateState();
|
|
1788
1793
|
});
|
|
1789
1794
|
});
|
|
1790
1795
|
}, { flush: "sync" }), q(v({
|
|
1791
|
-
fc: ye(
|
|
1796
|
+
fc: ye(m),
|
|
1792
1797
|
parent: o && ye(o),
|
|
1793
1798
|
top: ye(a),
|
|
1794
|
-
fapi: ye(
|
|
1795
|
-
}, ut(
|
|
1799
|
+
fapi: ye(y)
|
|
1800
|
+
}, ut(d)), {
|
|
1796
1801
|
getGroupInject: () => je(n, o),
|
|
1797
1802
|
refresh() {
|
|
1798
|
-
++
|
|
1803
|
+
++d.unique;
|
|
1799
1804
|
},
|
|
1800
1805
|
renderRule() {
|
|
1801
|
-
|
|
1806
|
+
d.renderRule = [...l.value || []];
|
|
1802
1807
|
},
|
|
1803
1808
|
updateValue(E) {
|
|
1804
|
-
if (
|
|
1805
|
-
const
|
|
1806
|
-
|
|
1809
|
+
if (d.destroyed) return;
|
|
1810
|
+
const D = Ce(E);
|
|
1811
|
+
d.updateValue !== D && (d.updateValue = D, n.$emit("update:value", E), P(() => {
|
|
1807
1812
|
Pe(), o ? f.value || de() : (N(), de());
|
|
1808
1813
|
}));
|
|
1809
1814
|
}
|
|
@@ -1856,7 +1861,7 @@ function Nt(t) {
|
|
|
1856
1861
|
}
|
|
1857
1862
|
Nt(Dt());
|
|
1858
1863
|
const Mt = T("");
|
|
1859
|
-
function
|
|
1864
|
+
function Xr(t, e, r) {
|
|
1860
1865
|
let i = Mt("", e);
|
|
1861
1866
|
return i._data.type = t, i._data.title = r, i;
|
|
1862
1867
|
}
|
|
@@ -1864,15 +1869,15 @@ function mt(t, e, r, i) {
|
|
|
1864
1869
|
let s = Mt("", r);
|
|
1865
1870
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1866
1871
|
}
|
|
1867
|
-
function
|
|
1872
|
+
function Zr() {
|
|
1868
1873
|
return {
|
|
1869
|
-
create:
|
|
1874
|
+
create: Xr,
|
|
1870
1875
|
createTmp: mt,
|
|
1871
1876
|
template: mt,
|
|
1872
1877
|
factory: T
|
|
1873
1878
|
};
|
|
1874
1879
|
}
|
|
1875
|
-
function
|
|
1880
|
+
function Qr(t, e, r) {
|
|
1876
1881
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1877
1882
|
return s.status = r.status, s.url = t, s;
|
|
1878
1883
|
}
|
|
@@ -1901,7 +1906,7 @@ function qt(t) {
|
|
|
1901
1906
|
t.onError(o);
|
|
1902
1907
|
}, e.onload = function() {
|
|
1903
1908
|
if (e.status < 200 || e.status >= 300)
|
|
1904
|
-
return t.onError(
|
|
1909
|
+
return t.onError(Qr(r, t, e), gt(e));
|
|
1905
1910
|
t.onSuccess(gt(e));
|
|
1906
1911
|
}, e.open(t.method || "get", r, !0);
|
|
1907
1912
|
let i;
|
|
@@ -1930,7 +1935,7 @@ function yt(t, e, r) {
|
|
|
1930
1935
|
function _e(t) {
|
|
1931
1936
|
return K(t);
|
|
1932
1937
|
}
|
|
1933
|
-
function
|
|
1938
|
+
function Yr(t) {
|
|
1934
1939
|
function e(n) {
|
|
1935
1940
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1936
1941
|
}
|
|
@@ -2021,7 +2026,7 @@ function Qr(t) {
|
|
|
2021
2026
|
},
|
|
2022
2027
|
getValue(n) {
|
|
2023
2028
|
const o = t.getFieldCtx(n);
|
|
2024
|
-
return o ? _e(o.rule.value) : t.options.appendValue !== !1 &&
|
|
2029
|
+
return o ? _e(o.rule.value) : t.options.appendValue !== !1 && j(t.appendData, n) ? _e(t.appendData[n]) : void 0;
|
|
2025
2030
|
},
|
|
2026
2031
|
coverValue(n) {
|
|
2027
2032
|
const o = v({}, n || {});
|
|
@@ -2029,7 +2034,7 @@ function Qr(t) {
|
|
|
2029
2034
|
t.appendData = {}, s.fields().forEach((a) => {
|
|
2030
2035
|
const l = t.fieldCtx[a];
|
|
2031
2036
|
if (l) {
|
|
2032
|
-
const u =
|
|
2037
|
+
const u = j(n, a);
|
|
2033
2038
|
l.forEach((f) => {
|
|
2034
2039
|
k(f.rule, "value", u ? n[a] : void 0);
|
|
2035
2040
|
}), delete o[a];
|
|
@@ -2211,7 +2216,7 @@ function Qr(t) {
|
|
|
2211
2216
|
},
|
|
2212
2217
|
setEffect(n, o, a) {
|
|
2213
2218
|
const l = t.getCtx(n);
|
|
2214
|
-
l && o && (o[0] === "$" && (o = o.substr(1)),
|
|
2219
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), j(l.rule, "$" + o) && k(l.rule, "$" + o, a), j(l.rule, "effect") || k(l.rule, "effect", {}), k(l.rule.effect, o, a));
|
|
2215
2220
|
},
|
|
2216
2221
|
clearEffectData(n, o) {
|
|
2217
2222
|
const a = t.getCtx(n);
|
|
@@ -2274,9 +2279,9 @@ function Qr(t) {
|
|
|
2274
2279
|
if (!l)
|
|
2275
2280
|
return [];
|
|
2276
2281
|
const u = [];
|
|
2277
|
-
return ((
|
|
2278
|
-
|
|
2279
|
-
typeof
|
|
2282
|
+
return ((p) => {
|
|
2283
|
+
p && p.forEach((d) => {
|
|
2284
|
+
typeof d == "object" && (d.field && u.push(d), u.push(...s.getChildrenRuleList(d)));
|
|
2280
2285
|
});
|
|
2281
2286
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2282
2287
|
},
|
|
@@ -2298,7 +2303,7 @@ function Qr(t) {
|
|
|
2298
2303
|
const l = s.getChildrenRuleList(n);
|
|
2299
2304
|
t.deferSyncValue(() => {
|
|
2300
2305
|
l.forEach((u) => {
|
|
2301
|
-
|
|
2306
|
+
j(o, u.field) ? k(u, "value", o[u.field]) : a && k(u, "value", void 0);
|
|
2302
2307
|
});
|
|
2303
2308
|
});
|
|
2304
2309
|
},
|
|
@@ -2348,12 +2353,12 @@ function Qr(t) {
|
|
|
2348
2353
|
},
|
|
2349
2354
|
watchFetch(n, o, a, l) {
|
|
2350
2355
|
return t.fc.watchLoadData((u, f) => {
|
|
2351
|
-
let
|
|
2352
|
-
|
|
2353
|
-
O(() =>
|
|
2354
|
-
}).catch((
|
|
2355
|
-
O(() =>
|
|
2356
|
-
})).catch((
|
|
2356
|
+
let p = K(n);
|
|
2357
|
+
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((d) => {
|
|
2358
|
+
O(() => p.onSuccess && p.onSuccess(d)), o && o(d, f);
|
|
2359
|
+
}).catch((d) => {
|
|
2360
|
+
O(() => p.onError && p.onError(d)), a && a(d);
|
|
2361
|
+
})).catch((d) => {
|
|
2357
2362
|
});
|
|
2358
2363
|
}, n.wait == null ? 1e3 : n.wait);
|
|
2359
2364
|
},
|
|
@@ -2383,7 +2388,7 @@ function Qr(t) {
|
|
|
2383
2388
|
};
|
|
2384
2389
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2385
2390
|
}
|
|
2386
|
-
function
|
|
2391
|
+
function ei(t) {
|
|
2387
2392
|
_(t.prototype, {
|
|
2388
2393
|
initCache() {
|
|
2389
2394
|
this.clearCacheAll();
|
|
@@ -2424,7 +2429,7 @@ function J(t) {
|
|
|
2424
2429
|
function Ut(t) {
|
|
2425
2430
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2426
2431
|
}
|
|
2427
|
-
function
|
|
2432
|
+
function ti(t) {
|
|
2428
2433
|
_(t.prototype, {
|
|
2429
2434
|
initRender() {
|
|
2430
2435
|
this.cacheConfig = {};
|
|
@@ -2505,21 +2510,21 @@ function ei(t) {
|
|
|
2505
2510
|
};
|
|
2506
2511
|
l.length && i.slotUpdate && O(() => i.slotUpdate(u));
|
|
2507
2512
|
let f = [];
|
|
2508
|
-
const
|
|
2509
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(
|
|
2513
|
+
const p = e.loadChildrenPending();
|
|
2514
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach((y) => {
|
|
2510
2515
|
f.push(this.renderRule({
|
|
2511
2516
|
type: "template",
|
|
2512
|
-
slot:
|
|
2517
|
+
slot: y
|
|
2513
2518
|
}, (() => {
|
|
2514
|
-
if (h.Function(n.renderSlots[
|
|
2515
|
-
return O(() => n.renderSlots[
|
|
2516
|
-
const w = this.parseSide(n.renderSlots[
|
|
2519
|
+
if (h.Function(n.renderSlots[y]))
|
|
2520
|
+
return O(() => n.renderSlots[y]());
|
|
2521
|
+
const w = this.parseSide(n.renderSlots[y], e);
|
|
2517
2522
|
return this.renderRule(w);
|
|
2518
2523
|
})()));
|
|
2519
2524
|
});
|
|
2520
|
-
const
|
|
2521
|
-
let
|
|
2522
|
-
return
|
|
2525
|
+
const d = this.getTypeSlot(e);
|
|
2526
|
+
let m;
|
|
2527
|
+
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;
|
|
2523
2528
|
}, this.setCache(e, s, r);
|
|
2524
2529
|
}
|
|
2525
2530
|
return (...s) => {
|
|
@@ -2706,7 +2711,7 @@ function ei(t) {
|
|
|
2706
2711
|
}
|
|
2707
2712
|
});
|
|
2708
2713
|
}
|
|
2709
|
-
let
|
|
2714
|
+
let ri = 1;
|
|
2710
2715
|
function it(t) {
|
|
2711
2716
|
_(this, {
|
|
2712
2717
|
$handle: t,
|
|
@@ -2716,7 +2721,7 @@ function it(t) {
|
|
|
2716
2721
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2717
2722
|
force: !1,
|
|
2718
2723
|
tmpInput: null,
|
|
2719
|
-
id:
|
|
2724
|
+
id: ri++
|
|
2720
2725
|
}), Tt(this, {
|
|
2721
2726
|
options() {
|
|
2722
2727
|
return t.options;
|
|
@@ -2726,9 +2731,9 @@ function it(t) {
|
|
|
2726
2731
|
}
|
|
2727
2732
|
}), this.initCache(), this.initRender();
|
|
2728
2733
|
}
|
|
2729
|
-
Yr(it);
|
|
2730
2734
|
ei(it);
|
|
2731
|
-
|
|
2735
|
+
ti(it);
|
|
2736
|
+
function ii(t) {
|
|
2732
2737
|
_(t.prototype, {
|
|
2733
2738
|
parseInjectEvent(e, r) {
|
|
2734
2739
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2755,17 +2760,17 @@ function ri(t) {
|
|
|
2755
2760
|
let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
|
|
2756
2761
|
return h.trueArray(u) && u.forEach((f) => {
|
|
2757
2762
|
if (!f) return;
|
|
2758
|
-
let
|
|
2759
|
-
if (h.Object(f) && (
|
|
2760
|
-
r || (
|
|
2761
|
-
const
|
|
2762
|
-
this.vm.$emit(
|
|
2763
|
+
let p, d = n || o || a;
|
|
2764
|
+
if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
|
|
2765
|
+
r || (d = `native-${d}`);
|
|
2766
|
+
const m = ve(`${d}-${f}`), y = (...w) => {
|
|
2767
|
+
this.vm.$emit(m, ...w), this.vm.$emit("emit-event", m, ...w), this.bus.$emit(m, ...w);
|
|
2763
2768
|
};
|
|
2764
|
-
if (
|
|
2765
|
-
i[f] =
|
|
2769
|
+
if (y.__emit = !0, !p && l === !1)
|
|
2770
|
+
i[f] = y;
|
|
2766
2771
|
else {
|
|
2767
|
-
let w =
|
|
2768
|
-
i[f] = h.Undef(w) ?
|
|
2772
|
+
let w = p || l || this.options.injectEvent;
|
|
2773
|
+
i[f] = h.Undef(w) ? y : this.inject(s, y, w);
|
|
2769
2774
|
}
|
|
2770
2775
|
}
|
|
2771
2776
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2795,33 +2800,33 @@ function ri(t) {
|
|
|
2795
2800
|
},
|
|
2796
2801
|
loadStrVar(e, r, i) {
|
|
2797
2802
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2798
|
-
const s = e, n =
|
|
2799
|
-
let f = !1,
|
|
2803
|
+
const s = e, n = zr(e), o = (u) => {
|
|
2804
|
+
let f = !1, p;
|
|
2800
2805
|
if (i && u.indexOf("$form.") === 0) {
|
|
2801
|
-
const
|
|
2802
|
-
|
|
2803
|
-
id: "$form." +
|
|
2804
|
-
getValue: () => B(i.value,
|
|
2805
|
-
}) : B(i.value,
|
|
2806
|
+
const d = u.split(".");
|
|
2807
|
+
d.shift(), j(i.value, d[0]) && (f = !0, p = r ? r({
|
|
2808
|
+
id: "$form." + d[0] + "_" + i.rule.__fc__.id,
|
|
2809
|
+
getValue: () => B(i.value, d)
|
|
2810
|
+
}) : B(i.value, d));
|
|
2806
2811
|
}
|
|
2807
|
-
return f || (
|
|
2812
|
+
return f || (p = r ? r(u) : this.fc.getLoadData(u)), p;
|
|
2808
2813
|
}, a = (u) => {
|
|
2809
2814
|
const f = [];
|
|
2810
|
-
u.forEach((
|
|
2811
|
-
|
|
2815
|
+
u.forEach((d) => {
|
|
2816
|
+
d.key ? f.push(d.key) : d.children && f.push(a(d.children));
|
|
2812
2817
|
});
|
|
2813
|
-
let
|
|
2814
|
-
return f.forEach((
|
|
2815
|
-
|
|
2816
|
-
}), f.length === 1 && (
|
|
2818
|
+
let p = !1;
|
|
2819
|
+
return f.forEach((d, m) => {
|
|
2820
|
+
d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[m] = d.slice(1, -1), p = !0);
|
|
2821
|
+
}), f.length === 1 && (p || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
|
|
2817
2822
|
};
|
|
2818
2823
|
let l;
|
|
2819
2824
|
if (n.forEach((u) => {
|
|
2820
|
-
const f = u.split("||"),
|
|
2821
|
-
if (
|
|
2822
|
-
const
|
|
2823
|
-
let
|
|
2824
|
-
(
|
|
2825
|
+
const f = u.split("||"), p = f[0].trim();
|
|
2826
|
+
if (p) {
|
|
2827
|
+
const d = (f[1] || "").trim(), m = Bt(p);
|
|
2828
|
+
let y = O(() => a(m));
|
|
2829
|
+
(y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2825
2830
|
}
|
|
2826
2831
|
}), n.length === 1 && s === `{{${n[0]}}}`)
|
|
2827
2832
|
return l;
|
|
@@ -2844,12 +2849,12 @@ function ri(t) {
|
|
|
2844
2849
|
});
|
|
2845
2850
|
}
|
|
2846
2851
|
const $t = ["hook:updated", "hook:mounted"];
|
|
2847
|
-
function
|
|
2852
|
+
function ni(t) {
|
|
2848
2853
|
_(t.prototype, {
|
|
2849
2854
|
usePage() {
|
|
2850
2855
|
const e = this.options.page;
|
|
2851
2856
|
if (!e) return;
|
|
2852
|
-
let r = 25, i =
|
|
2857
|
+
let r = 25, i = si(this.rules);
|
|
2853
2858
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), _(this, {
|
|
2854
2859
|
first: r,
|
|
2855
2860
|
limit: i,
|
|
@@ -2864,10 +2869,10 @@ function ii(t) {
|
|
|
2864
2869
|
}
|
|
2865
2870
|
});
|
|
2866
2871
|
}
|
|
2867
|
-
function
|
|
2872
|
+
function si(t) {
|
|
2868
2873
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2869
2874
|
}
|
|
2870
|
-
function
|
|
2875
|
+
function oi(t) {
|
|
2871
2876
|
_(t.prototype, {
|
|
2872
2877
|
clearNextTick() {
|
|
2873
2878
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2882,7 +2887,7 @@ function si(t) {
|
|
|
2882
2887
|
}
|
|
2883
2888
|
});
|
|
2884
2889
|
}
|
|
2885
|
-
function
|
|
2890
|
+
function ai(t) {
|
|
2886
2891
|
Object.defineProperties(t.origin, {
|
|
2887
2892
|
__fc__: xe(ye(t), !0)
|
|
2888
2893
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
@@ -2917,7 +2922,7 @@ function Ht(t, e, r) {
|
|
|
2917
2922
|
exportEl: void 0,
|
|
2918
2923
|
defaultValue: s ? K(r) : void 0,
|
|
2919
2924
|
field: e.field || void 0
|
|
2920
|
-
}), this.updateKey(),
|
|
2925
|
+
}), this.updateKey(), ai(this), this.update(t, !0);
|
|
2921
2926
|
}
|
|
2922
2927
|
_(Ht.prototype, {
|
|
2923
2928
|
getParentGroup() {
|
|
@@ -2956,8 +2961,8 @@ _(Ht.prototype, {
|
|
|
2956
2961
|
rule: this.rule,
|
|
2957
2962
|
api: this.$api,
|
|
2958
2963
|
update: (u) => {
|
|
2959
|
-
const f = u || i,
|
|
2960
|
-
this.setPending(e, r, f), o && o(f,
|
|
2964
|
+
const f = u || i, p = this.getPending(e, i);
|
|
2965
|
+
this.setPending(e, r, f), o && o(f, p);
|
|
2961
2966
|
},
|
|
2962
2967
|
reload: () => {
|
|
2963
2968
|
const u = this.getPending(e, i);
|
|
@@ -3069,7 +3074,7 @@ _(Ht.prototype, {
|
|
|
3069
3074
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3070
3075
|
}
|
|
3071
3076
|
});
|
|
3072
|
-
function
|
|
3077
|
+
function li(t) {
|
|
3073
3078
|
_(t.prototype, {
|
|
3074
3079
|
nextRefresh(e) {
|
|
3075
3080
|
const r = this.loadedId;
|
|
@@ -3081,7 +3086,7 @@ function ai(t) {
|
|
|
3081
3086
|
const r = ht(e);
|
|
3082
3087
|
return Object.defineProperties(r, {
|
|
3083
3088
|
__origin__: xe(e, !0)
|
|
3084
|
-
}),
|
|
3089
|
+
}), ui(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3085
3090
|
i && this.loadFn(i, r);
|
|
3086
3091
|
}), this.loadCtrl(r), r.update && (r.update = x(r.update)), r;
|
|
3087
3092
|
},
|
|
@@ -3131,27 +3136,27 @@ function ai(t) {
|
|
|
3131
3136
|
let l = ht(o);
|
|
3132
3137
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3133
3138
|
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);
|
|
3134
|
-
let f,
|
|
3135
|
-
if (
|
|
3136
|
-
if (f = o.__fc__,
|
|
3139
|
+
let f, p = !1, d = !!o.__fc__, m = l.value;
|
|
3140
|
+
if (d) {
|
|
3141
|
+
if (f = o.__fc__, m = f.defaultValue, f.deleted) {
|
|
3137
3142
|
if (bt(f))
|
|
3138
3143
|
return;
|
|
3139
3144
|
f.update(this);
|
|
3140
3145
|
} else if (!f.check(this)) {
|
|
3141
3146
|
if (bt(f))
|
|
3142
3147
|
return;
|
|
3143
|
-
e[a] = o = o._clone ? o._clone() : Vt(Ce(o)), f = null,
|
|
3148
|
+
e[a] = o = o._clone ? o._clone() : Vt(Ce(o)), f = null, p = !0;
|
|
3144
3149
|
}
|
|
3145
3150
|
}
|
|
3146
3151
|
if (f)
|
|
3147
3152
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3148
3153
|
else {
|
|
3149
3154
|
const F = this.parseRule(o);
|
|
3150
|
-
f = new Ht(this, F,
|
|
3155
|
+
f = new Ht(this, F, m), this.bindParser(f);
|
|
3151
3156
|
}
|
|
3152
|
-
[!1, !0].forEach((F) => this.parseEmit(f, F)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !
|
|
3153
|
-
const
|
|
3154
|
-
if (f.parser.loadChildren === !1 || s(
|
|
3157
|
+
[!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");
|
|
3158
|
+
const y = f.loadChildrenPending();
|
|
3159
|
+
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3155
3160
|
const F = i(a);
|
|
3156
3161
|
F > -1 || !a ? this.sort.splice(F + 1, 0, f.id) : this.sort.push(f.id);
|
|
3157
3162
|
}
|
|
@@ -3166,16 +3171,16 @@ function ai(t) {
|
|
|
3166
3171
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3167
3172
|
},
|
|
3168
3173
|
useCtrl(e) {
|
|
3169
|
-
const r =
|
|
3174
|
+
const r = fi(e), i = [], s = this.api;
|
|
3170
3175
|
if (!r.length) return !1;
|
|
3171
3176
|
for (let a = 0; a < r.length; a++) {
|
|
3172
|
-
const l = r[a], u = l.handle || function(
|
|
3173
|
-
return (ce[l.condition || "=="] || ce["=="])(
|
|
3177
|
+
const l = r[a], u = l.handle || function(p) {
|
|
3178
|
+
return (ce[l.condition || "=="] || ce["=="])(p, l.value);
|
|
3174
3179
|
};
|
|
3175
3180
|
if (!h.trueArray(l.rule)) continue;
|
|
3176
3181
|
const f = q(v({}, l), {
|
|
3177
3182
|
valid: O(() => u(e.rule.value, s)),
|
|
3178
|
-
ctrl:
|
|
3183
|
+
ctrl: ci(e, l.rule),
|
|
3179
3184
|
isHidden: h.String(l.rule[0])
|
|
3180
3185
|
});
|
|
3181
3186
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3184,16 +3189,16 @@ function ai(t) {
|
|
|
3184
3189
|
const n = [];
|
|
3185
3190
|
let o = !1;
|
|
3186
3191
|
return this.deferSyncValue(() => {
|
|
3187
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append:
|
|
3192
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl: m, method: y }) => {
|
|
3188
3193
|
if (a) {
|
|
3189
3194
|
l ? e.ctrlRule.push({
|
|
3190
3195
|
__ctrl: !0,
|
|
3191
3196
|
children: u,
|
|
3192
3197
|
valid: l
|
|
3193
|
-
}) :
|
|
3194
|
-
|
|
3198
|
+
}) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3199
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((w) => {
|
|
3195
3200
|
this.api.setEffect(w, "required", l);
|
|
3196
|
-
}), l || this.api.clearValidateState(u)) :
|
|
3201
|
+
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3197
3202
|
});
|
|
3198
3203
|
return;
|
|
3199
3204
|
}
|
|
@@ -3206,11 +3211,11 @@ function ai(t) {
|
|
|
3206
3211
|
children: u
|
|
3207
3212
|
};
|
|
3208
3213
|
e.ctrlRule.push(w), this.bus.$once("load-start", () => {
|
|
3209
|
-
f ? s.prepend(w, f,
|
|
3214
|
+
f ? s.prepend(w, f, d) : p || d ? s.append(w, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
|
|
3210
3215
|
});
|
|
3211
3216
|
} else {
|
|
3212
|
-
e.ctrlRule.splice(e.ctrlRule.indexOf(
|
|
3213
|
-
const w = Y(
|
|
3217
|
+
e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
|
|
3218
|
+
const w = Y(m);
|
|
3214
3219
|
w && w.rm();
|
|
3215
3220
|
}
|
|
3216
3221
|
});
|
|
@@ -3238,17 +3243,17 @@ function ai(t) {
|
|
|
3238
3243
|
}
|
|
3239
3244
|
});
|
|
3240
3245
|
}
|
|
3241
|
-
function
|
|
3246
|
+
function ui(t) {
|
|
3242
3247
|
const e = Lt();
|
|
3243
3248
|
return Object.keys(e).forEach((r) => {
|
|
3244
|
-
|
|
3249
|
+
j(t, r) || k(t, r, e[r]);
|
|
3245
3250
|
}), t;
|
|
3246
3251
|
}
|
|
3247
|
-
function
|
|
3252
|
+
function fi(t) {
|
|
3248
3253
|
const e = t.rule.control || [];
|
|
3249
3254
|
return h.Object(e) ? [e] : e;
|
|
3250
3255
|
}
|
|
3251
|
-
function
|
|
3256
|
+
function ci(t, e) {
|
|
3252
3257
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3253
3258
|
const i = t.ctrlRule[r];
|
|
3254
3259
|
if (i.children === e)
|
|
@@ -3258,7 +3263,7 @@ function fi(t, e) {
|
|
|
3258
3263
|
function bt(t) {
|
|
3259
3264
|
return !!t.rule.__ctrl;
|
|
3260
3265
|
}
|
|
3261
|
-
function
|
|
3266
|
+
function hi(t) {
|
|
3262
3267
|
_(t.prototype, {
|
|
3263
3268
|
setValue(e, r, i, s) {
|
|
3264
3269
|
e.deleted || (e.rule.value = r, this.changeStatus = !0, this.nextRefresh(), this.$render.clearCache(e), this.setFormData(e, i), this.syncValue(), this.valueChange(e, r), this.vm.$emit("change", e.field, r, e.origin, this.api, s || !1), this.effect(e, "value"), this.targetHook(e, "value", { value: r }), this.emitEvent("change", e.field, r, {
|
|
@@ -3281,7 +3286,7 @@ function ci(t) {
|
|
|
3281
3286
|
this.deferSyncValue(() => {
|
|
3282
3287
|
const i = e.getParentGroup(), s = i ? this.subRuleData[i.id] : null, n = {};
|
|
3283
3288
|
Object.keys(r || {}).forEach((o) => {
|
|
3284
|
-
s &&
|
|
3289
|
+
s && j(s, o) ? n[o] = r[o] : j(this.api.form, o) ? this.api.form[o] = r[o] : this.api.top !== this.api && j(this.api.top.form, o) && (this.api.top.form[o] = r[o]);
|
|
3285
3290
|
}), Object.keys(n).length && this.api.setChildrenFormData(i.rule, n);
|
|
3286
3291
|
});
|
|
3287
3292
|
},
|
|
@@ -3311,7 +3316,7 @@ function ci(t) {
|
|
|
3311
3316
|
return e.rule.ignore === !0 || (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields) && e.hasHidden();
|
|
3312
3317
|
},
|
|
3313
3318
|
appendValue(e) {
|
|
3314
|
-
(!e.field || !
|
|
3319
|
+
(!e.field || !j(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3315
3320
|
},
|
|
3316
3321
|
addSubForm(e, r) {
|
|
3317
3322
|
this.subForm[e.id] = r;
|
|
@@ -3383,8 +3388,8 @@ const Ae = {
|
|
|
3383
3388
|
},
|
|
3384
3389
|
mergeProp(t) {
|
|
3385
3390
|
}
|
|
3386
|
-
},
|
|
3387
|
-
function
|
|
3391
|
+
}, di = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Re = Symbol("oldValue");
|
|
3392
|
+
function pi(t) {
|
|
3388
3393
|
_(t.prototype, {
|
|
3389
3394
|
getCtx(e) {
|
|
3390
3395
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3432,7 +3437,7 @@ function di(t) {
|
|
|
3432
3437
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3433
3438
|
},
|
|
3434
3439
|
watchCtx(e) {
|
|
3435
|
-
if (Dt().filter((i) => i[0] !== "_" && i[0] !== "$" &&
|
|
3440
|
+
if (Dt().filter((i) => i[0] !== "_" && i[0] !== "$" && di.indexOf(i) === -1).forEach((i) => {
|
|
3436
3441
|
const s = Ve(e.rule, i), n = i === "children";
|
|
3437
3442
|
e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3438
3443
|
let l = s.value;
|
|
@@ -3568,7 +3573,7 @@ function di(t) {
|
|
|
3568
3573
|
case "len":
|
|
3569
3574
|
case "maxLen":
|
|
3570
3575
|
case "minLen":
|
|
3571
|
-
const a = (
|
|
3576
|
+
const a = (y) => n === "len" ? y === o : n === "maxLen" ? y <= o : y >= o;
|
|
3572
3577
|
if (Array.isArray(r)) {
|
|
3573
3578
|
if (!a(r.length))
|
|
3574
3579
|
return n;
|
|
@@ -3610,7 +3615,7 @@ function di(t) {
|
|
|
3610
3615
|
return n;
|
|
3611
3616
|
break;
|
|
3612
3617
|
case "hasKeys":
|
|
3613
|
-
if (typeof r != "object" || Array.isArray(o) && o.some((
|
|
3618
|
+
if (typeof r != "object" || Array.isArray(o) && o.some((y) => !(y in r)))
|
|
3614
3619
|
return n;
|
|
3615
3620
|
break;
|
|
3616
3621
|
case "email":
|
|
@@ -3647,18 +3652,18 @@ function di(t) {
|
|
|
3647
3652
|
const l = a.mode === "OR";
|
|
3648
3653
|
let u = !0;
|
|
3649
3654
|
for (let f = 0; f < a.group.length; f++) {
|
|
3650
|
-
const
|
|
3651
|
-
let
|
|
3652
|
-
if (
|
|
3653
|
-
|
|
3654
|
-
else if (
|
|
3655
|
-
|
|
3656
|
-
else if (!
|
|
3655
|
+
const p = a.group[f];
|
|
3656
|
+
let d, m = null;
|
|
3657
|
+
if (p.variable)
|
|
3658
|
+
m = JSON.stringify(this.fc.getLoadData(p.variable) || "");
|
|
3659
|
+
else if (p.field)
|
|
3660
|
+
m = pt(p.field || "");
|
|
3661
|
+
else if (!p.mode)
|
|
3657
3662
|
return !0;
|
|
3658
|
-
let
|
|
3659
|
-
if (
|
|
3663
|
+
let y = p.compare;
|
|
3664
|
+
if (y && (y = pt(y || "")), p.mode ? d = n(p) : ce[p.condition] ? h.Function(p.handler) ? d = O(() => p.handler(this.api, e.rule)) : d = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${m}, ${y || "$val"}); }}}}`).call(this.api.form, ce, 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)
|
|
3660
3665
|
return !0;
|
|
3661
|
-
l || (u = u &&
|
|
3666
|
+
l || (u = u && d);
|
|
3662
3667
|
}
|
|
3663
3668
|
return l ? !1 : u;
|
|
3664
3669
|
};
|
|
@@ -3700,7 +3705,7 @@ function di(t) {
|
|
|
3700
3705
|
const { id: r, field: i, input: s, name: n } = e;
|
|
3701
3706
|
ie(this.ctxs, r), ie(this.formData, r), ie(this.subForm, r), ie(this.vm.ctxInject, r);
|
|
3702
3707
|
const o = e.getParentGroup();
|
|
3703
|
-
o && this.subRuleData[o.id] && ie(this.subRuleData[o.id], i), e.group && ie(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !
|
|
3708
|
+
o && this.subRuleData[o.id] && ie(this.subRuleData[o.id], i), e.group && ie(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !j(this.fieldCtx, i) && ie(this.form, i), this.deferSyncValue(() => {
|
|
3704
3709
|
if (!this.reloading) {
|
|
3705
3710
|
if (e.parser.loadChildren !== !1) {
|
|
3706
3711
|
const l = e.getPending("children", e.rule.children);
|
|
@@ -3714,7 +3719,7 @@ function di(t) {
|
|
|
3714
3719
|
}
|
|
3715
3720
|
});
|
|
3716
3721
|
}
|
|
3717
|
-
function
|
|
3722
|
+
function mi(t) {
|
|
3718
3723
|
_(t.prototype, {
|
|
3719
3724
|
mounted() {
|
|
3720
3725
|
const e = () => {
|
|
@@ -3734,21 +3739,35 @@ function pi(t) {
|
|
|
3734
3739
|
this.bus.$emit(e, ...r);
|
|
3735
3740
|
},
|
|
3736
3741
|
targetHook(e, r, i) {
|
|
3737
|
-
var
|
|
3738
|
-
let s = (
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
+
var l, u, f, p;
|
|
3743
|
+
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, m) => {
|
|
3744
|
+
d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
|
|
3745
|
+
O(() => y(q(v({}, i || {}), {
|
|
3746
|
+
self: e.rule,
|
|
3747
|
+
rule: e.rule,
|
|
3748
|
+
parent: m == null ? void 0 : m.rule,
|
|
3749
|
+
$f: this.api,
|
|
3750
|
+
api: this.api,
|
|
3751
|
+
option: this.vm.$props.option
|
|
3752
|
+
})));
|
|
3753
|
+
}));
|
|
3754
|
+
};
|
|
3755
|
+
n(s);
|
|
3756
|
+
let o = "deep" + Ur(r), a = e.parent;
|
|
3757
|
+
for (; a; ) {
|
|
3758
|
+
let d = (p = (f = a.prop) == null ? void 0 : f.hook) == null ? void 0 : p[o];
|
|
3759
|
+
n(d, a), a = a.parent;
|
|
3760
|
+
}
|
|
3742
3761
|
}
|
|
3743
3762
|
});
|
|
3744
3763
|
}
|
|
3745
|
-
function
|
|
3764
|
+
function gi(t) {
|
|
3746
3765
|
_(t.prototype, {
|
|
3747
3766
|
useProvider() {
|
|
3748
3767
|
const e = this.fc.providers;
|
|
3749
3768
|
Object.keys(e).forEach((r) => {
|
|
3750
3769
|
let i = e[r];
|
|
3751
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3770
|
+
h.Function(i) && (i = i(this.fc)), i._c = $i(i), this.onEffect(i), this.providers[r] = i;
|
|
3752
3771
|
});
|
|
3753
3772
|
},
|
|
3754
3773
|
onEffect(e) {
|
|
@@ -3764,7 +3783,7 @@ function mi(t) {
|
|
|
3764
3783
|
let r = {
|
|
3765
3784
|
required: () => {
|
|
3766
3785
|
var i, s;
|
|
3767
|
-
return (
|
|
3786
|
+
return (j(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
|
|
3768
3787
|
}
|
|
3769
3788
|
};
|
|
3770
3789
|
Object.keys(e.rule.effect || {}).forEach((i) => {
|
|
@@ -3794,9 +3813,9 @@ function mi(t) {
|
|
|
3794
3813
|
}, r);
|
|
3795
3814
|
},
|
|
3796
3815
|
getEffect(e, r) {
|
|
3797
|
-
if (
|
|
3816
|
+
if (j(e, "$" + r))
|
|
3798
3817
|
return e["$" + r];
|
|
3799
|
-
if (
|
|
3818
|
+
if (j(e, "effect") && j(e.effect, r))
|
|
3800
3819
|
return e.effect[r];
|
|
3801
3820
|
},
|
|
3802
3821
|
emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
|
|
@@ -3805,28 +3824,28 @@ function mi(t) {
|
|
|
3805
3824
|
Object.keys(l).forEach((u) => {
|
|
3806
3825
|
const f = this.providers[u];
|
|
3807
3826
|
if (!f || f.input && !i) return;
|
|
3808
|
-
let
|
|
3827
|
+
let p;
|
|
3809
3828
|
if (!f._c)
|
|
3810
|
-
|
|
3829
|
+
p = "*";
|
|
3811
3830
|
else if (f._used.indexOf(s) > -1)
|
|
3812
|
-
|
|
3831
|
+
p = s;
|
|
3813
3832
|
else
|
|
3814
3833
|
return;
|
|
3815
|
-
const
|
|
3816
|
-
e && (
|
|
3834
|
+
const d = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3835
|
+
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (m) => te(d.getProp(), [m]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
|
|
3817
3836
|
});
|
|
3818
3837
|
}
|
|
3819
3838
|
});
|
|
3820
3839
|
}
|
|
3821
|
-
function
|
|
3840
|
+
function yi(t) {
|
|
3822
3841
|
return t.filter(function(e, r, i) {
|
|
3823
3842
|
return i.indexOf(e, 0) === r;
|
|
3824
3843
|
});
|
|
3825
3844
|
}
|
|
3826
|
-
function
|
|
3845
|
+
function $i(t) {
|
|
3827
3846
|
const e = t.components;
|
|
3828
3847
|
if (Array.isArray(e)) {
|
|
3829
|
-
const r =
|
|
3848
|
+
const r = yi(e.filter((i) => i !== "*"));
|
|
3830
3849
|
return r.length ? r : !1;
|
|
3831
3850
|
} else return h.String(e) ? [e] : !1;
|
|
3832
3851
|
}
|
|
@@ -3868,7 +3887,7 @@ function X(t) {
|
|
|
3868
3887
|
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3869
3888
|
const i = O(() => r(e, this));
|
|
3870
3889
|
return i && i !== e && _(e, i), e;
|
|
3871
|
-
},
|
|
3890
|
+
}, Yr(this));
|
|
3872
3891
|
}
|
|
3873
3892
|
_(X.prototype, {
|
|
3874
3893
|
initData(t) {
|
|
@@ -3908,26 +3927,26 @@ _(X.prototype, {
|
|
|
3908
3927
|
});
|
|
3909
3928
|
}
|
|
3910
3929
|
});
|
|
3911
|
-
ri(X);
|
|
3912
3930
|
ii(X);
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3931
|
+
ni(X);
|
|
3932
|
+
oi(X);
|
|
3933
|
+
li(X);
|
|
3934
|
+
hi(X);
|
|
3917
3935
|
pi(X);
|
|
3918
3936
|
mi(X);
|
|
3919
|
-
|
|
3920
|
-
|
|
3937
|
+
gi(X);
|
|
3938
|
+
const bi = "fcFragment", Ne = {
|
|
3939
|
+
name: bi,
|
|
3921
3940
|
functional: !0,
|
|
3922
3941
|
props: ["vnode"],
|
|
3923
3942
|
render(t, e) {
|
|
3924
3943
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3925
3944
|
}
|
|
3926
3945
|
};
|
|
3927
|
-
function
|
|
3946
|
+
function vi(t) {
|
|
3928
3947
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3929
3948
|
}
|
|
3930
|
-
function
|
|
3949
|
+
function _i() {
|
|
3931
3950
|
const t = {};
|
|
3932
3951
|
function e(r) {
|
|
3933
3952
|
r && this.setVm(r);
|
|
@@ -3942,7 +3961,7 @@ function vi() {
|
|
|
3942
3961
|
},
|
|
3943
3962
|
makeComponent(r, i, s) {
|
|
3944
3963
|
var o;
|
|
3945
|
-
let n = this.$h(r,
|
|
3964
|
+
let n = this.$h(r, vi(i), s || []);
|
|
3946
3965
|
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3947
3966
|
const a = Object.keys(n.componentOptions.propsData);
|
|
3948
3967
|
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
@@ -3969,7 +3988,7 @@ function vi() {
|
|
|
3969
3988
|
}
|
|
3970
3989
|
}), e;
|
|
3971
3990
|
}
|
|
3972
|
-
function
|
|
3991
|
+
function Ci(t) {
|
|
3973
3992
|
class e extends Gt {
|
|
3974
3993
|
}
|
|
3975
3994
|
return Object.assign(e.prototype, t), e;
|
|
@@ -4033,7 +4052,7 @@ _(Gt.prototype, {
|
|
|
4033
4052
|
render(t) {
|
|
4034
4053
|
}
|
|
4035
4054
|
});
|
|
4036
|
-
const
|
|
4055
|
+
const wi = function(t) {
|
|
4037
4056
|
const e = {
|
|
4038
4057
|
name: "loadData",
|
|
4039
4058
|
_fn: [],
|
|
@@ -4043,14 +4062,14 @@ const Ci = function(t) {
|
|
|
4043
4062
|
const o = [];
|
|
4044
4063
|
n.forEach((a) => {
|
|
4045
4064
|
if (a && (a.attr || a.template)) {
|
|
4046
|
-
let l = (
|
|
4047
|
-
let
|
|
4048
|
-
i && i.__fc__ && (
|
|
4049
|
-
let
|
|
4050
|
-
a.template ?
|
|
4051
|
-
const
|
|
4052
|
-
a.to === "child" ?
|
|
4053
|
-
}, u = (
|
|
4065
|
+
let l = (p) => {
|
|
4066
|
+
let d;
|
|
4067
|
+
i && i.__fc__ && (d = i.__fc__.getParentGroup());
|
|
4068
|
+
let m;
|
|
4069
|
+
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));
|
|
4070
|
+
const y = a.modify ? i : r.getProp();
|
|
4071
|
+
a.to === "child" ? y.children ? k(y.children, 0, m) : k(y, "children", [m]) : oe(y, a.to || "options", m), s.sync(i);
|
|
4072
|
+
}, u = (p) => l(p);
|
|
4054
4073
|
const f = t.watchLoadData(u);
|
|
4055
4074
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
4056
4075
|
}
|
|
@@ -4064,7 +4083,7 @@ const Ci = function(t) {
|
|
|
4064
4083
|
}
|
|
4065
4084
|
};
|
|
4066
4085
|
return e.watch = e.loaded, e;
|
|
4067
|
-
},
|
|
4086
|
+
}, Oi = function(t) {
|
|
4068
4087
|
const e = {
|
|
4069
4088
|
name: "t",
|
|
4070
4089
|
_fn: [],
|
|
@@ -4076,13 +4095,13 @@ const Ci = function(t) {
|
|
|
4076
4095
|
const l = n[a];
|
|
4077
4096
|
if (l) {
|
|
4078
4097
|
const u = typeof l == "object";
|
|
4079
|
-
let f = (
|
|
4080
|
-
let
|
|
4098
|
+
let f = (m) => {
|
|
4099
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, m);
|
|
4081
4100
|
const w = u && l.modify ? i : r.getProp();
|
|
4082
|
-
a === "child" ? w.children ? k(w.children, 0,
|
|
4083
|
-
},
|
|
4084
|
-
const
|
|
4085
|
-
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(
|
|
4101
|
+
a === "child" ? w.children ? k(w.children, 0, y) : k(w, "children", [y]) : oe(w, a, y), s.sync(i);
|
|
4102
|
+
}, p = (m) => f(m);
|
|
4103
|
+
const d = t.watchLoadData(p);
|
|
4104
|
+
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
4086
4105
|
}
|
|
4087
4106
|
}), this._fn[r.id] = o;
|
|
4088
4107
|
},
|
|
@@ -4101,24 +4120,24 @@ const Ci = function(t) {
|
|
|
4101
4120
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
4102
4121
|
else {
|
|
4103
4122
|
h.Object(i) || (i = { method: i });
|
|
4104
|
-
const s = i.method
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
return r.exec(o.id, h.String(s) ? s : "formCreateValidate", ...n, {
|
|
4123
|
+
const s = i.method, n = q(v({}, i), {
|
|
4124
|
+
validator(...o) {
|
|
4125
|
+
const a = Y(e);
|
|
4126
|
+
if (a)
|
|
4127
|
+
return r.exec(a.id, h.String(s) ? s : "formCreateValidate", ...o, {
|
|
4110
4128
|
attr: t,
|
|
4111
4129
|
rule: e,
|
|
4112
4130
|
api: r
|
|
4113
4131
|
});
|
|
4114
4132
|
}
|
|
4115
|
-
})
|
|
4133
|
+
});
|
|
4134
|
+
delete n.method, t.getProp().validate = [n];
|
|
4116
4135
|
}
|
|
4117
4136
|
},
|
|
4118
4137
|
watch(...t) {
|
|
4119
4138
|
Jt.load(...t);
|
|
4120
4139
|
}
|
|
4121
|
-
},
|
|
4140
|
+
}, Fi = function(t) {
|
|
4122
4141
|
function e(s) {
|
|
4123
4142
|
return h.String(s) && (s = {
|
|
4124
4143
|
action: s,
|
|
@@ -4128,55 +4147,55 @@ const Ci = function(t) {
|
|
|
4128
4147
|
function r(s, n, o) {
|
|
4129
4148
|
let a = s.value;
|
|
4130
4149
|
i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
|
|
4131
|
-
const l = (
|
|
4132
|
-
|
|
4150
|
+
const l = (p) => {
|
|
4151
|
+
p === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", p), o.sync(n);
|
|
4133
4152
|
};
|
|
4134
4153
|
if (!a || !a.action && !a.key) {
|
|
4135
4154
|
l(void 0);
|
|
4136
4155
|
return;
|
|
4137
4156
|
}
|
|
4138
4157
|
if (a = K(a), a.to || (a.to = "options"), a.key) {
|
|
4139
|
-
const
|
|
4140
|
-
if (!
|
|
4158
|
+
const p = t.$handle.options.globalData[a.key];
|
|
4159
|
+
if (!p) {
|
|
4141
4160
|
l(void 0);
|
|
4142
4161
|
return;
|
|
4143
4162
|
}
|
|
4144
|
-
if (
|
|
4145
|
-
l(
|
|
4163
|
+
if (p.type === "static") {
|
|
4164
|
+
l(p.data);
|
|
4146
4165
|
return;
|
|
4147
4166
|
} else
|
|
4148
|
-
a = v(v({}, a),
|
|
4167
|
+
a = v(v({}, a), p);
|
|
4149
4168
|
}
|
|
4150
4169
|
const u = a.onError, f = () => {
|
|
4151
4170
|
if (!s.getValue())
|
|
4152
4171
|
return s.clearProp(), o.sync(n), !0;
|
|
4153
4172
|
};
|
|
4154
|
-
i._fn[s.id] = t.watchLoadData(se((
|
|
4155
|
-
if (
|
|
4173
|
+
i._fn[s.id] = t.watchLoadData(se((p, d) => {
|
|
4174
|
+
if (d && a.watch === !1)
|
|
4156
4175
|
return i._fn[s.id]();
|
|
4157
|
-
const
|
|
4176
|
+
const m = t.$handle.loadFetchVar(K(a), p, n), y = q(v({
|
|
4158
4177
|
headers: {}
|
|
4159
|
-
},
|
|
4178
|
+
}, m), {
|
|
4160
4179
|
onSuccess(w, F) {
|
|
4161
4180
|
if (f()) return;
|
|
4162
|
-
let G = (N) => F ? N :
|
|
4163
|
-
const V = x(
|
|
4181
|
+
let G = (N) => F ? N : j(N, "data") ? N.data : N;
|
|
4182
|
+
const V = x(m.parse);
|
|
4164
4183
|
h.Function(V) ? G = V : V && h.String(V) && (G = (N) => B(N, V)), l(G(w, n, o));
|
|
4165
4184
|
},
|
|
4166
4185
|
onError(w) {
|
|
4167
|
-
l(void 0), !f() && (u || ((F) => tt(F.message || "fetch fail " +
|
|
4186
|
+
l(void 0), !f() && (u || ((F) => tt(F.message || "fetch fail " + m.action)))(w, n, o);
|
|
4168
4187
|
}
|
|
4169
4188
|
});
|
|
4170
|
-
t.$handle.beforeFetch(
|
|
4171
|
-
if (h.Function(
|
|
4172
|
-
|
|
4173
|
-
|
|
4189
|
+
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4190
|
+
if (h.Function(m.action)) {
|
|
4191
|
+
m.action(n, o).then((w) => {
|
|
4192
|
+
y.onSuccess(w, !0);
|
|
4174
4193
|
}).catch((w) => {
|
|
4175
|
-
|
|
4194
|
+
y.onError(w);
|
|
4176
4195
|
});
|
|
4177
4196
|
return;
|
|
4178
4197
|
}
|
|
4179
|
-
O(() => t.create.fetch(
|
|
4198
|
+
O(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
|
|
4180
4199
|
}).catch((w) => {
|
|
4181
4200
|
});
|
|
4182
4201
|
}, a.wait || 600));
|
|
@@ -4195,13 +4214,13 @@ const Ci = function(t) {
|
|
|
4195
4214
|
}
|
|
4196
4215
|
};
|
|
4197
4216
|
return i;
|
|
4198
|
-
},
|
|
4199
|
-
fetch:
|
|
4200
|
-
loadData:
|
|
4201
|
-
t:
|
|
4217
|
+
}, ki = {
|
|
4218
|
+
fetch: Fi,
|
|
4219
|
+
loadData: wi,
|
|
4220
|
+
t: Oi,
|
|
4202
4221
|
componentValidate: Jt
|
|
4203
4222
|
};
|
|
4204
|
-
function
|
|
4223
|
+
function Ei(t) {
|
|
4205
4224
|
t = t || /* @__PURE__ */ new Map();
|
|
4206
4225
|
const e = {
|
|
4207
4226
|
$on(r, i) {
|
|
@@ -4225,8 +4244,8 @@ function ki(t) {
|
|
|
4225
4244
|
};
|
|
4226
4245
|
return e;
|
|
4227
4246
|
}
|
|
4228
|
-
const
|
|
4229
|
-
name:
|
|
4247
|
+
const Si = "html", Ri = {
|
|
4248
|
+
name: Si,
|
|
4230
4249
|
loadChildren: !1,
|
|
4231
4250
|
render(t, e) {
|
|
4232
4251
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4235,7 +4254,7 @@ const Ei = "html", Si = {
|
|
|
4235
4254
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4236
4255
|
}
|
|
4237
4256
|
};
|
|
4238
|
-
function
|
|
4257
|
+
function Di(t) {
|
|
4239
4258
|
t = t + "=";
|
|
4240
4259
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4241
4260
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4253,7 +4272,7 @@ function Ri(t) {
|
|
|
4253
4272
|
}
|
|
4254
4273
|
return null;
|
|
4255
4274
|
}
|
|
4256
|
-
function
|
|
4275
|
+
function ji(t) {
|
|
4257
4276
|
const e = localStorage.getItem(t);
|
|
4258
4277
|
if (e)
|
|
4259
4278
|
try {
|
|
@@ -4263,7 +4282,7 @@ function Di(t) {
|
|
|
4263
4282
|
}
|
|
4264
4283
|
return null;
|
|
4265
4284
|
}
|
|
4266
|
-
function
|
|
4285
|
+
function Ai(t) {
|
|
4267
4286
|
const e = sessionStorage.getItem(t);
|
|
4268
4287
|
if (e)
|
|
4269
4288
|
try {
|
|
@@ -4280,16 +4299,16 @@ function nt(t, e) {
|
|
|
4280
4299
|
let i = t(r.shift());
|
|
4281
4300
|
return r.length ? i == null ? null : B(i, r) : i;
|
|
4282
4301
|
}
|
|
4283
|
-
function Ai(t) {
|
|
4284
|
-
return nt(Ri, t);
|
|
4285
|
-
}
|
|
4286
4302
|
function Vi(t) {
|
|
4287
4303
|
return nt(Di, t);
|
|
4288
4304
|
}
|
|
4289
4305
|
function Ii(t) {
|
|
4290
4306
|
return nt(ji, t);
|
|
4291
4307
|
}
|
|
4292
|
-
|
|
4308
|
+
function Pi(t) {
|
|
4309
|
+
return nt(Ai, t);
|
|
4310
|
+
}
|
|
4311
|
+
const Ti = {
|
|
4293
4312
|
en: {
|
|
4294
4313
|
required: "{title} is required",
|
|
4295
4314
|
validate: {
|
|
@@ -4339,17 +4358,17 @@ const Pi = {
|
|
|
4339
4358
|
}
|
|
4340
4359
|
}
|
|
4341
4360
|
};
|
|
4342
|
-
function
|
|
4361
|
+
function Bi(t, e) {
|
|
4343
4362
|
let r;
|
|
4344
4363
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4345
4364
|
}
|
|
4346
4365
|
function Me() {
|
|
4347
|
-
return
|
|
4366
|
+
return Bi("name", ...arguments);
|
|
4348
4367
|
}
|
|
4349
|
-
function
|
|
4368
|
+
function Li(t) {
|
|
4350
4369
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4351
4370
|
}
|
|
4352
|
-
function
|
|
4371
|
+
function Ni(t, e) {
|
|
4353
4372
|
const r = new Vue({
|
|
4354
4373
|
data() {
|
|
4355
4374
|
return { rule: t, option: e || {} };
|
|
@@ -4360,29 +4379,29 @@ function Li(t, e) {
|
|
|
4360
4379
|
});
|
|
4361
4380
|
return r.$mount(), r;
|
|
4362
4381
|
}
|
|
4363
|
-
function
|
|
4382
|
+
function Mi(t) {
|
|
4364
4383
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4365
4384
|
Rt.push(...e), Ye.push(...r), et.push(...i), Nt([...e, ...r, ...i]);
|
|
4366
4385
|
}
|
|
4367
|
-
let
|
|
4386
|
+
let qi = 1;
|
|
4368
4387
|
const U = {}, De = Symbol("defValue");
|
|
4369
4388
|
function Kt(t) {
|
|
4370
4389
|
const e = {
|
|
4371
4390
|
[Ne.name]: Ne
|
|
4372
4391
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4373
4392
|
t.extendApi
|
|
4374
|
-
], u = v({},
|
|
4375
|
-
let
|
|
4376
|
-
const
|
|
4377
|
-
$mobile:
|
|
4378
|
-
}),
|
|
4379
|
-
|
|
4393
|
+
], u = v({}, ki), f = Zr();
|
|
4394
|
+
let p = { global: {} };
|
|
4395
|
+
const d = t.isMobile === !0, m = ne({
|
|
4396
|
+
$mobile: d
|
|
4397
|
+
}), y = _i(), w = {}, F = {};
|
|
4398
|
+
Mi(t.attrs || {});
|
|
4380
4399
|
function G(c) {
|
|
4381
|
-
const
|
|
4382
|
-
if (Array.isArray(
|
|
4383
|
-
return
|
|
4384
|
-
if (
|
|
4385
|
-
return
|
|
4400
|
+
const g = U[c];
|
|
4401
|
+
if (Array.isArray(g))
|
|
4402
|
+
return g.map(($) => $.api());
|
|
4403
|
+
if (g)
|
|
4404
|
+
return g.api();
|
|
4386
4405
|
}
|
|
4387
4406
|
function V(c) {
|
|
4388
4407
|
o.push(c);
|
|
@@ -4398,43 +4417,43 @@ function Kt(t) {
|
|
|
4398
4417
|
}));
|
|
4399
4418
|
}
|
|
4400
4419
|
function Pe(c) {
|
|
4401
|
-
|
|
4420
|
+
y.use(c);
|
|
4402
4421
|
}
|
|
4403
4422
|
function pe() {
|
|
4404
4423
|
const c = Me(...arguments);
|
|
4405
4424
|
if (!c.id || !c.prop) return Ae;
|
|
4406
|
-
const
|
|
4407
|
-
r[
|
|
4425
|
+
const g = J(c.id), $ = c.prop, b = $.merge === !0 ? r[g] : void 0;
|
|
4426
|
+
r[g] = Se($, b || Ae), f[g] = T(g), $.maker && _(f, $.maker);
|
|
4408
4427
|
}
|
|
4409
|
-
function E(c,
|
|
4428
|
+
function E(c, g) {
|
|
4410
4429
|
let $;
|
|
4411
4430
|
if (h.String(c)) {
|
|
4412
|
-
if ($ = c,
|
|
4413
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4431
|
+
if ($ = c, g === void 0)
|
|
4432
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? D() : e[$];
|
|
4414
4433
|
} else
|
|
4415
|
-
$ = J(c.name),
|
|
4416
|
-
if (!$ || !
|
|
4434
|
+
$ = J(c.name), g = c;
|
|
4435
|
+
if (!$ || !g) return;
|
|
4417
4436
|
const b = J($);
|
|
4418
|
-
e[$] =
|
|
4437
|
+
e[$] = g, e[b] = g, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], g.formCreateParser && pe($, g.formCreateParser);
|
|
4419
4438
|
}
|
|
4420
|
-
function
|
|
4421
|
-
return
|
|
4439
|
+
function D() {
|
|
4440
|
+
return xr(Be, e, i);
|
|
4422
4441
|
}
|
|
4423
4442
|
function M() {
|
|
4424
4443
|
return Ne;
|
|
4425
4444
|
}
|
|
4426
|
-
function me(c,
|
|
4427
|
-
return h.Function(c.install) ? c.install(W,
|
|
4445
|
+
function me(c, g) {
|
|
4446
|
+
return h.Function(c.install) ? c.install(W, g) : h.Function(c) && c(W, g), this;
|
|
4428
4447
|
}
|
|
4429
|
-
function W(c,
|
|
4430
|
-
let b =
|
|
4448
|
+
function W(c, g, $) {
|
|
4449
|
+
let b = Ni(c, g || {});
|
|
4431
4450
|
const C = b.$refs.fc.formCreate;
|
|
4432
|
-
return C.$parent = $,
|
|
4451
|
+
return C.$parent = $, Li(C.options).appendChild(b.$el), C.api();
|
|
4433
4452
|
}
|
|
4434
4453
|
Se(W, F);
|
|
4435
4454
|
function zt(c) {
|
|
4436
|
-
let
|
|
4437
|
-
return c ?
|
|
4455
|
+
let g = v({}, t);
|
|
4456
|
+
return c ? g.inherit = {
|
|
4438
4457
|
components: e,
|
|
4439
4458
|
parsers: r,
|
|
4440
4459
|
directives: i,
|
|
@@ -4443,65 +4462,65 @@ function Kt(t) {
|
|
|
4443
4462
|
useApps: o,
|
|
4444
4463
|
maker: f,
|
|
4445
4464
|
formulas: w,
|
|
4446
|
-
loadData:
|
|
4447
|
-
} : delete
|
|
4465
|
+
loadData: m
|
|
4466
|
+
} : delete g.inherit, Kt(g);
|
|
4448
4467
|
}
|
|
4449
|
-
function xt(c,
|
|
4450
|
-
s[c] =
|
|
4468
|
+
function xt(c, g) {
|
|
4469
|
+
s[c] = g;
|
|
4451
4470
|
}
|
|
4452
|
-
function Xt(c,
|
|
4453
|
-
w[c] =
|
|
4471
|
+
function Xt(c, g) {
|
|
4472
|
+
w[c] = g;
|
|
4454
4473
|
}
|
|
4455
|
-
function Zt(c,
|
|
4474
|
+
function Zt(c, g) {
|
|
4456
4475
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4457
|
-
|
|
4458
|
-
b[C] = Se(
|
|
4459
|
-
}),
|
|
4476
|
+
g.parsers && Object.keys(g.parsers).forEach((C) => {
|
|
4477
|
+
b[C] = Se(g.parsers[C], Ae);
|
|
4478
|
+
}), g.name = c, n[c] = q(v(v({}, $), g), { parsers: b });
|
|
4460
4479
|
}
|
|
4461
4480
|
function Oe(c) {
|
|
4462
|
-
c && Object.keys(U).forEach((
|
|
4463
|
-
(Array.isArray(U[
|
|
4481
|
+
c && Object.keys(U).forEach((g) => {
|
|
4482
|
+
(Array.isArray(U[g]) ? U[g] : [U[g]]).forEach((b) => {
|
|
4464
4483
|
b.bus.$emit("$loadData." + c);
|
|
4465
4484
|
});
|
|
4466
4485
|
});
|
|
4467
4486
|
}
|
|
4468
|
-
function Te(c,
|
|
4469
|
-
oe(
|
|
4487
|
+
function Te(c, g) {
|
|
4488
|
+
oe(m, c, g), Oe(c);
|
|
4470
4489
|
}
|
|
4471
|
-
function Fe(c,
|
|
4472
|
-
const $ = (...b) => O(() =>
|
|
4490
|
+
function Fe(c, g) {
|
|
4491
|
+
const $ = (...b) => O(() => g(...b));
|
|
4473
4492
|
$._driver = !0, Te(c, $);
|
|
4474
4493
|
}
|
|
4475
|
-
function st(c,
|
|
4494
|
+
function st(c, g) {
|
|
4476
4495
|
const $ = (c || "").split(".");
|
|
4477
4496
|
c = $.shift();
|
|
4478
4497
|
const b = $.join(".");
|
|
4479
|
-
if (
|
|
4480
|
-
let C =
|
|
4481
|
-
return C && C._driver ? C = C(b) : $.length && (C = B(C, $)), C == null || C === "" ?
|
|
4498
|
+
if (j(m, c) || k(m, c, De), m[c] !== De) {
|
|
4499
|
+
let C = m[c];
|
|
4500
|
+
return C && C._driver ? C = C(b) : $.length && (C = B(C, $)), C == null || C === "" ? g : C;
|
|
4482
4501
|
} else
|
|
4483
|
-
return
|
|
4502
|
+
return g;
|
|
4484
4503
|
}
|
|
4485
4504
|
function Qt(c) {
|
|
4486
4505
|
l.push(c);
|
|
4487
4506
|
}
|
|
4488
4507
|
function Yt(c) {
|
|
4489
|
-
delete
|
|
4508
|
+
delete m[c], Oe(c);
|
|
4490
4509
|
}
|
|
4491
|
-
function er(c,
|
|
4492
|
-
a.push({ name: c, callback:
|
|
4510
|
+
function er(c, g) {
|
|
4511
|
+
a.push({ name: c, callback: g });
|
|
4493
4512
|
}
|
|
4494
4513
|
function Be(c) {
|
|
4495
4514
|
_(this, {
|
|
4496
|
-
id:
|
|
4515
|
+
id: qi++,
|
|
4497
4516
|
create: W,
|
|
4498
4517
|
vm: c,
|
|
4499
|
-
manager:
|
|
4518
|
+
manager: Ci(t.manager),
|
|
4500
4519
|
parsers: r,
|
|
4501
4520
|
providers: u,
|
|
4502
4521
|
modelFields: s,
|
|
4503
4522
|
formulas: w,
|
|
4504
|
-
isMobile:
|
|
4523
|
+
isMobile: d,
|
|
4505
4524
|
rules: c.$options.propsData.rule,
|
|
4506
4525
|
name: c.$options.propsData.name || Ie(),
|
|
4507
4526
|
inFor: c.$options.propsData.inFor,
|
|
@@ -4513,55 +4532,55 @@ function Kt(t) {
|
|
|
4513
4532
|
drivers: n,
|
|
4514
4533
|
renderDriver: null,
|
|
4515
4534
|
refreshData: Oe,
|
|
4516
|
-
loadData:
|
|
4517
|
-
CreateNode:
|
|
4518
|
-
bus: new
|
|
4535
|
+
loadData: m,
|
|
4536
|
+
CreateNode: y,
|
|
4537
|
+
bus: new Ei(),
|
|
4519
4538
|
unwatch: [],
|
|
4520
4539
|
options: mr({}),
|
|
4521
4540
|
extendApiFn: l,
|
|
4522
4541
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4523
4542
|
tmpData: ne({})
|
|
4524
|
-
}), a.forEach((
|
|
4525
|
-
this.bus.$on(
|
|
4543
|
+
}), a.forEach((g) => {
|
|
4544
|
+
this.bus.$on(g.name, g.callback);
|
|
4526
4545
|
}), P(() => {
|
|
4527
4546
|
L(this.options, () => {
|
|
4528
4547
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4529
4548
|
}, { deep: !0 });
|
|
4530
4549
|
}), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
|
|
4531
4550
|
}
|
|
4532
|
-
Be.isMobile =
|
|
4551
|
+
Be.isMobile = d, _(Be.prototype, {
|
|
4533
4552
|
init() {
|
|
4534
4553
|
this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
|
|
4535
4554
|
this.initOptions(), this.$handle.api.refresh();
|
|
4536
4555
|
}, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.driver]), !this.renderDriver && this.vm.parent && (this.renderDriver = this.vm.parent.fc.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
|
|
4537
4556
|
},
|
|
4538
|
-
targetFormDriver(c, ...
|
|
4557
|
+
targetFormDriver(c, ...g) {
|
|
4539
4558
|
if (this.renderDriver && this.renderDriver[c])
|
|
4540
|
-
return O(() => this.renderDriver[c](...
|
|
4559
|
+
return O(() => this.renderDriver[c](...g));
|
|
4541
4560
|
},
|
|
4542
|
-
t(c,
|
|
4561
|
+
t(c, g, $) {
|
|
4543
4562
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4544
|
-
return b == null && (b = ""), b &&
|
|
4545
|
-
const
|
|
4546
|
-
b = b.replace(
|
|
4563
|
+
return b == null && (b = ""), b && g && Object.keys(g).forEach((C) => {
|
|
4564
|
+
const S = new RegExp(`{${C}}`, "g");
|
|
4565
|
+
b = b.replace(S, g[C]);
|
|
4547
4566
|
}), b;
|
|
4548
4567
|
},
|
|
4549
4568
|
globalDataDriver(c) {
|
|
4550
|
-
let
|
|
4551
|
-
const $ =
|
|
4569
|
+
let g = c.split(".");
|
|
4570
|
+
const $ = g.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4552
4571
|
if (b) {
|
|
4553
4572
|
if (b.type === "static")
|
|
4554
|
-
return B(b.data,
|
|
4573
|
+
return B(b.data, g);
|
|
4555
4574
|
{
|
|
4556
4575
|
let C;
|
|
4557
|
-
const
|
|
4558
|
-
if (
|
|
4559
|
-
if (
|
|
4576
|
+
const S = this.fetchCache.get(b);
|
|
4577
|
+
if (S) {
|
|
4578
|
+
if (S.status && (C = B(S.data, g)), !S.loading)
|
|
4560
4579
|
return C;
|
|
4561
|
-
|
|
4580
|
+
S.loading = !1, this.fetchCache.set(b, S);
|
|
4562
4581
|
} else
|
|
4563
4582
|
this.fetchCache.set(b, { status: !1 });
|
|
4564
|
-
const
|
|
4583
|
+
const R = se(() => {
|
|
4565
4584
|
le();
|
|
4566
4585
|
const z = this.fetchCache.get(b);
|
|
4567
4586
|
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
@@ -4571,7 +4590,7 @@ function Kt(t) {
|
|
|
4571
4590
|
if (ue && b.watch === !1)
|
|
4572
4591
|
return le();
|
|
4573
4592
|
if (ue) {
|
|
4574
|
-
|
|
4593
|
+
R();
|
|
4575
4594
|
return;
|
|
4576
4595
|
}
|
|
4577
4596
|
const ge = this.$handle.loadFetchVar(Ke(b), z);
|
|
@@ -4590,31 +4609,31 @@ function Kt(t) {
|
|
|
4590
4609
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4591
4610
|
},
|
|
4592
4611
|
globalLanguageDriver(c) {
|
|
4593
|
-
let
|
|
4594
|
-
if (
|
|
4595
|
-
const
|
|
4596
|
-
|
|
4612
|
+
let g = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4613
|
+
if (g && (b = O(() => g(c))), b == null && $ && typeof $ == "object" && (b = B($, c)), b == null) {
|
|
4614
|
+
const C = this.options.value.language || {}, S = this.getLocale();
|
|
4615
|
+
b = B(C[S] || {}, c), b == null && (b = B(Ti[S] || {}, c));
|
|
4597
4616
|
}
|
|
4598
|
-
return
|
|
4617
|
+
return b;
|
|
4599
4618
|
},
|
|
4600
4619
|
globalVarDriver(c) {
|
|
4601
|
-
let
|
|
4602
|
-
const $ =
|
|
4620
|
+
let g = c.split(".");
|
|
4621
|
+
const $ = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4603
4622
|
if (b) {
|
|
4604
4623
|
const C = h.Function(b) ? b : x(b.handle);
|
|
4605
4624
|
if (C) {
|
|
4606
|
-
let
|
|
4607
|
-
const
|
|
4608
|
-
Z ? (this.bus.$emit("$loadData.$var." + $),
|
|
4625
|
+
let S;
|
|
4626
|
+
const R = this.watchLoadData((ae, Z) => {
|
|
4627
|
+
Z ? (this.bus.$emit("$loadData.$var." + $), R()) : S = C(ae, this.$handle.api);
|
|
4609
4628
|
});
|
|
4610
|
-
return this.unwatch.push(
|
|
4629
|
+
return this.unwatch.push(R), B(S, g);
|
|
4611
4630
|
}
|
|
4612
4631
|
}
|
|
4613
4632
|
},
|
|
4614
|
-
setData(c,
|
|
4615
|
-
$ ? Te(c,
|
|
4633
|
+
setData(c, g, $) {
|
|
4634
|
+
$ ? Te(c, g) : (oe(this.vm.top.fc.tmpData, c, g), this.bus.$emit("$loadData." + c));
|
|
4616
4635
|
},
|
|
4617
|
-
getLoadData(c,
|
|
4636
|
+
getLoadData(c, g) {
|
|
4618
4637
|
let $ = null;
|
|
4619
4638
|
if (c != null) {
|
|
4620
4639
|
let b = c.split(".");
|
|
@@ -4639,33 +4658,33 @@ function Kt(t) {
|
|
|
4639
4658
|
if (C === "$preview")
|
|
4640
4659
|
return this.$handle.preview;
|
|
4641
4660
|
{
|
|
4642
|
-
const
|
|
4643
|
-
|
|
4661
|
+
const S = this.vm.top.fc.tmpData;
|
|
4662
|
+
j(S, C) || k(S, C, De), $ = S[C] !== De ? B(S, c) : st(c), b = [];
|
|
4644
4663
|
}
|
|
4645
4664
|
}
|
|
4646
4665
|
$ && b.length && ($ = B($, b));
|
|
4647
4666
|
}
|
|
4648
|
-
return $ == null || $ === "" ?
|
|
4667
|
+
return $ == null || $ === "" ? g : $;
|
|
4649
4668
|
},
|
|
4650
|
-
watchLoadData(c,
|
|
4669
|
+
watchLoadData(c, g) {
|
|
4651
4670
|
let $ = {};
|
|
4652
|
-
const b = (
|
|
4671
|
+
const b = (R) => {
|
|
4653
4672
|
this.get || (this.get = C), O(() => {
|
|
4654
|
-
c(C,
|
|
4673
|
+
c(C, R);
|
|
4655
4674
|
}), this.get === C && (this.get = void 0);
|
|
4656
|
-
}, C = (
|
|
4675
|
+
}, C = (R, ae) => {
|
|
4657
4676
|
let Z;
|
|
4658
|
-
if (typeof
|
|
4659
|
-
return $[
|
|
4660
|
-
const le = $e(() => Z ? Z() : this.getLoadData(
|
|
4661
|
-
const fe = Z ? Z() : this.getLoadData(
|
|
4662
|
-
if ($[
|
|
4663
|
-
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[
|
|
4677
|
+
if (typeof R == "object" && (Z = R.getValue, R = R.id), $[R])
|
|
4678
|
+
return $[R].val;
|
|
4679
|
+
const le = $e(() => Z ? Z() : this.getLoadData(R, ae)), z = R.split("."), ue = z.shift(), ge = z.shift() || "", re = se(() => {
|
|
4680
|
+
const fe = Z ? Z() : this.getLoadData(R, ae);
|
|
4681
|
+
if ($[R])
|
|
4682
|
+
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[R].val || JSON.stringify(fe) !== JSON.stringify($[R].val)) && ($[R].val = fe, b(!0));
|
|
4664
4683
|
else return;
|
|
4665
|
-
},
|
|
4684
|
+
}, g || 0), rr = L(le, (fe) => {
|
|
4666
4685
|
re();
|
|
4667
4686
|
});
|
|
4668
|
-
return this.bus.$on("$loadData." + ue, re), ge && this.bus.$on("$loadData." + ue + "." + ge, re), $[
|
|
4687
|
+
return this.bus.$on("$loadData." + ue, re), ge && this.bus.$on("$loadData." + ue + "." + ge, re), $[R] = {
|
|
4669
4688
|
fn: () => {
|
|
4670
4689
|
this.bus.$off("$loadData." + ue, re), ge && this.bus.$off("$loadData." + ue + "." + ge, re), rr();
|
|
4671
4690
|
},
|
|
@@ -4673,10 +4692,10 @@ function Kt(t) {
|
|
|
4673
4692
|
}, le.value;
|
|
4674
4693
|
};
|
|
4675
4694
|
b(!1);
|
|
4676
|
-
const
|
|
4677
|
-
Object.keys($).forEach((
|
|
4695
|
+
const S = () => {
|
|
4696
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4678
4697
|
};
|
|
4679
|
-
return this.unwatch.push(
|
|
4698
|
+
return this.unwatch.push(S), S;
|
|
4680
4699
|
},
|
|
4681
4700
|
isSub() {
|
|
4682
4701
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4689,13 +4708,13 @@ function Kt(t) {
|
|
|
4689
4708
|
resetBtn: {},
|
|
4690
4709
|
globalEvent: {},
|
|
4691
4710
|
globalData: {}
|
|
4692
|
-
}, K(
|
|
4711
|
+
}, K(p));
|
|
4693
4712
|
this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
|
|
4694
4713
|
},
|
|
4695
|
-
mergeOptions(c,
|
|
4696
|
-
return
|
|
4697
|
-
delete
|
|
4698
|
-
}),
|
|
4714
|
+
mergeOptions(c, g, $) {
|
|
4715
|
+
return g = v({}, g || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4716
|
+
delete g[b];
|
|
4717
|
+
}), g.global && (c.global = Kr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
|
|
4699
4718
|
},
|
|
4700
4719
|
updateOptions(c) {
|
|
4701
4720
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4728,7 +4747,7 @@ function Kt(t) {
|
|
|
4728
4747
|
_(c, {
|
|
4729
4748
|
version: t.version,
|
|
4730
4749
|
ui: t.ui,
|
|
4731
|
-
isMobile:
|
|
4750
|
+
isMobile: d,
|
|
4732
4751
|
extendApi: Qt,
|
|
4733
4752
|
getData: st,
|
|
4734
4753
|
setDataDriver: Fe,
|
|
@@ -4751,7 +4770,7 @@ function Kt(t) {
|
|
|
4751
4770
|
copyRules: Pt,
|
|
4752
4771
|
mergeRule: te,
|
|
4753
4772
|
fetch: qt,
|
|
4754
|
-
$form:
|
|
4773
|
+
$form: D,
|
|
4755
4774
|
parseFn: x,
|
|
4756
4775
|
parseJson: Vt,
|
|
4757
4776
|
toJson: Ce,
|
|
@@ -4763,25 +4782,25 @@ function Kt(t) {
|
|
|
4763
4782
|
function tr(c) {
|
|
4764
4783
|
_(c, {
|
|
4765
4784
|
create: W,
|
|
4766
|
-
install(
|
|
4767
|
-
if (
|
|
4768
|
-
|
|
4769
|
-
const b = function(
|
|
4770
|
-
return W(
|
|
4785
|
+
install(g, $) {
|
|
4786
|
+
if (p = v(v({}, p), $ || {}), g._installedFormCreate === !0) return;
|
|
4787
|
+
g._installedFormCreate = !0;
|
|
4788
|
+
const b = function(S, R = {}) {
|
|
4789
|
+
return W(S, R, this);
|
|
4771
4790
|
};
|
|
4772
|
-
ot(b),
|
|
4773
|
-
const C =
|
|
4774
|
-
|
|
4775
|
-
O(() =>
|
|
4791
|
+
ot(b), g.prototype.$formCreate = b;
|
|
4792
|
+
const C = D();
|
|
4793
|
+
g.component(C.name, C), g.component("FcFragment", M()), o.forEach((S) => {
|
|
4794
|
+
O(() => S(c, g));
|
|
4776
4795
|
});
|
|
4777
4796
|
}
|
|
4778
4797
|
});
|
|
4779
4798
|
}
|
|
4780
|
-
if (ot(F), tr(F), Fe("$cookie",
|
|
4799
|
+
if (ot(F), tr(F), Fe("$cookie", Vi), Fe("$localStorage", Ii), Fe("$sessionStorage", Pi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), pe(Ri), t.inherit) {
|
|
4781
4800
|
const c = t.inherit;
|
|
4782
|
-
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(
|
|
4801
|
+
c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(m, c.loadData), c.formulas && _(w, c.formulas);
|
|
4783
4802
|
}
|
|
4784
|
-
const ke =
|
|
4803
|
+
const ke = D();
|
|
4785
4804
|
return Se(ke, F), Object.defineProperties(ke, {
|
|
4786
4805
|
fetch: {
|
|
4787
4806
|
get() {
|
|
@@ -4802,7 +4821,7 @@ const _t = {
|
|
|
4802
4821
|
monthrange: "yyyy-MM",
|
|
4803
4822
|
datetimerange: "yyyy-MM-dd HH:mm:ss",
|
|
4804
4823
|
year: "yyyy"
|
|
4805
|
-
}, Ct = "datePicker",
|
|
4824
|
+
}, Ct = "datePicker", Ui = {
|
|
4806
4825
|
name: Ct,
|
|
4807
4826
|
maker: function() {
|
|
4808
4827
|
return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = T(Ct, { type: e.toLowerCase() }), t), {});
|
|
@@ -4811,7 +4830,7 @@ const _t = {
|
|
|
4811
4830
|
const e = t.prop.props;
|
|
4812
4831
|
e.valueFormat || (e.valueFormat = _t[e.type] || _t.date);
|
|
4813
4832
|
}
|
|
4814
|
-
}, qe = "hidden",
|
|
4833
|
+
}, qe = "hidden", Hi = {
|
|
4815
4834
|
name: qe,
|
|
4816
4835
|
maker: {
|
|
4817
4836
|
[qe]: (t, e) => T(qe)("", t, e)
|
|
@@ -4819,7 +4838,7 @@ const _t = {
|
|
|
4819
4838
|
render() {
|
|
4820
4839
|
return [];
|
|
4821
4840
|
}
|
|
4822
|
-
}, Ue = "input",
|
|
4841
|
+
}, Ue = "input", Gi = {
|
|
4823
4842
|
name: Ue,
|
|
4824
4843
|
maker: function() {
|
|
4825
4844
|
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = T(Ue, { type: r }), e), {});
|
|
@@ -4829,7 +4848,7 @@ const _t = {
|
|
|
4829
4848
|
let { props: e } = t.prop;
|
|
4830
4849
|
e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4831
4850
|
}
|
|
4832
|
-
}, wt = "slider",
|
|
4851
|
+
}, wt = "slider", Ji = {
|
|
4833
4852
|
name: wt,
|
|
4834
4853
|
maker: {
|
|
4835
4854
|
sliderRange: T(wt, { range: !0 })
|
|
@@ -4838,7 +4857,7 @@ const _t = {
|
|
|
4838
4857
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4839
4858
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4840
4859
|
}
|
|
4841
|
-
}, He = "timePicker",
|
|
4860
|
+
}, He = "timePicker", Ki = {
|
|
4842
4861
|
name: He,
|
|
4843
4862
|
maker: {
|
|
4844
4863
|
time: T(He, (t) => t.props.isRange = !1),
|
|
@@ -4848,27 +4867,27 @@ const _t = {
|
|
|
4848
4867
|
const e = t.prop.props;
|
|
4849
4868
|
e.valueFormat || (e.valueFormat = "HH:mm:ss");
|
|
4850
4869
|
}
|
|
4851
|
-
},
|
|
4870
|
+
}, Wi = {
|
|
4852
4871
|
name: "FcRow",
|
|
4853
4872
|
render(t, e) {
|
|
4854
4873
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4855
4874
|
e.vNode.row(e.prop, t)
|
|
4856
4875
|
]);
|
|
4857
4876
|
}
|
|
4858
|
-
},
|
|
4859
|
-
name:
|
|
4877
|
+
}, zi = "select", xi = {
|
|
4878
|
+
name: zi,
|
|
4860
4879
|
toFormValue(t, e) {
|
|
4861
4880
|
return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
|
|
4862
4881
|
}
|
|
4863
|
-
},
|
|
4864
|
-
qi,
|
|
4882
|
+
}, Xi = [
|
|
4865
4883
|
Ui,
|
|
4866
4884
|
Hi,
|
|
4867
4885
|
Gi,
|
|
4868
4886
|
Ji,
|
|
4869
4887
|
Ki,
|
|
4870
|
-
|
|
4871
|
-
|
|
4888
|
+
Wi,
|
|
4889
|
+
xi
|
|
4890
|
+
], A = "el", Zi = {
|
|
4872
4891
|
button: A + "Button",
|
|
4873
4892
|
icon: "i",
|
|
4874
4893
|
slider: A + "Slider",
|
|
@@ -4901,7 +4920,7 @@ const _t = {
|
|
|
4901
4920
|
object: "fcSubForm",
|
|
4902
4921
|
subForm: "fcSubForm"
|
|
4903
4922
|
};
|
|
4904
|
-
function
|
|
4923
|
+
function Qi() {
|
|
4905
4924
|
return {
|
|
4906
4925
|
form: {
|
|
4907
4926
|
inline: !1,
|
|
@@ -4935,23 +4954,23 @@ function Zi() {
|
|
|
4935
4954
|
}
|
|
4936
4955
|
};
|
|
4937
4956
|
}
|
|
4938
|
-
function
|
|
4957
|
+
function Yi(t) {
|
|
4939
4958
|
return t.type === "tooltip";
|
|
4940
4959
|
}
|
|
4941
4960
|
function Ot(t, e) {
|
|
4942
|
-
|
|
4961
|
+
j(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4943
4962
|
}
|
|
4944
4963
|
function Q(t) {
|
|
4945
4964
|
return t === !1;
|
|
4946
4965
|
}
|
|
4947
|
-
function
|
|
4948
|
-
|
|
4966
|
+
function en(t, e) {
|
|
4967
|
+
j(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4949
4968
|
}
|
|
4950
4969
|
function Ge(t) {
|
|
4951
4970
|
const e = v({}, t);
|
|
4952
4971
|
return delete e.children, e;
|
|
4953
4972
|
}
|
|
4954
|
-
const
|
|
4973
|
+
const tn = {
|
|
4955
4974
|
validate() {
|
|
4956
4975
|
const t = this.form();
|
|
4957
4976
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4970,7 +4989,7 @@ const en = {
|
|
|
4970
4989
|
},
|
|
4971
4990
|
tidyOptions(t) {
|
|
4972
4991
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4973
|
-
|
|
4992
|
+
en(t, e);
|
|
4974
4993
|
}), t;
|
|
4975
4994
|
},
|
|
4976
4995
|
tidyRule({ prop: t }) {
|
|
@@ -4992,7 +5011,7 @@ const en = {
|
|
|
4992
5011
|
});
|
|
4993
5012
|
},
|
|
4994
5013
|
getDefaultOptions() {
|
|
4995
|
-
return
|
|
5014
|
+
return Qi();
|
|
4996
5015
|
},
|
|
4997
5016
|
update() {
|
|
4998
5017
|
const t = this.options.form;
|
|
@@ -5017,9 +5036,9 @@ const en = {
|
|
|
5017
5036
|
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Q(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
|
|
5018
5037
|
},
|
|
5019
5038
|
makeWrap(t, e) {
|
|
5020
|
-
const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props;
|
|
5021
|
-
delete r.wrap.title;
|
|
5022
|
-
const
|
|
5039
|
+
const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props, u = r.wrap.class;
|
|
5040
|
+
delete r.wrap.class, delete r.wrap.title;
|
|
5041
|
+
const f = Q(r.wrap.show) ? e : this.$r(ee([r.wrap, {
|
|
5023
5042
|
props: q(v({
|
|
5024
5043
|
labelWidth: o === void 0 ? o : At(o),
|
|
5025
5044
|
label: n ? r.title.title : void 0
|
|
@@ -5027,12 +5046,12 @@ const en = {
|
|
|
5027
5046
|
prop: t.id,
|
|
5028
5047
|
rules: t.injectValidate()
|
|
5029
5048
|
}),
|
|
5030
|
-
class: this.$render.mergeClass(r.className, "fc-form-item"),
|
|
5049
|
+
class: this.$render.mergeClass(u || r.className, "fc-form-item"),
|
|
5031
5050
|
key: `${i}fi`,
|
|
5032
5051
|
ref: t.wrapRef,
|
|
5033
5052
|
type: "formItem"
|
|
5034
5053
|
}]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
|
|
5035
|
-
return a === !0 || Q(l) || Q(s.show) ?
|
|
5054
|
+
return a === !0 || Q(l) || Q(s.show) ? f : this.makeCol(r, i, [f]);
|
|
5036
5055
|
},
|
|
5037
5056
|
isTitle(t) {
|
|
5038
5057
|
if (this.options.form.title === !1) return !1;
|
|
@@ -5040,12 +5059,12 @@ const en = {
|
|
|
5040
5059
|
return !(!e.title && !e.native || Q(e.show));
|
|
5041
5060
|
},
|
|
5042
5061
|
makeInfo(t, e, r) {
|
|
5043
|
-
var f, d,
|
|
5044
|
-
const i = v({}, t.title), s = v({}, t.info), n =
|
|
5045
|
-
title: (
|
|
5062
|
+
var f, p, d, m, y, w;
|
|
5063
|
+
const i = v({}, t.title), s = v({}, t.info), n = Yi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5064
|
+
title: (p = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : p.value,
|
|
5046
5065
|
rule: r.rule,
|
|
5047
5066
|
options: this.options
|
|
5048
|
-
}) : ((
|
|
5067
|
+
}) : ((m = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : m.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5049
5068
|
if (!Q(s.show) && (s.info || s.native) && !Q(s.icon)) {
|
|
5050
5069
|
const F = {
|
|
5051
5070
|
type: s.type || "popover",
|
|
@@ -5055,7 +5074,7 @@ const en = {
|
|
|
5055
5074
|
};
|
|
5056
5075
|
delete F.props.icon, delete F.props.show, delete F.props.info, delete F.props.align, delete F.props.native;
|
|
5057
5076
|
const G = "content";
|
|
5058
|
-
s.info && !
|
|
5077
|
+
s.info && !j(F.props, G) && (F.props[G] = (w = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : w.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(ee([s, F]), [
|
|
5059
5078
|
this.$r({
|
|
5060
5079
|
type: "i",
|
|
5061
5080
|
slot: n ? "default" : "reference",
|
|
@@ -5141,25 +5160,25 @@ const en = {
|
|
|
5141
5160
|
}, [e]);
|
|
5142
5161
|
}
|
|
5143
5162
|
}, he = {};
|
|
5144
|
-
tn(he);
|
|
5145
5163
|
rn(he);
|
|
5146
5164
|
nn(he);
|
|
5147
5165
|
sn(he);
|
|
5148
5166
|
on(he);
|
|
5149
|
-
|
|
5167
|
+
an(he);
|
|
5168
|
+
function rn(t) {
|
|
5150
5169
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5151
5170
|
t[e] = T(e);
|
|
5152
5171
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5153
5172
|
}
|
|
5154
|
-
function
|
|
5173
|
+
function nn(t) {
|
|
5155
5174
|
const e = "select", r = "multiple";
|
|
5156
5175
|
t.selectMultiple = T(e, { [r]: !0 }), t.selectOne = T(e, { [r]: !1 });
|
|
5157
5176
|
}
|
|
5158
|
-
function
|
|
5177
|
+
function sn(t) {
|
|
5159
5178
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5160
5179
|
Object.keys(r).reduce((i, s) => (i[s] = T(e, { type: r[s] }), i), t);
|
|
5161
5180
|
}
|
|
5162
|
-
function
|
|
5181
|
+
function on(t) {
|
|
5163
5182
|
const e = "upload", r = {
|
|
5164
5183
|
image: ["image", 0],
|
|
5165
5184
|
file: ["file", 0],
|
|
@@ -5168,7 +5187,7 @@ function sn(t) {
|
|
|
5168
5187
|
};
|
|
5169
5188
|
Object.keys(r).reduce((i, s) => (i[s] = T(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
5170
5189
|
}
|
|
5171
|
-
function
|
|
5190
|
+
function an(t) {
|
|
5172
5191
|
const e = {
|
|
5173
5192
|
frameInputs: ["input", 0],
|
|
5174
5193
|
frameFiles: ["file", 0],
|
|
@@ -5182,7 +5201,7 @@ function on(t) {
|
|
|
5182
5201
|
function Ft(t, e) {
|
|
5183
5202
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5184
5203
|
}
|
|
5185
|
-
function
|
|
5204
|
+
function ln(t, e) {
|
|
5186
5205
|
return {
|
|
5187
5206
|
formEl() {
|
|
5188
5207
|
return e.$manager.form();
|
|
@@ -5284,7 +5303,7 @@ const Wt = {
|
|
|
5284
5303
|
name: "required",
|
|
5285
5304
|
load(t, e, r) {
|
|
5286
5305
|
var s, n;
|
|
5287
|
-
const i =
|
|
5306
|
+
const i = un(t.getValue());
|
|
5288
5307
|
if (i.required === !1)
|
|
5289
5308
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5290
5309
|
else {
|
|
@@ -5308,25 +5327,25 @@ const Wt = {
|
|
|
5308
5327
|
Wt.load(...t);
|
|
5309
5328
|
}
|
|
5310
5329
|
};
|
|
5311
|
-
function
|
|
5330
|
+
function un(t) {
|
|
5312
5331
|
return h.Boolean(t) ? { required: t } : h.String(t) ? { message: t } : h.Undef(t) ? { required: !1 } : h.Function(t) ? { validator: t } : h.Object(t) ? t : {};
|
|
5313
5332
|
}
|
|
5314
|
-
function
|
|
5315
|
-
t.componentAlias(
|
|
5333
|
+
function fn(t) {
|
|
5334
|
+
t.componentAlias(Zi), qr.forEach((e) => {
|
|
5316
5335
|
t.component(e.name, e);
|
|
5317
|
-
}), t.register(Wt),
|
|
5336
|
+
}), t.register(Wt), Xi.forEach((e) => {
|
|
5318
5337
|
t.parser(e);
|
|
5319
5338
|
}), Object.keys(he).forEach((e) => {
|
|
5320
5339
|
t.maker[e] = he[e];
|
|
5321
5340
|
});
|
|
5322
5341
|
}
|
|
5323
|
-
function
|
|
5342
|
+
function cn() {
|
|
5324
5343
|
return Kt({
|
|
5325
5344
|
ui: "element-ui",
|
|
5326
|
-
version: "2.7.
|
|
5327
|
-
manager:
|
|
5328
|
-
extendApi:
|
|
5329
|
-
install:
|
|
5345
|
+
version: "2.7.11",
|
|
5346
|
+
manager: tn,
|
|
5347
|
+
extendApi: ln,
|
|
5348
|
+
install: fn,
|
|
5330
5349
|
attrs: {
|
|
5331
5350
|
normal: ["col", "wrap"],
|
|
5332
5351
|
array: ["className"],
|
|
@@ -5334,10 +5353,10 @@ function fn() {
|
|
|
5334
5353
|
}
|
|
5335
5354
|
});
|
|
5336
5355
|
}
|
|
5337
|
-
const Ze =
|
|
5356
|
+
const Ze = cn();
|
|
5338
5357
|
typeof window != "undefined" && (window.formCreate = Ze, window.Vue && Ze.install(window.Vue));
|
|
5339
|
-
const
|
|
5358
|
+
const pn = Ze.maker;
|
|
5340
5359
|
export {
|
|
5341
5360
|
Ze as default,
|
|
5342
|
-
|
|
5361
|
+
pn as maker
|
|
5343
5362
|
};
|