@form-create/view-design 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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * FormCreate 低代码表单渲染器
3
- * @form-create/view-design v2.7.6
3
+ * @form-create/view-design 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/
@@ -1365,7 +1365,7 @@ function ne(t, e) {
1365
1365
  r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
1366
1366
  };
1367
1367
  }
1368
- function be(t) {
1368
+ function $e(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
  }
@@ -1740,7 +1740,7 @@ function Wr(t, e, r) {
1740
1740
  Object.keys(k).forEach((N) => {
1741
1741
  let de = "";
1742
1742
  k[N].style && Object.keys(k[N].style).forEach((z) => {
1743
- de += be(z) + ":" + k[N].style[z] + ";";
1743
+ de += $e(z) + ":" + k[N].style[z] + ";";
1744
1744
  }), k[N].content && (de += k[N].content + ";"), de && (F += `.${N}{${de}}`);
1745
1745
  }), s.option && s.option.style && (F += s.option.style), P || (P = document.createElement("style"), P.type = "text/css", document.head.appendChild(P)), P.innerHTML = F || "";
1746
1746
  }, () => {
@@ -1917,7 +1917,7 @@ function gt(t, e, r) {
1917
1917
  }));
1918
1918
  });
1919
1919
  }
1920
- function $e(t) {
1920
+ function be(t) {
1921
1921
  return G(t);
1922
1922
  }
1923
1923
  function Qr(t) {
@@ -2004,14 +2004,14 @@ function Qr(t) {
2004
2004
  if (n == null || typeof n == "boolean") {
2005
2005
  const o = {};
2006
2006
  return Object.keys(t.form).forEach((a) => {
2007
- (n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = $e(t.form[a]));
2007
+ (n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = be(t.form[a]));
2008
2008
  }), o;
2009
2009
  } else
2010
2010
  return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
2011
2011
  },
2012
2012
  getValue(n) {
2013
2013
  const o = t.getFieldCtx(n);
2014
- return o ? $e(o.rule.value) : t.options.appendValue !== !1 && E(t.appendData, n) ? $e(t.appendData[n]) : void 0;
2014
+ return o ? be(o.rule.value) : t.options.appendValue !== !1 && E(t.appendData, n) ? be(t.appendData[n]) : void 0;
2015
2015
  },
2016
2016
  coverValue(n) {
2017
2017
  const o = v({}, n || {});
@@ -2221,7 +2221,7 @@ function Qr(t) {
2221
2221
  resetFields(n) {
2222
2222
  e(n).forEach((o) => {
2223
2223
  t.getCtxs(o).forEach((a) => {
2224
- t.$render.clearCache(a), a.rule.value = $e(a.defaultValue);
2224
+ t.$render.clearCache(a), a.rule.value = be(a.defaultValue);
2225
2225
  });
2226
2226
  }), A(() => {
2227
2227
  A(() => {
@@ -2282,7 +2282,7 @@ function Qr(t) {
2282
2282
  }
2283
2283
  },
2284
2284
  getChildrenFormData(n, o) {
2285
- return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = $e(u.value)), l), {});
2285
+ return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = be(u.value)), l), {});
2286
2286
  },
2287
2287
  setChildrenFormData(n, o, a) {
2288
2288
  const l = s.getChildrenRuleList(n);
@@ -2423,7 +2423,7 @@ function Yr(t) {
2423
2423
  const r = (i) => {
2424
2424
  if (i) {
2425
2425
  let s;
2426
- 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);
2426
+ return e.rule.field && (s = i.$scopedSlots["field-" + $e(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + $e(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
2427
2427
  }
2428
2428
  };
2429
2429
  return r(this.vm);
@@ -2587,7 +2587,12 @@ function Yr(t) {
2587
2587
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2588
2588
  const n = v({}, e.prop.on || {}), o = {};
2589
2589
  Object.keys(n).forEach((l) => {
2590
- l.indexOf("native.") === 0 && (o[l.replace("native.", "")] = n[l], delete n[l]);
2590
+ if (l.indexOf("native.") === 0)
2591
+ o[l.replace("native.", "")] = n[l], delete n[l];
2592
+ else if (this.$handle.options.transformEventName !== !1) {
2593
+ const u = $e(l);
2594
+ u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
2595
+ }
2591
2596
  }), e.prop.on = n;
2592
2597
  const a = [
2593
2598
  {
@@ -2743,7 +2748,7 @@ function ti(t) {
2743
2748
  let d, g = n || o || a;
2744
2749
  if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
2745
2750
  r || (g = `native-${g}`);
2746
- const m = be(`${g}-${f}`), $ = (..._) => {
2751
+ const m = $e(`${g}-${f}`), $ = (..._) => {
2747
2752
  this.vm.$emit(m, ..._), this.vm.$emit("emit-event", m, ..._), this.bus.$emit(m, ..._);
2748
2753
  };
2749
2754
  if ($.__emit = !0, !d && l === !1)
@@ -3926,7 +3931,7 @@ function bi() {
3926
3931
  },
3927
3932
  use(r) {
3928
3933
  Object.keys(r).forEach((i) => {
3929
- const s = be(i), n = qr(i).toLocaleLowerCase(), o = r[i];
3934
+ const s = $e(i), n = qr(i).toLocaleLowerCase(), o = r[i];
3930
3935
  [i, s, n].forEach((a) => {
3931
3936
  e.alias(i, o), e.prototype[a] = function(l, u) {
3932
3937
  return this.make(o, l, u);
@@ -5306,7 +5311,7 @@ function ln(t) {
5306
5311
  function un() {
5307
5312
  return Jt({
5308
5313
  ui: "view-design",
5309
- version: "2.7.6",
5314
+ version: "2.7.7",
5310
5315
  manager: Qi,
5311
5316
  install: ln,
5312
5317
  extendApi: on,