@form-create/element-ui 2.7.18 → 2.7.20
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/README.md +1 -1
- package/dist/form-create.esm.js +175 -170
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +3 -3
- package/src/core/manager.js +5 -0
package/dist/form-create.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* FormCreate 低代码表单渲染器
|
|
3
|
-
* @form-create/element-ui v2.7.
|
|
3
|
+
* @form-create/element-ui v2.7.20
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -19,7 +19,7 @@ var lt = (t, e, r) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writ
|
|
|
19
19
|
lr.call(e, r) && lt(t, r, e[r]);
|
|
20
20
|
return t;
|
|
21
21
|
}, q = (t, e) => sr(t, or(e));
|
|
22
|
-
import $e, { getCurrentInstance as ur, provide as fr, inject as cr, toRefs as ut, reactive as ne, onBeforeMount as hr, watch as N, onMounted as dr, onBeforeUnmount as pr, onUpdated as mr, nextTick as P, markRaw as ge, computed as ye, toRef as
|
|
22
|
+
import $e, { getCurrentInstance as ur, provide as fr, inject as cr, toRefs as ut, reactive as ne, onBeforeMount as hr, watch as N, onMounted as dr, onBeforeUnmount as pr, onUpdated as mr, nextTick as P, markRaw as ge, computed as ye, toRef as Ve, ref as gr } from "vue";
|
|
23
23
|
function yr(t) {
|
|
24
24
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
25
25
|
}
|
|
@@ -626,8 +626,8 @@ const jr = "fcSelect", Dr = {
|
|
|
626
626
|
mounted() {
|
|
627
627
|
this.$emit("fc.el", this.$refs.el);
|
|
628
628
|
}
|
|
629
|
-
},
|
|
630
|
-
name:
|
|
629
|
+
}, Vr = "fcTree", Ar = {
|
|
630
|
+
name: Vr,
|
|
631
631
|
formCreateParser: {
|
|
632
632
|
mergeProp(t) {
|
|
633
633
|
const e = t.prop.props;
|
|
@@ -912,7 +912,7 @@ const Pr = "fcUpload", Tr = {
|
|
|
912
912
|
}), this.$emit("fc.el", this.$refs.upload);
|
|
913
913
|
}
|
|
914
914
|
};
|
|
915
|
-
function
|
|
915
|
+
function k(t, e, r) {
|
|
916
916
|
$e.set(t, e, r);
|
|
917
917
|
}
|
|
918
918
|
function ie(t, e) {
|
|
@@ -926,19 +926,19 @@ function Oe(t, e = {}, r) {
|
|
|
926
926
|
if ((i = Array.isArray(n)) || h.Object(n)) {
|
|
927
927
|
let o = t[s] === void 0;
|
|
928
928
|
if (i)
|
|
929
|
-
i = !1, o &&
|
|
929
|
+
i = !1, o && k(t, s, []);
|
|
930
930
|
else if (n._clone && r !== void 0)
|
|
931
931
|
if (r)
|
|
932
|
-
n = n.getRule(), o &&
|
|
932
|
+
n = n.getRule(), o && k(t, s, {});
|
|
933
933
|
else {
|
|
934
|
-
|
|
934
|
+
k(t, s, n._clone());
|
|
935
935
|
continue;
|
|
936
936
|
}
|
|
937
937
|
else
|
|
938
|
-
o &&
|
|
938
|
+
o && k(t, s, {});
|
|
939
939
|
t[s] = Oe(t[s], n, r);
|
|
940
940
|
} else
|
|
941
|
-
|
|
941
|
+
k(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
|
|
942
942
|
}
|
|
943
943
|
return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
|
|
944
944
|
}
|
|
@@ -948,10 +948,10 @@ function K(t) {
|
|
|
948
948
|
const Br = Object.assign || function(t) {
|
|
949
949
|
for (let e, r = 1; r < arguments.length; r++)
|
|
950
950
|
for (let i in e = arguments[r], e)
|
|
951
|
-
Object.prototype.hasOwnProperty.call(e, i) &&
|
|
951
|
+
Object.prototype.hasOwnProperty.call(e, i) && k(t, i, e[i]);
|
|
952
952
|
return t;
|
|
953
953
|
};
|
|
954
|
-
function
|
|
954
|
+
function C() {
|
|
955
955
|
return Br.apply(this, arguments);
|
|
956
956
|
}
|
|
957
957
|
function Ke(t) {
|
|
@@ -969,7 +969,7 @@ function Et(t) {
|
|
|
969
969
|
function Lr(t) {
|
|
970
970
|
return t && typeof t == "object" && typeof t.then == "function";
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Ae(t) {
|
|
973
973
|
return Lr(t) ? t : Promise.resolve(t);
|
|
974
974
|
}
|
|
975
975
|
function be(t) {
|
|
@@ -1058,8 +1058,8 @@ function Ie() {
|
|
|
1058
1058
|
function oe(t, e, r) {
|
|
1059
1059
|
let i = t, s;
|
|
1060
1060
|
return (e || "").split(".").forEach((n) => {
|
|
1061
|
-
s && ((!i[s] || typeof i[s] != "object") &&
|
|
1062
|
-
}),
|
|
1061
|
+
s && ((!i[s] || typeof i[s] != "object") && k(i, s, {}), i = i[s]), s = n;
|
|
1062
|
+
}), k(i, s, r), i;
|
|
1063
1063
|
}
|
|
1064
1064
|
const Ur = "fcGroup", Hr = {
|
|
1065
1065
|
name: Ur,
|
|
@@ -1215,7 +1215,7 @@ const Ur = "fcGroup", Hr = {
|
|
|
1215
1215
|
if (this.defaultValue) {
|
|
1216
1216
|
i.formData || (i.formData = {});
|
|
1217
1217
|
const s = K(this.defaultValue);
|
|
1218
|
-
|
|
1218
|
+
C(i.formData, this.field ? {
|
|
1219
1219
|
[this.field]: s
|
|
1220
1220
|
} : s);
|
|
1221
1221
|
}
|
|
@@ -1251,7 +1251,7 @@ const Ur = "fcGroup", Hr = {
|
|
|
1251
1251
|
const i = [...this.value];
|
|
1252
1252
|
i.splice(t, 1), this.input(i);
|
|
1253
1253
|
};
|
|
1254
|
-
|
|
1254
|
+
Ae(this.onBeforeRemove(this.modelValue, t)).then((i) => {
|
|
1255
1255
|
i !== !1 && r();
|
|
1256
1256
|
});
|
|
1257
1257
|
},
|
|
@@ -1460,12 +1460,12 @@ const Ur = "fcGroup", Hr = {
|
|
|
1460
1460
|
Er,
|
|
1461
1461
|
Sr,
|
|
1462
1462
|
Dr,
|
|
1463
|
-
|
|
1463
|
+
Ar,
|
|
1464
1464
|
Tr,
|
|
1465
1465
|
Hr,
|
|
1466
1466
|
Jr
|
|
1467
|
-
], jt = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style", "directives"],
|
|
1468
|
-
const i = [...jt, ...r.normal || []], s = [...Dt, ...r.array || []], n = [...
|
|
1467
|
+
], jt = ["attrs", "props", "domProps", "scopedSlots"], Dt = ["class", "style", "directives"], Vt = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
|
|
1468
|
+
const i = [...jt, ...r.normal || []], s = [...Dt, ...r.array || []], n = [...Vt, ...r.functional || []], o = r.props || [];
|
|
1469
1469
|
return t.reduce((a, l) => {
|
|
1470
1470
|
for (const u in l)
|
|
1471
1471
|
if (a[u])
|
|
@@ -1494,9 +1494,9 @@ const Ur = "fcGroup", Hr = {
|
|
|
1494
1494
|
}, e);
|
|
1495
1495
|
}, Wr = (t, e) => function() {
|
|
1496
1496
|
t && t.apply(this, arguments), e && e.apply(this, arguments);
|
|
1497
|
-
},
|
|
1497
|
+
}, 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"], et = ["validate", "children", "control"], tt = ["effect", "deep", "renderSlots"];
|
|
1498
1498
|
function It() {
|
|
1499
|
-
return [...
|
|
1499
|
+
return [...At, ...jt, ...Dt, ...Vt, ...et, ...tt];
|
|
1500
1500
|
}
|
|
1501
1501
|
function ze(t, e) {
|
|
1502
1502
|
return {
|
|
@@ -1740,24 +1740,24 @@ function Zr(t, e, r) {
|
|
|
1740
1740
|
unique: 1,
|
|
1741
1741
|
renderRule: [...l.value || []],
|
|
1742
1742
|
updateValue: JSON.stringify(u.value || {})
|
|
1743
|
-
}), g = new t(n), y = g.api(),
|
|
1743
|
+
}), g = new t(n), y = g.api(), _ = p.value, F = () => {
|
|
1744
1744
|
if (o) {
|
|
1745
1745
|
const E = je(n, o);
|
|
1746
1746
|
if (E) {
|
|
1747
1747
|
let R;
|
|
1748
|
-
|
|
1748
|
+
_ ? (R = H(E.getSubForm()), R.push(y)) : R = y, E.subForm(R);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
1751
|
}, G = () => {
|
|
1752
1752
|
const E = je(n, o);
|
|
1753
1753
|
if (E)
|
|
1754
|
-
if (
|
|
1754
|
+
if (_) {
|
|
1755
1755
|
const R = H(E.getSubForm()), M = R.indexOf(y);
|
|
1756
1756
|
M > -1 && R.splice(M, 1);
|
|
1757
1757
|
} else
|
|
1758
1758
|
E.subForm();
|
|
1759
1759
|
};
|
|
1760
|
-
let
|
|
1760
|
+
let A = null;
|
|
1761
1761
|
hr(() => {
|
|
1762
1762
|
N(() => {
|
|
1763
1763
|
let E = "";
|
|
@@ -1767,7 +1767,7 @@ function Zr(t, e, r) {
|
|
|
1767
1767
|
R[M].style && Object.keys(R[M].style).forEach((W) => {
|
|
1768
1768
|
me += be(W) + ":" + R[M].style[W] + ";";
|
|
1769
1769
|
}), R[M].content && (me += R[M].content + ";"), me && (E += `.${M}{${me}}`);
|
|
1770
|
-
}), s.option && s.option.style && (E += s.option.style),
|
|
1770
|
+
}), s.option && s.option.style && (E += s.option.style), A || (A = document.createElement("style"), A.type = "text/css", document.head.appendChild(A)), A.innerHTML = E || "";
|
|
1771
1771
|
}, () => {
|
|
1772
1772
|
});
|
|
1773
1773
|
});
|
|
@@ -1783,11 +1783,11 @@ function Zr(t, e, r) {
|
|
|
1783
1783
|
return dr(() => {
|
|
1784
1784
|
o && (y.top.bus.$on("$loadData.$form", L), y.top.bus.$on("change", pe)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", de), g.mounted();
|
|
1785
1785
|
}), pr(() => {
|
|
1786
|
-
o && (y.top.bus.$off("$loadData.$form", L), y.top.bus.$off("change", pe)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", de), G(), d.destroyed = !0, g.unmount(),
|
|
1786
|
+
o && (y.top.bus.$off("$loadData.$form", L), y.top.bus.$off("change", pe)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", de), G(), d.destroyed = !0, g.unmount(), A && (A.parentNode || A.parentElement) && document.head.removeChild(A);
|
|
1787
1787
|
}), mr(() => {
|
|
1788
1788
|
g.updated();
|
|
1789
1789
|
}), N(f, (E) => {
|
|
1790
|
-
E ?
|
|
1790
|
+
E ? F() : G();
|
|
1791
1791
|
}, { immediate: !0 }), N(() => s.option, () => {
|
|
1792
1792
|
g.initOptions(), y.refresh();
|
|
1793
1793
|
}, { deep: !0, flush: "sync" }), N(() => [...l.value], (E) => {
|
|
@@ -1848,14 +1848,14 @@ function T(t, e) {
|
|
|
1848
1848
|
};
|
|
1849
1849
|
}
|
|
1850
1850
|
function rt(t, e, r, i, s) {
|
|
1851
|
-
this._data =
|
|
1851
|
+
this._data = C(Nt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
|
|
1852
1852
|
}
|
|
1853
|
-
|
|
1853
|
+
C(rt.prototype, {
|
|
1854
1854
|
getRule() {
|
|
1855
1855
|
return this._data;
|
|
1856
1856
|
},
|
|
1857
1857
|
setProp(t, e) {
|
|
1858
|
-
return
|
|
1858
|
+
return k(this._data, t, e), this;
|
|
1859
1859
|
},
|
|
1860
1860
|
_clone() {
|
|
1861
1861
|
const t = new this.constructor();
|
|
@@ -1934,7 +1934,7 @@ function yt(t, e, r) {
|
|
|
1934
1934
|
onSuccess(n) {
|
|
1935
1935
|
let o = (l) => l;
|
|
1936
1936
|
const a = z(t.parse);
|
|
1937
|
-
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)),
|
|
1937
|
+
h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), Ae(o(n, t.targetRule, r)).then((l) => {
|
|
1938
1938
|
i(l);
|
|
1939
1939
|
});
|
|
1940
1940
|
},
|
|
@@ -1955,7 +1955,7 @@ function ti(t) {
|
|
|
1955
1955
|
h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
|
|
1956
1956
|
const u = t.fieldCtx[l] || t.nameCtx[l];
|
|
1957
1957
|
u && u.forEach((f) => {
|
|
1958
|
-
|
|
1958
|
+
k(f.rule, o, a), t.$render.clearCache(f);
|
|
1959
1959
|
});
|
|
1960
1960
|
});
|
|
1961
1961
|
}
|
|
@@ -2048,10 +2048,10 @@ function ti(t) {
|
|
|
2048
2048
|
if (l) {
|
|
2049
2049
|
const u = j(n, a);
|
|
2050
2050
|
l.forEach((f) => {
|
|
2051
|
-
|
|
2051
|
+
k(f.rule, "value", u ? n[a] : void 0);
|
|
2052
2052
|
}), delete o[a];
|
|
2053
2053
|
}
|
|
2054
|
-
}),
|
|
2054
|
+
}), C(t.appendData, o);
|
|
2055
2055
|
}, !0);
|
|
2056
2056
|
},
|
|
2057
2057
|
setValue(n) {
|
|
@@ -2061,7 +2061,7 @@ function ti(t) {
|
|
|
2061
2061
|
const l = t.fieldCtx[a];
|
|
2062
2062
|
if (!l) return t.appendData[a] = o[a];
|
|
2063
2063
|
l.forEach((u) => {
|
|
2064
|
-
|
|
2064
|
+
k(u.rule, "value", o[a]);
|
|
2065
2065
|
});
|
|
2066
2066
|
});
|
|
2067
2067
|
}, !0);
|
|
@@ -2125,7 +2125,7 @@ function ti(t) {
|
|
|
2125
2125
|
disabled(n, o) {
|
|
2126
2126
|
e(o).forEach((a) => {
|
|
2127
2127
|
t.getCtxs(a).forEach((l) => {
|
|
2128
|
-
|
|
2128
|
+
k(l.rule.props, "disabled", !!n);
|
|
2129
2129
|
});
|
|
2130
2130
|
}), t.refresh();
|
|
2131
2131
|
},
|
|
@@ -2183,7 +2183,7 @@ function ti(t) {
|
|
|
2183
2183
|
t.$manager.updateOptions(t.options), s.refresh();
|
|
2184
2184
|
},
|
|
2185
2185
|
hideForm: (n) => {
|
|
2186
|
-
|
|
2186
|
+
k(t.vm, "isShow", !n);
|
|
2187
2187
|
},
|
|
2188
2188
|
changeStatus: () => t.changeStatus,
|
|
2189
2189
|
clearChangeStatus: () => {
|
|
@@ -2191,7 +2191,7 @@ function ti(t) {
|
|
|
2191
2191
|
},
|
|
2192
2192
|
updateRule(n, o) {
|
|
2193
2193
|
t.getCtxs(n).forEach((a) => {
|
|
2194
|
-
|
|
2194
|
+
C(a.rule, o);
|
|
2195
2195
|
});
|
|
2196
2196
|
},
|
|
2197
2197
|
updateRules(n) {
|
|
@@ -2242,7 +2242,7 @@ function ti(t) {
|
|
|
2242
2242
|
},
|
|
2243
2243
|
setEffect(n, o, a) {
|
|
2244
2244
|
const l = t.getCtx(n);
|
|
2245
|
-
l && o && (o[0] === "$" && (o = o.substr(1)), j(l.rule, "$" + o) &&
|
|
2245
|
+
l && o && (o[0] === "$" && (o = o.substr(1)), j(l.rule, "$" + o) && k(l.rule, "$" + o, a), j(l.rule, "effect") || k(l.rule, "effect", {}), k(l.rule.effect, o, a));
|
|
2246
2246
|
},
|
|
2247
2247
|
clearEffectData(n, o) {
|
|
2248
2248
|
const a = t.getCtx(n);
|
|
@@ -2329,7 +2329,7 @@ function ti(t) {
|
|
|
2329
2329
|
const l = s.getChildrenRuleList(n);
|
|
2330
2330
|
t.deferSyncValue(() => {
|
|
2331
2331
|
l.forEach((u) => {
|
|
2332
|
-
j(o, u.field) ?
|
|
2332
|
+
j(o, u.field) ? k(u, "value", o[u.field]) : a && k(u, "value", void 0);
|
|
2333
2333
|
});
|
|
2334
2334
|
});
|
|
2335
2335
|
},
|
|
@@ -2425,7 +2425,7 @@ function ti(t) {
|
|
|
2425
2425
|
}), s.changeValue = s.changeField = s.setValue, s;
|
|
2426
2426
|
}
|
|
2427
2427
|
function ri(t) {
|
|
2428
|
-
|
|
2428
|
+
C(t.prototype, {
|
|
2429
2429
|
initCache() {
|
|
2430
2430
|
this.clearCacheAll();
|
|
2431
2431
|
},
|
|
@@ -2466,7 +2466,7 @@ function Ht(t) {
|
|
|
2466
2466
|
return t.replace(t[0], t[0].toLowerCase());
|
|
2467
2467
|
}
|
|
2468
2468
|
function ii(t) {
|
|
2469
|
-
|
|
2469
|
+
C(t.prototype, {
|
|
2470
2470
|
initRender() {
|
|
2471
2471
|
this.cacheConfig = {};
|
|
2472
2472
|
},
|
|
@@ -2554,8 +2554,8 @@ function ii(t) {
|
|
|
2554
2554
|
}, (() => {
|
|
2555
2555
|
if (h.Function(n.renderSlots[y]))
|
|
2556
2556
|
return O(() => n.renderSlots[y]());
|
|
2557
|
-
const
|
|
2558
|
-
return this.renderRule(
|
|
2557
|
+
const _ = this.parseSide(n.renderSlots[y], e);
|
|
2558
|
+
return this.renderRule(_);
|
|
2559
2559
|
})()));
|
|
2560
2560
|
});
|
|
2561
2561
|
const d = this.getTypeSlot(e);
|
|
@@ -2602,7 +2602,7 @@ function ii(t) {
|
|
|
2602
2602
|
},
|
|
2603
2603
|
injectProp(e) {
|
|
2604
2604
|
const r = this.vm;
|
|
2605
|
-
r.ctxInject[e.id] ||
|
|
2605
|
+
r.ctxInject[e.id] || k(r.ctxInject, e.id, {
|
|
2606
2606
|
api: this.$handle.api,
|
|
2607
2607
|
form: this.fc.create,
|
|
2608
2608
|
subForm: (n) => {
|
|
@@ -2633,7 +2633,7 @@ function ii(t) {
|
|
|
2633
2633
|
children: e.loadChildrenPending()
|
|
2634
2634
|
};
|
|
2635
2635
|
return Object.keys(s).forEach((n) => {
|
|
2636
|
-
|
|
2636
|
+
k(i, n, s[n]);
|
|
2637
2637
|
}), i;
|
|
2638
2638
|
},
|
|
2639
2639
|
ctxProp(e) {
|
|
@@ -2703,10 +2703,10 @@ function ii(t) {
|
|
|
2703
2703
|
const s = Re();
|
|
2704
2704
|
return e.map((n) => {
|
|
2705
2705
|
if (n) {
|
|
2706
|
-
if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
|
|
2706
|
+
if (h.String(n) || h.Number(n)) return s.setSlot(null, i ? this.renderRule({
|
|
2707
2707
|
type: "template",
|
|
2708
|
-
children: [n]
|
|
2709
|
-
}) : n);
|
|
2708
|
+
children: [`${n}`]
|
|
2709
|
+
}) : `${n}`);
|
|
2710
2710
|
if (n.__fc__)
|
|
2711
2711
|
return this.renderSlot(s, n.__fc__, r);
|
|
2712
2712
|
n.type && P(() => {
|
|
@@ -2731,7 +2731,7 @@ function ii(t) {
|
|
|
2731
2731
|
},
|
|
2732
2732
|
renderRule(e, r, i) {
|
|
2733
2733
|
if (!e) return;
|
|
2734
|
-
if (h.String(e)) return e
|
|
2734
|
+
if (h.String(e) || h.Number(e)) return `${e}`;
|
|
2735
2735
|
let s;
|
|
2736
2736
|
if (i)
|
|
2737
2737
|
s = e.type;
|
|
@@ -2752,7 +2752,7 @@ function ii(t) {
|
|
|
2752
2752
|
}
|
|
2753
2753
|
let ni = 1;
|
|
2754
2754
|
function it(t) {
|
|
2755
|
-
|
|
2755
|
+
C(this, {
|
|
2756
2756
|
$handle: t,
|
|
2757
2757
|
fc: t.fc,
|
|
2758
2758
|
vm: t.vm,
|
|
@@ -2773,7 +2773,7 @@ function it(t) {
|
|
|
2773
2773
|
ri(it);
|
|
2774
2774
|
ii(it);
|
|
2775
2775
|
function si(t) {
|
|
2776
|
-
|
|
2776
|
+
C(t.prototype, {
|
|
2777
2777
|
parseInjectEvent(e, r) {
|
|
2778
2778
|
const i = e.inject || this.options.injectEvent;
|
|
2779
2779
|
return this.parseEventLst(e, r, i);
|
|
@@ -2802,14 +2802,14 @@ function si(t) {
|
|
|
2802
2802
|
let p, d = n || o || a;
|
|
2803
2803
|
if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
|
|
2804
2804
|
r || (d = `native-${d}`);
|
|
2805
|
-
const g = be(`${d}-${f}`), y = (...
|
|
2806
|
-
this.vm.$emit(g, ...
|
|
2805
|
+
const g = be(`${d}-${f}`), y = (..._) => {
|
|
2806
|
+
this.vm.$emit(g, ..._), this.vm.$emit("emit-event", g, ..._), this.bus.$emit(g, ..._);
|
|
2807
2807
|
};
|
|
2808
2808
|
if (y.__emit = !0, !p && l === !1)
|
|
2809
2809
|
i[f] = y;
|
|
2810
2810
|
else {
|
|
2811
|
-
let
|
|
2812
|
-
i[f] = h.Undef(
|
|
2811
|
+
let _ = p || l || this.options.injectEvent;
|
|
2812
|
+
i[f] = h.Undef(_) ? y : this.inject(s, y, _);
|
|
2813
2813
|
}
|
|
2814
2814
|
}
|
|
2815
2815
|
}), e.computed[r ? "on" : "nativeOn"] = i, i;
|
|
@@ -2889,12 +2889,12 @@ function si(t) {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
const $t = ["hook:updated", "hook:mounted"];
|
|
2891
2891
|
function oi(t) {
|
|
2892
|
-
|
|
2892
|
+
C(t.prototype, {
|
|
2893
2893
|
usePage() {
|
|
2894
2894
|
const e = this.options.page;
|
|
2895
2895
|
if (!e) return;
|
|
2896
2896
|
let r = 25, i = ai(this.rules);
|
|
2897
|
-
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)),
|
|
2897
|
+
h.Object(e) && (e.first && (r = parseInt(e.first, 10) || r), e.limit && (i = parseInt(e.limit, 10) || i)), C(this, {
|
|
2898
2898
|
first: r,
|
|
2899
2899
|
limit: i,
|
|
2900
2900
|
pageEnd: this.rules.length <= r
|
|
@@ -2912,7 +2912,7 @@ function ai(t) {
|
|
|
2912
2912
|
return t.length < 31 ? 31 : Math.ceil(t.length / 3);
|
|
2913
2913
|
}
|
|
2914
2914
|
function li(t) {
|
|
2915
|
-
|
|
2915
|
+
C(t.prototype, {
|
|
2916
2916
|
clearNextTick() {
|
|
2917
2917
|
this.nextTick && clearTimeout(this.nextTick), this.nextTick = null;
|
|
2918
2918
|
},
|
|
@@ -2935,7 +2935,7 @@ function ui(t) {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
function Gt(t, e, r) {
|
|
2937
2937
|
const i = Ie(), s = !!e.field;
|
|
2938
|
-
|
|
2938
|
+
C(this, {
|
|
2939
2939
|
id: i,
|
|
2940
2940
|
ref: i,
|
|
2941
2941
|
wrapRef: i + "fi",
|
|
@@ -2963,7 +2963,7 @@ function Gt(t, e, r) {
|
|
|
2963
2963
|
field: e.field || void 0
|
|
2964
2964
|
}), this.updateKey(), ui(this), this.update(t, !0);
|
|
2965
2965
|
}
|
|
2966
|
-
|
|
2966
|
+
C(Gt.prototype, {
|
|
2967
2967
|
getParentGroup() {
|
|
2968
2968
|
let t = this.parent;
|
|
2969
2969
|
for (; t; ) {
|
|
@@ -3073,7 +3073,7 @@ _(Gt.prototype, {
|
|
|
3073
3073
|
this.$handle.watchCtx(this);
|
|
3074
3074
|
},
|
|
3075
3075
|
delete() {
|
|
3076
|
-
this.unwatch(), this.unlink(), this.rmCtrl(), this.parent && this.parent.children.splice(this.parent.children.indexOf(this) >>> 0, 1),
|
|
3076
|
+
this.unwatch(), this.unlink(), this.rmCtrl(), this.parent && this.parent.children.splice(this.parent.children.indexOf(this) >>> 0, 1), C(this, {
|
|
3077
3077
|
deleted: !0,
|
|
3078
3078
|
computed: {},
|
|
3079
3079
|
parent: null,
|
|
@@ -3096,14 +3096,14 @@ _(Gt.prototype, {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
this.$handle.noWatch(() => {
|
|
3098
3098
|
this.$handle.deferSyncValue(() => {
|
|
3099
|
-
this.rmCtrl(), t(), this.$handle.rmCtx(this),
|
|
3099
|
+
this.rmCtrl(), t(), this.$handle.rmCtx(this), C(this, {
|
|
3100
3100
|
root: []
|
|
3101
3101
|
});
|
|
3102
3102
|
}, this.input);
|
|
3103
3103
|
});
|
|
3104
3104
|
},
|
|
3105
3105
|
update(t, e) {
|
|
3106
|
-
|
|
3106
|
+
C(this, {
|
|
3107
3107
|
deleted: !1,
|
|
3108
3108
|
$handle: t,
|
|
3109
3109
|
$render: t.$render,
|
|
@@ -3116,7 +3116,7 @@ _(Gt.prototype, {
|
|
|
3116
3116
|
}
|
|
3117
3117
|
});
|
|
3118
3118
|
function fi(t) {
|
|
3119
|
-
|
|
3119
|
+
C(t.prototype, {
|
|
3120
3120
|
nextRefresh(e) {
|
|
3121
3121
|
const r = this.loadedId;
|
|
3122
3122
|
P(() => {
|
|
@@ -3192,18 +3192,18 @@ function fi(t) {
|
|
|
3192
3192
|
if (f)
|
|
3193
3193
|
f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
|
|
3194
3194
|
else {
|
|
3195
|
-
const
|
|
3196
|
-
f = new Gt(this,
|
|
3195
|
+
const F = this.parseRule(o);
|
|
3196
|
+
f = new Gt(this, F, g), this.bindParser(f);
|
|
3197
3197
|
}
|
|
3198
|
-
[!1, !0].forEach((
|
|
3198
|
+
[!1, !0].forEach((F) => this.parseEmit(f, F)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !p && !d && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
|
|
3199
3199
|
const y = f.loadChildrenPending();
|
|
3200
3200
|
if (f.parser.loadChildren === !1 || s(y, f), !r) {
|
|
3201
|
-
const
|
|
3202
|
-
|
|
3201
|
+
const F = i(a);
|
|
3202
|
+
F > -1 || !a ? this.sort.splice(F + 1, 0, f.id) : this.sort.push(f.id);
|
|
3203
3203
|
}
|
|
3204
|
-
const
|
|
3205
|
-
return f.updated || (f.updated = !0, h.Function(
|
|
3206
|
-
this.refreshUpdate(f,
|
|
3204
|
+
const _ = f.rule;
|
|
3205
|
+
return f.updated || (f.updated = !0, h.Function(_.update) && this.bus.$once("load-end", () => {
|
|
3206
|
+
this.refreshUpdate(f, _.value, "init");
|
|
3207
3207
|
}), this.effect(f, "loaded")), this.refreshControl(f) && (this.cycleLoad = !0), f;
|
|
3208
3208
|
}).filter((o) => !!o);
|
|
3209
3209
|
r && (r.children = n);
|
|
@@ -3237,27 +3237,27 @@ function fi(t) {
|
|
|
3237
3237
|
children: u,
|
|
3238
3238
|
valid: l
|
|
3239
3239
|
}) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
|
|
3240
|
-
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((
|
|
3241
|
-
this.api.setEffect(
|
|
3240
|
+
y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((_) => {
|
|
3241
|
+
this.api.setEffect(_, "required", l);
|
|
3242
3242
|
}), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
|
|
3243
3243
|
});
|
|
3244
3244
|
return;
|
|
3245
3245
|
}
|
|
3246
3246
|
if (l) {
|
|
3247
3247
|
o = !0;
|
|
3248
|
-
const
|
|
3248
|
+
const _ = {
|
|
3249
3249
|
type: "fragment",
|
|
3250
3250
|
native: !0,
|
|
3251
3251
|
__ctrl: !0,
|
|
3252
3252
|
children: u
|
|
3253
3253
|
};
|
|
3254
|
-
e.ctrlRule.push(
|
|
3255
|
-
f ? s.prepend(
|
|
3254
|
+
e.ctrlRule.push(_), this.bus.$once("load-start", () => {
|
|
3255
|
+
f ? s.prepend(_, f, d) : p || d ? s.append(_, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
|
|
3256
3256
|
});
|
|
3257
3257
|
} else {
|
|
3258
3258
|
e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
|
|
3259
|
-
const
|
|
3260
|
-
|
|
3259
|
+
const _ = Q(g);
|
|
3260
|
+
_ && _.rm();
|
|
3261
3261
|
}
|
|
3262
3262
|
});
|
|
3263
3263
|
}), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
|
|
@@ -3287,7 +3287,7 @@ function fi(t) {
|
|
|
3287
3287
|
function ci(t) {
|
|
3288
3288
|
const e = Nt();
|
|
3289
3289
|
return Object.keys(e).forEach((r) => {
|
|
3290
|
-
j(t, r) ||
|
|
3290
|
+
j(t, r) || k(t, r, e[r]);
|
|
3291
3291
|
}), t;
|
|
3292
3292
|
}
|
|
3293
3293
|
function hi(t) {
|
|
@@ -3305,7 +3305,7 @@ function bt(t) {
|
|
|
3305
3305
|
return !!t.rule.__ctrl;
|
|
3306
3306
|
}
|
|
3307
3307
|
function pi(t) {
|
|
3308
|
-
|
|
3308
|
+
C(t.prototype, {
|
|
3309
3309
|
setValue(e, r, i, s) {
|
|
3310
3310
|
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, {
|
|
3311
3311
|
rule: e.origin,
|
|
@@ -3337,7 +3337,7 @@ function pi(t) {
|
|
|
3337
3337
|
setFormData(e, r) {
|
|
3338
3338
|
e.modelValue = r;
|
|
3339
3339
|
const i = e.getParentGroup();
|
|
3340
|
-
i && (this.subRuleData[i.id] ||
|
|
3340
|
+
i && (this.subRuleData[i.id] || k(this.subRuleData, i.id, {}), k(this.subRuleData[i.id], e.field, e.rule.value)), k(this.formData, e.id, r);
|
|
3341
3341
|
},
|
|
3342
3342
|
rmSubRuleData(e) {
|
|
3343
3343
|
const r = e.getParentGroup();
|
|
@@ -3348,9 +3348,9 @@ function pi(t) {
|
|
|
3348
3348
|
},
|
|
3349
3349
|
syncForm() {
|
|
3350
3350
|
const e = {}, r = this.fields(), i = [];
|
|
3351
|
-
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] =
|
|
3351
|
+
this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Ve(this.appendData, n)), s), e), r.reduce((s, n) => {
|
|
3352
3352
|
let o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a))[0];
|
|
3353
|
-
return o || (o = this.fieldCtx[n][0], i.push(n)), s[n] =
|
|
3353
|
+
return o || (o = this.fieldCtx[n][0], i.push(n)), s[n] = Ve(o.rule, "value"), s;
|
|
3354
3354
|
}, e), this.form = ne(e), this.ignoreFields = i, this.syncValue();
|
|
3355
3355
|
},
|
|
3356
3356
|
isIgnore(e) {
|
|
@@ -3431,7 +3431,7 @@ const De = {
|
|
|
3431
3431
|
}
|
|
3432
3432
|
}, mi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"], Ce = Symbol("oldValue");
|
|
3433
3433
|
function gi(t) {
|
|
3434
|
-
|
|
3434
|
+
C(t.prototype, {
|
|
3435
3435
|
getCtx(e) {
|
|
3436
3436
|
return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
|
|
3437
3437
|
},
|
|
@@ -3479,7 +3479,7 @@ function gi(t) {
|
|
|
3479
3479
|
},
|
|
3480
3480
|
watchCtx(e) {
|
|
3481
3481
|
if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && mi.indexOf(i) === -1).forEach((i) => {
|
|
3482
|
-
const s =
|
|
3482
|
+
const s = Ve(e.rule, i), n = i === "children";
|
|
3483
3483
|
e.refRule[i] = s, e.watch.push(N(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
|
|
3484
3484
|
let l = s.value;
|
|
3485
3485
|
if (!this.isBreakWatch()) {
|
|
@@ -3491,7 +3491,7 @@ function gi(t) {
|
|
|
3491
3491
|
this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
|
|
3492
3492
|
}), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), P(() => {
|
|
3493
3493
|
this.targetHook(e, "hidden", { value: l });
|
|
3494
|
-
})), i === "ignore" && e.input || i === "hidden" &&
|
|
3494
|
+
})), i === "ignore" && e.input || i === "hidden" && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
|
|
3495
3495
|
this.syncForm();
|
|
3496
3496
|
else if (i === "link") {
|
|
3497
3497
|
e.link();
|
|
@@ -3546,7 +3546,7 @@ function gi(t) {
|
|
|
3546
3546
|
return n;
|
|
3547
3547
|
});
|
|
3548
3548
|
}), e.input) {
|
|
3549
|
-
const i =
|
|
3549
|
+
const i = Ve(e.rule, "value");
|
|
3550
3550
|
e.watch.push(N(() => i.value, () => {
|
|
3551
3551
|
let s = e.parser.toFormValue(i.value, e);
|
|
3552
3552
|
this.isChange(e, s) && this.setValue(e, i.value, s, !0);
|
|
@@ -3595,7 +3595,7 @@ function gi(t) {
|
|
|
3595
3595
|
return this.$manager.adapterValidate({
|
|
3596
3596
|
required: e.required,
|
|
3597
3597
|
message: e.message,
|
|
3598
|
-
|
|
3598
|
+
trigger: e.trigger
|
|
3599
3599
|
}, i);
|
|
3600
3600
|
},
|
|
3601
3601
|
getValidateMessage(e, r) {
|
|
@@ -3694,15 +3694,15 @@ function gi(t) {
|
|
|
3694
3694
|
let u = !0;
|
|
3695
3695
|
for (let f = 0; f < a.group.length; f++) {
|
|
3696
3696
|
const p = a.group[f];
|
|
3697
|
-
let d, g = null;
|
|
3697
|
+
let d, g = null, y = null;
|
|
3698
3698
|
if (p.variable)
|
|
3699
|
-
|
|
3699
|
+
y = this.fc.getLoadData(p.variable);
|
|
3700
3700
|
else if (p.field)
|
|
3701
3701
|
g = pt(p.field || "");
|
|
3702
3702
|
else if (!p.mode)
|
|
3703
3703
|
return !0;
|
|
3704
|
-
let
|
|
3705
|
-
if (
|
|
3704
|
+
let _ = p.compare;
|
|
3705
|
+
if (_ && (_ = pt(_ || "")), 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", "$variableVal", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${p.variable ? "$variableVal" : g}, ${_ || "$val"}); }}}}`).call(this.api.form, ce, y, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : d = !1, l && d)
|
|
3706
3706
|
return !0;
|
|
3707
3707
|
l || (u = u && d);
|
|
3708
3708
|
}
|
|
@@ -3761,7 +3761,7 @@ function gi(t) {
|
|
|
3761
3761
|
});
|
|
3762
3762
|
}
|
|
3763
3763
|
function yi(t) {
|
|
3764
|
-
|
|
3764
|
+
C(t.prototype, {
|
|
3765
3765
|
mounted() {
|
|
3766
3766
|
const e = () => {
|
|
3767
3767
|
this.isMounted = !0, this.lifecycle("mounted");
|
|
@@ -3803,7 +3803,7 @@ function yi(t) {
|
|
|
3803
3803
|
});
|
|
3804
3804
|
}
|
|
3805
3805
|
function $i(t) {
|
|
3806
|
-
|
|
3806
|
+
C(t.prototype, {
|
|
3807
3807
|
useProvider() {
|
|
3808
3808
|
const e = this.fc.providers;
|
|
3809
3809
|
Object.keys(e).forEach((r) => {
|
|
@@ -3901,7 +3901,7 @@ function X(t) {
|
|
|
3901
3901
|
preview() {
|
|
3902
3902
|
return t.vm.$props.preview != null ? t.vm.$props.preview : t.vm.parent && t.vm.parent.$props.preview != null ? t.vm.parent.$props.preview : t.options.value.preview || !1;
|
|
3903
3903
|
}
|
|
3904
|
-
}),
|
|
3904
|
+
}), C(this, {
|
|
3905
3905
|
fc: t,
|
|
3906
3906
|
vm: t.vm,
|
|
3907
3907
|
watching: !1,
|
|
@@ -3927,12 +3927,12 @@ function X(t) {
|
|
|
3927
3927
|
}
|
|
3928
3928
|
}), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new it(this), this.api = t.extendApiFn.reduce((e, r) => {
|
|
3929
3929
|
const i = O(() => r(e, this));
|
|
3930
|
-
return i && i !== e &&
|
|
3930
|
+
return i && i !== e && C(e, i), e;
|
|
3931
3931
|
}, ti(this));
|
|
3932
3932
|
}
|
|
3933
|
-
|
|
3933
|
+
C(X.prototype, {
|
|
3934
3934
|
initData(t) {
|
|
3935
|
-
|
|
3935
|
+
C(this, {
|
|
3936
3936
|
ctxs: {},
|
|
3937
3937
|
fieldCtx: {},
|
|
3938
3938
|
nameCtx: {},
|
|
@@ -3992,7 +3992,7 @@ function wi() {
|
|
|
3992
3992
|
function e(r) {
|
|
3993
3993
|
r && this.setVm(r);
|
|
3994
3994
|
}
|
|
3995
|
-
return
|
|
3995
|
+
return C(e.prototype, {
|
|
3996
3996
|
setVm(r) {
|
|
3997
3997
|
this.handle = r, this.vm = r.vm, this.h = this.$h = r.vm.$createElement;
|
|
3998
3998
|
},
|
|
@@ -4014,7 +4014,7 @@ function wi() {
|
|
|
4014
4014
|
return o.context = this.vm, o;
|
|
4015
4015
|
},
|
|
4016
4016
|
aliasMap: t
|
|
4017
|
-
}),
|
|
4017
|
+
}), C(e, {
|
|
4018
4018
|
aliasMap: t,
|
|
4019
4019
|
alias(r, i) {
|
|
4020
4020
|
t[r] = i;
|
|
@@ -4037,7 +4037,7 @@ function Oi(t) {
|
|
|
4037
4037
|
return Object.assign(e.prototype, t), e;
|
|
4038
4038
|
}
|
|
4039
4039
|
function Jt(t) {
|
|
4040
|
-
|
|
4040
|
+
C(this, {
|
|
4041
4041
|
$handle: t,
|
|
4042
4042
|
vm: t.vm,
|
|
4043
4043
|
options: {},
|
|
@@ -4047,7 +4047,7 @@ function Jt(t) {
|
|
|
4047
4047
|
}
|
|
4048
4048
|
}), this.updateKey(), this.init();
|
|
4049
4049
|
}
|
|
4050
|
-
|
|
4050
|
+
C(Jt.prototype, {
|
|
4051
4051
|
__init() {
|
|
4052
4052
|
this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
|
|
4053
4053
|
},
|
|
@@ -4113,7 +4113,7 @@ const Fi = function(t) {
|
|
|
4113
4113
|
let g;
|
|
4114
4114
|
a.template ? g = t.$handle.loadStrVar(a.template, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null) : a.handler && h.Function(a.handler) ? g = a.handler(p, i, s) : g = t.$handle.loadStrVar(`{{${a.attr}}}`, p, d ? { rule: i, value: t.$handle.subRuleData[d.id] || {} } : null), (g == null || g === "") && a.default != null && (g = a.default), a.copy !== !1 && (g = K(g));
|
|
4115
4115
|
const y = a.modify ? i : r.getProp();
|
|
4116
|
-
a.to === "child" ? y.children ?
|
|
4116
|
+
a.to === "child" ? y.children ? k(y.children, 0, g) : k(y, "children", [g]) : oe(y, a.to || "options", g), s.sync(i);
|
|
4117
4117
|
}, u = (p) => l(p);
|
|
4118
4118
|
const f = t.watchLoadData(u);
|
|
4119
4119
|
l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
|
|
@@ -4142,8 +4142,8 @@ const Fi = function(t) {
|
|
|
4142
4142
|
const u = typeof l == "object";
|
|
4143
4143
|
let f = (g) => {
|
|
4144
4144
|
let y = t.t(u ? l.attr : l, u ? l.params : null, g);
|
|
4145
|
-
const
|
|
4146
|
-
a === "child" ?
|
|
4145
|
+
const _ = u && l.modify ? i : r.getProp();
|
|
4146
|
+
a === "child" ? _.children ? k(_.children, 0, y) : k(_, "children", [y]) : oe(_, a, y), s.sync(i);
|
|
4147
4147
|
}, p = (g) => f(g);
|
|
4148
4148
|
const d = t.watchLoadData(p);
|
|
4149
4149
|
f = se(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
|
|
@@ -4221,29 +4221,29 @@ const Fi = function(t) {
|
|
|
4221
4221
|
const g = t.$handle.loadFetchVar(K(a), p, n), y = q(v({
|
|
4222
4222
|
headers: {}
|
|
4223
4223
|
}, g), {
|
|
4224
|
-
onSuccess(
|
|
4224
|
+
onSuccess(_, F) {
|
|
4225
4225
|
if (f()) return;
|
|
4226
|
-
let G = (L) =>
|
|
4227
|
-
const
|
|
4228
|
-
h.Function(
|
|
4226
|
+
let G = (L) => F ? L : j(L, "data") ? L.data : L;
|
|
4227
|
+
const A = z(g.parse);
|
|
4228
|
+
h.Function(A) ? G = A : A && h.String(A) && (G = (L) => B(L, A)), Ae(G(_, n, o)).then((L) => {
|
|
4229
4229
|
l(L);
|
|
4230
4230
|
});
|
|
4231
4231
|
},
|
|
4232
|
-
onError(
|
|
4233
|
-
l(void 0), !f() && (u || ((
|
|
4232
|
+
onError(_) {
|
|
4233
|
+
l(void 0), !f() && (u || ((F) => Ye(F.message || "fetch fail " + g.action)))(_, n, o);
|
|
4234
4234
|
}
|
|
4235
4235
|
});
|
|
4236
4236
|
t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
|
|
4237
4237
|
if (h.Function(g.action)) {
|
|
4238
|
-
|
|
4239
|
-
y.onSuccess(
|
|
4240
|
-
}).catch((
|
|
4241
|
-
y.onError(
|
|
4238
|
+
Ae(g.action(n, o)).then((_) => {
|
|
4239
|
+
y.onSuccess(_, !0);
|
|
4240
|
+
}).catch((_) => {
|
|
4241
|
+
y.onError(_);
|
|
4242
4242
|
});
|
|
4243
4243
|
return;
|
|
4244
4244
|
}
|
|
4245
4245
|
O(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
|
|
4246
|
-
}).catch((
|
|
4246
|
+
}).catch((_) => {
|
|
4247
4247
|
});
|
|
4248
4248
|
}, a.wait || 600));
|
|
4249
4249
|
}
|
|
@@ -4301,7 +4301,7 @@ const ji = "html", Di = {
|
|
|
4301
4301
|
return Array.isArray(t) ? t.filter((e) => h.String(e)).join("") : "";
|
|
4302
4302
|
}
|
|
4303
4303
|
};
|
|
4304
|
-
function
|
|
4304
|
+
function Vi(t) {
|
|
4305
4305
|
t = t + "=";
|
|
4306
4306
|
const r = decodeURIComponent(document.cookie).split(";");
|
|
4307
4307
|
for (let i = 0; i < r.length; i++) {
|
|
@@ -4319,7 +4319,7 @@ function Ai(t) {
|
|
|
4319
4319
|
}
|
|
4320
4320
|
return null;
|
|
4321
4321
|
}
|
|
4322
|
-
function
|
|
4322
|
+
function Ai(t) {
|
|
4323
4323
|
const e = localStorage.getItem(t);
|
|
4324
4324
|
if (e)
|
|
4325
4325
|
try {
|
|
@@ -4347,10 +4347,10 @@ function nt(t, e) {
|
|
|
4347
4347
|
return r.length ? i == null ? null : B(i, r) : i;
|
|
4348
4348
|
}
|
|
4349
4349
|
function Pi(t) {
|
|
4350
|
-
return nt(
|
|
4350
|
+
return nt(Vi, t);
|
|
4351
4351
|
}
|
|
4352
4352
|
function Ti(t) {
|
|
4353
|
-
return nt(
|
|
4353
|
+
return nt(Ai, t);
|
|
4354
4354
|
}
|
|
4355
4355
|
function Bi(t) {
|
|
4356
4356
|
return nt(Ii, t);
|
|
@@ -4428,7 +4428,7 @@ function qi(t, e) {
|
|
|
4428
4428
|
}
|
|
4429
4429
|
function Ui(t) {
|
|
4430
4430
|
const e = t.key || [], r = t.array || [], i = t.normal || [];
|
|
4431
|
-
|
|
4431
|
+
At.push(...e), et.push(...r), tt.push(...i), Mt([...e, ...r, ...i]);
|
|
4432
4432
|
}
|
|
4433
4433
|
let Hi = 1;
|
|
4434
4434
|
const U = {}, _t = Symbol("defValue");
|
|
@@ -4441,7 +4441,7 @@ function Wt(t) {
|
|
|
4441
4441
|
let p = { global: {} };
|
|
4442
4442
|
const d = t.isMobile === !0, g = ne({
|
|
4443
4443
|
$mobile: d
|
|
4444
|
-
}), y = wi(),
|
|
4444
|
+
}), y = wi(), _ = {}, F = {};
|
|
4445
4445
|
Ui(t.attrs || {});
|
|
4446
4446
|
function G(c) {
|
|
4447
4447
|
const m = U[c];
|
|
@@ -4450,7 +4450,7 @@ function Wt(t) {
|
|
|
4450
4450
|
if (m)
|
|
4451
4451
|
return m.api();
|
|
4452
4452
|
}
|
|
4453
|
-
function
|
|
4453
|
+
function A(c) {
|
|
4454
4454
|
o.push(c);
|
|
4455
4455
|
}
|
|
4456
4456
|
function L() {
|
|
@@ -4470,7 +4470,7 @@ function Wt(t) {
|
|
|
4470
4470
|
const c = Me(...arguments);
|
|
4471
4471
|
if (!c.id || !c.prop) return De;
|
|
4472
4472
|
const m = J(c.id), $ = c.prop, b = $.merge === !0 ? r[m] : void 0;
|
|
4473
|
-
r[m] = Se($, b || De), f[m] = T(m), $.maker &&
|
|
4473
|
+
r[m] = Se($, b || De), f[m] = T(m), $.maker && C(f, $.maker);
|
|
4474
4474
|
}
|
|
4475
4475
|
function E(c, m) {
|
|
4476
4476
|
let $;
|
|
@@ -4497,7 +4497,7 @@ function Wt(t) {
|
|
|
4497
4497
|
const w = b.$refs.fc.formCreate;
|
|
4498
4498
|
return w.$parent = $, Mi(w.options).appendChild(b.$el), w.api();
|
|
4499
4499
|
}
|
|
4500
|
-
Se(W,
|
|
4500
|
+
Se(W, F);
|
|
4501
4501
|
function zt(c) {
|
|
4502
4502
|
let m = v({}, t);
|
|
4503
4503
|
return c ? m.inherit = {
|
|
@@ -4508,7 +4508,7 @@ function Wt(t) {
|
|
|
4508
4508
|
providers: u,
|
|
4509
4509
|
useApps: o,
|
|
4510
4510
|
maker: f,
|
|
4511
|
-
formulas:
|
|
4511
|
+
formulas: _,
|
|
4512
4512
|
loadData: g
|
|
4513
4513
|
} : delete m.inherit, Wt(m);
|
|
4514
4514
|
}
|
|
@@ -4516,7 +4516,7 @@ function Wt(t) {
|
|
|
4516
4516
|
s[c] = m;
|
|
4517
4517
|
}
|
|
4518
4518
|
function Zt(c, m) {
|
|
4519
|
-
|
|
4519
|
+
_[c] = m;
|
|
4520
4520
|
}
|
|
4521
4521
|
function Qt(c, m) {
|
|
4522
4522
|
const $ = n[c] || {}, b = $.parsers || {};
|
|
@@ -4542,7 +4542,7 @@ function Wt(t) {
|
|
|
4542
4542
|
const $ = (c || "").split(".");
|
|
4543
4543
|
c = $.shift();
|
|
4544
4544
|
const b = $.join(".");
|
|
4545
|
-
if (j(g, c) ||
|
|
4545
|
+
if (j(g, c) || k(g, c, _t), g[c] !== _t) {
|
|
4546
4546
|
let w = g[c];
|
|
4547
4547
|
return w && w._driver ? w = w(b) : $.length && (w = B(w, $)), w == null || w === "" ? m : w;
|
|
4548
4548
|
} else
|
|
@@ -4558,7 +4558,7 @@ function Wt(t) {
|
|
|
4558
4558
|
a.push({ name: c, callback: m });
|
|
4559
4559
|
}
|
|
4560
4560
|
function Be(c) {
|
|
4561
|
-
|
|
4561
|
+
C(this, {
|
|
4562
4562
|
id: Hi++,
|
|
4563
4563
|
create: W,
|
|
4564
4564
|
vm: c,
|
|
@@ -4566,7 +4566,7 @@ function Wt(t) {
|
|
|
4566
4566
|
parsers: r,
|
|
4567
4567
|
providers: u,
|
|
4568
4568
|
modelFields: s,
|
|
4569
|
-
formulas:
|
|
4569
|
+
formulas: _,
|
|
4570
4570
|
isMobile: d,
|
|
4571
4571
|
rules: c.$props.rule,
|
|
4572
4572
|
name: c.$props.name || Ie(),
|
|
@@ -4593,9 +4593,9 @@ function Wt(t) {
|
|
|
4593
4593
|
N(this.options, () => {
|
|
4594
4594
|
this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
|
|
4595
4595
|
}, { deep: !0 });
|
|
4596
|
-
}),
|
|
4596
|
+
}), C(c.$options.components, e), C(c.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
|
|
4597
4597
|
}
|
|
4598
|
-
Be.isMobile = d,
|
|
4598
|
+
Be.isMobile = d, C(Be.prototype, {
|
|
4599
4599
|
init() {
|
|
4600
4600
|
this.isSub() && this.unwatch.push(N(() => this.vm.parent.fc.options.value, () => {
|
|
4601
4601
|
this.initOptions(), this.$handle.api.refresh();
|
|
@@ -4608,8 +4608,8 @@ function Wt(t) {
|
|
|
4608
4608
|
t(c, m, $) {
|
|
4609
4609
|
let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
|
|
4610
4610
|
return b == null && (b = ""), b && m && Object.keys(m).forEach((w) => {
|
|
4611
|
-
const
|
|
4612
|
-
b = b.replace(
|
|
4611
|
+
const V = new RegExp(`{${w}}`, "g");
|
|
4612
|
+
b = b.replace(V, m[w]);
|
|
4613
4613
|
}), b;
|
|
4614
4614
|
},
|
|
4615
4615
|
globalDataDriver(c) {
|
|
@@ -4620,11 +4620,11 @@ function Wt(t) {
|
|
|
4620
4620
|
return B(b.data, m);
|
|
4621
4621
|
{
|
|
4622
4622
|
let w;
|
|
4623
|
-
const
|
|
4624
|
-
if (
|
|
4625
|
-
if (
|
|
4623
|
+
const V = this.fetchCache.get(b);
|
|
4624
|
+
if (V) {
|
|
4625
|
+
if (V.status && (w = B(V.data, m)), !V.loading)
|
|
4626
4626
|
return w;
|
|
4627
|
-
|
|
4627
|
+
V.loading = !1, this.fetchCache.set(b, V);
|
|
4628
4628
|
} else
|
|
4629
4629
|
this.fetchCache.set(b, { status: !1 });
|
|
4630
4630
|
const S = se(() => {
|
|
@@ -4658,8 +4658,8 @@ function Wt(t) {
|
|
|
4658
4658
|
globalLanguageDriver(c) {
|
|
4659
4659
|
let m = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
|
|
4660
4660
|
if (m && (b = O(() => m(c))), b == null && $ && typeof $ == "object" && (b = B($, c)), b == null) {
|
|
4661
|
-
const w = this.options.value.language || {},
|
|
4662
|
-
b = B(w[
|
|
4661
|
+
const w = this.options.value.language || {}, V = this.getLocale();
|
|
4662
|
+
b = B(w[V] || {}, c), b == null && (b = B(Li[V] || {}, c));
|
|
4663
4663
|
}
|
|
4664
4664
|
return b;
|
|
4665
4665
|
},
|
|
@@ -4669,8 +4669,8 @@ function Wt(t) {
|
|
|
4669
4669
|
if (b) {
|
|
4670
4670
|
const w = h.Function(b) ? b : z(b.handle);
|
|
4671
4671
|
if (w) {
|
|
4672
|
-
let
|
|
4673
|
-
return B(
|
|
4672
|
+
let V = w((...S) => this.$handle.api.getData(...S), this.$handle.api);
|
|
4673
|
+
return B(V, m);
|
|
4674
4674
|
}
|
|
4675
4675
|
}
|
|
4676
4676
|
},
|
|
@@ -4735,10 +4735,10 @@ function Wt(t) {
|
|
|
4735
4735
|
}, te.value;
|
|
4736
4736
|
};
|
|
4737
4737
|
b(!1);
|
|
4738
|
-
const
|
|
4738
|
+
const V = () => {
|
|
4739
4739
|
Object.keys($).forEach((S) => $[S].fn()), $ = {};
|
|
4740
4740
|
};
|
|
4741
|
-
return this.unwatch.push(
|
|
4741
|
+
return this.unwatch.push(V), V;
|
|
4742
4742
|
},
|
|
4743
4743
|
isSub() {
|
|
4744
4744
|
return this.vm.parent && this.vm.extendOption;
|
|
@@ -4790,7 +4790,7 @@ function Wt(t) {
|
|
|
4790
4790
|
}
|
|
4791
4791
|
});
|
|
4792
4792
|
function ot(c) {
|
|
4793
|
-
|
|
4793
|
+
C(c, {
|
|
4794
4794
|
version: t.version,
|
|
4795
4795
|
ui: t.ui,
|
|
4796
4796
|
isMobile: d,
|
|
@@ -4820,43 +4820,43 @@ function Wt(t) {
|
|
|
4820
4820
|
parseFn: z,
|
|
4821
4821
|
parseJson: St,
|
|
4822
4822
|
toJson: we,
|
|
4823
|
-
useApp:
|
|
4823
|
+
useApp: A,
|
|
4824
4824
|
getApi: G,
|
|
4825
4825
|
on: tr
|
|
4826
4826
|
});
|
|
4827
4827
|
}
|
|
4828
4828
|
function rr(c) {
|
|
4829
|
-
|
|
4829
|
+
C(c, {
|
|
4830
4830
|
create: W,
|
|
4831
4831
|
install(m, $) {
|
|
4832
4832
|
if (p = v(v({}, p), $ || {}), m._installedFormCreate === !0) return;
|
|
4833
4833
|
m._installedFormCreate = !0;
|
|
4834
|
-
const b = function(
|
|
4835
|
-
return W(
|
|
4834
|
+
const b = function(V, S = {}) {
|
|
4835
|
+
return W(V, S, this);
|
|
4836
4836
|
};
|
|
4837
4837
|
ot(b), m.prototype.$formCreate = b;
|
|
4838
4838
|
const w = R();
|
|
4839
|
-
m.component(w.name, w), m.component("FcFragment", M()), o.forEach((
|
|
4840
|
-
O(() =>
|
|
4839
|
+
m.component(w.name, w), m.component("FcFragment", M()), o.forEach((V) => {
|
|
4840
|
+
O(() => V(c, m));
|
|
4841
4841
|
});
|
|
4842
4842
|
}
|
|
4843
4843
|
});
|
|
4844
4844
|
}
|
|
4845
|
-
if (ot(
|
|
4845
|
+
if (ot(F), rr(F), ke("$cookie", Pi), ke("$localStorage", Ti), ke("$sessionStorage", Bi), y.use({ fragment: "fcFragment" }), t.install && W.use(t), pe(Di), t.inherit) {
|
|
4846
4846
|
const c = t.inherit;
|
|
4847
|
-
c.components &&
|
|
4847
|
+
c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(g, c.loadData), c.formulas && C(_, c.formulas);
|
|
4848
4848
|
}
|
|
4849
4849
|
const Ee = R();
|
|
4850
|
-
return Se(Ee,
|
|
4850
|
+
return Se(Ee, F), Object.defineProperties(Ee, {
|
|
4851
4851
|
fetch: {
|
|
4852
4852
|
get() {
|
|
4853
|
-
return
|
|
4853
|
+
return F.fetch;
|
|
4854
4854
|
},
|
|
4855
4855
|
set(c) {
|
|
4856
|
-
|
|
4856
|
+
F.fetch = c;
|
|
4857
4857
|
}
|
|
4858
4858
|
}
|
|
4859
|
-
}), Ee.util =
|
|
4859
|
+
}), Ee.util = F, Ee;
|
|
4860
4860
|
}
|
|
4861
4861
|
const Ct = {
|
|
4862
4862
|
date: "yyyy-MM-dd",
|
|
@@ -5086,7 +5086,7 @@ const on = {
|
|
|
5086
5086
|
},
|
|
5087
5087
|
beforeRender() {
|
|
5088
5088
|
const { key: t, ref: e, $handle: r } = this, i = this.options.form;
|
|
5089
|
-
|
|
5089
|
+
C(this.rule, { key: t, ref: e, class: [i.className, i.class, "form-create", this.$handle.preview ? "is-preview" : ""] }), C(this.rule.props, {
|
|
5090
5090
|
model: r.formData
|
|
5091
5091
|
});
|
|
5092
5092
|
},
|
|
@@ -5117,22 +5117,22 @@ const on = {
|
|
|
5117
5117
|
return !(!e.title && !e.native || Z(e.show));
|
|
5118
5118
|
},
|
|
5119
5119
|
makeInfo(t, e, r) {
|
|
5120
|
-
var f, p, d, g, y,
|
|
5120
|
+
var f, p, d, g, y, _;
|
|
5121
5121
|
const i = v({}, t.title), s = v({}, t.info), n = nn(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
|
|
5122
5122
|
title: (p = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : p.value,
|
|
5123
5123
|
rule: r.rule,
|
|
5124
5124
|
options: this.options
|
|
5125
5125
|
}) : ((g = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
|
|
5126
5126
|
if (!Z(s.show) && (s.info || s.native) && !Z(s.icon)) {
|
|
5127
|
-
const
|
|
5127
|
+
const F = {
|
|
5128
5128
|
type: s.type || "popover",
|
|
5129
5129
|
slot: "label",
|
|
5130
5130
|
props: Ge(s),
|
|
5131
5131
|
key: `${e}pop`
|
|
5132
5132
|
};
|
|
5133
|
-
delete
|
|
5133
|
+
delete F.props.icon, delete F.props.show, delete F.props.info, delete F.props.align, delete F.props.native;
|
|
5134
5134
|
const G = "content";
|
|
5135
|
-
s.info && !j(
|
|
5135
|
+
s.info && !j(F.props, G) && (F.props[G] = (_ = (y = r.refRule) == null ? void 0 : y.__$info) == null ? void 0 : _.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, F]), [
|
|
5136
5136
|
this.$r({
|
|
5137
5137
|
type: "i",
|
|
5138
5138
|
slot: n ? "default" : "reference",
|
|
@@ -5146,7 +5146,12 @@ const on = {
|
|
|
5146
5146
|
key: `${e}tit`,
|
|
5147
5147
|
class: "fc-form-title",
|
|
5148
5148
|
slot: i.slot || "label",
|
|
5149
|
-
type: i.type || "span"
|
|
5149
|
+
type: i.type || "span",
|
|
5150
|
+
on: {
|
|
5151
|
+
click: (...F) => {
|
|
5152
|
+
this.$handle.targetHook(r, "titleClick", { args: F });
|
|
5153
|
+
}
|
|
5154
|
+
}
|
|
5150
5155
|
}]);
|
|
5151
5156
|
return delete u.props.show, delete u.props.title, delete u.props.native, this.$r(u, l);
|
|
5152
5157
|
},
|
|
@@ -5336,11 +5341,11 @@ function hn(t, e) {
|
|
|
5336
5341
|
},
|
|
5337
5342
|
submitBtnProps: (r = {}) => {
|
|
5338
5343
|
let i = kt(e.options.submitBtn, !0);
|
|
5339
|
-
|
|
5344
|
+
C(i, r), e.options.submitBtn = i, t.refreshOptions();
|
|
5340
5345
|
},
|
|
5341
5346
|
resetBtnProps: (r = {}) => {
|
|
5342
5347
|
let i = kt(e.options.resetBtn, !1);
|
|
5343
|
-
|
|
5348
|
+
C(i, r), e.options.resetBtn = i, t.refreshOptions();
|
|
5344
5349
|
},
|
|
5345
5350
|
submit(r, i) {
|
|
5346
5351
|
return new Promise((s, n) => {
|
|
@@ -5400,7 +5405,7 @@ function pn(t) {
|
|
|
5400
5405
|
function mn() {
|
|
5401
5406
|
return Wt({
|
|
5402
5407
|
ui: "element-ui",
|
|
5403
|
-
version: "2.7.
|
|
5408
|
+
version: "2.7.20",
|
|
5404
5409
|
manager: on,
|
|
5405
5410
|
extendApi: hn,
|
|
5406
5411
|
install: pn,
|