@form-create/view-design 2.7.20 → 2.7.22

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.20
3
+ * @form-create/view-design v2.7.22
4
4
  * (c) 2018-2025 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
@@ -18,8 +18,8 @@ var lt = (t, e, r) => e in t ? or(t, e, { enumerable: !0, configurable: !0, writ
18
18
  for (var r of at(e))
19
19
  fr.call(e, r) && lt(t, r, e[r]);
20
20
  return t;
21
- }, q = (t, e) => ar(t, lr(e));
22
- import ye, { getCurrentInstance as cr, provide as hr, inject as dr, toRefs as ut, reactive as ie, onBeforeMount as pr, watch as T, onMounted as mr, onBeforeUnmount as gr, onUpdated as yr, nextTick as V, markRaw as me, computed as ge, toRef as De, ref as $r } from "vue";
21
+ }, U = (t, e) => ar(t, lr(e));
22
+ import $e, { getCurrentInstance as cr, provide as hr, inject as dr, toRefs as ut, reactive as ie, onBeforeMount as pr, watch as T, onMounted as mr, onBeforeUnmount as gr, onUpdated as yr, nextTick as V, markRaw as ge, computed as ye, toRef as De, ref as $r } from "vue";
23
23
  function br(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
@@ -49,13 +49,13 @@ var vr = ["attrs", "props", "domProps"], _r = ["class", "style", "directives"],
49
49
  return function() {
50
50
  t && t.apply(this, arguments), e && e.apply(this, arguments);
51
51
  };
52
- }, Fr = wr;
53
- const D = /* @__PURE__ */ br(Fr);
52
+ }, kr = wr;
53
+ const D = /* @__PURE__ */ br(kr);
54
54
  function Ve(t, e) {
55
55
  return Object.keys(t).reduce((r, i) => ((!e || e.indexOf(i) === -1) && r.push(t[i]), r), []);
56
56
  }
