@form-create/view-design 2.7.4 → 2.7.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * FormCreate 低代码表单渲染器
3
- * @form-create/view-design v2.7.4
3
+ * @form-create/view-design v2.7.5
4
4
  * (c) 2018-2025 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
@@ -19,20 +19,20 @@ var at = (t, e, r) => e in t ? ir(t, e, { enumerable: !0, configurable: !0, writ
19
19
  ar.call(e, r) && at(t, r, e[r]);
20
20
  return t;
21
21
  }, U = (t, e) => nr(t, sr(e));
22
- import ye, { getCurrentInstance as lr, provide as ur, inject as fr, toRefs as lt, reactive as ie, onBeforeMount as cr, watch as B, onMounted as hr, onBeforeUnmount as dr, onUpdated as pr, nextTick as P, markRaw as me, computed as ge, toRef as Ee, ref as mr } from "vue";
22
+ import ye, { getCurrentInstance as lr, provide as ur, inject as fr, toRefs as lt, reactive as ie, onBeforeMount as cr, watch as L, onMounted as hr, onBeforeUnmount as dr, onUpdated as pr, nextTick as A, markRaw as me, computed as ge, toRef as De, ref as mr } from "vue";
23
23
  function gr(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
26
- function He() {
27
- return He = Object.assign ? Object.assign.bind() : function(t) {
26
+ function Je() {
27
+ return Je = Object.assign ? Object.assign.bind() : function(t) {
28
28
  for (var e, r = 1; r < arguments.length; r++) for (var i in e = arguments[r], e) Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
29
29
  return t;
30
- }, He.apply(this, arguments);
30
+ }, Je.apply(this, arguments);
31
31
  }
32
32
  var yr = ["attrs", "props", "domProps"], $r = ["class", "style", "directives"], vr = ["on", "nativeOn"], br = function(t) {
33
33
  return t.reduce(function(e, r) {
34
34
  for (var i in r) if (!e[i]) e[i] = r[i];
35
- else if (yr.indexOf(i) !== -1) e[i] = He({}, e[i], r[i]);
35
+ else if (yr.indexOf(i) !== -1) e[i] = Je({}, e[i], r[i]);
36
36
  else if ($r.indexOf(i) !== -1) {
37
37
  var s = e[i] instanceof Array ? e[i] : [e[i]], n = r[i] instanceof Array ? r[i] : [r[i]];
38
38
  e[i] = [].concat(s, n);
@@ -51,7 +51,7 @@ var yr = ["attrs", "props", "domProps"], $r = ["class", "style", "directives"],
51
51
  };
52
52
  }, Cr = br;
53
53
  const I = /* @__PURE__ */ gr(Cr);
54
- function je(t, e) {
54
+ function Ie(t, e) {
55
55
  return Object.keys(t).reduce((r, i) => ((!e || e.indexOf(i) === -1) && r.push(t[i]), r), []);
56
56
  }
57
57
  const wr = "fcCheckbox", Or = {
@@ -117,13 +117,13 @@ const wr = "fcCheckbox", Or = {
117
117
  }, {
118
118
  key: "" + r + "-" + e.value
119
119
  }]));
120
- }), je(this.$slots)]);
120
+ }), Ie(this.$slots)]);
121
121
  },
122
122
  mounted() {
123
123
  this.$emit("fc.el", this.$refs.el);
124
124
  }
125
125
  };
126
- function G(t) {
126
+ function H(t) {
127
127
  return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
128
128
  }
129
129
  const Fr = "fcFrame";
@@ -250,7 +250,7 @@ function Ot(t) {
250
250
  },
251
251
  data() {
252
252
  return {
253
- fileList: G(this.value),
253
+ fileList: H(this.value),
254
254
  previewVisible: !1,
255
255
  frameVisible: !1,
256
256
  previewImage: ""
@@ -258,7 +258,7 @@ function Ot(t) {
258
258
  },
259
259
  watch: {
260
260
  value(e) {
261
- this.fileList = G(e);
261
+ this.fileList = H(e);
262
262
  },
263
263
  fileList(e) {
264
264
  const r = this.maxLength === 1 ? e[0] || "" : e;
@@ -569,7 +569,7 @@ const Sr = "fcRadio", Rr = {
569
569
  }, {
570
570
  key: "" + r + "-" + e.value
571
571
  }]));
572
- }), je(this.$slots)]);
572
+ }), Ie(this.$slots)]);
573
573
  },
574
574
  mounted() {
575
575
  this.$emit("fc.el", this.$refs.el);
@@ -670,7 +670,7 @@ const kr = "fcSelect", Er = {
670
670
  },
671
671
  methods: {
672
672
  setStatus(t) {
673
- const e = G(t), r = this.formCreateInject.prop.props.data;
673
+ const e = H(t), r = this.formCreateInject.prop.props.data;
674
674
  this.type === "selected" ? this.checked(r, e, "selected") : this.checked(r, e, "checked"), this.$forceUpdate();
675
675
  },
676
676
  checked(t, e, r) {
@@ -688,7 +688,7 @@ const kr = "fcSelect", Er = {
688
688
  ref: "tree"
689
689
  }, {
690
690
  on: e
691
- }]), [je(this.$slots)]);
691
+ }]), [Ie(this.$slots)]);
692
692
  },
693
693
  mounted() {
694
694
  this.$emit("fc.el", this.$refs.tree);
@@ -754,11 +754,11 @@ function St(t) {
754
754
  };
755
755
  },
756
756
  created() {
757
- this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = G(this.value).map(ut).map(ft);
757
+ this.formCreateInject.prop.props.showUploadList === void 0 && (this.formCreateInject.prop.props.showUploadList = !1), this.formCreateInject.prop.props.defaultFileList = H(this.value).map(ut).map(ft);
758
758
  },
759
759
  watch: {
760
760
  value(e) {
761
- this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = G(e).map(ut).map(ft), this.uploadList = this.$refs.upload.fileList);
761
+ this.$refs.upload.fileList.every((r) => !r.status || r.status === "finished") && (this.$refs.upload.fileList = H(e).map(ut).map(ft), this.uploadList = this.$refs.upload.fileList);
762
762
  },
763
763
  maxLength(e, r) {
764
764
  (r === 1 || e === 1) && this.update();
@@ -864,7 +864,7 @@ function St(t) {
864
864
  type: this.uploadType === "file" ? "ios-cloud-upload-outline" : t.imgUpIcon,
865
865
  size: 20
866
866
  }
867
- }]))])]) : null, je(this.$slots, ["default"])]);
867
+ }]))])]) : null, Ie(this.$slots, ["default"])]);
868
868
  },
