@form-create/view-design 2.7.18 → 2.7.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * FormCreate 低代码表单渲染器
3
- * @form-create/view-design v2.7.17
3
+ * @form-create/view-design v2.7.20
4
4
  * (c) 2018-2025 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
@@ -11,7 +11,7 @@ var or = Object.defineProperty, ar = Object.defineProperties;
11
11
  var lr = Object.getOwnPropertyDescriptors;
12
12
  var at = Object.getOwnPropertySymbols;
13
13
  var ur = Object.prototype.hasOwnProperty, fr = Object.prototype.propertyIsEnumerable;
14
- var lt = (t, e, r) => e in t ? or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, v = (t, e) => {
14
+ var lt = (t, e, r) => e in t ? or(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, _ = (t, e) => {
15
15
  for (var r in e || (e = {}))
16
16
  ur.call(e, r) && lt(t, r, e[r]);
17
17
  if (at)
@@ -111,7 +111,7 @@ const kr = "fcCheckbox", Sr = {
111
111
  input: this.onInput
112
112
  }
113
113
  }]), [this.options().map((e, r) => {
114
- const i = v({}, e);
114
+ const i = _({}, e);
115
115
  return delete i.value, t("Checkbox", D([{}, {
116
116
  props: i
117
117
  }, {
@@ -469,7 +469,7 @@ function kt(t) {
469
469
  src: this.previewImage
470
470
  }
471
471
  })]), e("Modal", D([{}, {
472
- props: v({
472
+ props: _({
473
473
  width: s,
474
474
  title: a
475
475
  }, this.modal)
@@ -563,7 +563,7 @@ const Er = "fcRadio", jr = {
563
563
  input: this.onInput
564
564
  }
565
565
  }]), [this.options().map((e, r) => {
566
- const i = v({}, e);
566
+ const i = _({}, e);
567
567
  return delete i.value, t("Radio", D([{}, {
568
568
  props: i
569
569
  }, {
@@ -702,7 +702,7 @@ function ft(t) {
702
702
  };
703
703
  }
704
704
  function ct(t) {
705
- return q(v({}, t), {
705
+ return q(_({}, t), {
706
706
  file: t,
707
707
  value: t
708
708
  });
@@ -958,7 +958,7 @@ function C() {
958
958
  return Br.apply(this, arguments);
959
959
  }
960
960
  function We(t) {
961
- return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
961
+ return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : _({}, t);
962
962
  }
963
963
  function ne(t, e) {
964
964
  var r = null;
@@ -1199,7 +1199,7 @@ const Gr = "fcGroup", Hr = {
1199
1199
  if (i.filter((n) => r[n].$f).length !== i.length)
1200
1200
  return;
1201
1201
  const s = i.map((n) => {
1202
- const o = t === n ? e : v({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
1202
+ const o = t === n ? e : _({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
1203
1203
  return this.cache(n, a), a;
1204
1204
  });
1205
1205
  this.input(s);
@@ -1211,7 +1211,7 @@ const Gr = "fcGroup", Hr = {
1211
1211
  }), this.cacheValue[t] !== JSON.stringify(r ? e[r] : e) && (this.cache(t, e), i && i.coverValue(e || {}));
1212
1212
  },
1213
1213
  addRule(t, e) {
1214
- const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? v({}, this.options) : {
1214
+ const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? _({}, this.options) : {
1215
1215
  submitBtn: !1,
1216
1216
  resetBtn: !1
1217
1217
  };
@@ -1421,7 +1421,7 @@ const Gr = "fcGroup", Hr = {
1421
1421
  submitBtn: !1,
1422
1422
  resetBtn: !1
1423
1423
  };
1424
- t.formData = v({}, this.value || {}), this.cacheRule = {
1424
+ t.formData = _({}, this.value || {}), this.cacheRule = {
1425
1425
  rule: this.rule,
1426
1426
  options: t
1427
1427
  };
@@ -1475,7 +1475,7 @@ const Gr = "fcGroup", Hr = {
1475
1475
  if (o.indexOf(u) > -1)
1476
1476
  a[u] = x([l[u]], a[u]);
1477
1477
  else if (i.indexOf(u) > -1)
1478
- a[u] = v(v({}, a[u]), l[u]);
1478
+ a[u] = _(_({}, a[u]), l[u]);
1479
1479
  else if (s.indexOf(u) > -1) {
1480
1480
  const f = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
1481
1481
  a[u] = [...f, ...p];
@@ -1492,7 +1492,7 @@ const Gr = "fcGroup", Hr = {
1492
1492
  else
1493
1493
  a[u] = l[u];
1494
1494
  else
1495
- i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = v({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? v({}, l[u]) : l[u] : a[u] = l[u];
1495
+ i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = _({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? _({}, l[u]) : l[u] : a[u] = l[u];
1496
1496
  return a;
1497
1497
  }, e);
1498
1498
  }, Kr = (t, e) => function() {
@@ -1743,18 +1743,18 @@ 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(), _ = p.value, E = () => {
1746
+ }), g = new t(n), y = g.api(), v = p.value, E = () => {
1747
1747
  if (o) {
1748
1748
  const k = Ee(n, o);
1749
1749
  if (k) {
1750
1750
  let S;
1751
- _ ? (S = H(k.getSubForm()), S.push(y)) : S = y, k.subForm(S);
1751
+ v ? (S = H(k.getSubForm()), S.push(y)) : S = y, k.subForm(S);
1752
1752
  }
1753
1753
  }
1754
1754
  }, Y = () => {
1755
1755
  const k = Ee(n, o);
1756
1756
  if (k)
1757
- if (_) {
1757
+ if (v) {
1758
1758
  const S = H(k.getSubForm()), N = S.indexOf(y);
1759
1759
  N > -1 && S.splice(N, 1);
1760
1760
  } else
@@ -1805,7 +1805,7 @@ function Qr(t, e, r) {
1805
1805
  y.clearValidateState();
1806
1806
  });
1807
1807
  });
1808
- }, { flush: "sync" }), q(v({
1808
+ }, { flush: "sync" }), q(_({
1809
1809
  fc: me(g),
1810
1810
  parent: o && me(o),
1811
1811
  top: me(a),
@@ -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(v({}, t), {
1936
+ (e || Ht)(q(_({}, t), {
1937
1937
  onSuccess(n) {
1938
1938
  let o = (l) => l;
1939
1939
  const a = W(t.parse);
@@ -1955,7 +1955,7 @@ function ri(t) {
1955
1955
  return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
1956
1956
  }
1957
1957
  function r(n, o, a) {
1958
- h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
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
1961
  F(f.rule, o, a), t.$render.clearCache(f);
@@ -2028,7 +2028,7 @@ function ri(t) {
2028
2028
  }
2029
2029
  },
2030
2030
  get formulas() {
2031
- return v({}, t.fc.formulas);
2031
+ return _({}, t.fc.formulas);
2032
2032
  },
2033
2033
  formData(n) {
2034
2034
  if (n == null || typeof n == "boolean") {
@@ -2044,7 +2044,7 @@ function ri(t) {
2044
2044
  return o ? ve(o.rule.value) : t.options.appendValue !== !1 && j(t.appendData, n) ? ve(t.appendData[n]) : void 0;
2045
2045
  },
2046
2046
  coverValue(n) {
2047
- const o = v({}, n || {});
2047
+ const o = _({}, n || {});
2048
2048
  t.deferSyncValue(() => {
2049
2049
  t.appendData = {}, s.fields().forEach((a) => {
2050
2050
  const l = t.fieldCtx[a];
@@ -2557,8 +2557,8 @@ function ni(t) {
2557
2557
  }, (() => {
2558
2558
  if (h.Function(n.renderSlots[y]))
2559
2559
  return O(() => n.renderSlots[y]());
2560
- const _ = this.parseSide(n.renderSlots[y], e);
2561
- return this.renderRule(_);
2560
+ const v = this.parseSide(n.renderSlots[y], e);
2561
+ return this.renderRule(v);
2562
2562
  })()));
2563
2563
  });
2564
2564
  const d = this.getTypeSlot(e);
@@ -2630,8 +2630,8 @@ function ni(t) {
2630
2630
  preview: e.prop.preview,
2631
2631
  options: e.prop.options,
2632
2632
  prop: function() {
2633
- const n = v({}, e.prop);
2634
- return n.on = n.on ? v({}, n.on) : {}, delete n.model, n;
2633
+ const n = _({}, e.prop);
2634
+ return n.on = n.on ? _({}, n.on) : {}, delete n.model, n;
2635
2635
  }(),
2636
2636
  children: e.loadChildrenPending()
2637
2637
  };
@@ -2642,7 +2642,7 @@ function ni(t) {
2642
2642
  ctxProp(e) {
2643
2643
  const { ref: r, key: i, rule: s } = e;
2644
2644
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2645
- const n = v({}, e.prop.on || {}), o = {};
2645
+ const n = _({}, e.prop.on || {}), o = {};
2646
2646
  Object.keys(n).forEach((l) => {
2647
2647
  if (l.indexOf("native.") === 0)
2648
2648
  o[l.replace("native.", "")] = n[l], delete n[l];
@@ -2706,10 +2706,10 @@ function ni(t) {
2706
2706
  const s = Se();
2707
2707
  return e.map((n) => {
2708
2708
  if (n) {
2709
- if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
2709
+ if (h.String(n) || h.Number(n)) return s.setSlot(null, i ? this.renderRule({
2710
2710
  type: "template",
2711
- children: [n]
2712
- }) : n);
2711
+ children: [`${n}`]
2712
+ }) : `${n}`);
2713
2713
  if (n.__fc__)
2714
2714
  return this.renderSlot(s, n.__fc__, r);
2715
2715
  n.type && V(() => {
@@ -2734,7 +2734,7 @@ function ni(t) {
2734
2734
  },
2735
2735
  renderRule(e, r, i) {
2736
2736
  if (!e) return;
2737
- if (h.String(e)) return e;
2737
+ if (h.String(e) || h.Number(e)) return `${e}`;
2738
2738
  let s;
2739
2739
  if (i)
2740
2740
  s = e.type;
@@ -2748,7 +2748,7 @@ function ni(t) {
2748
2748
  h.trueArray(e.children) && e.children.forEach((a) => {
2749
2749
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2750
2750
  });
2751
- const o = v({}, e);
2751
+ const o = _({}, e);
2752
2752
  return delete o.type, delete o.is, this.vNode.make(s, o, n.mergeBag(r).getSlots());
2753
2753
  }
2754
2754
  });
@@ -2805,14 +2805,14 @@ function oi(t) {
2805
2805
  let p, d = n || o || a;
2806
2806
  if (h.Object(f) && (p = f.inject, f = f.name, d = f.prefix || d), d) {
2807
2807
  r || (d = `native-${d}`);
2808
- const g = $e(`${d}-${f}`), y = (..._) => {
2809
- this.vm.$emit(g, ..._), this.vm.$emit("emit-event", g, ..._), this.bus.$emit(g, ..._);
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);
2810
2810
  };
2811
2811
  if (y.__emit = !0, !p && l === !1)
2812
2812
  i[f] = y;
2813
2813
  else {
2814
- let _ = p || l || this.options.injectEvent;
2815
- i[f] = h.Undef(_) ? y : this.inject(s, y, _);
2814
+ let v = p || l || this.options.injectEvent;
2815
+ i[f] = h.Undef(v) ? y : this.inject(s, y, v);
2816
2816
  }
2817
2817
  }
2818
2818
  }), e.computed[r ? "on" : "nativeOn"] = i, i;
@@ -2955,7 +2955,7 @@ function Jt(t, e, r) {
2955
2955
  parent: null,
2956
2956
  group: e.subRule ? this : null,
2957
2957
  cacheConfig: null,
2958
- prop: v({}, e),
2958
+ prop: _({}, e),
2959
2959
  computed: {},
2960
2960
  payload: {},
2961
2961
  refRule: {},
@@ -3046,7 +3046,7 @@ C(Jt.prototype, {
3046
3046
  },
3047
3047
  initProp() {
3048
3048
  var e, r;
3049
- const t = v({}, this.rule);
3049
+ const t = _({}, this.rule);
3050
3050
  delete t.children, delete t.validate, this.prop = Q({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
3051
3051
  },
3052
3052
  initNone() {
@@ -3204,9 +3204,9 @@ function ci(t) {
3204
3204
  const E = i(a);
3205
3205
  E > -1 || !a ? this.sort.splice(E + 1, 0, f.id) : this.sort.push(f.id);
3206
3206
  }
3207
- const _ = f.rule;
3208
- return f.updated || (f.updated = !0, h.Function(_.update) && this.bus.$once("load-end", () => {
3209
- this.refreshUpdate(f, _.value, "init");
3207
+ const v = f.rule;
3208
+ return f.updated || (f.updated = !0, h.Function(v.update) && this.bus.$once("load-end", () => {
3209
+ this.refreshUpdate(f, v.value, "init");
3210
3210
  }), this.effect(f, "loaded")), this.refreshControl(f) && (this.cycleLoad = !0), f;
3211
3211
  }).filter((o) => !!o);
3212
3212
  r && (r.children = n);
@@ -3222,7 +3222,7 @@ function ci(t) {
3222
3222
  return (ce[l.condition || "=="] || ce["=="])(p, l.value);
3223
3223
  };
3224
3224
  if (!h.trueArray(l.rule)) continue;
3225
- const f = q(v({}, l), {
3225
+ const f = q(_({}, l), {
3226
3226
  valid: O(() => u(e.rule.value, s)),
3227
3227
  ctrl: pi(e, l.rule),
3228
3228
  isHidden: h.String(l.rule[0])
@@ -3240,27 +3240,27 @@ function ci(t) {
3240
3240
  children: u,
3241
3241
  valid: l
3242
3242
  }) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3243
- y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((_) => {
3244
- this.api.setEffect(_, "required", l);
3243
+ y === "disabled" || y === "enabled" ? this.api.disabled(!l, u) : y === "display" || y === "show" ? this.api.display(l, u) : y === "required" ? (u.forEach((v) => {
3244
+ this.api.setEffect(v, "required", l);
3245
3245
  }), l || this.api.clearValidateState(u)) : y === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
3246
3246
  });
3247
3247
  return;
3248
3248
  }
3249
3249
  if (l) {
3250
3250
  o = !0;
3251
- const _ = {
3251
+ const v = {
3252
3252
  type: "fragment",
3253
3253
  native: !0,
3254
3254
  __ctrl: !0,
3255
3255
  children: u
3256
3256
  };
3257
- e.ctrlRule.push(_), this.bus.$once("load-start", () => {
3258
- f ? s.prepend(_, f, d) : p || d ? s.append(_, p || e.id, d) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
3257
+ e.ctrlRule.push(v), this.bus.$once("load-start", () => {
3258
+ 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
3259
  });
3260
3260
  } else {
3261
3261
  e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
3262
- const _ = Z(g);
3263
- _ && _.rm();
3262
+ const v = Z(g);
3263
+ v && v.rm();
3264
3264
  }
3265
3265
  });
3266
3266
  }), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
@@ -3274,7 +3274,7 @@ function ci(t) {
3274
3274
  },
3275
3275
  _reloadRule(e) {
3276
3276
  e || (e = this.rules);
3277
- const r = v({}, this.ctxs);
3277
+ const r = _({}, this.ctxs);
3278
3278
  this.clearNextTick(), this.initData(e), this.fc.rules = e, this.deferSyncValue(() => {
3279
3279
  this.bus.$once("load-end", () => {
3280
3280
  Object.keys(r).filter((i) => this.ctxs[i] === void 0).forEach((i) => this.rmCtx(r[i])), this.$render.clearCacheAll();
@@ -3494,7 +3494,7 @@ function yi(t) {
3494
3494
  this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
3495
3495
  }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), V(() => {
3496
3496
  this.targetHook(e, "hidden", { value: l });
3497
- })), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
3497
+ })), i === "ignore" && e.input || i === "hidden" && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
3498
3498
  this.syncForm();
3499
3499
  else if (i === "link") {
3500
3500
  e.link();
@@ -3524,7 +3524,7 @@ function yi(t) {
3524
3524
  return n ? this.api.t(n[1], { title: (a = (o = e.refRule) == null ? void 0 : o.__$title) == null ? void 0 : a.value }) : s;
3525
3525
  };
3526
3526
  return H(e.rule.validate).map((s) => {
3527
- const n = v({}, s);
3527
+ const n = _({}, s);
3528
3528
  if (n.message && (n.message = i(n.message)), h.Function(n.validator)) {
3529
3529
  const o = e;
3530
3530
  n.validator = function(...a) {
@@ -3539,7 +3539,7 @@ function yi(t) {
3539
3539
  }
3540
3540
  if (n.adapter) {
3541
3541
  if (typeof n.error == "object") {
3542
- const o = v({}, n.error);
3542
+ const o = _({}, n.error);
3543
3543
  Object.keys(o).forEach((a) => {
3544
3544
  o[a] = i(o[a]);
3545
3545
  }), n.error = o;
@@ -3598,7 +3598,7 @@ function yi(t) {
3598
3598
  return this.$manager.adapterValidate({
3599
3599
  required: e.required,
3600
3600
  message: e.message,
3601
- target: e.trigger
3601
+ trigger: e.trigger
3602
3602
  }, i);
3603
3603
  },
3604
3604
  getValidateMessage(e, r) {
@@ -3697,15 +3697,15 @@ function yi(t) {
3697
3697
  let u = !0;
3698
3698
  for (let f = 0; f < a.group.length; f++) {
3699
3699
  const p = a.group[f];
3700
- let d, g = null;
3700
+ let d, g = null, y = null;
3701
3701
  if (p.variable)
3702
- g = JSON.stringify(this.fc.getLoadData(p.variable)) || "";
3702
+ y = this.fc.getLoadData(p.variable);
3703
3703
  else if (p.field)
3704
3704
  g = pt(p.field || "");
3705
3705
  else if (!p.mode)
3706
3706
  return !0;
3707
- let y = p.compare;
3708
- if (y && (y = pt(y || "")), 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", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${y || "$val"}); }}}}`).call(this.api.form, ce, 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)
3707
+ 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)
3709
3709
  return !0;
3710
3710
  l || (u = u && d);
3711
3711
  }
@@ -3786,7 +3786,7 @@ function $i(t) {
3786
3786
  var l, u, f, p;
3787
3787
  let s = (u = (l = e.prop) == null ? void 0 : l.hook) == null ? void 0 : u[r], n = (d, g) => {
3788
3788
  d && (d = Array.isArray(d) ? d : [d], d.forEach((y) => {
3789
- O(() => y(q(v({}, i || {}), {
3789
+ O(() => y(q(_({}, i || {}), {
3790
3790
  self: e.rule,
3791
3791
  rule: e.rule,
3792
3792
  parent: g == null ? void 0 : g.rule,
@@ -3864,7 +3864,7 @@ function bi(t) {
3864
3864
  },
3865
3865
  emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
3866
3866
  if (!s || ["fcFragment", "fragment"].indexOf(s) > -1) return;
3867
- const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u), v({}, r.effect || {}));
3867
+ const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u), _({}, r.effect || {}));
3868
3868
  Object.keys(l).forEach((u) => {
3869
3869
  const f = this.providers[u];
3870
3870
  if (!f || f.input && !i) return;
@@ -3875,7 +3875,7 @@ function bi(t) {
3875
3875
  p = s;
3876
3876
  else
3877
3877
  return;
3878
- const d = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3878
+ const d = _({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3879
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]);
3880
3880
  });
3881
3881
  }
@@ -3947,7 +3947,7 @@ C(K.prototype, {
3947
3947
  this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created");
3948
3948
  },
3949
3949
  updateAppendData() {
3950
- this.appendData = v(v(v({}, this.options.formData || {}), this.fc.vm.$props.value || {}), this.appendData);
3950
+ this.appendData = _(_(_({}, this.options.formData || {}), this.fc.vm.$props.value || {}), this.appendData);
3951
3951
  },
3952
3952
  isBreakWatch() {
3953
3953
  return this.loading || this.noWatchFn || this.reloading;
@@ -4145,8 +4145,8 @@ const ki = function(t) {
4145
4145
  const u = typeof l == "object";
4146
4146
  let f = (g) => {
4147
4147
  let y = t.t(u ? l.attr : l, u ? l.params : null, g);
4148
- const _ = u && l.modify ? i : r.getProp();
4149
- a === "child" ? _.children ? F(_.children, 0, y) : F(_, "children", [y]) : se(_, a, y), s.sync(i);
4148
+ 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
4150
  }, p = (g) => f(g);
4151
4151
  const d = t.watchLoadData(p);
4152
4152
  f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(d) : d();
@@ -4168,7 +4168,7 @@ const ki = function(t) {
4168
4168
  t.clearProp(), r.clearValidateState([e.field]);
4169
4169
  else {
4170
4170
  h.Object(i) || (i = { method: i });
4171
- const s = i.method, n = q(v({}, i), {
4171
+ const s = i.method, n = q(_({}, i), {
4172
4172
  validator(...o) {
4173
4173
  const a = Z(e);
4174
4174
  if (a)
@@ -4212,7 +4212,7 @@ const ki = function(t) {
4212
4212
  l(p.data);
4213
4213
  return;
4214
4214
  } else
4215
- a = v(v({}, a), p);
4215
+ a = _(_({}, a), p);
4216
4216
  }
4217
4217
  const u = a.onError, f = () => {
4218
4218
  if (!s.getValue())
@@ -4221,32 +4221,32 @@ const ki = function(t) {
4221
4221
  i._fn[s.id] = t.watchLoadData(ne((p, d) => {
4222
4222
  if (d && a.watch === !1)
4223
4223
  return i._fn[s.id]();
4224
- const g = t.$handle.loadFetchVar(G(a), p, n), y = q(v({
4224
+ const g = t.$handle.loadFetchVar(G(a), p, n), y = q(_({
4225
4225
  headers: {}
4226
4226
  }, g), {
4227
- onSuccess(_, E) {
4227
+ onSuccess(v, E) {
4228
4228
  if (f()) return;
4229
4229
  let Y = (B) => E ? B : j(B, "data") ? B.data : B;
4230
4230
  const I = W(g.parse);
4231
- h.Function(I) ? Y = I : I && h.String(I) && (Y = (B) => L(B, I)), Ae(Y(_, n, o)).then((B) => {
4231
+ h.Function(I) ? Y = I : I && h.String(I) && (Y = (B) => L(B, I)), Ae(Y(v, n, o)).then((B) => {
4232
4232
  l(B);
4233
4233
  });
4234
4234
  },
4235
- onError(_) {
4236
- l(void 0), !f() && (u || ((E) => Ye(E.message || "fetch fail " + g.action)))(_, n, o);
4235
+ onError(v) {
4236
+ l(void 0), !f() && (u || ((E) => Ye(E.message || "fetch fail " + g.action)))(v, n, o);
4237
4237
  }
4238
4238
  });
4239
4239
  t.$handle.beforeFetch(y, { rule: n, api: o }).then(() => {
4240
4240
  if (h.Function(g.action)) {
4241
- Ae(g.action(n, o)).then((_) => {
4242
- y.onSuccess(_, !0);
4243
- }).catch((_) => {
4244
- y.onError(_);
4241
+ Ae(g.action(n, o)).then((v) => {
4242
+ y.onSuccess(v, !0);
4243
+ }).catch((v) => {
4244
+ y.onError(v);
4245
4245
  });
4246
4246
  return;
4247
4247
  }
4248
4248
  O(() => t.create.fetch(y, { inject: s, rule: n, api: o }));
4249
- }).catch((_) => {
4249
+ }).catch((v) => {
4250
4250
  });
4251
4251
  }, a.wait || 600));
4252
4252
  }
@@ -4440,11 +4440,11 @@ function Xt(t) {
4440
4440
  [Me.name]: Me
4441
4441
  }, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
4442
4442
  t.extendApi
4443
- ], u = v({}, Ei), f = ei();
4443
+ ], u = _({}, Ei), f = ei();
4444
4444
  let p = { global: {} };
4445
4445
  const d = t.isMobile === !0, g = ie({
4446
4446
  $mobile: d
4447
- }), y = Oi(), _ = {}, E = {};
4447
+ }), y = Oi(), v = {}, E = {};
4448
4448
  Gi(t.attrs || {});
4449
4449
  function Y(c) {
4450
4450
  const m = M[c];
@@ -4462,7 +4462,7 @@ function Xt(t) {
4462
4462
  }
4463
4463
  function he() {
4464
4464
  const c = qe(...arguments);
4465
- c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
4465
+ c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(_({}, c.prop), {
4466
4466
  name: c.id
4467
4467
  }));
4468
4468
  }
@@ -4502,7 +4502,7 @@ function Xt(t) {
4502
4502
  }
4503
4503
  Re(z, E);
4504
4504
  function xt(c) {
4505
- let m = v({}, t);
4505
+ let m = _({}, t);
4506
4506
  return c ? m.inherit = {
4507
4507
  components: e,
4508
4508
  parsers: r,
@@ -4511,7 +4511,7 @@ function Xt(t) {
4511
4511
  providers: u,
4512
4512
  useApps: o,
4513
4513
  maker: f,
4514
- formulas: _,
4514
+ formulas: v,
4515
4515
  loadData: g
4516
4516
  } : delete m.inherit, Xt(m);
4517
4517
  }
@@ -4519,13 +4519,13 @@ function Xt(t) {
4519
4519
  s[c] = m;
4520
4520
  }
4521
4521
  function Yt(c, m) {
4522
- _[c] = m;
4522
+ v[c] = m;
4523
4523
  }
4524
4524
  function er(c, m) {
4525
4525
  const $ = n[c] || {}, b = $.parsers || {};
4526
4526
  m.parsers && Object.keys(m.parsers).forEach((w) => {
4527
4527
  b[w] = Re(m.parsers[w], je);
4528
- }), m.name = c, n[c] = q(v(v({}, $), m), { parsers: b });
4528
+ }), m.name = c, n[c] = q(_(_({}, $), m), { parsers: b });
4529
4529
  }
4530
4530
  function Oe(c) {
4531
4531
  c && Object.keys(M).forEach((m) => {
@@ -4569,7 +4569,7 @@ function Xt(t) {
4569
4569
  parsers: r,
4570
4570
  providers: u,
4571
4571
  modelFields: s,
4572
- formulas: _,
4572
+ formulas: v,
4573
4573
  isMobile: d,
4574
4574
  rules: c.$props.rule,
4575
4575
  name: c.$props.name || Pe(),
@@ -4748,7 +4748,7 @@ function Xt(t) {
4748
4748
  },
4749
4749
  initOptions() {
4750
4750
  this.options.value = {};
4751
- let c = v({
4751
+ let c = _({
4752
4752
  formData: {},
4753
4753
  submitBtn: {},
4754
4754
  resetBtn: {},
@@ -4761,7 +4761,7 @@ function Xt(t) {
4761
4761
  this.targetFormDriver("initOptions", c, { api: $, isSubForm: m }), this.updateOptions(c);
4762
4762
  },
4763
4763
  mergeOptions(c, m, $) {
4764
- return m = v({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4764
+ return m = _({}, m || {}), $ && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4765
4765
  delete m[b];
4766
4766
  }), m.global && (c.global = Xr(c.global, m.global), delete m.global), this.$handle.$manager.mergeOptions([m], c), c;
4767
4767
  },
@@ -4832,7 +4832,7 @@ function Xt(t) {
4832
4832
  C(c, {
4833
4833
  create: z,
4834
4834
  install(m, $) {
4835
- if (p = v(v({}, p), $ || {}), m._installedFormCreate === !0) return;
4835
+ if (p = _(_({}, p), $ || {}), m._installedFormCreate === !0) return;
4836
4836
  m._installedFormCreate = !0;
4837
4837
  const b = function(A, R = {}) {
4838
4838
  return z(A, R, this);
@@ -4847,7 +4847,7 @@ function Xt(t) {
4847
4847
  }
4848
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) {
4849
4849
  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(_, c.formulas);
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);
4851
4851
  }
4852
4852
  const ke = S();
4853
4853
  return Re(ke, E), Object.defineProperties(ke, {
@@ -5031,7 +5031,7 @@ function tn(t, e) {
5031
5031
  j(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
5032
5032
  }
5033
5033
  function ze(t) {
5034
- const e = v({}, t);
5034
+ const e = _({}, t);
5035
5035
  return delete e.children, e;
5036
5036
  }
5037
5037
  const rn = {
@@ -5079,7 +5079,7 @@ const rn = {
5079
5079
  update() {
5080
5080
  const t = this.options.form;
5081
5081
  this.rule = {
5082
- props: v({}, t),
5082
+ props: _({}, t),
5083
5083
  nativeOn: {
5084
5084
  submit: (e) => {
5085
5085
  e.preventDefault();
@@ -5102,7 +5102,7 @@ const rn = {
5102
5102
  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
5103
  delete r.wrap.class, delete r.wrap.title;
5104
5104
  const f = X(r.wrap.show) ? e : this.$r(x([r.wrap, {
5105
- props: q(v({
5105
+ props: q(_({
5106
5106
  labelWidth: o
5107
5107
  }, ze(r.wrap || {})), {
5108
5108
  prop: t.id,
@@ -5112,7 +5112,7 @@ const rn = {
5112
5112
  key: `${i}fi`,
5113
5113
  ref: t.wrapRef,
5114
5114
  type: "formItem"
5115
- }]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
5115
+ }]), _({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
5116
5116
  return a === !0 || X(l) || X(s.show) ? f : this.makeCol(r, i, [f]);
5117
5117
  },
5118
5118
  isTitle(t) {
@@ -5122,21 +5122,21 @@ const rn = {
5122
5122
  },
5123
5123
  makeInfo(t, e, r) {
5124
5124
  var u, f, p, d, g, y;
5125
- const i = v({}, t.title), s = v({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
5125
+ const i = _({}, t.title), s = _({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
5126
5126
  title: (f = (u = r.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value,
5127
5127
  rule: r.rule,
5128
5128
  options: this.options
5129
5129
  }) : ((d = (p = r.refRule) == null ? void 0 : p.__$title) == null ? void 0 : d.value) + (n.labelSuffix || n["label-suffix"] || "")];
5130
5130
  if (!X(s.show) && (s.info || s.native) && !X(s.icon)) {
5131
- const _ = {
5131
+ const v = {
5132
5132
  type: s.type || "poptip",
5133
5133
  props: ze(s),
5134
5134
  key: `${e}pop`,
5135
5135
  slot: "label"
5136
5136
  };
5137
- delete _.props.icon, delete _.props.show, delete _.props.info, delete _.props.align, delete _.props.native;
5137
+ delete v.props.icon, delete v.props.show, delete v.props.info, delete v.props.align, delete v.props.native;
5138
5138
  const E = "content";
5139
- s.info && !j(_.props, E) && (_.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, _]), [
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]), [
5140
5140
  this.$r({
5141
5141
  type: "icon",
5142
5142
  props: { type: s.icon === !0 ? Ie.infoIcon : s.icon, size: 16 },
@@ -5150,7 +5150,12 @@ const rn = {
5150
5150
  key: `${e}tit`,
5151
5151
  class: "fc-form-title",
5152
5152
  slot: i.slot || "label",
5153
- type: i.type || "span"
5153
+ type: i.type || "span",
5154
+ on: {
5155
+ click: (...v) => {
5156
+ this.$handle.targetHook(r, "titleClick", { args: v });
5157
+ }
5158
+ }
5154
5159
  }]);
5155
5160
  return delete l.props.show, delete l.props.title, delete l.props.native, this.$r(l, a);
5156
5161
  },
@@ -5189,7 +5194,7 @@ const rn = {
5189
5194
  }, [e]);
5190
5195
  },
5191
5196
  makeResetBtn() {
5192
- const t = v({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
5197
+ const t = _({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
5193
5198
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
5194
5199
  type: "button",
5195
5200
  props: t,
@@ -5205,7 +5210,7 @@ const rn = {
5205
5210
  }, [e]);
5206
5211
  },
5207
5212
  makeSubmitBtn() {
5208
- const t = v({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
5213
+ const t = _({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
5209
5214
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
5210
5215
  type: "button",
5211
5216
  props: t,
@@ -5280,7 +5285,11 @@ function cn(t, e) {
5280
5285
  },
5281
5286
  validate(r) {
5282
5287
  return new Promise((i, s) => {
5283
- const n = t.children, o = [e.$manager.validate()];
5288
+ const n = t.children, o = [new Promise((a, l) => {
5289
+ e.$manager.validate().then((u) => {
5290
+ u ? a(u) : l();
5291
+ });
5292
+ })];
5284
5293
  n.filter((a) => !a.isScope).forEach((a) => {
5285
5294
  o.push(a.validate());
5286
5295
  }), Promise.all(o).then(() => {
@@ -5374,7 +5383,7 @@ const Zt = {
5374
5383
  if (i.required === !1)
5375
5384
  t.clearProp(), r.clearValidateState([e.field]);
5376
5385
  else {
5377
- const o = v({
5386
+ const o = _({
5378
5387
  required: !0,
5379
5388
  validator(l, u, f) {
5380
5389
  h.empty(u) ? f(o.message) : f();
@@ -5409,7 +5418,7 @@ function dn(t) {
5409
5418
  function pn() {
5410
5419
  return Xt({
5411
5420
  ui: "view-design",
5412
- version: "2.7.17",
5421
+ version: "2.7.20",
5413
5422
  manager: rn,
5414
5423
  install: dn,
5415
5424
  extendApi: cn,