57
- const kr = "fcCheckbox", Sr = {
58
- name: kr,
57
+ const Fr = "fcCheckbox", Sr = {
58
+ name: Fr,
59
59
  props: {
60
60
  formCreateInject: {
61
61
  type: Object,
@@ -127,7 +127,7 @@ function H(t) {
127
127
  return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
128
128
  }
129
129
  const Rr = "fcFrame";
130
- function kt(t) {
130
+ function Ft(t) {
131
131
  return {
132
132
  name: Rr,
133
133
  props: {
@@ -503,11 +503,11 @@ function kt(t) {
503
503
  }
504
504
  };
505
505
  }
506
- const St = kt({
506
+ const St = Ft({
507
507
  fileIcon: "md-document",
508
508
  fileUpIcon: "ios-folder-open"
509
509
  });
510
- St.v2 = kt({
510
+ St.v2 = Ft({
511
511
  fileIcon: "document-text",
512
512
  fileUpIcon: "folder"
513
513
  });
@@ -702,7 +702,7 @@ function ft(t) {
702
702
  };
703
703
  }
704
704
  function ct(t) {
705
- return q(_({}, t), {
705
+ return U(_({}, t), {
706
706
  file: t,
707
707
  value: t
708
708
  });
@@ -915,13 +915,13 @@ Et.v2 = Rt({
915
915
  fileIcon: "document-text",
916
916
  imgUpIcon: "image"
917
917
  });
918
- function F(t, e, r) {
919
- ye.set(t, e, r);
918
+ function k(t, e, r) {
919
+ $e.set(t, e, r);
920
920
  }
921
921
  function re(t, e) {
922
- (ye.del || ye.delete)(t, e);
922
+ ($e.del || $e.delete)(t, e);
923
923
  }
924
- function we(t, e = {}, r) {
924
+ function Oe(t, e = {}, r) {
925
925
  let i = !1;
926
926
  for (let s in e)
927
927
  if (Object.prototype.hasOwnProperty.call(e, s)) {
@@ -929,29 +929,29 @@ function we(t, e = {}, r) {
929
929
  if ((i = Array.isArray(n)) || h.Object(n)) {
930
930
  let o = t[s] === void 0;
931
931
  if (i)
932
- i = !1, o && F(t, s, []);
932
+ i = !1, o && k(t, s, []);
933
933
  else if (n._clone && r !== void 0)
934
934
  if (r)
935
- n = n.getRule(), o && F(t, s, {});
935
+ n = n.getRule(), o && k(t, s, {});
936
936
  else {
937
- F(t, s, n._clone());
937
+ k(t, s, n._clone());
938
938
  continue;
939
939
  }
940
940
  else
941
- o && F(t, s, {});
942
- t[s] = we(t[s], n, r);
941
+ o && k(t, s, {});
942
+ t[s] = Oe(t[s], n, r);
943
943
  } else
944
- F(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
944
+ 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));
945
945
  }
946
946
  return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
947
947
  }
948
948
  function G(t) {
949
- return we({}, { value: t }).value;
949
+ return Oe({}, { value: t }).value;
950
950
  }
951
951
  const Br = Object.assign || function(t) {
952
952
  for (let e, r = 1; r < arguments.length; r++)
953
953
  for (let i in e = arguments[r], e)
954
- Object.prototype.hasOwnProperty.call(e, i) && F(t, i, e[i]);
954
+ Object.prototype.hasOwnProperty.call(e, i) && k(t, i, e[i]);
955
955
  return t;
956
956
  };
957
957
  function C() {
@@ -975,7 +975,7 @@ function Nr(t) {
975
975
  function Ae(t) {
976
976
  return Nr(t) ? t : Promise.resolve(t);
977
977
  }
978
- function $e(t) {
978
+ function be(t) {
979
979
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
980
980
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
981
981
  }
@@ -992,8 +992,8 @@ function qr(t) {
992
992
  Ye(t.toString()), console.error(t);
993
993
  }
994
994
  const Ke = "[[FORM-CREATE-PREFIX-", Xe = "-FORM-CREATE-SUFFIX]]";
995
- function Ce(t, e) {
996
- return JSON.stringify(we(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
995
+ function we(t, e) {
996
+ return JSON.stringify(Oe(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
997
997
  if (!(i && i._isVue === !0)) {
998
998
  if (typeof i != "function")
999
999
  return i;
@@ -1061,8 +1061,8 @@ function Pe() {
1061
1061
  function se(t, e, r) {
1062
1062
  let i = t, s;
1063
1063
  return (e || "").split(".").forEach((n) => {
1064
- s && ((!i[s] || typeof i[s] != "object") && F(i, s, {}), i = i[s]), s = n;
1065
- }), F(i, s, r), i;
1064
+ s && ((!i[s] || typeof i[s] != "object") && k(i, s, {}), i = i[s]), s = n;
1065
+ }), k(i, s, r), i;
1066
1066
  }
1067
1067
  const Gr = "fcGroup", Hr = {
1068
1068
  name: Gr,
@@ -1146,7 +1146,7 @@ const Gr = "fcGroup", Hr = {
1146
1146
  const s = i.$f.formData();
1147
1147
  if (t === e)
1148
1148
  i.$f.deferSyncValue(() => {
1149
- we(i.rule, t), i.$f.setValue(s);
1149
+ Oe(i.rule, t), i.$f.setValue(s);
1150
1150
  }, !0);
1151
1151
  else {
1152
1152
  const n = i.$f.formData();
@@ -1513,7 +1513,7 @@ function Bt(t, e) {
1513
1513
  return Tt([t], e || !1)[0];
1514
1514
  }
1515
1515
  function Tt(t, e) {
1516
- return we([], [...t], e || !1);
1516
+ return Oe([], [...t], e || !1);
1517
1517
  }
1518
1518
  function Q(t, e) {
1519
1519
  return x(Array.isArray(e) ? e : [e], t, { array: et, normal: tt }), t;
@@ -1562,7 +1562,7 @@ function Zr(t, e) {
1562
1562
  } else
1563
1563
  return xe(t, e);
1564
1564
  }
1565
- function Se() {
1565
+ function Re() {
1566
1566
  const t = {}, e = (r) => r || "default";
1567
1567
  return {
1568
1568
  setSlot(r, i) {
@@ -1598,12 +1598,12 @@ function Se() {
1598
1598
  }
1599
1599
  };
1600
1600
  }
1601
- function Re(t, e) {
1601
+ function Ee(t, e) {
1602
1602
  return Object.setPrototypeOf(t, e), t;
1603
1603
  }
1604
- const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
1604
+ const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, he = {
1605
1605
  "==": (t, e) => JSON.stringify(t) === JSON.stringify(dt(t, e)),
1606
- "!=": (t, e) => !ce["=="](t, e),
1606
+ "!=": (t, e) => !he["=="](t, e),
1607
1607
  ">": (t, e) => t > e,
1608
1608
  ">=": (t, e) => t >= e,
1609
1609
  "<": (t, e) => t < e,
@@ -1612,13 +1612,13 @@ const dt = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1612
1612
  return t && t.indexOf && t.indexOf(dt(t[0], e)) > -1;
1613
1613
  },
1614
1614
  notOn(t, e) {
1615
- return !ce.on(t, e);
1615
+ return !he.on(t, e);
1616
1616
  },
1617
1617
  in(t, e) {
1618
1618
  return e && e.indexOf && e.indexOf(t) > -1;
1619
1619
  },
1620
1620
  notIn(t, e) {
1621
- return !ce.in(t, e);
1621
+ return !he.in(t, e);
1622
1622
  },
1623
1623
  between(t, e) {
1624
1624
  return t > e[0] && t < e[1];
@@ -1667,12 +1667,12 @@ function Mt(t) {
1667
1667
  }
1668
1668
  return r && e.push({ type: "key", value: r }), e.map((s) => s.type === "key" ? { key: s.value } : { children: s.value });
1669
1669
  }
1670
- const Ee = (t, e) => {
1670
+ const je = (t, e) => {
1671
1671
  if (!(!t || t === e || !t.$props)) {
1672
1672
  if (t.$props.formCreateInject)
1673
1673
  return t.$props.formCreateInject;
1674
1674
  if (t.$parent)
1675
- return Ee(t.$parent, e);
1675
+ return je(t.$parent, e);
1676
1676
  }
1677
1677
  };
1678
1678
  function Qr(t, e, r) {
@@ -1743,86 +1743,86 @@ function Qr(t, e, r) {
1743
1743
  unique: 1,
1744
1744
  renderRule: [...l.value || []],
1745
1745
  updateValue: JSON.stringify(u.value || {})
1746
- }), g = new t(n), y = g.api(), v = p.value, E = () => {
1746
+ }), m = new t(n), y = m.api(), v = p.value, E = () => {
1747
1747
  if (o) {
1748
- const k = Ee(n, o);
1749
- if (k) {
1750
- let S;
1751
- v ? (S = H(k.getSubForm()), S.push(y)) : S = y, k.subForm(S);
1748
+ const F = je(n, o);
1749
+ if (F) {
1750
+ let R;
1751
+ v ? (R = H(F.getSubForm()), R.push(y)) : R = y, F.subForm(R);
1752
1752
  }
1753
1753
  }
1754
1754
  }, Y = () => {
1755
- const k = Ee(n, o);
1756
- if (k)
1755
+ const F = je(n, o);
1756
+ if (F)
1757
1757
  if (v) {
1758
- const S = H(k.getSubForm()), N = S.indexOf(y);
1759
- N > -1 && S.splice(N, 1);
1758
+ const R = H(F.getSubForm()), N = R.indexOf(y);
1759
+ N > -1 && R.splice(N, 1);
1760
1760
  } else
1761
- k.subForm();
1761
+ F.subForm();
1762
1762
  };
1763
1763
  let I = null;
1764
1764
  pr(() => {
1765
1765
  T(() => {
1766
- let k = "";
1767
- const S = s.option && s.option.globalClass || {};
1768
- Object.keys(S).forEach((N) => {
1769
- let pe = "";
1770
- S[N].style && Object.keys(S[N].style).forEach((z) => {
1771
- pe += $e(z) + ":" + S[N].style[z] + ";";
1772
- }), S[N].content && (pe += S[N].content + ";"), pe && (k += `.${N}{${pe}}`);
1773
- }), 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 || "";
1766
+ let F = "";
1767
+ const R = s.option && s.option.globalClass || {};
1768
+ Object.keys(R).forEach((N) => {
1769
+ let me = "";
1770
+ R[N].style && Object.keys(R[N].style).forEach((z) => {
1771
+ me += be(z) + ":" + R[N].style[z] + ";";
1772
+ }), R[N].content && (me += R[N].content + ";"), me && (F += `.${N}{${me}}`);
1773
+ }), s.option && s.option.style && (F += s.option.style), I || (I = document.createElement("style"), I.type = "text/css", document.head.appendChild(I)), I.innerHTML = F || "";
1774
1774
  }, () => {
1775
1775
  });
1776
1776
  });
1777
1777
  const B = ne(() => {
1778
- g.bus.$emit("$loadData.$topForm");
1779
- }, 100), he = ne(function() {
1780
- g.bus.$emit("$loadData.$scopeForm");
1778
+ m.bus.$emit("$loadData.$topForm");
1779
+ }, 100), de = ne(function() {
1780
+ m.bus.$emit("$loadData.$scopeForm");
1781
1781
  }, 100), Le = ne(() => {
1782
- g.bus.$emit("$loadData.$form");
1783
- }, 100), de = (k) => {
1784
- g.bus.$emit("change-$form." + k);
1782
+ m.bus.$emit("$loadData.$form");
1783
+ }, 100), pe = (F) => {
1784
+ m.bus.$emit("change-$form." + F);
1785
1785
  };
1786
1786
  return mr(() => {
1787
- o && (y.top.bus.$on("$loadData.$form", B), y.top.bus.$on("change", de)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
1787
+ o && (y.top.bus.$on("$loadData.$form", B), y.top.bus.$on("change", pe)), y !== y.scope && y.scope.bus.$on("$loadData.$scopeForm", de), m.mounted();
1788
1788
  }), gr(() => {
1789
- o && (y.top.bus.$off("$loadData.$form", B), y.top.bus.$off("change", de)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", he), Y(), d.destroyed = !0, g.unmount(), I && (I.parentNode || I.parentElement) && document.head.removeChild(I);
1789
+ o && (y.top.bus.$off("$loadData.$form", B), y.top.bus.$off("change", pe)), y !== y.scope && y.scope.bus.$off("$loadData.$scopeForm", de), Y(), d.destroyed = !0, m.unmount(), I && (I.parentNode || I.parentElement) && document.head.removeChild(I);
1790
1790
  }), yr(() => {
1791
- g.updated();
1792
- }), T(f, (k) => {
1793
- k ? E() : Y();
1791
+ m.updated();
1792
+ }), T(f, (F) => {
1793
+ F ? E() : Y();
1794
1794
  }, { immediate: !0 }), T(() => s.option, () => {
1795
- g.initOptions(), y.refresh();
1796
- }, { deep: !0, flush: "sync" }), T(() => [...l.value], (k) => {
1797
- g.$handle.isBreakWatch() || k.length === d.renderRule.length && k.every((S) => d.renderRule.indexOf(S) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1795
+ m.initOptions(), y.refresh();
1796
+ }, { deep: !0, flush: "sync" }), T(() => [...l.value], (F) => {
1797
+ m.$handle.isBreakWatch() || F.length === d.renderRule.length && F.every((R) => d.renderRule.indexOf(R) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
1798
1798
  }), T(() => [s.disabled, s.preview], () => {
1799
1799
  y.refresh();
1800
- }), T(u, (k) => {
1801
- Ce(k || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(k || {}) : y.setValue(k || {}));
1800
+ }), T(u, (F) => {
1801
+ we(F || {}) !== d.updateValue && (y.config.forceCoverValue ? y.coverValue(F || {}) : y.setValue(F || {}));
1802
1802
  }, { deep: !0, flush: "post" }), T(() => s.index, () => {
1803
- y.coverValue({}), g.$handle.updateAppendData(), V(() => {
1803
+ y.coverValue({}), m.$handle.updateAppendData(), V(() => {
1804
1804
  V(() => {
1805
1805
  y.clearValidateState();
1806
1806
  });
1807
1807
  });
1808
- }, { flush: "sync" }), q(_({
1809
- fc: me(g),
1810
- parent: o && me(o),
1811
- top: me(a),
1812
- fapi: me(y)
1808
+ }, { flush: "sync" }), U(_({
1809
+ fc: ge(m),
1810
+ parent: o && ge(o),
1811
+ top: ge(a),
1812
+ fapi: ge(y)
1813
1813
  }, ut(d)), {
1814
- getGroupInject: () => Ee(n, o),
1814
+ getGroupInject: () => je(n, o),
1815
1815
  refresh() {
1816
1816
  ++d.unique;
1817
1817
  },
1818
1818
  renderRule() {
1819
1819
  d.renderRule = [...l.value || []];
1820
1820
  },
1821
- updateValue(k) {
1821
+ updateValue(F) {
1822
1822
  if (d.destroyed) return;
1823
- const S = Ce(k);
1824
- d.updateValue !== S && (d.updateValue = S, n.$emit("update:value", k), V(() => {
1825
- Le(), o ? f.value || he() : (B(), he());
1823
+ const R = we(F);
1824
+ d.updateValue !== R && (d.updateValue = R, n.$emit("update:value", F), V(() => {
1825
+ Le(), o ? f.value || de() : (B(), de());
1826
1826
  }));
1827
1827
  }
1828
1828
  });
@@ -1858,7 +1858,7 @@ C(rt.prototype, {
1858
1858
  return this._data;
1859
1859
  },
1860
1860
  setProp(t, e) {
1861
- return F(this._data, t, e), this;
1861
+ return k(this._data, t, e), this;
1862
1862
  },
1863
1863
  _clone() {
1864
1864
  const t = new this.constructor();
@@ -1933,7 +1933,7 @@ function Ht(t) {
1933
1933
  }
1934
1934
  function yt(t, e, r) {
1935
1935
  return new Promise((i, s) => {
1936
- (e || Ht)(q(_({}, t), {
1936
+ (e || Ht)(U(_({}, t), {
1937
1937
  onSuccess(n) {
1938
1938
  let o = (l) => l;
1939
1939
  const a = W(t.parse);
@@ -1958,7 +1958,7 @@ function ri(t) {
1958
1958
  h.Undef(n) ? n = Object.keys(_(_({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1959
1959
  const u = t.fieldCtx[l] || t.nameCtx[l];
1960
1960
  u && u.forEach((f) => {
1961
- F(f.rule, o, a), t.$render.clearCache(f);
1961
+ k(f.rule, o, a), t.$render.clearCache(f);
1962
1962
  });
1963
1963
  });
1964
1964
  }
@@ -2051,7 +2051,7 @@ function ri(t) {
2051
2051
  if (l) {
2052
2052
  const u = j(n, a);
2053
2053
  l.forEach((f) => {
2054
- F(f.rule, "value", u ? n[a] : void 0);
2054
+ k(f.rule, "value", u ? n[a] : void 0);
2055
2055
  }), delete o[a];
2056
2056
  }
2057
2057
  }), C(t.appendData, o);
@@ -2064,7 +2064,7 @@ function ri(t) {
2064
2064
  const l = t.fieldCtx[a];
2065
2065
  if (!l) return t.appendData[a] = o[a];
2066
2066
  l.forEach((u) => {
2067
- F(u.rule, "value", o[a]);
2067
+ k(u.rule, "value", o[a]);
2068
2068
  });
2069
2069
  });
2070
2070
  }, !0);
@@ -2128,7 +2128,7 @@ function ri(t) {
2128
2128
  disabled(n, o) {
2129
2129
  e(o).forEach((a) => {
2130
2130
  t.getCtxs(a).forEach((l) => {
2131
- F(l.rule.props, "disabled", !!n);
2131
+ k(l.rule.props, "disabled", !!n);
2132
2132
  });
2133
2133
  }), t.refresh();
2134
2134
  },
@@ -2186,7 +2186,7 @@ function ri(t) {
2186
2186
  t.$manager.updateOptions(t.options), s.refresh();
2187
2187
  },
2188
2188
  hideForm: (n) => {
2189
- F(t.vm, "isShow", !n);
2189
+ k(t.vm, "isShow", !n);
2190
2190
  },
2191
2191
  changeStatus: () => t.changeStatus,
2192
2192
  clearChangeStatus: () => {
@@ -2245,7 +2245,7 @@ function ri(t) {
2245
2245
  },
2246
2246
  setEffect(n, o, a) {
2247
2247
  const l = t.getCtx(n);
2248
- l && o && (o[0] === "$" && (o = o.substr(1)), j(l.rule, "$" + o) && F(l.rule, "$" + o, a), j(l.rule, "effect") || F(l.rule, "effect", {}), F(l.rule.effect, o, a));
2248
+ 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));
2249
2249
  },
2250
2250
  clearEffectData(n, o) {
2251
2251
  const a = t.getCtx(n);
@@ -2285,7 +2285,7 @@ function ri(t) {
2285
2285
  return O(() => s.method(n, o)(...a));
2286
2286
  },
2287
2287
  toJson(n) {
2288
- return Ce(s.rule, n);
2288
+ return we(s.rule, n);
2289
2289
  },
2290
2290
  trigger(n, o, ...a) {
2291
2291
  const l = s.el(n);
@@ -2332,7 +2332,7 @@ function ri(t) {
2332
2332
  const l = s.getChildrenRuleList(n);
2333
2333
  t.deferSyncValue(() => {
2334
2334
  l.forEach((u) => {
2335
- j(o, u.field) ? F(u, "value", o[u.field]) : a && F(u, "value", void 0);
2335
+ j(o, u.field) ? k(u, "value", o[u.field]) : a && k(u, "value", void 0);
2336
2336
  });
2337
2337
  });
2338
2338
  },
@@ -2349,6 +2349,13 @@ function ri(t) {
2349
2349
  }).catch(a) : o(l.data) : o(t.fc.loadData[n]);
2350
2350
  });
2351
2351
  },
2352
+ emitGlobalEvent(n, ...o) {
2353
+ const a = s.getGlobalEvent(n);
2354
+ if (a) {
2355
+ const l = t.getInjectData({}, void 0);
2356
+ return l.args = [...o], o.unshift(l), a.apply(null, o);
2357
+ }
2358
+ },
2352
2359
  setGlobalData(n, o) {
2353
2360
  s.setData("$globalData." + n, o);
2354
2361
  },
@@ -2382,22 +2389,32 @@ function ri(t) {
2382
2389
  },
2383
2390
  fetch(n) {
2384
2391
  return new Promise((o, a) => {
2385
- n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((l) => {
2386
- O(() => n.onSuccess && n.onSuccess(l)), o(l);
2387
- }).catch((l) => {
2388
- O(() => n.onError && n.onError(l)), a(l);
2389
- })).catch((l) => {
2392
+ n = G(n), n = t.loadFetchVar(n);
2393
+ const l = (u) => {
2394
+ O(() => n.onError && n.onError(u)), a(u);
2395
+ };
2396
+ t.beforeFetch(n).then(() => yt(n, t.fc.create.fetch, s).then((u) => {
2397
+ O(() => n.onSuccess && n.onSuccess(u)), o(u);
2398
+ }).catch((u) => {
2399
+ l(u);
2400
+ })).catch((u) => {
2401
+ l(u);
2390
2402
  });
2391
2403
  });
2392
2404
  },
2393
2405
  watchFetch(n, o, a, l) {
2394
2406
  return t.fc.watchLoadData((u, f) => {
2395
2407
  let p = G(n);
2396
- p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((d) => {
2397
- O(() => p.onSuccess && p.onSuccess(d)), o && o(d, f);
2398
- }).catch((d) => {
2399
- O(() => p.onError && p.onError(d)), a && a(d);
2400
- })).catch((d) => {
2408
+ p = t.loadFetchVar(p, u);
2409
+ const d = (m) => {
2410
+ O(() => p.onError && p.onError(m)), a && a(m);
2411
+ };
2412
+ l && l(p, f) === !1 || t.beforeFetch(p).then(() => yt(p, t.fc.create.fetch, s).then((m) => {
2413
+ O(() => p.onSuccess && p.onSuccess(m)), o && o(m, f);
2414
+ }).catch((m) => {
2415
+ d(m);
2416
+ })).catch((m) => {
2417
+ d(m);
2401
2418
  });
2402
2419
  }, n.wait == null ? 1e3 : n.wait);
2403
2420
  },
@@ -2459,7 +2476,7 @@ function ii(t) {
2459
2476
  }
2460
2477
  });
2461
2478
  }
2462
- function U(t) {
2479
+ function q(t) {
2463
2480
  const e = t.replace(/(-[a-z])/g, function(r) {
2464
2481
  return r.replace("-", "").toLocaleUpperCase();
2465
2482
  });
@@ -2477,7 +2494,7 @@ function ni(t) {
2477
2494
  const r = (i) => {
2478
2495
  if (i) {
2479
2496
  let s;
2480
- 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);
2497
+ 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);
2481
2498
  }
2482
2499
  };
2483
2500
  return r(this.vm);
@@ -2486,7 +2503,7 @@ function ni(t) {
2486
2503
  if (!this.vm.isShow)
2487
2504
  return;
2488
2505
  this.$manager.beforeRender();
2489
- const e = Se();
2506
+ const e = Re();
2490
2507
  return this.sort.forEach((r) => {
2491
2508
  this.renderSlot(e, this.$handle.ctxs[r]);
2492
2509
  }), this.$manager.render(e);
@@ -2497,7 +2514,7 @@ function ni(t) {
2497
2514
  })) : e.setSlot(r.rule.slot, this.renderCtx(r, i));
2498
2515
  },
2499
2516
  mergeGlobal(e) {
2500
- this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = ge(() => {
2517
+ this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = ye(() => {
2501
2518
  const i = this.$handle.options.global;
2502
2519
  return Q({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
2503
2520
  })), e.prop = Q({}, [this.cacheConfig[e.trueType].value, e.prop]));
@@ -2562,8 +2579,8 @@ function ni(t) {
2562
2579
  })()));
2563
2580
  });
2564
2581
  const d = this.getTypeSlot(e);
2565
- let g;
2566
- return d ? (u.children = f, g = d(u)) : g = a ? e.parser.preview(We(f), e) : e.parser.render(We(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map((y) => !y || !y.tag ? y : this.none(y)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2582
+ let m;
2583
+ 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;
2567
2584
  }, this.setCache(e, s, r);
2568
2585
  }
2569
2586
  return (...s) => {
@@ -2605,7 +2622,7 @@ function ni(t) {
2605
2622
  },
2606
2623
  injectProp(e) {
2607
2624
  const r = this.vm;
2608
- r.ctxInject[e.id] || F(r.ctxInject, e.id, {
2625
+ r.ctxInject[e.id] || k(r.ctxInject, e.id, {
2609
2626
  api: this.$handle.api,
2610
2627
  form: this.fc.create,
2611
2628
  subForm: (n) => {
@@ -2636,7 +2653,7 @@ function ni(t) {
2636
2653
  children: e.loadChildrenPending()
2637
2654
  };
2638
2655
  return Object.keys(s).forEach((n) => {
2639
- F(i, n, s[n]);
2656
+ k(i, n, s[n]);
2640
2657
  }), i;
2641
2658
  },
2642
2659
  ctxProp(e) {
@@ -2647,7 +2664,7 @@ function ni(t) {
2647
2664
  if (l.indexOf("native.") === 0)
2648
2665
  o[l.replace("native.", "")] = n[l], delete n[l];
2649
2666
  else if (this.$handle.options.transformEventName !== !1) {
2650
- const u = $e(l);
2667
+ const u = be(l);
2651
2668
  u !== l.toLowerCase() && !n[u] && (n[u] = n[l]);
2652
2669
  }
2653
2670
  }), e.prop.on = n;
@@ -2703,7 +2720,7 @@ function ni(t) {
2703
2720
  },
2704
2721
  renderChildren(e, r, i) {
2705
2722
  if (!h.trueArray(e)) return [];
2706
- const s = Se();
2723
+ const s = Re();
2707
2724
  return e.map((n) => {
2708
2725
  if (n) {
2709
2726
  if (h.String(n) || h.Number(n)) return s.setSlot(null, i ? this.renderRule({
@@ -2729,7 +2746,7 @@ function ni(t) {
2729
2746
  },
2730
2747
  createRuleVnode(e, r, i) {
2731
2748
  this.force = i !== !1, this.tmpInput = r;
2732
- const s = Se();
2749
+ const s = Re();
2733
2750
  return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
2734
2751
  },
2735
2752
  renderRule(e, r, i) {
@@ -2739,12 +2756,12 @@ function ni(t) {
2739
2756
  if (i)
2740
2757
  s = e.type;
2741
2758
  else if (s = e.is, e.type) {
2742
- s = U(e.type);
2759
+ s = q(e.type);
2743
2760
  const a = this.vNode.aliasMap[s];
2744
- a && (s = U(a));
2761
+ a && (s = q(a));
2745
2762
  }
2746
2763
  if (!s) return;
2747
- const n = Se();
2764
+ const n = Re();
2748
2765
  h.trueArray(e.children) && e.children.forEach((a) => {
2749
2766
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2750
2767
  });
@@ -2805,8 +2822,8 @@ function oi(t) {
2805
2822
  let p, d = n || o || a;
2806
2823
  if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
2807
2824
  r || (d = `native-${d}`);
2808
- const g = $e(`${d}-${f}`), y = (...v) => {
2809
- this.vm.$emit(g, ...v), this.vm.$emit("emit-event", g, ...v), this.bus.$emit(g, ...v);
2825
+ const m = be(`${d}-${f}`), y = (...v) => {
2826
+ this.vm.$emit(m, ...v), this.vm.$emit("emit-event", m, ...v), this.bus.$emit(m, ...v);
2810
2827
  };
2811
2828
  if (y.__emit = !0, !p && l === !1)
2812
2829
  i[f] = y;
@@ -2858,16 +2875,16 @@ function oi(t) {
2858
2875
  d.key ? f.push(d.key) : d.children && f.push(a(d.children));
2859
2876
  });
2860
2877
  let p = !1;
2861
- return f.forEach((d, g) => {
2862
- d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[g] = d.slice(1, -1), p = !0);
2878
+ return f.forEach((d, m) => {
2879
+ d != null && (d.indexOf("'") === 0 || d.indexOf('"') === 0) && (f[m] = d.slice(1, -1), p = !0);
2863
2880
  }), f.length === 1 && (p || !isNaN(Number(f[0]))) ? f[0] : o(f.join("."));
2864
2881
  };
2865
2882
  let l;
2866
2883
  if (n.forEach((u) => {
2867
2884
  const f = u.split("||"), p = f[0].trim();
2868
2885
  if (p) {
2869
- const d = (f[1] || "").trim(), g = Mt(p);
2870
- let y = O(() => a(g));
2886
+ const d = (f[1] || "").trim(), m = Mt(p);
2887
+ let y = O(() => a(m));
2871
2888
  (y == null || y === "") && f.length > 1 && (y = d), l = y, e = e.replaceAll(`{{${u}}}`, y == null ? "" : y);
2872
2889
  }
2873
2890
  }), n.length === 1 && s === `{{${n[0]}}}`)
@@ -2931,9 +2948,9 @@ function ui(t) {
2931
2948
  }
2932
2949
  function fi(t) {
2933
2950
  Object.defineProperties(t.origin, {
2934
- __fc__: Ze(me(t), !0)
2951
+ __fc__: Ze(ge(t), !0)
2935
2952
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2936
- __fc__: Ze(me(t), !0)
2953
+ __fc__: Ze(ge(t), !0)
2937
2954
  });
2938
2955
  }
2939
2956
  function Jt(t, e, r) {
@@ -3039,7 +3056,7 @@ C(Jt.prototype, {
3039
3056
  this.key = Pe(), t && this.parent && this.parent.updateKey(t);
3040
3057
  },
3041
3058
  updateType() {
3042
- this.originType = this.rule.type, this.type = U(this.rule.type), this.trueType = this.$handle.getType(this.originType);
3059
+ this.originType = this.rule.type, this.type = q(this.rule.type), this.trueType = this.$handle.getType(this.originType);
3043
3060
  },
3044
3061
  setParser(t) {
3045
3062
  this.parser = t, t.init(this);
@@ -3180,23 +3197,23 @@ function ci(t) {
3180
3197
  let l = ht(o);
3181
3198
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3182
3199
  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);
3183
- let f, p = !1, d = !!o.__fc__, g = l.value;
3200
+ let f, p = !1, d = !!o.__fc__, m = l.value;
3184
3201
  if (d) {
3185
- if (f = o.__fc__, g = f.defaultValue, f.deleted) {
3202
+ if (f = o.__fc__, m = f.defaultValue, f.deleted) {
3186
3203
  if (bt(f))
3187
3204
  return;
3188
3205
  f.update(this);
3189
3206
  } else if (!f.check(this)) {
3190
3207
  if (bt(f))
3191
3208
  return;
3192
- e[a] = o = o._clone ? o._clone() : Dt(Ce(o)), f = null, p = !0;
3209
+ e[a] = o = o._clone ? o._clone() : Dt(we(o)), f = null, p = !0;
3193
3210
  }
3194
3211
  }
3195
3212
  if (f)
3196
3213
  f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
3197
3214
  else {
3198
3215
  const E = this.parseRule(o);
3199
- f = new Jt(this, E, g), this.bindParser(f);
3216
+ f = new Jt(this, E, m), this.bindParser(f);
3200
3217
  }
3201
3218
  [!1, !0].forEach((E) => this.parseEmit(f, E)), 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");
3202
3219
  const y = f.loadChildrenPending();
@@ -3219,10 +3236,10 @@ function ci(t) {
3219
3236
  if (!r.length) return !1;
3220
3237
  for (let a = 0; a < r.length; a++) {
3221
3238
  const l = r[a], u = l.handle || function(p) {
3222
- return (ce[l.condition || "=="] || ce["=="])(p, l.value);
3239
+ return (he[l.condition || "=="] || he["=="])(p, l.value);
3223
3240
  };
3224
3241
  if (!h.trueArray(l.rule)) continue;
3225
- const f = q(_({}, l), {
3242
+ const f = U(_({}, l), {
3226
3243
  valid: O(() => u(e.rule.value, s)),
3227
3244
  ctrl: pi(e, l.rule),
3228
3245
  isHidden: h.String(l.rule[0])
@@ -3233,13 +3250,13 @@ function ci(t) {
3233
3250
  const n = [];
3234
3251
  let o = !1;
3235
3252
  return this.deferSyncValue(() => {
3236
- i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl: g, method: y }) => {
3253
+ i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: d, ctrl: m, method: y }) => {
3237
3254
  if (a) {
3238
3255
  l ? e.ctrlRule.push({
3239
3256
  __ctrl: !0,
3240
3257
  children: u,
3241
3258
  valid: l
3242
- }) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3259
+ }) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3243
3260
  y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((v) => {
3244
3261
  this.api.setEffect(v, "required", l);
3245
3262
  }), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
@@ -3258,8 +3275,8 @@ function ci(t) {
3258
3275
  f ? s.prepend(v, f, d) : p || d ? s.append(v, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, v);
3259
3276
  });
3260
3277
  } else {
3261
- e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
3262
- const v = Z(g);
3278
+ e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
3279
+ const v = Z(m);
3263
3280
  v && v.rm();
3264
3281
  }
3265
3282
  });
@@ -3290,7 +3307,7 @@ function ci(t) {
3290
3307
  function hi(t) {
3291
3308
  const e = qt();
3292
3309
  return Object.keys(e).forEach((r) => {
3293
- j(t, r) || F(t, r, e[r]);
3310
+ j(t, r) || k(t, r, e[r]);
3294
3311
  }), t;
3295
3312
  }
3296
3313
  function di(t) {
@@ -3340,7 +3357,7 @@ function mi(t) {
3340
3357
  setFormData(e, r) {
3341
3358
  e.modelValue = r;
3342
3359
  const i = e.getParentGroup();
3343
- i && (this.subRuleData[i.id] || F(this.subRuleData, i.id, {}), F(this.subRuleData[i.id], e.field, e.rule.value)), F(this.formData, e.id, r);
3360
+ 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);
3344
3361
  },
3345
3362
  rmSubRuleData(e) {
3346
3363
  const r = e.getParentGroup();
@@ -3413,7 +3430,7 @@ function mi(t) {
3413
3430
  function vt(t, e) {
3414
3431
  return typeof e == "function" ? "" + e : e;
3415
3432
  }
3416
- const je = {
3433
+ const Ce = {
3417
3434
  init(t) {
3418
3435
  },
3419
3436
  toFormValue(t, e) {
@@ -3464,18 +3481,18 @@ function yi(t) {
3464
3481
  getParser(e) {
3465
3482
  const r = this.fc.parsers, i = this.fc.renderDriver;
3466
3483
  if (i) {
3467
- const s = i.parsers || {}, n = s[e.originType] || s[U(e.type)] || s[e.trueType];
3484
+ const s = i.parsers || {}, n = s[e.originType] || s[q(e.type)] || s[e.trueType];
3468
3485
  if (n)
3469
3486
  return n;
3470
3487
  }
3471
- return r[e.originType] || r[U(e.type)] || r[e.trueType] || je;
3488
+ return r[e.originType] || r[q(e.type)] || r[e.trueType] || Ce;
3472
3489
  },
3473
3490
  bindParser(e) {
3474
3491
  e.setParser(this.getParser(e));
3475
3492
  },
3476
3493
  getType(e) {
3477
- const r = this.fc.CreateNode.aliasMap, i = r[e] || r[U(e)] || e;
3478
- return U(i);
3494
+ const r = this.fc.CreateNode.aliasMap, i = r[e] || r[q(e)] || e;
3495
+ return q(i);
3479
3496
  },
3480
3497
  noWatch(e) {
3481
3498
  this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
@@ -3503,21 +3520,21 @@ function yi(t) {
3503
3520
  this.$render.clearCache(e), this.refresh(), this.watching = !1;
3504
3521
  }
3505
3522
  }, { deep: !n, sync: n }));
3506
- }), e.refRule.__$title = ge(() => {
3523
+ }), e.refRule.__$title = ye(() => {
3507
3524
  let i = (typeof e.rule.title == "object" ? e.rule.title.title : e.rule.title) || "";
3508
3525
  if (i) {
3509
3526
  const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3510
3527
  s && (i = this.api.t(s[1]));
3511
3528
  }
3512
3529
  return i;
3513
- }), e.refRule.__$info = ge(() => {
3530
+ }), e.refRule.__$info = ye(() => {
3514
3531
  let i = (typeof e.rule.info == "object" ? e.rule.info.info : e.rule.info) || "";
3515
3532
  if (i) {
3516
3533
  const s = i.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3517
3534
  s && (i = this.api.t(s[1]));
3518
3535
  }
3519
3536
  return i;
3520
- }), e.refRule.__$validate = ge(() => {
3537
+ }), e.refRule.__$validate = ye(() => {
3521
3538
  const i = (s) => {
3522
3539
  var o, a;
3523
3540
  const n = s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
@@ -3558,7 +3575,7 @@ function yi(t) {
3558
3575
  this.bus.$once("load-end", () => {
3559
3576
  let i = e.rule.computed;
3560
3577
  i && (typeof i != "object" && (i = { value: i }), Object.keys(i).forEach((s) => {
3561
- const n = ge(() => {
3578
+ const n = ye(() => {
3562
3579
  const a = i[s];
3563
3580
  if (!a) return;
3564
3581
  const l = this.compute(e, a);
@@ -3697,15 +3714,15 @@ function yi(t) {
3697
3714
  let u = !0;
3698
3715
  for (let f = 0; f < a.group.length; f++) {
3699
3716
  const p = a.group[f];
3700
- let d, g = null, y = null;
3717
+ let d, m = null, y = null;
3701
3718
  if (p.variable)
3702
3719
  y = this.fc.getLoadData(p.variable);
3703
3720
  else if (p.field)
3704
- g = pt(p.field || "");
3721
+ m = pt(p.field || "");
3705
3722
  else if (!p.mode)
3706
3723
  return !0;
3707
3724
  let v = p.compare;
3708
- if (v && (v = pt(v || "")), 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}, ${v || "$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)
3725
+ if (v && (v = pt(v || "")), p.mode ? d = n(p) : he[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" : m}, ${v || "$val"}); }}}}`).call(this.api.form, he, 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)
3709
3726
  return !0;
3710
3727
  l || (u = u && d);
3711
3728
  }
@@ -3775,7 +3792,7 @@ function $i(t) {
3775
3792
  this.fc.targetFormDriver(e, this.api, this.fc), this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
3776
3793
  },
3777
3794
  emitEvent(e, ...r) {
3778
- const i = this.options[e] || this.options[U("on-" + e)];
3795
+ const i = this.options[e] || this.options[q("on-" + e)];
3779
3796
  if (i) {
3780
3797
  const s = W(i);
3781
3798
  h.Function(s) && O(() => s(...r));
@@ -3784,12 +3801,14 @@ function $i(t) {
3784
3801
  },
3785
3802
  targetHook(e, r, i) {
3786
3803
  var l, u, f, p;
3787
- let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, g) => {
3804
+ let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, m) => {
3788
3805
  d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
3789
- O(() => y(q(_({}, i || {}), {
3806
+ O(() => y(U(_({
3807
+ args: Object.values(i || {})
3808
+ }, i || {}), {
3790
3809
  self: e.rule,
3791
3810
  rule: e.rule,
3792
- parent: g == null ? void 0 : g.rule,
3811
+ parent: m == null ? void 0 : m.rule,
3793
3812
  $f: this.api,
3794
3813
  api: this.api,
3795
3814
  option: this.vm.$props.option
@@ -3876,7 +3895,7 @@ function bi(t) {
3876
3895
  else
3877
3896
  return;
3878
3897
  const d = _({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3879
- e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (g) => Q(d.getProp(), [g]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
3898
+ e && (d.getProp = () => e.effectData(u), d.clearProp = () => e.clearEffectData(u), d.mergeProp = (m) => Q(d.getProp(), [m]), d.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [d, r, this.api]);
3880
3899
  });
3881
3900
  }
3882
3901
  });
@@ -4001,7 +4020,7 @@ function Oi() {
4001
4020
  },
4002
4021
  make(r, i, s) {
4003
4022
  var n, o, a;
4004
- return (ye.isReservedTag ? ye.isReservedTag(r) : (o = (n = ye) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
4023
+ return ($e.isReservedTag ? $e.isReservedTag(r) : (o = (n = $e) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
4005
4024
  },
4006
4025
  makeComponent(r, i, s) {
4007
4026
  var a;
@@ -4024,7 +4043,7 @@ function Oi() {
4024
4043
  },
4025
4044
  use(r) {
4026
4045
  Object.keys(r).forEach((i) => {
4027
- const s = $e(i), n = Tr(i).toLocaleLowerCase(), o = r[i];
4046
+ const s = be(i), n = Tr(i).toLocaleLowerCase(), o = r[i];
4028
4047
  e.alias(i, o), [i, s, n].forEach((a) => {
4029
4048
  e.prototype[a] = function(l, u) {
4030
4049
  return this.make(t[i] || a, l, u);
@@ -4034,7 +4053,7 @@ function Oi() {
4034
4053
  }
4035
4054
  }), e;
4036
4055
  }
4037
- function Fi(t) {
4056
+ function ki(t) {
4038
4057
  class e extends Wt {
4039
4058
  }
4040
4059
  return Object.assign(e.prototype, t), e;
@@ -4100,7 +4119,7 @@ C(Wt.prototype, {
4100
4119
  render(t) {
4101
4120
  }
4102
4121
  });
4103
- const ki = function(t) {
4122
+ const Fi = function(t) {
4104
4123
  const e = {
4105
4124
  name: "loadData",
4106
4125
  _fn: [],
@@ -4113,10 +4132,10 @@ const ki = function(t) {
4113
4132
  let l = (p) => {
4114
4133
  let d;
4115
4134
  i && i.__fc__ && (d = i.__fc__.getParentGroup());
4116
- let g;
4117
- 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 = G(g));
4135
+ let m;
4136
+ 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));
4118
4137
  const y = a.modify ? i : r.getProp();
4119
- a.to === "child" ? y.children ? F(y.children, 0, g) : F(y, "children", [g]) : se(y, a.to || "options", g), s.sync(i);
4138
+ a.to === "child" ? y.children ? k(y.children, 0, m) : k(y, "children", [m]) : se(y, a.to || "options", m), s.sync(i);
4120
4139
  }, u = (p) => l(p);
4121
4140
  const f = t.watchLoadData(u);
4122
4141
  l = ne(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
@@ -4143,11 +4162,11 @@ const ki = function(t) {
4143
4162
  const l = n[a];
4144
4163
  if (l) {
4145
4164
  const u = typeof l == "object";
4146
- let f = (g) => {
4147
- let y = t.t(u ? l.attr : l, u ? l.params : null, g);
4165
+ let f = (m) => {
4166
+ let y = t.t(u ? l.attr : l, u ? l.params : null, m);
4148
4167
  const v = u && l.modify ? i : r.getProp();
4149
- a === "child" ? v.children ? F(v.children, 0, y) : F(v, "children", [y]) : se(v, a, y), s.sync(i);
4150
- }, p = (g) => f(g);
4168
+ a === "child" ? v.children ? k(v.children, 0, y) : k(v, "children", [y]) : se(v, a, y), s.sync(i);
4169
+ }, p = (m) => f(m);
4151
4170
  const d = t.watchLoadData(p);
4152
4171
  f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
4153
4172
  }
@@ -4168,7 +4187,7 @@ const ki = function(t) {
4168
4187
  t.clearProp(), r.clearValidateState([e.field]);
4169
4188
  else {
4170
4189
  h.Object(i) || (i = { method: i });
4171
- const s = i.method, n = q(_({}, i), {
4190
+ const s = i.method, n = U(_({}, i), {
4172
4191
  validator(...o) {
4173
4192
  const a = Z(e);
4174
4193
  if (a)
@@ -4221,24 +4240,24 @@ const ki = function(t) {
4221
4240
  i._fn[s.id] = t.watchLoadData(ne((p, d) => {
4222
4241
  if (d && a.watch === !1)
4223
4242
  return i._fn[s.id]();
4224
- const g = t.$handle.loadFetchVar(G(a), p, n), y = q(_({
4243
+ const m = t.$handle.loadFetchVar(G(a), p, n), y = U(_({
4225
4244
  headers: {}
4226
- }, g), {
4245
+ }, m), {
4227
4246
  onSuccess(v, E) {
4228
4247
  if (f()) return;
4229
4248
  let Y = (B) => E ? B : j(B, "data") ? B.data : B;
4230
- const I = W(g.parse);
4249
+ const I = W(m.parse);
4231
4250
  h.Function(I) ? Y = I : I && h.String(I) && (Y = (B) => L(B, I)), Ae(Y(v, n, o)).then((B) => {
4232
4251
  l(B);
4233
4252
  });
4234
4253
  },
4235
4254
  onError(v) {
4236
- l(void 0), !f() && (u || ((E) => Ye(E.message || "fetch fail " + g.action)))(v, n, o);
4255
+ l(void 0), !f() && (u || ((E) => Ye(E.message || "fetch fail " + m.action)))(v, n, o);
4237
4256
  }
4238
4257
  });
4239
4258
  t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
4240
- if (h.Function(g.action)) {
4241
- Ae(g.action(n, o)).then((v) => {
4259
+ if (h.Function(m.action)) {
4260
+ Ae(m.action(n, o)).then((v) => {
4242
4261
  y.onSuccess(v, !0);
4243
4262
  }).catch((v) => {
4244
4263
  y.onError(v);
@@ -4266,7 +4285,7 @@ const ki = function(t) {
4266
4285
  return i;
4267
4286
  }, Ei = {
4268
4287
  fetch: Ri,
4269
- loadData: ki,
4288
+ loadData: Fi,
4270
4289
  t: Si,
4271
4290
  componentValidate: Kt
4272
4291
  };
@@ -4442,16 +4461,16 @@ function Xt(t) {
4442
4461
  t.extendApi
4443
4462
  ], u = _({}, Ei), f = ei();
4444
4463
  let p = { global: {} };
4445
- const d = t.isMobile === !0, g = ie({
4464
+ const d = t.isMobile === !0, m = ie({
4446
4465
  $mobile: d
4447
4466
  }), y = Oi(), v = {}, E = {};
4448
4467
  Gi(t.attrs || {});
4449
4468
  function Y(c) {
4450
- const m = M[c];
4451
- if (Array.isArray(m))
4452
- return m.map(($) => $.api());
4453
- if (m)
4454
- return m.api();
4469
+ const g = M[c];
4470
+ if (Array.isArray(g))
4471
+ return g.map(($) => $.api());
4472
+ if (g)
4473
+ return g.api();
4455
4474
  }
4456
4475
  function I(c) {
4457
4476
  o.push(c);
@@ -4460,50 +4479,54 @@ function Xt(t) {
4460
4479
  const c = qe(...arguments);
4461
4480
  c.id && c.prop && (i[c.id] = c.prop);
4462
4481
  }
4463
- function he() {
4482
+ function de() {
4464
4483
  const c = qe(...arguments);
4465
- c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(_({}, c.prop), {
4484
+ c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : U(_({}, c.prop), {
4466
4485
  name: c.id
4467
4486
  }));
4468
4487
  }
4469
4488
  function Le(c) {
4470
4489
  y.use(c);
4471
4490
  }
4472
- function de() {
4473
- const c = qe(...arguments);
4474
- if (!c.id || !c.prop) return je;
4475
- const m = U(c.id), $ = c.prop, b = $.merge === !0 ? r[m] : void 0;
4476
- r[m] = Re($, b || je), f[m] = P(m), $.maker && C(f, $.maker);
4491
+ function pe(c) {
4492
+ if (arguments.length === 0)
4493
+ return Ce;
4494
+ if (typeof c == "string" && arguments.length === 1)
4495
+ return r[q(c)];
4496
+ const g = qe(...arguments);
4497
+ if (!g.id || !g.prop) return Ce;
4498
+ const $ = q(g.id), b = g.prop, w = b.merge === !0 ? r[$] : void 0;
4499
+ r[$] = Ee(b, w || Ce), f[$] = P($), b.maker && C(f, b.maker);
4477
4500
  }
4478
- function k(c, m) {
4501
+ function F(c, g) {
4479
4502
  let $;
4480
4503
  if (h.String(c)) {
4481
- if ($ = c, m === void 0)
4482
- return ["form-create", "formcreate"].indexOf($) > -1 ? S() : e[$];
4504
+ if ($ = c, g === void 0)
4505
+ return ["form-create", "formcreate"].indexOf($) > -1 ? R() : e[$];
4483
4506
  } else
4484
- $ = U(c.name), m = c;
4485
- if (!$ || !m) return;
4486
- const b = U($);
4487
- e[$] = m, e[b] = m, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], m.formCreateParser && de($, m.formCreateParser);
4507
+ $ = q(c.name), g = c;
4508
+ if (!$ || !g) return;
4509
+ const b = q($);
4510
+ e[$] = g, e[b] = g, delete y.aliasMap[$], delete y.aliasMap[b], delete r[$], delete r[b], g.formCreateParser && pe($, g.formCreateParser);
4488
4511
  }
4489
- function S() {
4512
+ function R() {
4490
4513
  return Qr(Te, e, i);
4491
4514
  }
4492
4515
  function N() {
4493
4516
  return Me;
4494
4517
  }
4495
- function pe(c, m) {
4496
- return h.Function(c.install) ? c.install(z, m) : h.Function(c) && c(z, m), this;
4518
+ function me(c, g) {
4519
+ return h.Function(c.install) ? c.install(z, g) : h.Function(c) && c(z, g), this;
4497
4520
  }
4498
- function z(c, m, $) {
4499
- let b = Ui(c, m || {});
4521
+ function z(c, g, $) {
4522
+ let b = Ui(c, g || {});
4500
4523
  const w = b.$refs.fc.formCreate;
4501
4524
  return w.$parent = $, qi(w.options).appendChild(b.$el), w.api();
4502
4525
  }
4503
- Re(z, E);
4526
+ Ee(z, E);
4504
4527
  function xt(c) {
4505
- let m = _({}, t);
4506
- return c ? m.inherit = {
4528
+ let g = _({}, t);
4529
+ return c ? g.inherit = {
4507
4530
  components: e,
4508
4531
  parsers: r,
4509
4532
  directives: i,
@@ -4512,60 +4535,60 @@ function Xt(t) {
4512
4535
  useApps: o,
4513
4536
  maker: f,
4514
4537
  formulas: v,
4515
- loadData: g
4516
- } : delete m.inherit, Xt(m);
4538
+ loadData: m
4539
+ } : delete g.inherit, Xt(g);
4517
4540
  }
4518
- function Qt(c, m) {
4519
- s[c] = m;
4541
+ function Qt(c, g) {
4542
+ s[c] = g;
4520
4543
  }
4521
- function Yt(c, m) {
4522
- v[c] = m;
4544
+ function Yt(c, g) {
4545
+ v[c] = g;
4523
4546
  }
4524
- function er(c, m) {
4547
+ function er(c, g) {
4525
4548
  const $ = n[c] || {}, b = $.parsers || {};
4526
- m.parsers && Object.keys(m.parsers).forEach((w) => {
4527
- b[w] = Re(m.parsers[w], je);
4528
- }), m.name = c, n[c] = q(_(_({}, $), m), { parsers: b });
4549
+ g.parsers && Object.keys(g.parsers).forEach((w) => {
4550
+ b[w] = Ee(g.parsers[w], Ce);
4551
+ }), g.name = c, n[c] = U(_(_({}, $), g), { parsers: b });
4529
4552
  }
4530
- function Oe(c) {
4531
- c && Object.keys(M).forEach((m) => {
4532
- (Array.isArray(M[m]) ? M[m] : [M[m]]).forEach((b) => {
4553
+ function ke(c) {
4554
+ c && Object.keys(M).forEach((g) => {
4555
+ (Array.isArray(M[g]) ? M[g] : [M[g]]).forEach((b) => {
4533
4556
  b.bus.$emit("$loadData." + c);
4534
4557
  });
4535
4558
  });
4536
4559
  }
4537
- function Be(c, m) {
4538
- se(g, c, m), Oe(c);
4560
+ function Be(c, g) {
4561
+ se(m, c, g), ke(c);
4539
4562
  }
4540
- function Fe(c, m) {
4541
- const $ = (...b) => O(() => m(...b));
4563
+ function Fe(c, g) {
4564
+ const $ = (...b) => O(() => g(...b));
4542
4565
  $._driver = !0, Be(c, $);
4543
4566
  }
4544
- function st(c, m) {
4567
+ function st(c, g) {
4545
4568
  const $ = (c || "").split(".");
4546
4569
  c = $.shift();
4547
4570
  const b = $.join(".");
4548
- if (j(g, c) || F(g, c, _t), g[c] !== _t) {
4549
- let w = g[c];
4550
- return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ? m : w;
4571
+ if (j(m, c) || k(m, c, _t), m[c] !== _t) {
4572
+ let w = m[c];
4573
+ return w && w._driver ? w = w(b) : $.length && (w = L(w, $)), w == null || w === "" ? g : w;
4551
4574
  } else
4552
- return m;
4575
+ return g;
4553
4576
  }
4554
4577
  function tr(c) {
4555
4578
  l.push(c);
4556
4579
  }
4557
4580
  function rr(c) {
4558
- delete g[c], Oe(c);
4581
+ delete m[c], ke(c);
4559
4582
  }
4560
- function ir(c, m) {
4561
- a.push({ name: c, callback: m });
4583
+ function ir(c, g) {
4584
+ a.push({ name: c, callback: g });
4562
4585
  }
4563
4586
  function Te(c) {
4564
4587
  C(this, {
4565
4588
  id: Hi++,
4566
4589
  create: z,
4567
4590
  vm: c,
4568
- manager: Fi(t.manager),
4591
+ manager: ki(t.manager),
4569
4592
  parsers: r,
4570
4593
  providers: u,
4571
4594
  modelFields: s,
@@ -4581,8 +4604,8 @@ function Xt(t) {
4581
4604
  get: null,
4582
4605
  drivers: n,
4583
4606
  renderDriver: null,
4584
- refreshData: Oe,
4585
- loadData: g,
4607
+ refreshData: ke,
4608
+ loadData: m,
4586
4609
  CreateNode: y,
4587
4610
  bus: new ji(),
4588
4611
  unwatch: [],
@@ -4590,8 +4613,8 @@ function Xt(t) {
4590
4613
  extendApiFn: l,
4591
4614
  fetchCache: /* @__PURE__ */ new WeakMap(),
4592
4615
  tmpData: ie({})
4593
- }), a.forEach((m) => {
4594
- this.bus.$on(m.name, m.callback);
4616
+ }), a.forEach((g) => {
4617
+ this.bus.$on(g.name, g.callback);
4595
4618
  }), V(() => {
4596
4619
  T(this.options, () => {
4597
4620
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
@@ -4604,52 +4627,52 @@ function Xt(t) {
4604
4627
  this.initOptions(), this.$handle.api.refresh();
4605
4628
  }, { deep: !0, flush: "sync" })), this.vm.$props.driver && (this.renderDriver = typeof this.vm.$props.driver == "object" ? this.vm.$props.driver : this.drivers[this.vm.$props.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();
4606
4629
  },
4607
- targetFormDriver(c, ...m) {
4608
- if (this.bus.$emit(c, ...m), this.renderDriver && this.renderDriver[c])
4609
- return O(() => this.renderDriver[c](...m));
4630
+ targetFormDriver(c, ...g) {
4631
+ if (this.bus.$emit(c, ...g), this.renderDriver && this.renderDriver[c])
4632
+ return O(() => this.renderDriver[c](...g));
4610
4633
  },
4611
- t(c, m, $) {
4634
+ t(c, g, $) {
4612
4635
  let b = $ ? $("$t." + c) : this.globalLanguageDriver(c);
4613
- return b == null && (b = ""), b && m && Object.keys(m).forEach((w) => {
4636
+ return b == null && (b = ""), b && g && Object.keys(g).forEach((w) => {
4614
4637
  const A = new RegExp(`{${w}}`, "g");
4615
- b = b.replace(A, m[w]);
4638
+ b = b.replace(A, g[w]);
4616
4639
  }), b;
4617
4640
  },
4618
4641
  globalDataDriver(c) {
4619
- let m = c.split(".");
4620
- const $ = m.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
4642
+ let g = c.split(".");
4643
+ const $ = g.shift(), b = this.options.value.globalData && this.options.value.globalData[$];
4621
4644
  if (b) {
4622
4645
  if (b.type === "static")
4623
- return L(b.data, m);
4646
+ return L(b.data, g);
4624
4647
  {
4625
4648
  let w;
4626
4649
  const A = this.fetchCache.get(b);
4627
4650
  if (A) {
4628
- if (A.status && (w = L(A.data, m)), !A.loading)
4651
+ if (A.status && (w = L(A.data, g)), !A.loading)
4629
4652
  return w;
4630
4653
  A.loading = !1, this.fetchCache.set(b, A);
4631
4654
  } else
4632
4655
  this.fetchCache.set(b, { status: !1 });
4633
- const R = ne(() => {
4656
+ const S = ne(() => {
4634
4657
  ee();
4635
4658
  const J = this.fetchCache.get(b);
4636
4659
  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);
4637
- }, b.wait || 600), be = (J) => {
4660
+ }, b.wait || 600), ae = (J) => {
4638
4661
  this.fetchCache.set(b, { status: !0, data: J }), this.bus.$emit("$loadData.$globalData." + $);
4639
- }, ae = (J, le) => {
4640
- if (le && b.watch === !1)
4662
+ }, le = (J, ue) => {
4663
+ if (ue && b.watch === !1)
4641
4664
  return ee();
4642
- if (le) {
4643
- R();
4665
+ if (ue) {
4666
+ S();
4644
4667
  return;
4645
4668
  }
4646
- const ue = this.$handle.loadFetchVar(We(b), J);
4647
- ue.targetRule = this.targetRule, this.$handle.api.fetch(ue).then((te) => {
4648
- be(te);
4669
+ const fe = this.$handle.loadFetchVar(We(b), J);
4670
+ fe.targetRule = this.targetRule, this.$handle.api.fetch(fe).then((te) => {
4671
+ ae(te);
4649
4672
  }).catch((te) => {
4650
- be(null);
4673
+ ae(null);
4651
4674
  });
4652
- }, ee = this.watchLoadData(ae);
4675
+ }, ee = this.watchLoadData(le);
4653
4676
  return b.watch === !1 && ee(), this.unwatch.push(ee), w;
4654
4677
  }
4655
4678
  }
@@ -4659,28 +4682,28 @@ function Xt(t) {
4659
4682
  return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
4660
4683
  },
4661
4684
  globalLanguageDriver(c) {
4662
- let m = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
4663
- if (m && (b = O(() => m(c))), b == null && $ && typeof $ == "object" && (b = L($, c)), b == null) {
4685
+ let g = this.vm.top.$props.t, $ = this.vm.top.$props.locale, b;
4686
+ if (g && (b = O(() => g(c))), b == null && $ && typeof $ == "object" && (b = L($, c)), b == null) {
4664
4687
  const w = this.options.value.language || {}, A = this.getLocale();
4665
4688
  b = L(w[A] || {}, c), b == null && (b = L(Ni[A] || {}, c));
4666
4689
  }
4667
4690
  return b;
4668
4691
  },
4669
4692
  globalVarDriver(c) {
4670
- let m = c.split(".");
4671
- const $ = m.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
4693
+ let g = c.split(".");
4694
+ const $ = g.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[$];
4672
4695
  if (b) {
4673
4696
  const w = h.Function(b) ? b : W(b.handle);
4674
4697
  if (w) {
4675
- let A = w((...R) => this.$handle.api.getData(...R), this.$handle.api);
4676
- return L(A, m);
4698
+ let A = w((...S) => this.$handle.api.getData(...S), this.$handle.api);
4699
+ return L(A, g);
4677
4700
  }
4678
4701
  }
4679
4702
  },
4680
- setData(c, m, $) {
4681
- $ ? Be(c, m) : (se(this.vm.top.fc.tmpData, c, m), this.bus.$emit("$loadData." + c));
4703
+ setData(c, g, $) {
4704
+ $ ? Be(c, g) : (se(this.vm.top.fc.tmpData, c, g), this.bus.$emit("$loadData." + c));
4682
4705
  },
4683
- getLoadData(c, m) {
4706
+ getLoadData(c, g) {
4684
4707
  let $ = null;
4685
4708
  if (c != null) {
4686
4709
  let b = c.split(".");
@@ -4710,36 +4733,36 @@ function Xt(t) {
4710
4733
  }
4711
4734
  $ && b.length && ($ = L($, b));
4712
4735
  }
4713
- return $ == null || $ === "" ? m : $;
4736
+ return $ == null || $ === "" ? g : $;
4714
4737
  },
4715
- watchLoadData(c, m) {
4738
+ watchLoadData(c, g) {
4716
4739
  let $ = {};
4717
- const b = (R) => {
4740
+ const b = (S) => {
4718
4741
  this.get || (this.get = w), O(() => {
4719
- c(w, R);
4742
+ c(w, S);
4720
4743
  }), this.get === w && (this.get = void 0);
4721
- }, w = (R, be) => {
4722
- let ae;
4723
- if (typeof R == "object" && (ae = R.getValue, R = R.id), $[R])
4724
- return $[R].val;
4725
- const ee = ge(() => ae ? ae() : this.getLoadData(R, be)), J = R.split("."), le = J.shift(), ue = J.shift() || "", te = ne(() => {
4726
- const fe = ae ? ae() : this.getLoadData(R, be);
4727
- if ($[R])
4728
- ((fe instanceof Function || h.Object(fe) || Array.isArray(fe)) && fe === $[R].val || JSON.stringify(fe) !== JSON.stringify($[R].val)) && ($[R].val = fe, b(!0));
4744
+ }, w = (S, ae) => {
4745
+ let le;
4746
+ if (typeof S == "object" && (le = S.getValue, S = S.id), $[S])
4747
+ return $[S].val;
4748
+ const ee = ye(() => le ? le() : this.getLoadData(S, ae)), J = S.split("."), ue = J.shift(), fe = J.shift() || "", te = ne(() => {
4749
+ const ce = le ? le() : this.getLoadData(S, ae);
4750
+ if ($[S])
4751
+ ((ce instanceof Function || h.Object(ce) || Array.isArray(ce)) && ce === $[S].val || JSON.stringify(ce) !== JSON.stringify($[S].val)) && ($[S].val = ce, b(!0));
4729
4752
  else return;
4730
- }, m || 0), sr = T(ee, (fe) => {
4753
+ }, g || 0), sr = T(ee, (ce) => {
4731
4754
  te();
4732
4755
  });
4733
- return this.bus.$on("$loadData." + le, te), ue && this.bus.$on("$loadData." + le + "." + ue, te), $[R] = {
4756
+ return this.bus.$on("$loadData." + ue, te), fe && this.bus.$on("$loadData." + ue + "." + fe, te), $[S] = {
4734
4757
  fn: () => {
4735
- this.bus.$off("$loadData." + le, te), ue && this.bus.$off("$loadData." + le + "." + ue, te), sr();
4758
+ this.bus.$off("$loadData." + ue, te), fe && this.bus.$off("$loadData." + ue + "." + fe, te), sr();
4736
4759
  },
4737
4760
  val: ee.value
4738
4761
  }, ee.value;
4739
4762
  };
4740
4763
  b(!1);
4741
4764
  const A = () => {
4742
- Object.keys($).forEach((R) => $[R].fn()), $ = {};
4765
+ Object.keys($).forEach((S) => $[S].fn()), $ = {};
4743
4766
  };
4744
4767
  return this.unwatch.push(A), A;
4745
4768
  },
@@ -4755,15 +4778,15 @@ function Xt(t) {
4755
4778
  globalEvent: {},
4756
4779
  globalData: {}
4757
4780
  }, G(p));
4758
- const m = this.isSub();
4759
- m && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$props.option || {});
4781
+ const g = this.isSub();
4782
+ g && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$props.option || {});
4760
4783
  const $ = this.api();
4761
- this.targetFormDriver("initOptions", c, { api: $, isSubForm: m }), this.updateOptions(c);
4784
+ this.targetFormDriver("initOptions", c, { api: $, isSubForm: g }), this.updateOptions(c);
4762
4785
  },
4763
- mergeOptions(c, m, $) {
4764
- return m = _({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4765
- delete m[b];
4766
- }), m.global && (c.global = Xr(c.global, m.global), delete m.global), this.$handle.$manager.mergeOptions([m], c), c;
4786
+ mergeOptions(c, g, $) {
4787
+ return g = _({}, g || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4788
+ delete g[b];
4789
+ }), g.global && (c.global = Xr(c.global, g.global), delete g.global), this.$handle.$manager.mergeOptions([g], c), c;
4767
4790
  },
4768
4791
  updateOptions(c) {
4769
4792
  this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
@@ -4802,27 +4825,27 @@ function Xt(t) {
4802
4825
  setDataDriver: Fe,
4803
4826
  setData: Be,
4804
4827
  removeData: rr,
4805
- refreshData: Oe,
4828
+ refreshData: ke,
4806
4829
  maker: f,
4807
- component: k,
4830
+ component: F,
4808
4831
  directive: B,
4809
4832
  setModelField: Qt,
4810
4833
  setFormula: Yt,
4811
4834
  setDriver: er,
4812
- register: he,
4835
+ register: de,
4813
4836
  $vnode: N,
4814
- parser: de,
4815
- use: pe,
4837
+ parser: pe,
4838
+ use: me,
4816
4839
  factory: xt,
4817
4840
  componentAlias: Le,
4818
4841
  copyRule: Bt,
4819
4842
  copyRules: Tt,
4820
4843
  mergeRule: Q,
4821
4844
  fetch: Ht,
4822
- $form: S,
4845
+ $form: R,
4823
4846
  parseFn: W,
4824
4847
  parseJson: Dt,
4825
- toJson: Ce,
4848
+ toJson: we,
4826
4849
  useApp: I,
4827
4850
  getApi: Y,
4828
4851
  on: ir
@@ -4831,26 +4854,28 @@ function Xt(t) {
4831
4854
  function nr(c) {
4832
4855
  C(c, {
4833
4856
  create: z,
4834
- install(m, $) {
4835
- if (p = _(_({}, p), $ || {}), m._installedFormCreate === !0) return;
4836
- m._installedFormCreate = !0;
4837
- const b = function(A, R = {}) {
4838
- return z(A, R, this);
4857
+ install(g, $) {
4858
+ p = _(_({}, p), $ || {});
4859
+ const b = `_installedFormCreate${d ? "Mobile" : ""}_${t.ui}`;
4860
+ if (g[b] === !0) return;
4861
+ g[b] = !0;
4862
+ const w = function(S, ae = {}) {
4863
+ return z(S, ae, this);
4839
4864
  };
4840
- ot(b), m.prototype.$formCreate = b;
4841
- const w = S();
4842
- m.component(w.name, w), m.component("FcFragment", N()), o.forEach((A) => {
4843
- O(() => A(c, m));
4865
+ ot(w), g.prototype.$formCreate = w;
4866
+ const A = R();
4867
+ g.component(A.name, A), g.component("FcFragment", N()), o.forEach((S) => {
4868
+ O(() => S(c, g));
4844
4869
  });
4845
4870
  }
4846
4871
  });
4847
4872
  }
4848
- if (ot(E), nr(E), Fe("$cookie", Li), Fe("$localStorage", Bi), Fe("$sessionStorage", Ti), y.use({ fragment: "fcFragment" }), t.install && z.use(t), de(Ai), t.inherit) {
4873
+ if (ot(E), nr(E), Fe("$cookie", Li), Fe("$localStorage", Bi), Fe("$sessionStorage", Ti), y.use({ fragment: "fcFragment" }), t.install && z.use(t), pe(Ai), t.inherit) {
4849
4874
  const c = t.inherit;
4850
- 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(v, c.formulas);
4875
+ 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(v, c.formulas);
4851
4876
  }
4852
- const ke = S();
4853
- return Re(ke, E), Object.defineProperties(ke, {
4877
+ const Se = R();
4878
+ return Ee(Se, E), Object.defineProperties(Se, {
4854
4879
  fetch: {
4855
4880
  get() {
4856
4881
  return E.fetch;
@@ -4859,7 +4884,7 @@ function Xt(t) {
4859
4884
  E.fetch = c;
4860
4885
  }
4861
4886
  }
4862
- }), ke.util = E, ke;
4887
+ }), Se.util = E, Se;
4863
4888
  }
4864
4889
  function Ue(t) {
4865
4890
  if (h.Date(t))
@@ -5102,7 +5127,7 @@ const rn = {
5102
5127
  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;
5103
5128
  delete r.wrap.class, delete r.wrap.title;
5104
5129
  const f = X(r.wrap.show) ? e : this.$r(x([r.wrap, {
5105
- props: q(_({
5130
+ props: U(_({
5106
5131
  labelWidth: o
5107
5132
  }, ze(r.wrap || {})), {
5108
5133
  prop: t.id,
@@ -5121,7 +5146,7 @@ const rn = {
5121
5146
  return !(!e.title && !e.native || X(e.show));
5122
5147
  },
5123
5148
  makeInfo(t, e, r) {
5124
- var u, f, p, d, g, y;
5149
+ var u, f, p, d, m, y;
5125
5150
  const i = _({}, t.title), s = _({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
5126
5151
  title: (f = (u = r.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value,
5127
5152
  rule: r.rule,
@@ -5136,7 +5161,7 @@ const rn = {
5136
5161
  };
5137
5162
  delete v.props.icon, delete v.props.show, delete v.props.info, delete v.props.align, delete v.props.native;
5138
5163
  const E = "content";
5139
- s.info && !j(v.props, E) && (v.props[E] = (y = (g = r.refRule) == null ? void 0 : g.__$info) == null ? void 0 : y.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(x([s, v]), [
5164
+ s.info && !j(v.props, E) && (v.props[E] = (y = (m = r.refRule) == null ? void 0 : m.__$info) == null ? void 0 : y.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(x([s, v]), [
5140
5165
  this.$r({
5141
5166
  type: "icon",
5142
5167
  props: { type: s.icon === !0 ? Ie.infoIcon : s.icon, size: 16 },
@@ -5270,7 +5295,7 @@ an(oe);
5270
5295
  un(oe);
5271
5296
  fn(oe);
5272
5297
  ln(oe);
5273
- function Ft(t, e) {
5298
+ function kt(t, e) {
5274
5299
  return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
5275
5300
  }
5276
5301
  function cn(t, e) {
@@ -5353,11 +5378,11 @@ function cn(t, e) {
5353
5378
  }
5354
5379
  },
5355
5380
  submitBtnProps: (r = {}) => {
5356
- let i = Ft(e.options.submitBtn, !0);
5381
+ let i = kt(e.options.submitBtn, !0);
5357
5382
  C(i, r), e.options.submitBtn = i, t.refreshOptions();
5358
5383
  },
5359
5384
  resetBtnProps: (r = {}) => {
5360
- let i = Ft(e.options.resetBtn, !1);
5385
+ let i = kt(e.options.resetBtn, !1);
5361
5386
  C(i, r), e.options.resetBtn = i, t.refreshOptions();
5362
5387
  },
5363
5388
  submit(r, i) {
@@ -5378,24 +5403,28 @@ function cn(t, e) {
5378
5403
  const Zt = {
5379
5404
  name: "required",
5380
5405
  load(t, e, r) {
5381
- var s, n;
5382
5406
  const i = hn(t.getValue());
5407
+ let s;
5383
5408
  if (i.required === !1)
5384
5409
  t.clearProp(), r.clearValidateState([e.field]);
5385
5410
  else {
5386
- const o = _({
5411
+ const n = _({
5387
5412
  required: !0,
5388
- validator(l, u, f) {
5389
- h.empty(u) ? f(o.message) : f();
5413
+ validator(a, l, u) {
5414
+ o(), h.empty(l) ? u(n.message) : u();
5390
5415
  }
5391
- }, i), a = (n = (s = e.__fc__.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value;
5392
- if (!o.message)
5393
- o.message = r.t("required", { title: a }) || a + (r.getLocale() === "en" ? " is required" : "不能为空");
5394
- else {
5395
- const l = o.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
5396
- l && (o.message = r.t(l[1], { title: a }));
5397
- }
5398
- t.getProp().validate = [o];
5416
+ }, i), o = () => {
5417
+ var l, u;
5418
+ const a = (u = (l = e.__fc__.refRule) == null ? void 0 : l.__$title) == null ? void 0 : u.value;
5419
+ if (s !== a)
5420
+ if (s = a, !i.message)
5421
+ n.message = r.t("required", { title: a }) || a + (r.getLocale() === "en" ? " is required" : "不能为空");
5422
+ else {
5423
+ const f = i.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
5424
+ f && (n.message = r.t(f[1], { title: a }));
5425
+ }
5426
+ };
5427
+ o(), t.getProp().validate = [n];
5399
5428
  }
5400
5429
  r.sync(e);
5401
5430
  },
@@ -5418,7 +5447,7 @@ function dn(t) {
5418
5447
  function pn() {
5419
5448
  return Xt({
5420
5449
  ui: "view-design",
5421
- version: "2.7.20",
5450
+ version: "2.7.22",
5422
5451
  manager: rn,
5423
5452
  install: dn,
5424
5453
  extendApi: cn,