@form-create/element-ui 2.7.22 → 2.7.23

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 CHANGED
@@ -12,6 +12,8 @@
12
12
  <span>&nbsp;|&nbsp;</span>
13
13
  <a href="https://form-create.com/v2/guide/" target="_blank">帮助文档</a>
14
14
  <span>&nbsp;|&nbsp;</span>
15
+ <a href="https://view.form-create.com/skills" target="_blank">Agent Skills</a>
16
+ <span>&nbsp;|&nbsp;</span>
15
17
  <a href="https://form-create.com/designer/" target="_blank">可视化表单设计器</a>
16
18
  <span>&nbsp;|&nbsp;</span>
17
19
  <a href="https://form-create.com/v3/mobile/" target="_blank">移动端表单设计器</a>
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * FormCreate 低代码表单渲染器
3
- * @form-create/element-ui v2.7.22
4
- * (c) 2018-2025 xaboy
3
+ * @form-create/element-ui v2.7.23
4
+ * (c) 2018-2026 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
7
7
  * Released under the MIT License.
@@ -988,7 +988,7 @@ function Ye(t, e) {
988
988
  function Mr(t) {
989
989
  Ye(t.toString()), console.error(t);
990
990
  }
991
- const We = "[[FORM-CREATE-PREFIX-", xe = "-FORM-CREATE-SUFFIX]]";
991
+ const We = "[[FORM-CREATE-PREFIX-", ze = "-FORM-CREATE-SUFFIX]]";
992
992
  function Oe(t, e) {
993
993
  return JSON.stringify(Fe(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
994
994
  if (!(i && i._isVue === !0)) {
@@ -997,19 +997,19 @@ function Oe(t, e) {
997
997
  if (i.__json)
998
998
  return i.__json;
999
999
  if (i.__origin && (i = i.__origin), !i.__emit)
1000
- return We + i + xe;
1000
+ return We + i + ze;
1001
1001
  }
1002
1002
  }, e);
1003
1003
  }
1004
1004
  function Le(t) {
1005
1005
  return new Function("return " + t)();
1006
1006
  }
1007
- function z(t, e) {
1007
+ function x(t, e) {
1008
1008
  if (t && h.String(t) && t.length > 4) {
1009
1009
  let r = t.trim(), i = !1;
1010
1010
  try {
1011
- if (r.indexOf(xe) > 0 && r.indexOf(We) === 0)
1012
- r = r.replace(xe, "").replace(We, ""), i = !0;
1011
+ if (r.indexOf(ze) > 0 && r.indexOf(We) === 0)
1012
+ r = r.replace(ze, "").replace(We, ""), i = !0;
1013
1013
  else if (r.indexOf("$FN:") === 0)
1014
1014
  r = r.substring(4), i = !0;
1015
1015
  else if (r.indexOf("$EXEC:") === 0)
@@ -1047,7 +1047,7 @@ err: ${s}`);
1047
1047
  }
1048
1048
  function St(t, e) {
1049
1049
  return JSON.parse(t, function(r, i) {
1050
- return h.Undef(i) || !i.indexOf ? i : z(i, e);
1050
+ return h.Undef(i) || !i.indexOf ? i : x(i, e);
1051
1051
  });
1052
1052
  }
1053
1053
  let qr = 0;
@@ -1498,7 +1498,7 @@ const Ur = "fcGroup", Hr = {
1498
1498
  function It() {
1499
1499
  return [...At, ...jt, ...Dt, ...Vt, ...et, ...tt];
1500
1500
  }
1501
- function ze(t, e) {
1501
+ function xe(t, e) {
1502
1502
  return {
1503
1503
  value: t,
1504
1504
  enumerable: !1,
@@ -1519,7 +1519,7 @@ function ht(t) {
1519
1519
  const e = h.Function(t.getRule) ? t.getRule() : t;
1520
1520
  return e.type || (e.type = "input"), e;
1521
1521
  }
1522
- function xr(t, e) {
1522
+ function zr(t, e) {
1523
1523
  return t ? (Object.keys(e || {}).forEach((r) => {
1524
1524
  e[r] && (t[r] = ee(t[r] || {}, e[r]));
1525
1525
  }), t) : e;
@@ -1550,7 +1550,7 @@ function Xe(t, e) {
1550
1550
  });
1551
1551
  }), r;
1552
1552
  }
1553
- function zr(t, e) {
1553
+ function xr(t, e) {
1554
1554
  if (h.Object(t)) {
1555
1555
  const r = {};
1556
1556
  return Object.keys(t).forEach((i) => {
@@ -1575,7 +1575,7 @@ function Se() {
1575
1575
  const n = s();
1576
1576
  Array.isArray(n) ? i.push(...n) : i.push(n);
1577
1577
  } else h.Undef(s) || i.push(s);
1578
- }), zr(i, r);
1578
+ }), xr(i, r);
1579
1579
  },
1580
1580
  getSlots() {
1581
1581
  let r = [];
@@ -1933,7 +1933,7 @@ function yt(t, e, r) {
1933
1933
  (e || Ut)(q(v({}, t), {
1934
1934
  onSuccess(n) {
1935
1935
  let o = (l) => l;
1936
- const a = z(t.parse);
1936
+ const a = x(t.parse);
1937
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
  });
@@ -2336,7 +2336,7 @@ function ti(t) {
2336
2336
  getGlobalEvent(n) {
2337
2337
  let o = s.options.globalEvent[n];
2338
2338
  if (o)
2339
- return typeof o == "object" && (o = o.handle), z(o);
2339
+ return typeof o == "object" && (o = o.handle), x(o);
2340
2340
  },
2341
2341
  getGlobalData(n) {
2342
2342
  return new Promise((o, a) => {
@@ -2577,7 +2577,7 @@ function ii(t) {
2577
2577
  });
2578
2578
  const d = this.getTypeSlot(e);
2579
2579
  let m;
2580
- return d ? (u.children = f, m = d(u)) : m = a ? e.parser.preview(Ke(f), e) : e.parser.render(Ke(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;
2580
+ return d ? (u.children = f, m = d(u)) : m = a ? e.parser.preview(Ke(f), e) : e.parser.render(Ke(f), e), m = this.renderSides(m, e), (e.input || !h.Undef(n.native) || n.col.show !== !1) && 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;
2581
2581
  }, this.setCache(e, s, r);
2582
2582
  }
2583
2583
  return (...s) => {
@@ -2674,6 +2674,9 @@ function ii(t) {
2674
2674
  "hook:mounted": () => {
2675
2675
  this.onMounted(e);
2676
2676
  },
2677
+ "hook:beforeDestroy": () => {
2678
+ this.$handle.effect(e, "beforeUnmount"), this.$handle.targetHook(e, "beforeUnmount");
2679
+ },
2677
2680
  "fc.updateValue": (l) => {
2678
2681
  this.$handle.onUpdateValue(e, l);
2679
2682
  },
@@ -2807,7 +2810,7 @@ function si(t) {
2807
2810
  if (!s && Array.isArray(r) && r[0] && (h.String(r[0]) || h.Function(r[0])))
2808
2811
  return this.parseEventLst(e, r, i, !0);
2809
2812
  if (h.String(r)) {
2810
- const n = z(r);
2813
+ const n = x(r);
2811
2814
  if (n && r !== n)
2812
2815
  return n.__inject ? this.parseEvent(e, n, i, !0) : n;
2813
2816
  }
@@ -2945,9 +2948,9 @@ function li(t) {
2945
2948
  }
2946
2949
  function ui(t) {
2947
2950
  Object.defineProperties(t.origin, {
2948
- __fc__: ze(ye(t), !0)
2951
+ __fc__: xe(ye(t), !0)
2949
2952
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2950
- __fc__: ze(ye(t), !0)
2953
+ __fc__: xe(ye(t), !0)
2951
2954
  });
2952
2955
  }
2953
2956
  function Gt(t, e, r) {
@@ -3143,10 +3146,10 @@ function fi(t) {
3143
3146
  parseRule(e) {
3144
3147
  const r = ht(e);
3145
3148
  return Object.defineProperties(r, {
3146
- __origin__: ze(e, !0)
3149
+ __origin__: xe(e, !0)
3147
3150
  }), ci(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
3148
3151
  i && this.loadFn(i, r);
3149
- }), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
3152
+ }), this.loadCtrl(r), r.update && (r.update = x(r.update)), r;
3150
3153
  },
3151
3154
  loadFn(e, r) {
3152
3155
  ["on", "props", "nativeOn", "deep"].forEach((i) => {
@@ -3155,7 +3158,7 @@ function fi(t) {
3155
3158
  },
3156
3159
  loadCtrl(e) {
3157
3160
  e.control && e.control.forEach((r) => {
3158
- r.handle && (r.handle = z(r.handle));
3161
+ r.handle && (r.handle = x(r.handle));
3159
3162
  });
3160
3163
  },
3161
3164
  syncProp(e) {
@@ -3791,7 +3794,7 @@ function yi(t) {
3791
3794
  emitEvent(e, ...r) {
3792
3795
  const i = this.options[e] || this.options[H("on-" + e)];
3793
3796
  if (i) {
3794
- const s = z(i);
3797
+ const s = x(i);
3795
3798
  h.Function(s) && O(() => s(...r));
3796
3799
  }
3797
3800
  this.bus.$emit(e, ...r);
@@ -4243,7 +4246,7 @@ const Fi = function(t) {
4243
4246
  onSuccess(_, F) {
4244
4247
  if (f()) return;
4245
4248
  let J = (L) => F ? L : j(L, "data") ? L.data : L;
4246
- const A = z(m.parse);
4249
+ const A = x(m.parse);
4247
4250
  h.Function(A) ? J = A : A && h.String(A) && (J = (L) => B(L, A)), Ae(J(_, n, o)).then((L) => {
4248
4251
  l(L);
4249
4252
  });
@@ -4521,7 +4524,7 @@ function Wt(t) {
4521
4524
  return w.$parent = $, Mi(w.options).appendChild(b.$el), w.api();
4522
4525
  }
4523
4526
  je(W, F);
4524
- function zt(c) {
4527
+ function xt(c) {
4525
4528
  let g = v({}, t);
4526
4529
  return c ? g.inherit = {
4527
4530
  components: e,
@@ -4652,18 +4655,18 @@ function Wt(t) {
4652
4655
  this.fetchCache.set(b, { status: !1 });
4653
4656
  const R = se(() => {
4654
4657
  te();
4655
- const x = this.fetchCache.get(b);
4656
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (x && (x.loading = !0, this.fetchCache.set(b, x)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
4657
- }, b.wait || 600), ae = (x) => {
4658
- this.fetchCache.set(b, { status: !0, data: x }), this.bus.$emit("$loadData.$globalData." + $);
4659
- }, le = (x, ue) => {
4658
+ const z = this.fetchCache.get(b);
4659
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." + $)) : this.fetchCache.delete(b);
4660
+ }, b.wait || 600), ae = (z) => {
4661
+ this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." + $);
4662
+ }, le = (z, ue) => {
4660
4663
  if (ue && b.watch === !1)
4661
4664
  return te();
4662
4665
  if (ue) {
4663
4666
  R();
4664
4667
  return;
4665
4668
  }
4666
- const fe = this.$handle.loadFetchVar(Ke(b), x);
4669
+ const fe = this.$handle.loadFetchVar(Ke(b), z);
4667
4670
  fe.targetRule = this.targetRule, this.$handle.api.fetch(fe).then((re) => {
4668
4671
  ae(re);
4669
4672
  }).catch((re) => {
@@ -4690,7 +4693,7 @@ function Wt(t) {
4690
4693
  let g = c.split(".");
4691
4694
  const $ = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
4692
4695
  if (b) {
4693
- const w = h.Function(b) ? b : z(b.handle);
4696
+ const w = h.Function(b) ? b : x(b.handle);
4694
4697
  if (w) {
4695
4698
  let V = w((...R) => this.$handle.api.getData(...R), this.$handle.api);
4696
4699
  return B(V, g);
@@ -4742,7 +4745,7 @@ function Wt(t) {
4742
4745
  let le;
4743
4746
  if (typeof R == "object" && (le = R.getValue, R = R.id), $[R])
4744
4747
  return $[R].val;
4745
- const te = $e(() => le ? le() : this.getLoadData(R, ae)), x = R.split("."), ue = x.shift(), fe = x.shift() || "", re = se(() => {
4748
+ const te = $e(() => le ? le() : this.getLoadData(R, ae)), z = R.split("."), ue = z.shift(), fe = z.shift() || "", re = se(() => {
4746
4749
  const ce = le ? le() : this.getLoadData(R, ae);
4747
4750
  if ($[R])
4748
4751
  ((ce instanceof Function || h.Object(ce) || Array.isArray(ce)) && ce === $[R].val || JSON.stringify(ce) !== JSON.stringify($[R].val)) && ($[R].val = ce, b(!0));
@@ -4783,7 +4786,7 @@ function Wt(t) {
4783
4786
  mergeOptions(c, g, $) {
4784
4787
  return g = v({}, g || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4785
4788
  delete g[b];
4786
- }), g.global && (c.global = xr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
4789
+ }), g.global && (c.global = zr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
4787
4790
  },
4788
4791
  updateOptions(c) {
4789
4792
  this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
@@ -4833,14 +4836,14 @@ function Wt(t) {
4833
4836
  $vnode: M,
4834
4837
  parser: me,
4835
4838
  use: ge,
4836
- factory: zt,
4839
+ factory: xt,
4837
4840
  componentAlias: Pe,
4838
4841
  copyRule: Pt,
4839
4842
  copyRules: Tt,
4840
4843
  mergeRule: ee,
4841
4844
  fetch: Ut,
4842
4845
  $form: S,
4843
- parseFn: z,
4846
+ parseFn: x,
4844
4847
  parseJson: St,
4845
4848
  toJson: Oe,
4846
4849
  useApp: A,
@@ -4919,13 +4922,13 @@ const Ct = {
4919
4922
  let { props: e } = t.prop;
4920
4923
  e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
4921
4924
  }
4922
- }, Wi = "textarea", xi = {
4925
+ }, Wi = "textarea", zi = {
4923
4926
  name: Wi,
4924
4927
  mergeProp(t) {
4925
4928
  let { props: e } = t.prop;
4926
4929
  e.type = "textarea", e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
4927
4930
  }
4928
- }, Ot = "slider", zi = {
4931
+ }, Ot = "slider", xi = {
4929
4932
  name: Ot,
4930
4933
  maker: {
4931
4934
  sliderRange: T(Ot, { range: !0 })
@@ -4960,8 +4963,8 @@ const Ct = {
4960
4963
  Gi,
4961
4964
  Ji,
4962
4965
  Ki,
4963
- xi,
4964
4966
  zi,
4967
+ xi,
4965
4968
  Xi,
4966
4969
  Zi,
4967
4970
  Yi
@@ -5121,7 +5124,7 @@ const on = {
5121
5124
  makeWrap(t, e) {
5122
5125
  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;
5123
5126
  delete r.wrap.class, delete r.wrap.title;
5124
- const f = Z(r.wrap.show) ? e : this.$r(Y([r.wrap, {
5127
+ const f = (h.Undef(r.wrap.show) ? !t.input : Z(r.wrap.show)) ? e : this.$r(Y([r.wrap, {
5125
5128
  props: q(v({
5126
5129
  labelWidth: o === void 0 ? o : Et(o),
5127
5130
  label: n ? r.title.title : void 0
@@ -5387,7 +5390,7 @@ function hn(t, e) {
5387
5390
  }
5388
5391
  };
5389
5392
  }
5390
- const xt = {
5393
+ const zt = {
5391
5394
  name: "required",
5392
5395
  load(t, e, r) {
5393
5396
  const i = dn(t.getValue());
@@ -5416,7 +5419,7 @@ const xt = {
5416
5419
  r.sync(e);
5417
5420
  },
5418
5421
  watch(...t) {
5419
- xt.load(...t);
5422
+ zt.load(...t);
5420
5423
  }
5421
5424
  };
5422
5425
  function dn(t) {
@@ -5425,7 +5428,7 @@ function dn(t) {
5425
5428
  function pn(t) {
5426
5429
  t.componentAlias(tn), Kr.forEach((e) => {
5427
5430
  t.component(e.name, e);
5428
- }), t.register(xt), en.forEach((e) => {
5431
+ }), t.register(zt), en.forEach((e) => {
5429
5432
  t.parser(e);
5430
5433
  }), Object.keys(de).forEach((e) => {
5431
5434
  t.maker[e] = de[e];
@@ -5434,7 +5437,7 @@ function pn(t) {
5434
5437
  function mn() {
5435
5438
  return Wt({
5436
5439
  ui: "element-ui",
5437
- version: "2.7.22",
5440
+ version: "2.7.23",
5438
5441
  manager: on,
5439
5442
  extendApi: hn,
5440
5443
  install: pn,