869
869
  update() {
870
870
  let e = this.$refs.upload.fileList.map((r) => r.is_string ? r.url : r.value || r.url).filter((r) => r !== void 0);
@@ -921,7 +921,7 @@ function S(t, e, r) {
921
921
  function re(t, e) {
922
922
  (ye.del || ye.delete)(t, e);
923
923
  }
924
- function be(t, e = {}, r) {
924
+ function _e(t, e = {}, r) {
925
925
  let i = !1;
926
926
  for (let s in e)
927
927
  if (Object.prototype.hasOwnProperty.call(e, s)) {
@@ -939,14 +939,14 @@ function be(t, e = {}, r) {
939
939
  }
940
940
  else
941
941
  o && S(t, s, {});
942
- t[s] = be(t[s], n, r);
942
+ t[s] = _e(t[s], n, r);
943
943
  } else
944
944
  S(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
945
945
  }
946
946
  return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
947
947
  }
948
- function W(t) {
949
- return be({}, { value: t }).value;
948
+ function G(t) {
949
+ return _e({}, { value: t }).value;
950
950
  }
951
951
  const Vr = Object.assign || function(t) {
952
952
  for (let e, r = 1; r < arguments.length; r++)
@@ -957,7 +957,7 @@ const Vr = Object.assign || function(t) {
957
957
  function C() {
958
958
  return Vr.apply(this, arguments);
959
959
  }
960
- function Je(t) {
960
+ function We(t) {
961
961
  return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : b({}, t);
962
962
  }
963
963
  const Pr = "fcGroup", Br = {
@@ -1042,13 +1042,13 @@ const Pr = "fcGroup", Br = {
1042
1042
  const s = i.$f.formData();
1043
1043
  if (t === e)
1044
1044
  i.$f.deferSyncValue(() => {
1045
- be(i.rule, t), i.$f.setValue(s);
1045
+ _e(i.rule, t), i.$f.setValue(s);
1046
1046
  }, !0);
1047
1047
  else {
1048
1048
  const n = i.$f.formData();
1049
1049
  i.$f.once("reloading", () => {
1050
1050
  i.$f.setValue(n);
1051
- }), i.rule = W(t);
1051
+ }), i.rule = G(t);
1052
1052
  }
1053
1053
  }
1054
1054
  });
@@ -1113,7 +1113,7 @@ const Pr = "fcGroup", Br = {
1113
1113
  };
1114
1114
  if (this.defaultValue) {
1115
1115
  i.formData || (i.formData = {});
1116
- const s = W(this.defaultValue);
1116
+ const s = G(this.defaultValue);
1117
1117
  C(i.formData, this.field ? {
1118
1118
  [this.field]: s
1119
1119
  } : s);
@@ -1137,7 +1137,10 @@ const Pr = "fcGroup", Br = {
1137
1137
  this.$delete(this.cacheRule, t), this.$delete(this.cacheValue, t), e && this.$nextTick(() => this.$emit("remove", r));
1138
1138
  },
1139
1139
  add(t) {
1140
- this.disabled || this.onBeforeAdd(this.value) === !1 || this.addRule(t, !0);
1140
+ if (this.disabled || this.onBeforeAdd(this.value) === !1)
1141
+ return;
1142
+ const e = [...this.value];
1143
+ e.push(this.defaultValue ? G(this.defaultValue) : this.field ? null : {}), this.input(e);
1141
1144
  },
1142
1145
  del(t, e) {
1143
1146
  if (this.disabled || this.onBeforeRemove(this.value, t) === !1)
@@ -1236,9 +1239,9 @@ const Pr = "fcGroup", Br = {
1236
1239
  key: o
1237
1240
  }, {
1238
1241
  on: {
1239
- "update:value": (d) => this.formData(o, d),
1240
- "emit-event": (d, ...m) => this.emitEvent(d, m, a, o),
1241
- input: (d) => this.add$f(a, o, d)
1242
+ "update:value": (p) => this.formData(o, p),
1243
+ "emit-event": (p, ...m) => this.emitEvent(p, m, a, o),
1244
+ input: (p) => this.add$f(a, o, p)
1242
1245
  }
1243
1246
  }, {}, {
1244
1247
  props: {
@@ -1366,170 +1369,6 @@ function ve(t) {
1366
1369
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
1367
1370
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
1368
1371
  }
1369
- const Re = (t, e) => {
1370
- if (!(!t || t === e || !t.$props)) {
1371
- if (t.$props.formCreateInject)
1372
- return t.$props.formCreateInject;
1373
- if (t.$parent)
1374
- return Re(t.$parent, e);
1375
- }
1376
- };
1377
- function Mr(t, e, r) {
1378
- const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1379
- return {
1380
- name: i,
1381
- componentName: i,
1382
- model: {
1383
- prop: "api"
1384
- },
1385
- components: e,
1386
- directives: r,
1387
- provide() {
1388
- return {
1389
- $pfc: this
1390
- };
1391
- },
1392
- inject: { $pfc: { default: null } },
1393
- props: {
1394
- rule: {
1395
- type: Array,
1396
- required: !0,
1397
- default: () => []
1398
- },
1399
- option: {
1400
- type: Object,
1401
- default: () => ({})
1402
- },
1403
- extendOption: Boolean,
1404
- driver: [String, Object],
1405
- value: Object,
1406
- disabled: {
1407
- type: Boolean,
1408
- default: void 0
1409
- },
1410
- preview: {
1411
- type: Boolean,
1412
- default: void 0
1413
- },
1414
- index: [String, Number],
1415
- api: Object,
1416
- locale: [String, Object],
1417
- name: String,
1418
- subForm: {
1419
- type: Boolean,
1420
- default: !0
1421
- },
1422
- inFor: Boolean
1423
- },
1424
- render() {
1425
- return this.fc.render();
1426
- },
1427
- setup(s) {
1428
- const n = lr().proxy;
1429
- ur("parentFC", n);
1430
- const o = fr("parentFC", null);
1431
- let a = o;
1432
- if (o)
1433
- for (; a.parent; )
1434
- a = a.parent;
1435
- else
1436
- a = n;
1437
- const { rule: l, value: u, subForm: f, inFor: d } = lt(s), m = ie({
1438
- ctxInject: {},
1439
- destroyed: !1,
1440
- isShow: !0,
1441
- unique: 1,
1442
- renderRule: [...l.value || []],
1443
- updateValue: JSON.stringify(u.value || {})
1444
- }), g = new t(n), $ = g.api(), _ = d.value, D = () => {
1445
- if (o) {
1446
- const F = Re(n, o);
1447
- if (F) {
1448
- let R;
1449
- _ ? (R = G(F.getSubForm()), R.push($)) : R = $, F.subForm(R);
1450
- }
1451
- }
1452
- }, ee = () => {
1453
- const F = Re(n, o);
1454
- if (F)
1455
- if (_) {
1456
- const R = G(F.getSubForm()), N = R.indexOf($);
1457
- N > -1 && R.splice(N, 1);
1458
- } else
1459
- F.subForm();
1460
- };
1461
- let V = null;
1462
- cr(() => {
1463
- B(() => {
1464
- let F = "";
1465
- const R = s.option && s.option.globalClass || {};
1466
- Object.keys(R).forEach((N) => {
1467
- let de = "";
1468
- R[N].style && Object.keys(R[N].style).forEach((H) => {
1469
- de += ve(H) + ":" + R[N].style[H] + ";";
1470
- }), R[N].content && (de += R[N].content + ";"), de && (F += `.${N}{${de}}`);
1471
- }), s.option && s.option.style && (F += s.option.style), V || (V = document.createElement("style"), V.type = "text/css", document.head.appendChild(V)), V.innerHTML = F || "";
1472
- }, () => {
1473
- });
1474
- });
1475
- const T = ne(() => {
1476
- g.bus.$emit("$loadData.$topForm");
1477
- }, 100), ce = ne(function() {
1478
- g.bus.$emit("$loadData.$scopeForm");
1479
- }, 100), Ae = ne(() => {
1480
- g.bus.$emit("$loadData.$form");
1481
- }, 100), he = (F) => {
1482
- g.bus.$emit("change-$form." + F);
1483
- };
1484
- return hr(() => {
1485
- o && ($.top.bus.$on("$loadData.$form", T), $.top.bus.$on("change", he)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", ce), g.mounted();
1486
- }), dr(() => {
1487
- o && ($.top.bus.$off("$loadData.$form", T), $.top.bus.$off("change", he)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", ce), V && document.head.removeChild(V), ee(), m.destroyed = !0, g.unmount();
1488
- }), pr(() => {
1489
- g.updated();
1490
- }), B(f, (F) => {
1491
- F ? D() : ee();
1492
- }, { immediate: !0 }), B(() => s.option, () => {
1493
- g.initOptions(), $.refresh();
1494
- }, { deep: !0 }), B(() => [...l.value], (F) => {
1495
- g.$handle.isBreakWatch() || F.length === m.renderRule.length && F.every((R) => m.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1496
- }), B(() => [s.disabled, s.preview], () => {
1497
- $.refresh();
1498
- }), B(u, (F) => {
1499
- JSON.stringify(F || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(F || {}) : $.setValue(F || {}));
1500
- }, { deep: !0, flush: "post" }), B(() => s.index, () => {
1501
- $.coverValue({}), g.$handle.updateAppendData(), P(() => {
1502
- P(() => {
1503
- $.clearValidateState();
1504
- });
1505
- });
1506
- }, { flush: "sync" }), U(b({
1507
- fc: me(g),
1508
- parent: o && me(o),
1509
- top: me(a),
1510
- fapi: me($)
1511
- }, lt(m)), {
1512
- getGroupInject: () => Re(n, o),
1513
- refresh() {
1514
- ++m.unique;
1515
- },
1516
- renderRule() {
1517
- m.renderRule = [...l.value || []];
1518
- },
1519
- updateValue(F) {
1520
- if (m.destroyed) return;
1521
- const R = JSON.stringify(F);
1522
- m.updateValue !== R && (m.updateValue = R, n.$emit("update:value", F), P(() => {
1523
- Ae(), o ? f.value || ce() : (T(), ce());
1524
- }));
1525
- }
1526
- });
1527
- },
1528
- created() {
1529
- this.$emit("input", this.fapi), this.fc.init();
1530
- }
1531
- };
1532
- }
1533
1372
  const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style", "directives"], Dt = ["on", "nativeOn", "hook"], Y = (t, e = {}, r = {}) => {
1534
1373
  const i = [...kt, ...r.normal || []], s = [...Et, ...r.array || []], n = [...Dt, ...r.functional || []], o = r.props || [];
1535
1374
  return t.reduce((a, l) => {
@@ -1540,64 +1379,64 @@ const kt = ["attrs", "props", "domProps", "scopedSlots"], Et = ["class", "style"
1540
1379
  else if (i.indexOf(u) > -1)
1541
1380
  a[u] = b(b({}, a[u]), l[u]);
1542
1381
  else if (s.indexOf(u) > -1) {
1543
- const f = a[u] instanceof Array ? a[u] : [a[u]], d = l[u] instanceof Array ? l[u] : [l[u]];
1544
- a[u] = [...f, ...d];
1382
+ const f = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
1383
+ a[u] = [...f, ...p];
1545
1384
  } else if (n.indexOf(u) > -1)
1546
1385
  for (const f in l[u])
1547
1386
  if (a[u][f]) {
1548
- const d = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], m = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
1549
- a[u][f] = [...d, ...m];
1387
+ const p = a[u][f] instanceof Array ? a[u][f] : [a[u][f]], m = l[u][f] instanceof Array ? l[u][f] : [l[u][f]];
1388
+ a[u][f] = [...p, ...m];
1550
1389
  } else
1551
1390
  a[u][f] = l[u][f];
1552
1391
  else if (u === "hook")
1553
1392
  for (let f in l[u])
1554
- a[u][f] ? a[u][f] = Ur(a[u][f], l[u][f]) : a[u][f] = l[u][f];
1393
+ a[u][f] ? a[u][f] = Mr(a[u][f], l[u][f]) : a[u][f] = l[u][f];
1555
1394
  else
1556
1395
  a[u] = l[u];
1557
1396
  else
1558
1397
  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];
1559
1398
  return a;
1560
1399
  }, e);
1561
- }, Ur = (t, e) => function() {
1400
+ }, Mr = (t, e) => function() {
1562
1401
  t && t.apply(this, arguments), e && e.apply(this, arguments);
1563
- }, jt = ["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"], Ze = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
1402
+ }, jt = ["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"];
1564
1403
  function It() {
1565
- return [...jt, ...kt, ...Et, ...Dt, ...Ze, ...Ye];
1404
+ return [...jt, ...kt, ...Et, ...Dt, ...Ye, ...xe];
1566
1405
  }
1567
1406
  function At(t, e, r) {
1568
1407
  return `[form-create ${t}]: ${e}`;
1569
1408
  }
1570
- function xe(t, e) {
1409
+ function et(t, e) {
1571
1410
  console.error(At("err", t));
1572
1411
  }
1573
- function qr(t) {
1574
- xe(t.toString()), console.error(t);
1412
+ function Ur(t) {
1413
+ et(t.toString()), console.error(t);
1575
1414
  }
1576
- function Gr(t) {
1415
+ function qr(t) {
1577
1416
  return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
1578
1417
  }
1579
- const We = "[[FORM-CREATE-PREFIX-", ze = "-FORM-CREATE-SUFFIX]]";
1580
- function et(t, e) {
1581
- return JSON.stringify(be(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1418
+ const ze = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
1419
+ function be(t, e) {
1420
+ return JSON.stringify(_e(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1582
1421
  if (!(i && i._isVue === !0)) {
1583
1422
  if (typeof i != "function")
1584
1423
  return i;
1585
1424
  if (i.__json)
1586
1425
  return i.__json;
1587
1426
  if (i.__origin && (i = i.__origin), !i.__emit)
1588
- return We + i + ze;
1427
+ return ze + i + Ke;
1589
1428
  }
1590
1429
  }, e);
1591
1430
  }
1592
- function Le(t) {
1431
+ function Te(t) {
1593
1432
  return new Function("return " + t)();
1594
1433
  }
1595
1434
  function z(t, e) {
1596
1435
  if (t && h.String(t) && t.length > 4) {
1597
1436
  let r = t.trim(), i = !1;
1598
1437
  try {
1599
- if (r.indexOf(ze) > 0 && r.indexOf(We) === 0)
1600
- r = r.replace(ze, "").replace(We, ""), i = !0;
1438
+ if (r.indexOf(Ke) > 0 && r.indexOf(ze) === 0)
1439
+ r = r.replace(Ke, "").replace(ze, ""), i = !0;
1601
1440
  else if (r.indexOf("$FN:") === 0)
1602
1441
  r = r.substring(4), i = !0;
1603
1442
  else if (r.indexOf("$EXEC:") === 0)
@@ -1611,19 +1450,19 @@ function z(t, e) {
1611
1450
  }, r.__json = t, r.__inject = !0, r;
1612
1451
  } else {
1613
1452
  if (r.indexOf("$FNX:") === 0)
1614
- return r = Le("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
1453
+ return r = Te("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
1615
1454
  (!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
1616
1455
  }
1617
1456
  if (!i) return t;
1618
1457
  let s;
1619
1458
  try {
1620
- s = Le(r);
1459
+ s = Te(r);
1621
1460
  } catch (n) {
1622
- s = Le("function " + r);
1461
+ s = Te("function " + r);
1623
1462
  }
1624
1463
  return s.__json = t, s;
1625
1464
  } catch (s) {
1626
- xe(`解析失败:${r}
1465
+ et(`解析失败:${r}
1627
1466
 
1628
1467
  err: ${s}`);
1629
1468
  return;
@@ -1636,9 +1475,9 @@ function Vt(t, e) {
1636
1475
  return h.Undef(i) || !i.indexOf ? i : z(i, e);
1637
1476
  });
1638
1477
  }
1639
- let Hr = 0;
1640
- function Ie() {
1641
- const t = 370 + ++Hr;
1478
+ let Gr = 0;
1479
+ function Ae() {
1480
+ const t = 370 + ++Gr;
1642
1481
  return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
1643
1482
  }
1644
1483
  function se(t, e, r) {
@@ -1647,7 +1486,7 @@ function se(t, e, r) {
1647
1486
  s && ((!i[s] || typeof i[s] != "object") && S(i, s, {}), i = i[s]), s = n;
1648
1487
  }), S(i, s, r), i;
1649
1488
  }
1650
- function Ke(t, e) {
1489
+ function Xe(t, e) {
1651
1490
  return {
1652
1491
  value: t,
1653
1492
  enumerable: !1,
@@ -1659,16 +1498,16 @@ function Pt(t, e) {
1659
1498
  return Bt([t], e || !1)[0];
1660
1499
  }
1661
1500
  function Bt(t, e) {
1662
- return be([], [...t], e || !1);
1501
+ return _e([], [...t], e || !1);
1663
1502
  }
1664
1503
  function x(t, e) {
1665
- return Y(Array.isArray(e) ? e : [e], t, { array: Ze, normal: Ye }), t;
1504
+ return Y(Array.isArray(e) ? e : [e], t, { array: Ye, normal: xe }), t;
1666
1505
  }
1667
1506
  function ct(t) {
1668
1507
  const e = h.Function(t.getRule) ? t.getRule() : t;
1669
1508
  return e.type || (e.type = "input"), e;
1670
1509
  }
1671
- function Jr(t, e) {
1510
+ function Hr(t, e) {
1672
1511
  return t ? (Object.keys(e || {}).forEach((r) => {
1673
1512
  e[r] && (t[r] = x(t[r] || {}, e[r]));
1674
1513
  }), t) : e;
@@ -1687,28 +1526,28 @@ function O(t, e) {
1687
1526
  try {
1688
1527
  e = t();
1689
1528
  } catch (r) {
1690
- qr(r);
1529
+ Ur(r);
1691
1530
  }
1692
1531
  return e;
1693
1532
  }
1694
- function Xe(t, e) {
1533
+ function Qe(t, e) {
1695
1534
  let r = null;
1696
- return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && G(r).forEach((i) => {
1535
+ return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Qe(i, e)) : r = t, r && e && H(r).forEach((i) => {
1697
1536
  (Array.isArray(i) ? i : [i]).forEach((n) => {
1698
1537
  n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
1699
1538
  });
1700
1539
  }), r;
1701
1540
  }
1702
- function Wr(t, e) {
1541
+ function Jr(t, e) {
1703
1542
  if (h.Object(t)) {
1704
1543
  const r = {};
1705
1544
  return Object.keys(t).forEach((i) => {
1706
- r[i] = Xe(t[i], i);
1545
+ r[i] = Qe(t[i], i);
1707
1546
  }), r;
1708
1547
  } else
1709
- return Xe(t, e);
1548
+ return Qe(t, e);
1710
1549
  }
1711
- function Oe() {
1550
+ function Fe() {
1712
1551
  const t = {}, e = (r) => r || "default";
1713
1552
  return {
1714
1553
  setSlot(r, i) {
@@ -1724,7 +1563,7 @@ function Oe() {
1724
1563
  const n = s();
1725
1564
  Array.isArray(n) ? i.push(...n) : i.push(n);
1726
1565
  } else h.Undef(s) || i.push(s);
1727
- }), Wr(i, r);
1566
+ }), Jr(i, r);
1728
1567
  },
1729
1568
  getSlots() {
1730
1569
  let r = [];
@@ -1744,7 +1583,7 @@ function Oe() {
1744
1583
  }
1745
1584
  };
1746
1585
  }
1747
- function Fe(t, e) {
1586
+ function Se(t, e) {
1748
1587
  return Object.setPrototypeOf(t, e), t;
1749
1588
  }
1750
1589
  const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, fe = {
@@ -1782,12 +1621,12 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1782
1621
  return new RegExp(e, "g").test(t);
1783
1622
  }
1784
1623
  };
1785
- function L(t, e) {
1624
+ function B(t, e) {
1786
1625
  return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
1787
1626
  t != null && (t = t[r]);
1788
1627
  }), t;
1789
1628
  }
1790
- function zr(t) {
1629
+ function Wr(t) {
1791
1630
  const e = /{{\s*(.*?)\s*}}/g;
1792
1631
  let r;
1793
1632
  const i = {};
@@ -1801,6 +1640,170 @@ function dt(t) {
1801
1640
  n === 0 ? i = s : i += "." + s, r.push(i);
1802
1641
  }), r.join(" && ");
1803
1642
  }
1643
+ const ke = (t, e) => {
1644
+ if (!(!t || t === e || !t.$props)) {
1645
+ if (t.$props.formCreateInject)
1646
+ return t.$props.formCreateInject;
1647
+ if (t.$parent)
1648
+ return ke(t.$parent, e);
1649
+ }
1650
+ };
1651
+ function zr(t, e, r) {
1652
+ const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1653
+ return {
1654
+ name: i,
1655
+ componentName: i,
1656
+ model: {
1657
+ prop: "api"
1658
+ },
1659
+ components: e,
1660
+ directives: r,
1661
+ provide() {
1662
+ return {
1663
+ $pfc: this
1664
+ };
1665
+ },
1666
+ inject: { $pfc: { default: null } },
1667
+ props: {
1668
+ rule: {
1669
+ type: Array,
1670
+ required: !0,
1671
+ default: () => []
1672
+ },
1673
+ option: {
1674
+ type: Object,
1675
+ default: () => ({})
1676
+ },
1677
+ extendOption: Boolean,
1678
+ driver: [String, Object],
1679
+ value: Object,
1680
+ disabled: {
1681
+ type: Boolean,
1682
+ default: void 0
1683
+ },
1684
+ preview: {
1685
+ type: Boolean,
1686
+ default: void 0
1687
+ },
1688
+ index: [String, Number],
1689
+ api: Object,
1690
+ locale: [String, Object],
1691
+ name: String,
1692
+ subForm: {
1693
+ type: Boolean,
1694
+ default: !0
1695
+ },
1696
+ inFor: Boolean
1697
+ },
1698
+ render() {
1699
+ return this.fc.render();
1700
+ },
1701
+ setup(s) {
1702
+ const n = lr().proxy;
1703
+ ur("parentFC", n);
1704
+ const o = fr("parentFC", null);
1705
+ let a = o;
1706
+ if (o)
1707
+ for (; a.parent; )
1708
+ a = a.parent;
1709
+ else
1710
+ a = n;
1711
+ const { rule: l, value: u, subForm: f, inFor: p } = lt(s), m = ie({
1712
+ ctxInject: {},
1713
+ destroyed: !1,
1714
+ isShow: !0,
1715
+ unique: 1,
1716
+ renderRule: [...l.value || []],
1717
+ updateValue: JSON.stringify(u.value || {})
1718
+ }), g = new t(n), $ = g.api(), _ = p.value, D = () => {
1719
+ if (o) {
1720
+ const F = ke(n, o);
1721
+ if (F) {
1722
+ let R;
1723
+ _ ? (R = H(F.getSubForm()), R.push($)) : R = $, F.subForm(R);
1724
+ }
1725
+ }
1726
+ }, ee = () => {
1727
+ const F = ke(n, o);
1728
+ if (F)
1729
+ if (_) {
1730
+ const R = H(F.getSubForm()), N = R.indexOf($);
1731
+ N > -1 && R.splice(N, 1);
1732
+ } else
1733
+ F.subForm();
1734
+ };
1735
+ let P = null;
1736
+ cr(() => {
1737
+ L(() => {
1738
+ let F = "";
1739
+ const R = s.option && s.option.globalClass || {};
1740
+ Object.keys(R).forEach((N) => {
1741
+ let de = "";
1742
+ R[N].style && Object.keys(R[N].style).forEach((J) => {
1743
+ de += ve(J) + ":" + R[N].style[J] + ";";
1744
+ }), R[N].content && (de += R[N].content + ";"), de && (F += `.${N}{${de}}`);
1745
+ }), s.option && s.option.style && (F += s.option.style), P || (P = document.createElement("style"), P.type = "text/css", document.head.appendChild(P)), P.innerHTML = F || "";
1746
+ }, () => {
1747
+ });
1748
+ });
1749
+ const T = ne(() => {
1750
+ g.bus.$emit("$loadData.$topForm");
1751
+ }, 100), ce = ne(function() {
1752
+ g.bus.$emit("$loadData.$scopeForm");
1753
+ }, 100), Ve = ne(() => {
1754
+ g.bus.$emit("$loadData.$form");
1755
+ }, 100), he = (F) => {
1756
+ g.bus.$emit("change-$form." + F);
1757
+ };
1758
+ return hr(() => {
1759
+ o && ($.top.bus.$on("$loadData.$form", T), $.top.bus.$on("change", he)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", ce), g.mounted();
1760
+ }), dr(() => {
1761
+ o && ($.top.bus.$off("$loadData.$form", T), $.top.bus.$off("change", he)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", ce), P && document.head.removeChild(P), ee(), m.destroyed = !0, g.unmount();
1762
+ }), pr(() => {
1763
+ g.updated();
1764
+ }), L(f, (F) => {
1765
+ F ? D() : ee();
1766
+ }, { immediate: !0 }), L(() => s.option, () => {
1767
+ g.initOptions(), $.refresh();
1768
+ }, { deep: !0 }), L(() => [...l.value], (F) => {
1769
+ g.$handle.isBreakWatch() || F.length === m.renderRule.length && F.every((R) => m.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1770
+ }), L(() => [s.disabled, s.preview], () => {
1771
+ $.refresh();
1772
+ }), L(u, (F) => {
1773
+ be(F || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(F || {}) : $.setValue(F || {}));
1774
+ }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1775
+ $.coverValue({}), g.$handle.updateAppendData(), A(() => {
1776
+ A(() => {
1777
+ $.clearValidateState();
1778
+ });
1779
+ });
1780
+ }, { flush: "sync" }), U(b({
1781
+ fc: me(g),
1782
+ parent: o && me(o),
1783
+ top: me(a),
1784
+ fapi: me($)
1785
+ }, lt(m)), {
1786
+ getGroupInject: () => ke(n, o),
1787
+ refresh() {
1788
+ ++m.unique;
1789
+ },
1790
+ renderRule() {
1791
+ m.renderRule = [...l.value || []];
1792
+ },
1793
+ updateValue(F) {
1794
+ if (m.destroyed) return;
1795
+ const R = be(F);
1796
+ m.updateValue !== R && (m.updateValue = R, n.$emit("update:value", F), A(() => {
1797
+ Ve(), o ? f.value || ce() : (T(), ce());
1798
+ }));
1799
+ }
1800
+ });
1801
+ },
1802
+ created() {
1803
+ this.$emit("input", this.fapi), this.fc.init();
1804
+ }
1805
+ };
1806
+ }
1804
1807
  function Tt() {
1805
1808
  return {
1806
1809
  props: {},
@@ -1813,7 +1816,7 @@ function Tt() {
1813
1816
  value: void 0
1814
1817
  };
1815
1818
  }
1816
- function A(t, e) {
1819
+ function V(t, e) {
1817
1820
  return (r, i, s, n = {}) => {
1818
1821
  const o = new tt(t, r, i, s, n);
1819
1822
  return e && (h.Function(e) ? e(o) : o.props(e)), o;
@@ -1842,7 +1845,7 @@ function Nt(t) {
1842
1845
  });
1843
1846
  }
1844
1847
  Nt(It());
1845
- const Mt = A("");
1848
+ const Mt = V("");
1846
1849
  function Kr(t, e, r) {
1847
1850
  let i = Mt("", e);
1848
1851
  return i._data.type = t, i._data.title = r, i;
@@ -1856,7 +1859,7 @@ function Xr() {
1856
1859
  create: Kr,
1857
1860
  createTmp: pt,
1858
1861
  template: pt,
1859
- factory: A
1862
+ factory: V
1860
1863
  };
1861
1864
  }
1862
1865
  function Qr(t, e, r) {
@@ -1906,7 +1909,7 @@ function gt(t, e, r) {
1906
1909
  onSuccess(n) {
1907
1910
  let o = (l) => l;
1908
1911
  const a = z(t.parse);
1909
- h.Function(a) ? o = a : a && h.String(a) && (o = (l) => L(l, a)), i(o(n, void 0, r));
1912
+ h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), i(o(n, void 0, r));
1910
1913
  },
1911
1914
  onError(n) {
1912
1915
  s(n);
@@ -1915,16 +1918,17 @@ function gt(t, e, r) {
1915
1918
  });
1916
1919
  }
1917
1920
  function $e(t) {
1918
- return W(t);
1921
+ return G(t);
1919
1922
  }
1920
1923
  function Zr(t) {
1921
1924
  function e(n) {
1922
1925
  return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
1923
1926
  }
1924
1927
  function r(n, o, a) {
1925
- e(n).forEach((l) => {
1926
- t.getCtxs(l).forEach((u) => {
1927
- S(u.rule, o, a), t.$render.clearCache(u);
1928
+ h.Undef(n) ? n = Object.keys(b(b({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1929
+ const u = t.fieldCtx[l] || t.nameCtx[l];
1930
+ u && u.forEach((f) => {
1931
+ S(f.rule, o, a), t.$render.clearCache(f);
1928
1932
  });
1929
1933
  });
1930
1934
  }
@@ -1936,6 +1940,12 @@ function Zr(t) {
1936
1940
  }, []);
1937
1941
  }
1938
1942
  const s = {
1943
+ get isScope() {
1944
+ return t.vm.$props.subForm === !1;
1945
+ },
1946
+ get isPreview() {
1947
+ return t.preview;
1948
+ },
1939
1949
  get config() {
1940
1950
  return t.options;
1941
1951
  },
@@ -2210,9 +2220,9 @@ function Zr(t) {
2210
2220
  t.getCtxs(o).forEach((a) => {
2211
2221
  t.$render.clearCache(a), a.rule.value = $e(a.defaultValue);
2212
2222
  });
2213
- }), P(() => {
2214
- P(() => {
2215
- P(() => {
2223
+ }), A(() => {
2224
+ A(() => {
2225
+ A(() => {
2216
2226
  s.clearValidateState(n);
2217
2227
  });
2218
2228
  });
@@ -2228,7 +2238,7 @@ function Zr(t) {
2228
2238
  return O(() => s.method(n, o)(...a));
2229
2239
  },
2230
2240
  toJson(n) {
2231
- return et(s.rule, n);
2241
+ return be(s.rule, n);
2232
2242
  },
2233
2243
  trigger(n, o, ...a) {
2234
2244
  const l = s.el(n);
@@ -2251,8 +2261,8 @@ function Zr(t) {
2251
2261
  if (!l)
2252
2262
  return [];
2253
2263
  const u = [];
2254
- return ((d) => {
2255
- d && d.forEach((m) => {
2264
+ return ((p) => {
2265
+ p && p.forEach((m) => {
2256
2266
  typeof m == "object" && (m.field && u.push(m), u.push(...s.getChildrenRuleList(m)));
2257
2267
  });
2258
2268
  })(a ? a.loadChildrenPending() : l.children), u;
@@ -2315,7 +2325,7 @@ function Zr(t) {
2315
2325
  bus: t.bus,
2316
2326
  fetch(n) {
2317
2327
  return new Promise((o, a) => {
2318
- n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2328
+ n = G(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2319
2329
  O(() => n.onSuccess && n.onSuccess(l)), o(l);
2320
2330
  }).catch((l) => {
2321
2331
  O(() => n.onError && n.onError(l)), a(l);
@@ -2324,11 +2334,11 @@ function Zr(t) {
2324
2334
  },
2325
2335
  watchFetch(n, o, a, l) {
2326
2336
  return t.fc.watchLoadData((u, f) => {
2327
- let d = W(n);
2328
- d = t.loadFetchVar(d, u), !(l && l(d, f) === !1) && t.beforeFetch(d).then(() => gt(d, t.fc.create.fetch, s).then((m) => {
2329
- O(() => d.onSuccess && d.onSuccess(m)), o && o(m, f);
2337
+ let p = G(n);
2338
+ p = t.loadFetchVar(p, u), !(l && l(p, f) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((m) => {
2339
+ O(() => p.onSuccess && p.onSuccess(m)), o && o(m, f);
2330
2340
  }).catch((m) => {
2331
- O(() => d.onError && d.onError(m)), a && a(m);
2341
+ O(() => p.onError && p.onError(m)), a && a(m);
2332
2342
  }));
2333
2343
  }, n.wait == null ? 1e3 : n.wait);
2334
2344
  },
@@ -2417,7 +2427,7 @@ function xr(t) {
2417
2427
  if (!this.vm.isShow)
2418
2428
  return;
2419
2429
  this.$manager.beforeRender();
2420
- const e = Oe();
2430
+ const e = Fe();
2421
2431
  return this.sort.forEach((r) => {
2422
2432
  this.renderSlot(e, this.$handle.ctxs[r]);
2423
2433
  }), this.$manager.render(e);
@@ -2480,8 +2490,8 @@ function xr(t) {
2480
2490
  };
2481
2491
  l.length && i.slotUpdate && O(() => i.slotUpdate(u));
2482
2492
  let f = [];
2483
- const d = e.loadChildrenPending();
2484
- e.parser.renderChildren ? f = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2493
+ const p = e.loadChildrenPending();
2494
+ e.parser.renderChildren ? f = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (f = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2485
2495
  f.push(this.renderRule({
2486
2496
  type: "template",
2487
2497
  slot: $
@@ -2494,7 +2504,7 @@ function xr(t) {
2494
2504
  });
2495
2505
  const m = this.getTypeSlot(e);
2496
2506
  let g;
2497
- return m ? (u.children = f, g = m(u)) : g = a ? e.parser.preview(Je(f), e) : e.parser.render(Je(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2507
+ return m ? (u.children = f, g = m(u)) : g = a ? e.parser.preview(We(f), e) : e.parser.render(We(f), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2498
2508
  }, this.setCache(e, s, r);
2499
2509
  }
2500
2510
  return (...s) => {
@@ -2570,7 +2580,11 @@ function xr(t) {
2570
2580
  ctxProp(e) {
2571
2581
  const { ref: r, key: i, rule: s } = e;
2572
2582
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2573
- const n = [
2583
+ const n = b({}, e.prop.on || {}), o = {};
2584
+ Object.keys(n).forEach((l) => {
2585
+ l.indexOf("native.") === 0 && (o[l.replace("native.", "")] = n[l], delete n[l]);
2586
+ }), e.prop.on = n;
2587
+ const a = [
2574
2588
  {
2575
2589
  ref: r,
2576
2590
  key: s.key || `${i}fc`,
@@ -2579,30 +2593,33 @@ function xr(t) {
2579
2593
  "hook:mounted": () => {
2580
2594
  this.onMounted(e);
2581
2595
  },
2582
- "fc.updateValue": (o) => {
2583
- this.$handle.onUpdateValue(e, o);
2596
+ "fc.updateValue": (l) => {
2597
+ this.$handle.onUpdateValue(e, l);
2584
2598
  },
2585
- "fc.el": (o) => {
2586
- e.exportEl = o, o && ((o.$el || o).__rule__ = e.rule);
2599
+ "fc.el": (l) => {
2600
+ e.exportEl = l, l && ((l.$el || l).__rule__ = e.rule);
2587
2601
  }
2588
2602
  }
2603
+ },
2604
+ {
2605
+ nativeOn: o
2589
2606
  }
2590
2607
  ];
2591
2608
  if (e.input) {
2592
- const o = this.tmpInput;
2609
+ const l = this.tmpInput;
2593
2610
  this.vm.$props.disabled === !0 && (e.prop.props.disabled = !0), e.prop.model = {
2594
2611
  value: this.$handle.getFormData(e),
2595
- callback: (a) => {
2596
- o && o(e.field, a, e.rule), this.onInput(e, a);
2612
+ callback: (u) => {
2613
+ l && l(e.field, u, e.rule), this.onInput(e, u);
2597
2614
  },
2598
2615
  expression: `formData.${e.id}`
2599
- }, e.prop.modelEmit && n.push({
2616
+ }, e.prop.modelEmit && a.push({
2600
2617
  on: {
2601
2618
  [e.prop.modelEmit]: () => this.onEmitInput(e)
2602
2619
  }
2603
2620
  });
2604
2621
  }
2605
- return Y(n, e.prop), e.prop;
2622
+ return Y(a, e.prop), e.prop;
2606
2623
  },
2607
2624
  onMounted(e) {
2608
2625
  e.el = this.vm.$refs[e.ref], e.el && ((e.el.$el || e.el).__rule__ = e.rule), e.parser.mounted(e), this.$handle.effect(e, "mounted"), this.$handle.targetHook(e, "mounted");
@@ -2619,7 +2636,7 @@ function xr(t) {
2619
2636
  },
2620
2637
  renderChildren(e, r, i) {
2621
2638
  if (!h.trueArray(e)) return [];
2622
- const s = Oe();
2639
+ const s = Fe();
2623
2640
  return e.map((n) => {
2624
2641
  if (n) {
2625
2642
  if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
@@ -2628,7 +2645,7 @@ function xr(t) {
2628
2645
  }) : n);
2629
2646
  if (n.__fc__)
2630
2647
  return this.renderSlot(s, n.__fc__, r);
2631
- n.type && P(() => {
2648
+ n.type && A(() => {
2632
2649
  this.$handle.loadChildren(e, r), this.$handle.refresh();
2633
2650
  });
2634
2651
  }
@@ -2645,7 +2662,7 @@ function xr(t) {
2645
2662
  },
2646
2663
  createRuleVnode(e, r, i) {
2647
2664
  this.force = i !== !1, this.tmpInput = r;
2648
- const s = Oe();
2665
+ const s = Fe();
2649
2666
  return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
2650
2667
  },
2651
2668
  renderRule(e, r, i) {
@@ -2660,7 +2677,7 @@ function xr(t) {
2660
2677
  a && (s = q(a));
2661
2678
  }
2662
2679
  if (!s) return;
2663
- const n = Oe();
2680
+ const n = Fe();
2664
2681
  h.trueArray(e.children) && e.children.forEach((a) => {
2665
2682
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2666
2683
  });
@@ -2718,16 +2735,16 @@ function ti(t) {
2718
2735
  let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
2719
2736
  return h.trueArray(u) && u.forEach((f) => {
2720
2737
  if (!f) return;
2721
- let d, m = n || o || a;
2722
- if (h.Object(f) && (d = f.inject, f = f.name, m = f.prefix || m), m) {
2738
+ let p, m = n || o || a;
2739
+ if (h.Object(f) && (p = f.inject, f = f.name, m = f.prefix || m), m) {
2723
2740
  r || (m = `native-${m}`);
2724
2741
  const g = ve(`${m}-${f}`), $ = (..._) => {
2725
2742
  this.vm.$emit(g, ..._), this.vm.$emit("emit-event", g, ..._), this.bus.$emit(g, ..._);
2726
2743
  };
2727
- if ($.__emit = !0, !d && l === !1)
2744
+ if ($.__emit = !0, !p && l === !1)
2728
2745
  i[f] = $;
2729
2746
  else {
2730
- let _ = d || l || this.options.injectEvent;
2747
+ let _ = p || l || this.options.injectEvent;
2731
2748
  i[f] = h.Undef(_) ? $ : this.inject(s, $, _);
2732
2749
  }
2733
2750
  }
@@ -2758,21 +2775,21 @@ function ti(t) {
2758
2775
  },
2759
2776
  loadStrVar(e, r, i) {
2760
2777
  if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
2761
- const s = e, n = zr(e);
2778
+ const s = e, n = Wr(e);
2762
2779
  let o;
2763
2780
  if (n.forEach((a) => {
2764
2781
  const l = a.split("||"), u = l[0].trim();
2765
2782
  if (u) {
2766
2783
  const f = (l[1] || "").trim();
2767
- let d, m = !1;
2784
+ let p, m = !1;
2768
2785
  if (i && u.indexOf("$form.") === 0) {
2769
2786
  const g = u.split(".");
2770
- g.shift(), E(i.value, g[0]) && (m = !0, d = r ? r({
2787
+ g.shift(), E(i.value, g[0]) && (m = !0, p = r ? r({
2771
2788
  id: "$form." + g[0] + "_" + i.rule.__fc__.id,
2772
- getValue: () => L(i.value, g)
2773
- }) : L(i.value, g));
2789
+ getValue: () => B(i.value, g)
2790
+ }) : B(i.value, g));
2774
2791
  }
2775
- m || (d = r ? r(u, f) : this.fc.getLoadData(u, f)), o = d, e = e.replaceAll(`{{${a}}}`, d == null ? "" : d);
2792
+ m || (p = r ? r(u, f) : this.fc.getLoadData(u, f)), o = p, e = e.replaceAll(`{{${a}}}`, p == null ? "" : p);
2776
2793
  }
2777
2794
  }), n.length === 1 && s === `{{${n[0]}}}`)
2778
2795
  return o;
@@ -2835,13 +2852,13 @@ function ni(t) {
2835
2852
  }
2836
2853
  function si(t) {
2837
2854
  Object.defineProperties(t.origin, {
2838
- __fc__: Ke(me(t), !0)
2855
+ __fc__: Xe(me(t), !0)
2839
2856
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2840
- __fc__: Ke(me(t), !0)
2857
+ __fc__: Xe(me(t), !0)
2841
2858
  });
2842
2859
  }
2843
2860
  function Gt(t, e, r) {
2844
- const i = Ie(), s = !!e.field;
2861
+ const i = Ae(), s = !!e.field;
2845
2862
  C(this, {
2846
2863
  id: i,
2847
2864
  ref: i,
@@ -2866,7 +2883,7 @@ function Gt(t, e, r) {
2866
2883
  input: s,
2867
2884
  el: void 0,
2868
2885
  exportEl: void 0,
2869
- defaultValue: s ? W(r) : void 0,
2886
+ defaultValue: s ? G(r) : void 0,
2870
2887
  field: e.field || void 0
2871
2888
  }), this.updateKey(), si(this), this.update(t, !0);
2872
2889
  }
@@ -2907,8 +2924,8 @@ C(Gt.prototype, {
2907
2924
  rule: this.rule,
2908
2925
  api: this.$api,
2909
2926
  update: (u) => {
2910
- const f = u || i, d = this.getPending(e, i);
2911
- this.setPending(e, r, f), o && o(f, d);
2927
+ const f = u || i, p = this.getPending(e, i);
2928
+ this.setPending(e, r, f), o && o(f, p);
2912
2929
  },
2913
2930
  reload: () => {
2914
2931
  const u = this.getPending(e, i);
@@ -2940,7 +2957,7 @@ C(Gt.prototype, {
2940
2957
  t === void 0 ? this.payload = {} : delete this.payload[t];
2941
2958
  },
2942
2959
  updateKey(t) {
2943
- this.key = Ie(), t && this.parent && this.parent.updateKey(t);
2960
+ this.key = Ae(), t && this.parent && this.parent.updateKey(t);
2944
2961
  },
2945
2962
  updateType() {
2946
2963
  this.originType = this.rule.type, this.type = q(this.rule.type), this.trueType = this.$handle.getType(this.originType);
@@ -3021,14 +3038,14 @@ function oi(t) {
3021
3038
  C(t.prototype, {
3022
3039
  nextRefresh(e) {
3023
3040
  const r = this.loadedId;
3024
- P(() => {
3041
+ A(() => {
3025
3042
  r === this.loadedId && (e ? e() : this.refresh());
3026
3043
  });
3027
3044
  },
3028
3045
  parseRule(e) {
3029
3046
  const r = ct(e);
3030
3047
  return Object.defineProperties(r, {
3031
- __origin__: Ke(e, !0)
3048
+ __origin__: Xe(e, !0)
3032
3049
  }), ai(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
3033
3050
  i && this.loadFn(i, r);
3034
3051
  }), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
@@ -3079,7 +3096,7 @@ function oi(t) {
3079
3096
  let l = ct(o);
3080
3097
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3081
3098
  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);
3082
- let f, d = !1, m = !!o.__fc__, g = l.value;
3099
+ let f, p = !1, m = !!o.__fc__, g = l.value;
3083
3100
  if (m) {
3084
3101
  if (f = o.__fc__, g = f.defaultValue, f.deleted) {
3085
3102
  if ($t(f))
@@ -3088,7 +3105,7 @@ function oi(t) {
3088
3105
  } else if (!f.check(this)) {
3089
3106
  if ($t(f))
3090
3107
  return;
3091
- e[a] = o = o._clone ? o._clone() : Vt(et(o)), f = null, d = !0;
3108
+ e[a] = o = o._clone ? o._clone() : Vt(be(o)), f = null, p = !0;
3092
3109
  }
3093
3110
  }
3094
3111
  if (f)
@@ -3097,7 +3114,7 @@ function oi(t) {
3097
3114
  const D = this.parseRule(o);
3098
3115
  f = new Gt(this, D, g), this.bindParser(f);
3099
3116
  }
3100
- [!1, !0].forEach((D) => this.parseEmit(f, D)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !d && !m && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
3117
+ [!1, !0].forEach((D) => this.parseEmit(f, D)), this.syncProp(f), f.parent = r || null, f.root = e, this.setCtx(f), !p && !m && (this.effect(f, "load"), this.targetHook(f, "load")), this.effect(f, "created");
3101
3118
  const $ = f.loadChildrenPending();
3102
3119
  if (f.parser.loadChildren === !1 || s($, f), !r) {
3103
3120
  const D = i(a);
@@ -3117,8 +3134,8 @@ function oi(t) {
3117
3134
  const r = li(e), i = [], s = this.api;
3118
3135
  if (!r.length) return !1;
3119
3136
  for (let a = 0; a < r.length; a++) {
3120
- const l = r[a], u = l.handle || function(d) {
3121
- return (fe[l.condition || "=="] || fe["=="])(d, l.value);
3137
+ const l = r[a], u = l.handle || function(p) {
3138
+ return (fe[l.condition || "=="] || fe["=="])(p, l.value);
3122
3139
  };
3123
3140
  if (!h.trueArray(l.rule)) continue;
3124
3141
  const f = U(b({}, l), {
@@ -3132,7 +3149,7 @@ function oi(t) {
3132
3149
  const n = [];
3133
3150
  let o = !1;
3134
3151
  return this.deferSyncValue(() => {
3135
- i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: d, child: m, ctrl: g, method: $ }) => {
3152
+ i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: f, append: p, child: m, ctrl: g, method: $ }) => {
3136
3153
  if (a) {
3137
3154
  l ? e.ctrlRule.push({
3138
3155
  __ctrl: !0,
@@ -3154,7 +3171,7 @@ function oi(t) {
3154
3171
  children: u
3155
3172
  };
3156
3173
  e.ctrlRule.push(_), this.bus.$once("load-start", () => {
3157
- f ? s.prepend(_, f, m) : d || m ? s.append(_, d || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
3174
+ f ? s.prepend(_, f, m) : p || m ? s.append(_, p || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, _);
3158
3175
  });
3159
3176
  } else {
3160
3177
  e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
@@ -3164,7 +3181,7 @@ function oi(t) {
3164
3181
  });
3165
3182
  }), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
3166
3183
  n.forEach((a) => a());
3167
- }) : n.length && P(() => {
3184
+ }) : n.length && A(() => {
3168
3185
  n.forEach((a) => a());
3169
3186
  })), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
3170
3187
  },
@@ -3213,9 +3230,9 @@ function fi(t) {
3213
3230
  rule: e.origin,
3214
3231
  api: this.api,
3215
3232
  setFlag: s || !1
3216
- }), s && P(() => {
3217
- P(() => {
3218
- P(() => {
3233
+ }), s && A(() => {
3234
+ A(() => {
3235
+ A(() => {
3219
3236
  this.api.clearValidateState(e.id);
3220
3237
  });
3221
3238
  });
@@ -3250,9 +3267,9 @@ function fi(t) {
3250
3267
  },
3251
3268
  syncForm() {
3252
3269
  const e = {}, r = this.fields(), i = [];
3253
- this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Ee(this.appendData, n)), s), e), r.reduce((s, n) => {
3270
+ this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = De(this.appendData, n)), s), e), r.reduce((s, n) => {
3254
3271
  const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
3255
- return this.isIgnore(o.rule) && i.push(n), s[n] = Ee(o.rule, "value"), s;
3272
+ return this.isIgnore(o.rule) && i.push(n), s[n] = De(o.rule, "value"), s;
3256
3273
  }, e), this.form = ie(e), this.ignoreFields = i, this.syncValue();
3257
3274
  },
3258
3275
  isIgnore(e) {
@@ -3279,7 +3296,7 @@ function fi(t) {
3279
3296
  return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
3280
3297
  },
3281
3298
  isQuote(e, r) {
3282
- return (h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3299
+ return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3283
3300
  },
3284
3301
  refreshUpdate(e, r, i, s) {
3285
3302
  if (h.Function(e.rule.update)) {
@@ -3312,7 +3329,7 @@ function fi(t) {
3312
3329
  function vt(t, e) {
3313
3330
  return typeof e == "function" ? "" + e : e;
3314
3331
  }
3315
- const ke = {
3332
+ const Ee = {
3316
3333
  init(t) {
3317
3334
  },
3318
3335
  toFormValue(t, e) {
@@ -3367,7 +3384,7 @@ function hi(t) {
3367
3384
  if (n)
3368
3385
  return n;
3369
3386
  }
3370
- return r[e.originType] || r[q(e.type)] || r[e.trueType] || ke;
3387
+ return r[e.originType] || r[q(e.type)] || r[e.trueType] || Ee;
3371
3388
  },
3372
3389
  bindParser(e) {
3373
3390
  e.setParser(this.getParser(e));
@@ -3381,17 +3398,17 @@ function hi(t) {
3381
3398
  },
3382
3399
  watchCtx(e) {
3383
3400
  if (It().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
3384
- const s = Ee(e.rule, i), n = i === "children";
3385
- e.refRule[i] = s, e.watch.push(B(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3401
+ const s = De(e.rule, i), n = i === "children";
3402
+ e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3386
3403
  let l = s.value;
3387
3404
  if (!this.isBreakWatch()) {
3388
3405
  if (n && e.parser.loadChildren === !1) {
3389
3406
  this.$render.clearCache(e), this.nextRefresh();
3390
3407
  return;
3391
3408
  }
3392
- if (this.watching = !0, P(() => {
3409
+ if (this.watching = !0, A(() => {
3393
3410
  this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
3394
- }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), P(() => {
3411
+ }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), A(() => {
3395
3412
  this.targetHook(e, "hidden", { value: l });
3396
3413
  })), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
3397
3414
  this.syncForm();
@@ -3416,7 +3433,7 @@ function hi(t) {
3416
3433
  s && (i = this.api.t(s[1]));
3417
3434
  }
3418
3435
  return i;
3419
- }), e.refRule.__$validate = ge(() => G(e.rule.validate).map((i) => {
3436
+ }), e.refRule.__$validate = ge(() => H(e.rule.validate).map((i) => {
3420
3437
  var n, o;
3421
3438
  const s = b({}, i);
3422
3439
  if (s.message) {
@@ -3437,8 +3454,8 @@ function hi(t) {
3437
3454
  }
3438
3455
  return s;
3439
3456
  })), e.input) {
3440
- const i = Ee(e.rule, "value");
3441
- e.watch.push(B(() => i.value, () => {
3457
+ const i = De(e.rule, "value");
3458
+ e.watch.push(L(() => i.value, () => {
3442
3459
  let s = e.parser.toFormValue(i.value, e);
3443
3460
  this.isChange(e, s) && this.setValue(e, i.value, s, !0);
3444
3461
  }));
@@ -3455,7 +3472,7 @@ function hi(t) {
3455
3472
  }), a = (l) => {
3456
3473
  s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : se(e.rule, s, l);
3457
3474
  };
3458
- (s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== L(e.rule, s)) && a(o.value), e.watch.push(B(o, (l) => {
3475
+ (s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== B(e.rule, s)) && a(o.value), e.watch.push(L(o, (l) => {
3459
3476
  n = l, setTimeout(() => {
3460
3477
  a(l);
3461
3478
  });
@@ -3472,16 +3489,16 @@ function hi(t) {
3472
3489
  const l = a.mode === "OR";
3473
3490
  let u = !0;
3474
3491
  for (let f = 0; f < a.group.length; f++) {
3475
- const d = a.group[f];
3492
+ const p = a.group[f];
3476
3493
  let m, g = null;
3477
- if (d.variable)
3478
- g = JSON.stringify(this.fc.getLoadData(d.variable) || "");
3479
- else if (d.field)
3480
- g = dt(d.field || "");
3481
- else
3494
+ if (p.variable)
3495
+ g = JSON.stringify(this.fc.getLoadData(p.variable) || "");
3496
+ else if (p.field)
3497
+ g = dt(p.field || "");
3498
+ else if (!p.mode)
3482
3499
  return !0;
3483
- let $ = d.compare;
3484
- if ($ && ($ = dt($ || "")), d.mode ? m = n(d) : fe[d.condition] ? h.Function(d.handler) ? m = O(() => d.handler(this.api, e.rule)) : m = O(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${g}, ${$ || "$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)) : m = !1, l && m)
3500
+ let $ = p.compare;
3501
+ if ($ && ($ = dt($ || "")), p.mode ? m = n(p) : fe[p.condition] ? h.Function(p.handler) ? m = O(() => p.handler(this.api, e.rule)) : m = O(() => 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, fe, 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)
3485
3502
  return !0;
3486
3503
  l || (u = u && m);
3487
3504
  }
@@ -3506,7 +3523,7 @@ function hi(t) {
3506
3523
  fc: s.fc
3507
3524
  }, ...l);
3508
3525
  }, o), {});
3509
- return new Function("$formulas", "$form", "$scope", "$group", "$rule", "$api", `with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form, n, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, i ? this.subRuleData[i.id] || {} : {}, r.rule, this.api);
3526
+ return O(() => new Function("$formulas", "$form", "$scope", "$group", "$rule", "$api", `with($form){with($scope){with(this){with($group){with($formulas){ return ${e} }}}}}`).call(this.api.form, n, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, i ? this.subRuleData[i.id] || {} : {}, r.rule, this.api));
3510
3527
  },
3511
3528
  updateChildren(e, r, i) {
3512
3529
  this.deferSyncValue(() => {
@@ -3597,7 +3614,7 @@ function pi(t) {
3597
3614
  }), Object.keys(e.rule).forEach((i) => {
3598
3615
  i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
3599
3616
  }), Object.keys(r).forEach((i) => {
3600
- e.watch.push(B(r[i], (s) => {
3617
+ e.watch.push(L(r[i], (s) => {
3601
3618
  this.effect(e, "watch", { [i]: s });
3602
3619
  }, { deep: !0 }));
3603
3620
  });
@@ -3630,15 +3647,15 @@ function pi(t) {
3630
3647
  Object.keys(l).forEach((u) => {
3631
3648
  const f = this.providers[u];
3632
3649
  if (!f || f.input && !i) return;
3633
- let d;
3650
+ let p;
3634
3651
  if (!f._c)
3635
- d = "*";
3652
+ p = "*";
3636
3653
  else if (f._used.indexOf(s) > -1)
3637
- d = s;
3654
+ p = s;
3638
3655
  else
3639
3656
  return;
3640
3657
  const m = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3641
- e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => x(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${d}:${f.input ? 1 : 0}`, o, [m, r, this.api]);
3658
+ e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => x(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${p}:${f.input ? 1 : 0}`, o, [m, r, this.api]);
3642
3659
  });
3643
3660
  }
3644
3661
  });
@@ -3664,7 +3681,7 @@ function K(t) {
3664
3681
  return t.bus;
3665
3682
  },
3666
3683
  preview() {
3667
- return t.vm.$options.propsData.preview != null ? t.vm.$options.propsData.preview : t.options.value.preview || !1;
3684
+ return t.vm.$options.propsData.preview != null ? t.vm.$options.propsData.preview : t.vm.parent && t.vm.parent.$props.preview != null ? t.vm.parent.$props.preview : t.options.value.preview || !1;
3668
3685
  }
3669
3686
  }), C(this, {
3670
3687
  fc: t,
@@ -3724,7 +3741,8 @@ C(K.prototype, {
3724
3741
  return new Promise((e, r) => {
3725
3742
  const i = t && t.beforeFetch && O(() => t.beforeFetch(t, { api: this.api }));
3726
3743
  i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3727
- }).then(() => this.globalBeforeFetch(t));
3744
+ }).then(() => this.globalBeforeFetch(t)).catch(() => {
3745
+ });
3728
3746
  }
3729
3747
  });
3730
3748
  ti(K);
@@ -3735,7 +3753,7 @@ fi(K);
3735
3753
  hi(K);
3736
3754
  di(K);
3737
3755
  pi(K);
3738
- const yi = "fcFragment", Te = {
3756
+ const yi = "fcFragment", Ne = {
3739
3757
  name: yi,
3740
3758
  functional: !0,
3741
3759
  props: ["vnode"],
@@ -3778,7 +3796,7 @@ function vi() {
3778
3796
  },
3779
3797
  use(r) {
3780
3798
  Object.keys(r).forEach((i) => {
3781
- const s = ve(i), n = Gr(i).toLocaleLowerCase(), o = r[i];
3799
+ const s = ve(i), n = qr(i).toLocaleLowerCase(), o = r[i];
3782
3800
  [i, s, n].forEach((a) => {
3783
3801
  e.alias(i, o), e.prototype[a] = function(l, u) {
3784
3802
  return this.make(o, l, u);
@@ -3809,7 +3827,7 @@ C(Ht.prototype, {
3809
3827
  this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
3810
3828
  },
3811
3829
  updateKey() {
3812
- this.key = Ie();
3830
+ this.key = Ae();
3813
3831
  },
3814
3832
  //TODO interface
3815
3833
  init() {
@@ -3853,22 +3871,23 @@ const _i = function(t) {
3853
3871
  const e = {
3854
3872
  name: "loadData",
3855
3873
  _fn: [],
3856
- mounted(r, i, s) {
3857
- this.deleted(r);
3858
- let n = G(r.getValue());
3859
- const o = [];
3860
- n.forEach((a) => {
3861
- if (a && (a.attr || a.template)) {
3862
- let l = (d) => {
3863
- let m;
3864
- a.template ? m = t.$handle.loadStrVar(a.template, d) : a.handler && h.Function(a.handler) ? m = a.handler(d, i, s) : m = d(a.attr, a.default), a.copy !== !1 && (m = W(m));
3865
- const g = a.modify ? i : r.getProp();
3866
- a.to === "child" ? g.children ? S(g.children, 0, m) : S(g, "children", [m]) : se(g, a.to || "options", m), s.sync(i);
3867
- }, u = (d) => l(d);
3868
- const f = t.watchLoadData(u);
3869
- l = ne(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
3870
- }
3871
- }), this._fn[r.id] = o;
3874
+ loaded(r, i, s) {
3875
+ this.deleted(r), A(() => {
3876
+ let n = H(r.getValue());
3877
+ const o = [];
3878
+ n.forEach((a) => {
3879
+ if (a && (a.attr || a.template)) {
3880
+ let l = (p) => {
3881
+ let m;
3882
+ 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 = G(m));
3883
+ const g = a.modify ? i : r.getProp();
3884
+ a.to === "child" ? g.children ? S(g.children, 0, m) : S(g, "children", [m]) : se(g, a.to || "options", m), s.sync(i);
3885
+ }, u = (p) => l(p);
3886
+ const f = t.watchLoadData(u);
3887
+ l = ne(l, a.wait || 300), a.watch !== !1 ? o.push(f) : f();
3888
+ }
3889
+ }), this._fn[r.id] = o;
3890
+ });
3872
3891
  },
3873
3892
  deleted(r) {
3874
3893
  this._fn[r.id] && (this._fn[r.id].forEach((i) => {
@@ -3876,7 +3895,7 @@ const _i = function(t) {
3876
3895
  }), delete this._fn[r.id]), r.clearProp();
3877
3896
  }
3878
3897
  };
3879
- return e.watch = e.mounted, e;
3898
+ return e.watch = e.loaded, e;
3880
3899
  }, Ci = function(t) {
3881
3900
  const e = {
3882
3901
  name: "t",
@@ -3893,8 +3912,8 @@ const _i = function(t) {
3893
3912
  let $ = t.t(u ? l.attr : l, u ? l.params : null, g);
3894
3913
  const _ = u && l.modify ? i : r.getProp();
3895
3914
  a === "child" ? _.children ? S(_.children, 0, $) : S(_, "children", [$]) : se(_, a, $), s.sync(i);
3896
- }, d = (g) => f(g);
3897
- const m = t.watchLoadData(d);
3915
+ }, p = (g) => f(g);
3916
+ const m = t.watchLoadData(p);
3898
3917
  f = ne(f, l.wait || 300), l.watch !== !1 ? o.push(m) : m();
3899
3918
  }
3900
3919
  }), this._fn[r.id] = o;
@@ -3941,43 +3960,43 @@ const _i = function(t) {
3941
3960
  function r(s, n, o) {
3942
3961
  let a = s.value;
3943
3962
  i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
3944
- const l = (d) => {
3945
- d === void 0 ? s.clearProp() : se(s.getProp(), a.to || "options", d), o.sync(n);
3963
+ const l = (p) => {
3964
+ p === void 0 ? s.clearProp() : se(s.getProp(), a.to || "options", p), o.sync(n);
3946
3965
  };
3947
3966
  if (!a || !a.action && !a.key) {
3948
3967
  l(void 0);
3949
3968
  return;
3950
3969
  }
3951
- if (a = W(a), a.to || (a.to = "options"), a.key) {
3952
- const d = t.$handle.options.globalData[a.key];
3953
- if (!d) {
3970
+ if (a = G(a), a.to || (a.to = "options"), a.key) {
3971
+ const p = t.$handle.options.globalData[a.key];
3972
+ if (!p) {
3954
3973
  l(void 0);
3955
3974
  return;
3956
3975
  }
3957
- if (d.type === "static") {
3958
- l(d.data);
3976
+ if (p.type === "static") {
3977
+ l(p.data);
3959
3978
  return;
3960
3979
  } else
3961
- a = b(b({}, a), d);
3980
+ a = b(b({}, a), p);
3962
3981
  }
3963
3982
  const u = a.onError, f = () => {
3964
3983
  if (!s.getValue())
3965
3984
  return s.clearProp(), o.sync(n), !0;
3966
3985
  };
3967
- i._fn[s.id] = t.watchLoadData(ne((d, m) => {
3986
+ i._fn[s.id] = t.watchLoadData(ne((p, m) => {
3968
3987
  if (m && a.watch === !1)
3969
3988
  return i._fn[s.id]();
3970
- const g = t.$handle.loadFetchVar(W(a), d, n), $ = U(b({
3989
+ const g = t.$handle.loadFetchVar(G(a), p, n), $ = U(b({
3971
3990
  headers: {}
3972
3991
  }, g), {
3973
3992
  onSuccess(_, D) {
3974
3993
  if (f()) return;
3975
3994
  let ee = (T) => D ? T : E(T, "data") ? T.data : T;
3976
- const V = z(g.parse);
3977
- h.Function(V) ? ee = V : V && h.String(V) && (ee = (T) => L(T, V)), l(ee(_, n, o)), o.sync(n);
3995
+ const P = z(g.parse);
3996
+ h.Function(P) ? ee = P : P && h.String(P) && (ee = (T) => B(T, P)), l(ee(_, n, o));
3978
3997
  },
3979
3998
  onError(_) {
3980
- l(void 0), !f() && (u || ((D) => xe(D.message || "fetch fail " + g.action)))(_, n, o);
3999
+ l(void 0), !f() && (u || ((D) => et(D.message || "fetch fail " + g.action)))(_, n, o);
3981
4000
  }
3982
4001
  });
3983
4002
  t.$handle.beforeFetch($, { rule: n, api: o }).then(() => {
@@ -4090,7 +4109,7 @@ function it(t, e) {
4090
4109
  return null;
4091
4110
  const r = e.split(".");
4092
4111
  let i = t(r.shift());
4093
- return r.length ? i == null ? null : L(i, r) : i;
4112
+ return r.length ? i == null ? null : B(i, r) : i;
4094
4113
  }
4095
4114
  function ji(t) {
4096
4115
  return it(ki, t);
@@ -4105,7 +4124,7 @@ function Vi(t, e) {
4105
4124
  let r;
4106
4125
  return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
4107
4126
  }
4108
- function Ne() {
4127
+ function Me() {
4109
4128
  return Vi("name", ...arguments);
4110
4129
  }
4111
4130
  function Pi(t) {
@@ -4124,79 +4143,79 @@ function Bi(t, e) {
4124
4143
  }
4125
4144
  function Li(t) {
4126
4145
  const e = t.key || [], r = t.array || [], i = t.normal || [];
4127
- jt.push(...e), Ze.push(...r), Ye.push(...i), Nt([...e, ...r, ...i]);
4146
+ jt.push(...e), Ye.push(...r), xe.push(...i), Nt([...e, ...r, ...i]);
4128
4147
  }
4129
4148
  let Ti = 1;
4130
- const M = {}, Se = Symbol("defValue");
4149
+ const M = {}, Re = Symbol("defValue");
4131
4150
  function Wt(t) {
4132
4151
  const e = {
4133
- [Te.name]: Te
4152
+ [Ne.name]: Ne
4134
4153
  }, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
4135
4154
  t.extendApi
4136
4155
  ], u = b({}, Oi), f = Xr();
4137
- let d = { global: {} };
4156
+ let p = { global: {} };
4138
4157
  const m = t.isMobile === !0, g = ie({
4139
4158
  $mobile: m
4140
4159
  }), $ = vi(), _ = {}, D = {};
4141
4160
  Li(t.attrs || {});
4142
4161
  function ee(c) {
4143
- const p = M[c];
4144
- if (Array.isArray(p))
4145
- return p.map((y) => y.api());
4146
- if (p)
4147
- return p.api();
4162
+ const d = M[c];
4163
+ if (Array.isArray(d))
4164
+ return d.map((y) => y.api());
4165
+ if (d)
4166
+ return d.api();
4148
4167
  }
4149
- function V(c) {
4168
+ function P(c) {
4150
4169
  o.push(c);
4151
4170
  }
4152
4171
  function T() {
4153
- const c = Ne(...arguments);
4172
+ const c = Me(...arguments);
4154
4173
  c.id && c.prop && (i[c.id] = c.prop);
4155
4174
  }
4156
4175
  function ce() {
4157
- const c = Ne(...arguments);
4176
+ const c = Me(...arguments);
4158
4177
  c.id && c.prop && (u[c.id] = h.Function(c.prop) ? c.prop : U(b({}, c.prop), {
4159
4178
  name: c.id
4160
4179
  }));
4161
4180
  }
4162
- function Ae(c) {
4181
+ function Ve(c) {
4163
4182
  $.use(c);
4164
4183
  }
4165
4184
  function he() {
4166
- const c = Ne(...arguments);
4167
- if (!c.id || !c.prop) return ke;
4168
- const p = q(c.id), y = c.prop, v = y.merge === !0 ? r[p] : void 0;
4169
- r[p] = Fe(y, v || ke), f[p] = A(p), y.maker && C(f, y.maker);
4185
+ const c = Me(...arguments);
4186
+ if (!c.id || !c.prop) return Ee;
4187
+ const d = q(c.id), y = c.prop, v = y.merge === !0 ? r[d] : void 0;
4188
+ r[d] = Se(y, v || Ee), f[d] = V(d), y.maker && C(f, y.maker);
4170
4189
  }
4171
- function F(c, p) {
4190
+ function F(c, d) {
4172
4191
  let y;
4173
4192
  if (h.String(c)) {
4174
- if (y = c, p === void 0)
4193
+ if (y = c, d === void 0)
4175
4194
  return ["form-create", "formcreate"].indexOf(y) > -1 ? R() : e[y];
4176
4195
  } else
4177
- y = q(c.name), p = c;
4178
- if (!y || !p) return;
4196
+ y = q(c.name), d = c;
4197
+ if (!y || !d) return;
4179
4198
  const v = q(y);
4180
- e[y] = p, e[v] = p, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], p.formCreateParser && he(y, p.formCreateParser);
4199
+ e[y] = d, e[v] = d, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], d.formCreateParser && he(y, d.formCreateParser);
4181
4200
  }
4182
4201
  function R() {
4183
- return Mr(Pe, e, i);
4202
+ return zr(Be, e, i);
4184
4203
  }
4185
4204
  function N() {
4186
- return Te;
4205
+ return Ne;
4187
4206
  }
4188
- function de(c, p) {
4189
- return h.Function(c.install) ? c.install(H, p) : h.Function(c) && c(H, p), this;
4207
+ function de(c, d) {
4208
+ return h.Function(c.install) ? c.install(J, d) : h.Function(c) && c(J, d), this;
4190
4209
  }
4191
- function H(c, p, y) {
4192
- let v = Bi(c, p || {});
4210
+ function J(c, d, y) {
4211
+ let v = Bi(c, d || {});
4193
4212
  const w = v.$refs.fc.formCreate;
4194
4213
  return w.$parent = y, Pi(w.options).appendChild(v.$el), w.api();
4195
4214
  }
4196
- Fe(H, D);
4215
+ Se(J, D);
4197
4216
  function Kt(c) {
4198
- let p = b({}, t);
4199
- return c ? p.inherit = {
4217
+ let d = b({}, t);
4218
+ return c ? d.inherit = {
4200
4219
  components: e,
4201
4220
  parsers: r,
4202
4221
  directives: i,
@@ -4206,57 +4225,57 @@ function Wt(t) {
4206
4225
  maker: f,
4207
4226
  formulas: _,
4208
4227
  loadData: g
4209
- } : delete p.inherit, Wt(p);
4228
+ } : delete d.inherit, Wt(d);
4210
4229
  }
4211
- function Xt(c, p) {
4212
- s[c] = p;
4230
+ function Xt(c, d) {
4231
+ s[c] = d;
4213
4232
  }
4214
- function Qt(c, p) {
4215
- _[c] = p;
4233
+ function Qt(c, d) {
4234
+ _[c] = d;
4216
4235
  }
4217
- function Zt(c, p) {
4236
+ function Zt(c, d) {
4218
4237
  const y = n[c] || {}, v = y.parsers || {};
4219
- p.parsers && Object.keys(p.parsers).forEach((w) => {
4220
- v[w] = Fe(p.parsers[w], ke);
4221
- }), p.name = c, n[c] = U(b(b({}, y), p), { parsers: v });
4238
+ d.parsers && Object.keys(d.parsers).forEach((w) => {
4239
+ v[w] = Se(d.parsers[w], Ee);
4240
+ }), d.name = c, n[c] = U(b(b({}, y), d), { parsers: v });
4222
4241
  }
4223
- function _e(c) {
4224
- c && Object.keys(M).forEach((p) => {
4225
- (Array.isArray(M[p]) ? M[p] : [M[p]]).forEach((v) => {
4242
+ function Ce(c) {
4243
+ c && Object.keys(M).forEach((d) => {
4244
+ (Array.isArray(M[d]) ? M[d] : [M[d]]).forEach((v) => {
4226
4245
  v.bus.$emit("$loadData." + c);
4227
4246
  });
4228
4247
  });
4229
4248
  }
4230
- function Ve(c, p) {
4231
- se(g, c, p), _e(c);
4249
+ function Pe(c, d) {
4250
+ se(g, c, d), Ce(c);
4232
4251
  }
4233
- function Ce(c, p) {
4234
- const y = (...v) => O(() => p(...v));
4235
- y._driver = !0, Ve(c, y);
4252
+ function we(c, d) {
4253
+ const y = (...v) => O(() => d(...v));
4254
+ y._driver = !0, Pe(c, y);
4236
4255
  }
4237
- function nt(c, p) {
4256
+ function nt(c, d) {
4238
4257
  const y = (c || "").split(".");
4239
4258
  c = y.shift();
4240
4259
  const v = y.join(".");
4241
- if (E(g, c) || S(g, c, Se), g[c] !== Se) {
4260
+ if (E(g, c) || S(g, c, Re), g[c] !== Re) {
4242
4261
  let w = g[c];
4243
- return w && w._driver ? w = w(v) : y.length && (w = L(w, y)), w == null || w === "" ? p : w;
4262
+ return w && w._driver ? w = w(v) : y.length && (w = B(w, y)), w == null || w === "" ? d : w;
4244
4263
  } else
4245
- return p;
4264
+ return d;
4246
4265
  }
4247
4266
  function Yt(c) {
4248
4267
  l.push(c);
4249
4268
  }
4250
4269
  function xt(c) {
4251
- delete g[c], _e(c);
4270
+ delete g[c], Ce(c);
4252
4271
  }
4253
- function er(c, p) {
4254
- a.push({ name: c, callback: p });
4272
+ function er(c, d) {
4273
+ a.push({ name: c, callback: d });
4255
4274
  }
4256
- function Pe(c) {
4275
+ function Be(c) {
4257
4276
  C(this, {
4258
4277
  id: Ti++,
4259
- create: H,
4278
+ create: J,
4260
4279
  vm: c,
4261
4280
  manager: bi(t.manager),
4262
4281
  parsers: r,
@@ -4265,7 +4284,7 @@ function Wt(t) {
4265
4284
  formulas: _,
4266
4285
  isMobile: m,
4267
4286
  rules: c.$options.propsData.rule,
4268
- name: c.$options.propsData.name || Ie(),
4287
+ name: c.$options.propsData.name || Ae(),
4269
4288
  inFor: c.$options.propsData.inFor,
4270
4289
  prop: {
4271
4290
  components: e,
@@ -4274,7 +4293,7 @@ function Wt(t) {
4274
4293
  get: null,
4275
4294
  drivers: n,
4276
4295
  renderDriver: null,
4277
- refreshData: _e,
4296
+ refreshData: Ce,
4278
4297
  loadData: g,
4279
4298
  CreateNode: $,
4280
4299
  bus: new Fi(),
@@ -4283,60 +4302,60 @@ function Wt(t) {
4283
4302
  extendApiFn: l,
4284
4303
  fetchCache: /* @__PURE__ */ new WeakMap(),
4285
4304
  tmpData: ie({})
4286
- }), a.forEach((p) => {
4287
- this.bus.$on(p.name, p.callback);
4288
- }), P(() => {
4289
- B(this.options, () => {
4305
+ }), a.forEach((d) => {
4306
+ this.bus.$on(d.name, d.callback);
4307
+ }), A(() => {
4308
+ L(this.options, () => {
4290
4309
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
4291
4310
  }, { deep: !0 });
4292
4311
  }), C(c.$options.components, e), C(c.$options.directives, i), this.$handle = new K(this), this.name && (this.inFor ? (M[this.name] || (M[this.name] = []), M[this.name].push(this)) : M[this.name] = this);
4293
4312
  }
4294
- Pe.isMobile = m, C(Pe.prototype, {
4313
+ Be.isMobile = m, C(Be.prototype, {
4295
4314
  init() {
4296
- this.isSub() && this.unwatch.push(B(() => this.vm.parent.fc.options.value, () => {
4315
+ this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
4297
4316
  this.initOptions(), this.$handle.api.refresh();
4298
- }, { 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.renderDriver), this.renderDriver || (this.renderDriver = this.drivers.default), this.initOptions(), this.$handle.init();
4317
+ }, { 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();
4299
4318
  },
4300
- targetFormDriver(c, ...p) {
4319
+ targetFormDriver(c, ...d) {
4301
4320
  if (this.renderDriver && this.renderDriver[c])
4302
- return O(() => this.renderDriver[c](...p));
4321
+ return O(() => this.renderDriver[c](...d));
4303
4322
  },
4304
- t(c, p, y) {
4323
+ t(c, d, y) {
4305
4324
  let v = y ? y("$t." + c) : this.globalLanguageDriver(c);
4306
- return v == null && (v = ""), v && p && Object.keys(p).forEach((w) => {
4325
+ return v == null && (v = ""), v && d && Object.keys(d).forEach((w) => {
4307
4326
  const j = new RegExp(`{${w}}`, "g");
4308
- v = v.replace(j, p[w]);
4327
+ v = v.replace(j, d[w]);
4309
4328
  }), v;
4310
4329
  },
4311
4330
  globalDataDriver(c) {
4312
- let p = c.split(".");
4313
- const y = p.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4331
+ let d = c.split(".");
4332
+ const y = d.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4314
4333
  if (v) {
4315
4334
  if (v.type === "static")
4316
- return L(v.data, p);
4335
+ return B(v.data, d);
4317
4336
  {
4318
4337
  let w;
4319
4338
  const j = this.fetchCache.get(v);
4320
4339
  if (j) {
4321
- if (j.status && (w = L(j.data, p)), !j.loading)
4340
+ if (j.status && (w = B(j.data, d)), !j.loading)
4322
4341
  return w;
4323
4342
  j.loading = !1, this.fetchCache.set(v, j);
4324
4343
  } else
4325
4344
  this.fetchCache.set(v, { status: !1 });
4326
4345
  const k = ne(() => {
4327
4346
  le();
4328
- const J = this.fetchCache.get(v);
4329
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (J && (J.loading = !0, this.fetchCache.set(v, J)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4330
- }, v.wait || 600), ae = (J) => {
4331
- this.fetchCache.set(v, { status: !0, data: J }), this.bus.$emit("$loadData.$globalData." + y);
4332
- }, X = (J, ue) => {
4347
+ const W = this.fetchCache.get(v);
4348
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (W && (W.loading = !0, this.fetchCache.set(v, W)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4349
+ }, v.wait || 600), ae = (W) => {
4350
+ this.fetchCache.set(v, { status: !0, data: W }), this.bus.$emit("$loadData.$globalData." + y);
4351
+ }, X = (W, ue) => {
4333
4352
  if (ue && v.watch === !1)
4334
4353
  return le();
4335
4354
  if (ue) {
4336
4355
  k();
4337
4356
  return;
4338
4357
  }
4339
- const pe = this.$handle.loadFetchVar(Je(v), J);
4358
+ const pe = this.$handle.loadFetchVar(We(v), W);
4340
4359
  this.$handle.api.fetch(pe).then((te) => {
4341
4360
  ae(te);
4342
4361
  }).catch((te) => {
@@ -4352,15 +4371,16 @@ function Wt(t) {
4352
4371
  return c && typeof c == "object" ? c.name : typeof c == "string" ? c : "zh-cn";
4353
4372
  },
4354
4373
  globalLanguageDriver(c) {
4355
- let p = this.vm.top.$props.locale, y;
4356
- if (p && typeof p == "object" && (y = L(p, c)), y == null) {
4374
+ let d = this.vm.top.$props.locale, y;
4375
+ if (d && typeof d == "object" && (y = B(d, c)), y == null) {
4357
4376
  const v = this.options.value.language || {}, w = this.getLocale();
4358
- y = L(v[w], c);
4377
+ y = B(v[w], c);
4359
4378
  }
4360
4379
  return y;
4361
4380
  },
4362
4381
  globalVarDriver(c) {
4363
- const y = c.split(".").shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4382
+ let d = c.split(".");
4383
+ const y = d.shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4364
4384
  if (v) {
4365
4385
  const w = h.Function(v) ? v : z(v.handle);
4366
4386
  if (w) {
@@ -4368,14 +4388,14 @@ function Wt(t) {
4368
4388
  const k = this.watchLoadData((ae, X) => {
4369
4389
  X ? (this.bus.$emit("$loadData.$var." + y), k()) : j = w(ae, this.$handle.api);
4370
4390
  });
4371
- return this.unwatch.push(k), j;
4391
+ return this.unwatch.push(k), B(j, d);
4372
4392
  }
4373
4393
  }
4374
4394
  },
4375
- setData(c, p, y) {
4376
- y ? Ve(c, p) : (se(this.vm.top.fc.tmpData, c, p), this.bus.$emit("$loadData." + c));
4395
+ setData(c, d, y) {
4396
+ y ? Pe(c, d) : (se(this.vm.top.fc.tmpData, c, d), this.bus.$emit("$loadData." + c));
4377
4397
  },
4378
- getLoadData(c, p) {
4398
+ getLoadData(c, d) {
4379
4399
  let y = null;
4380
4400
  if (c != null) {
4381
4401
  let v = c.split(".");
@@ -4401,14 +4421,14 @@ function Wt(t) {
4401
4421
  return this.$handle.preview;
4402
4422
  {
4403
4423
  const j = this.vm.top.fc.tmpData;
4404
- E(j, w) || S(j, w, Se), y = j[w] !== Se ? L(j, c) : nt(c), v = [];
4424
+ E(j, w) || S(j, w, Re), y = j[w] !== Re ? B(j, c) : nt(c), v = [];
4405
4425
  }
4406
4426
  }
4407
- y && v.length && (y = L(y, v));
4427
+ y && v.length && (y = B(y, v));
4408
4428
  }
4409
- return y == null || y === "" ? p : y;
4429
+ return y == null || y === "" ? d : y;
4410
4430
  },
4411
- watchLoadData(c, p) {
4431
+ watchLoadData(c, d) {
4412
4432
  let y = {};
4413
4433
  const v = (k) => {
4414
4434
  this.get || (this.get = w), O(() => {
@@ -4418,12 +4438,12 @@ function Wt(t) {
4418
4438
  let X;
4419
4439
  if (typeof k == "object" && (X = k.getValue, k = k.id), y[k])
4420
4440
  return y[k].val;
4421
- const le = ge(() => X ? X() : this.getLoadData(k, ae)), J = k.split("."), ue = J.shift(), pe = J.shift() || "", te = ne(() => {
4422
- const Be = X ? X() : this.getLoadData(k, ae);
4441
+ const le = ge(() => X ? X() : this.getLoadData(k, ae)), W = k.split("."), ue = W.shift(), pe = W.shift() || "", te = ne(() => {
4442
+ const Le = X ? X() : this.getLoadData(k, ae);
4423
4443
  if (y[k])
4424
- JSON.stringify(Be) !== JSON.stringify(y[k].val) && (y[k].val = Be, v(!0));
4444
+ JSON.stringify(Le) !== JSON.stringify(y[k].val) && (y[k].val = Le, v(!0));
4425
4445
  else return;
4426
- }, p || 0), rr = B(le, (Be) => {
4446
+ }, d || 0), rr = L(le, (Le) => {
4427
4447
  te();
4428
4448
  });
4429
4449
  return this.bus.$on("$loadData." + ue, te), pe && this.bus.$on("$loadData." + ue + "." + pe, te), y[k] = {
@@ -4450,13 +4470,13 @@ function Wt(t) {
4450
4470
  resetBtn: {},
4451
4471
  globalEvent: {},
4452
4472
  globalData: {}
4453
- }, W(d));
4473
+ }, G(p));
4454
4474
  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);
4455
4475
  },
4456
- mergeOptions(c, p, y) {
4457
- return p = b({}, p || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4458
- delete p[v];
4459
- }), p.global && (c.global = Jr(c.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], c), c;
4476
+ mergeOptions(c, d, y) {
4477
+ return d = b({}, d || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4478
+ delete d[v];
4479
+ }), d.global && (c.global = Hr(c.global, d.global), delete d.global), this.$handle.$manager.mergeOptions([d], c), c;
4460
4480
  },
4461
4481
  updateOptions(c) {
4462
4482
  this.options.value = this.mergeOptions(this.options.value, c), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
@@ -4492,10 +4512,10 @@ function Wt(t) {
4492
4512
  isMobile: m,
4493
4513
  extendApi: Yt,
4494
4514
  getData: nt,
4495
- setDataDriver: Ce,
4496
- setData: Ve,
4515
+ setDataDriver: we,
4516
+ setData: Pe,
4497
4517
  removeData: xt,
4498
- refreshData: _e,
4518
+ refreshData: Ce,
4499
4519
  maker: f,
4500
4520
  component: F,
4501
4521
  directive: T,
@@ -4507,7 +4527,7 @@ function Wt(t) {
4507
4527
  parser: he,
4508
4528
  use: de,
4509
4529
  factory: Kt,
4510
- componentAlias: Ae,
4530
+ componentAlias: Ve,
4511
4531
  copyRule: Pt,
4512
4532
  copyRules: Bt,
4513
4533
  mergeRule: x,
@@ -4515,35 +4535,35 @@ function Wt(t) {
4515
4535
  $form: R,
4516
4536
  parseFn: z,
4517
4537
  parseJson: Vt,
4518
- toJson: et,
4519
- useApp: V,
4538
+ toJson: be,
4539
+ useApp: P,
4520
4540
  getApi: ee,
4521
4541
  on: er
4522
4542
  });
4523
4543
  }
4524
4544
  function tr(c) {
4525
4545
  C(c, {
4526
- create: H,
4527
- install(p, y) {
4528
- if (d = b(b({}, d), y || {}), p._installedFormCreate === !0) return;
4529
- p._installedFormCreate = !0;
4546
+ create: J,
4547
+ install(d, y) {
4548
+ if (p = b(b({}, p), y || {}), d._installedFormCreate === !0) return;
4549
+ d._installedFormCreate = !0;
4530
4550
  const v = function(j, k = {}) {
4531
- return H(j, k, this);
4551
+ return J(j, k, this);
4532
4552
  };
4533
- st(v), p.prototype.$formCreate = v;
4553
+ st(v), d.prototype.$formCreate = v;
4534
4554
  const w = R();
4535
- p.component(w.name, w), p.component("FcFragment", N()), o.forEach((j) => {
4536
- O(() => j(c, p));
4555
+ d.component(w.name, w), d.component("FcFragment", N()), o.forEach((j) => {
4556
+ O(() => j(c, d));
4537
4557
  });
4538
4558
  }
4539
4559
  });
4540
4560
  }
4541
- if (st(D), tr(D), Ce("$cookie", ji), Ce("$localStorage", Ii), Ce("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && H.use(t), he(Ri), t.inherit) {
4561
+ if (st(D), tr(D), we("$cookie", ji), we("$localStorage", Ii), we("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && J.use(t), he(Ri), t.inherit) {
4542
4562
  const c = t.inherit;
4543
4563
  c.components && C(e, c.components), c.parsers && C(r, c.parsers), c.directives && C(i, c.directives), c.modelFields && C(s, c.modelFields), c.providers && C(u, c.providers), c.useApps && C(o, c.useApps), c.maker && C(f, c.maker), c.loadData && C(g, c.loadData), c.formulas && C(_, c.formulas);
4544
4564
  }
4545
- const we = R();
4546
- return Fe(we, D), Object.defineProperties(we, {
4565
+ const Oe = R();
4566
+ return Se(Oe, D), Object.defineProperties(Oe, {
4547
4567
  fetch: {
4548
4568
  get() {
4549
4569
  return D.fetch;
@@ -4552,9 +4572,9 @@ function Wt(t) {
4552
4572
  D.fetch = c;
4553
4573
  }
4554
4574
  }
4555
- }), we.util = D, we;
4575
+ }), Oe.util = D, Oe;
4556
4576
  }
4557
- function Me(t) {
4577
+ function Ue(t) {
4558
4578
  if (h.Date(t))
4559
4579
  return t;
4560
4580
  {
@@ -4565,11 +4585,11 @@ function Me(t) {
4565
4585
  const bt = "datePicker", Ni = {
4566
4586
  name: bt,
4567
4587
  maker: function() {
4568
- return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = A(bt, { type: e.toLowerCase() }), t), {});
4588
+ return ["date", "dateRange", "datetime", "datetimeRange", "year", "month"].reduce((t, e) => (t[e] = V(bt, { type: e.toLowerCase() }), t), {});
4569
4589
  }(),
4570
4590
  mergeProp(t) {
4571
4591
  let e = t.prop.props;
4572
- e.startDate && (e.startDate = e.startDate && Me(e.startDate));
4592
+ e.startDate && (e.startDate = e.startDate && Ue(e.startDate));
4573
4593
  },
4574
4594
  isRange(t) {
4575
4595
  return t.type.includes("range") || t.multiple;
@@ -4588,25 +4608,25 @@ const bt = "datePicker", Ni = {
4588
4608
  return this.isRange(e.el) ? r : r[0];
4589
4609
  } else {
4590
4610
  let r = Array.isArray(t), i = e.prop.props, s, n = i.type || "date";
4591
- return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ? Me(o) : "") : s = ["", ""] : n === "date" && i.multiple === !0 ? s = toString(t) : (s = r ? t[0] || "" : t, s = s ? Me(s) : ""), s;
4611
+ return ["daterange", "datetimerange"].indexOf(n) !== -1 ? r ? s = t.map((o) => o ? Ue(o) : "") : s = ["", ""] : n === "date" && i.multiple === !0 ? s = toString(t) : (s = r ? t[0] || "" : t, s = s ? Ue(s) : ""), s;
4592
4612
  }
4593
4613
  },
4594
4614
  mounted(t) {
4595
4615
  t.rule.value = this.toValue(t.$handle.getFormData(t), t);
4596
4616
  }
4597
- }, Ue = "hidden", Mi = {
4598
- name: Ue,
4617
+ }, qe = "hidden", Mi = {
4618
+ name: qe,
4599
4619
  maker: {
4600
- [Ue]: (t, e) => A(Ue)("", t, e)
4620
+ [qe]: (t, e) => V(qe)("", t, e)
4601
4621
  },
4602
4622
  render() {
4603
4623
  return [];
4604
4624
  }
4605
- }, qe = "input", Ui = {
4606
- name: qe,
4625
+ }, Ge = "input", Ui = {
4626
+ name: Ge,
4607
4627
  maker: function() {
4608
- const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = A(qe, { type: r }), e), {});
4609
- return t.idate = A(qe, { type: "date" }), t;
4628
+ const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = V(Ge, { type: r }), e), {});
4629
+ return t.idate = V(Ge, { type: "date" }), t;
4610
4630
  }(),
4611
4631
  mergeProp(t) {
4612
4632
  let { props: e } = t.prop;
@@ -4615,7 +4635,7 @@ const bt = "datePicker", Ni = {
4615
4635
  }, _t = "slider", qi = {
4616
4636
  name: _t,
4617
4637
  maker: {
4618
- sliderRange: A(_t, { range: !0 })
4638
+ sliderRange: V(_t, { range: !0 })
4619
4639
  },
4620
4640
  toFormValue(t, e) {
4621
4641
  let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
@@ -4668,7 +4688,7 @@ const bt = "datePicker", Ni = {
4668
4688
  array: "fcGroup",
4669
4689
  subForm: "fcSubForm",
4670
4690
  object: "fcSubForm"
4671
- }, De = {
4691
+ }, je = {
4672
4692
  resetBtnType: "default",
4673
4693
  resetBtnIcon: "md-refresh",
4674
4694
  infoIcon: "ios-information-circle-outline"
@@ -4679,7 +4699,7 @@ function zi() {
4679
4699
  trigger: "hover",
4680
4700
  placement: "top-start",
4681
4701
  wordWrap: !0,
4682
- icon: De.infoIcon
4702
+ icon: je.infoIcon
4683
4703
  };
4684
4704
  }
4685
4705
  function Ki() {
@@ -4704,9 +4724,9 @@ function Ki() {
4704
4724
  click: void 0
4705
4725
  },
4706
4726
  resetBtn: {
4707
- type: De.resetBtnType,
4727
+ type: je.resetBtnType,
4708
4728
  disabled: !1,
4709
- icon: De.resetBtnIcon,
4729
+ icon: je.resetBtnIcon,
4710
4730
  innerText: "",
4711
4731
  loading: !1,
4712
4732
  show: !1,
@@ -4723,7 +4743,7 @@ function Q(t) {
4723
4743
  function Xi(t, e) {
4724
4744
  E(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4725
4745
  }
4726
- function Ge(t) {
4746
+ function He(t) {
4727
4747
  const e = b({}, t);
4728
4748
  return delete e.children, e;
4729
4749
  }
@@ -4798,7 +4818,7 @@ const Qi = {
4798
4818
  const u = Q(r.wrap.show) ? e : this.$r(Y([r.wrap, {
4799
4819
  props: U(b({
4800
4820
  labelWidth: o
4801
- }, Ge(r.wrap || {})), {
4821
+ }, He(r.wrap || {})), {
4802
4822
  prop: t.id,
4803
4823
  rules: t.injectValidate()
4804
4824
  }),
@@ -4815,16 +4835,16 @@ const Qi = {
4815
4835
  return !(!e.title && !e.native || Q(e.show));
4816
4836
  },
4817
4837
  makeInfo(t, e, r) {
4818
- var u, f, d, m, g, $;
4838
+ var u, f, p, m, g, $;
4819
4839
  const i = b({}, t.title), s = b({}, t.info), n = this.options.form, o = this.getSlot("title"), a = [o ? o({
4820
4840
  title: (f = (u = r.refRule) == null ? void 0 : u.__$title) == null ? void 0 : f.value,
4821
4841
  rule: r.rule,
4822
4842
  options: this.options
4823
- }) : ((m = (d = r.refRule) == null ? void 0 : d.__$title) == null ? void 0 : m.value) + (n.labelSuffix || n["label-suffix"] || "")];
4843
+ }) : ((m = (p = r.refRule) == null ? void 0 : p.__$title) == null ? void 0 : m.value) + (n.labelSuffix || n["label-suffix"] || "")];
4824
4844
  if (!Q(s.show) && (s.info || s.native) && !Q(s.icon)) {
4825
4845
  const _ = {
4826
4846
  type: s.type || "poptip",
4827
- props: Ge(s),
4847
+ props: He(s),
4828
4848
  key: `${e}pop`,
4829
4849
  slot: "label"
4830
4850
  };
@@ -4833,14 +4853,14 @@ const Qi = {
4833
4853
  s.info && !E(_.props, D) && (_.props[D] = ($ = (g = r.refRule) == null ? void 0 : g.__$info) == null ? void 0 : $.value), a[s.align !== "left" ? "unshift" : "push"](this.$r(Y([s, _]), [
4834
4854
  this.$r({
4835
4855
  type: "icon",
4836
- props: { type: s.icon === !0 ? De.infoIcon : s.icon, size: 16 },
4856
+ props: { type: s.icon === !0 ? je.infoIcon : s.icon, size: 16 },
4837
4857
  style: "margin-top: -1px",
4838
4858
  key: `${e}i`
4839
4859
  })
4840
4860
  ]));
4841
4861
  }
4842
4862
  const l = Y([i, {
4843
- props: Ge(i),
4863
+ props: He(i),
4844
4864
  key: `${e}tit`,
4845
4865
  class: "fc-form-title",
4846
4866
  slot: i.slot || "label",
@@ -4918,7 +4938,7 @@ const Qi = {
4918
4938
  }, oe = {}, Zi = ["upload", "select", "tree", "checkbox", "autoComplete", "cascader", "colorPicker", "frame", "inputNumber", "radio", "rate", "timePicker", "group"];
4919
4939
  function Yi(t) {
4920
4940
  Zi.forEach((e) => {
4921
- t[e] = A(e);
4941
+ t[e] = V(e);
4922
4942
  }), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
4923
4943
  }
4924
4944
  function xi(t) {
@@ -4928,19 +4948,19 @@ function xi(t) {
4928
4948
  uploadFileOne: ["file", 1],
4929
4949
  uploadImageOne: ["image", 1]
4930
4950
  };
4931
- Object.keys(r).reduce((i, s) => (i[s] = A(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4951
+ Object.keys(r).reduce((i, s) => (i[s] = V(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4932
4952
  }
4933
4953
  function en(t) {
4934
4954
  const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
4935
- Object.keys(r).reduce((i, s) => (i[s] = A(e, { type: r[s] }), i), t);
4955
+ Object.keys(r).reduce((i, s) => (i[s] = V(e, { type: r[s] }), i), t);
4936
4956
  }
4937
4957
  function tn(t) {
4938
4958
  const e = "timePicker";
4939
- t.time = A(e, { type: "time" }), t.timeRange = A(e, { type: "timerange" });
4959
+ t.time = V(e, { type: "time" }), t.timeRange = V(e, { type: "timerange" });
4940
4960
  }
4941
4961
  function rn(t) {
4942
4962
  const e = "select";
4943
- t.selectMultiple = A(e, { multiple: !0 }), t.selectOne = A(e, { multiple: !1 });
4963
+ t.selectMultiple = V(e, { multiple: !0 }), t.selectOne = V(e, { multiple: !1 });
4944
4964
  }
4945
4965
  function nn(t) {
4946
4966
  const e = "frame", r = {
@@ -4951,7 +4971,7 @@ function nn(t) {
4951
4971
  frameFileOne: ["file", 1],
4952
4972
  frameImageOne: ["image", 1]
4953
4973
  };
4954
- Object.keys(r).reduce((i, s) => (i[s] = A(e, (n) => n.props({ type: r[s][0], maxLength: r[s][1] })), i), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages;
4974
+ Object.keys(r).reduce((i, s) => (i[s] = V(e, (n) => n.props({ type: r[s][0], maxLength: r[s][1] })), i), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages;
4955
4975
  }
4956
4976
  Yi(oe);
4957
4977
  xi(oe);
@@ -4975,7 +4995,7 @@ function sn(t, e) {
4975
4995
  validate(r) {
4976
4996
  return new Promise((i, s) => {
4977
4997
  const n = t.children, o = [e.$manager.validate()];
4978
- n.forEach((a) => {
4998
+ n.filter((a) => !a.isScope).forEach((a) => {
4979
4999
  o.push(a.validate());
4980
5000
  }), Promise.all(o).then(() => {
4981
5001
  i(!0), r && r(!0);
@@ -4989,7 +5009,7 @@ function sn(t, e) {
4989
5009
  const o = e.getFieldCtx(r);
4990
5010
  if (!o) return;
4991
5011
  const a = e.subForm[o.id], l = [e.$manager.validateField(o.id)];
4992
- G(a).forEach((u) => {
5012
+ H(a).filter((u) => !u.isScope).forEach((u) => {
4993
5013
  l.push(u.validate());
4994
5014
  }), Promise.all(l).then(() => {
4995
5015
  s(null), i && i(null);
@@ -5047,11 +5067,11 @@ function sn(t, e) {
5047
5067
  },
5048
5068
  submit(r, i) {
5049
5069
  return new Promise((s, n) => {
5050
- t.validate().then(() => {
5051
- let o = t.formData();
5052
- h.Function(r) && O(() => r(o, t)), h.Function(e.options.onSubmit) && O(() => e.options.onSubmit(o, t)), e.vm.emit("submit", o, t), s(o);
5053
- }).catch((...o) => {
5054
- h.Function(i) && O(() => i(t, ...o)), n(...o);
5070
+ (e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
5071
+ let a = t.formData();
5072
+ h.Function(r) && O(() => r(a, t)), h.Function(e.options.onSubmit) && O(() => e.options.onSubmit(a, t)), e.vm.emit("submit", a, t), s(a);
5073
+ }).catch((...a) => {
5074
+ h.Function(i) && O(() => i(t, ...a)), n(...a);
5055
5075
  });
5056
5076
  });
5057
5077
  }
@@ -5100,7 +5120,7 @@ function an(t) {
5100
5120
  function ln() {
5101
5121
  return Wt({
5102
5122
  ui: "view-design",
5103
- version: "2.7.4",
5123
+ version: "2.7.5",
5104
5124
  manager: Qi,
5105
5125
  install: an,
5106
5126
  extendApi: sn,
@@ -5111,10 +5131,10 @@ function ln() {
5111
5131
  }
5112
5132
  });
5113
5133
  }
5114
- const Qe = ln();
5115
- typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
5116
- const cn = Qe.maker;
5134
+ const Ze = ln();
5135
+ typeof window != "undefined" && (window.formCreate = Ze, window.Vue && Ze.install(window.Vue));
5136
+ const cn = Ze.maker;
5117
5137
  export {
5118
- Qe as default,
5138
+ Ze as default,
5119
5139
  cn as maker
5120
5140
  };