@form-create/element-ui 2.7.6 → 2.7.7
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 +18 -13
- package/dist/form-create.js +3 -3
- package/dist/form-create.min.js +3 -3
- package/package.json +3 -3
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.7
|
|
4
4
|
* (c) 2018-2025 xaboy
|
|
5
5
|
* Github https://github.com/xaboy/form-create
|
|
6
6
|
* Site https://form-create.com/
|
|
@@ -1361,7 +1361,7 @@ function se(t, e) {
|
|
|
1361
1361
|
r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
|
|
1362
1362
|
};
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function be(t) {
|
|
1365
1365
|
let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
|
|
1366
1366
|
return e.indexOf("-") === 0 && (e = e.substr(1)), e;
|
|
1367
1367
|
}
|
|
@@ -1736,7 +1736,7 @@ function Kr(t, e, r) {
|
|
|
1736
1736
|
Object.keys(S).forEach((N) => {
|
|
1737
1737
|
let pe = "";
|
|
1738
1738
|
S[N].style && Object.keys(S[N].style).forEach((W) => {
|
|
1739
|
-
pe +=
|
|
1739
|
+
pe += be(W) + ":" + S[N].style[W] + ";";
|
|
1740
1740
|
}), S[N].content && (pe += S[N].content + ";"), pe && (k += `.${N}{${pe}}`);
|
|
1741
1741
|
}), s.option && s.option.style && (k += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = k || "";
|
|
1742
1742
|
}, () => {
|
|
@@ -1913,7 +1913,7 @@ function gt(t, e, r) {
|
|
|
1913
1913
|
}));
|
|
1914
1914
|
});
|
|
1915
1915
|
}
|
|
1916
|
-
function
|
|
1916
|
+
function ve(t) {
|
|
1917
1917
|
return K(t);
|
|
1918
1918
|
}
|
|
1919
1919
|
function Xr(t) {
|
|
@@ -2000,14 +2000,14 @@ function Xr(t) {
|
|
|
2000
2000
|
if (n == null || typeof n == "boolean") {
|
|
2001
2001
|
const o = {};
|
|
2002
2002
|
return Object.keys(t.form).forEach((a) => {
|
|
2003
|
-
(n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] =
|
|
2003
|
+
(n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = ve(t.form[a]));
|
|
2004
2004
|
}), o;
|
|
2005
2005
|
} else
|
|
2006
2006
|
return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
|
|
2007
2007
|
},
|
|
2008
2008
|
getValue(n) {
|
|
2009
2009
|
const o = t.getFieldCtx(n);
|
|
2010
|
-
return o ?
|
|
2010
|
+
return o ? ve(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? ve(t.appendData[n]) : void 0;
|
|
2011
2011
|
},
|
|
2012
2012
|
coverValue(n) {
|
|
2013
2013
|
const o = v({}, n || {});
|
|
@@ -2217,7 +2217,7 @@ function Xr(t) {
|
|
|
2217
2217
|
resetFields(n) {
|
|
2218
2218
|
e(n).forEach((o) => {
|
|
2219
2219
|
t.getCtxs(o).forEach((a) => {
|
|
2220
|
-
t.$render.clearCache(a), a.rule.value =
|
|
2220
|
+
t.$render.clearCache(a), a.rule.value = ve(a.defaultValue);
|
|
2221
2221
|
});
|
|
2222
2222
|
}), I(() => {
|
|
2223
2223
|
I(() => {
|
|
@@ -2278,7 +2278,7 @@ function Xr(t) {
|
|
|
2278
2278
|
}
|
|
2279
2279
|
},
|
|
2280
2280
|
getChildrenFormData(n, o) {
|
|
2281
|
-
return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] =
|
|
2281
|
+
return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = ve(u.value)), l), {});
|
|
2282
2282
|
},
|
|
2283
2283
|
setChildrenFormData(n, o, a) {
|
|
2284
2284
|
const l = s.getChildrenRuleList(n);
|
|
@@ -2419,7 +2419,7 @@ function Qr(t) {
|
|
|
2419
2419
|
const r = (i) => {
|
|
2420
2420
|
if (i) {
|
|
2421
2421
|
let s;
|
|
2422
|
-
return e.rule.field && (s = i.$scopedSlots["field-" +
|
|
2422
|
+
return e.rule.field && (s = i.$scopedSlots["field-" + be(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + be(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
|
|
2423
2423
|
}
|
|
2424
2424
|
};
|
|
2425
2425
|
return r(this.vm);
|
|
@@ -2583,7 +2583,12 @@ function Qr(t) {
|
|
|
2583
2583
|
this.$manager.mergeProp(e), e.parser.mergeProp(e);
|
|
2584
2584
|
const n = v({}, e.prop.on || {}), o = {};
|
|
2585
2585
|
Object.keys(n).forEach((l) => {
|
|
2586
|
-
l.indexOf("native.") === 0
|
|
2586
|
+
if (l.indexOf("native.") === 0)
|
|
2587
|
+
o[l.replace("native.", "")] = n[l], delete n[l];
|
|
2588
|
+
else if (this.$handle.options.transformEventName !== !1) {
|
|
2589
|
+
const u = be(l);
|
|
2590
|
+
u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
|
|
2591
|
+
}
|
|
2587
2592
|
}), e.prop.on = n;
|
|
2588
2593
|
const a = [
|
|
2589
2594
|
{
|
|
@@ -2739,7 +2744,7 @@ function ei(t) {
|
|
|
2739
2744
|
let d, g = n || o || a;
|
|
2740
2745
|
if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
|
|
2741
2746
|
r || (g = `native-${g}`);
|
|
2742
|
-
const m =
|
|
2747
|
+
const m = be(`${g}-${f}`), $ = (...w) => {
|
|
2743
2748
|
this.vm.$emit(m, ...w), this.vm.$emit("emit-event", m, ...w), this.bus.$emit(m, ...w);
|
|
2744
2749
|
};
|
|
2745
2750
|
if ($.__emit = !0, !d && l === !1)
|
|
@@ -3922,7 +3927,7 @@ function $i() {
|
|
|
3922
3927
|
},
|
|
3923
3928
|
use(r) {
|
|
3924
3929
|
Object.keys(r).forEach((i) => {
|
|
3925
|
-
const s =
|
|
3930
|
+
const s = be(i), n = jt(i).toLocaleLowerCase(), o = r[i];
|
|
3926
3931
|
[i, s, n].forEach((a) => {
|
|
3927
3932
|
e.alias(i, o), e.prototype[a] = function(l, u) {
|
|
3928
3933
|
return this.make(o, l, u);
|
|
@@ -5284,7 +5289,7 @@ function an(t) {
|
|
|
5284
5289
|
function ln() {
|
|
5285
5290
|
return Gt({
|
|
5286
5291
|
ui: "element-ui",
|
|
5287
|
-
version: "2.7.
|
|
5292
|
+
version: "2.7.7",
|
|
5288
5293
|
manager: Qi,
|
|
5289
5294
|
extendApi: sn,
|
|
5290
5295
|
install: an,
|