@form-create/element-ui 2.7.13 → 2.7.15
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 +417 -400
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +3 -3
- package/src/core/api.js +1 -0
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.15
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -19,7 +19,7 @@ var at = (t, e, r) => e in t ? ir(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
19
19
|
ar.call(e, r) && at(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
21
|
}, q = (t, e) => nr(t, sr(e));
|
|
22
|
-
import
|
|
22
|
+
import $e, { getCurrentInstance as lr, provide as ur, inject as fr, toRefs as lt, reactive as ne, onBeforeMount as cr, watch as L, onMounted as hr, onBeforeUnmount as dr, onUpdated as pr, nextTick as P, markRaw as ge, computed as ye, toRef as Ae, ref as mr } from "vue";
|
|
23
23
|
function gr(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
@@ -591,10 +591,10 @@ 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
|
-
const Rr = "fcSelect",
|
|
597
|
+
const Rr = "fcSelect", jr = {
|
|
598
598
|
name: Rr,
|
|
599
599
|
functional: !0,
|
|
600
600
|
props: {
|
|
@@ -621,13 +621,13 @@ 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);
|
|
628
628
|
}
|
|
629
|
-
},
|
|
630
|
-
name:
|
|
629
|
+
}, Dr = "fcTree", Ar = {
|
|
630
|
+
name: Dr,
|
|
631
631
|
formCreateParser: {
|
|
632
632
|
mergeProp(t) {
|
|
633
633
|
const e = t.prop.props;
|
|
@@ -913,12 +913,12 @@ const Ir = "fcUpload", Pr = {
|
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
915
|
function k(t, e, r) {
|
|
916
|
-
|
|
916
|
+
$e.set(t, e, r);
|
|
917
917
|
}
|
|
918
918
|
function ie(t, e) {
|
|
919
|
-
(
|
|
919
|
+
($e.del || $e.delete)(t, e);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Oe(t, e = {}, r) {
|
|
922
922
|
let i = !1;
|
|
923
923
|
for (let s in e)
|
|
924
924
|
if (Object.prototype.hasOwnProperty.call(e, s)) {
|
|
@@ -936,14 +936,14 @@ function we(t, e = {}, r) {
|
|
|
936
936
|
}
|
|
937
937
|
else
|
|
938
938
|
o && k(t, s, {});
|
|
939
|
-
t[s] =
|
|
939
|
+
t[s] = Oe(t[s], n, r);
|
|
940
940
|
} else
|
|
941
941
|
k(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
942
942
|
}
|
|
943
943
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
944
944
|
}
|
|
945
945
|
function K(t) {
|
|
946
|
-
return
|
|
946
|
+
return Oe({}, { value: t }).value;
|
|
947
947
|
}
|
|
948
948
|
const Tr = Object.assign || function(t) {
|
|
949
949
|
for (let e, r = 1; r < arguments.length; r++)
|
|
@@ -1039,7 +1039,7 @@ const Br = "fcGroup", Lr = {
|
|
|
1039
1039
|
const s = i.$f.formData();
|
|
1040
1040
|
if (t === e)
|
|
1041
1041
|
i.$f.deferSyncValue(() => {
|
|
1042
|
-
|
|
1042
|
+
Oe(i.rule, t), i.$f.setValue(s);
|
|
1043
1043
|
}, !0);
|
|
1044
1044
|
else {
|
|
1045
1045
|
const n = i.$f.formData();
|
|
@@ -1079,7 +1079,7 @@ const Br = "fcGroup", Lr = {
|
|
|
1079
1079
|
},
|
|
1080
1080
|
methods: {
|
|
1081
1081
|
_value(t) {
|
|
1082
|
-
return t &&
|
|
1082
|
+
return t && j(t, this.field) ? t[this.field] : t;
|
|
1083
1083
|
},
|
|
1084
1084
|
cache(t, e) {
|
|
1085
1085
|
this.cacheValue[t] = JSON.stringify(e);
|
|
@@ -1350,7 +1350,7 @@ const Br = "fcGroup", Lr = {
|
|
|
1350
1350
|
Or,
|
|
1351
1351
|
kr,
|
|
1352
1352
|
Sr,
|
|
1353
|
-
|
|
1353
|
+
jr,
|
|
1354
1354
|
Ar,
|
|
1355
1355
|
Pr,
|
|
1356
1356
|
Lr,
|
|
@@ -1362,20 +1362,20 @@ function se(t, e) {
|
|
|
1362
1362
|
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1363
1363
|
};
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function be(t) {
|
|
1366
1366
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1367
1367
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1368
1368
|
}
|
|
1369
1369
|
function Ur(t) {
|
|
1370
1370
|
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
1371
1371
|
}
|
|
1372
|
-
const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], St = ["on", "nativeOn", "hook"],
|
|
1372
|
+
const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], St = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
|
|
1373
1373
|
const i = [...kt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...St, ...r.functional || []], o = r.props || [];
|
|
1374
1374
|
return t.reduce((a, l) => {
|
|
1375
1375
|
for (const u in l)
|
|
1376
1376
|
if (a[u])
|
|
1377
1377
|
if (o.indexOf(u) > -1)
|
|
1378
|
-
a[u] =
|
|
1378
|
+
a[u] = Y([l[u]], a[u]);
|
|
1379
1379
|
else if (i.indexOf(u) > -1)
|
|
1380
1380
|
a[u] = v(v({}, a[u]), l[u]);
|
|
1381
1381
|
else if (s.indexOf(u) > -1) {
|
|
@@ -1400,14 +1400,14 @@ const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style"
|
|
|
1400
1400
|
}, Hr = (t, e) => function() {
|
|
1401
1401
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1402
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"], Qe = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
|
|
1403
|
-
function
|
|
1403
|
+
function jt() {
|
|
1404
1404
|
return [...Rt, ...kt, ...Et, ...St, ...Qe, ...Ye];
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function Dt(t, e, r) {
|
|
1407
1407
|
return `[form-create ${t}]: ${e}`;
|
|
1408
1408
|
}
|
|
1409
1409
|
function et(t, e) {
|
|
1410
|
-
console.error(
|
|
1410
|
+
console.error(Dt("err", t));
|
|
1411
1411
|
}
|
|
1412
1412
|
function Gr(t) {
|
|
1413
1413
|
et(t.toString()), console.error(t);
|
|
@@ -1416,8 +1416,8 @@ function At(t) {
|
|
|
1416
1416
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1417
1417
|
}
|
|
1418
1418
|
const Ke = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
|
|
1419
|
-
function
|
|
1420
|
-
return JSON.stringify(
|
|
1419
|
+
function we(t, e) {
|
|
1420
|
+
return JSON.stringify(Oe(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
|
|
1421
1421
|
if (!(i && i._isVue === !0)) {
|
|
1422
1422
|
if (typeof i != "function")
|
|
1423
1423
|
return i;
|
|
@@ -1431,7 +1431,7 @@ function Ce(t, e) {
|
|
|
1431
1431
|
function Be(t) {
|
|
1432
1432
|
return new Function("return " + t)();
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function z(t, e) {
|
|
1435
1435
|
if (t && h.String(t) && t.length > 4) {
|
|
1436
1436
|
let r = t.trim(), i = !1;
|
|
1437
1437
|
try {
|
|
@@ -1474,7 +1474,7 @@ err: ${s}`);
|
|
|
1474
1474
|
}
|
|
1475
1475
|
function Vt(t, e) {
|
|
1476
1476
|
return JSON.parse(t, function(r, i) {
|
|
1477
|
-
return h.Undef(i) || !i.indexOf ? i :
|
|
1477
|
+
return h.Undef(i) || !i.indexOf ? i : z(i, e);
|
|
1478
1478
|
});
|
|
1479
1479
|
}
|
|
1480
1480
|
let Jr = 0;
|
|
@@ -1488,7 +1488,7 @@ function oe(t, e, r) {
|
|
|
1488
1488
|
s && ((!i[s] || typeof i[s] != "object") && k(i, s, {}), i = i[s]), s = n;
|
|
1489
1489
|
}), k(i, s, r), i;
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function xe(t, e) {
|
|
1492
1492
|
return {
|
|
1493
1493
|
value: t,
|
|
1494
1494
|
enumerable: !1,
|
|
@@ -1500,10 +1500,10 @@ function It(t, e) {
|
|
|
1500
1500
|
return Pt([t], e || !1)[0];
|
|
1501
1501
|
}
|
|
1502
1502
|
function Pt(t, e) {
|
|
1503
|
-
return
|
|
1503
|
+
return Oe([], [...t], e || !1);
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1506
|
-
return
|
|
1505
|
+
function ee(t, e) {
|
|
1506
|
+
return Y(Array.isArray(e) ? e : [e], t, { array: Qe, normal: Ye }), t;
|
|
1507
1507
|
}
|
|
1508
1508
|
function ct(t) {
|
|
1509
1509
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
@@ -1511,7 +1511,7 @@ function ct(t) {
|
|
|
1511
1511
|
}
|
|
1512
1512
|
function Kr(t, e) {
|
|
1513
1513
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1514
|
-
e[r] && (t[r] =
|
|
1514
|
+
e[r] && (t[r] = ee(t[r] || {}, e[r]));
|
|
1515
1515
|
}), t) : e;
|
|
1516
1516
|
}
|
|
1517
1517
|
function Tt(t, e) {
|
|
@@ -1521,7 +1521,7 @@ function Tt(t, e) {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
}, r), {}));
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function Q(t) {
|
|
1525
1525
|
return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
|
|
1526
1526
|
}
|
|
1527
1527
|
function O(t, e) {
|
|
@@ -1532,9 +1532,9 @@ function O(t, e) {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
return e;
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function ze(t, e) {
|
|
1536
1536
|
let r = null;
|
|
1537
|
-
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) =>
|
|
1537
|
+
return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => ze(i, e)) : r = t, r && e && H(r).forEach((i) => {
|
|
1538
1538
|
(Array.isArray(i) ? i : [i]).forEach((n) => {
|
|
1539
1539
|
n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
|
|
1540
1540
|
});
|
|
@@ -1544,12 +1544,12 @@ function Wr(t, e) {
|
|
|
1544
1544
|
if (h.Object(t)) {
|
|
1545
1545
|
const r = {};
|
|
1546
1546
|
return Object.keys(t).forEach((i) => {
|
|
1547
|
-
r[i] =
|
|
1547
|
+
r[i] = ze(t[i], i);
|
|
1548
1548
|
}), r;
|
|
1549
1549
|
} else
|
|
1550
|
-
return
|
|
1550
|
+
return ze(t, e);
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function Se() {
|
|
1553
1553
|
const t = {}, e = (r) => r || "default";
|
|
1554
1554
|
return {
|
|
1555
1555
|
setSlot(r, i) {
|
|
@@ -1585,12 +1585,12 @@ function Ee() {
|
|
|
1585
1585
|
}
|
|
1586
1586
|
};
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function Re(t, e) {
|
|
1589
1589
|
return Object.setPrototypeOf(t, e), t;
|
|
1590
1590
|
}
|
|
1591
|
-
const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e,
|
|
1591
|
+
const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
|
|
1592
1592
|
"==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
|
|
1593
|
-
"!=": (t, e) => !
|
|
1593
|
+
"!=": (t, e) => !fe["=="](t, e),
|
|
1594
1594
|
">": (t, e) => t > e,
|
|
1595
1595
|
">=": (t, e) => t >= e,
|
|
1596
1596
|
"<": (t, e) => t < e,
|
|
@@ -1599,13 +1599,13 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
|
|
|
1599
1599
|
return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
|
|
1600
1600
|
},
|
|
1601
1601
|
notOn(t, e) {
|
|
1602
|
-
return !
|
|
1602
|
+
return !fe.on(t, e);
|
|
1603
1603
|
},
|
|
1604
1604
|
in(t, e) {
|
|
1605
1605
|
return e && e.indexOf && e.indexOf(t) > -1;
|
|
1606
1606
|
},
|
|
1607
1607
|
notIn(t, e) {
|
|
1608
|
-
return !
|
|
1608
|
+
return !fe.in(t, e);
|
|
1609
1609
|
},
|
|
1610
1610
|
between(t, e) {
|
|
1611
1611
|
return t > e[0] && t < e[1];
|
|
@@ -1628,7 +1628,7 @@ function B(t, e) {
|
|
|
1628
1628
|
t != null && (t = t[r]);
|
|
1629
1629
|
}), t;
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1631
|
+
function xr(t) {
|
|
1632
1632
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1633
1633
|
let r;
|
|
1634
1634
|
const i = {};
|
|
@@ -1654,15 +1654,15 @@ function Bt(t) {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
|
|
1656
1656
|
}
|
|
1657
|
-
const
|
|
1657
|
+
const je = (t, e) => {
|
|
1658
1658
|
if (!(!t || t === e || !t.$props)) {
|
|
1659
1659
|
if (t.$props.formCreateInject)
|
|
1660
1660
|
return t.$props.formCreateInject;
|
|
1661
1661
|
if (t.$parent)
|
|
1662
|
-
return
|
|
1662
|
+
return je(t.$parent, e);
|
|
1663
1663
|
}
|
|
1664
1664
|
};
|
|
1665
|
-
function
|
|
1665
|
+
function zr(t, e, r) {
|
|
1666
1666
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1667
1667
|
return {
|
|
1668
1668
|
name: i,
|
|
@@ -1730,20 +1730,20 @@ function xr(t, e, r) {
|
|
|
1730
1730
|
unique: 1,
|
|
1731
1731
|
renderRule: [...l.value || []],
|
|
1732
1732
|
updateValue: JSON.stringify(u.value || {})
|
|
1733
|
-
}),
|
|
1733
|
+
}), g = new t(n), y = g.api(), C = p.value, F = () => {
|
|
1734
1734
|
if (o) {
|
|
1735
|
-
const E =
|
|
1735
|
+
const E = je(n, o);
|
|
1736
1736
|
if (E) {
|
|
1737
|
-
let
|
|
1738
|
-
C ? (
|
|
1737
|
+
let S;
|
|
1738
|
+
C ? (S = H(E.getSubForm()), S.push(y)) : S = y, E.subForm(S);
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
1741
|
}, G = () => {
|
|
1742
|
-
const E =
|
|
1742
|
+
const E = je(n, o);
|
|
1743
1743
|
if (E)
|
|
1744
1744
|
if (C) {
|
|
1745
|
-
const
|
|
1746
|
-
M > -1 &&
|
|
1745
|
+
const S = H(E.getSubForm()), M = S.indexOf(y);
|
|
1746
|
+
M > -1 && S.splice(M, 1);
|
|
1747
1747
|
} else
|
|
1748
1748
|
E.subForm();
|
|
1749
1749
|
};
|
|
@@ -1751,54 +1751,54 @@ function xr(t, e, r) {
|
|
|
1751
1751
|
cr(() => {
|
|
1752
1752
|
L(() => {
|
|
1753
1753
|
let E = "";
|
|
1754
|
-
const
|
|
1755
|
-
Object.keys(
|
|
1756
|
-
let
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
}),
|
|
1754
|
+
const S = s.option && s.option.globalClass || {};
|
|
1755
|
+
Object.keys(S).forEach((M) => {
|
|
1756
|
+
let pe = "";
|
|
1757
|
+
S[M].style && Object.keys(S[M].style).forEach((W) => {
|
|
1758
|
+
pe += be(W) + ":" + S[M].style[W] + ";";
|
|
1759
|
+
}), S[M].content && (pe += S[M].content + ";"), pe && (E += `.${M}{${pe}}`);
|
|
1760
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 || "";
|
|
1761
1761
|
}, () => {
|
|
1762
1762
|
});
|
|
1763
1763
|
});
|
|
1764
1764
|
const N = se(() => {
|
|
1765
|
-
|
|
1766
|
-
}, 100),
|
|
1767
|
-
|
|
1765
|
+
g.bus.$emit("$loadData.$topForm");
|
|
1766
|
+
}, 100), he = se(function() {
|
|
1767
|
+
g.bus.$emit("$loadData.$scopeForm");
|
|
1768
1768
|
}, 100), Ie = se(() => {
|
|
1769
|
-
|
|
1770
|
-
}, 100),
|
|
1771
|
-
|
|
1769
|
+
g.bus.$emit("$loadData.$form");
|
|
1770
|
+
}, 100), de = (E) => {
|
|
1771
|
+
g.bus.$emit("change-$form." + E);
|
|
1772
1772
|
};
|
|
1773
1773
|
return hr(() => {
|
|
1774
|
-
o && (y.top.bus.$on("$loadData.$form", N), y.top.bus.$on("change",
|
|
1774
|
+
o && (y.top.bus.$on("$loadData.$form", N), y.top.bus.$on("change", de)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
|
|
1775
1775
|
}), dr(() => {
|
|
1776
|
-
o && (y.top.bus.$off("$loadData.$form", N), y.top.bus.$off("change",
|
|
1776
|
+
o && (y.top.bus.$off("$loadData.$form", N), y.top.bus.$off("change", de)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", he), G(), d.destroyed = !0, g.unmount(), V && (V.parentNode || V.parentElement) && document.head.removeChild(V);
|
|
1777
1777
|
}), pr(() => {
|
|
1778
|
-
|
|
1778
|
+
g.updated();
|
|
1779
1779
|
}), L(f, (E) => {
|
|
1780
1780
|
E ? F() : G();
|
|
1781
1781
|
}, { immediate: !0 }), L(() => s.option, () => {
|
|
1782
|
-
|
|
1783
|
-
}, { deep: !0 }), L(() => [...l.value], (E) => {
|
|
1784
|
-
|
|
1782
|
+
g.initOptions(), y.refresh();
|
|
1783
|
+
}, { deep: !0, flush: "sync" }), L(() => [...l.value], (E) => {
|
|
1784
|
+
g.$handle.isBreakWatch() || E.length === d.renderRule.length && E.every((S) => d.renderRule.indexOf(S) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
|
|
1785
1785
|
}), L(() => [s.disabled, s.preview], () => {
|
|
1786
1786
|
y.refresh();
|
|
1787
1787
|
}), L(u, (E) => {
|
|
1788
|
-
|
|
1788
|
+
we(E || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(E || {}) : y.setValue(E || {}));
|
|
1789
1789
|
}, { deep: !0, flush: "post" }), L(() => s.index, () => {
|
|
1790
|
-
y.coverValue({}),
|
|
1790
|
+
y.coverValue({}), g.$handle.updateAppendData(), P(() => {
|
|
1791
1791
|
P(() => {
|
|
1792
1792
|
y.clearValidateState();
|
|
1793
1793
|
});
|
|
1794
1794
|
});
|
|
1795
1795
|
}, { flush: "sync" }), q(v({
|
|
1796
|
-
fc:
|
|
1797
|
-
parent: o &&
|
|
1798
|
-
top:
|
|
1799
|
-
fapi:
|
|
1796
|
+
fc: ge(g),
|
|
1797
|
+
parent: o && ge(o),
|
|
1798
|
+
top: ge(a),
|
|
1799
|
+
fapi: ge(y)
|
|
1800
1800
|
}, lt(d)), {
|
|
1801
|
-
getGroupInject: () =>
|
|
1801
|
+
getGroupInject: () => je(n, o),
|
|
1802
1802
|
refresh() {
|
|
1803
1803
|
++d.unique;
|
|
1804
1804
|
},
|
|
@@ -1807,9 +1807,9 @@ function xr(t, e, r) {
|
|
|
1807
1807
|
},
|
|
1808
1808
|
updateValue(E) {
|
|
1809
1809
|
if (d.destroyed) return;
|
|
1810
|
-
const
|
|
1811
|
-
d.updateValue !==
|
|
1812
|
-
Ie(), o ? f.value ||
|
|
1810
|
+
const S = we(E);
|
|
1811
|
+
d.updateValue !== S && (d.updateValue = S, n.$emit("update:value", E), P(() => {
|
|
1812
|
+
Ie(), o ? f.value || he() : (N(), he());
|
|
1813
1813
|
}));
|
|
1814
1814
|
}
|
|
1815
1815
|
});
|
|
@@ -1855,11 +1855,11 @@ _(tt.prototype, {
|
|
|
1855
1855
|
function Nt(t) {
|
|
1856
1856
|
t.forEach((e) => {
|
|
1857
1857
|
tt.prototype[e] = function(r) {
|
|
1858
|
-
return
|
|
1858
|
+
return ee(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
|
|
1859
1859
|
};
|
|
1860
1860
|
});
|
|
1861
1861
|
}
|
|
1862
|
-
Nt(
|
|
1862
|
+
Nt(jt());
|
|
1863
1863
|
const Mt = T("");
|
|
1864
1864
|
function Xr(t, e, r) {
|
|
1865
1865
|
let i = Mt("", e);
|
|
@@ -1923,7 +1923,7 @@ function gt(t, e, r) {
|
|
|
1923
1923
|
(e || qt)(q(v({}, t), {
|
|
1924
1924
|
onSuccess(n) {
|
|
1925
1925
|
let o = (l) => l;
|
|
1926
|
-
const a =
|
|
1926
|
+
const a = z(t.parse);
|
|
1927
1927
|
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), i(o(n, void 0, r));
|
|
1928
1928
|
},
|
|
1929
1929
|
onError(n) {
|
|
@@ -2026,7 +2026,7 @@ function Yr(t) {
|
|
|
2026
2026
|
},
|
|
2027
2027
|
getValue(n) {
|
|
2028
2028
|
const o = t.getFieldCtx(n);
|
|
2029
|
-
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;
|
|
2030
2030
|
},
|
|
2031
2031
|
coverValue(n) {
|
|
2032
2032
|
const o = v({}, n || {});
|
|
@@ -2034,7 +2034,7 @@ function Yr(t) {
|
|
|
2034
2034
|
t.appendData = {}, s.fields().forEach((a) => {
|
|
2035
2035
|
const l = t.fieldCtx[a];
|
|
2036
2036
|
if (l) {
|
|
2037
|
-
const u =
|
|
2037
|
+
const u = j(n, a);
|
|
2038
2038
|
l.forEach((f) => {
|
|
2039
2039
|
k(f.rule, "value", u ? n[a] : void 0);
|
|
2040
2040
|
}), delete o[a];
|
|
@@ -2063,7 +2063,7 @@ function Yr(t) {
|
|
|
2063
2063
|
}, !0), o ? o.origin : void 0;
|
|
2064
2064
|
},
|
|
2065
2065
|
removeRule(n) {
|
|
2066
|
-
const o = n &&
|
|
2066
|
+
const o = n && Q(n);
|
|
2067
2067
|
if (o)
|
|
2068
2068
|
return o.rm(), o.origin;
|
|
2069
2069
|
},
|
|
@@ -2152,7 +2152,7 @@ function Yr(t) {
|
|
|
2152
2152
|
n.forEach((a) => s.sync(a));
|
|
2153
2153
|
return;
|
|
2154
2154
|
}
|
|
2155
|
-
let o = h.Object(n) ?
|
|
2155
|
+
let o = h.Object(n) ? Q(n) : t.getCtxs(n);
|
|
2156
2156
|
o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
|
|
2157
2157
|
if (!a.deleted) {
|
|
2158
2158
|
const l = t.subForm[a.id];
|
|
@@ -2189,7 +2189,7 @@ function Yr(t) {
|
|
|
2189
2189
|
},
|
|
2190
2190
|
mergeRule: (n, o) => {
|
|
2191
2191
|
t.getCtxs(n).forEach((a) => {
|
|
2192
|
-
|
|
2192
|
+
ee(a.rule, o);
|
|
2193
2193
|
});
|
|
2194
2194
|
},
|
|
2195
2195
|
mergeRules(n) {
|
|
@@ -2202,6 +2202,20 @@ function Yr(t) {
|
|
|
2202
2202
|
if (a)
|
|
2203
2203
|
return o ? a.origin : a.rule;
|
|
2204
2204
|
},
|
|
2205
|
+
findType(n, o) {
|
|
2206
|
+
let a;
|
|
2207
|
+
return Object.keys(t.ctxs).forEach((l) => {
|
|
2208
|
+
const u = t.ctxs[l];
|
|
2209
|
+
u.rule.type === n && (a = o ? u.origin : u.rule);
|
|
2210
|
+
}), a;
|
|
2211
|
+
},
|
|
2212
|
+
findTypes(n, o) {
|
|
2213
|
+
let a = [];
|
|
2214
|
+
return Object.keys(t.ctxs).forEach((l) => {
|
|
2215
|
+
const u = t.ctxs[l];
|
|
2216
|
+
u.rule.type === n && a.push(o ? u.origin : u.rule);
|
|
2217
|
+
}), a;
|
|
2218
|
+
},
|
|
2205
2219
|
getRenderRule: (n) => {
|
|
2206
2220
|
const o = t.getCtx(n);
|
|
2207
2221
|
if (o)
|
|
@@ -2216,7 +2230,7 @@ function Yr(t) {
|
|
|
2216
2230
|
},
|
|
2217
2231
|
setEffect(n, o, a) {
|
|
2218
2232
|
const l = t.getCtx(n);
|
|
2219
|
-
l && o && (o[0] === "$" && (o = o.substr(1)),
|
|
2233
|
+
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));
|
|
2220
2234
|
},
|
|
2221
2235
|
clearEffectData(n, o) {
|
|
2222
2236
|
const a = t.getCtx(n);
|
|
@@ -2249,14 +2263,14 @@ function Yr(t) {
|
|
|
2249
2263
|
method(n, o) {
|
|
2250
2264
|
const a = s.el(n);
|
|
2251
2265
|
if (!a || !a[o])
|
|
2252
|
-
throw new Error(
|
|
2266
|
+
throw new Error(Dt("err", `${o} 方法不存在`));
|
|
2253
2267
|
return (...l) => a[o](...l);
|
|
2254
2268
|
},
|
|
2255
2269
|
exec(n, o, ...a) {
|
|
2256
2270
|
return O(() => s.method(n, o)(...a));
|
|
2257
2271
|
},
|
|
2258
2272
|
toJson(n) {
|
|
2259
|
-
return
|
|
2273
|
+
return we(s.rule, n);
|
|
2260
2274
|
},
|
|
2261
2275
|
trigger(n, o, ...a) {
|
|
2262
2276
|
const l = s.el(n);
|
|
@@ -2275,7 +2289,7 @@ function Yr(t) {
|
|
|
2275
2289
|
return o ? t.subForm[o.id] : void 0;
|
|
2276
2290
|
},
|
|
2277
2291
|
getChildrenRuleList(n) {
|
|
2278
|
-
const o = typeof n == "object", a = o ?
|
|
2292
|
+
const o = typeof n == "object", a = o ? Q(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
|
|
2279
2293
|
if (!l)
|
|
2280
2294
|
return [];
|
|
2281
2295
|
const u = [];
|
|
@@ -2286,10 +2300,10 @@ function Yr(t) {
|
|
|
2286
2300
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2287
2301
|
},
|
|
2288
2302
|
getParentRule(n) {
|
|
2289
|
-
return (typeof n == "object" ?
|
|
2303
|
+
return (typeof n == "object" ? Q(n) : t.getCtx(n)).parent.rule;
|
|
2290
2304
|
},
|
|
2291
2305
|
getParentSubRule(n) {
|
|
2292
|
-
const a = typeof n == "object" ?
|
|
2306
|
+
const a = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2293
2307
|
if (a) {
|
|
2294
2308
|
const l = a.getParentGroup();
|
|
2295
2309
|
if (l)
|
|
@@ -2303,14 +2317,14 @@ function Yr(t) {
|
|
|
2303
2317
|
const l = s.getChildrenRuleList(n);
|
|
2304
2318
|
t.deferSyncValue(() => {
|
|
2305
2319
|
l.forEach((u) => {
|
|
2306
|
-
|
|
2320
|
+
j(o, u.field) ? k(u, "value", o[u.field]) : a && k(u, "value", void 0);
|
|
2307
2321
|
});
|
|
2308
2322
|
});
|
|
2309
2323
|
},
|
|
2310
2324
|
getGlobalEvent(n) {
|
|
2311
2325
|
let o = s.options.globalEvent[n];
|
|
2312
2326
|
if (o)
|
|
2313
|
-
return typeof o == "object" && (o = o.handle),
|
|
2327
|
+
return typeof o == "object" && (o = o.handle), z(o);
|
|
2314
2328
|
},
|
|
2315
2329
|
getGlobalData(n) {
|
|
2316
2330
|
return new Promise((o, a) => {
|
|
@@ -2327,11 +2341,11 @@ function Yr(t) {
|
|
|
2327
2341
|
s.setData("$var." + n, o);
|
|
2328
2342
|
},
|
|
2329
2343
|
renderRule(n, o, a) {
|
|
2330
|
-
const u = typeof n == "object" ?
|
|
2344
|
+
const u = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2331
2345
|
return u ? t.$render.createRuleVnode(u, o, a) : void 0;
|
|
2332
2346
|
},
|
|
2333
2347
|
renderChildren(n, o, a) {
|
|
2334
|
-
const u = typeof n == "object" ?
|
|
2348
|
+
const u = typeof n == "object" ? Q(n) : t.getCtx(n);
|
|
2335
2349
|
return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
|
|
2336
2350
|
},
|
|
2337
2351
|
nextTick(n) {
|
|
@@ -2347,6 +2361,10 @@ function Yr(t) {
|
|
|
2347
2361
|
t.deferSyncValue(n, o);
|
|
2348
2362
|
},
|
|
2349
2363
|
bus: t.bus,
|
|
2364
|
+
getCurrentFormRule() {
|
|
2365
|
+
var n;
|
|
2366
|
+
return (n = t.vm.getGroupInject()) == null ? void 0 : n.rule;
|
|
2367
|
+
},
|
|
2350
2368
|
fetch(n) {
|
|
2351
2369
|
return new Promise((o, a) => {
|
|
2352
2370
|
n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
|
|
@@ -2444,7 +2462,7 @@ function ti(t) {
|
|
|
2444
2462
|
const r = (i) => {
|
|
2445
2463
|
if (i) {
|
|
2446
2464
|
let s;
|
|
2447
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2465
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + be(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + be(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2448
2466
|
}
|
|
2449
2467
|
};
|
|
2450
2468
|
return r(this.vm);
|
|
@@ -2453,7 +2471,7 @@ function ti(t) {
|
|
|
2453
2471
|
if (!this.vm.isShow)
|
|
2454
2472
|
return;
|
|
2455
2473
|
this.$manager.beforeRender();
|
|
2456
|
-
const e =
|
|
2474
|
+
const e = Se();
|
|
2457
2475
|
return this.sort.forEach((r) => {
|
|
2458
2476
|
this.renderSlot(e, this.$handle.ctxs[r]);
|
|
2459
2477
|
}), this.$manager.render(e);
|
|
@@ -2464,10 +2482,10 @@ function ti(t) {
|
|
|
2464
2482
|
})) : e.setSlot(r.rule.slot, this.renderCtx(r, i));
|
|
2465
2483
|
},
|
|
2466
2484
|
mergeGlobal(e) {
|
|
2467
|
-
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] =
|
|
2485
|
+
this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = ye(() => {
|
|
2468
2486
|
const i = this.$handle.options.global;
|
|
2469
|
-
return
|
|
2470
|
-
})), e.prop =
|
|
2487
|
+
return ee({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
|
|
2488
|
+
})), e.prop = ee({}, [this.cacheConfig[e.trueType].value, e.prop]));
|
|
2471
2489
|
},
|
|
2472
2490
|
setOptions(e) {
|
|
2473
2491
|
const r = e.loadPending({ key: "options", origin: e.prop.options, def: [] });
|
|
@@ -2480,7 +2498,7 @@ function ti(t) {
|
|
|
2480
2498
|
});
|
|
2481
2499
|
},
|
|
2482
2500
|
parseSide(e, r) {
|
|
2483
|
-
return h.Object(e) ?
|
|
2501
|
+
return h.Object(e) ? ee({ props: { formCreateInject: r.prop.props.formCreateInject } }, e) : e;
|
|
2484
2502
|
},
|
|
2485
2503
|
renderSides(e, r, i) {
|
|
2486
2504
|
const s = r[i ? "rule" : "prop"];
|
|
@@ -2529,8 +2547,8 @@ function ti(t) {
|
|
|
2529
2547
|
})()));
|
|
2530
2548
|
});
|
|
2531
2549
|
const d = this.getTypeSlot(e);
|
|
2532
|
-
let
|
|
2533
|
-
return d ? (u.children = f,
|
|
2550
|
+
let g;
|
|
2551
|
+
return d ? (u.children = f, g = d(u)) : g = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map((y) => !y || !y.tag ? y : this.none(y)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
|
|
2534
2552
|
}, this.setCache(e, s, r);
|
|
2535
2553
|
}
|
|
2536
2554
|
return (...s) => {
|
|
@@ -2612,7 +2630,7 @@ function ti(t) {
|
|
|
2612
2630
|
if (l.indexOf("native.") === 0)
|
|
2613
2631
|
o[l.replace("native.", "")] = n[l], delete n[l];
|
|
2614
2632
|
else if (this.$handle.options.transformEventName !== !1) {
|
|
2615
|
-
const u =
|
|
2633
|
+
const u = be(l);
|
|
2616
2634
|
u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
|
|
2617
2635
|
}
|
|
2618
2636
|
}), e.prop.on = n;
|
|
@@ -2651,7 +2669,7 @@ function ti(t) {
|
|
|
2651
2669
|
}
|
|
2652
2670
|
});
|
|
2653
2671
|
}
|
|
2654
|
-
return
|
|
2672
|
+
return Y(a, e.prop), e.prop;
|
|
2655
2673
|
},
|
|
2656
2674
|
onMounted(e) {
|
|
2657
2675
|
e.el = this.vm.$refs[e.ref], e.el && ((e.el.$el || e.el).__rule__ = e.rule), e.parser.mounted(e), this.$handle.effect(e, "mounted"), this.$handle.targetHook(e, "mounted");
|
|
@@ -2668,7 +2686,7 @@ function ti(t) {
|
|
|
2668
2686
|
},
|
|
2669
2687
|
renderChildren(e, r, i) {
|
|
2670
2688
|
if (!h.trueArray(e)) return [];
|
|
2671
|
-
const s =
|
|
2689
|
+
const s = Se();
|
|
2672
2690
|
return e.map((n) => {
|
|
2673
2691
|
if (n) {
|
|
2674
2692
|
if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
|
|
@@ -2694,7 +2712,7 @@ function ti(t) {
|
|
|
2694
2712
|
},
|
|
2695
2713
|
createRuleVnode(e, r, i) {
|
|
2696
2714
|
this.force = i !== !1, this.tmpInput = r;
|
|
2697
|
-
const s =
|
|
2715
|
+
const s = Se();
|
|
2698
2716
|
return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
|
|
2699
2717
|
},
|
|
2700
2718
|
renderRule(e, r, i) {
|
|
@@ -2709,7 +2727,7 @@ function ti(t) {
|
|
|
2709
2727
|
a && (s = J(a));
|
|
2710
2728
|
}
|
|
2711
2729
|
if (!s) return;
|
|
2712
|
-
const n =
|
|
2730
|
+
const n = Se();
|
|
2713
2731
|
h.trueArray(e.children) && e.children.forEach((a) => {
|
|
2714
2732
|
a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
|
|
2715
2733
|
});
|
|
@@ -2725,7 +2743,7 @@ function rt(t) {
|
|
|
2725
2743
|
fc: t.fc,
|
|
2726
2744
|
vm: t.vm,
|
|
2727
2745
|
$manager: t.$manager,
|
|
2728
|
-
vNode: new t.fc.CreateNode(t
|
|
2746
|
+
vNode: new t.fc.CreateNode(t),
|
|
2729
2747
|
force: !1,
|
|
2730
2748
|
tmpInput: null,
|
|
2731
2749
|
id: ri++
|
|
@@ -2758,7 +2776,7 @@ function ii(t) {
|
|
|
2758
2776
|
if (!s && Array.isArray(r) && r[0] && (h.String(r[0]) || h.Function(r[0])))
|
|
2759
2777
|
return this.parseEventLst(e, r, i, !0);
|
|
2760
2778
|
if (h.String(r)) {
|
|
2761
|
-
const n =
|
|
2779
|
+
const n = z(r);
|
|
2762
2780
|
if (n && r !== n)
|
|
2763
2781
|
return n.__inject ? this.parseEvent(e, n, i, !0) : n;
|
|
2764
2782
|
}
|
|
@@ -2770,8 +2788,8 @@ function ii(t) {
|
|
|
2770
2788
|
let p, d = n || o || a;
|
|
2771
2789
|
if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
|
|
2772
2790
|
r || (d = `native-${d}`);
|
|
2773
|
-
const
|
|
2774
|
-
this.vm.$emit(
|
|
2791
|
+
const g = be(`${d}-${f}`), y = (...C) => {
|
|
2792
|
+
this.vm.$emit(g, ...C), this.vm.$emit("emit-event", g, ...C), this.bus.$emit(g, ...C);
|
|
2775
2793
|
};
|
|
2776
2794
|
if (y.__emit = !0, !p && l === !1)
|
|
2777
2795
|
i[f] = y;
|
|
@@ -2807,11 +2825,11 @@ function ii(t) {
|
|
|
2807
2825
|
},
|
|
2808
2826
|
loadStrVar(e, r, i) {
|
|
2809
2827
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2810
|
-
const s = e, n =
|
|
2828
|
+
const s = e, n = xr(e), o = (u) => {
|
|
2811
2829
|
let f = !1, p;
|
|
2812
2830
|
if (i && u.indexOf("$form.") === 0) {
|
|
2813
2831
|
const d = u.split(".");
|
|
2814
|
-
d.shift(),
|
|
2832
|
+
d.shift(), j(i.value, d[0]) && (f = !0, p = r ? r({
|
|
2815
2833
|
id: "$form." + d[0] + "_" + i.rule.__fc__.id,
|
|
2816
2834
|
getValue: () => B(i.value, d)
|
|
2817
2835
|
}) : B(i.value, d));
|
|
@@ -2823,16 +2841,16 @@ function ii(t) {
|
|
|
2823
2841
|
d.key ? f.push(d.key) : d.children && f.push(a(d.children));
|
|
2824
2842
|
});
|
|
2825
2843
|
let p = !1;
|
|
2826
|
-
return f.forEach((d,
|
|
2827
|
-
d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[
|
|
2844
|
+
return f.forEach((d, g) => {
|
|
2845
|
+
d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[g] = d.slice(1, -1), p = !0);
|
|
2828
2846
|
}), f.length === 1 && (p || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
|
|
2829
2847
|
};
|
|
2830
2848
|
let l;
|
|
2831
2849
|
if (n.forEach((u) => {
|
|
2832
2850
|
const f = u.split("||"), p = f[0].trim();
|
|
2833
2851
|
if (p) {
|
|
2834
|
-
const d = (f[1] || "").trim(),
|
|
2835
|
-
let y = O(() => a(
|
|
2852
|
+
const d = (f[1] || "").trim(), g = Bt(p);
|
|
2853
|
+
let y = O(() => a(g));
|
|
2836
2854
|
(y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2837
2855
|
}
|
|
2838
2856
|
}), n.length === 1 && s === `{{${n[0]}}}`)
|
|
@@ -2896,9 +2914,9 @@ function oi(t) {
|
|
|
2896
2914
|
}
|
|
2897
2915
|
function ai(t) {
|
|
2898
2916
|
Object.defineProperties(t.origin, {
|
|
2899
|
-
__fc__:
|
|
2917
|
+
__fc__: xe(ge(t), !0)
|
|
2900
2918
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
2901
|
-
__fc__:
|
|
2919
|
+
__fc__: xe(ge(t), !0)
|
|
2902
2920
|
});
|
|
2903
2921
|
}
|
|
2904
2922
|
function Ht(t, e, r) {
|
|
@@ -3012,7 +3030,7 @@ _(Ht.prototype, {
|
|
|
3012
3030
|
initProp() {
|
|
3013
3031
|
var e, r;
|
|
3014
3032
|
const t = v({}, this.rule);
|
|
3015
|
-
delete t.children, delete t.validate, this.prop =
|
|
3033
|
+
delete t.children, delete t.validate, this.prop = ee({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
|
|
3016
3034
|
},
|
|
3017
3035
|
initNone() {
|
|
3018
3036
|
this.none = !(h.Undef(this.prop.display) || this.prop.display);
|
|
@@ -3092,10 +3110,10 @@ function li(t) {
|
|
|
3092
3110
|
parseRule(e) {
|
|
3093
3111
|
const r = ct(e);
|
|
3094
3112
|
return Object.defineProperties(r, {
|
|
3095
|
-
__origin__:
|
|
3113
|
+
__origin__: xe(e, !0)
|
|
3096
3114
|
}), ui(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3097
3115
|
i && this.loadFn(i, r);
|
|
3098
|
-
}), this.loadCtrl(r), r.update && (r.update =
|
|
3116
|
+
}), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
|
|
3099
3117
|
},
|
|
3100
3118
|
loadFn(e, r) {
|
|
3101
3119
|
["on", "props", "nativeOn", "deep"].forEach((i) => {
|
|
@@ -3104,12 +3122,12 @@ function li(t) {
|
|
|
3104
3122
|
},
|
|
3105
3123
|
loadCtrl(e) {
|
|
3106
3124
|
e.control && e.control.forEach((r) => {
|
|
3107
|
-
r.handle && (r.handle =
|
|
3125
|
+
r.handle && (r.handle = z(r.handle));
|
|
3108
3126
|
});
|
|
3109
3127
|
},
|
|
3110
3128
|
syncProp(e) {
|
|
3111
3129
|
const r = e.rule;
|
|
3112
|
-
h.trueArray(r.sync) &&
|
|
3130
|
+
h.trueArray(r.sync) && Y([{
|
|
3113
3131
|
on: r.sync.reduce((i, s) => (i[typeof s == "object" && s.event || `update:${s}`] = (n) => {
|
|
3114
3132
|
r.props[typeof s == "object" && s.prop || s] = n, this.vm.$emit("sync", s, n, r, this.fapi);
|
|
3115
3133
|
}, i), {})
|
|
@@ -3143,23 +3161,23 @@ function li(t) {
|
|
|
3143
3161
|
let l = ct(o);
|
|
3144
3162
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3145
3163
|
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);
|
|
3146
|
-
let f, p = !1, d = !!o.__fc__,
|
|
3164
|
+
let f, p = !1, d = !!o.__fc__, g = l.value;
|
|
3147
3165
|
if (d) {
|
|
3148
|
-
if (f = o.__fc__,
|
|
3166
|
+
if (f = o.__fc__, g = f.defaultValue, f.deleted) {
|
|
3149
3167
|
if ($t(f))
|
|
3150
3168
|
return;
|
|
3151
3169
|
f.update(this);
|
|
3152
3170
|
} else if (!f.check(this)) {
|
|
3153
3171
|
if ($t(f))
|
|
3154
3172
|
return;
|
|
3155
|
-
e[a] = o = o._clone ? o._clone() : Vt(
|
|
3173
|
+
e[a] = o = o._clone ? o._clone() : Vt(we(o)), f = null, p = !0;
|
|
3156
3174
|
}
|
|
3157
3175
|
}
|
|
3158
3176
|
if (f)
|
|
3159
3177
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3160
3178
|
else {
|
|
3161
3179
|
const F = this.parseRule(o);
|
|
3162
|
-
f = new Ht(this, F,
|
|
3180
|
+
f = new Ht(this, F, g), this.bindParser(f);
|
|
3163
3181
|
}
|
|
3164
3182
|
[!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");
|
|
3165
3183
|
const y = f.loadChildrenPending();
|
|
@@ -3182,7 +3200,7 @@ function li(t) {
|
|
|
3182
3200
|
if (!r.length) return !1;
|
|
3183
3201
|
for (let a = 0; a < r.length; a++) {
|
|
3184
3202
|
const l = r[a], u = l.handle || function(p) {
|
|
3185
|
-
return (
|
|
3203
|
+
return (fe[l.condition || "=="] || fe["=="])(p, l.value);
|
|
3186
3204
|
};
|
|
3187
3205
|
if (!h.trueArray(l.rule)) continue;
|
|
3188
3206
|
const f = q(v({}, l), {
|
|
@@ -3196,13 +3214,13 @@ function li(t) {
|
|
|
3196
3214
|
const n = [];
|
|
3197
3215
|
let o = !1;
|
|
3198
3216
|
return this.deferSyncValue(() => {
|
|
3199
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl:
|
|
3217
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl: g, method: y }) => {
|
|
3200
3218
|
if (a) {
|
|
3201
3219
|
l ? e.ctrlRule.push({
|
|
3202
3220
|
__ctrl: !0,
|
|
3203
3221
|
children: u,
|
|
3204
3222
|
valid: l
|
|
3205
|
-
}) :
|
|
3223
|
+
}) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3206
3224
|
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((C) => {
|
|
3207
3225
|
this.api.setEffect(C, "required", l);
|
|
3208
3226
|
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
@@ -3221,8 +3239,8 @@ function li(t) {
|
|
|
3221
3239
|
f ? s.prepend(C, f, d) : p || d ? s.append(C, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, C);
|
|
3222
3240
|
});
|
|
3223
3241
|
} else {
|
|
3224
|
-
e.ctrlRule.splice(e.ctrlRule.indexOf(
|
|
3225
|
-
const C =
|
|
3242
|
+
e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
|
|
3243
|
+
const C = Q(g);
|
|
3226
3244
|
C && C.rm();
|
|
3227
3245
|
}
|
|
3228
3246
|
});
|
|
@@ -3253,7 +3271,7 @@ function li(t) {
|
|
|
3253
3271
|
function ui(t) {
|
|
3254
3272
|
const e = Lt();
|
|
3255
3273
|
return Object.keys(e).forEach((r) => {
|
|
3256
|
-
|
|
3274
|
+
j(t, r) || k(t, r, e[r]);
|
|
3257
3275
|
}), t;
|
|
3258
3276
|
}
|
|
3259
3277
|
function fi(t) {
|
|
@@ -3293,7 +3311,7 @@ function hi(t) {
|
|
|
3293
3311
|
this.deferSyncValue(() => {
|
|
3294
3312
|
const i = e.getParentGroup(), s = i ? this.subRuleData[i.id] : null, n = {};
|
|
3295
3313
|
Object.keys(r || {}).forEach((o) => {
|
|
3296
|
-
s &&
|
|
3314
|
+
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]);
|
|
3297
3315
|
}), Object.keys(n).length && this.api.setChildrenFormData(i.rule, n);
|
|
3298
3316
|
});
|
|
3299
3317
|
},
|
|
@@ -3323,7 +3341,7 @@ function hi(t) {
|
|
|
3323
3341
|
return e.rule.ignore === !0 || (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields) && e.hasHidden();
|
|
3324
3342
|
},
|
|
3325
3343
|
appendValue(e) {
|
|
3326
|
-
(!e.field || !
|
|
3344
|
+
(!e.field || !j(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3327
3345
|
},
|
|
3328
3346
|
addSubForm(e, r) {
|
|
3329
3347
|
this.subForm[e.id] = r;
|
|
@@ -3376,7 +3394,7 @@ function hi(t) {
|
|
|
3376
3394
|
function bt(t, e) {
|
|
3377
3395
|
return typeof e == "function" ? "" + e : e;
|
|
3378
3396
|
}
|
|
3379
|
-
const
|
|
3397
|
+
const De = {
|
|
3380
3398
|
init(t) {
|
|
3381
3399
|
},
|
|
3382
3400
|
toFormValue(t, e) {
|
|
@@ -3395,7 +3413,7 @@ const je = {
|
|
|
3395
3413
|
},
|
|
3396
3414
|
mergeProp(t) {
|
|
3397
3415
|
}
|
|
3398
|
-
}, di = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"],
|
|
3416
|
+
}, di = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Ce = Symbol("oldValue");
|
|
3399
3417
|
function pi(t) {
|
|
3400
3418
|
_(t.prototype, {
|
|
3401
3419
|
getCtx(e) {
|
|
@@ -3431,7 +3449,7 @@ function pi(t) {
|
|
|
3431
3449
|
if (n)
|
|
3432
3450
|
return n;
|
|
3433
3451
|
}
|
|
3434
|
-
return r[e.originType] || r[J(e.type)] || r[e.trueType] ||
|
|
3452
|
+
return r[e.originType] || r[J(e.type)] || r[e.trueType] || De;
|
|
3435
3453
|
},
|
|
3436
3454
|
bindParser(e) {
|
|
3437
3455
|
e.setParser(this.getParser(e));
|
|
@@ -3444,7 +3462,7 @@ function pi(t) {
|
|
|
3444
3462
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3445
3463
|
},
|
|
3446
3464
|
watchCtx(e) {
|
|
3447
|
-
if (
|
|
3465
|
+
if (jt().filter((i) => i[0] !== "_" && i[0] !== "$" && di.indexOf(i) === -1).forEach((i) => {
|
|
3448
3466
|
const s = Ae(e.rule, i), n = i === "children";
|
|
3449
3467
|
e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3450
3468
|
let l = s.value;
|
|
@@ -3466,21 +3484,21 @@ function pi(t) {
|
|
|
3466
3484
|
this.$render.clearCache(e), this.refresh(), this.watching = !1;
|
|
3467
3485
|
}
|
|
3468
3486
|
}, { deep: !n, sync: n }));
|
|
3469
|
-
}), e.refRule.__$title =
|
|
3487
|
+
}), e.refRule.__$title = ye(() => {
|
|
3470
3488
|
let i = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
|
|
3471
3489
|
if (i) {
|
|
3472
3490
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3473
3491
|
s && (i = this.api.t(s[1]));
|
|
3474
3492
|
}
|
|
3475
3493
|
return i;
|
|
3476
|
-
}), e.refRule.__$info =
|
|
3494
|
+
}), e.refRule.__$info = ye(() => {
|
|
3477
3495
|
let i = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
|
|
3478
3496
|
if (i) {
|
|
3479
3497
|
const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
3480
3498
|
s && (i = this.api.t(s[1]));
|
|
3481
3499
|
}
|
|
3482
3500
|
return i;
|
|
3483
|
-
}), e.refRule.__$validate =
|
|
3501
|
+
}), e.refRule.__$validate = ye(() => {
|
|
3484
3502
|
const i = (s) => {
|
|
3485
3503
|
var o, a;
|
|
3486
3504
|
const n = s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
|
|
@@ -3521,16 +3539,16 @@ function pi(t) {
|
|
|
3521
3539
|
this.bus.$once("load-end", () => {
|
|
3522
3540
|
let i = e.rule.computed;
|
|
3523
3541
|
i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
|
|
3524
|
-
const n =
|
|
3542
|
+
const n = ye(() => {
|
|
3525
3543
|
const a = i[s];
|
|
3526
3544
|
if (!a) return;
|
|
3527
3545
|
const l = this.compute(e, a);
|
|
3528
|
-
return a.linkage && l ===
|
|
3546
|
+
return (a.linkage || a.linkageVariable) && l === Ce ? Ce : l;
|
|
3529
3547
|
}), o = (a) => {
|
|
3530
3548
|
s === "value" ? this.onInput(e, a) : s[0] === "$" ? this.api.setEffect(e.id, s, a) : oe(e.rule, s, a);
|
|
3531
3549
|
};
|
|
3532
3550
|
(s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : n.value !== B(e.rule, s)) && o(n.value), e.watch.push(L(n, (a, l) => {
|
|
3533
|
-
a ===
|
|
3551
|
+
a === Ce || a === l || setTimeout(() => {
|
|
3534
3552
|
o(a);
|
|
3535
3553
|
});
|
|
3536
3554
|
}, { deep: !0 }));
|
|
@@ -3660,22 +3678,22 @@ function pi(t) {
|
|
|
3660
3678
|
let u = !0;
|
|
3661
3679
|
for (let f = 0; f < a.group.length; f++) {
|
|
3662
3680
|
const p = a.group[f];
|
|
3663
|
-
let d,
|
|
3681
|
+
let d, g = null;
|
|
3664
3682
|
if (p.variable)
|
|
3665
|
-
|
|
3683
|
+
g = JSON.stringify(this.fc.getLoadData(p.variable)) || "";
|
|
3666
3684
|
else if (p.field)
|
|
3667
|
-
|
|
3685
|
+
g = dt(p.field || "");
|
|
3668
3686
|
else if (!p.mode)
|
|
3669
3687
|
return !0;
|
|
3670
3688
|
let y = p.compare;
|
|
3671
|
-
if (y && (y = dt(y || "")), p.mode ? d = n(p) :
|
|
3689
|
+
if (y && (y = dt(y || "")), p.mode ? d = n(p) : fe[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}'](${g}, ${y || "$val"}); }}}}`).call(this.api.form, fe, 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)
|
|
3672
3690
|
return !0;
|
|
3673
3691
|
l || (u = u && d);
|
|
3674
3692
|
}
|
|
3675
3693
|
return l ? !1 : u;
|
|
3676
3694
|
};
|
|
3677
3695
|
let o = n(r);
|
|
3678
|
-
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) :
|
|
3696
|
+
return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : Ce : r.linkageVariable ? o ? O(() => this.fc.getLoadData(r.linkageVariable), void 0) : Ce : o;
|
|
3679
3697
|
} else if (h.Function(r))
|
|
3680
3698
|
i = () => r(this.api.form, this.api);
|
|
3681
3699
|
else {
|
|
@@ -3712,7 +3730,7 @@ function pi(t) {
|
|
|
3712
3730
|
const { id: r, field: i, input: s, name: n } = e;
|
|
3713
3731
|
ie(this.ctxs, r), ie(this.formData, r), ie(this.subForm, r), ie(this.vm.ctxInject, r);
|
|
3714
3732
|
const o = e.getParentGroup();
|
|
3715
|
-
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 && !
|
|
3733
|
+
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(() => {
|
|
3716
3734
|
if (!this.reloading) {
|
|
3717
3735
|
if (e.parser.loadChildren !== !1) {
|
|
3718
3736
|
const l = e.getPending("children", e.rule.children);
|
|
@@ -3740,19 +3758,19 @@ function mi(t) {
|
|
|
3740
3758
|
emitEvent(e, ...r) {
|
|
3741
3759
|
const i = this.options[e] || this.options[J("on-" + e)];
|
|
3742
3760
|
if (i) {
|
|
3743
|
-
const s =
|
|
3761
|
+
const s = z(i);
|
|
3744
3762
|
h.Function(s) && O(() => s(...r));
|
|
3745
3763
|
}
|
|
3746
3764
|
this.bus.$emit(e, ...r);
|
|
3747
3765
|
},
|
|
3748
3766
|
targetHook(e, r, i) {
|
|
3749
3767
|
var l, u, f, p;
|
|
3750
|
-
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d,
|
|
3768
|
+
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, g) => {
|
|
3751
3769
|
d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
|
|
3752
3770
|
O(() => y(q(v({}, i || {}), {
|
|
3753
3771
|
self: e.rule,
|
|
3754
3772
|
rule: e.rule,
|
|
3755
|
-
parent:
|
|
3773
|
+
parent: g == null ? void 0 : g.rule,
|
|
3756
3774
|
$f: this.api,
|
|
3757
3775
|
api: this.api,
|
|
3758
3776
|
option: this.vm.$props.option
|
|
@@ -3774,23 +3792,23 @@ function gi(t) {
|
|
|
3774
3792
|
const e = this.fc.providers;
|
|
3775
3793
|
Object.keys(e).forEach((r) => {
|
|
3776
3794
|
let i = e[r];
|
|
3777
|
-
h.Function(i) && (i = i(this.fc)), i._c = $i(i), this.onEffect(i), this.providers[r] = i;
|
|
3795
|
+
h.Function(i) && (i = i(this.fc)), i._c = $i(i), this.onEffect(i, r), this.providers[r] = i;
|
|
3778
3796
|
});
|
|
3779
3797
|
},
|
|
3780
|
-
onEffect(e) {
|
|
3781
|
-
const
|
|
3782
|
-
(e._c || ["*"]).forEach((
|
|
3783
|
-
const
|
|
3784
|
-
|
|
3785
|
-
e[
|
|
3798
|
+
onEffect(e, r) {
|
|
3799
|
+
const i = [];
|
|
3800
|
+
(e._c || ["*"]).forEach((s) => {
|
|
3801
|
+
const n = s === "*" ? "*" : this.getType(s);
|
|
3802
|
+
i.indexOf(n) > -1 || (i.push(n), this.bus.$on(`p:${r || e.name}:${n}:${e.input ? 1 : 0}`, (o, a) => {
|
|
3803
|
+
e[o] && e[o](...a);
|
|
3786
3804
|
}));
|
|
3787
|
-
}), e._used =
|
|
3805
|
+
}), e._used = i;
|
|
3788
3806
|
},
|
|
3789
3807
|
watchEffect(e) {
|
|
3790
3808
|
let r = {
|
|
3791
3809
|
required: () => {
|
|
3792
3810
|
var i, s;
|
|
3793
|
-
return (
|
|
3811
|
+
return (j(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
|
|
3794
3812
|
}
|
|
3795
3813
|
};
|
|
3796
3814
|
Object.keys(e.rule.effect || {}).forEach((i) => {
|
|
@@ -3820,9 +3838,9 @@ function gi(t) {
|
|
|
3820
3838
|
}, r);
|
|
3821
3839
|
},
|
|
3822
3840
|
getEffect(e, r) {
|
|
3823
|
-
if (
|
|
3841
|
+
if (j(e, "$" + r))
|
|
3824
3842
|
return e["$" + r];
|
|
3825
|
-
if (
|
|
3843
|
+
if (j(e, "effect") && j(e.effect, r))
|
|
3826
3844
|
return e.effect[r];
|
|
3827
3845
|
},
|
|
3828
3846
|
emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
|
|
@@ -3839,7 +3857,7 @@ function gi(t) {
|
|
|
3839
3857
|
else
|
|
3840
3858
|
return;
|
|
3841
3859
|
const d = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3842
|
-
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (
|
|
3860
|
+
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (g) => ee(d.getProp(), [g]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
|
|
3843
3861
|
});
|
|
3844
3862
|
}
|
|
3845
3863
|
});
|
|
@@ -3865,7 +3883,7 @@ function X(t) {
|
|
|
3865
3883
|
return t.bus;
|
|
3866
3884
|
},
|
|
3867
3885
|
preview() {
|
|
3868
|
-
return t.vm.$
|
|
3886
|
+
return t.vm.$props.preview != null ? t.vm.$props.preview : t.vm.parent && t.vm.parent.$props.preview != null ? t.vm.parent.$props.preview : t.options.value.preview || !1;
|
|
3869
3887
|
}
|
|
3870
3888
|
}), _(this, {
|
|
3871
3889
|
fc: t,
|
|
@@ -3910,7 +3928,7 @@ _(X.prototype, {
|
|
|
3910
3928
|
this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created");
|
|
3911
3929
|
},
|
|
3912
3930
|
updateAppendData() {
|
|
3913
|
-
this.appendData = v(v(v({}, this.options.formData || {}), this.fc.vm.$
|
|
3931
|
+
this.appendData = v(v(v({}, this.options.formData || {}), this.fc.vm.$props.value || {}), this.appendData);
|
|
3914
3932
|
},
|
|
3915
3933
|
isBreakWatch() {
|
|
3916
3934
|
return this.loading || this.noWatchFn || this.reloading;
|
|
@@ -3960,22 +3978,24 @@ function _i() {
|
|
|
3960
3978
|
}
|
|
3961
3979
|
return _(e.prototype, {
|
|
3962
3980
|
setVm(r) {
|
|
3963
|
-
this.vm = r, this.h = this.$h = r.$createElement;
|
|
3981
|
+
this.handle = r, this.vm = r.vm, this.h = this.$h = r.vm.$createElement;
|
|
3964
3982
|
},
|
|
3965
3983
|
make(r, i, s) {
|
|
3966
3984
|
var n, o, a;
|
|
3967
|
-
return (
|
|
3985
|
+
return ($e.isReservedTag ? $e.isReservedTag(r) : (o = (n = $e) == 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);
|
|
3968
3986
|
},
|
|
3969
3987
|
makeComponent(r, i, s) {
|
|
3970
|
-
var
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3988
|
+
var a;
|
|
3989
|
+
const n = this.handle.fc.prop.components[r];
|
|
3990
|
+
n && (r = n);
|
|
3991
|
+
let o = this.$h(r, vi(i), s || []);
|
|
3992
|
+
if ((a = o == null ? void 0 : o.componentOptions) != null && a.propsData && (i != null && i.props)) {
|
|
3993
|
+
const l = Object.keys(o.componentOptions.propsData);
|
|
3994
|
+
o.data.attrs || (o.data.attrs = {}), Object.keys(i.props).forEach((u) => {
|
|
3995
|
+
o.data.attrs[u] == null && l.indexOf(u) === -1 && ["string", "number", "boolean"].indexOf(typeof i.props[u]) > -1 && (o.data.attrs[u] = i.props[u]);
|
|
3976
3996
|
});
|
|
3977
3997
|
}
|
|
3978
|
-
return
|
|
3998
|
+
return o.context = this.vm, o;
|
|
3979
3999
|
},
|
|
3980
4000
|
aliasMap: t
|
|
3981
4001
|
}), _(e, {
|
|
@@ -3985,10 +4005,10 @@ function _i() {
|
|
|
3985
4005
|
},
|
|
3986
4006
|
use(r) {
|
|
3987
4007
|
Object.keys(r).forEach((i) => {
|
|
3988
|
-
const s =
|
|
3989
|
-
[i, s, n].forEach((a) => {
|
|
3990
|
-
e.
|
|
3991
|
-
return this.make(
|
|
4008
|
+
const s = be(i), n = At(i).toLocaleLowerCase(), o = r[i];
|
|
4009
|
+
e.alias(i, o), [i, s, n].forEach((a) => {
|
|
4010
|
+
e.prototype[a] = function(l, u) {
|
|
4011
|
+
return this.make(t[i] || a, l, u);
|
|
3992
4012
|
};
|
|
3993
4013
|
});
|
|
3994
4014
|
});
|
|
@@ -4041,7 +4061,7 @@ _(Gt.prototype, {
|
|
|
4041
4061
|
return e(this.vm);
|
|
4042
4062
|
},
|
|
4043
4063
|
mergeOptions(t, e) {
|
|
4044
|
-
return
|
|
4064
|
+
return Y(t.map((r) => this.tidyOptions(r)), e, this.mergeOptionsRule);
|
|
4045
4065
|
},
|
|
4046
4066
|
updateOptions(t) {
|
|
4047
4067
|
this.$handle.fc.targetFormDriver("updateOptions", t, { handle: this.$handle, api: this.$handle.api }), this.options = this.mergeOptions([t], this.getDefaultOptions()), this.update();
|
|
@@ -4074,10 +4094,10 @@ const wi = function(t) {
|
|
|
4074
4094
|
let l = (p) => {
|
|
4075
4095
|
let d;
|
|
4076
4096
|
i && i.__fc__ && (d = i.__fc__.getParentGroup());
|
|
4077
|
-
let
|
|
4078
|
-
a.template ?
|
|
4097
|
+
let g;
|
|
4098
|
+
a.template ? g = t.$handle.loadStrVar(a.template, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null) : a.handler && h.Function(a.handler) ? g = a.handler(p, i, s) : g = t.$handle.loadStrVar(`{{${a.attr}}}`, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null), (g == null || g === "") && a.default != null && (g = a.default), a.copy !== !1 && (g = K(g));
|
|
4079
4099
|
const y = a.modify ? i : r.getProp();
|
|
4080
|
-
a.to === "child" ? y.children ? k(y.children, 0,
|
|
4100
|
+
a.to === "child" ? y.children ? k(y.children, 0, g) : k(y, "children", [g]) : oe(y, a.to || "options", g), s.sync(i);
|
|
4081
4101
|
}, u = (p) => l(p);
|
|
4082
4102
|
const f = t.watchLoadData(u);
|
|
4083
4103
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4104,11 +4124,11 @@ const wi = function(t) {
|
|
|
4104
4124
|
const l = n[a];
|
|
4105
4125
|
if (l) {
|
|
4106
4126
|
const u = typeof l == "object";
|
|
4107
|
-
let f = (
|
|
4108
|
-
let y = t.t(u ? l.attr : l, u ? l.params : null,
|
|
4127
|
+
let f = (g) => {
|
|
4128
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, g);
|
|
4109
4129
|
const C = u && l.modify ? i : r.getProp();
|
|
4110
4130
|
a === "child" ? C.children ? k(C.children, 0, y) : k(C, "children", [y]) : oe(C, a, y), s.sync(i);
|
|
4111
|
-
}, p = (
|
|
4131
|
+
}, p = (g) => f(g);
|
|
4112
4132
|
const d = t.watchLoadData(p);
|
|
4113
4133
|
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
4114
4134
|
}
|
|
@@ -4131,7 +4151,7 @@ const wi = function(t) {
|
|
|
4131
4151
|
h.Object(i) || (i = { method: i });
|
|
4132
4152
|
const s = i.method, n = q(v({}, i), {
|
|
4133
4153
|
validator(...o) {
|
|
4134
|
-
const a =
|
|
4154
|
+
const a = Q(e);
|
|
4135
4155
|
if (a)
|
|
4136
4156
|
return r.exec(a.id, h.String(s) ? s : "formCreateValidate", ...o, {
|
|
4137
4157
|
attr: t,
|
|
@@ -4163,18 +4183,7 @@ const wi = function(t) {
|
|
|
4163
4183
|
l(void 0);
|
|
4164
4184
|
return;
|
|
4165
4185
|
}
|
|
4166
|
-
|
|
4167
|
-
const p = t.$handle.options.globalData[a.key];
|
|
4168
|
-
if (!p) {
|
|
4169
|
-
l(void 0);
|
|
4170
|
-
return;
|
|
4171
|
-
}
|
|
4172
|
-
if (p.type === "static") {
|
|
4173
|
-
l(p.data);
|
|
4174
|
-
return;
|
|
4175
|
-
} else
|
|
4176
|
-
a = v(v({}, a), p);
|
|
4177
|
-
}
|
|
4186
|
+
a = K(a), a.to || (a.to = "options");
|
|
4178
4187
|
const u = a.onError, f = () => {
|
|
4179
4188
|
if (!s.getValue())
|
|
4180
4189
|
return s.clearProp(), o.sync(n), !0;
|
|
@@ -4182,22 +4191,30 @@ const wi = function(t) {
|
|
|
4182
4191
|
i._fn[s.id] = t.watchLoadData(se((p, d) => {
|
|
4183
4192
|
if (d && a.watch === !1)
|
|
4184
4193
|
return i._fn[s.id]();
|
|
4185
|
-
|
|
4194
|
+
if (a.key) {
|
|
4195
|
+
const C = p("$globalData." + a.key);
|
|
4196
|
+
if (C) {
|
|
4197
|
+
if (f()) return;
|
|
4198
|
+
l(C);
|
|
4199
|
+
}
|
|
4200
|
+
return;
|
|
4201
|
+
}
|
|
4202
|
+
const g = t.$handle.loadFetchVar(K(a), p, n), y = q(v({
|
|
4186
4203
|
headers: {}
|
|
4187
|
-
},
|
|
4204
|
+
}, g), {
|
|
4188
4205
|
onSuccess(C, F) {
|
|
4189
4206
|
if (f()) return;
|
|
4190
|
-
let G = (N) => F ? N :
|
|
4191
|
-
const V =
|
|
4207
|
+
let G = (N) => F ? N : j(N, "data") ? N.data : N;
|
|
4208
|
+
const V = z(g.parse);
|
|
4192
4209
|
h.Function(V) ? G = V : V && h.String(V) && (G = (N) => B(N, V)), l(G(C, n, o));
|
|
4193
4210
|
},
|
|
4194
4211
|
onError(C) {
|
|
4195
|
-
l(void 0), !f() && (u || ((F) => et(F.message || "fetch fail " +
|
|
4212
|
+
l(void 0), !f() && (u || ((F) => et(F.message || "fetch fail " + g.action)))(C, n, o);
|
|
4196
4213
|
}
|
|
4197
4214
|
});
|
|
4198
4215
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4199
|
-
if (h.Function(
|
|
4200
|
-
|
|
4216
|
+
if (h.Function(g.action)) {
|
|
4217
|
+
g.action(n, o).then((C) => {
|
|
4201
4218
|
y.onSuccess(C, !0);
|
|
4202
4219
|
}).catch((C) => {
|
|
4203
4220
|
y.onError(C);
|
|
@@ -4263,7 +4280,7 @@ const Si = "html", Ri = {
|
|
|
4263
4280
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4264
4281
|
}
|
|
4265
4282
|
};
|
|
4266
|
-
function
|
|
4283
|
+
function ji(t) {
|
|
4267
4284
|
t = t + "=";
|
|
4268
4285
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4269
4286
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4281,7 +4298,7 @@ function Di(t) {
|
|
|
4281
4298
|
}
|
|
4282
4299
|
return null;
|
|
4283
4300
|
}
|
|
4284
|
-
function
|
|
4301
|
+
function Di(t) {
|
|
4285
4302
|
const e = localStorage.getItem(t);
|
|
4286
4303
|
if (e)
|
|
4287
4304
|
try {
|
|
@@ -4309,10 +4326,10 @@ function it(t, e) {
|
|
|
4309
4326
|
return r.length ? i == null ? null : B(i, r) : i;
|
|
4310
4327
|
}
|
|
4311
4328
|
function Vi(t) {
|
|
4312
|
-
return it(
|
|
4329
|
+
return it(ji, t);
|
|
4313
4330
|
}
|
|
4314
4331
|
function Ii(t) {
|
|
4315
|
-
return it(
|
|
4332
|
+
return it(Di, t);
|
|
4316
4333
|
}
|
|
4317
4334
|
function Pi(t) {
|
|
4318
4335
|
return it(Ai, t);
|
|
@@ -4401,16 +4418,16 @@ function Kt(t) {
|
|
|
4401
4418
|
t.extendApi
|
|
4402
4419
|
], u = v({}, ki), f = Zr();
|
|
4403
4420
|
let p = { global: {} };
|
|
4404
|
-
const d = t.isMobile === !0,
|
|
4421
|
+
const d = t.isMobile === !0, g = ne({
|
|
4405
4422
|
$mobile: d
|
|
4406
4423
|
}), y = _i(), C = {}, F = {};
|
|
4407
4424
|
Mi(t.attrs || {});
|
|
4408
4425
|
function G(c) {
|
|
4409
|
-
const
|
|
4410
|
-
if (Array.isArray(
|
|
4411
|
-
return
|
|
4412
|
-
if (
|
|
4413
|
-
return
|
|
4426
|
+
const m = U[c];
|
|
4427
|
+
if (Array.isArray(m))
|
|
4428
|
+
return m.map(($) => $.api());
|
|
4429
|
+
if (m)
|
|
4430
|
+
return m.api();
|
|
4414
4431
|
}
|
|
4415
4432
|
function V(c) {
|
|
4416
4433
|
o.push(c);
|
|
@@ -4419,7 +4436,7 @@ function Kt(t) {
|
|
|
4419
4436
|
const c = Ne(...arguments);
|
|
4420
4437
|
c.id && c.prop && (i[c.id] = c.prop);
|
|
4421
4438
|
}
|
|
4422
|
-
function
|
|
4439
|
+
function he() {
|
|
4423
4440
|
const c = Ne(...arguments);
|
|
4424
4441
|
c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
|
|
4425
4442
|
name: c.id
|
|
@@ -4428,41 +4445,41 @@ function Kt(t) {
|
|
|
4428
4445
|
function Ie(c) {
|
|
4429
4446
|
y.use(c);
|
|
4430
4447
|
}
|
|
4431
|
-
function
|
|
4448
|
+
function de() {
|
|
4432
4449
|
const c = Ne(...arguments);
|
|
4433
|
-
if (!c.id || !c.prop) return
|
|
4434
|
-
const
|
|
4435
|
-
r[
|
|
4450
|
+
if (!c.id || !c.prop) return De;
|
|
4451
|
+
const m = J(c.id), $ = c.prop, b = $.merge === !0 ? r[m] : void 0;
|
|
4452
|
+
r[m] = Re($, b || De), f[m] = T(m), $.maker && _(f, $.maker);
|
|
4436
4453
|
}
|
|
4437
|
-
function E(c,
|
|
4454
|
+
function E(c, m) {
|
|
4438
4455
|
let $;
|
|
4439
4456
|
if (h.String(c)) {
|
|
4440
|
-
if ($ = c,
|
|
4441
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4457
|
+
if ($ = c, m === void 0)
|
|
4458
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? S() : e[$];
|
|
4442
4459
|
} else
|
|
4443
|
-
$ = J(c.name),
|
|
4444
|
-
if (!$ || !
|
|
4460
|
+
$ = J(c.name), m = c;
|
|
4461
|
+
if (!$ || !m) return;
|
|
4445
4462
|
const b = J($);
|
|
4446
|
-
e[$] =
|
|
4463
|
+
e[$] = m, e[b] = m, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], m.formCreateParser && de($, m.formCreateParser);
|
|
4447
4464
|
}
|
|
4448
|
-
function
|
|
4449
|
-
return
|
|
4465
|
+
function S() {
|
|
4466
|
+
return zr(Te, e, i);
|
|
4450
4467
|
}
|
|
4451
4468
|
function M() {
|
|
4452
4469
|
return Le;
|
|
4453
4470
|
}
|
|
4454
|
-
function
|
|
4455
|
-
return h.Function(c.install) ? c.install(W,
|
|
4471
|
+
function pe(c, m) {
|
|
4472
|
+
return h.Function(c.install) ? c.install(W, m) : h.Function(c) && c(W, m), this;
|
|
4456
4473
|
}
|
|
4457
|
-
function W(c,
|
|
4458
|
-
let b = Ni(c,
|
|
4474
|
+
function W(c, m, $) {
|
|
4475
|
+
let b = Ni(c, m || {});
|
|
4459
4476
|
const w = b.$refs.fc.formCreate;
|
|
4460
4477
|
return w.$parent = $, Li(w.options).appendChild(b.$el), w.api();
|
|
4461
4478
|
}
|
|
4462
|
-
|
|
4463
|
-
function
|
|
4464
|
-
let
|
|
4465
|
-
return c ?
|
|
4479
|
+
Re(W, F);
|
|
4480
|
+
function xt(c) {
|
|
4481
|
+
let m = v({}, t);
|
|
4482
|
+
return c ? m.inherit = {
|
|
4466
4483
|
components: e,
|
|
4467
4484
|
parsers: r,
|
|
4468
4485
|
directives: i,
|
|
@@ -4471,53 +4488,53 @@ function Kt(t) {
|
|
|
4471
4488
|
useApps: o,
|
|
4472
4489
|
maker: f,
|
|
4473
4490
|
formulas: C,
|
|
4474
|
-
loadData:
|
|
4475
|
-
} : delete
|
|
4491
|
+
loadData: g
|
|
4492
|
+
} : delete m.inherit, Kt(m);
|
|
4476
4493
|
}
|
|
4477
|
-
function
|
|
4478
|
-
s[c] =
|
|
4494
|
+
function zt(c, m) {
|
|
4495
|
+
s[c] = m;
|
|
4479
4496
|
}
|
|
4480
|
-
function Xt(c,
|
|
4481
|
-
C[c] =
|
|
4497
|
+
function Xt(c, m) {
|
|
4498
|
+
C[c] = m;
|
|
4482
4499
|
}
|
|
4483
|
-
function Zt(c,
|
|
4500
|
+
function Zt(c, m) {
|
|
4484
4501
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4485
|
-
|
|
4486
|
-
b[w] =
|
|
4487
|
-
}),
|
|
4502
|
+
m.parsers && Object.keys(m.parsers).forEach((w) => {
|
|
4503
|
+
b[w] = Re(m.parsers[w], De);
|
|
4504
|
+
}), m.name = c, n[c] = q(v(v({}, $), m), { parsers: b });
|
|
4488
4505
|
}
|
|
4489
|
-
function
|
|
4490
|
-
c && Object.keys(U).forEach((
|
|
4491
|
-
(Array.isArray(U[
|
|
4506
|
+
function Fe(c) {
|
|
4507
|
+
c && Object.keys(U).forEach((m) => {
|
|
4508
|
+
(Array.isArray(U[m]) ? U[m] : [U[m]]).forEach((b) => {
|
|
4492
4509
|
b.bus.$emit("$loadData." + c);
|
|
4493
4510
|
});
|
|
4494
4511
|
});
|
|
4495
4512
|
}
|
|
4496
|
-
function Pe(c,
|
|
4497
|
-
oe(
|
|
4513
|
+
function Pe(c, m) {
|
|
4514
|
+
oe(g, c, m), Fe(c);
|
|
4498
4515
|
}
|
|
4499
|
-
function
|
|
4500
|
-
const $ = (...b) => O(() =>
|
|
4516
|
+
function ke(c, m) {
|
|
4517
|
+
const $ = (...b) => O(() => m(...b));
|
|
4501
4518
|
$._driver = !0, Pe(c, $);
|
|
4502
4519
|
}
|
|
4503
|
-
function nt(c,
|
|
4520
|
+
function nt(c, m) {
|
|
4504
4521
|
const $ = (c || "").split(".");
|
|
4505
4522
|
c = $.shift();
|
|
4506
4523
|
const b = $.join(".");
|
|
4507
|
-
if (
|
|
4508
|
-
let w =
|
|
4509
|
-
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ?
|
|
4524
|
+
if (j(g, c) || k(g, c, vt), g[c] !== vt) {
|
|
4525
|
+
let w = g[c];
|
|
4526
|
+
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ? m : w;
|
|
4510
4527
|
} else
|
|
4511
|
-
return
|
|
4528
|
+
return m;
|
|
4512
4529
|
}
|
|
4513
4530
|
function Qt(c) {
|
|
4514
4531
|
l.push(c);
|
|
4515
4532
|
}
|
|
4516
4533
|
function Yt(c) {
|
|
4517
|
-
delete
|
|
4534
|
+
delete g[c], Fe(c);
|
|
4518
4535
|
}
|
|
4519
|
-
function er(c,
|
|
4520
|
-
a.push({ name: c, callback:
|
|
4536
|
+
function er(c, m) {
|
|
4537
|
+
a.push({ name: c, callback: m });
|
|
4521
4538
|
}
|
|
4522
4539
|
function Te(c) {
|
|
4523
4540
|
_(this, {
|
|
@@ -4530,9 +4547,9 @@ function Kt(t) {
|
|
|
4530
4547
|
modelFields: s,
|
|
4531
4548
|
formulas: C,
|
|
4532
4549
|
isMobile: d,
|
|
4533
|
-
rules: c.$
|
|
4534
|
-
name: c.$
|
|
4535
|
-
inFor: c.$
|
|
4550
|
+
rules: c.$props.rule,
|
|
4551
|
+
name: c.$props.name || Ve(),
|
|
4552
|
+
inFor: c.$props.inFor,
|
|
4536
4553
|
prop: {
|
|
4537
4554
|
components: e,
|
|
4538
4555
|
directives: i
|
|
@@ -4540,8 +4557,8 @@ function Kt(t) {
|
|
|
4540
4557
|
get: null,
|
|
4541
4558
|
drivers: n,
|
|
4542
4559
|
renderDriver: null,
|
|
4543
|
-
refreshData:
|
|
4544
|
-
loadData:
|
|
4560
|
+
refreshData: Fe,
|
|
4561
|
+
loadData: g,
|
|
4545
4562
|
CreateNode: y,
|
|
4546
4563
|
bus: new Ei(),
|
|
4547
4564
|
unwatch: [],
|
|
@@ -4549,8 +4566,8 @@ function Kt(t) {
|
|
|
4549
4566
|
extendApiFn: l,
|
|
4550
4567
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4551
4568
|
tmpData: ne({})
|
|
4552
|
-
}), a.forEach((
|
|
4553
|
-
this.bus.$on(
|
|
4569
|
+
}), a.forEach((m) => {
|
|
4570
|
+
this.bus.$on(m.name, m.callback);
|
|
4554
4571
|
}), P(() => {
|
|
4555
4572
|
L(this.options, () => {
|
|
4556
4573
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
@@ -4561,55 +4578,55 @@ function Kt(t) {
|
|
|
4561
4578
|
init() {
|
|
4562
4579
|
this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
|
|
4563
4580
|
this.initOptions(), this.$handle.api.refresh();
|
|
4564
|
-
}, { deep: !0 })), this.vm.$
|
|
4581
|
+
}, { 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();
|
|
4565
4582
|
},
|
|
4566
|
-
targetFormDriver(c, ...
|
|
4567
|
-
if (this.renderDriver && this.renderDriver[c])
|
|
4568
|
-
return O(() => this.renderDriver[c](...
|
|
4583
|
+
targetFormDriver(c, ...m) {
|
|
4584
|
+
if (this.bus.$emit(c, ...m), this.renderDriver && this.renderDriver[c])
|
|
4585
|
+
return O(() => this.renderDriver[c](...m));
|
|
4569
4586
|
},
|
|
4570
|
-
t(c,
|
|
4587
|
+
t(c, m, $) {
|
|
4571
4588
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4572
|
-
return b == null && (b = ""), b &&
|
|
4573
|
-
const
|
|
4574
|
-
b = b.replace(
|
|
4589
|
+
return b == null && (b = ""), b && m && Object.keys(m).forEach((w) => {
|
|
4590
|
+
const D = new RegExp(`{${w}}`, "g");
|
|
4591
|
+
b = b.replace(D, m[w]);
|
|
4575
4592
|
}), b;
|
|
4576
4593
|
},
|
|
4577
4594
|
globalDataDriver(c) {
|
|
4578
|
-
let
|
|
4579
|
-
const $ =
|
|
4595
|
+
let m = c.split(".");
|
|
4596
|
+
const $ = m.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4580
4597
|
if (b) {
|
|
4581
4598
|
if (b.type === "static")
|
|
4582
|
-
return B(b.data,
|
|
4599
|
+
return B(b.data, m);
|
|
4583
4600
|
{
|
|
4584
4601
|
let w;
|
|
4585
|
-
const
|
|
4586
|
-
if (
|
|
4587
|
-
if (
|
|
4602
|
+
const D = this.fetchCache.get(b);
|
|
4603
|
+
if (D) {
|
|
4604
|
+
if (D.status && (w = B(D.data, m)), !D.loading)
|
|
4588
4605
|
return w;
|
|
4589
|
-
|
|
4606
|
+
D.loading = !1, this.fetchCache.set(b, D);
|
|
4590
4607
|
} else
|
|
4591
4608
|
this.fetchCache.set(b, { status: !1 });
|
|
4592
|
-
const
|
|
4593
|
-
|
|
4594
|
-
const
|
|
4595
|
-
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (
|
|
4596
|
-
}, b.wait || 600),
|
|
4597
|
-
this.fetchCache.set(b, { status: !0, data:
|
|
4598
|
-
},
|
|
4599
|
-
if (
|
|
4600
|
-
return
|
|
4601
|
-
if (
|
|
4602
|
-
|
|
4609
|
+
const R = se(() => {
|
|
4610
|
+
te();
|
|
4611
|
+
const x = this.fetchCache.get(b);
|
|
4612
|
+
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);
|
|
4613
|
+
}, b.wait || 600), ve = (x) => {
|
|
4614
|
+
this.fetchCache.set(b, { status: !0, data: x }), this.bus.$emit("$loadData.$globalData." + $);
|
|
4615
|
+
}, ae = (x, le) => {
|
|
4616
|
+
if (le && b.watch === !1)
|
|
4617
|
+
return te();
|
|
4618
|
+
if (le) {
|
|
4619
|
+
R();
|
|
4603
4620
|
return;
|
|
4604
4621
|
}
|
|
4605
|
-
const
|
|
4606
|
-
this.$handle.api.fetch(
|
|
4607
|
-
|
|
4622
|
+
const me = this.$handle.loadFetchVar(Je(b), x);
|
|
4623
|
+
this.$handle.api.fetch(me).then((re) => {
|
|
4624
|
+
ve(re);
|
|
4608
4625
|
}).catch((re) => {
|
|
4609
|
-
|
|
4626
|
+
ve(null);
|
|
4610
4627
|
});
|
|
4611
|
-
},
|
|
4612
|
-
return this.unwatch.push(
|
|
4628
|
+
}, te = this.watchLoadData(ae);
|
|
4629
|
+
return b.watch === !1 && te(), this.unwatch.push(te), w;
|
|
4613
4630
|
}
|
|
4614
4631
|
}
|
|
4615
4632
|
},
|
|
@@ -4618,31 +4635,28 @@ function Kt(t) {
|
|
|
4618
4635
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4619
4636
|
},
|
|
4620
4637
|
globalLanguageDriver(c) {
|
|
4621
|
-
let
|
|
4622
|
-
if (
|
|
4623
|
-
const w = this.options.value.language || {},
|
|
4624
|
-
b = B(w[
|
|
4638
|
+
let m = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4639
|
+
if (m && (b = O(() => m(c))), b == null && $ && typeof $ == "object" && (b = B($, c)), b == null) {
|
|
4640
|
+
const w = this.options.value.language || {}, D = this.getLocale();
|
|
4641
|
+
b = B(w[D] || {}, c), b == null && (b = B(Ti[D] || {}, c));
|
|
4625
4642
|
}
|
|
4626
4643
|
return b;
|
|
4627
4644
|
},
|
|
4628
4645
|
globalVarDriver(c) {
|
|
4629
|
-
let
|
|
4630
|
-
const $ =
|
|
4646
|
+
let m = c.split(".");
|
|
4647
|
+
const $ = m.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4631
4648
|
if (b) {
|
|
4632
|
-
const w = h.Function(b) ? b :
|
|
4649
|
+
const w = h.Function(b) ? b : z(b.handle);
|
|
4633
4650
|
if (w) {
|
|
4634
|
-
let
|
|
4635
|
-
|
|
4636
|
-
Z ? (this.bus.$emit("$loadData.$var." + $), S()) : j = w(ae, this.$handle.api);
|
|
4637
|
-
});
|
|
4638
|
-
return this.unwatch.push(S), B(j, g);
|
|
4651
|
+
let D = w((...R) => this.$handle.api.getData(...R), this.$handle.api);
|
|
4652
|
+
return B(D, m);
|
|
4639
4653
|
}
|
|
4640
4654
|
}
|
|
4641
4655
|
},
|
|
4642
|
-
setData(c,
|
|
4643
|
-
$ ? Pe(c,
|
|
4656
|
+
setData(c, m, $) {
|
|
4657
|
+
$ ? Pe(c, m) : (oe(this.vm.top.fc.tmpData, c, m), this.bus.$emit("$loadData." + c));
|
|
4644
4658
|
},
|
|
4645
|
-
getLoadData(c,
|
|
4659
|
+
getLoadData(c, m) {
|
|
4646
4660
|
let $ = null;
|
|
4647
4661
|
if (c != null) {
|
|
4648
4662
|
let b = c.split(".");
|
|
@@ -4672,38 +4686,38 @@ function Kt(t) {
|
|
|
4672
4686
|
}
|
|
4673
4687
|
$ && b.length && ($ = B($, b));
|
|
4674
4688
|
}
|
|
4675
|
-
return $ == null || $ === "" ?
|
|
4689
|
+
return $ == null || $ === "" ? m : $;
|
|
4676
4690
|
},
|
|
4677
|
-
watchLoadData(c,
|
|
4691
|
+
watchLoadData(c, m) {
|
|
4678
4692
|
let $ = {};
|
|
4679
|
-
const b = (
|
|
4693
|
+
const b = (R) => {
|
|
4680
4694
|
this.get || (this.get = w), O(() => {
|
|
4681
|
-
c(w,
|
|
4695
|
+
c(w, R);
|
|
4682
4696
|
}), this.get === w && (this.get = void 0);
|
|
4683
|
-
}, w = (
|
|
4684
|
-
let
|
|
4685
|
-
if (typeof
|
|
4686
|
-
return $[
|
|
4687
|
-
const
|
|
4688
|
-
const
|
|
4689
|
-
if ($[
|
|
4690
|
-
((
|
|
4697
|
+
}, w = (R, ve) => {
|
|
4698
|
+
let ae;
|
|
4699
|
+
if (typeof R == "object" && (ae = R.getValue, R = R.id), $[R])
|
|
4700
|
+
return $[R].val;
|
|
4701
|
+
const te = ye(() => ae ? ae() : this.getLoadData(R, ve)), x = R.split("."), le = x.shift(), me = x.shift() || "", re = se(() => {
|
|
4702
|
+
const ue = ae ? ae() : this.getLoadData(R, ve);
|
|
4703
|
+
if ($[R])
|
|
4704
|
+
((ue instanceof Function || h.Object(ue) || Array.isArray(ue)) && ue === $[R].val || JSON.stringify(ue) !== JSON.stringify($[R].val)) && ($[R].val = ue, b(!0));
|
|
4691
4705
|
else return;
|
|
4692
|
-
},
|
|
4706
|
+
}, m || 0), rr = L(te, (ue) => {
|
|
4693
4707
|
re();
|
|
4694
4708
|
});
|
|
4695
|
-
return this.bus.$on("$loadData." +
|
|
4709
|
+
return this.bus.$on("$loadData." + le, re), me && this.bus.$on("$loadData." + le + "." + me, re), $[R] = {
|
|
4696
4710
|
fn: () => {
|
|
4697
|
-
this.bus.$off("$loadData." +
|
|
4711
|
+
this.bus.$off("$loadData." + le, re), me && this.bus.$off("$loadData." + le + "." + me, re), rr();
|
|
4698
4712
|
},
|
|
4699
|
-
val:
|
|
4700
|
-
},
|
|
4713
|
+
val: te.value
|
|
4714
|
+
}, te.value;
|
|
4701
4715
|
};
|
|
4702
4716
|
b(!1);
|
|
4703
|
-
const
|
|
4704
|
-
Object.keys($).forEach((
|
|
4717
|
+
const D = () => {
|
|
4718
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4705
4719
|
};
|
|
4706
|
-
return this.unwatch.push(
|
|
4720
|
+
return this.unwatch.push(D), D;
|
|
4707
4721
|
},
|
|
4708
4722
|
isSub() {
|
|
4709
4723
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4717,12 +4731,15 @@ function Kt(t) {
|
|
|
4717
4731
|
globalEvent: {},
|
|
4718
4732
|
globalData: {}
|
|
4719
4733
|
}, K(p));
|
|
4720
|
-
|
|
4734
|
+
const m = this.isSub();
|
|
4735
|
+
m && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$props.option || {});
|
|
4736
|
+
const $ = this.api();
|
|
4737
|
+
this.targetFormDriver("initOptions", c, { api: $, isSubForm: m }), this.updateOptions(c);
|
|
4721
4738
|
},
|
|
4722
|
-
mergeOptions(c,
|
|
4723
|
-
return
|
|
4724
|
-
delete
|
|
4725
|
-
}),
|
|
4739
|
+
mergeOptions(c, m, $) {
|
|
4740
|
+
return m = v({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4741
|
+
delete m[b];
|
|
4742
|
+
}), m.global && (c.global = Kr(c.global, m.global), delete m.global), this.$handle.$manager.mergeOptions([m], c), c;
|
|
4726
4743
|
},
|
|
4727
4744
|
updateOptions(c) {
|
|
4728
4745
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4758,30 +4775,30 @@ function Kt(t) {
|
|
|
4758
4775
|
isMobile: d,
|
|
4759
4776
|
extendApi: Qt,
|
|
4760
4777
|
getData: nt,
|
|
4761
|
-
setDataDriver:
|
|
4778
|
+
setDataDriver: ke,
|
|
4762
4779
|
setData: Pe,
|
|
4763
4780
|
removeData: Yt,
|
|
4764
|
-
refreshData:
|
|
4781
|
+
refreshData: Fe,
|
|
4765
4782
|
maker: f,
|
|
4766
4783
|
component: E,
|
|
4767
4784
|
directive: N,
|
|
4768
|
-
setModelField:
|
|
4785
|
+
setModelField: zt,
|
|
4769
4786
|
setFormula: Xt,
|
|
4770
4787
|
setDriver: Zt,
|
|
4771
|
-
register:
|
|
4788
|
+
register: he,
|
|
4772
4789
|
$vnode: M,
|
|
4773
|
-
parser:
|
|
4774
|
-
use:
|
|
4775
|
-
factory:
|
|
4790
|
+
parser: de,
|
|
4791
|
+
use: pe,
|
|
4792
|
+
factory: xt,
|
|
4776
4793
|
componentAlias: Ie,
|
|
4777
4794
|
copyRule: It,
|
|
4778
4795
|
copyRules: Pt,
|
|
4779
|
-
mergeRule:
|
|
4796
|
+
mergeRule: ee,
|
|
4780
4797
|
fetch: qt,
|
|
4781
|
-
$form:
|
|
4782
|
-
parseFn:
|
|
4798
|
+
$form: S,
|
|
4799
|
+
parseFn: z,
|
|
4783
4800
|
parseJson: Vt,
|
|
4784
|
-
toJson:
|
|
4801
|
+
toJson: we,
|
|
4785
4802
|
useApp: V,
|
|
4786
4803
|
getApi: G,
|
|
4787
4804
|
on: er
|
|
@@ -4790,26 +4807,26 @@ function Kt(t) {
|
|
|
4790
4807
|
function tr(c) {
|
|
4791
4808
|
_(c, {
|
|
4792
4809
|
create: W,
|
|
4793
|
-
install(
|
|
4794
|
-
if (p = v(v({}, p), $ || {}),
|
|
4795
|
-
|
|
4796
|
-
const b = function(
|
|
4797
|
-
return W(
|
|
4810
|
+
install(m, $) {
|
|
4811
|
+
if (p = v(v({}, p), $ || {}), m._installedFormCreate === !0) return;
|
|
4812
|
+
m._installedFormCreate = !0;
|
|
4813
|
+
const b = function(D, R = {}) {
|
|
4814
|
+
return W(D, R, this);
|
|
4798
4815
|
};
|
|
4799
|
-
st(b),
|
|
4800
|
-
const w =
|
|
4801
|
-
|
|
4802
|
-
O(() =>
|
|
4816
|
+
st(b), m.prototype.$formCreate = b;
|
|
4817
|
+
const w = S();
|
|
4818
|
+
m.component(w.name, w), m.component("FcFragment", M()), o.forEach((D) => {
|
|
4819
|
+
O(() => D(c, m));
|
|
4803
4820
|
});
|
|
4804
4821
|
}
|
|
4805
4822
|
});
|
|
4806
4823
|
}
|
|
4807
|
-
if (st(F), tr(F),
|
|
4824
|
+
if (st(F), tr(F), ke("$cookie", Vi), ke("$localStorage", Ii), ke("$sessionStorage", Pi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), de(Ri), t.inherit) {
|
|
4808
4825
|
const c = t.inherit;
|
|
4809
|
-
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 && _(
|
|
4826
|
+
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 && _(g, c.loadData), c.formulas && _(C, c.formulas);
|
|
4810
4827
|
}
|
|
4811
|
-
const
|
|
4812
|
-
return
|
|
4828
|
+
const Ee = S();
|
|
4829
|
+
return Re(Ee, F), Object.defineProperties(Ee, {
|
|
4813
4830
|
fetch: {
|
|
4814
4831
|
get() {
|
|
4815
4832
|
return F.fetch;
|
|
@@ -4818,7 +4835,7 @@ function Kt(t) {
|
|
|
4818
4835
|
F.fetch = c;
|
|
4819
4836
|
}
|
|
4820
4837
|
}
|
|
4821
|
-
}),
|
|
4838
|
+
}), Ee.util = F, Ee;
|
|
4822
4839
|
}
|
|
4823
4840
|
const _t = {
|
|
4824
4841
|
date: "yyyy-MM-dd",
|
|
@@ -4882,8 +4899,8 @@ const _t = {
|
|
|
4882
4899
|
e.vNode.row(e.prop, t)
|
|
4883
4900
|
]);
|
|
4884
4901
|
}
|
|
4885
|
-
},
|
|
4886
|
-
name:
|
|
4902
|
+
}, xi = "select", zi = {
|
|
4903
|
+
name: xi,
|
|
4887
4904
|
toFormValue(t, e) {
|
|
4888
4905
|
return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
|
|
4889
4906
|
}
|
|
@@ -4894,7 +4911,7 @@ const _t = {
|
|
|
4894
4911
|
Ji,
|
|
4895
4912
|
Ki,
|
|
4896
4913
|
Wi,
|
|
4897
|
-
|
|
4914
|
+
zi
|
|
4898
4915
|
], A = "el", Zi = {
|
|
4899
4916
|
button: A + "Button",
|
|
4900
4917
|
icon: "i",
|
|
@@ -4966,13 +4983,13 @@ function Yi(t) {
|
|
|
4966
4983
|
return t.type === "tooltip";
|
|
4967
4984
|
}
|
|
4968
4985
|
function Ot(t, e) {
|
|
4969
|
-
|
|
4986
|
+
j(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4970
4987
|
}
|
|
4971
|
-
function
|
|
4988
|
+
function Z(t) {
|
|
4972
4989
|
return t === !1;
|
|
4973
4990
|
}
|
|
4974
4991
|
function en(t, e) {
|
|
4975
|
-
|
|
4992
|
+
j(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4976
4993
|
}
|
|
4977
4994
|
function He(t) {
|
|
4978
4995
|
const e = v({}, t);
|
|
@@ -5019,7 +5036,7 @@ const tn = {
|
|
|
5019
5036
|
wrap: {}
|
|
5020
5037
|
};
|
|
5021
5038
|
["info", "wrap", "col", "title"].forEach((r) => {
|
|
5022
|
-
t.prop[r] =
|
|
5039
|
+
t.prop[r] = Y([this.options[r] || {}, t.prop[r] || {}], e[r]);
|
|
5023
5040
|
});
|
|
5024
5041
|
},
|
|
5025
5042
|
getDefaultOptions() {
|
|
@@ -5045,12 +5062,12 @@ const tn = {
|
|
|
5045
5062
|
});
|
|
5046
5063
|
},
|
|
5047
5064
|
render(t) {
|
|
5048
|
-
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule,
|
|
5065
|
+
return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Z(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
|
|
5049
5066
|
},
|
|
5050
5067
|
makeWrap(t, e) {
|
|
5051
5068
|
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;
|
|
5052
5069
|
delete r.wrap.class, delete r.wrap.title;
|
|
5053
|
-
const f =
|
|
5070
|
+
const f = Z(r.wrap.show) ? e : this.$r(Y([r.wrap, {
|
|
5054
5071
|
props: q(v({
|
|
5055
5072
|
labelWidth: o === void 0 ? o : At(o),
|
|
5056
5073
|
label: n ? r.title.title : void 0
|
|
@@ -5063,21 +5080,21 @@ const tn = {
|
|
|
5063
5080
|
ref: t.wrapRef,
|
|
5064
5081
|
type: "formItem"
|
|
5065
5082
|
}]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
|
|
5066
|
-
return a === !0 ||
|
|
5083
|
+
return a === !0 || Z(l) || Z(s.show) ? f : this.makeCol(r, i, [f]);
|
|
5067
5084
|
},
|
|
5068
5085
|
isTitle(t) {
|
|
5069
5086
|
if (this.options.form.title === !1) return !1;
|
|
5070
5087
|
const e = t.title;
|
|
5071
|
-
return !(!e.title && !e.native ||
|
|
5088
|
+
return !(!e.title && !e.native || Z(e.show));
|
|
5072
5089
|
},
|
|
5073
5090
|
makeInfo(t, e, r) {
|
|
5074
|
-
var f, p, d,
|
|
5091
|
+
var f, p, d, g, y, C;
|
|
5075
5092
|
const i = v({}, t.title), s = v({}, t.info), n = Yi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5076
5093
|
title: (p = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : p.value,
|
|
5077
5094
|
rule: r.rule,
|
|
5078
5095
|
options: this.options
|
|
5079
|
-
}) : ((
|
|
5080
|
-
if (!
|
|
5096
|
+
}) : ((g = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5097
|
+
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5081
5098
|
const F = {
|
|
5082
5099
|
type: s.type || "popover",
|
|
5083
5100
|
slot: "label",
|
|
@@ -5086,7 +5103,7 @@ const tn = {
|
|
|
5086
5103
|
};
|
|
5087
5104
|
delete F.props.icon, delete F.props.show, delete F.props.info, delete F.props.align, delete F.props.native;
|
|
5088
5105
|
const G = "content";
|
|
5089
|
-
s.info && !
|
|
5106
|
+
s.info && !j(F.props, G) && (F.props[G] = (C = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : C.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, F]), [
|
|
5090
5107
|
this.$r({
|
|
5091
5108
|
type: "i",
|
|
5092
5109
|
slot: n ? "default" : "reference",
|
|
@@ -5095,7 +5112,7 @@ const tn = {
|
|
|
5095
5112
|
})
|
|
5096
5113
|
]));
|
|
5097
5114
|
}
|
|
5098
|
-
const u =
|
|
5115
|
+
const u = Y([i, {
|
|
5099
5116
|
props: He(i),
|
|
5100
5117
|
key: `${e}tit`,
|
|
5101
5118
|
class: "fc-form-title",
|
|
@@ -5124,7 +5141,7 @@ const tn = {
|
|
|
5124
5141
|
},
|
|
5125
5142
|
makeFormBtn() {
|
|
5126
5143
|
let t = [];
|
|
5127
|
-
if (
|
|
5144
|
+
if (Z(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Z(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
|
|
5128
5145
|
return;
|
|
5129
5146
|
const e = this.$r({
|
|
5130
5147
|
type: "formItem",
|
|
@@ -5171,12 +5188,12 @@ const tn = {
|
|
|
5171
5188
|
key: `${this.key}b1`
|
|
5172
5189
|
}, [e]);
|
|
5173
5190
|
}
|
|
5174
|
-
},
|
|
5175
|
-
rn(
|
|
5176
|
-
nn(
|
|
5177
|
-
sn(
|
|
5178
|
-
on(
|
|
5179
|
-
an(
|
|
5191
|
+
}, ce = {};
|
|
5192
|
+
rn(ce);
|
|
5193
|
+
nn(ce);
|
|
5194
|
+
sn(ce);
|
|
5195
|
+
on(ce);
|
|
5196
|
+
an(ce);
|
|
5180
5197
|
function rn(t) {
|
|
5181
5198
|
["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
|
|
5182
5199
|
t[e] = T(e);
|
|
@@ -5231,7 +5248,7 @@ function ln(t, e) {
|
|
|
5231
5248
|
}), Promise.all(o).then(() => {
|
|
5232
5249
|
i(!0), r && r(!0);
|
|
5233
5250
|
}).catch((a) => {
|
|
5234
|
-
s(a), r && r(a), e.vm.$emit("validate-fail", a, { api: t });
|
|
5251
|
+
s(a), r && r(a), e.vm.$emit("validate-fail", a, { api: t }), e.emitEvent("validate-fail", a, { api: t });
|
|
5235
5252
|
});
|
|
5236
5253
|
});
|
|
5237
5254
|
},
|
|
@@ -5347,14 +5364,14 @@ function fn(t) {
|
|
|
5347
5364
|
t.component(e.name, e);
|
|
5348
5365
|
}), t.register(Wt), Xi.forEach((e) => {
|
|
5349
5366
|
t.parser(e);
|
|
5350
|
-
}), Object.keys(
|
|
5351
|
-
t.maker[e] =
|
|
5367
|
+
}), Object.keys(ce).forEach((e) => {
|
|
5368
|
+
t.maker[e] = ce[e];
|
|
5352
5369
|
});
|
|
5353
5370
|
}
|
|
5354
5371
|
function cn() {
|
|
5355
5372
|
return Kt({
|
|
5356
5373
|
ui: "element-ui",
|
|
5357
|
-
version: "2.7.
|
|
5374
|
+
version: "2.7.15",
|
|
5358
5375
|
manager: tn,
|
|
5359
5376
|
extendApi: ln,
|
|
5360
5377
|
install: fn,
|