@form-create/element-ui 2.7.5 → 2.7.6

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/element-ui v2.7.5
3
+ * @form-create/element-ui v2.7.6
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 tr = Object.defineProperty, rr = Object.defineProperties;
11
11
  var ir = Object.getOwnPropertyDescriptors;
12
12
  var ot = Object.getOwnPropertySymbols;
13
13
  var nr = Object.prototype.hasOwnProperty, sr = Object.prototype.propertyIsEnumerable;
14
- var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
14
+ var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, v = (t, e) => {
15
15
  for (var r in e || (e = {}))
16
16
  nr.call(e, r) && at(t, r, e[r]);
17
17
  if (ot)
@@ -19,7 +19,7 @@ var at = (t, e, r) => e in t ? tr(t, e, { enumerable: !0, configurable: !0, writ
19
19
  sr.call(e, r) && at(t, r, e[r]);
20
20
  return t;
21
21
  }, q = (t, e) => rr(t, ir(e));
22
- import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as L, onMounted as cr, onBeforeUnmount as fr, onUpdated as hr, nextTick as I, markRaw as ge, computed as ye, toRef as je, ref as dr } from "vue";
22
+ import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as L, onMounted as fr, onBeforeUnmount as cr, onUpdated as hr, nextTick as I, markRaw as ge, computed as ye, toRef as je, ref as dr } from "vue";
23
23
  function pr(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
@@ -41,16 +41,16 @@ var mr = ["attrs", "props", "domProps"], gr = ["class", "style", "directives"],
41
41
  var a = e[i][o] instanceof Array ? e[i][o] : [e[i][o]], l = r[i][o] instanceof Array ? r[i][o] : [r[i][o]];
42
42
  e[i][o] = [].concat(a, l);
43
43
  } else e[i][o] = r[i][o];
44
- else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? vr(e[i][u], r[i][u]) : r[i][u];
44
+ else if (i === "hook") for (var u in r[i]) e[i][u] = e[i][u] ? br(e[i][u], r[i][u]) : r[i][u];
45
45
  else e[i] = r[i];
46
46
  return e;
47
47
  }, {});
48
- }, vr = function(t, e) {
48
+ }, br = function(t, e) {
49
49
  return function() {
50
50
  t && t.apply(this, arguments), e && e.apply(this, arguments);
51
51
  };
52
- }, br = $r;
53
- const V = /* @__PURE__ */ pr(br);
52
+ }, vr = $r;
53
+ const V = /* @__PURE__ */ pr(vr);
54
54
  function Ze(t, e) {
55
55
  return Object.keys(t).reduce((r, i) => (r.push(t[i]), r), []);
56
56
  }
@@ -111,7 +111,7 @@ const _r = "fcCheckbox", Cr = {
111
111
  input: this.onInput
112
112
  }
