@form-create/view-design 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 +475 -457
- package/dist/form-create.js +4 -4
- package/dist/form-create.min.js +4 -4
- package/package.json +4 -4
package/dist/form-create.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/view-design v2.7.
|
|
3
|
+
* @form-create/view-design 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/
|
|
7
7
|
* Released under the MIT License.
|
|
8
8
|
*/
|
|
9
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .ivu-upload-list{margin-top:0}._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn,._fc-frame .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .ivu-upload-list{margin-top:0}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .ivu-form-item{margin-bottom:24px}.form-create .form-create .ivu-form-item .ivu-form-item{margin-bottom:0}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
9
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .ivu-upload-list{margin-top:0}._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn,._fc-frame .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .ivu-upload-list{margin-top:0}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;box-shadow:2px 2px 5px #0000001a;margin-right:4px;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .ivu-form-item{margin-bottom:24px}.form-create .form-create .ivu-form-item .ivu-form-item{margin-bottom:0}.form-create.is-preview .fc-clock,.form-create .fc-none{display:none!important}')),document.head.appendChild(o)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
10
10
|
var sr = Object.defineProperty, or = Object.defineProperties;
|
|
11
11
|
var ar = Object.getOwnPropertyDescriptors;
|
|
12
12
|
var at = Object.getOwnPropertySymbols;
|
|
@@ -604,7 +604,7 @@ const Rr = "fcRadio", Er = {
|
|
|
604
604
|
return h.type(e, t);
|
|
605
605
|
};
|
|
606
606
|
});
|
|
607
|
-
function
|
|
607
|
+
function D(t, e) {
|
|
608
608
|
return {}.hasOwnProperty.call(t, e);
|
|
609
609
|
}
|
|
610
610
|
const Dr = "fcSelect", jr = {
|
|
@@ -634,7 +634,7 @@ const Dr = "fcSelect", jr = {
|
|
|
634
634
|
}, [h.trueArray(n.options) && n.options.map((a, l) => r(a, l))]), s = e.props.formCreateInject.options;
|
|
635
635
|
return t("Select", A([{}, e.data, {
|
|
636
636
|
ref: "el"
|
|
637
|
-
}]), [(Array.isArray(s) ? s : []).map((n, o) =>
|
|
637
|
+
}]), [(Array.isArray(s) ? s : []).map((n, o) => D(n || "", "options") ? i(n, o) : r(n, o)), e.children]);
|
|
638
638
|
},
|
|
639
639
|
mounted() {
|
|
640
640
|
this.$emit("fc.el", this.$refs.el);
|
|
@@ -1082,7 +1082,7 @@ const Br = "fcGroup", Tr = {
|
|
|
1082
1082
|
},
|
|
1083
1083
|
methods: {
|
|
1084
1084
|
_value(t) {
|
|
1085
|
-
return t &&
|
|
1085
|
+
return t && D(t, this.field) ? t[this.field] : t;
|
|
1086
1086
|
},
|
|
1087
1087
|
cache(t, e) {
|
|
1088
1088
|
this.cacheValue[t] = JSON.stringify(e);
|
|
@@ -1239,9 +1239,9 @@ const Br = "fcGroup", Tr = {
|
|
|
1239
1239
|
key: o
|
|
1240
1240
|
}, {
|
|
1241
1241
|
on: {
|
|
1242
|
-
"update:value": (
|
|
1243
|
-
"emit-event": (
|
|
1244
|
-
input: (
|
|
1242
|
+
"update:value": (p) => this.formData(o, p),
|
|
1243
|
+
"emit-event": (p, ...d) => this.emitEvent(p, d, a, o),
|
|
1244
|
+
input: (p) => this.add$f(a, o, p)
|
|
1245
1245
|
}
|
|
1246
1246
|
}, {}, {
|
|
1247
1247
|
props: {
|
|
@@ -1369,6 +1369,9 @@ function be(t) {
|
|
|
1369
1369
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1370
1370
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1371
1371
|
}
|
|
1372
|
+
function qr(t) {
|
|
1373
|
+
return t.replace(t[0], t[0].toLocaleUpperCase());
|
|
1374
|
+
}
|
|
1372
1375
|
const Et = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style", "directives"], jt = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
|
|
1373
1376
|
const i = [...Et, ...r.normal || []], s = [...Dt, ...r.array || []], n = [...jt, ...r.functional || []], o = r.props || [];
|
|
1374
1377
|
return t.reduce((a, l) => {
|
|
@@ -1379,25 +1382,25 @@ const Et = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style"
|
|
|
1379
1382
|
else if (i.indexOf(u) > -1)
|
|
1380
1383
|
a[u] = v(v({}, a[u]), l[u]);
|
|
1381
1384
|
else if (s.indexOf(u) > -1) {
|
|
1382
|
-
const f = a[u] instanceof Array ? a[u] : [a[u]],
|
|
1383
|
-
a[u] = [...f, ...
|
|
1385
|
+
const f = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
|
|
1386
|
+
a[u] = [...f, ...p];
|
|
1384
1387
|
} else if (n.indexOf(u) > -1)
|
|
1385
1388
|
for (const f in l[u])
|
|
1386
1389
|
if (a[u][f]) {
|
|
1387
|
-
const
|
|
1388
|
-
a[u][f] = [...
|
|
1390
|
+
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]];
|
|
1391
|
+
a[u][f] = [...p, ...d];
|
|
1389
1392
|
} else
|
|
1390
1393
|
a[u][f] = l[u][f];
|
|
1391
1394
|
else if (u === "hook")
|
|
1392
1395
|
for (let f in l[u])
|
|
1393
|
-
a[u][f] ? a[u][f] =
|
|
1396
|
+
a[u][f] ? a[u][f] = Gr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
|
|
1394
1397
|
else
|
|
1395
1398
|
a[u] = l[u];
|
|
1396
1399
|
else
|
|
1397
1400
|
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];
|
|
1398
1401
|
return a;
|
|
1399
1402
|
}, e);
|
|
1400
|
-
},
|
|
1403
|
+
}, Gr = (t, e) => function() {
|
|
1401
1404
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1402
1405
|
}, At = ["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"], xe = ["validate", "children", "control"], et = ["effect", "deep", "renderSlots"];
|
|
1403
1406
|
function It() {
|
|
@@ -1409,10 +1412,10 @@ function Vt(t, e, r) {
|
|
|
1409
1412
|
function tt(t, e) {
|
|
1410
1413
|
console.error(Vt("err", t));
|
|
1411
1414
|
}
|
|
1412
|
-
function
|
|
1415
|
+
function Hr(t) {
|
|
1413
1416
|
tt(t.toString()), console.error(t);
|
|
1414
1417
|
}
|
|
1415
|
-
function
|
|
1418
|
+
function zr(t) {
|
|
1416
1419
|
return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
|
|
1417
1420
|
}
|
|
1418
1421
|
const Ke = "[[FORM-CREATE-PREFIX-", Xe = "-FORM-CREATE-SUFFIX]]";
|
|
@@ -1477,9 +1480,9 @@ function Pt(t, e) {
|
|
|
1477
1480
|
return h.Undef(i) || !i.indexOf ? i : W(i, e);
|
|
1478
1481
|
});
|
|
1479
1482
|
}
|
|
1480
|
-
let
|
|
1483
|
+
let Jr = 0;
|
|
1481
1484
|
function Pe() {
|
|
1482
|
-
const t = 370 + ++
|
|
1485
|
+
const t = 370 + ++Jr;
|
|
1483
1486
|
return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
|
|
1484
1487
|
}
|
|
1485
1488
|
function se(t, e, r) {
|
|
@@ -1509,7 +1512,7 @@ function ht(t) {
|
|
|
1509
1512
|
const e = h.Function(t.getRule) ? t.getRule() : t;
|
|
1510
1513
|
return e.type || (e.type = "input"), e;
|
|
1511
1514
|
}
|
|
1512
|
-
function
|
|
1515
|
+
function Wr(t, e) {
|
|
1513
1516
|
return t ? (Object.keys(e || {}).forEach((r) => {
|
|
1514
1517
|
e[r] && (t[r] = x(t[r] || {}, e[r]));
|
|
1515
1518
|
}), t) : e;
|
|
@@ -1528,7 +1531,7 @@ function O(t, e) {
|
|
|
1528
1531
|
try {
|
|
1529
1532
|
e = t();
|
|
1530
1533
|
} catch (r) {
|
|
1531
|
-
|
|
1534
|
+
Hr(r);
|
|
1532
1535
|
}
|
|
1533
1536
|
return e;
|
|
1534
1537
|
}
|
|
@@ -1540,7 +1543,7 @@ function Qe(t, e) {
|
|
|
1540
1543
|
});
|
|
1541
1544
|
}), r;
|
|
1542
1545
|
}
|
|
1543
|
-
function
|
|
1546
|
+
function Kr(t, e) {
|
|
1544
1547
|
if (h.Object(t)) {
|
|
1545
1548
|
const r = {};
|
|
1546
1549
|
return Object.keys(t).forEach((i) => {
|
|
@@ -1565,7 +1568,7 @@ function ke() {
|
|
|
1565
1568
|
const n = s();
|
|
1566
1569
|
Array.isArray(n) ? i.push(...n) : i.push(n);
|
|
1567
1570
|
} else h.Undef(s) || i.push(s);
|
|
1568
|
-
}),
|
|
1571
|
+
}), Kr(i, r);
|
|
1569
1572
|
},
|
|
1570
1573
|
getSlots() {
|
|
1571
1574
|
let r = [];
|
|
@@ -1628,7 +1631,7 @@ function L(t, e) {
|
|
|
1628
1631
|
t != null && (t = t[r]);
|
|
1629
1632
|
}), t;
|
|
1630
1633
|
}
|
|
1631
|
-
function
|
|
1634
|
+
function Xr(t) {
|
|
1632
1635
|
const e = /{{\s*(.*?)\s*}}/g;
|
|
1633
1636
|
let r;
|
|
1634
1637
|
const i = {};
|
|
@@ -1662,7 +1665,7 @@ const De = (t, e) => {
|
|
|
1662
1665
|
return De(t.$parent, e);
|
|
1663
1666
|
}
|
|
1664
1667
|
};
|
|
1665
|
-
function
|
|
1668
|
+
function Zr(t, e, r) {
|
|
1666
1669
|
const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
|
|
1667
1670
|
return {
|
|
1668
1671
|
name: i,
|
|
@@ -1702,6 +1705,7 @@ function Xr(t, e, r) {
|
|
|
1702
1705
|
index: [String, Number],
|
|
1703
1706
|
api: Object,
|
|
1704
1707
|
locale: [String, Object],
|
|
1708
|
+
t: Function,
|
|
1705
1709
|
name: String,
|
|
1706
1710
|
subForm: {
|
|
1707
1711
|
type: Boolean,
|
|
@@ -1722,27 +1726,27 @@ function Xr(t, e, r) {
|
|
|
1722
1726
|
a = a.parent;
|
|
1723
1727
|
else
|
|
1724
1728
|
a = n;
|
|
1725
|
-
const { rule: l, value: u, subForm: f, inFor:
|
|
1729
|
+
const { rule: l, value: u, subForm: f, inFor: p } = ut(s), d = ie({
|
|
1726
1730
|
ctxInject: {},
|
|
1727
1731
|
destroyed: !1,
|
|
1728
1732
|
isShow: !0,
|
|
1729
1733
|
unique: 1,
|
|
1730
1734
|
renderRule: [...l.value || []],
|
|
1731
1735
|
updateValue: JSON.stringify(u.value || {})
|
|
1732
|
-
}),
|
|
1736
|
+
}), m = new t(n), y = m.api(), _ = p.value, j = () => {
|
|
1733
1737
|
if (o) {
|
|
1734
1738
|
const k = De(n, o);
|
|
1735
1739
|
if (k) {
|
|
1736
|
-
let
|
|
1737
|
-
_ ? (
|
|
1740
|
+
let E;
|
|
1741
|
+
_ ? (E = H(k.getSubForm()), E.push(y)) : E = y, k.subForm(E);
|
|
1738
1742
|
}
|
|
1739
1743
|
}
|
|
1740
1744
|
}, ee = () => {
|
|
1741
1745
|
const k = De(n, o);
|
|
1742
1746
|
if (k)
|
|
1743
1747
|
if (_) {
|
|
1744
|
-
const
|
|
1745
|
-
N > -1 &&
|
|
1748
|
+
const E = H(k.getSubForm()), N = E.indexOf(y);
|
|
1749
|
+
N > -1 && E.splice(N, 1);
|
|
1746
1750
|
} else
|
|
1747
1751
|
k.subForm();
|
|
1748
1752
|
};
|
|
@@ -1750,64 +1754,64 @@ function Xr(t, e, r) {
|
|
|
1750
1754
|
dr(() => {
|
|
1751
1755
|
B(() => {
|
|
1752
1756
|
let k = "";
|
|
1753
|
-
const
|
|
1754
|
-
Object.keys(
|
|
1757
|
+
const E = s.option && s.option.globalClass || {};
|
|
1758
|
+
Object.keys(E).forEach((N) => {
|
|
1755
1759
|
let pe = "";
|
|
1756
|
-
|
|
1757
|
-
pe += be(z) + ":" +
|
|
1758
|
-
}),
|
|
1760
|
+
E[N].style && Object.keys(E[N].style).forEach((z) => {
|
|
1761
|
+
pe += be(z) + ":" + E[N].style[z] + ";";
|
|
1762
|
+
}), E[N].content && (pe += E[N].content + ";"), pe && (k += `.${N}{${pe}}`);
|
|
1759
1763
|
}), s.option && s.option.style && (k += s.option.style), I || (I = document.createElement("style"), I.type = "text/css", document.head.appendChild(I)), I.innerHTML = k || "";
|
|
1760
1764
|
}, () => {
|
|
1761
1765
|
});
|
|
1762
1766
|
});
|
|
1763
1767
|
const T = ne(() => {
|
|
1764
|
-
|
|
1768
|
+
m.bus.$emit("$loadData.$topForm");
|
|
1765
1769
|
}, 100), he = ne(function() {
|
|
1766
|
-
|
|
1770
|
+
m.bus.$emit("$loadData.$scopeForm");
|
|
1767
1771
|
}, 100), Le = ne(() => {
|
|
1768
|
-
|
|
1772
|
+
m.bus.$emit("$loadData.$form");
|
|
1769
1773
|
}, 100), de = (k) => {
|
|
1770
|
-
|
|
1774
|
+
m.bus.$emit("change-$form." + k);
|
|
1771
1775
|
};
|
|
1772
1776
|
return pr(() => {
|
|
1773
|
-
o && (
|
|
1777
|
+
o && (y.top.bus.$on("$loadData.$form", T), y.top.bus.$on("change", de)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", he), m.mounted();
|
|
1774
1778
|
}), mr(() => {
|
|
1775
|
-
o && (
|
|
1779
|
+
o && (y.top.bus.$off("$loadData.$form", T), y.top.bus.$off("change", de)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", he), ee(), d.destroyed = !0, m.unmount(), I && (I.parentNode || I.parentElement) && document.head.removeChild(I);
|
|
1776
1780
|
}), gr(() => {
|
|
1777
|
-
|
|
1781
|
+
m.updated();
|
|
1778
1782
|
}), B(f, (k) => {
|
|
1779
|
-
k ?
|
|
1783
|
+
k ? j() : ee();
|
|
1780
1784
|
}, { immediate: !0 }), B(() => s.option, () => {
|
|
1781
|
-
|
|
1785
|
+
m.initOptions(), y.refresh();
|
|
1782
1786
|
}, { deep: !0 }), B(() => [...l.value], (k) => {
|
|
1783
|
-
|
|
1787
|
+
m.$handle.isBreakWatch() || k.length === d.renderRule.length && k.every((E) => d.renderRule.indexOf(E) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
|
|
1784
1788
|
}), B(() => [s.disabled, s.preview], () => {
|
|
1785
|
-
|
|
1789
|
+
y.refresh();
|
|
1786
1790
|
}), B(u, (k) => {
|
|
1787
|
-
_e(k || {}) !==
|
|
1791
|
+
_e(k || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(k || {}) : y.setValue(k || {}));
|
|
1788
1792
|
}, { deep: !0, flush: "post" }), B(() => s.index, () => {
|
|
1789
|
-
|
|
1793
|
+
y.coverValue({}), m.$handle.updateAppendData(), V(() => {
|
|
1790
1794
|
V(() => {
|
|
1791
|
-
|
|
1795
|
+
y.clearValidateState();
|
|
1792
1796
|
});
|
|
1793
1797
|
});
|
|
1794
1798
|
}, { flush: "sync" }), U(v({
|
|
1795
|
-
fc: ge(
|
|
1799
|
+
fc: ge(m),
|
|
1796
1800
|
parent: o && ge(o),
|
|
1797
1801
|
top: ge(a),
|
|
1798
|
-
fapi: ge(
|
|
1799
|
-
}, ut(
|
|
1802
|
+
fapi: ge(y)
|
|
1803
|
+
}, ut(d)), {
|
|
1800
1804
|
getGroupInject: () => De(n, o),
|
|
1801
1805
|
refresh() {
|
|
1802
|
-
++
|
|
1806
|
+
++d.unique;
|
|
1803
1807
|
},
|
|
1804
1808
|
renderRule() {
|
|
1805
|
-
|
|
1809
|
+
d.renderRule = [...l.value || []];
|
|
1806
1810
|
},
|
|
1807
1811
|
updateValue(k) {
|
|
1808
|
-
if (
|
|
1809
|
-
const
|
|
1810
|
-
|
|
1812
|
+
if (d.destroyed) return;
|
|
1813
|
+
const E = _e(k);
|
|
1814
|
+
d.updateValue !== E && (d.updateValue = E, n.$emit("update:value", k), V(() => {
|
|
1811
1815
|
Le(), o ? f.value || he() : (T(), he());
|
|
1812
1816
|
}));
|
|
1813
1817
|
}
|
|
@@ -1860,7 +1864,7 @@ function Ut(t) {
|
|
|
1860
1864
|
}
|
|
1861
1865
|
Ut(It());
|
|
1862
1866
|
const qt = P("");
|
|
1863
|
-
function
|
|
1867
|
+
function Qr(t, e, r) {
|
|
1864
1868
|
let i = qt("", e);
|
|
1865
1869
|
return i._data.type = t, i._data.title = r, i;
|
|
1866
1870
|
}
|
|
@@ -1868,15 +1872,15 @@ function mt(t, e, r, i) {
|
|
|
1868
1872
|
let s = qt("", r);
|
|
1869
1873
|
return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
|
|
1870
1874
|
}
|
|
1871
|
-
function
|
|
1875
|
+
function Yr() {
|
|
1872
1876
|
return {
|
|
1873
|
-
create:
|
|
1877
|
+
create: Qr,
|
|
1874
1878
|
createTmp: mt,
|
|
1875
1879
|
template: mt,
|
|
1876
1880
|
factory: P
|
|
1877
1881
|
};
|
|
1878
1882
|
}
|
|
1879
|
-
function
|
|
1883
|
+
function xr(t, e, r) {
|
|
1880
1884
|
const i = `fail to ${t} ${r.status}'`, s = new Error(i);
|
|
1881
1885
|
return s.status = r.status, s.url = t, s;
|
|
1882
1886
|
}
|
|
@@ -1905,7 +1909,7 @@ function Gt(t) {
|
|
|
1905
1909
|
t.onError(o);
|
|
1906
1910
|
}, e.onload = function() {
|
|
1907
1911
|
if (e.status < 200 || e.status >= 300)
|
|
1908
|
-
return t.onError(
|
|
1912
|
+
return t.onError(xr(r, t, e), gt(e));
|
|
1909
1913
|
t.onSuccess(gt(e));
|
|
1910
1914
|
}, e.open(t.method || "get", r, !0);
|
|
1911
1915
|
let i;
|
|
@@ -1934,7 +1938,7 @@ function yt(t, e, r) {
|
|
|
1934
1938
|
function ve(t) {
|
|
1935
1939
|
return G(t);
|
|
1936
1940
|
}
|
|
1937
|
-
function
|
|
1941
|
+
function ei(t) {
|
|
1938
1942
|
function e(n) {
|
|
1939
1943
|
return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
|
|
1940
1944
|
}
|
|
@@ -2025,7 +2029,7 @@ function xr(t) {
|
|
|
2025
2029
|
},
|
|
2026
2030
|
getValue(n) {
|
|
2027
2031
|
const o = t.getFieldCtx(n);
|
|
2028
|
-
return o ? ve(o.rule.value) : t.options.appendValue !== !1 &&
|
|
2032
|
+
return o ? ve(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? ve(t.appendData[n]) : void 0;
|
|
2029
2033
|
},
|
|
2030
2034
|
coverValue(n) {
|
|
2031
2035
|
const o = v({}, n || {});
|
|
@@ -2033,7 +2037,7 @@ function xr(t) {
|
|
|
2033
2037
|
t.appendData = {}, s.fields().forEach((a) => {
|
|
2034
2038
|
const l = t.fieldCtx[a];
|
|
2035
2039
|
if (l) {
|
|
2036
|
-
const u =
|
|
2040
|
+
const u = D(n, a);
|
|
2037
2041
|
l.forEach((f) => {
|
|
2038
2042
|
F(f.rule, "value", u ? n[a] : void 0);
|
|
2039
2043
|
}), delete o[a];
|
|
@@ -2215,7 +2219,7 @@ function xr(t) {
|
|
|
2215
2219
|
},
|
|
2216
2220
|
setEffect(n, o, a) {
|
|
2217
2221
|
const l = t.getCtx(n);
|
|
2218
|
-
l && o && (o[0] === "$" && (o = o.substr(1)),
|
|
2222
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), D(l.rule, "$" + o) && F(l.rule, "$" + o, a), D(l.rule, "effect") || F(l.rule, "effect", {}), F(l.rule.effect, o, a));
|
|
2219
2223
|
},
|
|
2220
2224
|
clearEffectData(n, o) {
|
|
2221
2225
|
const a = t.getCtx(n);
|
|
@@ -2278,9 +2282,9 @@ function xr(t) {
|
|
|
2278
2282
|
if (!l)
|
|
2279
2283
|
return [];
|
|
2280
2284
|
const u = [];
|
|
2281
|
-
return ((
|
|
2282
|
-
|
|
2283
|
-
typeof
|
|
2285
|
+
return ((p) => {
|
|
2286
|
+
p && p.forEach((d) => {
|
|
2287
|
+
typeof d == "object" && (d.field && u.push(d), u.push(...s.getChildrenRuleList(d)));
|
|
2284
2288
|
});
|
|
2285
2289
|
})(a ? a.loadChildrenPending() : l.children), u;
|
|
2286
2290
|
},
|
|
@@ -2302,7 +2306,7 @@ function xr(t) {
|
|
|
2302
2306
|
const l = s.getChildrenRuleList(n);
|
|
2303
2307
|
t.deferSyncValue(() => {
|
|
2304
2308
|
l.forEach((u) => {
|
|
2305
|
-
|
|
2309
|
+
D(o, u.field) ? F(u, "value", o[u.field]) : a && F(u, "value", void 0);
|
|
2306
2310
|
});
|
|
2307
2311
|
});
|
|
2308
2312
|
},
|
|
@@ -2352,12 +2356,12 @@ function xr(t) {
|
|
|
2352
2356
|
},
|
|
2353
2357
|
watchFetch(n, o, a, l) {
|
|
2354
2358
|
return t.fc.watchLoadData((u, f) => {
|
|
2355
|
-
let
|
|
2356
|
-
|
|
2357
|
-
O(() =>
|
|
2358
|
-
}).catch((
|
|
2359
|
-
O(() =>
|
|
2360
|
-
})).catch((
|
|
2359
|
+
let p = G(n);
|
|
2360
|
+
p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((d) => {
|
|
2361
|
+
O(() => p.onSuccess && p.onSuccess(d)), o && o(d, f);
|
|
2362
|
+
}).catch((d) => {
|
|
2363
|
+
O(() => p.onError && p.onError(d)), a && a(d);
|
|
2364
|
+
})).catch((d) => {
|
|
2361
2365
|
});
|
|
2362
2366
|
}, n.wait == null ? 1e3 : n.wait);
|
|
2363
2367
|
},
|
|
@@ -2387,7 +2391,7 @@ function xr(t) {
|
|
|
2387
2391
|
};
|
|
2388
2392
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2389
2393
|
}
|
|
2390
|
-
function
|
|
2394
|
+
function ti(t) {
|
|
2391
2395
|
C(t.prototype, {
|
|
2392
2396
|
initCache() {
|
|
2393
2397
|
this.clearCacheAll();
|
|
@@ -2428,7 +2432,7 @@ function q(t) {
|
|
|
2428
2432
|
function Ht(t) {
|
|
2429
2433
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2430
2434
|
}
|
|
2431
|
-
function
|
|
2435
|
+
function ri(t) {
|
|
2432
2436
|
C(t.prototype, {
|
|
2433
2437
|
initRender() {
|
|
2434
2438
|
this.cacheConfig = {};
|
|
@@ -2509,21 +2513,21 @@ function ti(t) {
|
|
|
2509
2513
|
};
|
|
2510
2514
|
l.length && i.slotUpdate && O(() => i.slotUpdate(u));
|
|
2511
2515
|
let f = [];
|
|
2512
|
-
const
|
|
2513
|
-
e.parser.renderChildren ? f = e.parser.renderChildren(
|
|
2516
|
+
const p = e.loadChildrenPending();
|
|
2517
|
+
e.parser.renderChildren ? f = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach((y) => {
|
|
2514
2518
|
f.push(this.renderRule({
|
|
2515
2519
|
type: "template",
|
|
2516
|
-
slot:
|
|
2520
|
+
slot: y
|
|
2517
2521
|
}, (() => {
|
|
2518
|
-
if (h.Function(n.renderSlots[
|
|
2519
|
-
return O(() => n.renderSlots[
|
|
2520
|
-
const _ = this.parseSide(n.renderSlots[
|
|
2522
|
+
if (h.Function(n.renderSlots[y]))
|
|
2523
|
+
return O(() => n.renderSlots[y]());
|
|
2524
|
+
const _ = this.parseSide(n.renderSlots[y], e);
|
|
2521
2525
|
return this.renderRule(_);
|
|
2522
2526
|
})()));
|
|
2523
2527
|
});
|
|
2524
|
-
const
|
|
2525
|
-
let
|
|
2526
|
-
return
|
|
2528
|
+
const d = this.getTypeSlot(e);
|
|
2529
|
+
let m;
|
|
2530
|
+
return d ? (u.children = f, m = d(u)) : m = a ? e.parser.preview(We(f), e) : e.parser.render(We(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;
|
|
2527
2531
|
}, this.setCache(e, s, r);
|
|
2528
2532
|
}
|
|
2529
2533
|
return (...s) => {
|
|
@@ -2710,7 +2714,7 @@ function ti(t) {
|
|
|
2710
2714
|
}
|
|
2711
2715
|
});
|
|
2712
2716
|
}
|
|
2713
|
-
let
|
|
2717
|
+
let ii = 1;
|
|
2714
2718
|
function it(t) {
|
|
2715
2719
|
C(this, {
|
|
2716
2720
|
$handle: t,
|
|
@@ -2720,7 +2724,7 @@ function it(t) {
|
|
|
2720
2724
|
vNode: new t.fc.CreateNode(t.vm),
|
|
2721
2725
|
force: !1,
|
|
2722
2726
|
tmpInput: null,
|
|
2723
|
-
id:
|
|
2727
|
+
id: ii++
|
|
2724
2728
|
}), Tt(this, {
|
|
2725
2729
|
options() {
|
|
2726
2730
|
return t.options;
|
|
@@ -2730,9 +2734,9 @@ function it(t) {
|
|
|
2730
2734
|
}
|
|
2731
2735
|
}), this.initCache(), this.initRender();
|
|
2732
2736
|
}
|
|
2733
|
-
ei(it);
|
|
2734
2737
|
ti(it);
|
|
2735
|
-
|
|
2738
|
+
ri(it);
|
|
2739
|
+
function ni(t) {
|
|
2736
2740
|
C(t.prototype, {
|
|
2737
2741
|
parseInjectEvent(e, r) {
|
|
2738
2742
|
const i = e.inject || this.options.injectEvent;
|
|
@@ -2759,17 +2763,17 @@ function ii(t) {
|
|
|
2759
2763
|
let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
|
|
2760
2764
|
return h.trueArray(u) && u.forEach((f) => {
|
|
2761
2765
|
if (!f) return;
|
|
2762
|
-
let
|
|
2763
|
-
if (h.Object(f) && (
|
|
2764
|
-
r || (
|
|
2765
|
-
const
|
|
2766
|
-
this.vm.$emit(
|
|
2766
|
+
let p, d = n || o || a;
|
|
2767
|
+
if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
|
|
2768
|
+
r || (d = `native-${d}`);
|
|
2769
|
+
const m = be(`${d}-${f}`), y = (..._) => {
|
|
2770
|
+
this.vm.$emit(m, ..._), this.vm.$emit("emit-event", m, ..._), this.bus.$emit(m, ..._);
|
|
2767
2771
|
};
|
|
2768
|
-
if (
|
|
2769
|
-
i[f] =
|
|
2772
|
+
if (y.__emit = !0, !p && l === !1)
|
|
2773
|
+
i[f] = y;
|
|
2770
2774
|
else {
|
|
2771
|
-
let _ =
|
|
2772
|
-
i[f] = h.Undef(_) ?
|
|
2775
|
+
let _ = p || l || this.options.injectEvent;
|
|
2776
|
+
i[f] = h.Undef(_) ? y : this.inject(s, y, _);
|
|
2773
2777
|
}
|
|
2774
2778
|
}
|
|
2775
2779
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2799,33 +2803,33 @@ function ii(t) {
|
|
|
2799
2803
|
},
|
|
2800
2804
|
loadStrVar(e, r, i) {
|
|
2801
2805
|
if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
|
|
2802
|
-
const s = e, n =
|
|
2803
|
-
let f = !1,
|
|
2806
|
+
const s = e, n = Xr(e), o = (u) => {
|
|
2807
|
+
let f = !1, p;
|
|
2804
2808
|
if (i && u.indexOf("$form.") === 0) {
|
|
2805
|
-
const
|
|
2806
|
-
|
|
2807
|
-
id: "$form." +
|
|
2808
|
-
getValue: () => L(i.value,
|
|
2809
|
-
}) : L(i.value,
|
|
2809
|
+
const d = u.split(".");
|
|
2810
|
+
d.shift(), D(i.value, d[0]) && (f = !0, p = r ? r({
|
|
2811
|
+
id: "$form." + d[0] + "_" + i.rule.__fc__.id,
|
|
2812
|
+
getValue: () => L(i.value, d)
|
|
2813
|
+
}) : L(i.value, d));
|
|
2810
2814
|
}
|
|
2811
|
-
return f || (
|
|
2815
|
+
return f || (p = r ? r(u) : this.fc.getLoadData(u)), p;
|
|
2812
2816
|
}, a = (u) => {
|
|
2813
2817
|
const f = [];
|
|
2814
|
-
u.forEach((
|
|
2815
|
-
|
|
2818
|
+
u.forEach((d) => {
|
|
2819
|
+
d.key ? f.push(d.key) : d.children && f.push(a(d.children));
|
|
2816
2820
|
});
|
|
2817
|
-
let
|
|
2818
|
-
return f.forEach((
|
|
2819
|
-
|
|
2820
|
-
}), f.length === 1 && (
|
|
2821
|
+
let p = !1;
|
|
2822
|
+
return f.forEach((d, m) => {
|
|
2823
|
+
d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[m] = d.slice(1, -1), p = !0);
|
|
2824
|
+
}), f.length === 1 && (p || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
|
|
2821
2825
|
};
|
|
2822
2826
|
let l;
|
|
2823
2827
|
if (n.forEach((u) => {
|
|
2824
|
-
const f = u.split("||"),
|
|
2825
|
-
if (
|
|
2826
|
-
const
|
|
2827
|
-
let
|
|
2828
|
-
(
|
|
2828
|
+
const f = u.split("||"), p = f[0].trim();
|
|
2829
|
+
if (p) {
|
|
2830
|
+
const d = (f[1] || "").trim(), m = Nt(p);
|
|
2831
|
+
let y = O(() => a(m));
|
|
2832
|
+
(y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
|
|
2829
2833
|
}
|
|
2830
2834
|
}), n.length === 1 && s === `{{${n[0]}}}`)
|
|
2831
2835
|
return l;
|
|
@@ -2848,12 +2852,12 @@ function ii(t) {
|
|
|
2848
2852
|
});
|
|
2849
2853
|
}
|
|
2850
2854
|
const $t = ["hook:updated", "hook:mounted"];
|
|
2851
|
-
function
|
|
2855
|
+
function si(t) {
|
|
2852
2856
|
C(t.prototype, {
|
|
2853
2857
|
usePage() {
|
|
2854
2858
|
const e = this.options.page;
|
|
2855
2859
|
if (!e) return;
|
|
2856
|
-
let r = 25, i =
|
|
2860
|
+
let r = 25, i = oi(this.rules);
|
|
2857
2861
|
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), C(this, {
|
|
2858
2862
|
first: r,
|
|
2859
2863
|
limit: i,
|
|
@@ -2868,10 +2872,10 @@ function ni(t) {
|
|
|
2868
2872
|
}
|
|
2869
2873
|
});
|
|
2870
2874
|
}
|
|
2871
|
-
function
|
|
2875
|
+
function oi(t) {
|
|
2872
2876
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2873
2877
|
}
|
|
2874
|
-
function
|
|
2878
|
+
function ai(t) {
|
|
2875
2879
|
C(t.prototype, {
|
|
2876
2880
|
clearNextTick() {
|
|
2877
2881
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
@@ -2886,7 +2890,7 @@ function oi(t) {
|
|
|
2886
2890
|
}
|
|
2887
2891
|
});
|
|
2888
2892
|
}
|
|
2889
|
-
function
|
|
2893
|
+
function li(t) {
|
|
2890
2894
|
Object.defineProperties(t.origin, {
|
|
2891
2895
|
__fc__: Ze(ge(t), !0)
|
|
2892
2896
|
}), t.rule !== t.origin && Object.defineProperties(t.rule, {
|
|
@@ -2921,7 +2925,7 @@ function zt(t, e, r) {
|
|
|
2921
2925
|
exportEl: void 0,
|
|
2922
2926
|
defaultValue: s ? G(r) : void 0,
|
|
2923
2927
|
field: e.field || void 0
|
|
2924
|
-
}), this.updateKey(),
|
|
2928
|
+
}), this.updateKey(), li(this), this.update(t, !0);
|
|
2925
2929
|
}
|
|
2926
2930
|
C(zt.prototype, {
|
|
2927
2931
|
getParentGroup() {
|
|
@@ -2960,8 +2964,8 @@ C(zt.prototype, {
|
|
|
2960
2964
|
rule: this.rule,
|
|
2961
2965
|
api: this.$api,
|
|
2962
2966
|
update: (u) => {
|
|
2963
|
-
const f = u || i,
|
|
2964
|
-
this.setPending(e, r, f), o && o(f,
|
|
2967
|
+
const f = u || i, p = this.getPending(e, i);
|
|
2968
|
+
this.setPending(e, r, f), o && o(f, p);
|
|
2965
2969
|
},
|
|
2966
2970
|
reload: () => {
|
|
2967
2971
|
const u = this.getPending(e, i);
|
|
@@ -3073,7 +3077,7 @@ C(zt.prototype, {
|
|
|
3073
3077
|
}), !e && this.unwatch(), this.watchTo(), this.link(), this.updateType();
|
|
3074
3078
|
}
|
|
3075
3079
|
});
|
|
3076
|
-
function
|
|
3080
|
+
function ui(t) {
|
|
3077
3081
|
C(t.prototype, {
|
|
3078
3082
|
nextRefresh(e) {
|
|
3079
3083
|
const r = this.loadedId;
|
|
@@ -3085,7 +3089,7 @@ function li(t) {
|
|
|
3085
3089
|
const r = ht(e);
|
|
3086
3090
|
return Object.defineProperties(r, {
|
|
3087
3091
|
__origin__: Ze(e, !0)
|
|
3088
|
-
}),
|
|
3092
|
+
}), fi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
|
|
3089
3093
|
i && this.loadFn(i, r);
|
|
3090
3094
|
}), this.loadCtrl(r), r.update && (r.update = W(r.update)), r;
|
|
3091
3095
|
},
|
|
@@ -3135,29 +3139,29 @@ function li(t) {
|
|
|
3135
3139
|
let l = ht(o);
|
|
3136
3140
|
const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
|
|
3137
3141
|
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);
|
|
3138
|
-
let f,
|
|
3139
|
-
if (
|
|
3140
|
-
if (f = o.__fc__,
|
|
3142
|
+
let f, p = !1, d = !!o.__fc__, m = l.value;
|
|
3143
|
+
if (d) {
|
|
3144
|
+
if (f = o.__fc__, m = f.defaultValue, f.deleted) {
|
|
3141
3145
|
if (bt(f))
|
|
3142
3146
|
return;
|
|
3143
3147
|
f.update(this);
|
|
3144
3148
|
} else if (!f.check(this)) {
|
|
3145
3149
|
if (bt(f))
|
|
3146
3150
|
return;
|
|
3147
|
-
e[a] = o = o._clone ? o._clone() : Pt(_e(o)), f = null,
|
|
3151
|
+
e[a] = o = o._clone ? o._clone() : Pt(_e(o)), f = null, p = !0;
|
|
3148
3152
|
}
|
|
3149
3153
|
}
|
|
3150
3154
|
if (f)
|
|
3151
3155
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3152
3156
|
else {
|
|
3153
|
-
const
|
|
3154
|
-
f = new zt(this,
|
|
3157
|
+
const j = this.parseRule(o);
|
|
3158
|
+
f = new zt(this, j, m), this.bindParser(f);
|
|
3155
3159
|
}
|
|
3156
|
-
[!1, !0].forEach((
|
|
3157
|
-
const
|
|
3158
|
-
if (f.parser.loadChildren === !1 || s(
|
|
3159
|
-
const
|
|
3160
|
-
|
|
3160
|
+
[!1, !0].forEach((j) => this.parseEmit(f, j)), 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");
|
|
3161
|
+
const y = f.loadChildrenPending();
|
|
3162
|
+
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3163
|
+
const j = i(a);
|
|
3164
|
+
j > -1 || !a ? this.sort.splice(j + 1, 0, f.id) : this.sort.push(f.id);
|
|
3161
3165
|
}
|
|
3162
3166
|
const _ = f.rule;
|
|
3163
3167
|
return f.updated || (f.updated = !0, h.Function(_.update) && this.bus.$once("load-end", () => {
|
|
@@ -3170,16 +3174,16 @@ function li(t) {
|
|
|
3170
3174
|
return e.input && e.rule.control && this.useCtrl(e);
|
|
3171
3175
|
},
|
|
3172
3176
|
useCtrl(e) {
|
|
3173
|
-
const r =
|
|
3177
|
+
const r = ci(e), i = [], s = this.api;
|
|
3174
3178
|
if (!r.length) return !1;
|
|
3175
3179
|
for (let a = 0; a < r.length; a++) {
|
|
3176
|
-
const l = r[a], u = l.handle || function(
|
|
3177
|
-
return (ce[l.condition || "=="] || ce["=="])(
|
|
3180
|
+
const l = r[a], u = l.handle || function(p) {
|
|
3181
|
+
return (ce[l.condition || "=="] || ce["=="])(p, l.value);
|
|
3178
3182
|
};
|
|
3179
3183
|
if (!h.trueArray(l.rule)) continue;
|
|
3180
3184
|
const f = U(v({}, l), {
|
|
3181
3185
|
valid: O(() => u(e.rule.value, s)),
|
|
3182
|
-
ctrl:
|
|
3186
|
+
ctrl: hi(e, l.rule),
|
|
3183
3187
|
isHidden: h.String(l.rule[0])
|
|
3184
3188
|
});
|
|
3185
3189
|
f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
|
|
@@ -3188,16 +3192,16 @@ function li(t) {
|
|
|
3188
3192
|
const n = [];
|
|
3189
3193
|
let o = !1;
|
|
3190
3194
|
return this.deferSyncValue(() => {
|
|
3191
|
-
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append:
|
|
3195
|
+
i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl: m, method: y }) => {
|
|
3192
3196
|
if (a) {
|
|
3193
3197
|
l ? e.ctrlRule.push({
|
|
3194
3198
|
__ctrl: !0,
|
|
3195
3199
|
children: u,
|
|
3196
3200
|
valid: l
|
|
3197
|
-
}) :
|
|
3198
|
-
|
|
3201
|
+
}) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3202
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((_) => {
|
|
3199
3203
|
this.api.setEffect(_, "required", l);
|
|
3200
|
-
}), l || this.api.clearValidateState(u)) :
|
|
3204
|
+
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3201
3205
|
});
|
|
3202
3206
|
return;
|
|
3203
3207
|
}
|
|
@@ -3210,11 +3214,11 @@ function li(t) {
|
|
|
3210
3214
|
children: u
|
|
3211
3215
|
};
|
|
3212
3216
|
e.ctrlRule.push(_), this.bus.$once("load-start", () => {
|
|
3213
|
-
f ? s.prepend(_, f,
|
|
3217
|
+
f ? s.prepend(_, f, d) : p || d ? s.append(_, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
|
|
3214
3218
|
});
|
|
3215
3219
|
} else {
|
|
3216
|
-
e.ctrlRule.splice(e.ctrlRule.indexOf(
|
|
3217
|
-
const _ = Q(
|
|
3220
|
+
e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
|
|
3221
|
+
const _ = Q(m);
|
|
3218
3222
|
_ && _.rm();
|
|
3219
3223
|
}
|
|
3220
3224
|
});
|
|
@@ -3242,17 +3246,17 @@ function li(t) {
|
|
|
3242
3246
|
}
|
|
3243
3247
|
});
|
|
3244
3248
|
}
|
|
3245
|
-
function
|
|
3249
|
+
function fi(t) {
|
|
3246
3250
|
const e = Mt();
|
|
3247
3251
|
return Object.keys(e).forEach((r) => {
|
|
3248
|
-
|
|
3252
|
+
D(t, r) || F(t, r, e[r]);
|
|
3249
3253
|
}), t;
|
|
3250
3254
|
}
|
|
3251
|
-
function
|
|
3255
|
+
function ci(t) {
|
|
3252
3256
|
const e = t.rule.control || [];
|
|
3253
3257
|
return h.Object(e) ? [e] : e;
|
|
3254
3258
|
}
|
|
3255
|
-
function
|
|
3259
|
+
function hi(t, e) {
|
|
3256
3260
|
for (let r = 0; r < t.ctrlRule.length; r++) {
|
|
3257
3261
|
const i = t.ctrlRule[r];
|
|
3258
3262
|
if (i.children === e)
|
|
@@ -3262,7 +3266,7 @@ function ci(t, e) {
|
|
|
3262
3266
|
function bt(t) {
|
|
3263
3267
|
return !!t.rule.__ctrl;
|
|
3264
3268
|
}
|
|
3265
|
-
function
|
|
3269
|
+
function di(t) {
|
|
3266
3270
|
C(t.prototype, {
|
|
3267
3271
|
setValue(e, r, i, s) {
|
|
3268
3272
|
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, {
|
|
@@ -3285,7 +3289,7 @@ function hi(t) {
|
|
|
3285
3289
|
this.deferSyncValue(() => {
|
|
3286
3290
|
const i = e.getParentGroup(), s = i ? this.subRuleData[i.id] : null, n = {};
|
|
3287
3291
|
Object.keys(r || {}).forEach((o) => {
|
|
3288
|
-
s &&
|
|
3292
|
+
s && D(s, o) ? n[o] = r[o] : D(this.api.form, o) ? this.api.form[o] = r[o] : this.api.top !== this.api && D(this.api.top.form, o) && (this.api.top.form[o] = r[o]);
|
|
3289
3293
|
}), Object.keys(n).length && this.api.setChildrenFormData(i.rule, n);
|
|
3290
3294
|
});
|
|
3291
3295
|
},
|
|
@@ -3315,7 +3319,7 @@ function hi(t) {
|
|
|
3315
3319
|
return e.rule.ignore === !0 || (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields) && e.hasHidden();
|
|
3316
3320
|
},
|
|
3317
3321
|
appendValue(e) {
|
|
3318
|
-
(!e.field || !
|
|
3322
|
+
(!e.field || !D(this.appendData, e.field)) && !this.options.forceCoverValue || (e.value = this.appendData[e.field], delete this.appendData[e.field]);
|
|
3319
3323
|
},
|
|
3320
3324
|
addSubForm(e, r) {
|
|
3321
3325
|
this.subForm[e.id] = r;
|
|
@@ -3387,8 +3391,8 @@ const je = {
|
|
|
3387
3391
|
},
|
|
3388
3392
|
mergeProp(t) {
|
|
3389
3393
|
}
|
|
3390
|
-
},
|
|
3391
|
-
function
|
|
3394
|
+
}, pi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Re = Symbol("oldValue");
|
|
3395
|
+
function mi(t) {
|
|
3392
3396
|
C(t.prototype, {
|
|
3393
3397
|
getCtx(e) {
|
|
3394
3398
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
@@ -3436,7 +3440,7 @@ function pi(t) {
|
|
|
3436
3440
|
this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
|
|
3437
3441
|
},
|
|
3438
3442
|
watchCtx(e) {
|
|
3439
|
-
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" &&
|
|
3443
|
+
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && pi.indexOf(i) === -1).forEach((i) => {
|
|
3440
3444
|
const s = Ae(e.rule, i), n = i === "children";
|
|
3441
3445
|
e.refRule[i] = s, e.watch.push(B(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3442
3446
|
let l = s.value;
|
|
@@ -3572,7 +3576,7 @@ function pi(t) {
|
|
|
3572
3576
|
case "len":
|
|
3573
3577
|
case "maxLen":
|
|
3574
3578
|
case "minLen":
|
|
3575
|
-
const a = (
|
|
3579
|
+
const a = (y) => n === "len" ? y === o : n === "maxLen" ? y <= o : y >= o;
|
|
3576
3580
|
if (Array.isArray(r)) {
|
|
3577
3581
|
if (!a(r.length))
|
|
3578
3582
|
return n;
|
|
@@ -3614,7 +3618,7 @@ function pi(t) {
|
|
|
3614
3618
|
return n;
|
|
3615
3619
|
break;
|
|
3616
3620
|
case "hasKeys":
|
|
3617
|
-
if (typeof r != "object" || Array.isArray(o) && o.some((
|
|
3621
|
+
if (typeof r != "object" || Array.isArray(o) && o.some((y) => !(y in r)))
|
|
3618
3622
|
return n;
|
|
3619
3623
|
break;
|
|
3620
3624
|
case "email":
|
|
@@ -3651,18 +3655,18 @@ function pi(t) {
|
|
|
3651
3655
|
const l = a.mode === "OR";
|
|
3652
3656
|
let u = !0;
|
|
3653
3657
|
for (let f = 0; f < a.group.length; f++) {
|
|
3654
|
-
const
|
|
3655
|
-
let
|
|
3656
|
-
if (
|
|
3657
|
-
|
|
3658
|
-
else if (
|
|
3659
|
-
|
|
3660
|
-
else if (!
|
|
3658
|
+
const p = a.group[f];
|
|
3659
|
+
let d, m = null;
|
|
3660
|
+
if (p.variable)
|
|
3661
|
+
m = JSON.stringify(this.fc.getLoadData(p.variable) || "");
|
|
3662
|
+
else if (p.field)
|
|
3663
|
+
m = pt(p.field || "");
|
|
3664
|
+
else if (!p.mode)
|
|
3661
3665
|
return !0;
|
|
3662
|
-
let
|
|
3663
|
-
if (
|
|
3666
|
+
let y = p.compare;
|
|
3667
|
+
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)
|
|
3664
3668
|
return !0;
|
|
3665
|
-
l || (u = u &&
|
|
3669
|
+
l || (u = u && d);
|
|
3666
3670
|
}
|
|
3667
3671
|
return l ? !1 : u;
|
|
3668
3672
|
};
|
|
@@ -3704,7 +3708,7 @@ function pi(t) {
|
|
|
3704
3708
|
const { id: r, field: i, input: s, name: n } = e;
|
|
3705
3709
|
re(this.ctxs, r), re(this.formData, r), re(this.subForm, r), re(this.vm.ctxInject, r);
|
|
3706
3710
|
const o = e.getParentGroup();
|
|
3707
|
-
o && this.subRuleData[o.id] && re(this.subRuleData[o.id], i), e.group && re(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !
|
|
3711
|
+
o && this.subRuleData[o.id] && re(this.subRuleData[o.id], i), e.group && re(this.subRuleData, r), s && this.rmIdCtx(e, i, "field"), n && this.rmIdCtx(e, n, "name"), s && !D(this.fieldCtx, i) && re(this.form, i), this.deferSyncValue(() => {
|
|
3708
3712
|
if (!this.reloading) {
|
|
3709
3713
|
if (e.parser.loadChildren !== !1) {
|
|
3710
3714
|
const l = e.getPending("children", e.rule.children);
|
|
@@ -3718,7 +3722,7 @@ function pi(t) {
|
|
|
3718
3722
|
}
|
|
3719
3723
|
});
|
|
3720
3724
|
}
|
|
3721
|
-
function
|
|
3725
|
+
function gi(t) {
|
|
3722
3726
|
C(t.prototype, {
|
|
3723
3727
|
mounted() {
|
|
3724
3728
|
const e = () => {
|
|
@@ -3738,21 +3742,35 @@ function mi(t) {
|
|
|
3738
3742
|
this.bus.$emit(e, ...r);
|
|
3739
3743
|
},
|
|
3740
3744
|
targetHook(e, r, i) {
|
|
3741
|
-
var
|
|
3742
|
-
let s = (
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3745
|
+
var l, u, f, p;
|
|
3746
|
+
let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, m) => {
|
|
3747
|
+
d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
|
|
3748
|
+
O(() => y(U(v({}, i || {}), {
|
|
3749
|
+
self: e.rule,
|
|
3750
|
+
rule: e.rule,
|
|
3751
|
+
parent: m == null ? void 0 : m.rule,
|
|
3752
|
+
$f: this.api,
|
|
3753
|
+
api: this.api,
|
|
3754
|
+
option: this.vm.$props.option
|
|
3755
|
+
})));
|
|
3756
|
+
}));
|
|
3757
|
+
};
|
|
3758
|
+
n(s);
|
|
3759
|
+
let o = "deep" + qr(r), a = e.parent;
|
|
3760
|
+
for (; a; ) {
|
|
3761
|
+
let d = (p = (f = a.prop) == null ? void 0 : f.hook) == null ? void 0 : p[o];
|
|
3762
|
+
n(d, a), a = a.parent;
|
|
3763
|
+
}
|
|
3746
3764
|
}
|
|
3747
3765
|
});
|
|
3748
3766
|
}
|
|
3749
|
-
function
|
|
3767
|
+
function yi(t) {
|
|
3750
3768
|
C(t.prototype, {
|
|
3751
3769
|
useProvider() {
|
|
3752
3770
|
const e = this.fc.providers;
|
|
3753
3771
|
Object.keys(e).forEach((r) => {
|
|
3754
3772
|
let i = e[r];
|
|
3755
|
-
h.Function(i) && (i = i(this.fc)), i._c =
|
|
3773
|
+
h.Function(i) && (i = i(this.fc)), i._c = bi(i), this.onEffect(i), this.providers[r] = i;
|
|
3756
3774
|
});
|
|
3757
3775
|
},
|
|
3758
3776
|
onEffect(e) {
|
|
@@ -3768,7 +3786,7 @@ function gi(t) {
|
|
|
3768
3786
|
let r = {
|
|
3769
3787
|
required: () => {
|
|
3770
3788
|
var i, s;
|
|
3771
|
-
return (
|
|
3789
|
+
return (D(e.rule, "$required") ? e.rule.$required : (s = (i = e.rule) == null ? void 0 : i.effect) == null ? void 0 : s.required) || !1;
|
|
3772
3790
|
}
|
|
3773
3791
|
};
|
|
3774
3792
|
Object.keys(e.rule.effect || {}).forEach((i) => {
|
|
@@ -3798,9 +3816,9 @@ function gi(t) {
|
|
|
3798
3816
|
}, r);
|
|
3799
3817
|
},
|
|
3800
3818
|
getEffect(e, r) {
|
|
3801
|
-
if (
|
|
3819
|
+
if (D(e, "$" + r))
|
|
3802
3820
|
return e["$" + r];
|
|
3803
|
-
if (
|
|
3821
|
+
if (D(e, "effect") && D(e.effect, r))
|
|
3804
3822
|
return e.effect[r];
|
|
3805
3823
|
},
|
|
3806
3824
|
emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
|
|
@@ -3809,28 +3827,28 @@ function gi(t) {
|
|
|
3809
3827
|
Object.keys(l).forEach((u) => {
|
|
3810
3828
|
const f = this.providers[u];
|
|
3811
3829
|
if (!f || f.input && !i) return;
|
|
3812
|
-
let
|
|
3830
|
+
let p;
|
|
3813
3831
|
if (!f._c)
|
|
3814
|
-
|
|
3832
|
+
p = "*";
|
|
3815
3833
|
else if (f._used.indexOf(s) > -1)
|
|
3816
|
-
|
|
3834
|
+
p = s;
|
|
3817
3835
|
else
|
|
3818
3836
|
return;
|
|
3819
|
-
const
|
|
3820
|
-
e && (
|
|
3837
|
+
const d = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
|
|
3838
|
+
e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (m) => x(d.getProp(), [m]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
|
|
3821
3839
|
});
|
|
3822
3840
|
}
|
|
3823
3841
|
});
|
|
3824
3842
|
}
|
|
3825
|
-
function
|
|
3843
|
+
function $i(t) {
|
|
3826
3844
|
return t.filter(function(e, r, i) {
|
|
3827
3845
|
return i.indexOf(e, 0) === r;
|
|
3828
3846
|
});
|
|
3829
3847
|
}
|
|
3830
|
-
function
|
|
3848
|
+
function bi(t) {
|
|
3831
3849
|
const e = t.components;
|
|
3832
3850
|
if (Array.isArray(e)) {
|
|
3833
|
-
const r =
|
|
3851
|
+
const r = $i(e.filter((i) => i !== "*"));
|
|
3834
3852
|
return r.length ? r : !1;
|
|
3835
3853
|
} else return h.String(e) ? [e] : !1;
|
|
3836
3854
|
}
|
|
@@ -3872,7 +3890,7 @@ function K(t) {
|
|
|
3872
3890
|
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3873
3891
|
const i = O(() => r(e, this));
|
|
3874
3892
|
return i && i !== e && C(e, i), e;
|
|
3875
|
-
},
|
|
3893
|
+
}, ei(this));
|
|
3876
3894
|
}
|
|
3877
3895
|
C(K.prototype, {
|
|
3878
3896
|
initData(t) {
|
|
@@ -3912,26 +3930,26 @@ C(K.prototype, {
|
|
|
3912
3930
|
});
|
|
3913
3931
|
}
|
|
3914
3932
|
});
|
|
3915
|
-
ii(K);
|
|
3916
3933
|
ni(K);
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3934
|
+
si(K);
|
|
3935
|
+
ai(K);
|
|
3936
|
+
ui(K);
|
|
3937
|
+
di(K);
|
|
3921
3938
|
mi(K);
|
|
3922
3939
|
gi(K);
|
|
3923
|
-
|
|
3924
|
-
|
|
3940
|
+
yi(K);
|
|
3941
|
+
const vi = "fcFragment", Me = {
|
|
3942
|
+
name: vi,
|
|
3925
3943
|
functional: !0,
|
|
3926
3944
|
props: ["vnode"],
|
|
3927
3945
|
render(t, e) {
|
|
3928
3946
|
return e.props.vnode ? e.props.vnode : e.children;
|
|
3929
3947
|
}
|
|
3930
3948
|
};
|
|
3931
|
-
function
|
|
3949
|
+
function _i(t) {
|
|
3932
3950
|
return h.String(t) ? { domProps: { innerHTML: t } } : t;
|
|
3933
3951
|
}
|
|
3934
|
-
function
|
|
3952
|
+
function Ci() {
|
|
3935
3953
|
const t = {};
|
|
3936
3954
|
function e(r) {
|
|
3937
3955
|
r && this.setVm(r);
|
|
@@ -3946,7 +3964,7 @@ function _i() {
|
|
|
3946
3964
|
},
|
|
3947
3965
|
makeComponent(r, i, s) {
|
|
3948
3966
|
var o;
|
|
3949
|
-
let n = this.$h(r,
|
|
3967
|
+
let n = this.$h(r, _i(i), s || []);
|
|
3950
3968
|
if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
|
|
3951
3969
|
const a = Object.keys(n.componentOptions.propsData);
|
|
3952
3970
|
n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
|
|
@@ -3963,7 +3981,7 @@ function _i() {
|
|
|
3963
3981
|
},
|
|
3964
3982
|
use(r) {
|
|
3965
3983
|
Object.keys(r).forEach((i) => {
|
|
3966
|
-
const s = be(i), n =
|
|
3984
|
+
const s = be(i), n = zr(i).toLocaleLowerCase(), o = r[i];
|
|
3967
3985
|
[i, s, n].forEach((a) => {
|
|
3968
3986
|
e.alias(i, o), e.prototype[a] = function(l, u) {
|
|
3969
3987
|
return this.make(o, l, u);
|
|
@@ -3973,7 +3991,7 @@ function _i() {
|
|
|
3973
3991
|
}
|
|
3974
3992
|
}), e;
|
|
3975
3993
|
}
|
|
3976
|
-
function
|
|
3994
|
+
function wi(t) {
|
|
3977
3995
|
class e extends Jt {
|
|
3978
3996
|
}
|
|
3979
3997
|
return Object.assign(e.prototype, t), e;
|
|
@@ -4037,7 +4055,7 @@ C(Jt.prototype, {
|
|
|
4037
4055
|
render(t) {
|
|
4038
4056
|
}
|
|
4039
4057
|
});
|
|
4040
|
-
const
|
|
4058
|
+
const Oi = function(t) {
|
|
4041
4059
|
const e = {
|
|
4042
4060
|
name: "loadData",
|
|
4043
4061
|
_fn: [],
|
|
@@ -4047,14 +4065,14 @@ const wi = function(t) {
|
|
|
4047
4065
|
const o = [];
|
|
4048
4066
|
n.forEach((a) => {
|
|
4049
4067
|
if (a && (a.attr || a.template)) {
|
|
4050
|
-
let l = (
|
|
4051
|
-
let
|
|
4052
|
-
i && i.__fc__ && (
|
|
4053
|
-
let
|
|
4054
|
-
a.template ?
|
|
4055
|
-
const
|
|
4056
|
-
a.to === "child" ?
|
|
4057
|
-
}, u = (
|
|
4068
|
+
let l = (p) => {
|
|
4069
|
+
let d;
|
|
4070
|
+
i && i.__fc__ && (d = i.__fc__.getParentGroup());
|
|
4071
|
+
let m;
|
|
4072
|
+
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 = G(m));
|
|
4073
|
+
const y = a.modify ? i : r.getProp();
|
|
4074
|
+
a.to === "child" ? y.children ? F(y.children, 0, m) : F(y, "children", [m]) : se(y, a.to || "options", m), s.sync(i);
|
|
4075
|
+
}, u = (p) => l(p);
|
|
4058
4076
|
const f = t.watchLoadData(u);
|
|
4059
4077
|
l = ne(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
4060
4078
|
}
|
|
@@ -4068,7 +4086,7 @@ const wi = function(t) {
|
|
|
4068
4086
|
}
|
|
4069
4087
|
};
|
|
4070
4088
|
return e.watch = e.loaded, e;
|
|
4071
|
-
},
|
|
4089
|
+
}, Fi = function(t) {
|
|
4072
4090
|
const e = {
|
|
4073
4091
|
name: "t",
|
|
4074
4092
|
_fn: [],
|
|
@@ -4080,13 +4098,13 @@ const wi = function(t) {
|
|
|
4080
4098
|
const l = n[a];
|
|
4081
4099
|
if (l) {
|
|
4082
4100
|
const u = typeof l == "object";
|
|
4083
|
-
let f = (
|
|
4084
|
-
let
|
|
4101
|
+
let f = (m) => {
|
|
4102
|
+
let y = t.t(u ? l.attr : l, u ? l.params : null, m);
|
|
4085
4103
|
const _ = u && l.modify ? i : r.getProp();
|
|
4086
|
-
a === "child" ? _.children ? F(_.children, 0,
|
|
4087
|
-
},
|
|
4088
|
-
const
|
|
4089
|
-
f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(
|
|
4104
|
+
a === "child" ? _.children ? F(_.children, 0, y) : F(_, "children", [y]) : se(_, a, y), s.sync(i);
|
|
4105
|
+
}, p = (m) => f(m);
|
|
4106
|
+
const d = t.watchLoadData(p);
|
|
4107
|
+
f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
4090
4108
|
}
|
|
4091
4109
|
}), this._fn[r.id] = o;
|
|
4092
4110
|
},
|
|
@@ -4105,24 +4123,24 @@ const wi = function(t) {
|
|
|
4105
4123
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
4106
4124
|
else {
|
|
4107
4125
|
h.Object(i) || (i = { method: i });
|
|
4108
|
-
const s = i.method
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
return r.exec(o.id, h.String(s) ? s : "formCreateValidate", ...n, {
|
|
4126
|
+
const s = i.method, n = U(v({}, i), {
|
|
4127
|
+
validator(...o) {
|
|
4128
|
+
const a = Q(e);
|
|
4129
|
+
if (a)
|
|
4130
|
+
return r.exec(a.id, h.String(s) ? s : "formCreateValidate", ...o, {
|
|
4114
4131
|
attr: t,
|
|
4115
4132
|
rule: e,
|
|
4116
4133
|
api: r
|
|
4117
4134
|
});
|
|
4118
4135
|
}
|
|
4119
|
-
})
|
|
4136
|
+
});
|
|
4137
|
+
delete n.method, t.getProp().validate = [n];
|
|
4120
4138
|
}
|
|
4121
4139
|
},
|
|
4122
4140
|
watch(...t) {
|
|
4123
4141
|
Wt.load(...t);
|
|
4124
4142
|
}
|
|
4125
|
-
},
|
|
4143
|
+
}, ki = function(t) {
|
|
4126
4144
|
function e(s) {
|
|
4127
4145
|
return h.String(s) && (s = {
|
|
4128
4146
|
action: s,
|
|
@@ -4132,55 +4150,55 @@ const wi = function(t) {
|
|
|
4132
4150
|
function r(s, n, o) {
|
|
4133
4151
|
let a = s.value;
|
|
4134
4152
|
i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
|
|
4135
|
-
const l = (
|
|
4136
|
-
|
|
4153
|
+
const l = (p) => {
|
|
4154
|
+
p === void 0 ? s.clearProp() : se(s.getProp(), a.to || "options", p), o.sync(n);
|
|
4137
4155
|
};
|
|
4138
4156
|
if (!a || !a.action && !a.key) {
|
|
4139
4157
|
l(void 0);
|
|
4140
4158
|
return;
|
|
4141
4159
|
}
|
|
4142
4160
|
if (a = G(a), a.to || (a.to = "options"), a.key) {
|
|
4143
|
-
const
|
|
4144
|
-
if (!
|
|
4161
|
+
const p = t.$handle.options.globalData[a.key];
|
|
4162
|
+
if (!p) {
|
|
4145
4163
|
l(void 0);
|
|
4146
4164
|
return;
|
|
4147
4165
|
}
|
|
4148
|
-
if (
|
|
4149
|
-
l(
|
|
4166
|
+
if (p.type === "static") {
|
|
4167
|
+
l(p.data);
|
|
4150
4168
|
return;
|
|
4151
4169
|
} else
|
|
4152
|
-
a = v(v({}, a),
|
|
4170
|
+
a = v(v({}, a), p);
|
|
4153
4171
|
}
|
|
4154
4172
|
const u = a.onError, f = () => {
|
|
4155
4173
|
if (!s.getValue())
|
|
4156
4174
|
return s.clearProp(), o.sync(n), !0;
|
|
4157
4175
|
};
|
|
4158
|
-
i._fn[s.id] = t.watchLoadData(ne((
|
|
4159
|
-
if (
|
|
4176
|
+
i._fn[s.id] = t.watchLoadData(ne((p, d) => {
|
|
4177
|
+
if (d && a.watch === !1)
|
|
4160
4178
|
return i._fn[s.id]();
|
|
4161
|
-
const
|
|
4179
|
+
const m = t.$handle.loadFetchVar(G(a), p, n), y = U(v({
|
|
4162
4180
|
headers: {}
|
|
4163
|
-
},
|
|
4164
|
-
onSuccess(_,
|
|
4181
|
+
}, m), {
|
|
4182
|
+
onSuccess(_, j) {
|
|
4165
4183
|
if (f()) return;
|
|
4166
|
-
let ee = (T) =>
|
|
4167
|
-
const I = W(
|
|
4184
|
+
let ee = (T) => j ? T : D(T, "data") ? T.data : T;
|
|
4185
|
+
const I = W(m.parse);
|
|
4168
4186
|
h.Function(I) ? ee = I : I && h.String(I) && (ee = (T) => L(T, I)), l(ee(_, n, o));
|
|
4169
4187
|
},
|
|
4170
4188
|
onError(_) {
|
|
4171
|
-
l(void 0), !f() && (u || ((
|
|
4189
|
+
l(void 0), !f() && (u || ((j) => tt(j.message || "fetch fail " + m.action)))(_, n, o);
|
|
4172
4190
|
}
|
|
4173
4191
|
});
|
|
4174
|
-
t.$handle.beforeFetch(
|
|
4175
|
-
if (h.Function(
|
|
4176
|
-
|
|
4177
|
-
|
|
4192
|
+
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4193
|
+
if (h.Function(m.action)) {
|
|
4194
|
+
m.action(n, o).then((_) => {
|
|
4195
|
+
y.onSuccess(_, !0);
|
|
4178
4196
|
}).catch((_) => {
|
|
4179
|
-
|
|
4197
|
+
y.onError(_);
|
|
4180
4198
|
});
|
|
4181
4199
|
return;
|
|
4182
4200
|
}
|
|
4183
|
-
O(() => t.create.fetch(
|
|
4201
|
+
O(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
|
|
4184
4202
|
}).catch((_) => {
|
|
4185
4203
|
});
|
|
4186
4204
|
}, a.wait || 600));
|
|
@@ -4199,13 +4217,13 @@ const wi = function(t) {
|
|
|
4199
4217
|
}
|
|
4200
4218
|
};
|
|
4201
4219
|
return i;
|
|
4202
|
-
},
|
|
4203
|
-
fetch:
|
|
4204
|
-
loadData:
|
|
4205
|
-
t:
|
|
4220
|
+
}, Si = {
|
|
4221
|
+
fetch: ki,
|
|
4222
|
+
loadData: Oi,
|
|
4223
|
+
t: Fi,
|
|
4206
4224
|
componentValidate: Wt
|
|
4207
4225
|
};
|
|
4208
|
-
function
|
|
4226
|
+
function Ri(t) {
|
|
4209
4227
|
t = t || /* @__PURE__ */ new Map();
|
|
4210
4228
|
const e = {
|
|
4211
4229
|
$on(r, i) {
|
|
@@ -4229,8 +4247,8 @@ function Si(t) {
|
|
|
4229
4247
|
};
|
|
4230
4248
|
return e;
|
|
4231
4249
|
}
|
|
4232
|
-
const
|
|
4233
|
-
name:
|
|
4250
|
+
const Ei = "html", Di = {
|
|
4251
|
+
name: Ei,
|
|
4234
4252
|
loadChildren: !1,
|
|
4235
4253
|
render(t, e) {
|
|
4236
4254
|
return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
|
|
@@ -4239,7 +4257,7 @@ const Ri = "html", Ei = {
|
|
|
4239
4257
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4240
4258
|
}
|
|
4241
4259
|
};
|
|
4242
|
-
function
|
|
4260
|
+
function ji(t) {
|
|
4243
4261
|
t = t + "=";
|
|
4244
4262
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4245
4263
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4257,7 +4275,7 @@ function Di(t) {
|
|
|
4257
4275
|
}
|
|
4258
4276
|
return null;
|
|
4259
4277
|
}
|
|
4260
|
-
function
|
|
4278
|
+
function Ai(t) {
|
|
4261
4279
|
const e = localStorage.getItem(t);
|
|
4262
4280
|
if (e)
|
|
4263
4281
|
try {
|
|
@@ -4267,7 +4285,7 @@ function ji(t) {
|
|
|
4267
4285
|
}
|
|
4268
4286
|
return null;
|
|
4269
4287
|
}
|
|
4270
|
-
function
|
|
4288
|
+
function Ii(t) {
|
|
4271
4289
|
const e = sessionStorage.getItem(t);
|
|
4272
4290
|
if (e)
|
|
4273
4291
|
try {
|
|
@@ -4284,16 +4302,16 @@ function nt(t, e) {
|
|
|
4284
4302
|
let i = t(r.shift());
|
|
4285
4303
|
return r.length ? i == null ? null : L(i, r) : i;
|
|
4286
4304
|
}
|
|
4287
|
-
function Ii(t) {
|
|
4288
|
-
return nt(Di, t);
|
|
4289
|
-
}
|
|
4290
4305
|
function Vi(t) {
|
|
4291
4306
|
return nt(ji, t);
|
|
4292
4307
|
}
|
|
4293
4308
|
function Pi(t) {
|
|
4294
4309
|
return nt(Ai, t);
|
|
4295
4310
|
}
|
|
4296
|
-
|
|
4311
|
+
function Li(t) {
|
|
4312
|
+
return nt(Ii, t);
|
|
4313
|
+
}
|
|
4314
|
+
const Bi = {
|
|
4297
4315
|
en: {
|
|
4298
4316
|
required: "{title} is required",
|
|
4299
4317
|
validate: {
|
|
@@ -4343,17 +4361,17 @@ const Li = {
|
|
|
4343
4361
|
}
|
|
4344
4362
|
}
|
|
4345
4363
|
};
|
|
4346
|
-
function
|
|
4364
|
+
function Ti(t, e) {
|
|
4347
4365
|
let r;
|
|
4348
4366
|
return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
|
|
4349
4367
|
}
|
|
4350
4368
|
function Ue() {
|
|
4351
|
-
return
|
|
4369
|
+
return Ti("name", ...arguments);
|
|
4352
4370
|
}
|
|
4353
|
-
function
|
|
4371
|
+
function Ni(t) {
|
|
4354
4372
|
return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
|
|
4355
4373
|
}
|
|
4356
|
-
function
|
|
4374
|
+
function Mi(t, e) {
|
|
4357
4375
|
const r = new Vue({
|
|
4358
4376
|
data() {
|
|
4359
4377
|
return { rule: t, option: e || {} };
|
|
@@ -4364,29 +4382,29 @@ function Ni(t, e) {
|
|
|
4364
4382
|
});
|
|
4365
4383
|
return r.$mount(), r;
|
|
4366
4384
|
}
|
|
4367
|
-
function
|
|
4385
|
+
function Ui(t) {
|
|
4368
4386
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4369
4387
|
At.push(...e), xe.push(...r), et.push(...i), Ut([...e, ...r, ...i]);
|
|
4370
4388
|
}
|
|
4371
|
-
let
|
|
4389
|
+
let qi = 1;
|
|
4372
4390
|
const M = {}, Ee = Symbol("defValue");
|
|
4373
4391
|
function Kt(t) {
|
|
4374
4392
|
const e = {
|
|
4375
4393
|
[Me.name]: Me
|
|
4376
4394
|
}, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
|
|
4377
4395
|
t.extendApi
|
|
4378
|
-
], u = v({},
|
|
4379
|
-
let
|
|
4380
|
-
const
|
|
4381
|
-
$mobile:
|
|
4382
|
-
}),
|
|
4383
|
-
|
|
4396
|
+
], u = v({}, Si), f = Yr();
|
|
4397
|
+
let p = { global: {} };
|
|
4398
|
+
const d = t.isMobile === !0, m = ie({
|
|
4399
|
+
$mobile: d
|
|
4400
|
+
}), y = Ci(), _ = {}, j = {};
|
|
4401
|
+
Ui(t.attrs || {});
|
|
4384
4402
|
function ee(c) {
|
|
4385
|
-
const
|
|
4386
|
-
if (Array.isArray(
|
|
4387
|
-
return
|
|
4388
|
-
if (
|
|
4389
|
-
return
|
|
4403
|
+
const g = M[c];
|
|
4404
|
+
if (Array.isArray(g))
|
|
4405
|
+
return g.map(($) => $.api());
|
|
4406
|
+
if (g)
|
|
4407
|
+
return g.api();
|
|
4390
4408
|
}
|
|
4391
4409
|
function I(c) {
|
|
4392
4410
|
o.push(c);
|
|
@@ -4402,43 +4420,43 @@ function Kt(t) {
|
|
|
4402
4420
|
}));
|
|
4403
4421
|
}
|
|
4404
4422
|
function Le(c) {
|
|
4405
|
-
|
|
4423
|
+
y.use(c);
|
|
4406
4424
|
}
|
|
4407
4425
|
function de() {
|
|
4408
4426
|
const c = Ue(...arguments);
|
|
4409
4427
|
if (!c.id || !c.prop) return je;
|
|
4410
|
-
const
|
|
4411
|
-
r[
|
|
4428
|
+
const g = q(c.id), $ = c.prop, b = $.merge === !0 ? r[g] : void 0;
|
|
4429
|
+
r[g] = Se($, b || je), f[g] = P(g), $.maker && C(f, $.maker);
|
|
4412
4430
|
}
|
|
4413
|
-
function k(c,
|
|
4431
|
+
function k(c, g) {
|
|
4414
4432
|
let $;
|
|
4415
4433
|
if (h.String(c)) {
|
|
4416
|
-
if ($ = c,
|
|
4417
|
-
return ["form-create", "formcreate"].indexOf($) > -1 ?
|
|
4434
|
+
if ($ = c, g === void 0)
|
|
4435
|
+
return ["form-create", "formcreate"].indexOf($) > -1 ? E() : e[$];
|
|
4418
4436
|
} else
|
|
4419
|
-
$ = q(c.name),
|
|
4420
|
-
if (!$ || !
|
|
4437
|
+
$ = q(c.name), g = c;
|
|
4438
|
+
if (!$ || !g) return;
|
|
4421
4439
|
const b = q($);
|
|
4422
|
-
e[$] =
|
|
4440
|
+
e[$] = g, e[b] = g, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], g.formCreateParser && de($, g.formCreateParser);
|
|
4423
4441
|
}
|
|
4424
|
-
function
|
|
4425
|
-
return
|
|
4442
|
+
function E() {
|
|
4443
|
+
return Zr(Te, e, i);
|
|
4426
4444
|
}
|
|
4427
4445
|
function N() {
|
|
4428
4446
|
return Me;
|
|
4429
4447
|
}
|
|
4430
|
-
function pe(c,
|
|
4431
|
-
return h.Function(c.install) ? c.install(z,
|
|
4448
|
+
function pe(c, g) {
|
|
4449
|
+
return h.Function(c.install) ? c.install(z, g) : h.Function(c) && c(z, g), this;
|
|
4432
4450
|
}
|
|
4433
|
-
function z(c,
|
|
4434
|
-
let b =
|
|
4451
|
+
function z(c, g, $) {
|
|
4452
|
+
let b = Mi(c, g || {});
|
|
4435
4453
|
const w = b.$refs.fc.formCreate;
|
|
4436
|
-
return w.$parent = $,
|
|
4454
|
+
return w.$parent = $, Ni(w.options).appendChild(b.$el), w.api();
|
|
4437
4455
|
}
|
|
4438
|
-
Se(z,
|
|
4456
|
+
Se(z, j);
|
|
4439
4457
|
function Zt(c) {
|
|
4440
|
-
let
|
|
4441
|
-
return c ?
|
|
4458
|
+
let g = v({}, t);
|
|
4459
|
+
return c ? g.inherit = {
|
|
4442
4460
|
components: e,
|
|
4443
4461
|
parsers: r,
|
|
4444
4462
|
directives: i,
|
|
@@ -4447,65 +4465,65 @@ function Kt(t) {
|
|
|
4447
4465
|
useApps: o,
|
|
4448
4466
|
maker: f,
|
|
4449
4467
|
formulas: _,
|
|
4450
|
-
loadData:
|
|
4451
|
-
} : delete
|
|
4468
|
+
loadData: m
|
|
4469
|
+
} : delete g.inherit, Kt(g);
|
|
4452
4470
|
}
|
|
4453
|
-
function Qt(c,
|
|
4454
|
-
s[c] =
|
|
4471
|
+
function Qt(c, g) {
|
|
4472
|
+
s[c] = g;
|
|
4455
4473
|
}
|
|
4456
|
-
function Yt(c,
|
|
4457
|
-
_[c] =
|
|
4474
|
+
function Yt(c, g) {
|
|
4475
|
+
_[c] = g;
|
|
4458
4476
|
}
|
|
4459
|
-
function xt(c,
|
|
4477
|
+
function xt(c, g) {
|
|
4460
4478
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
4461
|
-
|
|
4462
|
-
b[w] = Se(
|
|
4463
|
-
}),
|
|
4479
|
+
g.parsers && Object.keys(g.parsers).forEach((w) => {
|
|
4480
|
+
b[w] = Se(g.parsers[w], je);
|
|
4481
|
+
}), g.name = c, n[c] = U(v(v({}, $), g), { parsers: b });
|
|
4464
4482
|
}
|
|
4465
4483
|
function we(c) {
|
|
4466
|
-
c && Object.keys(M).forEach((
|
|
4467
|
-
(Array.isArray(M[
|
|
4484
|
+
c && Object.keys(M).forEach((g) => {
|
|
4485
|
+
(Array.isArray(M[g]) ? M[g] : [M[g]]).forEach((b) => {
|
|
4468
4486
|
b.bus.$emit("$loadData." + c);
|
|
4469
4487
|
});
|
|
4470
4488
|
});
|
|
4471
4489
|
}
|
|
4472
|
-
function Be(c,
|
|
4473
|
-
se(
|
|
4490
|
+
function Be(c, g) {
|
|
4491
|
+
se(m, c, g), we(c);
|
|
4474
4492
|
}
|
|
4475
|
-
function Oe(c,
|
|
4476
|
-
const $ = (...b) => O(() =>
|
|
4493
|
+
function Oe(c, g) {
|
|
4494
|
+
const $ = (...b) => O(() => g(...b));
|
|
4477
4495
|
$._driver = !0, Be(c, $);
|
|
4478
4496
|
}
|
|
4479
|
-
function st(c,
|
|
4497
|
+
function st(c, g) {
|
|
4480
4498
|
const $ = (c || "").split(".");
|
|
4481
4499
|
c = $.shift();
|
|
4482
4500
|
const b = $.join(".");
|
|
4483
|
-
if (
|
|
4484
|
-
let w =
|
|
4485
|
-
return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ?
|
|
4501
|
+
if (D(m, c) || F(m, c, Ee), m[c] !== Ee) {
|
|
4502
|
+
let w = m[c];
|
|
4503
|
+
return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ? g : w;
|
|
4486
4504
|
} else
|
|
4487
|
-
return
|
|
4505
|
+
return g;
|
|
4488
4506
|
}
|
|
4489
4507
|
function er(c) {
|
|
4490
4508
|
l.push(c);
|
|
4491
4509
|
}
|
|
4492
4510
|
function tr(c) {
|
|
4493
|
-
delete
|
|
4511
|
+
delete m[c], we(c);
|
|
4494
4512
|
}
|
|
4495
|
-
function rr(c,
|
|
4496
|
-
a.push({ name: c, callback:
|
|
4513
|
+
function rr(c, g) {
|
|
4514
|
+
a.push({ name: c, callback: g });
|
|
4497
4515
|
}
|
|
4498
4516
|
function Te(c) {
|
|
4499
4517
|
C(this, {
|
|
4500
|
-
id:
|
|
4518
|
+
id: qi++,
|
|
4501
4519
|
create: z,
|
|
4502
4520
|
vm: c,
|
|
4503
|
-
manager:
|
|
4521
|
+
manager: wi(t.manager),
|
|
4504
4522
|
parsers: r,
|
|
4505
4523
|
providers: u,
|
|
4506
4524
|
modelFields: s,
|
|
4507
4525
|
formulas: _,
|
|
4508
|
-
isMobile:
|
|
4526
|
+
isMobile: d,
|
|
4509
4527
|
rules: c.$options.propsData.rule,
|
|
4510
4528
|
name: c.$options.propsData.name || Pe(),
|
|
4511
4529
|
inFor: c.$options.propsData.inFor,
|
|
@@ -4517,55 +4535,55 @@ function Kt(t) {
|
|
|
4517
4535
|
drivers: n,
|
|
4518
4536
|
renderDriver: null,
|
|
4519
4537
|
refreshData: we,
|
|
4520
|
-
loadData:
|
|
4521
|
-
CreateNode:
|
|
4522
|
-
bus: new
|
|
4538
|
+
loadData: m,
|
|
4539
|
+
CreateNode: y,
|
|
4540
|
+
bus: new Ri(),
|
|
4523
4541
|
unwatch: [],
|
|
4524
4542
|
options: yr({}),
|
|
4525
4543
|
extendApiFn: l,
|
|
4526
4544
|
fetchCache: /* @__PURE__ */ new WeakMap(),
|
|
4527
4545
|
tmpData: ie({})
|
|
4528
|
-
}), a.forEach((
|
|
4529
|
-
this.bus.$on(
|
|
4546
|
+
}), a.forEach((g) => {
|
|
4547
|
+
this.bus.$on(g.name, g.callback);
|
|
4530
4548
|
}), V(() => {
|
|
4531
4549
|
B(this.options, () => {
|
|
4532
4550
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4533
4551
|
}, { deep: !0 });
|
|
4534
4552
|
}), C(c.$options.components, e), C(c.$options.directives, i), this.$handle = new K(this), this.name && (this.inFor ? (M[this.name] || (M[this.name] = []), M[this.name].push(this)) : M[this.name] = this);
|
|
4535
4553
|
}
|
|
4536
|
-
Te.isMobile =
|
|
4554
|
+
Te.isMobile = d, C(Te.prototype, {
|
|
4537
4555
|
init() {
|
|
4538
4556
|
this.isSub() && this.unwatch.push(B(() => this.vm.parent.fc.options.value, () => {
|
|
4539
4557
|
this.initOptions(), this.$handle.api.refresh();
|
|
4540
4558
|
}, { 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();
|
|
4541
4559
|
},
|
|
4542
|
-
targetFormDriver(c, ...
|
|
4560
|
+
targetFormDriver(c, ...g) {
|
|
4543
4561
|
if (this.renderDriver && this.renderDriver[c])
|
|
4544
|
-
return O(() => this.renderDriver[c](...
|
|
4562
|
+
return O(() => this.renderDriver[c](...g));
|
|
4545
4563
|
},
|
|
4546
|
-
t(c,
|
|
4564
|
+
t(c, g, $) {
|
|
4547
4565
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4548
|
-
return b == null && (b = ""), b &&
|
|
4549
|
-
const
|
|
4550
|
-
b = b.replace(
|
|
4566
|
+
return b == null && (b = ""), b && g && Object.keys(g).forEach((w) => {
|
|
4567
|
+
const S = new RegExp(`{${w}}`, "g");
|
|
4568
|
+
b = b.replace(S, g[w]);
|
|
4551
4569
|
}), b;
|
|
4552
4570
|
},
|
|
4553
4571
|
globalDataDriver(c) {
|
|
4554
|
-
let
|
|
4555
|
-
const $ =
|
|
4572
|
+
let g = c.split(".");
|
|
4573
|
+
const $ = g.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
|
|
4556
4574
|
if (b) {
|
|
4557
4575
|
if (b.type === "static")
|
|
4558
|
-
return L(b.data,
|
|
4576
|
+
return L(b.data, g);
|
|
4559
4577
|
{
|
|
4560
4578
|
let w;
|
|
4561
|
-
const
|
|
4562
|
-
if (
|
|
4563
|
-
if (
|
|
4579
|
+
const S = this.fetchCache.get(b);
|
|
4580
|
+
if (S) {
|
|
4581
|
+
if (S.status && (w = L(S.data, g)), !S.loading)
|
|
4564
4582
|
return w;
|
|
4565
|
-
|
|
4583
|
+
S.loading = !1, this.fetchCache.set(b, S);
|
|
4566
4584
|
} else
|
|
4567
4585
|
this.fetchCache.set(b, { status: !1 });
|
|
4568
|
-
const
|
|
4586
|
+
const R = ne(() => {
|
|
4569
4587
|
le();
|
|
4570
4588
|
const J = this.fetchCache.get(b);
|
|
4571
4589
|
this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (J && (J.loading = !0, this.fetchCache.set(b, J)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
|
|
@@ -4575,7 +4593,7 @@ function Kt(t) {
|
|
|
4575
4593
|
if (ue && b.watch === !1)
|
|
4576
4594
|
return le();
|
|
4577
4595
|
if (ue) {
|
|
4578
|
-
|
|
4596
|
+
R();
|
|
4579
4597
|
return;
|
|
4580
4598
|
}
|
|
4581
4599
|
const me = this.$handle.loadFetchVar(We(b), J);
|
|
@@ -4594,31 +4612,31 @@ function Kt(t) {
|
|
|
4594
4612
|
return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
|
|
4595
4613
|
},
|
|
4596
4614
|
globalLanguageDriver(c) {
|
|
4597
|
-
let
|
|
4598
|
-
if (
|
|
4599
|
-
const
|
|
4600
|
-
|
|
4615
|
+
let g = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4616
|
+
if (g && (b = O(() => g(c))), b == null && $ && typeof $ == "object" && (b = L($, c)), b == null) {
|
|
4617
|
+
const w = this.options.value.language || {}, S = this.getLocale();
|
|
4618
|
+
b = L(w[S] || {}, c), b == null && (b = L(Bi[S] || {}, c));
|
|
4601
4619
|
}
|
|
4602
|
-
return
|
|
4620
|
+
return b;
|
|
4603
4621
|
},
|
|
4604
4622
|
globalVarDriver(c) {
|
|
4605
|
-
let
|
|
4606
|
-
const $ =
|
|
4623
|
+
let g = c.split(".");
|
|
4624
|
+
const $ = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
|
|
4607
4625
|
if (b) {
|
|
4608
4626
|
const w = h.Function(b) ? b : W(b.handle);
|
|
4609
4627
|
if (w) {
|
|
4610
|
-
let
|
|
4611
|
-
const
|
|
4612
|
-
X ? (this.bus.$emit("$loadData.$var." + $),
|
|
4628
|
+
let S;
|
|
4629
|
+
const R = this.watchLoadData((ae, X) => {
|
|
4630
|
+
X ? (this.bus.$emit("$loadData.$var." + $), R()) : S = w(ae, this.$handle.api);
|
|
4613
4631
|
});
|
|
4614
|
-
return this.unwatch.push(
|
|
4632
|
+
return this.unwatch.push(R), L(S, g);
|
|
4615
4633
|
}
|
|
4616
4634
|
}
|
|
4617
4635
|
},
|
|
4618
|
-
setData(c,
|
|
4619
|
-
$ ? Be(c,
|
|
4636
|
+
setData(c, g, $) {
|
|
4637
|
+
$ ? Be(c, g) : (se(this.vm.top.fc.tmpData, c, g), this.bus.$emit("$loadData." + c));
|
|
4620
4638
|
},
|
|
4621
|
-
getLoadData(c,
|
|
4639
|
+
getLoadData(c, g) {
|
|
4622
4640
|
let $ = null;
|
|
4623
4641
|
if (c != null) {
|
|
4624
4642
|
let b = c.split(".");
|
|
@@ -4643,33 +4661,33 @@ function Kt(t) {
|
|
|
4643
4661
|
if (w === "$preview")
|
|
4644
4662
|
return this.$handle.preview;
|
|
4645
4663
|
{
|
|
4646
|
-
const
|
|
4647
|
-
|
|
4664
|
+
const S = this.vm.top.fc.tmpData;
|
|
4665
|
+
D(S, w) || F(S, w, Ee), $ = S[w] !== Ee ? L(S, c) : st(c), b = [];
|
|
4648
4666
|
}
|
|
4649
4667
|
}
|
|
4650
4668
|
$ && b.length && ($ = L($, b));
|
|
4651
4669
|
}
|
|
4652
|
-
return $ == null || $ === "" ?
|
|
4670
|
+
return $ == null || $ === "" ? g : $;
|
|
4653
4671
|
},
|
|
4654
|
-
watchLoadData(c,
|
|
4672
|
+
watchLoadData(c, g) {
|
|
4655
4673
|
let $ = {};
|
|
4656
|
-
const b = (
|
|
4674
|
+
const b = (R) => {
|
|
4657
4675
|
this.get || (this.get = w), O(() => {
|
|
4658
|
-
c(w,
|
|
4676
|
+
c(w, R);
|
|
4659
4677
|
}), this.get === w && (this.get = void 0);
|
|
4660
|
-
}, w = (
|
|
4678
|
+
}, w = (R, ae) => {
|
|
4661
4679
|
let X;
|
|
4662
|
-
if (typeof
|
|
4663
|
-
return $[
|
|
4664
|
-
const le = ye(() => X ? X() : this.getLoadData(
|
|
4665
|
-
const fe = X ? X() : this.getLoadData(
|
|
4666
|
-
if ($[
|
|
4667
|
-
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[
|
|
4680
|
+
if (typeof R == "object" && (X = R.getValue, R = R.id), $[R])
|
|
4681
|
+
return $[R].val;
|
|
4682
|
+
const le = ye(() => X ? X() : this.getLoadData(R, ae)), J = R.split("."), ue = J.shift(), me = J.shift() || "", te = ne(() => {
|
|
4683
|
+
const fe = X ? X() : this.getLoadData(R, ae);
|
|
4684
|
+
if ($[R])
|
|
4685
|
+
((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[R].val || JSON.stringify(fe) !== JSON.stringify($[R].val)) && ($[R].val = fe, b(!0));
|
|
4668
4686
|
else return;
|
|
4669
|
-
},
|
|
4687
|
+
}, g || 0), nr = B(le, (fe) => {
|
|
4670
4688
|
te();
|
|
4671
4689
|
});
|
|
4672
|
-
return this.bus.$on("$loadData." + ue, te), me && this.bus.$on("$loadData." + ue + "." + me, te), $[
|
|
4690
|
+
return this.bus.$on("$loadData." + ue, te), me && this.bus.$on("$loadData." + ue + "." + me, te), $[R] = {
|
|
4673
4691
|
fn: () => {
|
|
4674
4692
|
this.bus.$off("$loadData." + ue, te), me && this.bus.$off("$loadData." + ue + "." + me, te), nr();
|
|
4675
4693
|
},
|
|
@@ -4677,10 +4695,10 @@ function Kt(t) {
|
|
|
4677
4695
|
}, le.value;
|
|
4678
4696
|
};
|
|
4679
4697
|
b(!1);
|
|
4680
|
-
const
|
|
4681
|
-
Object.keys($).forEach((
|
|
4698
|
+
const S = () => {
|
|
4699
|
+
Object.keys($).forEach((R) => $[R].fn()), $ = {};
|
|
4682
4700
|
};
|
|
4683
|
-
return this.unwatch.push(
|
|
4701
|
+
return this.unwatch.push(S), S;
|
|
4684
4702
|
},
|
|
4685
4703
|
isSub() {
|
|
4686
4704
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4693,13 +4711,13 @@ function Kt(t) {
|
|
|
4693
4711
|
resetBtn: {},
|
|
4694
4712
|
globalEvent: {},
|
|
4695
4713
|
globalData: {}
|
|
4696
|
-
}, G(
|
|
4714
|
+
}, G(p));
|
|
4697
4715
|
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);
|
|
4698
4716
|
},
|
|
4699
|
-
mergeOptions(c,
|
|
4700
|
-
return
|
|
4701
|
-
delete
|
|
4702
|
-
}),
|
|
4717
|
+
mergeOptions(c, g, $) {
|
|
4718
|
+
return g = v({}, g || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
|
|
4719
|
+
delete g[b];
|
|
4720
|
+
}), g.global && (c.global = Wr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
|
|
4703
4721
|
},
|
|
4704
4722
|
updateOptions(c) {
|
|
4705
4723
|
this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
|
|
@@ -4732,7 +4750,7 @@ function Kt(t) {
|
|
|
4732
4750
|
C(c, {
|
|
4733
4751
|
version: t.version,
|
|
4734
4752
|
ui: t.ui,
|
|
4735
|
-
isMobile:
|
|
4753
|
+
isMobile: d,
|
|
4736
4754
|
extendApi: er,
|
|
4737
4755
|
getData: st,
|
|
4738
4756
|
setDataDriver: Oe,
|
|
@@ -4755,7 +4773,7 @@ function Kt(t) {
|
|
|
4755
4773
|
copyRules: Bt,
|
|
4756
4774
|
mergeRule: x,
|
|
4757
4775
|
fetch: Gt,
|
|
4758
|
-
$form:
|
|
4776
|
+
$form: E,
|
|
4759
4777
|
parseFn: W,
|
|
4760
4778
|
parseJson: Pt,
|
|
4761
4779
|
toJson: _e,
|
|
@@ -4767,35 +4785,35 @@ function Kt(t) {
|
|
|
4767
4785
|
function ir(c) {
|
|
4768
4786
|
C(c, {
|
|
4769
4787
|
create: z,
|
|
4770
|
-
install(
|
|
4771
|
-
if (
|
|
4772
|
-
|
|
4773
|
-
const b = function(
|
|
4774
|
-
return z(
|
|
4788
|
+
install(g, $) {
|
|
4789
|
+
if (p = v(v({}, p), $ || {}), g._installedFormCreate === !0) return;
|
|
4790
|
+
g._installedFormCreate = !0;
|
|
4791
|
+
const b = function(S, R = {}) {
|
|
4792
|
+
return z(S, R, this);
|
|
4775
4793
|
};
|
|
4776
|
-
ot(b),
|
|
4777
|
-
const w =
|
|
4778
|
-
|
|
4779
|
-
O(() =>
|
|
4794
|
+
ot(b), g.prototype.$formCreate = b;
|
|
4795
|
+
const w = E();
|
|
4796
|
+
g.component(w.name, w), g.component("FcFragment", N()), o.forEach((S) => {
|
|
4797
|
+
O(() => S(c, g));
|
|
4780
4798
|
});
|
|
4781
4799
|
}
|
|
4782
4800
|
});
|
|
4783
4801
|
}
|
|
4784
|
-
if (ot(
|
|
4802
|
+
if (ot(j), ir(j), Oe("$cookie", Vi), Oe("$localStorage", Pi), Oe("$sessionStorage", Li), y.use({ fragment: "fcFragment" }), t.install && z.use(t), de(Di), t.inherit) {
|
|
4785
4803
|
const c = t.inherit;
|
|
4786
|
-
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(
|
|
4804
|
+
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(m, c.loadData), c.formulas && C(_, c.formulas);
|
|
4787
4805
|
}
|
|
4788
|
-
const Fe =
|
|
4789
|
-
return Se(Fe,
|
|
4806
|
+
const Fe = E();
|
|
4807
|
+
return Se(Fe, j), Object.defineProperties(Fe, {
|
|
4790
4808
|
fetch: {
|
|
4791
4809
|
get() {
|
|
4792
|
-
return
|
|
4810
|
+
return j.fetch;
|
|
4793
4811
|
},
|
|
4794
4812
|
set(c) {
|
|
4795
|
-
|
|
4813
|
+
j.fetch = c;
|
|
4796
4814
|
}
|
|
4797
4815
|
}
|
|
4798
|
-
}), Fe.util =
|
|
4816
|
+
}), Fe.util = j, Fe;
|
|
4799
4817
|
}
|
|
4800
4818
|
function qe(t) {
|
|
4801
4819
|
if (h.Date(t))
|
|
@@ -4805,7 +4823,7 @@ function qe(t) {
|
|
|
4805
4823
|
return e.toString() === "Invalid Date" ? t : e;
|
|
4806
4824
|
}
|
|
4807
4825
|
}
|
|
4808
|
-
const _t = "datePicker",
|
|
4826
|
+
const _t = "datePicker", Gi = {
|
|
4809
4827
|
name: _t,
|
|
4810
4828
|
maker: function() {
|
|
4811
4829
|
return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = P(_t, { type: e.toLowerCase() }), t), {});
|
|
@@ -4837,7 +4855,7 @@ const _t = "datePicker", qi = {
|
|
|
4837
4855
|
mounted(t) {
|
|
4838
4856
|
t.rule.value = this.toValue(t.$handle.getFormData(t), t);
|
|
4839
4857
|
}
|
|
4840
|
-
}, Ge = "hidden",
|
|
4858
|
+
}, Ge = "hidden", Hi = {
|
|
4841
4859
|
name: Ge,
|
|
4842
4860
|
maker: {
|
|
4843
4861
|
[Ge]: (t, e) => P(Ge)("", t, e)
|
|
@@ -4845,7 +4863,7 @@ const _t = "datePicker", qi = {
|
|
|
4845
4863
|
render() {
|
|
4846
4864
|
return [];
|
|
4847
4865
|
}
|
|
4848
|
-
}, He = "input",
|
|
4866
|
+
}, He = "input", zi = {
|
|
4849
4867
|
name: He,
|
|
4850
4868
|
maker: function() {
|
|
4851
4869
|
const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(He, { type: r }), e), {});
|
|
@@ -4855,7 +4873,7 @@ const _t = "datePicker", qi = {
|
|
|
4855
4873
|
let { props: e } = t.prop;
|
|
4856
4874
|
e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
|
|
4857
4875
|
}
|
|
4858
|
-
}, Ct = "slider",
|
|
4876
|
+
}, Ct = "slider", Ji = {
|
|
4859
4877
|
name: Ct,
|
|
4860
4878
|
maker: {
|
|
4861
4879
|
sliderRange: P(Ct, { range: !0 })
|
|
@@ -4864,27 +4882,27 @@ const _t = "datePicker", qi = {
|
|
|
4864
4882
|
let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
|
|
4865
4883
|
return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
|
|
4866
4884
|
}
|
|
4867
|
-
},
|
|
4885
|
+
}, Wi = {
|
|
4868
4886
|
name: "switch",
|
|
4869
4887
|
mergeProp(t) {
|
|
4870
4888
|
const e = t.prop.props.slot || {}, r = t.prop.scopedSlots || {};
|
|
4871
4889
|
e.open && (r.open = () => e.open), e.close && (r.close = () => e.close), t.prop.scopedSlots = r;
|
|
4872
4890
|
}
|
|
4873
|
-
},
|
|
4891
|
+
}, Ki = {
|
|
4874
4892
|
name: "FcRow",
|
|
4875
4893
|
render(t, e) {
|
|
4876
4894
|
return e.vNode.col({ props: { span: 24 } }, [
|
|
4877
4895
|
e.vNode.row(e.prop, t)
|
|
4878
4896
|
]);
|
|
4879
4897
|
}
|
|
4880
|
-
},
|
|
4881
|
-
qi,
|
|
4898
|
+
}, Xi = [
|
|
4882
4899
|
Gi,
|
|
4883
4900
|
Hi,
|
|
4884
4901
|
zi,
|
|
4885
4902
|
Ji,
|
|
4886
|
-
Wi
|
|
4887
|
-
|
|
4903
|
+
Wi,
|
|
4904
|
+
Ki
|
|
4905
|
+
], Zi = {
|
|
4888
4906
|
button: "iButton",
|
|
4889
4907
|
icon: "Icon",
|
|
4890
4908
|
slider: "Slider",
|
|
@@ -4916,7 +4934,7 @@ const _t = "datePicker", qi = {
|
|
|
4916
4934
|
resetBtnIcon: "md-refresh",
|
|
4917
4935
|
infoIcon: "ios-information-circle-outline"
|
|
4918
4936
|
};
|
|
4919
|
-
function
|
|
4937
|
+
function Qi() {
|
|
4920
4938
|
return {
|
|
4921
4939
|
type: "poptip",
|
|
4922
4940
|
trigger: "hover",
|
|
@@ -4925,7 +4943,7 @@ function Zi() {
|
|
|
4925
4943
|
icon: Ie.infoIcon
|
|
4926
4944
|
};
|
|
4927
4945
|
}
|
|
4928
|
-
function
|
|
4946
|
+
function Yi() {
|
|
4929
4947
|
return {
|
|
4930
4948
|
form: {
|
|
4931
4949
|
inline: !1,
|
|
@@ -4958,19 +4976,19 @@ function Qi() {
|
|
|
4958
4976
|
};
|
|
4959
4977
|
}
|
|
4960
4978
|
function wt(t, e) {
|
|
4961
|
-
|
|
4979
|
+
D(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
|
|
4962
4980
|
}
|
|
4963
4981
|
function Z(t) {
|
|
4964
4982
|
return t === !1;
|
|
4965
4983
|
}
|
|
4966
|
-
function
|
|
4967
|
-
|
|
4984
|
+
function xi(t, e) {
|
|
4985
|
+
D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
|
|
4968
4986
|
}
|
|
4969
4987
|
function ze(t) {
|
|
4970
4988
|
const e = v({}, t);
|
|
4971
4989
|
return delete e.children, e;
|
|
4972
4990
|
}
|
|
4973
|
-
const
|
|
4991
|
+
const en = {
|
|
4974
4992
|
validate() {
|
|
4975
4993
|
const t = this.form();
|
|
4976
4994
|
return t ? t.validate() : new Promise((e) => e());
|
|
@@ -4989,7 +5007,7 @@ const xi = {
|
|
|
4989
5007
|
},
|
|
4990
5008
|
tidyOptions(t) {
|
|
4991
5009
|
return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
|
|
4992
|
-
|
|
5010
|
+
xi(t, e);
|
|
4993
5011
|
}), t;
|
|
4994
5012
|
},
|
|
4995
5013
|
tidyRule({ prop: t }) {
|
|
@@ -4997,7 +5015,7 @@ const xi = {
|
|
|
4997
5015
|
},
|
|
4998
5016
|
mergeProp(t) {
|
|
4999
5017
|
const e = {
|
|
5000
|
-
info:
|
|
5018
|
+
info: Qi(),
|
|
5001
5019
|
title: {},
|
|
5002
5020
|
col: { span: 24 },
|
|
5003
5021
|
wrap: {}
|
|
@@ -5010,7 +5028,7 @@ const xi = {
|
|
|
5010
5028
|
!t.size && this.options.form.size && (t.size = this.options.form.size);
|
|
5011
5029
|
},
|
|
5012
5030
|
getDefaultOptions() {
|
|
5013
|
-
return
|
|
5031
|
+
return Yi();
|
|
5014
5032
|
},
|
|
5015
5033
|
update() {
|
|
5016
5034
|
const t = this.options.form;
|
|
@@ -5035,21 +5053,21 @@ const xi = {
|
|
|
5035
5053
|
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)]);
|
|
5036
5054
|
},
|
|
5037
5055
|
makeWrap(t, e) {
|
|
5038
|
-
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;
|
|
5039
|
-
delete r.wrap.title;
|
|
5040
|
-
const
|
|
5056
|
+
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;
|
|
5057
|
+
delete r.wrap.class, delete r.wrap.title;
|
|
5058
|
+
const f = Z(r.wrap.show) ? e : this.$r(Y([r.wrap, {
|
|
5041
5059
|
props: U(v({
|
|
5042
5060
|
labelWidth: o
|
|
5043
5061
|
}, ze(r.wrap || {})), {
|
|
5044
5062
|
prop: t.id,
|
|
5045
5063
|
rules: t.injectValidate()
|
|
5046
5064
|
}),
|
|
5047
|
-
class: this.$render.mergeClass(r.className, "fc-form-item"),
|
|
5065
|
+
class: this.$render.mergeClass(u || r.className, "fc-form-item"),
|
|
5048
5066
|
key: `${i}fi`,
|
|
5049
5067
|
ref: t.wrapRef,
|
|
5050
5068
|
type: "formItem"
|
|
5051
5069
|
}]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
|
|
5052
|
-
return a === !0 || Z(l) || Z(s.show) ?
|
|
5070
|
+
return a === !0 || Z(l) || Z(s.show) ? f : this.makeCol(r, i, [f]);
|
|
5053
5071
|
},
|
|
5054
5072
|
isTitle(t) {
|
|
5055
5073
|
if (this.options.form.title === !1) return !1;
|
|
@@ -5057,12 +5075,12 @@ const xi = {
|
|
|
5057
5075
|
return !(!e.title && !e.native || Z(e.show));
|
|
5058
5076
|
},
|
|
5059
5077
|
makeInfo(t, e, r) {
|
|
5060
|
-
var u, f, d,
|
|
5078
|
+
var u, f, p, d, m, y;
|
|
5061
5079
|
const i = v({}, t.title), s = v({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
|
|
5062
5080
|
title: (f = (u = r.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value,
|
|
5063
5081
|
rule: r.rule,
|
|
5064
5082
|
options: this.options
|
|
5065
|
-
}) : ((
|
|
5083
|
+
}) : ((d = (p = r.refRule) == null ? void 0 : p.__$title) == null ? void 0 : d.value) + (n.labelSuffix || n["label-suffix"] || "")];
|
|
5066
5084
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5067
5085
|
const _ = {
|
|
5068
5086
|
type: s.type || "poptip",
|
|
@@ -5071,8 +5089,8 @@ const xi = {
|
|
|
5071
5089
|
slot: "label"
|
|
5072
5090
|
};
|
|
5073
5091
|
delete _.props.icon, delete _.props.show, delete _.props.info, delete _.props.align, delete _.props.native;
|
|
5074
|
-
const
|
|
5075
|
-
s.info && !
|
|
5092
|
+
const j = "content";
|
|
5093
|
+
s.info && !D(_.props, j) && (_.props[j] = (y = (m = r.refRule) == null ? void 0 : m.__$info) == null ? void 0 : y.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, _]), [
|
|
5076
5094
|
this.$r({
|
|
5077
5095
|
type: "icon",
|
|
5078
5096
|
props: { type: s.icon === !0 ? Ie.infoIcon : s.icon, size: 16 },
|
|
@@ -5157,13 +5175,13 @@ const xi = {
|
|
|
5157
5175
|
key: `${this.key}b1`
|
|
5158
5176
|
}, [e]);
|
|
5159
5177
|
}
|
|
5160
|
-
}, oe = {},
|
|
5161
|
-
function
|
|
5162
|
-
|
|
5178
|
+
}, oe = {}, tn = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
|
|
5179
|
+
function rn(t) {
|
|
5180
|
+
tn.forEach((e) => {
|
|
5163
5181
|
t[e] = P(e);
|
|
5164
5182
|
}), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
|
|
5165
5183
|
}
|
|
5166
|
-
function
|
|
5184
|
+
function nn(t) {
|
|
5167
5185
|
const e = "upload", r = {
|
|
5168
5186
|
image: ["image", 0],
|
|
5169
5187
|
file: ["file", 0],
|
|
@@ -5172,19 +5190,19 @@ function rn(t) {
|
|
|
5172
5190
|
};
|
|
5173
5191
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
|
|
5174
5192
|
}
|
|
5175
|
-
function
|
|
5193
|
+
function sn(t) {
|
|
5176
5194
|
const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
|
|
5177
5195
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
|
|
5178
5196
|
}
|
|
5179
|
-
function
|
|
5197
|
+
function on(t) {
|
|
5180
5198
|
const e = "timePicker";
|
|
5181
5199
|
t.time = P(e, { type: "time" }), t.timeRange = P(e, { type: "timerange" });
|
|
5182
5200
|
}
|
|
5183
|
-
function
|
|
5201
|
+
function an(t) {
|
|
5184
5202
|
const e = "select";
|
|
5185
5203
|
t.selectMultiple = P(e, { multiple: !0 }), t.selectOne = P(e, { multiple: !1 });
|
|
5186
5204
|
}
|
|
5187
|
-
function
|
|
5205
|
+
function ln(t) {
|
|
5188
5206
|
const e = "frame", r = {
|
|
5189
5207
|
frameInputs: ["input", 0],
|
|
5190
5208
|
frameFiles: ["file", 0],
|
|
@@ -5195,16 +5213,16 @@ function an(t) {
|
|
|
5195
5213
|
};
|
|
5196
5214
|
Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ type: r[s][0], maxLength: r[s][1] })), i), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages;
|
|
5197
5215
|
}
|
|
5198
|
-
tn(oe);
|
|
5199
5216
|
rn(oe);
|
|
5200
5217
|
nn(oe);
|
|
5201
|
-
on(oe);
|
|
5202
|
-
an(oe);
|
|
5203
5218
|
sn(oe);
|
|
5219
|
+
an(oe);
|
|
5220
|
+
ln(oe);
|
|
5221
|
+
on(oe);
|
|
5204
5222
|
function Ot(t, e) {
|
|
5205
5223
|
return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
|
|
5206
5224
|
}
|
|
5207
|
-
function
|
|
5225
|
+
function un(t, e) {
|
|
5208
5226
|
return {
|
|
5209
5227
|
formEl() {
|
|
5210
5228
|
return e.$manager.form();
|
|
@@ -5306,7 +5324,7 @@ const Xt = {
|
|
|
5306
5324
|
name: "required",
|
|
5307
5325
|
load(t, e, r) {
|
|
5308
5326
|
var s, n;
|
|
5309
|
-
const i =
|
|
5327
|
+
const i = fn(t.getValue());
|
|
5310
5328
|
if (i.required === !1)
|
|
5311
5329
|
t.clearProp(), r.clearValidateState([e.field]);
|
|
5312
5330
|
else {
|
|
@@ -5330,25 +5348,25 @@ const Xt = {
|
|
|
5330
5348
|
Xt.load(...t);
|
|
5331
5349
|
}
|
|
5332
5350
|
};
|
|
5333
|
-
function
|
|
5351
|
+
function fn(t) {
|
|
5334
5352
|
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 : {};
|
|
5335
5353
|
}
|
|
5336
|
-
function
|
|
5337
|
-
t.componentAlias(
|
|
5354
|
+
function cn(t) {
|
|
5355
|
+
t.componentAlias(Zi), Ur.forEach((e) => {
|
|
5338
5356
|
t.component(e.name, e);
|
|
5339
|
-
}), t.register(Xt),
|
|
5357
|
+
}), t.register(Xt), Xi.forEach((e) => {
|
|
5340
5358
|
t.parser(e);
|
|
5341
5359
|
}), Object.keys(oe).forEach((e) => {
|
|
5342
5360
|
t.maker[e] = oe[e];
|
|
5343
5361
|
});
|
|
5344
5362
|
}
|
|
5345
|
-
function
|
|
5363
|
+
function hn() {
|
|
5346
5364
|
return Kt({
|
|
5347
5365
|
ui: "view-design",
|
|
5348
|
-
version: "2.7.
|
|
5349
|
-
manager:
|
|
5350
|
-
install:
|
|
5351
|
-
extendApi:
|
|
5366
|
+
version: "2.7.11",
|
|
5367
|
+
manager: en,
|
|
5368
|
+
install: cn,
|
|
5369
|
+
extendApi: un,
|
|
5352
5370
|
attrs: {
|
|
5353
5371
|
normal: ["col", "wrap"],
|
|
5354
5372
|
array: ["className"],
|
|
@@ -5356,10 +5374,10 @@ function cn() {
|
|
|
5356
5374
|
}
|
|
5357
5375
|
});
|
|
5358
5376
|
}
|
|
5359
|
-
const Ye =
|
|
5377
|
+
const Ye = hn();
|
|
5360
5378
|
typeof window != "undefined" && (window.formCreate = Ye, window.Vue && Ye.install(window.Vue));
|
|
5361
|
-
const
|
|
5379
|
+
const mn = Ye.maker;
|
|
5362
5380
|
export {
|
|
5363
5381
|
Ye as default,
|
|
5364
|
-
|
|
5382
|
+
mn as maker
|
|
5365
5383
|
};
|