113
113
  }]), [this.options().map((e, r) => {
114
- const i = b({}, e), s = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox";
114
+ const i = v({}, e), s = this.type === "button" ? "ElCheckboxButton" : "ElCheckbox";
115
115
  return delete i.value, t(s, V([{}, {
116
116
  props: i
117
117
  }, {
@@ -469,7 +469,7 @@ const wr = "fcFrame", Fr = {
469
469
  src: this.previewImage
470
470
  }
471
471
  })]), t("el-dialog", V([{}, {
472
- props: q(b({
472
+ props: q(v({
473
473
  width: i,
474
474
  title: o,
475
475
  appendToBody: !0
@@ -496,7 +496,7 @@ const wr = "fcFrame", Fr = {
496
496
  mounted() {
497
497
  this.$on("fc.closeModal", this.closeModal);
498
498
  }
499
- }, Or = "fcRadio", Sr = {
499
+ }, Or = "fcRadio", kr = {
500
500
  name: Or,
501
501
  props: {
502
502
  formCreateInject: {
@@ -550,7 +550,7 @@ const wr = "fcFrame", Fr = {
550
550
  input: this.onInput
551
551
  }
552
552
  }]), [this.options().map((e, r) => {
553
- const i = b({}, e), s = this.type === "button" ? "ElRadioButton" : "ElRadio";
553
+ const i = v({}, e), s = this.type === "button" ? "ElRadioButton" : "ElRadio";
554
554
  return delete i.value, t(s, V([{}, {
555
555
  props: i
556
556
  }, {
@@ -594,7 +594,7 @@ const wr = "fcFrame", Fr = {
594
594
  function D(t, e) {
595
595
  return {}.hasOwnProperty.call(t, e);
596
596
  }
597
- const Er = "fcSelect", Rr = {
597
+ const Er = "fcSelect", Sr = {
598
598
  name: Er,
599
599
  functional: !0,
600
600
  props: {
@@ -626,8 +626,8 @@ const Er = "fcSelect", Rr = {
626
626
  mounted() {
627
627
  this.$emit("fc.el", this.$refs.el);
628
628
  }
629
- }, kr = "fcTree", Dr = {
630
- name: kr,
629
+ }, Rr = "fcTree", Dr = {
630
+ name: Rr,
631
631
  formCreateParser: {
632
632
  mergeProp(t) {
633
633
  const e = t.prop.props;
@@ -691,8 +691,8 @@ function ut(t, e) {
691
691
  uid: e
692
692
  };
693
693
  }
694
- function ct(t) {
695
- return q(b({}, t), {
694
+ function ft(t) {
695
+ return q(v({}, t), {
696
696
  file: t,
697
697
  value: t
698
698
  });
@@ -749,11 +749,11 @@ const Ar = "fcUpload", Vr = {
749
749
  };
750
750
  },
751
751
  created() {
752
- this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ut).map(ct);
752
+ this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(ut).map(ft);
753
753
  },
754
754
  watch: {
755
755
  value(t) {
756
- this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ut).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
756
+ this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(ut).map(ft), this.uploadList = this.$refs.upload.uploadFiles);
757
757
  },
758
758
  limit(t, e) {
759
759
  (e === 1 || t === 1) && this.update();
@@ -941,7 +941,7 @@ function Ce(t, e = {}, r) {
941
941
  }
942
942
  return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
943
943
  }
944
- function W(t) {
944
+ function K(t) {
945
945
  return Ce({}, { value: t }).value;
946
946
  }
947
947
  const Ir = Object.assign || function(t) {
@@ -954,7 +954,7 @@ function _() {
954
954
  return Ir.apply(this, arguments);
955
955
  }
956
956
  function Je(t) {
957
- return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : b({}, t);
957
+ return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : v({}, t);
958
958
  }
959
959
  const Pr = "fcGroup", Tr = {
960
960
  name: Pr,
@@ -1044,7 +1044,7 @@ const Pr = "fcGroup", Tr = {
1044
1044
  const n = i.$f.formData();
1045
1045
  i.$f.once("reloading", () => {
1046
1046
  i.$f.setValue(n);
1047
- }), i.rule = W(t);
1047
+ }), i.rule = K(t);
1048
1048
  }
1049
1049
  }
1050
1050
  });
@@ -1091,7 +1091,7 @@ const Pr = "fcGroup", Tr = {
1091
1091
  if (i.filter((n) => r[n].$f).length !== i.length)
1092
1092
  return;
1093
1093
  const s = i.map((n) => {
1094
- const o = t === n ? e : b({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
1094
+ const o = t === n ? e : v({}, this.cacheRule[n].$f.form), a = this.field ? o[this.field] || null : o;
1095
1095
  return this.cache(n, a), a;
1096
1096
  });
1097
1097
  this.input(s);
@@ -1103,13 +1103,13 @@ const Pr = "fcGroup", Tr = {
1103
1103
  }), this.cacheValue[t] !== JSON.stringify(r ? e[r] : e) && (this.cache(t, e), i && i.coverValue(e || {}));
1104
1104
  },
1105
1105
  addRule(t, e) {
1106
- const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? b({}, this.options) : {
1106
+ const r = this.formCreateInject.form.copyRules(this.formRule), i = this.options ? v({}, this.options) : {
1107
1107
  submitBtn: !1,
1108
1108
  resetBtn: !1
1109
1109
  };
1110
1110
  if (this.defaultValue) {
1111
1111
  i.formData || (i.formData = {});
1112
- const s = W(this.defaultValue);
1112
+ const s = K(this.defaultValue);
1113
1113
  _(i.formData, this.field ? {
1114
1114
  [this.field]: s
1115
1115
  } : s);
@@ -1136,7 +1136,7 @@ const Pr = "fcGroup", Tr = {
1136
1136
  if (this.disabled || this.onBeforeAdd(this.value) === !1)
1137
1137
  return;
1138
1138
  const e = [...this.value];
1139
- e.push(this.defaultValue ? W(this.defaultValue) : this.field ? null : {}), this.input(e);
1139
+ e.push(this.defaultValue ? K(this.defaultValue) : this.field ? null : {}), this.input(e);
1140
1140
  },
1141
1141
  del(t, e) {
1142
1142
  if (this.disabled || this.onBeforeRemove(this.value, t) === !1)
@@ -1227,7 +1227,7 @@ const Pr = "fcGroup", Tr = {
1227
1227
  const {
1228
1228
  rule: l,
1229
1229
  options: u
1230
- } = this.cacheRule[o], c = r && !s ? this.makeIcon(e.length, a, o) : [];
1230
+ } = this.cacheRule[o], f = r && !s ? this.makeIcon(e.length, a, o) : [];
1231
1231
  return t("div", {
1232
1232
  class: "_fc-group-container",
1233
1233
  key: o
@@ -1235,9 +1235,9 @@ const Pr = "fcGroup", Tr = {
1235
1235
  key: o
1236
1236
  }, {
1237
1237
  on: {
1238
- "update:value": (p) => this.formData(o, p),
1239
- "emit-event": (p, ...m) => this.emitEvent(p, m, a, o),
1240
- input: (p) => this.add$f(a, o, p)
1238
+ "update:value": (d) => this.formData(o, d),
1239
+ "emit-event": (d, ...g) => this.emitEvent(d, g, a, o),
1240
+ input: (d) => this.add$f(a, o, d)
1241
1241
  }
1242
1242
  }, {}, {
1243
1243
  props: {
@@ -1252,9 +1252,9 @@ const Pr = "fcGroup", Tr = {
1252
1252
  }
1253
1253
  }])), t("div", {
1254
1254
  class: "_fc-group-idx"
1255
- }, [a + 1]), c.length ? t("div", {
1255
+ }, [a + 1]), f.length ? t("div", {
1256
1256
  class: "_fc-group-handle fc-clock"
1257
- }, [c]) : null]);
1257
+ }, [f]) : null]);
1258
1258
  });
1259
1259
  return t("div", {
1260
1260
  key: "con",
@@ -1308,7 +1308,7 @@ const Pr = "fcGroup", Tr = {
1308
1308
  submitBtn: !1,
1309
1309
  resetBtn: !1
1310
1310
  };
1311
- t.formData = b({}, this.value || {}), this.cacheRule = {
1311
+ t.formData = v({}, this.value || {}), this.cacheRule = {
1312
1312
  rule: this.rule,
1313
1313
  options: t
1314
1314
  };
@@ -1348,8 +1348,8 @@ const Pr = "fcGroup", Tr = {
1348
1348
  }, Mr = [
1349
1349
  Cr,
1350
1350
  Fr,
1351
+ kr,
1351
1352
  Sr,
1352
- Rr,
1353
1353
  Dr,
1354
1354
  Vr,
1355
1355
  Tr,
@@ -1361,43 +1361,43 @@ function se(t, e) {
1361
1361
  r !== null && clearTimeout(r), r = setTimeout(() => t.call(this, ...i), e);
1362
1362
  };
1363
1363
  }
1364
- function be(t) {
1364
+ function ve(t) {
1365
1365
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
1366
1366
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
1367
1367
  }
1368
- const Ot = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1369
- const i = [...Ot, ...r.normal || []], s = [...St, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1368
+ const Ot = ["attrs", "props", "domProps", "scopedSlots"], kt = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1369
+ const i = [...Ot, ...r.normal || []], s = [...kt, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1370
1370
  return t.reduce((a, l) => {
1371
1371
  for (const u in l)
1372
1372
  if (a[u])
1373
1373
  if (o.indexOf(u) > -1)
1374
1374
  a[u] = ee([l[u]], a[u]);
1375
1375
  else if (i.indexOf(u) > -1)
1376
- a[u] = b(b({}, a[u]), l[u]);
1376
+ a[u] = v(v({}, a[u]), l[u]);
1377
1377
  else if (s.indexOf(u) > -1) {
1378
- const c = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
1379
- a[u] = [...c, ...p];
1378
+ const f = a[u] instanceof Array ? a[u] : [a[u]], d = l[u] instanceof Array ? l[u] : [l[u]];
1379
+ a[u] = [...f, ...d];
1380
1380
  } else if (n.indexOf(u) > -1)
1381
- for (const c in l[u])
1382
- if (a[u][c]) {
1383
- const p = a[u][c] instanceof Array ? a[u][c] : [a[u][c]], m = l[u][c] instanceof Array ? l[u][c] : [l[u][c]];
1384
- a[u][c] = [...p, ...m];
1381
+ for (const f in l[u])
1382
+ if (a[u][f]) {
1383
+ const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], g = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
1384
+ a[u][f] = [...d, ...g];
1385
1385
  } else
1386
- a[u][c] = l[u][c];
1386
+ a[u][f] = l[u][f];
1387
1387
  else if (u === "hook")
1388
- for (let c in l[u])
1389
- a[u][c] ? a[u][c] = Nr(a[u][c], l[u][c]) : a[u][c] = l[u][c];
1388
+ for (let f in l[u])
1389
+ a[u][f] ? a[u][f] = Nr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
1390
1390
  else
1391
1391
  a[u] = l[u];
1392
1392
  else
1393
- i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = b({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? b({}, l[u]) : l[u] : a[u] = l[u];
1393
+ 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];
1394
1394
  return a;
1395
1395
  }, e);
1396
1396
  }, Nr = (t, e) => function() {
1397
1397
  t && t.apply(this, arguments), e && e.apply(this, arguments);
1398
- }, Rt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], xe = ["effect", "deep", "renderSlots"];
1399
- function kt() {
1400
- return [...Rt, ...Ot, ...St, ...Et, ...Ye, ...xe];
1398
+ }, St = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Qe = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
1399
+ function Rt() {
1400
+ return [...St, ...Ot, ...kt, ...Et, ...Qe, ...Ye];
1401
1401
  }
1402
1402
  function Dt(t, e, r) {
1403
1403
  return `[form-create ${t}]: ${e}`;
@@ -1411,7 +1411,7 @@ function qr(t) {
1411
1411
  function jt(t) {
1412
1412
  return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
1413
1413
  }
1414
- const We = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
1414
+ const Ke = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
1415
1415
  function _e(t, e) {
1416
1416
  return JSON.stringify(Ce(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1417
1417
  if (!(i && i._isVue === !0)) {
@@ -1420,19 +1420,19 @@ function _e(t, e) {
1420
1420
  if (i.__json)
1421
1421
  return i.__json;
1422
1422
  if (i.__origin && (i = i.__origin), !i.__emit)
1423
- return We + i + Ke;
1423
+ return Ke + i + We;
1424
1424
  }
1425
1425
  }, e);
1426
1426
  }
1427
1427
  function Be(t) {
1428
1428
  return new Function("return " + t)();
1429
1429
  }
1430
- function z(t, e) {
1430
+ function x(t, e) {
1431
1431
  if (t && h.String(t) && t.length > 4) {
1432
1432
  let r = t.trim(), i = !1;
1433
1433
  try {
1434
- if (r.indexOf(Ke) > 0 && r.indexOf(We) === 0)
1435
- r = r.replace(Ke, "").replace(We, ""), i = !0;
1434
+ if (r.indexOf(We) > 0 && r.indexOf(Ke) === 0)
1435
+ r = r.replace(We, "").replace(Ke, ""), i = !0;
1436
1436
  else if (r.indexOf("$FN:") === 0)
1437
1437
  r = r.substring(4), i = !0;
1438
1438
  else if (r.indexOf("$EXEC:") === 0)
@@ -1468,7 +1468,7 @@ err: ${s}`);
1468
1468
  }
1469
1469
  function At(t, e) {
1470
1470
  return JSON.parse(t, function(r, i) {
1471
- return h.Undef(i) || !i.indexOf ? i : z(i, e);
1471
+ return h.Undef(i) || !i.indexOf ? i : x(i, e);
1472
1472
  });
1473
1473
  }
1474
1474
  let Ur = 0;
@@ -1482,7 +1482,7 @@ function oe(t, e, r) {
1482
1482
  s && ((!i[s] || typeof i[s] != "object") && E(i, s, {}), i = i[s]), s = n;
1483
1483
  }), E(i, s, r), i;
1484
1484
  }
1485
- function Xe(t, e) {
1485
+ function ze(t, e) {
1486
1486
  return {
1487
1487
  value: t,
1488
1488
  enumerable: !1,
@@ -1497,9 +1497,9 @@ function It(t, e) {
1497
1497
  return Ce([], [...t], e || !1);
1498
1498
  }
1499
1499
  function te(t, e) {
1500
- return ee(Array.isArray(e) ? e : [e], t, { array: Ye, normal: xe }), t;
1500
+ return ee(Array.isArray(e) ? e : [e], t, { array: Qe, normal: Ye }), t;
1501
1501
  }
1502
- function ft(t) {
1502
+ function ct(t) {
1503
1503
  const e = h.Function(t.getRule) ? t.getRule() : t;
1504
1504
  return e.type || (e.type = "input"), e;
1505
1505
  }
@@ -1515,7 +1515,7 @@ function Pt(t, e) {
1515
1515
  }
1516
1516
  }, r), {}));
1517
1517
  }
1518
- function x(t) {
1518
+ function Y(t) {
1519
1519
  return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
1520
1520
  }
1521
1521
  function F(t, e) {
@@ -1526,9 +1526,9 @@ function F(t, e) {
1526
1526
  }
1527
1527
  return e;
1528
1528
  }
1529
- function ze(t, e) {
1529
+ function xe(t, e) {
1530
1530
  let r = null;
1531
- return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => ze(i, e)) : r = t, r && e && H(r).forEach((i) => {
1531
+ return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
1532
1532
  (Array.isArray(i) ? i : [i]).forEach((n) => {
1533
1533
  n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
1534
1534
  });
@@ -1538,12 +1538,12 @@ function Gr(t, e) {
1538
1538
  if (h.Object(t)) {
1539
1539
  const r = {};
1540
1540
  return Object.keys(t).forEach((i) => {
1541
- r[i] = ze(t[i], i);
1541
+ r[i] = xe(t[i], i);
1542
1542
  }), r;
1543
1543
  } else
1544
- return ze(t, e);
1544
+ return xe(t, e);
1545
1545
  }
1546
- function Se() {
1546
+ function ke() {
1547
1547
  const t = {}, e = (r) => r || "default";
1548
1548
  return {
1549
1549
  setSlot(r, i) {
@@ -1582,9 +1582,9 @@ function Se() {
1582
1582
  function Ee(t, e) {
1583
1583
  return Object.setPrototypeOf(t, e), t;
1584
1584
  }
1585
- const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
1585
+ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
1586
1586
  "==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
1587
- "!=": (t, e) => !ce["=="](t, e),
1587
+ "!=": (t, e) => !fe["=="](t, e),
1588
1588
  ">": (t, e) => t > e,
1589
1589
  ">=": (t, e) => t >= e,
1590
1590
  "<": (t, e) => t < e,
@@ -1593,13 +1593,13 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1593
1593
  return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
1594
1594
  },
1595
1595
  notOn(t, e) {
1596
- return !ce.on(t, e);
1596
+ return !fe.on(t, e);
1597
1597
  },
1598
1598
  in(t, e) {
1599
1599
  return e && e.indexOf && e.indexOf(t) > -1;
1600
1600
  },
1601
1601
  notIn(t, e) {
1602
- return !ce.in(t, e);
1602
+ return !fe.in(t, e);
1603
1603
  },
1604
1604
  between(t, e) {
1605
1605
  return t > e[0] && t < e[1];
@@ -1636,15 +1636,15 @@ function dt(t) {
1636
1636
  n === 0 ? i = s : i += "." + s, r.push(i);
1637
1637
  }), r.join(" && ");
1638
1638
  }
1639
- const ke = (t, e) => {
1639
+ const Re = (t, e) => {
1640
1640
  if (!(!t || t === e || !t.$props)) {
1641
1641
  if (t.$props.formCreateInject)
1642
1642
  return t.$props.formCreateInject;
1643
1643
  if (t.$parent)
1644
- return ke(t.$parent, e);
1644
+ return Re(t.$parent, e);
1645
1645
  }
1646
1646
  };
1647
- function Wr(t, e, r) {
1647
+ function Kr(t, e, r) {
1648
1648
  const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1649
1649
  return {
1650
1650
  name: i,
@@ -1704,93 +1704,93 @@ function Wr(t, e, r) {
1704
1704
  a = a.parent;
1705
1705
  else
1706
1706
  a = n;
1707
- const { rule: l, value: u, subForm: c, inFor: p } = lt(s), m = ne({
1707
+ const { rule: l, value: u, subForm: f, inFor: d } = lt(s), g = ne({
1708
1708
  ctxInject: {},
1709
1709
  destroyed: !1,
1710
1710
  isShow: !0,
1711
1711
  unique: 1,
1712
1712
  renderRule: [...l.value || []],
1713
1713
  updateValue: JSON.stringify(u.value || {})
1714
- }), g = new t(n), $ = g.api(), w = p.value, O = () => {
1714
+ }), m = new t(n), $ = m.api(), w = d.value, O = () => {
1715
1715
  if (o) {
1716
- const S = ke(n, o);
1717
- if (S) {
1718
- let R;
1719
- w ? (R = H(S.getSubForm()), R.push($)) : R = $, S.subForm(R);
1716
+ const k = Re(n, o);
1717
+ if (k) {
1718
+ let S;
1719
+ w ? (S = H(k.getSubForm()), S.push($)) : S = $, k.subForm(S);
1720
1720
  }
1721
1721
  }
1722
1722
  }, G = () => {
1723
- const S = ke(n, o);
1724
- if (S)
1723
+ const k = Re(n, o);
1724
+ if (k)
1725
1725
  if (w) {
1726
- const R = H(S.getSubForm()), N = R.indexOf($);
1727
- N > -1 && R.splice(N, 1);
1726
+ const S = H(k.getSubForm()), N = S.indexOf($);
1727
+ N > -1 && S.splice(N, 1);
1728
1728
  } else
1729
- S.subForm();
1729
+ k.subForm();
1730
1730
  };
1731
1731
  let T = null;
1732
1732
  ur(() => {
1733
1733
  L(() => {
1734
- let S = "";
1735
- const R = s.option && s.option.globalClass || {};
1736
- Object.keys(R).forEach((N) => {
1734
+ let k = "";
1735
+ const S = s.option && s.option.globalClass || {};
1736
+ Object.keys(S).forEach((N) => {
1737
1737
  let pe = "";
1738
- R[N].style && Object.keys(R[N].style).forEach((K) => {
1739
- pe += be(K) + ":" + R[N].style[K] + ";";
1740
- }), R[N].content && (pe += R[N].content + ";"), pe && (S += `.${N}{${pe}}`);
1741
- }), s.option && s.option.style && (S += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = S || "";
1738
+ S[N].style && Object.keys(S[N].style).forEach((W) => {
1739
+ pe += ve(W) + ":" + S[N].style[W] + ";";
1740
+ }), S[N].content && (pe += S[N].content + ";"), pe && (k += `.${N}{${pe}}`);
1741
+ }), s.option && s.option.style && (k += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = k || "";
1742
1742
  }, () => {
1743
1743
  });
1744
1744
  });
1745
1745
  const M = se(() => {
1746
- g.bus.$emit("$loadData.$topForm");
1746
+ m.bus.$emit("$loadData.$topForm");
1747
1747
  }, 100), he = se(function() {
1748
- g.bus.$emit("$loadData.$scopeForm");
1748
+ m.bus.$emit("$loadData.$scopeForm");
1749
1749
  }, 100), Ve = se(() => {
1750
- g.bus.$emit("$loadData.$form");
1751
- }, 100), de = (S) => {
1752
- g.bus.$emit("change-$form." + S);
1750
+ m.bus.$emit("$loadData.$form");
1751
+ }, 100), de = (k) => {
1752
+ m.bus.$emit("change-$form." + k);
1753
1753
  };
1754
- return cr(() => {
1755
- o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
1756
- }), fr(() => {
1757
- o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), m.destroyed = !0, g.unmount();
1754
+ return fr(() => {
1755
+ o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), m.mounted();
1756
+ }), cr(() => {
1757
+ o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), g.destroyed = !0, m.unmount();
1758
1758
  }), hr(() => {
1759
- g.updated();
1760
- }), L(c, (S) => {
1761
- S ? O() : G();
1759
+ m.updated();
1760
+ }), L(f, (k) => {
1761
+ k ? O() : G();
1762
1762
  }, { immediate: !0 }), L(() => s.option, () => {
1763
- g.initOptions(), $.refresh();
1764
- }, { deep: !0 }), L(() => [...l.value], (S) => {
1765
- g.$handle.isBreakWatch() || S.length === m.renderRule.length && S.every((R) => m.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1763
+ m.initOptions(), $.refresh();
1764
+ }, { deep: !0 }), L(() => [...l.value], (k) => {
1765
+ m.$handle.isBreakWatch() || k.length === g.renderRule.length && k.every((S) => g.renderRule.indexOf(S) > -1) || (m.$handle.updateAppendData(), m.$handle.reloadRule(l.value), n.renderRule());
1766
1766
  }), L(() => [s.disabled, s.preview], () => {
1767
1767
  $.refresh();
1768
- }), L(u, (S) => {
1769
- _e(S || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(S || {}) : $.setValue(S || {}));
1768
+ }), L(u, (k) => {
1769
+ _e(k || {}) !== g.updateValue && ($.config.forceCoverValue ? $.coverValue(k || {}) : $.setValue(k || {}));
1770
1770
  }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1771
- $.coverValue({}), g.$handle.updateAppendData(), I(() => {
1771
+ $.coverValue({}), m.$handle.updateAppendData(), I(() => {
1772
1772
  I(() => {
1773
1773
  $.clearValidateState();
1774
1774
  });
1775
1775
  });
1776
- }, { flush: "sync" }), q(b({
1777
- fc: ge(g),
1776
+ }, { flush: "sync" }), q(v({
1777
+ fc: ge(m),
1778
1778
  parent: o && ge(o),
1779
1779
  top: ge(a),
1780
1780
  fapi: ge($)
1781
- }, lt(m)), {
1782
- getGroupInject: () => ke(n, o),
1781
+ }, lt(g)), {
1782
+ getGroupInject: () => Re(n, o),
1783
1783
  refresh() {
1784
- ++m.unique;
1784
+ ++g.unique;
1785
1785
  },
1786
1786
  renderRule() {
1787
- m.renderRule = [...l.value || []];
1787
+ g.renderRule = [...l.value || []];
1788
1788
  },
1789
- updateValue(S) {
1790
- if (m.destroyed) return;
1791
- const R = _e(S);
1792
- m.updateValue !== R && (m.updateValue = R, n.$emit("update:value", S), I(() => {
1793
- Ve(), o ? c.value || he() : (M(), he());
1789
+ updateValue(k) {
1790
+ if (g.destroyed) return;
1791
+ const S = _e(k);
1792
+ g.updateValue !== S && (g.updateValue = S, n.$emit("update:value", k), I(() => {
1793
+ Ve(), o ? f.value || he() : (M(), he());
1794
1794
  }));
1795
1795
  }
1796
1796
  });
@@ -1840,9 +1840,9 @@ function Bt(t) {
1840
1840
  };
1841
1841
  });
1842
1842
  }
1843
- Bt(kt());
1843
+ Bt(Rt());
1844
1844
  const Lt = P("");
1845
- function Kr(t, e, r) {
1845
+ function Wr(t, e, r) {
1846
1846
  let i = Lt("", e);
1847
1847
  return i._data.type = t, i._data.title = r, i;
1848
1848
  }
@@ -1850,15 +1850,15 @@ function pt(t, e, r, i) {
1850
1850
  let s = Lt("", r);
1851
1851
  return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
1852
1852
  }
1853
- function Xr() {
1853
+ function zr() {
1854
1854
  return {
1855
- create: Kr,
1855
+ create: Wr,
1856
1856
  createTmp: pt,
1857
1857
  template: pt,
1858
1858
  factory: P
1859
1859
  };
1860
1860
  }
1861
- function zr(t, e, r) {
1861
+ function xr(t, e, r) {
1862
1862
  const i = `fail to ${t} ${r.status}'`, s = new Error(i);
1863
1863
  return s.status = r.status, s.url = t, s;
1864
1864
  }
@@ -1887,7 +1887,7 @@ function Mt(t) {
1887
1887
  t.onError(o);
1888
1888
  }, e.onload = function() {
1889
1889
  if (e.status < 200 || e.status >= 300)
1890
- return t.onError(zr(r, t, e), mt(e));
1890
+ return t.onError(xr(r, t, e), mt(e));
1891
1891
  t.onSuccess(mt(e));
1892
1892
  }, e.open(t.method || "get", r, !0);
1893
1893
  let i;
@@ -1901,10 +1901,10 @@ function Mt(t) {
1901
1901
  }
1902
1902
  function gt(t, e, r) {
1903
1903
  return new Promise((i, s) => {
1904
- (e || Mt)(q(b({}, t), {
1904
+ (e || Mt)(q(v({}, t), {
1905
1905
  onSuccess(n) {
1906
1906
  let o = (l) => l;
1907
- const a = z(t.parse);
1907
+ const a = x(t.parse);
1908
1908
  h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), i(o(n, void 0, r));
1909
1909
  },
1910
1910
  onError(n) {
@@ -1913,18 +1913,18 @@ function gt(t, e, r) {
1913
1913
  }));
1914
1914
  });
1915
1915
  }
1916
- function ve(t) {
1917
- return W(t);
1916
+ function be(t) {
1917
+ return K(t);
1918
1918
  }
1919
- function Qr(t) {
1919
+ function Xr(t) {
1920
1920
  function e(n) {
1921
1921
  return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
1922
1922
  }
1923
1923
  function r(n, o, a) {
1924
- h.Undef(n) ? n = Object.keys(b(b({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1924
+ h.Undef(n) ? n = Object.keys(v(v({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1925
1925
  const u = t.fieldCtx[l] || t.nameCtx[l];
1926
- u && u.forEach((c) => {
1927
- E(c.rule, o, a), t.$render.clearCache(c);
1926
+ u && u.forEach((f) => {
1927
+ E(f.rule, o, a), t.$render.clearCache(f);
1928
1928
  });
1929
1929
  });
1930
1930
  }
@@ -1993,28 +1993,31 @@ function Qr(t) {
1993
1993
  return o > -1 ? o : void 0;
1994
1994
  }
1995
1995
  },
1996
+ get formulas() {
1997
+ return v({}, t.fc.formulas);
1998
+ },
1996
1999
  formData(n) {
1997
2000
  if (n == null || typeof n == "boolean") {
1998
2001
  const o = {};
1999
2002
  return Object.keys(t.form).forEach((a) => {
2000
- (n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = ve(t.form[a]));
2003
+ (n === !0 || t.ignoreFields.indexOf(a) === -1) && (o[a] = be(t.form[a]));
2001
2004
  }), o;
2002
2005
  } else
2003
2006
  return e(n).reduce((o, a) => (o[a] = s.getValue(a), o), {});
2004
2007
  },
2005
2008
  getValue(n) {
2006
2009
  const o = t.getFieldCtx(n);
2007
- return o ? ve(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? ve(t.appendData[n]) : void 0;
2010
+ return o ? be(o.rule.value) : t.options.appendValue !== !1 && D(t.appendData, n) ? be(t.appendData[n]) : void 0;
2008
2011
  },
2009
2012
  coverValue(n) {
2010
- const o = b({}, n || {});
2013
+ const o = v({}, n || {});
2011
2014
  t.deferSyncValue(() => {
2012
2015
  t.appendData = {}, s.fields().forEach((a) => {
2013
2016
  const l = t.fieldCtx[a];
2014
2017
  if (l) {
2015
2018
  const u = D(n, a);
2016
- l.forEach((c) => {
2017
- c.rule.value = u ? n[a] : void 0;
2019
+ l.forEach((f) => {
2020
+ f.rule.value = u ? n[a] : void 0;
2018
2021
  }), delete o[a];
2019
2022
  }
2020
2023
  }), _(t.appendData, o);
@@ -2041,7 +2044,7 @@ function Qr(t) {
2041
2044
  }, !0), o ? o.origin : void 0;
2042
2045
  },
2043
2046
  removeRule(n) {
2044
- const o = n && x(n);
2047
+ const o = n && Y(n);
2045
2048
  if (o)
2046
2049
  return o.rm(), o.origin;
2047
2050
  },
@@ -2051,24 +2054,24 @@ function Qr(t) {
2051
2054
  fields: () => t.fields(),
2052
2055
  append: (n, o, a) => {
2053
2056
  let l = t.sort.length - 1, u;
2054
- const c = t.getCtx(o);
2055
- if (c)
2057
+ const f = t.getCtx(o);
2058
+ if (f)
2056
2059
  if (a) {
2057
- if (u = c.getPending("children", c.rule.children), !Array.isArray(u)) return;
2058
- l = c.rule.children.length - 1;
2060
+ if (u = f.getPending("children", f.rule.children), !Array.isArray(u)) return;
2061
+ l = f.rule.children.length - 1;
2059
2062
  } else
2060
- l = c.root.indexOf(c.origin), u = c.root;
2063
+ l = f.root.indexOf(f.origin), u = f.root;
2061
2064
  else u = t.rules;
2062
2065
  u.splice(l + 1, 0, n);
2063
2066
  },
2064
2067
  prepend: (n, o, a) => {
2065
2068
  let l = 0, u;
2066
- const c = t.getCtx(o);
2067
- if (c)
2069
+ const f = t.getCtx(o);
2070
+ if (f)
2068
2071
  if (a) {
2069
- if (u = c.getPending("children", c.rule.children), !Array.isArray(u)) return;
2072
+ if (u = f.getPending("children", f.rule.children), !Array.isArray(u)) return;
2070
2073
  } else
2071
- l = c.root.indexOf(c.origin), u = c.root;
2074
+ l = f.root.indexOf(f.origin), u = f.root;
2072
2075
  else u = t.rules;
2073
2076
  u.splice(l, 0, n);
2074
2077
  },
@@ -2130,7 +2133,7 @@ function Qr(t) {
2130
2133
  n.forEach((a) => s.sync(a));
2131
2134
  return;
2132
2135
  }
2133
- let o = h.Object(n) ? x(n) : t.getCtxs(n);
2136
+ let o = h.Object(n) ? Y(n) : t.getCtxs(n);
2134
2137
  o && (o = Array.isArray(o) ? o : [o], o.forEach((a) => {
2135
2138
  if (!a.deleted) {
2136
2139
  const l = t.subForm[a.id];
@@ -2214,7 +2217,7 @@ function Qr(t) {
2214
2217
  resetFields(n) {
2215
2218
  e(n).forEach((o) => {
2216
2219
  t.getCtxs(o).forEach((a) => {
2217
- t.$render.clearCache(a), a.rule.value = ve(a.defaultValue);
2220
+ t.$render.clearCache(a), a.rule.value = be(a.defaultValue);
2218
2221
  });
2219
2222
  }), I(() => {
2220
2223
  I(() => {
@@ -2253,29 +2256,29 @@ function Qr(t) {
2253
2256
  return o ? t.subForm[o.id] : void 0;
2254
2257
  },
2255
2258
  getChildrenRuleList(n) {
2256
- const o = typeof n == "object", a = o ? x(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
2259
+ const o = typeof n == "object", a = o ? Y(n) : t.getCtx(n), l = a ? a.rule : o ? n : s.getRule(n);
2257
2260
  if (!l)
2258
2261
  return [];
2259
2262
  const u = [];
2260
- return ((p) => {
2261
- p && p.forEach((m) => {
2262
- typeof m == "object" && (m.field && u.push(m), u.push(...s.getChildrenRuleList(m)));
2263
+ return ((d) => {
2264
+ d && d.forEach((g) => {
2265
+ typeof g == "object" && (g.field && u.push(g), u.push(...s.getChildrenRuleList(g)));
2263
2266
  });
2264
2267
  })(a ? a.loadChildrenPending() : l.children), u;
2265
2268
  },
2266
2269
  getParentRule(n) {
2267
- return (typeof n == "object" ? x(n) : t.getCtx(n)).parent.rule;
2270
+ return (typeof n == "object" ? Y(n) : t.getCtx(n)).parent.rule;
2268
2271
  },
2269
2272
  getParentSubRule(n) {
2270
- const a = typeof n == "object" ? x(n) : t.getCtx(n);
2273
+ const a = typeof n == "object" ? Y(n) : t.getCtx(n);
2271
2274
  if (a) {
2272
2275
  const l = a.getParentGroup();
2273
2276
  if (l)
2274
2277
  return l.rule;
2275
2278
  }
2276
2279
  },
2277
- getChildrenFormData(n) {
2278
- return s.getChildrenRuleList(n).reduce((a, l) => (a[l.field] = ve(l.value), a), {});
2280
+ getChildrenFormData(n, o) {
2281
+ return s.getChildrenRuleList(n).reduce((l, u) => ((u.ignore !== !0 || o === !0) && (l[u.field] = be(u.value)), l), {});
2279
2282
  },
2280
2283
  setChildrenFormData(n, o, a) {
2281
2284
  const l = s.getChildrenRuleList(n);
@@ -2288,7 +2291,7 @@ function Qr(t) {
2288
2291
  getGlobalEvent(n) {
2289
2292
  let o = s.options.globalEvent[n];
2290
2293
  if (o)
2291
- return typeof o == "object" && (o = o.handle), z(o);
2294
+ return typeof o == "object" && (o = o.handle), x(o);
2292
2295
  },
2293
2296
  getGlobalData(n) {
2294
2297
  return new Promise((o, a) => {
@@ -2299,11 +2302,11 @@ function Qr(t) {
2299
2302
  });
2300
2303
  },
2301
2304
  renderRule(n, o, a) {
2302
- const u = typeof n == "object" ? x(n) : t.getCtx(n);
2305
+ const u = typeof n == "object" ? Y(n) : t.getCtx(n);
2303
2306
  return u ? t.$render.createRuleVnode(u, o, a) : void 0;
2304
2307
  },
2305
2308
  renderChildren(n, o, a) {
2306
- const u = typeof n == "object" ? x(n) : t.getCtx(n);
2309
+ const u = typeof n == "object" ? Y(n) : t.getCtx(n);
2307
2310
  return u ? t.$render.createChildrenVnodes(u, o, a) : void 0;
2308
2311
  },
2309
2312
  nextTick(n) {
@@ -2321,21 +2324,23 @@ function Qr(t) {
2321
2324
  bus: t.bus,
2322
2325
  fetch(n) {
2323
2326
  return new Promise((o, a) => {
2324
- n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2327
+ n = K(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2325
2328
  F(() => n.onSuccess && n.onSuccess(l)), o(l);
2326
2329
  }).catch((l) => {
2327
2330
  F(() => n.onError && n.onError(l)), a(l);
2328
- }));
2331
+ })).catch((l) => {
2332
+ });
2329
2333
  });
2330
2334
  },
2331
2335
  watchFetch(n, o, a, l) {
2332
- return t.fc.watchLoadData((u, c) => {
2333
- let p = W(n);
2334
- p = t.loadFetchVar(p, u), !(l && l(p, c) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((m) => {
2335
- F(() => p.onSuccess && p.onSuccess(m)), o && o(m, c);
2336
- }).catch((m) => {
2337
- F(() => p.onError && p.onError(m)), a && a(m);
2338
- }));
2336
+ return t.fc.watchLoadData((u, f) => {
2337
+ let d = K(n);
2338
+ d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => gt(d, t.fc.create.fetch, s).then((g) => {
2339
+ F(() => d.onSuccess && d.onSuccess(g)), o && o(g, f);
2340
+ }).catch((g) => {
2341
+ F(() => d.onError && d.onError(g)), a && a(g);
2342
+ })).catch((g) => {
2343
+ });
2339
2344
  }, n.wait == null ? 1e3 : n.wait);
2340
2345
  },
2341
2346
  getData(n, o) {
@@ -2405,7 +2410,7 @@ function J(t) {
2405
2410
  function Nt(t) {
2406
2411
  return t.replace(t[0], t[0].toLowerCase());
2407
2412
  }
2408
- function Yr(t) {
2413
+ function Qr(t) {
2409
2414
  _(t.prototype, {
2410
2415
  initRender() {
2411
2416
  this.cacheConfig = {};
@@ -2414,7 +2419,7 @@ function Yr(t) {
2414
2419
  const r = (i) => {
2415
2420
  if (i) {
2416
2421
  let s;
2417
- 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);
2422
+ return e.rule.field && (s = i.$scopedSlots["field-" + ve(e.rule.field)] || i.$scopedSlots["field-" + e.rule.field]), s || (s = i.$scopedSlots["type-" + ve(e.type)] || i.$scopedSlots["type-" + e.type]), s || r(i.$pfc);
2418
2423
  }
2419
2424
  };
2420
2425
  return r(this.vm);
@@ -2423,7 +2428,7 @@ function Yr(t) {
2423
2428
  if (!this.vm.isShow)
2424
2429
  return;
2425
2430
  this.$manager.beforeRender();
2426
- const e = Se();
2431
+ const e = ke();
2427
2432
  return this.sort.forEach((r) => {
2428
2433
  this.renderSlot(e, this.$handle.ctxs[r]);
2429
2434
  }), this.$manager.render(e);
@@ -2485,10 +2490,10 @@ function Yr(t) {
2485
2490
  slotValue: l
2486
2491
  };
2487
2492
  l.length && i.slotUpdate && F(() => i.slotUpdate(u));
2488
- let c = [];
2489
- const p = e.loadChildrenPending();
2490
- e.parser.renderChildren ? c = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2491
- c.push(this.renderRule({
2493
+ let f = [];
2494
+ const d = e.loadChildrenPending();
2495
+ e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2496
+ f.push(this.renderRule({
2492
2497
  type: "template",
2493
2498
  slot: $
2494
2499
  }, (() => {
@@ -2498,9 +2503,9 @@ function Yr(t) {
2498
2503
  return this.renderRule(w);
2499
2504
  })()));
2500
2505
  });
2501
- const m = this.getTypeSlot(e);
2502
- let g;
2503
- return m ? (u.children = c, g = m(u)) : g = a ? e.parser.preview(Je(c), e) : e.parser.render(Je(c), 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(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2506
+ const g = this.getTypeSlot(e);
2507
+ let m;
2508
+ return g ? (u.children = f, m = g(u)) : m = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(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(($) => !$ || !$.tag ? $ : this.none($)) : m = this.none(m)), o && this.setCache(e, () => this.stable(m), r), m;
2504
2509
  }, this.setCache(e, s, r);
2505
2510
  }
2506
2511
  return (...s) => {
@@ -2567,8 +2572,8 @@ function Yr(t) {
2567
2572
  preview: e.prop.preview,
2568
2573
  options: e.prop.options,
2569
2574
  prop: function() {
2570
- const s = b({}, e.prop);
2571
- return s.on = s.on ? b({}, s.on) : {}, delete s.model, s;
2575
+ const s = v({}, e.prop);
2576
+ return s.on = s.on ? v({}, s.on) : {}, delete s.model, s;
2572
2577
  }(),
2573
2578
  children: e.loadChildrenPending()
2574
2579
  }), i;
@@ -2576,7 +2581,7 @@ function Yr(t) {
2576
2581
  ctxProp(e) {
2577
2582
  const { ref: r, key: i, rule: s } = e;
2578
2583
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2579
- const n = b({}, e.prop.on || {}), o = {};
2584
+ const n = v({}, e.prop.on || {}), o = {};
2580
2585
  Object.keys(n).forEach((l) => {
2581
2586
  l.indexOf("native.") === 0 && (o[l.replace("native.", "")] = n[l], delete n[l]);
2582
2587
  }), e.prop.on = n;
@@ -2632,7 +2637,7 @@ function Yr(t) {
2632
2637
  },
2633
2638
  renderChildren(e, r, i) {
2634
2639
  if (!h.trueArray(e)) return [];
2635
- const s = Se();
2640
+ const s = ke();
2636
2641
  return e.map((n) => {
2637
2642
  if (n) {
2638
2643
  if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
@@ -2658,7 +2663,7 @@ function Yr(t) {
2658
2663
  },
2659
2664
  createRuleVnode(e, r, i) {
2660
2665
  this.force = i !== !1, this.tmpInput = r;
2661
- const s = Se();
2666
+ const s = ke();
2662
2667
  return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
2663
2668
  },
2664
2669
  renderRule(e, r, i) {
@@ -2673,16 +2678,16 @@ function Yr(t) {
2673
2678
  a && (s = J(a));
2674
2679
  }
2675
2680
  if (!s) return;
2676
- const n = Se();
2681
+ const n = ke();
2677
2682
  h.trueArray(e.children) && e.children.forEach((a) => {
2678
2683
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2679
2684
  });
2680
- const o = b({}, e);
2685
+ const o = v({}, e);
2681
2686
  return delete o.type, delete o.is, this.vNode.make(s, o, n.mergeBag(r).getSlots());
2682
2687
  }
2683
2688
  });
2684
2689
  }
2685
- let xr = 1;
2690
+ let Yr = 1;
2686
2691
  function rt(t) {
2687
2692
  _(this, {
2688
2693
  $handle: t,
@@ -2692,7 +2697,7 @@ function rt(t) {
2692
2697
  vNode: new t.fc.CreateNode(t.vm),
2693
2698
  force: !1,
2694
2699
  tmpInput: null,
2695
- id: xr++
2700
+ id: Yr++
2696
2701
  }), Pt(this, {
2697
2702
  options() {
2698
2703
  return t.options;
@@ -2703,7 +2708,7 @@ function rt(t) {
2703
2708
  }), this.initCache(), this.initRender();
2704
2709
  }
2705
2710
  Zr(rt);
2706
- Yr(rt);
2711
+ Qr(rt);
2707
2712
  function ei(t) {
2708
2713
  _(t.prototype, {
2709
2714
  parseInjectEvent(e, r) {
@@ -2722,26 +2727,26 @@ function ei(t) {
2722
2727
  if (!s && Array.isArray(r) && r[0] && (h.String(r[0]) || h.Function(r[0])))
2723
2728
  return this.parseEventLst(e, r, i, !0);
2724
2729
  if (h.String(r)) {
2725
- const n = z(r);
2730
+ const n = x(r);
2726
2731
  if (n && r !== n)
2727
2732
  return n.__inject ? this.parseEvent(e, n, i, !0) : n;
2728
2733
  }
2729
2734
  },
2730
2735
  parseEmit(e, r) {
2731
2736
  let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
2732
- return h.trueArray(u) && u.forEach((c) => {
2733
- if (!c) return;
2734
- let p, m = n || o || a;
2735
- if (h.Object(c) && (p = c.inject, c = c.name, m = c.prefix || m), m) {
2736
- r || (m = `native-${m}`);
2737
- const g = be(`${m}-${c}`), $ = (...w) => {
2738
- this.vm.$emit(g, ...w), this.vm.$emit("emit-event", g, ...w), this.bus.$emit(g, ...w);
2737
+ return h.trueArray(u) && u.forEach((f) => {
2738
+ if (!f) return;
2739
+ let d, g = n || o || a;
2740
+ if (h.Object(f) && (d = f.inject, f = f.name, g = f.prefix || g), g) {
2741
+ r || (g = `native-${g}`);
2742
+ const m = ve(`${g}-${f}`), $ = (...w) => {
2743
+ this.vm.$emit(m, ...w), this.vm.$emit("emit-event", m, ...w), this.bus.$emit(m, ...w);
2739
2744
  };
2740
- if ($.__emit = !0, !p && l === !1)
2741
- i[c] = $;
2745
+ if ($.__emit = !0, !d && l === !1)
2746
+ i[f] = $;
2742
2747
  else {
2743
- let w = p || l || this.options.injectEvent;
2744
- i[c] = h.Undef(w) ? $ : this.inject(s, $, w);
2748
+ let w = d || l || this.options.injectEvent;
2749
+ i[f] = h.Undef(w) ? $ : this.inject(s, $, w);
2745
2750
  }
2746
2751
  }
2747
2752
  }), e.computed[r ? "on" : "nativeOn"] = i, i;
@@ -2776,16 +2781,16 @@ function ei(t) {
2776
2781
  if (n.forEach((a) => {
2777
2782
  const l = a.split("||"), u = l[0].trim();
2778
2783
  if (u) {
2779
- const c = (l[1] || "").trim();
2780
- let p, m = !1;
2784
+ const f = (l[1] || "").trim();
2785
+ let d, g = !1;
2781
2786
  if (i && u.indexOf("$form.") === 0) {
2782
- const g = u.split(".");
2783
- g.shift(), D(i.value, g[0]) && (m = !0, p = r ? r({
2784
- id: "$form." + g[0] + "_" + i.rule.__fc__.id,
2785
- getValue: () => B(i.value, g)
2786
- }) : B(i.value, g));
2787
+ const m = u.split(".");
2788
+ m.shift(), D(i.value, m[0]) && (g = !0, d = r ? r({
2789
+ id: "$form." + m[0] + "_" + i.rule.__fc__.id,
2790
+ getValue: () => B(i.value, m)
2791
+ }) : B(i.value, m));
2787
2792
  }
2788
- m || (p = r ? r(u, c) : this.fc.getLoadData(u, c)), o = p, e = e.replaceAll(`{{${a}}}`, p == null ? "" : p);
2793
+ g || (d = r ? r(u, f) : this.fc.getLoadData(u, f)), o = d, e = e.replaceAll(`{{${a}}}`, d == null ? "" : d);
2789
2794
  }
2790
2795
  }), n.length === 1 && s === `{{${n[0]}}}`)
2791
2796
  return o;
@@ -2848,9 +2853,9 @@ function ii(t) {
2848
2853
  }
2849
2854
  function ni(t) {
2850
2855
  Object.defineProperties(t.origin, {
2851
- __fc__: Xe(ge(t), !0)
2856
+ __fc__: ze(ge(t), !0)
2852
2857
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2853
- __fc__: Xe(ge(t), !0)
2858
+ __fc__: ze(ge(t), !0)
2854
2859
  });
2855
2860
  }
2856
2861
  function qt(t, e, r) {
@@ -2872,14 +2877,14 @@ function qt(t, e, r) {
2872
2877
  parent: null,
2873
2878
  group: e.subRule ? this : null,
2874
2879
  cacheConfig: null,
2875
- prop: b({}, e),
2880
+ prop: v({}, e),
2876
2881
  computed: {},
2877
2882
  payload: {},
2878
2883
  refRule: {},
2879
2884
  input: s,
2880
2885
  el: void 0,
2881
2886
  exportEl: void 0,
2882
- defaultValue: s ? W(r) : void 0,
2887
+ defaultValue: s ? K(r) : void 0,
2883
2888
  field: e.field || void 0
2884
2889
  }), this.updateKey(), ni(this), this.update(t, !0);
2885
2890
  }
@@ -2920,8 +2925,8 @@ _(qt.prototype, {
2920
2925
  rule: this.rule,
2921
2926
  api: this.$api,
2922
2927
  update: (u) => {
2923
- const c = u || i, p = this.getPending(e, i);
2924
- this.setPending(e, r, c), o && o(c, p);
2928
+ const f = u || i, d = this.getPending(e, i);
2929
+ this.setPending(e, r, f), o && o(f, d);
2925
2930
  },
2926
2931
  reload: () => {
2927
2932
  const u = this.getPending(e, i);
@@ -2929,8 +2934,8 @@ _(qt.prototype, {
2929
2934
  }
2930
2935
  }));
2931
2936
  l && h.Function(l.then) ? (l.then((u) => {
2932
- const c = u || i;
2933
- this.setPending(e, r, c), s && s(c), this.$api && this.$api.sync(this.rule);
2937
+ const f = u || i;
2938
+ this.setPending(e, r, f), s && s(f), this.$api && this.$api.sync(this.rule);
2934
2939
  }).catch((u) => {
2935
2940
  console.error(u);
2936
2941
  }), a = i, this.setPending(e, r, a)) : (a = l || i, this.setPending(e, r, a), s && s(a));
@@ -2963,7 +2968,7 @@ _(qt.prototype, {
2963
2968
  },
2964
2969
  initProp() {
2965
2970
  var e, r;
2966
- const t = b({}, this.rule);
2971
+ const t = v({}, this.rule);
2967
2972
  delete t.children, delete t.validate, this.prop = te({}, [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 || []];
2968
2973
  },
2969
2974
  initNone() {
@@ -3039,12 +3044,12 @@ function si(t) {
3039
3044
  });
3040
3045
  },
3041
3046
  parseRule(e) {
3042
- const r = ft(e);
3047
+ const r = ct(e);
3043
3048
  return Object.defineProperties(r, {
3044
- __origin__: Xe(e, !0)
3049
+ __origin__: ze(e, !0)
3045
3050
  }), oi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
3046
3051
  i && this.loadFn(i, r);
3047
- }), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
3052
+ }), this.loadCtrl(r), r.update && (r.update = x(r.update)), r;
3048
3053
  },
3049
3054
  loadFn(e, r) {
3050
3055
  ["on", "props", "nativeOn", "deep"].forEach((i) => {
@@ -3053,7 +3058,7 @@ function si(t) {
3053
3058
  },
3054
3059
  loadCtrl(e) {
3055
3060
  e.control && e.control.forEach((r) => {
3056
- r.handle && (r.handle = z(r.handle));
3061
+ r.handle && (r.handle = x(r.handle));
3057
3062
  });
3058
3063
  },
3059
3064
  syncProp(e) {
@@ -3089,37 +3094,37 @@ function si(t) {
3089
3094
  if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
3090
3095
  if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
3091
3096
  return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
3092
- let l = ft(o);
3097
+ let l = ct(o);
3093
3098
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3094
3099
  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);
3095
- let c, p = !1, m = !!o.__fc__, g = l.value;
3096
- if (m) {
3097
- if (c = o.__fc__, g = c.defaultValue, c.deleted) {
3098
- if ($t(c))
3100
+ let f, d = !1, g = !!o.__fc__, m = l.value;
3101
+ if (g) {
3102
+ if (f = o.__fc__, m = f.defaultValue, f.deleted) {
3103
+ if ($t(f))
3099
3104
  return;
3100
- c.update(this);
3101
- } else if (!c.check(this)) {
3102
- if ($t(c))
3105
+ f.update(this);
3106
+ } else if (!f.check(this)) {
3107
+ if ($t(f))
3103
3108
  return;
3104
- e[a] = o = o._clone ? o._clone() : At(_e(o)), c = null, p = !0;
3109
+ e[a] = o = o._clone ? o._clone() : At(_e(o)), f = null, d = !0;
3105
3110
  }
3106
3111
  }
3107
- if (c)
3108
- c.originType !== c.rule.type && c.updateType(), this.bindParser(c), this.appendValue(c.rule), c.parent && c.parent !== r && this.rmSubRuleData(c);
3112
+ if (f)
3113
+ f.originType !== f.rule.type && f.updateType(), this.bindParser(f), this.appendValue(f.rule), f.parent && f.parent !== r && this.rmSubRuleData(f);
3109
3114
  else {
3110
3115
  const O = this.parseRule(o);
3111
- c = new qt(this, O, g), this.bindParser(c);
3116
+ f = new qt(this, O, m), this.bindParser(f);
3112
3117
  }
3113
- [!1, !0].forEach((O) => this.parseEmit(c, O)), this.syncProp(c), c.parent = r || null, c.root = e, this.setCtx(c), !p && !m && (this.effect(c, "load"), this.targetHook(c, "load")), this.effect(c, "created");
3114
- const $ = c.loadChildrenPending();
3115
- if (c.parser.loadChildren === !1 || s($, c), !r) {
3118
+ [!1, !0].forEach((O) => this.parseEmit(f, O)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !g && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
3119
+ const $ = f.loadChildrenPending();
3120
+ if (f.parser.loadChildren === !1 || s($, f), !r) {
3116
3121
  const O = i(a);
3117
- O > -1 || !a ? this.sort.splice(O + 1, 0, c.id) : this.sort.push(c.id);
3122
+ O > -1 || !a ? this.sort.splice(O + 1, 0, f.id) : this.sort.push(f.id);
3118
3123
  }
3119
- const w = c.rule;
3120
- return c.updated || (c.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
3121
- this.refreshUpdate(c, w.value, "init");
3122
- }), this.effect(c, "loaded")), this.refreshControl(c) && (this.cycleLoad = !0), c;
3124
+ const w = f.rule;
3125
+ return f.updated || (f.updated = !0, h.Function(w.update) && this.bus.$once("load-end", () => {
3126
+ this.refreshUpdate(f, w.value, "init");
3127
+ }), this.effect(f, "loaded")), this.refreshControl(f) && (this.cycleLoad = !0), f;
3123
3128
  }).filter((o) => !!o);
3124
3129
  r && (r.children = n);
3125
3130
  },
@@ -3130,28 +3135,28 @@ function si(t) {
3130
3135
  const r = ai(e), i = [], s = this.api;
3131
3136
  if (!r.length) return !1;
3132
3137
  for (let a = 0; a < r.length; a++) {
3133
- const l = r[a], u = l.handle || function(p) {
3134
- return (ce[l.condition || "=="] || ce["=="])(p, l.value);
3138
+ const l = r[a], u = l.handle || function(d) {
3139
+ return (fe[l.condition || "=="] || fe["=="])(d, l.value);
3135
3140
  };
3136
3141
  if (!h.trueArray(l.rule)) continue;
3137
- const c = q(b({}, l), {
3142
+ const f = q(v({}, l), {
3138
3143
  valid: F(() => u(e.rule.value, s)),
3139
3144
  ctrl: li(e, l.rule),
3140
3145
  isHidden: h.String(l.rule[0])
3141
3146
  });
3142
- c.valid && c.ctrl || !c.valid && !c.ctrl && !c.isHidden || i.push(c);
3147
+ f.valid && f.ctrl || !f.valid && !f.ctrl && !f.isHidden || i.push(f);
3143
3148
  }
3144
3149
  if (!i.length) return !1;
3145
3150
  const n = [];
3146
3151
  let o = !1;
3147
3152
  return this.deferSyncValue(() => {
3148
- i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: c, append: p, child: m, ctrl: g, method: $ }) => {
3153
+ i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: g, ctrl: m, method: $ }) => {
3149
3154
  if (a) {
3150
3155
  l ? e.ctrlRule.push({
3151
3156
  __ctrl: !0,
3152
3157
  children: u,
3153
3158
  valid: l
3154
- }) : g && e.ctrlRule.splice(e.ctrlRule.indexOf(g) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3159
+ }) : m && e.ctrlRule.splice(e.ctrlRule.indexOf(m) >>> 0, 1), n[l ? "push" : "unshift"](() => {
3155
3160
  $ === "disabled" || $ === "enabled" ? this.api.disabled(!l, u) : $ === "display" || $ === "show" ? this.api.display(l, u) : $ === "required" ? (u.forEach((w) => {
3156
3161
  this.api.setEffect(w, "required", l);
3157
3162
  }), l || this.api.clearValidateState(u)) : $ === "if" ? this.api.hidden(!l, u) : this.api.hidden(!l, u);
@@ -3167,11 +3172,11 @@ function si(t) {
3167
3172
  children: u
3168
3173
  };
3169
3174
  e.ctrlRule.push(w), this.bus.$once("load-start", () => {
3170
- c ? s.prepend(w, c, m) : p || m ? s.append(w, p || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3175
+ f ? s.prepend(w, f, g) : d || g ? s.append(w, d || e.id, g) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3171
3176
  });
3172
3177
  } else {
3173
- e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
3174
- const w = x(g);
3178
+ e.ctrlRule.splice(e.ctrlRule.indexOf(m), 1);
3179
+ const w = Y(m);
3175
3180
  w && w.rm();
3176
3181
  }
3177
3182
  });
@@ -3186,7 +3191,7 @@ function si(t) {
3186
3191
  },
3187
3192
  _reloadRule(e) {
3188
3193
  e || (e = this.rules);
3189
- const r = b({}, this.ctxs);
3194
+ const r = v({}, this.ctxs);
3190
3195
  this.clearNextTick(), this.initData(e), this.fc.rules = e, this.deferSyncValue(() => {
3191
3196
  this.bus.$once("load-end", () => {
3192
3197
  Object.keys(r).filter((i) => this.ctxs[i] === void 0).forEach((i) => this.rmCtx(r[i])), this.$render.clearCacheAll();
@@ -3289,7 +3294,7 @@ function ui(t) {
3289
3294
  }), this.vm.updateValue(e);
3290
3295
  },
3291
3296
  isChange(e, r) {
3292
- return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
3297
+ return JSON.stringify(this.getFormData(e), bt) !== JSON.stringify(r, bt);
3293
3298
  },
3294
3299
  isQuote(e, r) {
3295
3300
  return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
@@ -3322,7 +3327,7 @@ function ui(t) {
3322
3327
  }
3323
3328
  });
3324
3329
  }
3325
- function vt(t, e) {
3330
+ function bt(t, e) {
3326
3331
  return typeof e == "function" ? "" + e : e;
3327
3332
  }
3328
3333
  const De = {
@@ -3344,8 +3349,8 @@ const De = {
3344
3349
  },
3345
3350
  mergeProp(t) {
3346
3351
  }
3347
- }, ci = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
3348
- function fi(t) {
3352
+ }, fi = ["field", "value", "vm", "template", "name", "config", "control", "inject", "sync", "payload", "optionsTo", "update", "slotUpdate", "computed", "component", "cache"];
3353
+ function ci(t) {
3349
3354
  _(t.prototype, {
3350
3355
  getCtx(e) {
3351
3356
  return this.getFieldCtx(e) || this.getNameCtx(e)[0] || this.ctxs[e];
@@ -3393,7 +3398,7 @@ function fi(t) {
3393
3398
  this.noWatchFn || (this.noWatchFn = e), F(e), this.noWatchFn === e && (this.noWatchFn = null);
3394
3399
  },
3395
3400
  watchCtx(e) {
3396
- if (kt().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
3401
+ if (Rt().filter((i) => i[0] !== "_" && i[0] !== "$" && fi.indexOf(i) === -1).forEach((i) => {
3397
3402
  const s = je(e.rule, i), n = i === "children";
3398
3403
  e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3399
3404
  let l = s.value;
@@ -3429,27 +3434,38 @@ function fi(t) {
3429
3434
  s && (i = this.api.t(s[1]));
3430
3435
  }
3431
3436
  return i;
3432
- }), e.refRule.__$validate = ye(() => H(e.rule.validate).map((i) => {
3433
- var n, o;
3434
- const s = b({}, i);
3435
- if (s.message) {
3436
- const a = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3437
- a && (s.message = this.api.t(a[1], { title: (o = (n = e.refRule) == null ? void 0 : n.__$title) == null ? void 0 : o.value }));
3438
- }
3439
- if (h.Function(s.validator)) {
3440
- const a = e;
3441
- return s.validator = function(...l) {
3442
- return i.validator.call({
3443
- that: this,
3444
- id: a.id,
3445
- field: a.field,
3446
- rule: a.rule,
3447
- api: a.$handle.api
3448
- }, ...l);
3449
- }, s;
3450
- }
3451
- return s;
3452
- })), e.input) {
3437
+ }), e.refRule.__$validate = ye(() => {
3438
+ const i = (s) => {
3439
+ var o, a;
3440
+ const n = s.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
3441
+ return n ? this.api.t(n[1], { title: (a = (o = e.refRule) == null ? void 0 : o.__$title) == null ? void 0 : a.value }) : s;
3442
+ };
3443
+ return H(e.rule.validate).map((s) => {
3444
+ const n = v({}, s);
3445
+ if (n.message && (n.message = i(n.message)), h.Function(n.validator)) {
3446
+ const o = e;
3447
+ n.validator = function(...a) {
3448
+ return s.validator.call({
3449
+ that: this,
3450
+ id: o.id,
3451
+ field: o.field,
3452
+ rule: o.rule,
3453
+ api: o.$handle.api
3454
+ }, ...a);
3455
+ };
3456
+ }
3457
+ if (n.adapter) {
3458
+ if (typeof n.error == "object") {
3459
+ const o = v({}, n.error);
3460
+ Object.keys(o).forEach((a) => {
3461
+ o[a] = i(o[a]);
3462
+ }), n.error = o;
3463
+ }
3464
+ return this.adapterValidate(n, e);
3465
+ }
3466
+ return n;
3467
+ });
3468
+ }), e.input) {
3453
3469
  const i = je(e.rule, "value");
3454
3470
  e.watch.push(L(() => i.value, () => {
3455
3471
  let s = e.parser.toFormValue(i.value, e);
@@ -3476,6 +3492,115 @@ function fi(t) {
3476
3492
  }));
3477
3493
  }), this.watchEffect(e);
3478
3494
  },
3495
+ adapterValidate(e, r) {
3496
+ const i = (s, n) => {
3497
+ if ((e.beforeValidate && F(() => e.beforeValidate({
3498
+ value: s,
3499
+ api: this.api,
3500
+ validate: e,
3501
+ rule: r.rule
3502
+ }))) === !1)
3503
+ n();
3504
+ else {
3505
+ const a = this.validator(s, e);
3506
+ if (a) {
3507
+ let l = "";
3508
+ typeof e.error == "object" && (l = e.error[a] || e.error.default), !l && typeof e.message == "string" && (l = e.message), l || (l = this.getValidateMessage(r, { key: a, rule: e[a] })), n(l);
3509
+ } else if (e.validator) {
3510
+ const l = e.validator && F(() => e.validator(s, n));
3511
+ l && h.Function(l.then) && l.then(() => n()).catch((u) => n(u));
3512
+ } else
3513
+ n();
3514
+ }
3515
+ };
3516
+ return this.$manager.adapterValidate({
3517
+ required: e.required,
3518
+ message: e.message,
3519
+ target: e.trigger
3520
+ }, i);
3521
+ },
3522
+ getValidateMessage(e, r) {
3523
+ var s, n;
3524
+ const i = Array.isArray(r.rule) ? r.rule.join(",") : "" + r.rule;
3525
+ return this.api.t(r.key === "required" ? r.key : "validate." + r.key, {
3526
+ [r.key]: i,
3527
+ title: (n = (s = e.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value
3528
+ });
3529
+ },
3530
+ validator(e, r) {
3531
+ if (h.empty(e))
3532
+ return r.required ? "required" : void 0;
3533
+ for (const [s, n] of Object.entries(r))
3534
+ switch (s) {
3535
+ case "len":
3536
+ case "maxLen":
3537
+ case "minLen":
3538
+ const o = (m) => s === "len" ? m === n : s === "maxLen" ? m <= n : m >= n;
3539
+ if (Array.isArray(e)) {
3540
+ if (!o(e.length))
3541
+ return s;
3542
+ } else {
3543
+ if (typeof e == "object")
3544
+ return s;
3545
+ if (!o(("" + e).length))
3546
+ return s;
3547
+ }
3548
+ break;
3549
+ case "pattern":
3550
+ if (!(typeof n == "string" ? new RegExp(n) : n).test("" + e))
3551
+ return s;
3552
+ break;
3553
+ case "uppercase":
3554
+ if (n && (typeof e != "string" || !/^[A-Z]*$/.test(e)))
3555
+ return s;
3556
+ break;
3557
+ case "lowercase":
3558
+ if (n && (typeof e != "string" || !/^[a-z]*$/.test(e)))
3559
+ return s;
3560
+ break;
3561
+ case "min":
3562
+ case "max":
3563
+ case "positive":
3564
+ case "negative":
3565
+ case "integer":
3566
+ case "number":
3567
+ const l = Number(e);
3568
+ if (Number.isNaN(l) || s === "min" && l < n || s === "max" && l > n || s === "positive" && l <= 0 || s === "negative" && l >= 0 || s === "integer" && !Number.isInteger(l))
3569
+ return s;
3570
+ break;
3571
+ case "equal":
3572
+ if (e !== n)
3573
+ return s;
3574
+ break;
3575
+ case "enum":
3576
+ if (Array.isArray(n) && !n.includes(e))
3577
+ return s;
3578
+ break;
3579
+ case "hasKeys":
3580
+ if (typeof e != "object" || Array.isArray(n) && n.some((m) => !(m in e)))
3581
+ return s;
3582
+ break;
3583
+ case "email":
3584
+ if (!/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test("" + e))
3585
+ return s;
3586
+ break;
3587
+ case "url":
3588
+ if (!new RegExp(
3589
+ "^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
3590
+ "i"
3591
+ ).test("" + e))
3592
+ return s;
3593
+ break;
3594
+ case "ip":
3595
+ if (!/^(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}$/.test("" + e))
3596
+ return s;
3597
+ break;
3598
+ case "phone":
3599
+ if (!/^(?:(?:\+|00)86)?1[3-9]\d{9}$/.test("" + e))
3600
+ return s;
3601
+ break;
3602
+ }
3603
+ },
3479
3604
  compute(e, r) {
3480
3605
  let i;
3481
3606
  if (typeof r == "object") {
@@ -3484,19 +3609,19 @@ function fi(t) {
3484
3609
  return !0;
3485
3610
  const l = a.mode === "OR";
3486
3611
  let u = !0;
3487
- for (let c = 0; c < a.group.length; c++) {
3488
- const p = a.group[c];
3489
- let m, g = null;
3490
- if (p.variable)
3491
- g = JSON.stringify(this.fc.getLoadData(p.variable) || "");
3492
- else if (p.field)
3493
- g = dt(p.field || "");
3494
- else if (!p.mode)
3612
+ for (let f = 0; f < a.group.length; f++) {
3613
+ const d = a.group[f];
3614
+ let g, m = null;
3615
+ if (d.variable)
3616
+ m = JSON.stringify(this.fc.getLoadData(d.variable) || "");
3617
+ else if (d.field)
3618
+ m = dt(d.field || "");
3619
+ else if (!d.mode)
3495
3620
  return !0;
3496
- let $ = p.compare;
3497
- if ($ && ($ = dt($ || "")), p.mode ? m = n(p) : ce[p.condition] ? h.Function(p.handler) ? m = F(() => p.handler(this.api, e.rule)) : m = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${$ || "$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)) : m = !1, l && m)
3621
+ let $ = d.compare;
3622
+ if ($ && ($ = dt($ || "")), d.mode ? g = n(d) : fe[d.condition] ? h.Function(d.handler) ? g = F(() => d.handler(this.api, e.rule)) : g = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${m}, ${$ || "$val"}); }}}}`).call(this.api.form, fe, d.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : g = !1, l && g)
3498
3623
  return !0;
3499
- l || (u = u && m);
3624
+ l || (u = u && g);
3500
3625
  }
3501
3626
  return l ? !1 : u;
3502
3627
  };
@@ -3566,7 +3691,7 @@ function hi(t) {
3566
3691
  emitEvent(e, ...r) {
3567
3692
  const i = this.options[e] || this.options[J("on-" + e)];
3568
3693
  if (i) {
3569
- const s = z(i);
3694
+ const s = x(i);
3570
3695
  h.Function(s) && F(() => s(...r));
3571
3696
  }
3572
3697
  this.bus.$emit(e, ...r);
@@ -3575,7 +3700,7 @@ function hi(t) {
3575
3700
  var n, o;
3576
3701
  let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
3577
3702
  s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
3578
- F(() => a(q(b({}, i || {}), { self: e.rule, rule: e.rule, $f: this.api, api: this.api, option: this.vm.$props.option })));
3703
+ F(() => a(q(v({}, i || {}), { self: e.rule, rule: e.rule, $f: this.api, api: this.api, option: this.vm.$props.option })));
3579
3704
  }));
3580
3705
  }
3581
3706
  });
@@ -3639,19 +3764,19 @@ function di(t) {
3639
3764
  },
3640
3765
  emitEffect({ ctx: e, rule: r, input: i, type: s, custom: n }, o, a) {
3641
3766
  if (!s || ["fcFragment", "fragment"].indexOf(s) > -1) return;
3642
- const l = n || Object.keys(r).reduce((u, c) => (c[0] === "$" && (u[c.substr(1)] = r[c]), u), b({}, r.effect || {}));
3767
+ const l = n || Object.keys(r).reduce((u, f) => (f[0] === "$" && (u[f.substr(1)] = r[f]), u), v({}, r.effect || {}));
3643
3768
  Object.keys(l).forEach((u) => {
3644
- const c = this.providers[u];
3645
- if (!c || c.input && !i) return;
3646
- let p;
3647
- if (!c._c)
3648
- p = "*";
3649
- else if (c._used.indexOf(s) > -1)
3650
- p = s;
3769
+ const f = this.providers[u];
3770
+ if (!f || f.input && !i) return;
3771
+ let d;
3772
+ if (!f._c)
3773
+ d = "*";
3774
+ else if (f._used.indexOf(s) > -1)
3775
+ d = s;
3651
3776
  else
3652
3777
  return;
3653
- const m = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3654
- e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => te(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${p}:${c.input ? 1 : 0}`, o, [m, r, this.api]);
3778
+ const g = v({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3779
+ e && (g.getProp = () => e.effectData(u), g.clearProp = () => e.clearEffectData(u), g.mergeProp = (m) => te(g.getProp(), [m]), g.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [g, r, this.api]);
3655
3780
  });
3656
3781
  }
3657
3782
  });
@@ -3668,7 +3793,7 @@ function mi(t) {
3668
3793
  return r.length ? r : !1;
3669
3794
  } else return h.String(e) ? [e] : !1;
3670
3795
  }
3671
- function Q(t) {
3796
+ function X(t) {
3672
3797
  Pt(this, {
3673
3798
  options() {
3674
3799
  return t.options.value || {};
@@ -3706,9 +3831,9 @@ function Q(t) {
3706
3831
  }), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new rt(this), this.api = t.extendApiFn.reduce((e, r) => {
3707
3832
  const i = F(() => r(e, this));
3708
3833
  return i && i !== e && _(e, i), e;
3709
- }, Qr(this));
3834
+ }, Xr(this));
3710
3835
  }
3711
- _(Q.prototype, {
3836
+ _(X.prototype, {
3712
3837
  initData(t) {
3713
3838
  _(this, {
3714
3839
  ctxs: {},
@@ -3722,7 +3847,7 @@ _(Q.prototype, {
3722
3847
  this.updateAppendData(), this.useProvider(), this.usePage(), this.loadRule(), this.$manager.__init(), this.lifecycle("created");
3723
3848
  },
3724
3849
  updateAppendData() {
3725
- this.appendData = b(b(b({}, this.options.formData || {}), this.fc.vm.$options.propsData.value || {}), this.appendData);
3850
+ this.appendData = v(v(v({}, this.options.formData || {}), this.fc.vm.$options.propsData.value || {}), this.appendData);
3726
3851
  },
3727
3852
  isBreakWatch() {
3728
3853
  return this.loading || this.noWatchFn || this.reloading;
@@ -3737,18 +3862,23 @@ _(Q.prototype, {
3737
3862
  return new Promise((e, r) => {
3738
3863
  const i = t && t.beforeFetch && F(() => t.beforeFetch(t, { api: this.api }));
3739
3864
  i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3740
- }).then(() => this.globalBeforeFetch(t)).catch(() => {
3865
+ }).then(() => this.globalBeforeFetch(t));
3866
+ },
3867
+ beforeSubmit(t) {
3868
+ return new Promise((e, r) => {
3869
+ const i = this.options.beforeSubmit && F(() => this.options.beforeSubmit(t, { api: this.api }));
3870
+ i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3741
3871
  });
3742
3872
  }
3743
3873
  });
3744
- ei(Q);
3745
- ti(Q);
3746
- ii(Q);
3747
- si(Q);
3748
- ui(Q);
3749
- fi(Q);
3750
- hi(Q);
3751
- di(Q);
3874
+ ei(X);
3875
+ ti(X);
3876
+ ii(X);
3877
+ si(X);
3878
+ ui(X);
3879
+ ci(X);
3880
+ hi(X);
3881
+ di(X);
3752
3882
  const gi = "fcFragment", Le = {
3753
3883
  name: gi,
3754
3884
  functional: !0,
@@ -3792,7 +3922,7 @@ function $i() {
3792
3922
  },
3793
3923
  use(r) {
3794
3924
  Object.keys(r).forEach((i) => {
3795
- const s = be(i), n = jt(i).toLocaleLowerCase(), o = r[i];
3925
+ const s = ve(i), n = jt(i).toLocaleLowerCase(), o = r[i];
3796
3926
  [i, s, n].forEach((a) => {
3797
3927
  e.alias(i, o), e.prototype[a] = function(l, u) {
3798
3928
  return this.make(o, l, u);
@@ -3802,7 +3932,7 @@ function $i() {
3802
3932
  }
3803
3933
  }), e;
3804
3934
  }
3805
- function vi(t) {
3935
+ function bi(t) {
3806
3936
  class e extends Ut {
3807
3937
  }
3808
3938
  return Object.assign(e.prototype, t), e;
@@ -3835,6 +3965,9 @@ _(Ut.prototype, {
3835
3965
  form() {
3836
3966
  return this.vm.$refs[this.ref];
3837
3967
  },
3968
+ adapterValidate(t, e) {
3969
+ return t.validator = (r, i, s) => e(i, s), t;
3970
+ },
3838
3971
  getSlot(t) {
3839
3972
  const e = (r) => {
3840
3973
  if (r) {
@@ -3863,7 +3996,7 @@ _(Ut.prototype, {
3863
3996
  render(t) {
3864
3997
  }
3865
3998
  });
3866
- const bi = function(t) {
3999
+ const vi = function(t) {
3867
4000
  const e = {
3868
4001
  name: "loadData",
3869
4002
  _fn: [],
@@ -3873,14 +4006,14 @@ const bi = function(t) {
3873
4006
  const o = [];
3874
4007
  n.forEach((a) => {
3875
4008
  if (a && (a.attr || a.template)) {
3876
- let l = (p) => {
3877
- let m;
3878
- a.template ? m = t.$handle.loadStrVar(a.template, p) : a.handler && h.Function(a.handler) ? m = a.handler(p, i, s) : m = p(a.attr, a.default), a.copy !== !1 && (m = W(m));
3879
- const g = a.modify ? i : r.getProp();
3880
- a.to === "child" ? g.children ? E(g.children, 0, m) : E(g, "children", [m]) : oe(g, a.to || "options", m), s.sync(i);
3881
- }, u = (p) => l(p);
3882
- const c = t.watchLoadData(u);
3883
- l = se(l, a.wait || 300), a.watch !== !1 ? o.push(c) : c();
4009
+ let l = (d) => {
4010
+ let g;
4011
+ a.template ? g = t.$handle.loadStrVar(a.template, d) : a.handler && h.Function(a.handler) ? g = a.handler(d, i, s) : g = d(a.attr, a.default), a.copy !== !1 && (g = K(g));
4012
+ const m = a.modify ? i : r.getProp();
4013
+ a.to === "child" ? m.children ? E(m.children, 0, g) : E(m, "children", [g]) : oe(m, a.to || "options", g), s.sync(i);
4014
+ }, u = (d) => l(d);
4015
+ const f = t.watchLoadData(u);
4016
+ l = se(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
3884
4017
  }
3885
4018
  }), this._fn[r.id] = o;
3886
4019
  });
@@ -3904,13 +4037,13 @@ const bi = function(t) {
3904
4037
  const l = n[a];
3905
4038
  if (l) {
3906
4039
  const u = typeof l == "object";
3907
- let c = (g) => {
3908
- let $ = t.t(u ? l.attr : l, u ? l.params : null, g);
4040
+ let f = (m) => {
4041
+ let $ = t.t(u ? l.attr : l, u ? l.params : null, m);
3909
4042
  const w = u && l.modify ? i : r.getProp();
3910
4043
  a === "child" ? w.children ? E(w.children, 0, $) : E(w, "children", [$]) : oe(w, a, $), s.sync(i);
3911
- }, p = (g) => c(g);
3912
- const m = t.watchLoadData(p);
3913
- c = se(c, l.wait || 300), l.watch !== !1 ? o.push(m) : m();
4044
+ }, d = (m) => f(m);
4045
+ const g = t.watchLoadData(d);
4046
+ f = se(f, l.wait || 300), l.watch !== !1 ? o.push(g) : g();
3914
4047
  }
3915
4048
  }), this._fn[r.id] = o;
3916
4049
  },
@@ -3930,9 +4063,9 @@ const bi = function(t) {
3930
4063
  else {
3931
4064
  h.Object(i) || (i = { method: i });
3932
4065
  const s = i.method;
3933
- delete i.method, t.getProp().validate = [q(b({}, i), {
4066
+ delete i.method, t.getProp().validate = [q(v({}, i), {
3934
4067
  validator(...n) {
3935
- const o = x(e);
4068
+ const o = Y(e);
3936
4069
  if (o)
3937
4070
  return r.exec(o.id, h.String(s) ? s : "formCreateValidate", ...n, {
3938
4071
  attr: t,
@@ -3956,48 +4089,48 @@ const bi = function(t) {
3956
4089
  function r(s, n, o) {
3957
4090
  let a = s.value;
3958
4091
  i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
3959
- const l = (p) => {
3960
- p === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", p), o.sync(n);
4092
+ const l = (d) => {
4093
+ d === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", d), o.sync(n);
3961
4094
  };
3962
4095
  if (!a || !a.action && !a.key) {
3963
4096
  l(void 0);
3964
4097
  return;
3965
4098
  }
3966
- if (a = W(a), a.to || (a.to = "options"), a.key) {
3967
- const p = t.$handle.options.globalData[a.key];
3968
- if (!p) {
4099
+ if (a = K(a), a.to || (a.to = "options"), a.key) {
4100
+ const d = t.$handle.options.globalData[a.key];
4101
+ if (!d) {
3969
4102
  l(void 0);
3970
4103
  return;
3971
4104
  }
3972
- if (p.type === "static") {
3973
- l(p.data);
4105
+ if (d.type === "static") {
4106
+ l(d.data);
3974
4107
  return;
3975
4108
  } else
3976
- a = b(b({}, a), p);
4109
+ a = v(v({}, a), d);
3977
4110
  }
3978
- const u = a.onError, c = () => {
4111
+ const u = a.onError, f = () => {
3979
4112
  if (!s.getValue())
3980
4113
  return s.clearProp(), o.sync(n), !0;
3981
4114
  };
3982
- i._fn[s.id] = t.watchLoadData(se((p, m) => {
3983
- if (m && a.watch === !1)
4115
+ i._fn[s.id] = t.watchLoadData(se((d, g) => {
4116
+ if (g && a.watch === !1)
3984
4117
  return i._fn[s.id]();
3985
- const g = t.$handle.loadFetchVar(W(a), p, n), $ = q(b({
4118
+ const m = t.$handle.loadFetchVar(K(a), d, n), $ = q(v({
3986
4119
  headers: {}
3987
- }, g), {
4120
+ }, m), {
3988
4121
  onSuccess(w, O) {
3989
- if (c()) return;
4122
+ if (f()) return;
3990
4123
  let G = (M) => O ? M : D(M, "data") ? M.data : M;
3991
- const T = z(g.parse);
4124
+ const T = x(m.parse);
3992
4125
  h.Function(T) ? G = T : T && h.String(T) && (G = (M) => B(M, T)), l(G(w, n, o));
3993
4126
  },
3994
4127
  onError(w) {
3995
- l(void 0), !c() && (u || ((O) => et(O.message || "fetch fail " + g.action)))(w, n, o);
4128
+ l(void 0), !f() && (u || ((O) => et(O.message || "fetch fail " + m.action)))(w, n, o);
3996
4129
  }
3997
4130
  });
3998
4131
  t.$handle.beforeFetch($, { rule: n, api: o }).then(() => {
3999
- if (h.Function(g.action)) {
4000
- g.action(n, o).then((w) => {
4132
+ if (h.Function(m.action)) {
4133
+ m.action(n, o).then((w) => {
4001
4134
  $.onSuccess(w, !0);
4002
4135
  }).catch((w) => {
4003
4136
  $.onError(w);
@@ -4005,6 +4138,7 @@ const bi = function(t) {
4005
4138
  return;
4006
4139
  }
4007
4140
  F(() => t.create.fetch($, { inject: s, rule: n, api: o }));
4141
+ }).catch((w) => {
4008
4142
  });
4009
4143
  }, a.wait || 600));
4010
4144
  }
@@ -4024,7 +4158,7 @@ const bi = function(t) {
4024
4158
  return i;
4025
4159
  }, wi = {
4026
4160
  fetch: Ci,
4027
- loadData: bi,
4161
+ loadData: vi,
4028
4162
  t: _i,
4029
4163
  componentValidate: Ht
4030
4164
  };
@@ -4052,7 +4186,7 @@ function Fi(t) {
4052
4186
  };
4053
4187
  return e;
4054
4188
  }
4055
- const Oi = "html", Si = {
4189
+ const Oi = "html", ki = {
4056
4190
  name: Oi,
4057
4191
  loadChildren: !1,
4058
4192
  render(t, e) {
@@ -4080,7 +4214,7 @@ function Ei(t) {
4080
4214
  }
4081
4215
  return null;
4082
4216
  }
4083
- function Ri(t) {
4217
+ function Si(t) {
4084
4218
  const e = localStorage.getItem(t);
4085
4219
  if (e)
4086
4220
  try {
@@ -4090,7 +4224,7 @@ function Ri(t) {
4090
4224
  }
4091
4225
  return null;
4092
4226
  }
4093
- function ki(t) {
4227
+ function Ri(t) {
4094
4228
  const e = sessionStorage.getItem(t);
4095
4229
  if (e)
4096
4230
  try {
@@ -4111,22 +4245,72 @@ function Di(t) {
4111
4245
  return it(Ei, t);
4112
4246
  }
4113
4247
  function ji(t) {
4114
- return it(Ri, t);
4248
+ return it(Si, t);
4115
4249
  }
4116
4250
  function Ai(t) {
4117
- return it(ki, t);
4251
+ return it(Ri, t);
4118
4252
  }
4119
- function Vi(t, e) {
4253
+ const Vi = {
4254
+ en: {
4255
+ required: "{title} is required",
4256
+ validate: {
4257
+ url: "{title} is not a valid url",
4258
+ email: "{title} is not a valid email",
4259
+ ip: "{title} {title} is not a valid ip",
4260
+ phone: "{title} {title} is not a valid phone",
4261
+ pattern: "{title} does not match pattern {pattern}",
4262
+ uppercase: "{title} must be all uppercase",
4263
+ lowercase: "{title} must be all lowercased",
4264
+ positive: "{title} is not a positive number",
4265
+ negative: "{title} is not a negative number",
4266
+ equal: "{title} is not equal to {equal}",
4267
+ min: "{title} cannot be less than {min}",
4268
+ max: "{title} cannot be greater than {max}",
4269
+ enum: "{title} must be one of {enum}",
4270
+ hasKeys: "{title} does not contain required fields {hasKeys}",
4271
+ minLen: "{title} must be at least {minLen}",
4272
+ maxLen: "{title} cannot be longer than {maxLen}",
4273
+ len: "{title} must be exactly {len}",
4274
+ integer: "{title} is not an integer",
4275
+ number: "{title} is not an number"
4276
+ }
4277
+ },
4278
+ "zh-cn": {
4279
+ required: "{title}不能为空",
4280
+ validate: {
4281
+ url: "{title}不是有效的 url 地址",
4282
+ email: "{title}不是有效的邮箱地址",
4283
+ ip: "{title}不是有效的 IP 地址",
4284
+ phone: "{title}不是正确的手机号",
4285
+ pattern: "{title}必须匹配 {pattern}",
4286
+ uppercase: "{title}必须全大写",
4287
+ lowercase: "{title}必须全小写",
4288
+ positive: "{title}不是正数",
4289
+ negative: "{title}不是负数",
4290
+ equal: "{title}必须等于 {equal}",
4291
+ min: "{title}必须大于等于 {min}",
4292
+ max: "{title}必须小于等于 {max}",
4293
+ enum: "{title}必须是 {enum} 之一",
4294
+ hasKeys: "{title}必须包含 {hasKeys} 字段",
4295
+ minLen: "{title}长度必须大于 {minLen}",
4296
+ maxLen: "{title}长度必须小于 {maxLen}",
4297
+ len: "{title}长度必须为 {len}",
4298
+ integer: "{title}必须为整数",
4299
+ number: "{title}必须为数字"
4300
+ }
4301
+ }
4302
+ };
4303
+ function Ii(t, e) {
4120
4304
  let r;
4121
4305
  return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
4122
4306
  }
4123
4307
  function Me() {
4124
- return Vi("name", ...arguments);
4308
+ return Ii("name", ...arguments);
4125
4309
  }
4126
- function Ii(t) {
4310
+ function Pi(t) {
4127
4311
  return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
4128
4312
  }
4129
- function Pi(t, e) {
4313
+ function Ti(t, e) {
4130
4314
  const r = new Vue({
4131
4315
  data() {
4132
4316
  return { rule: t, option: e || {} };
@@ -4137,151 +4321,151 @@ function Pi(t, e) {
4137
4321
  });
4138
4322
  return r.$mount(), r;
4139
4323
  }
4140
- function Ti(t) {
4324
+ function Bi(t) {
4141
4325
  const e = t.key || [], r = t.array || [], i = t.normal || [];
4142
- Rt.push(...e), Ye.push(...r), xe.push(...i), Bt([...e, ...r, ...i]);
4326
+ St.push(...e), Qe.push(...r), Ye.push(...i), Bt([...e, ...r, ...i]);
4143
4327
  }
4144
- let Bi = 1;
4145
- const U = {}, Re = Symbol("defValue");
4328
+ let Li = 1;
4329
+ const U = {}, Se = Symbol("defValue");
4146
4330
  function Gt(t) {
4147
4331
  const e = {
4148
4332
  [Le.name]: Le
4149
4333
  }, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
4150
4334
  t.extendApi
4151
- ], u = b({}, wi), c = Xr();
4152
- let p = { global: {} };
4153
- const m = t.isMobile === !0, g = ne({
4154
- $mobile: m
4335
+ ], u = v({}, wi), f = zr();
4336
+ let d = { global: {} };
4337
+ const g = t.isMobile === !0, m = ne({
4338
+ $mobile: g
4155
4339
  }), $ = $i(), w = {}, O = {};
4156
- Ti(t.attrs || {});
4157
- function G(f) {
4158
- const d = U[f];
4159
- if (Array.isArray(d))
4160
- return d.map((y) => y.api());
4161
- if (d)
4162
- return d.api();
4340
+ Bi(t.attrs || {});
4341
+ function G(c) {
4342
+ const p = U[c];
4343
+ if (Array.isArray(p))
4344
+ return p.map((y) => y.api());
4345
+ if (p)
4346
+ return p.api();
4163
4347
  }
4164
- function T(f) {
4165
- o.push(f);
4348
+ function T(c) {
4349
+ o.push(c);
4166
4350
  }
4167
4351
  function M() {
4168
- const f = Me(...arguments);
4169
- f.id && f.prop && (i[f.id] = f.prop);
4352
+ const c = Me(...arguments);
4353
+ c.id && c.prop && (i[c.id] = c.prop);
4170
4354
  }
4171
4355
  function he() {
4172
- const f = Me(...arguments);
4173
- f.id && f.prop && (u[f.id] = h.Function(f.prop) ? f.prop : q(b({}, f.prop), {
4174
- name: f.id
4356
+ const c = Me(...arguments);
4357
+ c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : q(v({}, c.prop), {
4358
+ name: c.id
4175
4359
  }));
4176
4360
  }
4177
- function Ve(f) {
4178
- $.use(f);
4361
+ function Ve(c) {
4362
+ $.use(c);
4179
4363
  }
4180
4364
  function de() {
4181
- const f = Me(...arguments);
4182
- if (!f.id || !f.prop) return De;
4183
- const d = J(f.id), y = f.prop, v = y.merge === !0 ? r[d] : void 0;
4184
- r[d] = Ee(y, v || De), c[d] = P(d), y.maker && _(c, y.maker);
4365
+ const c = Me(...arguments);
4366
+ if (!c.id || !c.prop) return De;
4367
+ const p = J(c.id), y = c.prop, b = y.merge === !0 ? r[p] : void 0;
4368
+ r[p] = Ee(y, b || De), f[p] = P(p), y.maker && _(f, y.maker);
4185
4369
  }
4186
- function S(f, d) {
4370
+ function k(c, p) {
4187
4371
  let y;
4188
- if (h.String(f)) {
4189
- if (y = f, d === void 0)
4190
- return ["form-create", "formcreate"].indexOf(y) > -1 ? R() : e[y];
4372
+ if (h.String(c)) {
4373
+ if (y = c, p === void 0)
4374
+ return ["form-create", "formcreate"].indexOf(y) > -1 ? S() : e[y];
4191
4375
  } else
4192
- y = J(f.name), d = f;
4193
- if (!y || !d) return;
4194
- const v = J(y);
4195
- e[y] = d, e[v] = d, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], d.formCreateParser && de(y, d.formCreateParser);
4376
+ y = J(c.name), p = c;
4377
+ if (!y || !p) return;
4378
+ const b = J(y);
4379
+ e[y] = p, e[b] = p, delete $.aliasMap[y], delete $.aliasMap[b], delete r[y], delete r[b], p.formCreateParser && de(y, p.formCreateParser);
4196
4380
  }
4197
- function R() {
4198
- return Wr(Pe, e, i);
4381
+ function S() {
4382
+ return Kr(Pe, e, i);
4199
4383
  }
4200
4384
  function N() {
4201
4385
  return Le;
4202
4386
  }
4203
- function pe(f, d) {
4204
- return h.Function(f.install) ? f.install(K, d) : h.Function(f) && f(K, d), this;
4387
+ function pe(c, p) {
4388
+ return h.Function(c.install) ? c.install(W, p) : h.Function(c) && c(W, p), this;
4205
4389
  }
4206
- function K(f, d, y) {
4207
- let v = Pi(f, d || {});
4208
- const C = v.$refs.fc.formCreate;
4209
- return C.$parent = y, Ii(C.options).appendChild(v.$el), C.api();
4390
+ function W(c, p, y) {
4391
+ let b = Ti(c, p || {});
4392
+ const C = b.$refs.fc.formCreate;
4393
+ return C.$parent = y, Pi(C.options).appendChild(b.$el), C.api();
4210
4394
  }
4211
- Ee(K, O);
4212
- function Wt(f) {
4213
- let d = b({}, t);
4214
- return f ? d.inherit = {
4395
+ Ee(W, O);
4396
+ function Kt(c) {
4397
+ let p = v({}, t);
4398
+ return c ? p.inherit = {
4215
4399
  components: e,
4216
4400
  parsers: r,
4217
4401
  directives: i,
4218
4402
  modelFields: s,
4219
4403
  providers: u,
4220
4404
  useApps: o,
4221
- maker: c,
4405
+ maker: f,
4222
4406
  formulas: w,
4223
- loadData: g
4224
- } : delete d.inherit, Gt(d);
4407
+ loadData: m
4408
+ } : delete p.inherit, Gt(p);
4225
4409
  }
4226
- function Kt(f, d) {
4227
- s[f] = d;
4410
+ function Wt(c, p) {
4411
+ s[c] = p;
4228
4412
  }
4229
- function Xt(f, d) {
4230
- w[f] = d;
4413
+ function zt(c, p) {
4414
+ w[c] = p;
4231
4415
  }
4232
- function zt(f, d) {
4233
- const y = n[f] || {}, v = y.parsers || {};
4234
- d.parsers && Object.keys(d.parsers).forEach((C) => {
4235
- v[C] = Ee(d.parsers[C], De);
4236
- }), d.name = f, n[f] = q(b(b({}, y), d), { parsers: v });
4416
+ function xt(c, p) {
4417
+ const y = n[c] || {}, b = y.parsers || {};
4418
+ p.parsers && Object.keys(p.parsers).forEach((C) => {
4419
+ b[C] = Ee(p.parsers[C], De);
4420
+ }), p.name = c, n[c] = q(v(v({}, y), p), { parsers: b });
4237
4421
  }
4238
- function we(f) {
4239
- f && Object.keys(U).forEach((d) => {
4240
- (Array.isArray(U[d]) ? U[d] : [U[d]]).forEach((v) => {
4241
- v.bus.$emit("$loadData." + f);
4422
+ function we(c) {
4423
+ c && Object.keys(U).forEach((p) => {
4424
+ (Array.isArray(U[p]) ? U[p] : [U[p]]).forEach((b) => {
4425
+ b.bus.$emit("$loadData." + c);
4242
4426
  });
4243
4427
  });
4244
4428
  }
4245
- function Ie(f, d) {
4246
- oe(g, f, d), we(f);
4429
+ function Ie(c, p) {
4430
+ oe(m, c, p), we(c);
4247
4431
  }
4248
- function Fe(f, d) {
4249
- const y = (...v) => F(() => d(...v));
4250
- y._driver = !0, Ie(f, y);
4432
+ function Fe(c, p) {
4433
+ const y = (...b) => F(() => p(...b));
4434
+ y._driver = !0, Ie(c, y);
4251
4435
  }
4252
- function nt(f, d) {
4253
- const y = (f || "").split(".");
4254
- f = y.shift();
4255
- const v = y.join(".");
4256
- if (D(g, f) || E(g, f, Re), g[f] !== Re) {
4257
- let C = g[f];
4258
- return C && C._driver ? C = C(v) : y.length && (C = B(C, y)), C == null || C === "" ? d : C;
4436
+ function nt(c, p) {
4437
+ const y = (c || "").split(".");
4438
+ c = y.shift();
4439
+ const b = y.join(".");
4440
+ if (D(m, c) || E(m, c, Se), m[c] !== Se) {
4441
+ let C = m[c];
4442
+ return C && C._driver ? C = C(b) : y.length && (C = B(C, y)), C == null || C === "" ? p : C;
4259
4443
  } else
4260
- return d;
4444
+ return p;
4261
4445
  }
4262
- function Qt(f) {
4263
- l.push(f);
4446
+ function Xt(c) {
4447
+ l.push(c);
4264
4448
  }
4265
- function Zt(f) {
4266
- delete g[f], we(f);
4449
+ function Zt(c) {
4450
+ delete m[c], we(c);
4267
4451
  }
4268
- function Yt(f, d) {
4269
- a.push({ name: f, callback: d });
4452
+ function Qt(c, p) {
4453
+ a.push({ name: c, callback: p });
4270
4454
  }
4271
- function Pe(f) {
4455
+ function Pe(c) {
4272
4456
  _(this, {
4273
- id: Bi++,
4274
- create: K,
4275
- vm: f,
4276
- manager: vi(t.manager),
4457
+ id: Li++,
4458
+ create: W,
4459
+ vm: c,
4460
+ manager: bi(t.manager),
4277
4461
  parsers: r,
4278
4462
  providers: u,
4279
4463
  modelFields: s,
4280
4464
  formulas: w,
4281
- isMobile: m,
4282
- rules: f.$options.propsData.rule,
4283
- name: f.$options.propsData.name || Ae(),
4284
- inFor: f.$options.propsData.inFor,
4465
+ isMobile: g,
4466
+ rules: c.$options.propsData.rule,
4467
+ name: c.$options.propsData.name || Ae(),
4468
+ inFor: c.$options.propsData.inFor,
4285
4469
  prop: {
4286
4470
  components: e,
4287
4471
  directives: i
@@ -4290,7 +4474,7 @@ function Gt(t) {
4290
4474
  drivers: n,
4291
4475
  renderDriver: null,
4292
4476
  refreshData: we,
4293
- loadData: g,
4477
+ loadData: m,
4294
4478
  CreateNode: $,
4295
4479
  bus: new Fi(),
4296
4480
  unwatch: [],
@@ -4298,60 +4482,60 @@ function Gt(t) {
4298
4482
  extendApiFn: l,
4299
4483
  fetchCache: /* @__PURE__ */ new WeakMap(),
4300
4484
  tmpData: ne({})
4301
- }), a.forEach((d) => {
4302
- this.bus.$on(d.name, d.callback);
4485
+ }), a.forEach((p) => {
4486
+ this.bus.$on(p.name, p.callback);
4303
4487
  }), I(() => {
4304
4488
  L(this.options, () => {
4305
4489
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
4306
4490
  }, { deep: !0 });
4307
- }), _(f.$options.components, e), _(f.$options.directives, i), this.$handle = new Q(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4491
+ }), _(c.$options.components, e), _(c.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4308
4492
  }
4309
- Pe.isMobile = m, _(Pe.prototype, {
4493
+ Pe.isMobile = g, _(Pe.prototype, {
4310
4494
  init() {
4311
4495
  this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
4312
4496
  this.initOptions(), this.$handle.api.refresh();
4313
4497
  }, { deep: !0 })), this.vm.$options.propsData.driver && (this.renderDriver = typeof this.vm.$options.propsData.driver == "object" ? this.vm.$options.propsData.driver : this.drivers[this.vm.$options.propsData.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();
4314
4498
  },
4315
- targetFormDriver(f, ...d) {
4316
- if (this.renderDriver && this.renderDriver[f])
4317
- return F(() => this.renderDriver[f](...d));
4499
+ targetFormDriver(c, ...p) {
4500
+ if (this.renderDriver && this.renderDriver[c])
4501
+ return F(() => this.renderDriver[c](...p));
4318
4502
  },
4319
- t(f, d, y) {
4320
- let v = y ? y("$t." + f) : this.globalLanguageDriver(f);
4321
- return v == null && (v = ""), v && d && Object.keys(d).forEach((C) => {
4503
+ t(c, p, y) {
4504
+ let b = y ? y("$t." + c) : this.globalLanguageDriver(c);
4505
+ return b == null && (b = ""), b && p && Object.keys(p).forEach((C) => {
4322
4506
  const j = new RegExp(`{${C}}`, "g");
4323
- v = v.replace(j, d[C]);
4324
- }), v;
4325
- },
4326
- globalDataDriver(f) {
4327
- let d = f.split(".");
4328
- const y = d.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4329
- if (v) {
4330
- if (v.type === "static")
4331
- return B(v.data, d);
4507
+ b = b.replace(j, p[C]);
4508
+ }), b;
4509
+ },
4510
+ globalDataDriver(c) {
4511
+ let p = c.split(".");
4512
+ const y = p.shift(), b = this.options.value.globalData && this.options.value.globalData[y];
4513
+ if (b) {
4514
+ if (b.type === "static")
4515
+ return B(b.data, p);
4332
4516
  {
4333
4517
  let C;
4334
- const j = this.fetchCache.get(v);
4518
+ const j = this.fetchCache.get(b);
4335
4519
  if (j) {
4336
- if (j.status && (C = B(j.data, d)), !j.loading)
4520
+ if (j.status && (C = B(j.data, p)), !j.loading)
4337
4521
  return C;
4338
- j.loading = !1, this.fetchCache.set(v, j);
4522
+ j.loading = !1, this.fetchCache.set(b, j);
4339
4523
  } else
4340
- this.fetchCache.set(v, { status: !1 });
4341
- const k = se(() => {
4524
+ this.fetchCache.set(b, { status: !1 });
4525
+ const R = se(() => {
4342
4526
  le();
4343
- const X = this.fetchCache.get(v);
4344
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (X && (X.loading = !0, this.fetchCache.set(v, X)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4345
- }, v.wait || 600), ae = (X) => {
4346
- this.fetchCache.set(v, { status: !0, data: X }), this.bus.$emit("$loadData.$globalData." + y);
4347
- }, Z = (X, ue) => {
4348
- if (ue && v.watch === !1)
4527
+ const z = this.fetchCache.get(b);
4528
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(b) !== -1 ? (z && (z.loading = !0, this.fetchCache.set(b, z)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(b);
4529
+ }, b.wait || 600), ae = (z) => {
4530
+ this.fetchCache.set(b, { status: !0, data: z }), this.bus.$emit("$loadData.$globalData." + y);
4531
+ }, Z = (z, ue) => {
4532
+ if (ue && b.watch === !1)
4349
4533
  return le();
4350
4534
  if (ue) {
4351
- k();
4535
+ R();
4352
4536
  return;
4353
4537
  }
4354
- const me = this.$handle.loadFetchVar(Je(v), X);
4538
+ const me = this.$handle.loadFetchVar(Je(b), z);
4355
4539
  this.$handle.api.fetch(me).then((re) => {
4356
4540
  ae(re);
4357
4541
  }).catch((re) => {
@@ -4363,39 +4547,39 @@ function Gt(t) {
4363
4547
  }
4364
4548
  },
4365
4549
  getLocale() {
4366
- let f = this.vm.top.$props.locale;
4367
- return f && typeof f == "object" ? f.name : typeof f == "string" ? f : "zh-cn";
4368
- },
4369
- globalLanguageDriver(f) {
4370
- let d = this.vm.top.$props.locale, y;
4371
- if (d && typeof d == "object" && (y = B(d, f)), y == null) {
4372
- const v = this.options.value.language || {}, C = this.getLocale();
4373
- y = B(v[C], f);
4550
+ let c = this.vm.top.$props.locale;
4551
+ return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
4552
+ },
4553
+ globalLanguageDriver(c) {
4554
+ let p = this.vm.top.$props.locale, y;
4555
+ if (p && typeof p == "object" && (y = B(p, c)), y == null) {
4556
+ const b = this.options.value.language || {}, C = this.getLocale();
4557
+ y = B(b[C] || {}, c), y == null && (y = B(Vi[C] || {}, c));
4374
4558
  }
4375
4559
  return y;
4376
4560
  },
4377
- globalVarDriver(f) {
4378
- let d = f.split(".");
4379
- const y = d.shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4380
- if (v) {
4381
- const C = h.Function(v) ? v : z(v.handle);
4561
+ globalVarDriver(c) {
4562
+ let p = c.split(".");
4563
+ const y = p.shift(), b = this.options.value.globalVariable && this.options.value.globalVariable[y];
4564
+ if (b) {
4565
+ const C = h.Function(b) ? b : x(b.handle);
4382
4566
  if (C) {
4383
4567
  let j;
4384
- const k = this.watchLoadData((ae, Z) => {
4385
- Z ? (this.bus.$emit("$loadData.$var." + y), k()) : j = C(ae, this.$handle.api);
4568
+ const R = this.watchLoadData((ae, Z) => {
4569
+ Z ? (this.bus.$emit("$loadData.$var." + y), R()) : j = C(ae, this.$handle.api);
4386
4570
  });
4387
- return this.unwatch.push(k), B(j, d);
4571
+ return this.unwatch.push(R), B(j, p);
4388
4572
  }
4389
4573
  }
4390
4574
  },
4391
- setData(f, d, y) {
4392
- y ? Ie(f, d) : (oe(this.vm.top.fc.tmpData, f, d), this.bus.$emit("$loadData." + f));
4575
+ setData(c, p, y) {
4576
+ y ? Ie(c, p) : (oe(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
4393
4577
  },
4394
- getLoadData(f, d) {
4578
+ getLoadData(c, p) {
4395
4579
  let y = null;
4396
- if (f != null) {
4397
- let v = f.split(".");
4398
- const C = v.shift();
4580
+ if (c != null) {
4581
+ let b = c.split(".");
4582
+ const C = b.shift();
4399
4583
  if (C === "$topForm")
4400
4584
  y = this.$handle.api.top.formData(!0);
4401
4585
  else if (C === "$scopeForm")
@@ -4405,53 +4589,53 @@ function Gt(t) {
4405
4589
  else if (C === "$options")
4406
4590
  y = this.options.value;
4407
4591
  else if (C === "$globalData")
4408
- y = this.globalDataDriver(v.join(".")), v = [];
4592
+ y = this.globalDataDriver(b.join(".")), b = [];
4409
4593
  else if (C === "$var")
4410
- y = this.globalVarDriver(v.join(".")), v = [];
4594
+ y = this.globalVarDriver(b.join(".")), b = [];
4411
4595
  else if (C === "$locale")
4412
- y = this.getLocale(), v = [];
4596
+ y = this.getLocale(), b = [];
4413
4597
  else if (C === "$t")
4414
- y = this.globalLanguageDriver(v.join(".")), v = [];
4598
+ y = this.globalLanguageDriver(b.join(".")), b = [];
4415
4599
  else {
4416
4600
  if (C === "$preview")
4417
4601
  return this.$handle.preview;
4418
4602
  {
4419
4603
  const j = this.vm.top.fc.tmpData;
4420
- D(j, C) || E(j, C, Re), y = j[C] !== Re ? B(j, f) : nt(f), v = [];
4604
+ D(j, C) || E(j, C, Se), y = j[C] !== Se ? B(j, c) : nt(c), b = [];
4421
4605
  }
4422
4606
  }
4423
- y && v.length && (y = B(y, v));
4607
+ y && b.length && (y = B(y, b));
4424
4608
  }
4425
- return y == null || y === "" ? d : y;
4609
+ return y == null || y === "" ? p : y;
4426
4610
  },
4427
- watchLoadData(f, d) {
4611
+ watchLoadData(c, p) {
4428
4612
  let y = {};
4429
- const v = (k) => {
4613
+ const b = (R) => {
4430
4614
  this.get || (this.get = C), F(() => {
4431
- f(C, k);
4615
+ c(C, R);
4432
4616
  }), this.get === C && (this.get = void 0);
4433
- }, C = (k, ae) => {
4617
+ }, C = (R, ae) => {
4434
4618
  let Z;
4435
- if (typeof k == "object" && (Z = k.getValue, k = k.id), y[k])
4436
- return y[k].val;
4437
- const le = ye(() => Z ? Z() : this.getLoadData(k, ae)), X = k.split("."), ue = X.shift(), me = X.shift() || "", re = se(() => {
4438
- const Te = Z ? Z() : this.getLoadData(k, ae);
4439
- if (y[k])
4440
- JSON.stringify(Te) !== JSON.stringify(y[k].val) && (y[k].val = Te, v(!0));
4619
+ if (typeof R == "object" && (Z = R.getValue, R = R.id), y[R])
4620
+ return y[R].val;
4621
+ const le = ye(() => Z ? Z() : this.getLoadData(R, ae)), z = R.split("."), ue = z.shift(), me = z.shift() || "", re = se(() => {
4622
+ const Te = Z ? Z() : this.getLoadData(R, ae);
4623
+ if (y[R])
4624
+ JSON.stringify(Te) !== JSON.stringify(y[R].val) && (y[R].val = Te, b(!0));
4441
4625
  else return;
4442
- }, d || 0), er = L(le, (Te) => {
4626
+ }, p || 0), er = L(le, (Te) => {
4443
4627
  re();
4444
4628
  });
4445
- return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), y[k] = {
4629
+ return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), y[R] = {
4446
4630
  fn: () => {
4447
4631
  this.bus.$off("$loadData." + ue, re), me && this.bus.$off("$loadData." + ue + "." + me, re), er();
4448
4632
  },
4449
4633
  val: le.value
4450
4634
  }, le.value;
4451
4635
  };
4452
- v(!1);
4636
+ b(!1);
4453
4637
  const j = () => {
4454
- Object.keys(y).forEach((k) => y[k].fn()), y = {};
4638
+ Object.keys(y).forEach((R) => y[R].fn()), y = {};
4455
4639
  };
4456
4640
  return this.unwatch.push(j), j;
4457
4641
  },
@@ -4460,22 +4644,22 @@ function Gt(t) {
4460
4644
  },
4461
4645
  initOptions() {
4462
4646
  this.options.value = {};
4463
- let f = b({
4647
+ let c = v({
4464
4648
  formData: {},
4465
4649
  submitBtn: {},
4466
4650
  resetBtn: {},
4467
4651
  globalEvent: {},
4468
4652
  globalData: {}
4469
- }, W(p));
4470
- this.isSub() && (f = this.mergeOptions(f, this.vm.parent.fc.options.value || {}, !0)), f = this.mergeOptions(f, this.vm.$options.propsData.option || {}), this.updateOptions(f);
4653
+ }, K(d));
4654
+ this.isSub() && (c = this.mergeOptions(c, this.vm.parent.fc.options.value || {}, !0)), c = this.mergeOptions(c, this.vm.$options.propsData.option || {}), this.updateOptions(c);
4471
4655
  },
4472
- mergeOptions(f, d, y) {
4473
- return d = b({}, d || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4474
- delete d[v];
4475
- }), d.global && (f.global = Hr(f.global, d.global), delete d.global), this.$handle.$manager.mergeOptions([d], f), f;
4656
+ mergeOptions(c, p, y) {
4657
+ return p = v({}, p || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((b) => {
4658
+ delete p[b];
4659
+ }), p.global && (c.global = Hr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
4476
4660
  },
4477
- updateOptions(f) {
4478
- this.options.value = this.mergeOptions(this.options.value, f), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
4661
+ updateOptions(c) {
4662
+ this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
4479
4663
  },
4480
4664
  api() {
4481
4665
  return this.$handle.api;
@@ -4489,88 +4673,88 @@ function Gt(t) {
4489
4673
  unmount() {
4490
4674
  if (this.name)
4491
4675
  if (this.inFor) {
4492
- const f = U[this.name].indexOf(this);
4493
- U[this.name].splice(f, 1);
4676
+ const c = U[this.name].indexOf(this);
4677
+ U[this.name].splice(c, 1);
4494
4678
  } else
4495
4679
  delete U[this.name];
4496
- a.forEach((f) => {
4497
- this.bus.$off(f.name, f.callback);
4498
- }), this.tmpData = {}, this.unwatch.forEach((f) => f()), this.unwatch = [], this.$handle.reloadRule([]);
4680
+ a.forEach((c) => {
4681
+ this.bus.$off(c.name, c.callback);
4682
+ }), this.tmpData = {}, this.unwatch.forEach((c) => c()), this.unwatch = [], this.$handle.reloadRule([]);
4499
4683
  },
4500
4684
  updated() {
4501
4685
  this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
4502
4686
  }
4503
4687
  });
4504
- function st(f) {
4505
- _(f, {
4688
+ function st(c) {
4689
+ _(c, {
4506
4690
  version: t.version,
4507
4691
  ui: t.ui,
4508
- isMobile: m,
4509
- extendApi: Qt,
4692
+ isMobile: g,
4693
+ extendApi: Xt,
4510
4694
  getData: nt,
4511
4695
  setDataDriver: Fe,
4512
4696
  setData: Ie,
4513
4697
  removeData: Zt,
4514
4698
  refreshData: we,
4515
- maker: c,
4516
- component: S,
4699
+ maker: f,
4700
+ component: k,
4517
4701
  directive: M,
4518
- setModelField: Kt,
4519
- setFormula: Xt,
4520
- setDriver: zt,
4702
+ setModelField: Wt,
4703
+ setFormula: zt,
4704
+ setDriver: xt,
4521
4705
  register: he,
4522
4706
  $vnode: N,
4523
4707
  parser: de,
4524
4708
  use: pe,
4525
- factory: Wt,
4709
+ factory: Kt,
4526
4710
  componentAlias: Ve,
4527
4711
  copyRule: Vt,
4528
4712
  copyRules: It,
4529
4713
  mergeRule: te,
4530
4714
  fetch: Mt,
4531
- $form: R,
4532
- parseFn: z,
4715
+ $form: S,
4716
+ parseFn: x,
4533
4717
  parseJson: At,
4534
4718
  toJson: _e,
4535
4719
  useApp: T,
4536
4720
  getApi: G,
4537
- on: Yt
4721
+ on: Qt
4538
4722
  });
4539
4723
  }
4540
- function xt(f) {
4541
- _(f, {
4542
- create: K,
4543
- install(d, y) {
4544
- if (p = b(b({}, p), y || {}), d._installedFormCreate === !0) return;
4545
- d._installedFormCreate = !0;
4546
- const v = function(j, k = {}) {
4547
- return K(j, k, this);
4724
+ function Yt(c) {
4725
+ _(c, {
4726
+ create: W,
4727
+ install(p, y) {
4728
+ if (d = v(v({}, d), y || {}), p._installedFormCreate === !0) return;
4729
+ p._installedFormCreate = !0;
4730
+ const b = function(j, R = {}) {
4731
+ return W(j, R, this);
4548
4732
  };
4549
- st(v), d.prototype.$formCreate = v;
4550
- const C = R();
4551
- d.component(C.name, C), d.component("FcFragment", N()), o.forEach((j) => {
4552
- F(() => j(f, d));
4733
+ st(b), p.prototype.$formCreate = b;
4734
+ const C = S();
4735
+ p.component(C.name, C), p.component("FcFragment", N()), o.forEach((j) => {
4736
+ F(() => j(c, p));
4553
4737
  });
4554
4738
  }
4555
4739
  });
4556
4740
  }
4557
- if (st(O), xt(O), Fe("$cookie", Di), Fe("$localStorage", ji), Fe("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && K.use(t), de(Si), t.inherit) {
4558
- const f = t.inherit;
4559
- f.components && _(e, f.components), f.parsers && _(r, f.parsers), f.directives && _(i, f.directives), f.modelFields && _(s, f.modelFields), f.providers && _(u, f.providers), f.useApps && _(o, f.useApps), f.maker && _(c, f.maker), f.loadData && _(g, f.loadData), f.formulas && _(w, f.formulas);
4741
+ if (st(O), Yt(O), Fe("$cookie", Di), Fe("$localStorage", ji), Fe("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && W.use(t), de(ki), t.inherit) {
4742
+ const c = t.inherit;
4743
+ c.components && _(e, c.components), c.parsers && _(r, c.parsers), c.directives && _(i, c.directives), c.modelFields && _(s, c.modelFields), c.providers && _(u, c.providers), c.useApps && _(o, c.useApps), c.maker && _(f, c.maker), c.loadData && _(m, c.loadData), c.formulas && _(w, c.formulas);
4560
4744
  }
4561
- const Oe = R();
4745
+ const Oe = S();
4562
4746
  return Ee(Oe, O), Object.defineProperties(Oe, {
4563
4747
  fetch: {
4564
4748
  get() {
4565
4749
  return O.fetch;
4566
4750
  },
4567
- set(f) {
4568
- O.fetch = f;
4751
+ set(c) {
4752
+ O.fetch = c;
4569
4753
  }
4570
4754
  }
4571
4755
  }), Oe.util = O, Oe;
4572
4756
  }
4573
- const bt = {
4757
+ const vt = {
4574
4758
  date: "yyyy-MM-dd",
4575
4759
  month: "yyyy-MM",
4576
4760
  datetime: "yyyy-MM-dd HH:mm:ss",
@@ -4579,16 +4763,16 @@ const bt = {
4579
4763
  monthrange: "yyyy-MM",
4580
4764
  datetimerange: "yyyy-MM-dd HH:mm:ss",
4581
4765
  year: "yyyy"
4582
- }, _t = "datePicker", Li = {
4766
+ }, _t = "datePicker", Mi = {
4583
4767
  name: _t,
4584
4768
  maker: function() {
4585
4769
  return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = P(_t, { type: e.toLowerCase() }), t), {});
4586
4770
  }(),
4587
4771
  mergeProp(t) {
4588
4772
  const e = t.prop.props;
4589
- e.valueFormat || (e.valueFormat = bt[e.type] || bt.date);
4773
+ e.valueFormat || (e.valueFormat = vt[e.type] || vt.date);
4590
4774
  }
4591
- }, Ne = "hidden", Mi = {
4775
+ }, Ne = "hidden", Ni = {
4592
4776
  name: Ne,
4593
4777
  maker: {
4594
4778
  [Ne]: (t, e) => P(Ne)("", t, e)
@@ -4596,7 +4780,7 @@ const bt = {
4596
4780
  render() {
4597
4781
  return [];
4598
4782
  }
4599
- }, qe = "input", Ni = {
4783
+ }, qe = "input", qi = {
4600
4784
  name: qe,
4601
4785
  maker: function() {
4602
4786
  const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(qe, { type: r }), e), {});
@@ -4606,7 +4790,7 @@ const bt = {
4606
4790
  let { props: e } = t.prop;
4607
4791
  e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
4608
4792
  }
4609
- }, Ct = "slider", qi = {
4793
+ }, Ct = "slider", Ui = {
4610
4794
  name: Ct,
4611
4795
  maker: {
4612
4796
  sliderRange: P(Ct, { range: !0 })
@@ -4615,7 +4799,7 @@ const bt = {
4615
4799
  let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
4616
4800
  return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
4617
4801
  }
4618
- }, Ue = "timePicker", Ui = {
4802
+ }, Ue = "timePicker", Hi = {
4619
4803
  name: Ue,
4620
4804
  maker: {
4621
4805
  time: P(Ue, (t) => t.props.isRange = !1),
@@ -4625,27 +4809,27 @@ const bt = {
4625
4809
  const e = t.prop.props;
4626
4810
  e.valueFormat || (e.valueFormat = "HH:mm:ss");
4627
4811
  }
4628
- }, Hi = {
4812
+ }, Gi = {
4629
4813
  name: "FcRow",
4630
4814
  render(t, e) {
4631
4815
  return e.vNode.col({ props: { span: 24 } }, [
4632
4816
  e.vNode.row(e.prop, t)
4633
4817
  ]);
4634
4818
  }
4635
- }, Gi = "select", Ji = {
4636
- name: Gi,
4819
+ }, Ji = "select", Ki = {
4820
+ name: Ji,
4637
4821
  toFormValue(t, e) {
4638
4822
  return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
4639
4823
  }
4640
4824
  }, Wi = [
4641
- Li,
4642
4825
  Mi,
4643
4826
  Ni,
4644
4827
  qi,
4645
4828
  Ui,
4646
4829
  Hi,
4647
- Ji
4648
- ], A = "el", Ki = {
4830
+ Gi,
4831
+ Ki
4832
+ ], A = "el", zi = {
4649
4833
  button: A + "Button",
4650
4834
  icon: "i",
4651
4835
  slider: A + "Slider",
@@ -4678,7 +4862,7 @@ const bt = {
4678
4862
  object: "fcSubForm",
4679
4863
  subForm: "fcSubForm"
4680
4864
  };
4681
- function Xi() {
4865
+ function xi() {
4682
4866
  return {
4683
4867
  form: {
4684
4868
  inline: !1,
@@ -4712,23 +4896,23 @@ function Xi() {
4712
4896
  }
4713
4897
  };
4714
4898
  }
4715
- function zi(t) {
4899
+ function Xi(t) {
4716
4900
  return t.type === "tooltip";
4717
4901
  }
4718
4902
  function wt(t, e) {
4719
4903
  D(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
4720
4904
  }
4721
- function Y(t) {
4905
+ function Q(t) {
4722
4906
  return t === !1;
4723
4907
  }
4724
- function Qi(t, e) {
4908
+ function Zi(t, e) {
4725
4909
  D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4726
4910
  }
4727
4911
  function He(t) {
4728
- const e = b({}, t);
4912
+ const e = v({}, t);
4729
4913
  return delete e.children, e;
4730
4914
  }
4731
- const Zi = {
4915
+ const Qi = {
4732
4916
  validate() {
4733
4917
  const t = this.form();
4734
4918
  return t ? t.validate() : new Promise((e) => e());
@@ -4747,7 +4931,7 @@ const Zi = {
4747
4931
  },
4748
4932
  tidyOptions(t) {
4749
4933
  return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
4750
- Qi(t, e);
4934
+ Zi(t, e);
4751
4935
  }), t;
4752
4936
  },
4753
4937
  tidyRule({ prop: t }) {
@@ -4769,36 +4953,35 @@ const Zi = {
4769
4953
  });
4770
4954
  },
4771
4955
  getDefaultOptions() {
4772
- return Xi();
4956
+ return xi();
4773
4957
  },
4774
4958
  update() {
4775
4959
  const t = this.options.form;
4776
4960
  this.rule = {
4777
- props: b({}, t),
4961
+ props: v({}, t),
4778
4962
  nativeOn: {
4779
4963
  submit: (e) => {
4780
4964
  e.preventDefault();
4781
4965
  }
4782
4966
  },
4783
- class: [t.className, t.class, "form-create", this.$handle.preview ? "is-preview" : ""],
4784
4967
  style: t.style,
4785
4968
  type: "form"
4786
4969
  };
4787
4970
  },
4788
4971
  beforeRender() {
4789
- const { key: t, ref: e, $handle: r } = this;
4790
- _(this.rule, { key: t, ref: e }), _(this.rule.props, {
4972
+ const { key: t, ref: e, $handle: r } = this, i = this.options.form;
4973
+ _(this.rule, { key: t, ref: e, class: [i.className, i.class, "form-create", this.$handle.preview ? "is-preview" : ""] }), _(this.rule.props, {
4791
4974
  model: r.formData
4792
4975
  });
4793
4976
  },
4794
4977
  render(t) {
4795
- return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Y(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
4978
+ return t.slotLen() && !this.$handle.preview && t.setSlot(void 0, () => this.makeFormBtn()), this.$r(this.rule, Q(this.options.row.show) ? t.getSlots() : [this.makeRow(t)]);
4796
4979
  },
4797
4980
  makeWrap(t, e) {
4798
4981
  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;
4799
4982
  delete r.wrap.title;
4800
- const u = Y(r.wrap.show) ? e : this.$r(ee([r.wrap, {
4801
- props: q(b({
4983
+ const u = Q(r.wrap.show) ? e : this.$r(ee([r.wrap, {
4984
+ props: q(v({
4802
4985
  labelWidth: o === void 0 ? o : jt(o),
4803
4986
  label: n ? r.title.title : void 0
4804
4987
  }, He(r.wrap || {})), {
@@ -4809,22 +4992,22 @@ const Zi = {
4809
4992
  key: `${i}fi`,
4810
4993
  ref: t.wrapRef,
4811
4994
  type: "formItem"
4812
- }]), b({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
4813
- return a === !0 || Y(l) || Y(s.show) ? u : this.makeCol(r, i, [u]);
4995
+ }]), v({ default: () => e }, n ? { label: () => this.makeInfo(r, i, t) } : {}));
4996
+ return a === !0 || Q(l) || Q(s.show) ? u : this.makeCol(r, i, [u]);
4814
4997
  },
4815
4998
  isTitle(t) {
4816
4999
  if (this.options.form.title === !1) return !1;
4817
5000
  const e = t.title;
4818
- return !(!e.title && !e.native || Y(e.show));
5001
+ return !(!e.title && !e.native || Q(e.show));
4819
5002
  },
4820
5003
  makeInfo(t, e, r) {
4821
- var c, p, m, g, $, w;
4822
- const i = b({}, t.title), s = b({}, t.info), n = zi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
4823
- title: (p = (c = r.refRule) == null ? void 0 : c.__$title) == null ? void 0 : p.value,
5004
+ var f, d, g, m, $, w;
5005
+ const i = v({}, t.title), s = v({}, t.info), n = Xi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
5006
+ title: (d = (f = r.refRule) == null ? void 0 : f.__$title) == null ? void 0 : d.value,
4824
5007
  rule: r.rule,
4825
5008
  options: this.options
4826
- }) : ((g = (m = r.refRule) == null ? void 0 : m.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
4827
- if (!Y(s.show) && (s.info || s.native) && !Y(s.icon)) {
5009
+ }) : ((m = (g = r.refRule) == null ? void 0 : g.__$title) == null ? void 0 : m.value) + (o.labelSuffix || o["label-suffix"] || "")];
5010
+ if (!Q(s.show) && (s.info || s.native) && !Q(s.icon)) {
4828
5011
  const O = {
4829
5012
  type: s.type || "popover",
4830
5013
  slot: "label",
@@ -4871,7 +5054,7 @@ const Zi = {
4871
5054
  },
4872
5055
  makeFormBtn() {
4873
5056
  let t = [];
4874
- if (Y(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Y(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
5057
+ if (Q(this.options.submitBtn.show) || t.push(this.makeSubmitBtn()), Q(this.options.resetBtn.show) || t.push(this.makeResetBtn()), !t.length)
4875
5058
  return;
4876
5059
  const e = this.$r({
4877
5060
  type: "formItem",
@@ -4886,7 +5069,7 @@ const Zi = {
4886
5069
  }, [e]);
4887
5070
  },
4888
5071
  makeResetBtn() {
4889
- const t = b({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
5072
+ const t = v({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
4890
5073
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
4891
5074
  type: "button",
4892
5075
  props: t,
@@ -4902,7 +5085,7 @@ const Zi = {
4902
5085
  }, [e]);
4903
5086
  },
4904
5087
  makeSubmitBtn() {
4905
- const t = b({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
5088
+ const t = v({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
4906
5089
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
4907
5090
  type: "button",
4908
5091
  props: t,
@@ -4918,26 +5101,26 @@ const Zi = {
4918
5101
  key: `${this.key}b1`
4919
5102
  }, [e]);
4920
5103
  }
4921
- }, fe = {};
4922
- Yi(fe);
4923
- xi(fe);
4924
- en(fe);
4925
- tn(fe);
4926
- rn(fe);
5104
+ }, ce = {};
5105
+ Yi(ce);
5106
+ en(ce);
5107
+ tn(ce);
5108
+ rn(ce);
5109
+ nn(ce);
4927
5110
  function Yi(t) {
4928
5111
  ["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
4929
5112
  t[e] = P(e);
4930
5113
  }), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
4931
5114
  }
4932
- function xi(t) {
5115
+ function en(t) {
4933
5116
  const e = "select", r = "multiple";
4934
5117
  t.selectMultiple = P(e, { [r]: !0 }), t.selectOne = P(e, { [r]: !1 });
4935
5118
  }
4936
- function en(t) {
5119
+ function tn(t) {
4937
5120
  const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
4938
5121
  Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
4939
5122
  }
4940
- function tn(t) {
5123
+ function rn(t) {
4941
5124
  const e = "upload", r = {
4942
5125
  image: ["image", 0],
4943
5126
  file: ["file", 0],
@@ -4946,7 +5129,7 @@ function tn(t) {
4946
5129
  };
4947
5130
  Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4948
5131
  }
4949
- function rn(t) {
5132
+ function nn(t) {
4950
5133
  const e = {
4951
5134
  frameInputs: ["input", 0],
4952
5135
  frameFiles: ["file", 0],
@@ -4960,7 +5143,7 @@ function rn(t) {
4960
5143
  function Ft(t, e) {
4961
5144
  return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
4962
5145
  }
4963
- function nn(t, e) {
5146
+ function sn(t, e) {
4964
5147
  return {
4965
5148
  formEl() {
4966
5149
  return e.$manager.form();
@@ -5047,7 +5230,10 @@ function nn(t, e) {
5047
5230
  return new Promise((s, n) => {
5048
5231
  (e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
5049
5232
  let a = t.formData();
5050
- h.Function(r) && F(() => r(a, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
5233
+ e.beforeSubmit(a).then(() => {
5234
+ h.Function(r) && F(() => r(a, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
5235
+ }).catch((l) => {
5236
+ });
5051
5237
  }).catch((...a) => {
5052
5238
  h.Function(i) && F(() => i(t, ...a)), n(...a);
5053
5239
  });
@@ -5059,14 +5245,14 @@ const Jt = {
5059
5245
  name: "required",
5060
5246
  load(t, e, r) {
5061
5247
  var s, n;
5062
- const i = sn(t.getValue());
5248
+ const i = on(t.getValue());
5063
5249
  if (i.required === !1)
5064
5250
  t.clearProp(), r.clearValidateState([e.field]);
5065
5251
  else {
5066
- const o = b({
5252
+ const o = v({
5067
5253
  required: !0,
5068
- validator(l, u, c) {
5069
- h.empty(u) ? c(o.message) : c();
5254
+ validator(l, u, f) {
5255
+ h.empty(u) ? f(o.message) : f();
5070
5256
  }
5071
5257
  }, i), a = (n = (s = e.__fc__.refRule) == null ? void 0 : s.__$title) == null ? void 0 : n.value;
5072
5258
  if (!o.message)
@@ -5083,25 +5269,25 @@ const Jt = {
5083
5269
  Jt.load(...t);
5084
5270
  }
5085
5271
  };
5086
- function sn(t) {
5272
+ function on(t) {
5087
5273
  return h.Boolean(t) ? { required: t } : h.String(t) ? { message: t } : h.Undef(t) ? { required: !1 } : h.Function(t) ? { validator: t } : h.Object(t) ? t : {};
5088
5274
  }
5089
- function on(t) {
5090
- t.componentAlias(Ki), Mr.forEach((e) => {
5275
+ function an(t) {
5276
+ t.componentAlias(zi), Mr.forEach((e) => {
5091
5277
  t.component(e.name, e);
5092
5278
  }), t.register(Jt), Wi.forEach((e) => {
5093
5279
  t.parser(e);
5094
- }), Object.keys(fe).forEach((e) => {
5095
- t.maker[e] = fe[e];
5280
+ }), Object.keys(ce).forEach((e) => {
5281
+ t.maker[e] = ce[e];
5096
5282
  });
5097
5283
  }
5098
- function an() {
5284
+ function ln() {
5099
5285
  return Gt({
5100
5286
  ui: "element-ui",
5101
- version: "2.7.5",
5102
- manager: Zi,
5103
- extendApi: nn,
5104
- install: on,
5287
+ version: "2.7.6",
5288
+ manager: Qi,
5289
+ extendApi: sn,
5290
+ install: an,
5105
5291
  attrs: {
5106
5292
  normal: ["col", "wrap"],
5107
5293
  array: ["className"],
@@ -5109,10 +5295,10 @@ function an() {
5109
5295
  }
5110
5296
  });
5111
5297
  }
5112
- const Qe = an();
5113
- typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
5114
- const cn = Qe.maker;
5298
+ const Xe = ln();
5299
+ typeof window != "undefined" && (window.formCreate = Xe, window.Vue && Xe.install(window.Vue));
5300
+ const cn = Xe.maker;
5115
5301
  export {
5116
- Qe as default,
5302
+ Xe as default,
5117
5303
  cn as maker
5118
5304
  };