@form-create/element-ui 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/element-ui v2.7.4
3
+ * @form-create/element-ui 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 ? tr(t, e, { enumerable: !0, configurable: !0, writ
19
19
  sr.call(e, r) && at(t, r, e[r]);
20
20
  return t;
21
21
  }, q = (t, e) => rr(t, ir(e));
22
- import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as B, onMounted as cr, onBeforeUnmount as fr, onUpdated as hr, nextTick as T, markRaw as ge, computed as ye, toRef as De, ref as dr } from "vue";
22
+ import $e, { getCurrentInstance as or, provide as ar, inject as lr, toRefs as lt, reactive as ne, onBeforeMount as ur, watch as L, onMounted as cr, onBeforeUnmount as fr, onUpdated as hr, nextTick as I, markRaw as ge, computed as ye, toRef as je, ref as dr } from "vue";
23
23
  function pr(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
26
- function He() {
27
- return He = Object.assign ? Object.assign.bind() : function(t) {
26
+ function Ge() {
27
+ return Ge = 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
+ }, Ge.apply(this, arguments);
31
31
  }
32
32
  var mr = ["attrs", "props", "domProps"], gr = ["class", "style", "directives"], yr = ["on", "nativeOn"], $r = 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 (mr.indexOf(i) !== -1) e[i] = He({}, e[i], r[i]);
35
+ else if (mr.indexOf(i) !== -1) e[i] = Ge({}, e[i], r[i]);
36
36
  else if (gr.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 mr = ["attrs", "props", "domProps"], gr = ["class", "style", "directives"],
51
51
  };
52
52
  }, br = $r;
53
53
  const V = /* @__PURE__ */ pr(br);
54
- function Qe(t, e) {
54
+ function Ze(t, e) {
55
55
  return Object.keys(t).reduce((r, i) => (r.push(t[i]), r), []);
56
56
  }
57
57
  const _r = "fcCheckbox", Cr = {
@@ -117,7 +117,7 @@ const _r = "fcCheckbox", Cr = {
117
117
  }, {
118
118
  key: s + r + "-" + e.value
119
119
  }]));
120
- }), Qe(this.$slots)]);
120
+ }), Ze(this.$slots)]);
121
121
  },
122
122
  mounted() {
123
123
  this.$emit("fc.el", this.$refs.el);
@@ -496,7 +496,7 @@ const wr = "fcFrame", Fr = {
496
496
  mounted() {
497
497
  this.$on("fc.closeModal", this.closeModal);
498
498
  }
499
- }, Or = "fcRadio", Rr = {
499
+ }, Or = "fcRadio", Sr = {
500
500
  name: Or,
501
501
  props: {
502
502
  formCreateInject: {
@@ -556,7 +556,7 @@ const wr = "fcFrame", Fr = {
556
556
  }, {
557
557
  key: s + r + "-" + e.value
558
558
  }]));
559
- }), Qe(this.$slots)]);
559
+ }), Ze(this.$slots)]);
560
560
  },
561
561
  mounted() {
562
562
  this.$emit("fc.el", this.$refs.el);
@@ -594,7 +594,7 @@ const wr = "fcFrame", Fr = {
594
594
  function D(t, e) {
595
595
  return {}.hasOwnProperty.call(t, e);
596
596
  }
597
- const Er = "fcSelect", Sr = {
597
+ const Er = "fcSelect", Rr = {
598
598
  name: Er,
599
599
  functional: !0,
600
600
  props: {
@@ -677,7 +677,7 @@ const Er = "fcSelect", Sr = {
677
677
  check: () => this.updateValue(),
678
678
  "node-click": () => this.updateValue()
679
679
  }
680
- }]), [Qe(this.$slots)]);
680
+ }]), [Ze(this.$slots)]);
681
681
  },
682
682
  mounted() {
683
683
  this.setValue(), this.$emit("fc.el", this.$refs.tree);
@@ -917,7 +917,7 @@ function E(t, e, r) {
917
917
  function ie(t, e) {
918
918
  ($e.del || $e.delete)(t, e);
919
919
  }
920
- function _e(t, e = {}, r) {
920
+ function Ce(t, e = {}, r) {
921
921
  let i = !1;
922
922
  for (let s in e)
923
923
  if (Object.prototype.hasOwnProperty.call(e, s)) {
@@ -935,14 +935,14 @@ function _e(t, e = {}, r) {
935
935
  }
936
936
  else
937
937
  o && E(t, s, {});
938
- t[s] = _e(t[s], n, r);
938
+ t[s] = Ce(t[s], n, r);
939
939
  } else
940
940
  E(t, s, n), h.Undef(n) || (h.Undef(n.__json) || (t[s].__json = n.__json), h.Undef(n.__origin) || (t[s].__origin = n.__origin));
941
941
  }
942
942
  return r !== void 0 && Array.isArray(t) ? t.filter((s) => !s || !s.__ctrl) : t;
943
943
  }
944
- function X(t) {
945
- return _e({}, { value: t }).value;
944
+ function W(t) {
945
+ return Ce({}, { value: t }).value;
946
946
  }
947
947
  const Ir = Object.assign || function(t) {
948
948
  for (let e, r = 1; r < arguments.length; r++)
@@ -953,7 +953,7 @@ const Ir = Object.assign || function(t) {
953
953
  function _() {
954
954
  return Ir.apply(this, arguments);
955
955
  }
956
- function Ge(t) {
956
+ function Je(t) {
957
957
  return typeof t != "object" || t === null ? t : t instanceof Array ? [...t] : b({}, t);
958
958
  }
959
959
  const Pr = "fcGroup", Tr = {
@@ -1038,13 +1038,13 @@ const Pr = "fcGroup", Tr = {
1038
1038
  const s = i.$f.formData();
1039
1039
  if (t === e)
1040
1040
  i.$f.deferSyncValue(() => {
1041
- _e(i.rule, t), i.$f.setValue(s);
1041
+ Ce(i.rule, t), i.$f.setValue(s);
1042
1042
  }, !0);
1043
1043
  else {
1044
1044
  const n = i.$f.formData();
1045
1045
  i.$f.once("reloading", () => {
1046
1046
  i.$f.setValue(n);
1047
- }), i.rule = X(t);
1047
+ }), i.rule = W(t);
1048
1048
  }
1049
1049
  }
1050
1050
  });
@@ -1109,7 +1109,7 @@ const Pr = "fcGroup", Tr = {
1109
1109
  };
1110
1110
  if (this.defaultValue) {
1111
1111
  i.formData || (i.formData = {});
1112
- const s = X(this.defaultValue);
1112
+ const s = W(this.defaultValue);
1113
1113
  _(i.formData, this.field ? {
1114
1114
  [this.field]: s
1115
1115
  } : s);
@@ -1133,7 +1133,10 @@ const Pr = "fcGroup", Tr = {
1133
1133
  this.$delete(this.cacheRule, t), this.$delete(this.cacheValue, t), e && this.$nextTick(() => this.$emit("remove", r));
1134
1134
  },
1135
1135
  add(t) {
1136
- this.disabled || this.onBeforeAdd(this.value) === !1 || this.addRule(t, !0);
1136
+ if (this.disabled || this.onBeforeAdd(this.value) === !1)
1137
+ return;
1138
+ const e = [...this.value];
1139
+ e.push(this.defaultValue ? W(this.defaultValue) : this.field ? null : {}), this.input(e);
1137
1140
  },
1138
1141
  del(t, e) {
1139
1142
  if (this.disabled || this.onBeforeRemove(this.value, t) === !1)
@@ -1232,9 +1235,9 @@ const Pr = "fcGroup", Tr = {
1232
1235
  key: o
1233
1236
  }, {
1234
1237
  on: {
1235
- "update:value": (d) => this.formData(o, d),
1236
- "emit-event": (d, ...m) => this.emitEvent(d, m, a, o),
1237
- input: (d) => this.add$f(a, o, d)
1238
+ "update:value": (p) => this.formData(o, p),
1239
+ "emit-event": (p, ...m) => this.emitEvent(p, m, a, o),
1240
+ input: (p) => this.add$f(a, o, p)
1238
1241
  }
1239
1242
  }, {}, {
1240
1243
  props: {
@@ -1345,8 +1348,8 @@ const Pr = "fcGroup", Tr = {
1345
1348
  }, Mr = [
1346
1349
  Cr,
1347
1350
  Fr,
1348
- Rr,
1349
1351
  Sr,
1352
+ Rr,
1350
1353
  Dr,
1351
1354
  Vr,
1352
1355
  Tr,
@@ -1362,172 +1365,8 @@ function be(t) {
1362
1365
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
1363
1366
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
1364
1367
  }
1365
- const Se = (t, e) => {
1366
- if (!(!t || t === e || !t.$props)) {
1367
- if (t.$props.formCreateInject)
1368
- return t.$props.formCreateInject;
1369
- if (t.$parent)
1370
- return Se(t.$parent, e);
1371
- }
1372
- };
1373
- function Nr(t, e, r) {
1374
- const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1375
- return {
1376
- name: i,
1377
- componentName: i,
1378
- model: {
1379
- prop: "api"
1380
- },
1381
- components: e,
1382
- directives: r,
1383
- provide() {
1384
- return {
1385
- $pfc: this
1386
- };
1387
- },
1388
- inject: { $pfc: { default: null } },
1389
- props: {
1390
- rule: {
1391
- type: Array,
1392
- required: !0,
1393
- default: () => []
1394
- },
1395
- option: {
1396
- type: Object,
1397
- default: () => ({})
1398
- },
1399
- extendOption: Boolean,
1400
- driver: [String, Object],
1401
- value: Object,
1402
- disabled: {
1403
- type: Boolean,
1404
- default: void 0
1405
- },
1406
- preview: {
1407
- type: Boolean,
1408
- default: void 0
1409
- },
1410
- index: [String, Number],
1411
- api: Object,
1412
- locale: [String, Object],
1413
- name: String,
1414
- subForm: {
1415
- type: Boolean,
1416
- default: !0
1417
- },
1418
- inFor: Boolean
1419
- },
1420
- render() {
1421
- return this.fc.render();
1422
- },
1423
- setup(s) {
1424
- const n = or().proxy;
1425
- ar("parentFC", n);
1426
- const o = lr("parentFC", null);
1427
- let a = o;
1428
- if (o)
1429
- for (; a.parent; )
1430
- a = a.parent;
1431
- else
1432
- a = n;
1433
- const { rule: l, value: u, subForm: c, inFor: d } = lt(s), m = ne({
1434
- ctxInject: {},
1435
- destroyed: !1,
1436
- isShow: !0,
1437
- unique: 1,
1438
- renderRule: [...l.value || []],
1439
- updateValue: JSON.stringify(u.value || {})
1440
- }), g = new t(n), $ = g.api(), w = d.value, O = () => {
1441
- if (o) {
1442
- const R = Se(n, o);
1443
- if (R) {
1444
- let S;
1445
- w ? (S = H(R.getSubForm()), S.push($)) : S = $, R.subForm(S);
1446
- }
1447
- }
1448
- }, G = () => {
1449
- const R = Se(n, o);
1450
- if (R)
1451
- if (w) {
1452
- const S = H(R.getSubForm()), N = S.indexOf($);
1453
- N > -1 && S.splice(N, 1);
1454
- } else
1455
- R.subForm();
1456
- };
1457
- let P = null;
1458
- ur(() => {
1459
- B(() => {
1460
- let R = "";
1461
- const S = s.option && s.option.globalClass || {};
1462
- Object.keys(S).forEach((N) => {
1463
- let pe = "";
1464
- S[N].style && Object.keys(S[N].style).forEach((W) => {
1465
- pe += be(W) + ":" + S[N].style[W] + ";";
1466
- }), S[N].content && (pe += S[N].content + ";"), pe && (R += `.${N}{${pe}}`);
1467
- }), s.option && s.option.style && (R += s.option.style), P || (P = document.createElement("style"), P.type = "text/css", document.head.appendChild(P)), P.innerHTML = R || "";
1468
- }, () => {
1469
- });
1470
- });
1471
- const M = se(() => {
1472
- g.bus.$emit("$loadData.$topForm");
1473
- }, 100), he = se(function() {
1474
- g.bus.$emit("$loadData.$scopeForm");
1475
- }, 100), Ae = se(() => {
1476
- g.bus.$emit("$loadData.$form");
1477
- }, 100), de = (R) => {
1478
- g.bus.$emit("change-$form." + R);
1479
- };
1480
- return cr(() => {
1481
- o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
1482
- }), fr(() => {
1483
- o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), P && document.head.removeChild(P), G(), m.destroyed = !0, g.unmount();
1484
- }), hr(() => {
1485
- g.updated();
1486
- }), B(c, (R) => {
1487
- R ? O() : G();
1488
- }, { immediate: !0 }), B(() => s.option, () => {
1489
- g.initOptions(), $.refresh();
1490
- }, { deep: !0 }), B(() => [...l.value], (R) => {
1491
- g.$handle.isBreakWatch() || R.length === m.renderRule.length && R.every((S) => m.renderRule.indexOf(S) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1492
- }), B(() => [s.disabled, s.preview], () => {
1493
- $.refresh();
1494
- }), B(u, (R) => {
1495
- JSON.stringify(R || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(R || {}) : $.setValue(R || {}));
1496
- }, { deep: !0, flush: "post" }), B(() => s.index, () => {
1497
- $.coverValue({}), g.$handle.updateAppendData(), T(() => {
1498
- T(() => {
1499
- $.clearValidateState();
1500
- });
1501
- });
1502
- }, { flush: "sync" }), q(b({
1503
- fc: ge(g),
1504
- parent: o && ge(o),
1505
- top: ge(a),
1506
- fapi: ge($)
1507
- }, lt(m)), {
1508
- getGroupInject: () => Se(n, o),
1509
- refresh() {
1510
- ++m.unique;
1511
- },
1512
- renderRule() {
1513
- m.renderRule = [...l.value || []];
1514
- },
1515
- updateValue(R) {
1516
- if (m.destroyed) return;
1517
- const S = JSON.stringify(R);
1518
- m.updateValue !== S && (m.updateValue = S, n.$emit("update:value", R), T(() => {
1519
- Ae(), o ? c.value || he() : (M(), he());
1520
- }));
1521
- }
1522
- });
1523
- },
1524
- created() {
1525
- this.$emit("input", this.fapi), this.fc.init();
1526
- }
1527
- };
1528
- }
1529
- const Ot = ["attrs", "props", "domProps", "scopedSlots"], Rt = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1530
- const i = [...Ot, ...r.normal || []], s = [...Rt, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1368
+ const Ot = ["attrs", "props", "domProps", "scopedSlots"], St = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], ee = (t, e = {}, r = {}) => {
1369
+ const i = [...Ot, ...r.normal || []], s = [...St, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1531
1370
  return t.reduce((a, l) => {
1532
1371
  for (const u in l)
1533
1372
  if (a[u])
@@ -1536,64 +1375,64 @@ const Ot = ["attrs", "props", "domProps", "scopedSlots"], Rt = ["class", "style"
1536
1375
  else if (i.indexOf(u) > -1)
1537
1376
  a[u] = b(b({}, a[u]), l[u]);
1538
1377
  else if (s.indexOf(u) > -1) {
1539
- const c = a[u] instanceof Array ? a[u] : [a[u]], d = l[u] instanceof Array ? l[u] : [l[u]];
1540
- a[u] = [...c, ...d];
1378
+ const c = a[u] instanceof Array ? a[u] : [a[u]], p = l[u] instanceof Array ? l[u] : [l[u]];
1379
+ a[u] = [...c, ...p];
1541
1380
  } else if (n.indexOf(u) > -1)
1542
1381
  for (const c in l[u])
1543
1382
  if (a[u][c]) {
1544
- const d = a[u][c] instanceof Array ? a[u][c] : [a[u][c]], m = l[u][c] instanceof Array ? l[u][c] : [l[u][c]];
1545
- a[u][c] = [...d, ...m];
1383
+ const p = a[u][c] instanceof Array ? a[u][c] : [a[u][c]], m = l[u][c] instanceof Array ? l[u][c] : [l[u][c]];
1384
+ a[u][c] = [...p, ...m];
1546
1385
  } else
1547
1386
  a[u][c] = l[u][c];
1548
1387
  else if (u === "hook")
1549
1388
  for (let c in l[u])
1550
- a[u][c] ? a[u][c] = qr(a[u][c], l[u][c]) : a[u][c] = l[u][c];
1389
+ a[u][c] ? a[u][c] = Nr(a[u][c], l[u][c]) : a[u][c] = l[u][c];
1551
1390
  else
1552
1391
  a[u] = l[u];
1553
1392
  else
1554
1393
  i.indexOf(u) > -1 || n.indexOf(u) > -1 || o.indexOf(u) > -1 ? a[u] = b({}, l[u]) : s.indexOf(u) > -1 ? a[u] = l[u] instanceof Array ? [...l[u]] : typeof l[u] == "object" ? b({}, l[u]) : l[u] : a[u] = l[u];
1555
1394
  return a;
1556
1395
  }, e);
1557
- }, qr = (t, e) => function() {
1396
+ }, Nr = (t, e) => function() {
1558
1397
  t && t.apply(this, arguments), e && e.apply(this, arguments);
1559
- }, St = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ze = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
1398
+ }, Rt = ["type", "slot", "ignore", "emitPrefix", "value", "name", "native", "hidden", "display", "inject", "options", "emit", "nativeEmit", "link", "prefix", "suffix", "update", "sync", "optionsTo", "key", "slotUpdate", "computed", "preview", "component", "cache"], Ye = ["validate", "children", "control"], xe = ["effect", "deep", "renderSlots"];
1560
1399
  function kt() {
1561
- return [...St, ...Ot, ...Rt, ...Et, ...Ze, ...Ye];
1400
+ return [...Rt, ...Ot, ...St, ...Et, ...Ye, ...xe];
1562
1401
  }
1563
1402
  function Dt(t, e, r) {
1564
1403
  return `[form-create ${t}]: ${e}`;
1565
1404
  }
1566
- function xe(t, e) {
1405
+ function et(t, e) {
1567
1406
  console.error(Dt("err", t));
1568
1407
  }
1569
- function Ur(t) {
1570
- xe(t.toString()), console.error(t);
1408
+ function qr(t) {
1409
+ et(t.toString()), console.error(t);
1571
1410
  }
1572
1411
  function jt(t) {
1573
1412
  return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
1574
1413
  }
1575
- const Je = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
1576
- function et(t, e) {
1577
- return JSON.stringify(_e(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1414
+ const We = "[[FORM-CREATE-PREFIX-", Ke = "-FORM-CREATE-SUFFIX]]";
1415
+ function _e(t, e) {
1416
+ return JSON.stringify(Ce(Array.isArray(t) ? [] : {}, t, !0), function(r, i) {
1578
1417
  if (!(i && i._isVue === !0)) {
1579
1418
  if (typeof i != "function")
1580
1419
  return i;
1581
1420
  if (i.__json)
1582
1421
  return i.__json;
1583
1422
  if (i.__origin && (i = i.__origin), !i.__emit)
1584
- return Je + i + We;
1423
+ return We + i + Ke;
1585
1424
  }
1586
1425
  }, e);
1587
1426
  }
1588
- function Te(t) {
1427
+ function Be(t) {
1589
1428
  return new Function("return " + t)();
1590
1429
  }
1591
1430
  function z(t, e) {
1592
1431
  if (t && h.String(t) && t.length > 4) {
1593
1432
  let r = t.trim(), i = !1;
1594
1433
  try {
1595
- if (r.indexOf(We) > 0 && r.indexOf(Je) === 0)
1596
- r = r.replace(We, "").replace(Je, ""), i = !0;
1434
+ if (r.indexOf(Ke) > 0 && r.indexOf(We) === 0)
1435
+ r = r.replace(Ke, "").replace(We, ""), i = !0;
1597
1436
  else if (r.indexOf("$FN:") === 0)
1598
1437
  r = r.substring(4), i = !0;
1599
1438
  else if (r.indexOf("$EXEC:") === 0)
@@ -1607,19 +1446,19 @@ function z(t, e) {
1607
1446
  }, r.__json = t, r.__inject = !0, r;
1608
1447
  } else {
1609
1448
  if (r.indexOf("$FNX:") === 0)
1610
- return r = Te("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
1449
+ return r = Be("function($inject){" + r.substring(5) + "}"), r.__json = t, r.__inject = !0, r;
1611
1450
  (!e && r.indexOf("function ") === 0 && r !== "function " || !e && r.indexOf("function(") === 0 && r !== "function(") && (i = !0);
1612
1451
  }
1613
1452
  if (!i) return t;
1614
1453
  let s;
1615
1454
  try {
1616
- s = Te(r);
1455
+ s = Be(r);
1617
1456
  } catch (n) {
1618
- s = Te("function " + r);
1457
+ s = Be("function " + r);
1619
1458
  }
1620
1459
  return s.__json = t, s;
1621
1460
  } catch (s) {
1622
- xe(`解析失败:${r}
1461
+ et(`解析失败:${r}
1623
1462
 
1624
1463
  err: ${s}`);
1625
1464
  return;
@@ -1632,9 +1471,9 @@ function At(t, e) {
1632
1471
  return h.Undef(i) || !i.indexOf ? i : z(i, e);
1633
1472
  });
1634
1473
  }
1635
- let Hr = 0;
1636
- function je() {
1637
- const t = 370 + ++Hr;
1474
+ let Ur = 0;
1475
+ function Ae() {
1476
+ const t = 370 + ++Ur;
1638
1477
  return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
1639
1478
  }
1640
1479
  function oe(t, e, r) {
@@ -1643,7 +1482,7 @@ function oe(t, e, r) {
1643
1482
  s && ((!i[s] || typeof i[s] != "object") && E(i, s, {}), i = i[s]), s = n;
1644
1483
  }), E(i, s, r), i;
1645
1484
  }
1646
- function Ke(t, e) {
1485
+ function Xe(t, e) {
1647
1486
  return {
1648
1487
  value: t,
1649
1488
  enumerable: !1,
@@ -1655,16 +1494,16 @@ function Vt(t, e) {
1655
1494
  return It([t], e || !1)[0];
1656
1495
  }
1657
1496
  function It(t, e) {
1658
- return _e([], [...t], e || !1);
1497
+ return Ce([], [...t], e || !1);
1659
1498
  }
1660
1499
  function te(t, e) {
1661
- return ee(Array.isArray(e) ? e : [e], t, { array: Ze, normal: Ye }), t;
1500
+ return ee(Array.isArray(e) ? e : [e], t, { array: Ye, normal: xe }), t;
1662
1501
  }
1663
1502
  function ft(t) {
1664
1503
  const e = h.Function(t.getRule) ? t.getRule() : t;
1665
1504
  return e.type || (e.type = "input"), e;
1666
1505
  }
1667
- function Gr(t, e) {
1506
+ function Hr(t, e) {
1668
1507
  return t ? (Object.keys(e || {}).forEach((r) => {
1669
1508
  e[r] && (t[r] = te(t[r] || {}, e[r]));
1670
1509
  }), t) : e;
@@ -1683,28 +1522,28 @@ function F(t, e) {
1683
1522
  try {
1684
1523
  e = t();
1685
1524
  } catch (r) {
1686
- Ur(r);
1525
+ qr(r);
1687
1526
  }
1688
1527
  return e;
1689
1528
  }
1690
- function Xe(t, e) {
1529
+ function ze(t, e) {
1691
1530
  let r = null;
1692
- return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
1531
+ return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => ze(i, e)) : r = t, r && e && H(r).forEach((i) => {
1693
1532
  (Array.isArray(i) ? i : [i]).forEach((n) => {
1694
1533
  n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
1695
1534
  });
1696
1535
  }), r;
1697
1536
  }
1698
- function Jr(t, e) {
1537
+ function Gr(t, e) {
1699
1538
  if (h.Object(t)) {
1700
1539
  const r = {};
1701
1540
  return Object.keys(t).forEach((i) => {
1702
- r[i] = Xe(t[i], i);
1541
+ r[i] = ze(t[i], i);
1703
1542
  }), r;
1704
1543
  } else
1705
- return Xe(t, e);
1544
+ return ze(t, e);
1706
1545
  }
1707
- function Oe() {
1546
+ function Se() {
1708
1547
  const t = {}, e = (r) => r || "default";
1709
1548
  return {
1710
1549
  setSlot(r, i) {
@@ -1720,7 +1559,7 @@ function Oe() {
1720
1559
  const n = s();
1721
1560
  Array.isArray(n) ? i.push(...n) : i.push(n);
1722
1561
  } else h.Undef(s) || i.push(s);
1723
- }), Jr(i, r);
1562
+ }), Gr(i, r);
1724
1563
  },
1725
1564
  getSlots() {
1726
1565
  let r = [];
@@ -1740,7 +1579,7 @@ function Oe() {
1740
1579
  }
1741
1580
  };
1742
1581
  }
1743
- function Re(t, e) {
1582
+ function Ee(t, e) {
1744
1583
  return Object.setPrototypeOf(t, e), t;
1745
1584
  }
1746
1585
  const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ce = {
@@ -1778,12 +1617,12 @@ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1778
1617
  return new RegExp(e, "g").test(t);
1779
1618
  }
1780
1619
  };
1781
- function L(t, e) {
1620
+ function B(t, e) {
1782
1621
  return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
1783
1622
  t != null && (t = t[r]);
1784
1623
  }), t;
1785
1624
  }
1786
- function Wr(t) {
1625
+ function Jr(t) {
1787
1626
  const e = /{{\s*(.*?)\s*}}/g;
1788
1627
  let r;
1789
1628
  const i = {};
@@ -1797,6 +1636,170 @@ function dt(t) {
1797
1636
  n === 0 ? i = s : i += "." + s, r.push(i);
1798
1637
  }), r.join(" && ");
1799
1638
  }
1639
+ const ke = (t, e) => {
1640
+ if (!(!t || t === e || !t.$props)) {
1641
+ if (t.$props.formCreateInject)
1642
+ return t.$props.formCreateInject;
1643
+ if (t.$parent)
1644
+ return ke(t.$parent, e);
1645
+ }
1646
+ };
1647
+ function Wr(t, e, r) {
1648
+ const i = "FormCreate" + (t.isMobile ? "Mobile" : "");
1649
+ return {
1650
+ name: i,
1651
+ componentName: i,
1652
+ model: {
1653
+ prop: "api"
1654
+ },
1655
+ components: e,
1656
+ directives: r,
1657
+ provide() {
1658
+ return {
1659
+ $pfc: this
1660
+ };
1661
+ },
1662
+ inject: { $pfc: { default: null } },
1663
+ props: {
1664
+ rule: {
1665
+ type: Array,
1666
+ required: !0,
1667
+ default: () => []
1668
+ },
1669
+ option: {
1670
+ type: Object,
1671
+ default: () => ({})
1672
+ },
1673
+ extendOption: Boolean,
1674
+ driver: [String, Object],
1675
+ value: Object,
1676
+ disabled: {
1677
+ type: Boolean,
1678
+ default: void 0
1679
+ },
1680
+ preview: {
1681
+ type: Boolean,
1682
+ default: void 0
1683
+ },
1684
+ index: [String, Number],
1685
+ api: Object,
1686
+ locale: [String, Object],
1687
+ name: String,
1688
+ subForm: {
1689
+ type: Boolean,
1690
+ default: !0
1691
+ },
1692
+ inFor: Boolean
1693
+ },
1694
+ render() {
1695
+ return this.fc.render();
1696
+ },
1697
+ setup(s) {
1698
+ const n = or().proxy;
1699
+ ar("parentFC", n);
1700
+ const o = lr("parentFC", null);
1701
+ let a = o;
1702
+ if (o)
1703
+ for (; a.parent; )
1704
+ a = a.parent;
1705
+ else
1706
+ a = n;
1707
+ const { rule: l, value: u, subForm: c, inFor: p } = lt(s), m = ne({
1708
+ ctxInject: {},
1709
+ destroyed: !1,
1710
+ isShow: !0,
1711
+ unique: 1,
1712
+ renderRule: [...l.value || []],
1713
+ updateValue: JSON.stringify(u.value || {})
1714
+ }), g = new t(n), $ = g.api(), w = p.value, O = () => {
1715
+ if (o) {
1716
+ const S = ke(n, o);
1717
+ if (S) {
1718
+ let R;
1719
+ w ? (R = H(S.getSubForm()), R.push($)) : R = $, S.subForm(R);
1720
+ }
1721
+ }
1722
+ }, G = () => {
1723
+ const S = ke(n, o);
1724
+ if (S)
1725
+ if (w) {
1726
+ const R = H(S.getSubForm()), N = R.indexOf($);
1727
+ N > -1 && R.splice(N, 1);
1728
+ } else
1729
+ S.subForm();
1730
+ };
1731
+ let T = null;
1732
+ ur(() => {
1733
+ L(() => {
1734
+ let S = "";
1735
+ const R = s.option && s.option.globalClass || {};
1736
+ Object.keys(R).forEach((N) => {
1737
+ let pe = "";
1738
+ R[N].style && Object.keys(R[N].style).forEach((K) => {
1739
+ pe += be(K) + ":" + R[N].style[K] + ";";
1740
+ }), R[N].content && (pe += R[N].content + ";"), pe && (S += `.${N}{${pe}}`);
1741
+ }), s.option && s.option.style && (S += s.option.style), T || (T = document.createElement("style"), T.type = "text/css", document.head.appendChild(T)), T.innerHTML = S || "";
1742
+ }, () => {
1743
+ });
1744
+ });
1745
+ const M = se(() => {
1746
+ g.bus.$emit("$loadData.$topForm");
1747
+ }, 100), he = se(function() {
1748
+ g.bus.$emit("$loadData.$scopeForm");
1749
+ }, 100), Ve = se(() => {
1750
+ g.bus.$emit("$loadData.$form");
1751
+ }, 100), de = (S) => {
1752
+ g.bus.$emit("change-$form." + S);
1753
+ };
1754
+ return cr(() => {
1755
+ o && ($.top.bus.$on("$loadData.$form", M), $.top.bus.$on("change", de)), $ !== $.scope && $.scope.bus.$on("$loadData.$scopeForm", he), g.mounted();
1756
+ }), fr(() => {
1757
+ o && ($.top.bus.$off("$loadData.$form", M), $.top.bus.$off("change", de)), $ !== $.scope && $.scope.bus.$off("$loadData.$scopeForm", he), T && document.head.removeChild(T), G(), m.destroyed = !0, g.unmount();
1758
+ }), hr(() => {
1759
+ g.updated();
1760
+ }), L(c, (S) => {
1761
+ S ? O() : G();
1762
+ }, { immediate: !0 }), L(() => s.option, () => {
1763
+ g.initOptions(), $.refresh();
1764
+ }, { deep: !0 }), L(() => [...l.value], (S) => {
1765
+ g.$handle.isBreakWatch() || S.length === m.renderRule.length && S.every((R) => m.renderRule.indexOf(R) > -1) || (g.$handle.updateAppendData(), g.$handle.reloadRule(l.value), n.renderRule());
1766
+ }), L(() => [s.disabled, s.preview], () => {
1767
+ $.refresh();
1768
+ }), L(u, (S) => {
1769
+ _e(S || {}) !== m.updateValue && ($.config.forceCoverValue ? $.coverValue(S || {}) : $.setValue(S || {}));
1770
+ }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1771
+ $.coverValue({}), g.$handle.updateAppendData(), I(() => {
1772
+ I(() => {
1773
+ $.clearValidateState();
1774
+ });
1775
+ });
1776
+ }, { flush: "sync" }), q(b({
1777
+ fc: ge(g),
1778
+ parent: o && ge(o),
1779
+ top: ge(a),
1780
+ fapi: ge($)
1781
+ }, lt(m)), {
1782
+ getGroupInject: () => ke(n, o),
1783
+ refresh() {
1784
+ ++m.unique;
1785
+ },
1786
+ renderRule() {
1787
+ m.renderRule = [...l.value || []];
1788
+ },
1789
+ updateValue(S) {
1790
+ if (m.destroyed) return;
1791
+ const R = _e(S);
1792
+ m.updateValue !== R && (m.updateValue = R, n.$emit("update:value", S), I(() => {
1793
+ Ve(), o ? c.value || he() : (M(), he());
1794
+ }));
1795
+ }
1796
+ });
1797
+ },
1798
+ created() {
1799
+ this.$emit("input", this.fapi), this.fc.init();
1800
+ }
1801
+ };
1802
+ }
1800
1803
  function Tt() {
1801
1804
  return {
1802
1805
  props: {},
@@ -1809,7 +1812,7 @@ function Tt() {
1809
1812
  value: void 0
1810
1813
  };
1811
1814
  }
1812
- function I(t, e) {
1815
+ function P(t, e) {
1813
1816
  return (r, i, s, n = {}) => {
1814
1817
  const o = new tt(t, r, i, s, n);
1815
1818
  return e && (h.Function(e) ? e(o) : o.props(e)), o;
@@ -1838,7 +1841,7 @@ function Bt(t) {
1838
1841
  });
1839
1842
  }
1840
1843
  Bt(kt());
1841
- const Lt = I("");
1844
+ const Lt = P("");
1842
1845
  function Kr(t, e, r) {
1843
1846
  let i = Lt("", e);
1844
1847
  return i._data.type = t, i._data.title = r, i;
@@ -1852,7 +1855,7 @@ function Xr() {
1852
1855
  create: Kr,
1853
1856
  createTmp: pt,
1854
1857
  template: pt,
1855
- factory: I
1858
+ factory: P
1856
1859
  };
1857
1860
  }
1858
1861
  function zr(t, e, r) {
@@ -1902,7 +1905,7 @@ function gt(t, e, r) {
1902
1905
  onSuccess(n) {
1903
1906
  let o = (l) => l;
1904
1907
  const a = z(t.parse);
1905
- h.Function(a) ? o = a : a && h.String(a) && (o = (l) => L(l, a)), i(o(n, void 0, r));
1908
+ h.Function(a) ? o = a : a && h.String(a) && (o = (l) => B(l, a)), i(o(n, void 0, r));
1906
1909
  },
1907
1910
  onError(n) {
1908
1911
  s(n);
@@ -1911,16 +1914,17 @@ function gt(t, e, r) {
1911
1914
  });
1912
1915
  }
1913
1916
  function ve(t) {
1914
- return X(t);
1917
+ return W(t);
1915
1918
  }
1916
1919
  function Qr(t) {
1917
1920
  function e(n) {
1918
1921
  return h.Undef(n) ? n = t.fields() : Array.isArray(n) || (n = [n]), n;
1919
1922
  }
1920
1923
  function r(n, o, a) {
1921
- e(n).forEach((l) => {
1922
- t.getCtxs(l).forEach((u) => {
1923
- E(u.rule, o, a), t.$render.clearCache(u);
1924
+ h.Undef(n) ? n = Object.keys(b(b({}, t.fieldCtx), t.nameCtx)) : Array.isArray(n) || (n = [n]), n.forEach((l) => {
1925
+ const u = t.fieldCtx[l] || t.nameCtx[l];
1926
+ u && u.forEach((c) => {
1927
+ E(c.rule, o, a), t.$render.clearCache(c);
1924
1928
  });
1925
1929
  });
1926
1930
  }
@@ -1932,6 +1936,12 @@ function Qr(t) {
1932
1936
  }, []);
1933
1937
  }
1934
1938
  const s = {
1939
+ get isScope() {
1940
+ return t.vm.$props.subForm === !1;
1941
+ },
1942
+ get isPreview() {
1943
+ return t.preview;
1944
+ },
1935
1945
  get config() {
1936
1946
  return t.options;
1937
1947
  },
@@ -2206,9 +2216,9 @@ function Qr(t) {
2206
2216
  t.getCtxs(o).forEach((a) => {
2207
2217
  t.$render.clearCache(a), a.rule.value = ve(a.defaultValue);
2208
2218
  });
2209
- }), T(() => {
2210
- T(() => {
2211
- T(() => {
2219
+ }), I(() => {
2220
+ I(() => {
2221
+ I(() => {
2212
2222
  s.clearValidateState(n);
2213
2223
  });
2214
2224
  });
@@ -2224,7 +2234,7 @@ function Qr(t) {
2224
2234
  return F(() => s.method(n, o)(...a));
2225
2235
  },
2226
2236
  toJson(n) {
2227
- return et(s.rule, n);
2237
+ return _e(s.rule, n);
2228
2238
  },
2229
2239
  trigger(n, o, ...a) {
2230
2240
  const l = s.el(n);
@@ -2247,8 +2257,8 @@ function Qr(t) {
2247
2257
  if (!l)
2248
2258
  return [];
2249
2259
  const u = [];
2250
- return ((d) => {
2251
- d && d.forEach((m) => {
2260
+ return ((p) => {
2261
+ p && p.forEach((m) => {
2252
2262
  typeof m == "object" && (m.field && u.push(m), u.push(...s.getChildrenRuleList(m)));
2253
2263
  });
2254
2264
  })(a ? a.loadChildrenPending() : l.children), u;
@@ -2311,7 +2321,7 @@ function Qr(t) {
2311
2321
  bus: t.bus,
2312
2322
  fetch(n) {
2313
2323
  return new Promise((o, a) => {
2314
- n = X(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2324
+ n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2315
2325
  F(() => n.onSuccess && n.onSuccess(l)), o(l);
2316
2326
  }).catch((l) => {
2317
2327
  F(() => n.onError && n.onError(l)), a(l);
@@ -2320,11 +2330,11 @@ function Qr(t) {
2320
2330
  },
2321
2331
  watchFetch(n, o, a, l) {
2322
2332
  return t.fc.watchLoadData((u, c) => {
2323
- let d = X(n);
2324
- d = t.loadFetchVar(d, u), !(l && l(d, c) === !1) && t.beforeFetch(d).then(() => gt(d, t.fc.create.fetch, s).then((m) => {
2325
- F(() => d.onSuccess && d.onSuccess(m)), o && o(m, c);
2333
+ let p = W(n);
2334
+ p = t.loadFetchVar(p, u), !(l && l(p, c) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((m) => {
2335
+ F(() => p.onSuccess && p.onSuccess(m)), o && o(m, c);
2326
2336
  }).catch((m) => {
2327
- F(() => d.onError && d.onError(m)), a && a(m);
2337
+ F(() => p.onError && p.onError(m)), a && a(m);
2328
2338
  }));
2329
2339
  }, n.wait == null ? 1e3 : n.wait);
2330
2340
  },
@@ -2413,7 +2423,7 @@ function Yr(t) {
2413
2423
  if (!this.vm.isShow)
2414
2424
  return;
2415
2425
  this.$manager.beforeRender();
2416
- const e = Oe();
2426
+ const e = Se();
2417
2427
  return this.sort.forEach((r) => {
2418
2428
  this.renderSlot(e, this.$handle.ctxs[r]);
2419
2429
  }), this.$manager.render(e);
@@ -2476,8 +2486,8 @@ function Yr(t) {
2476
2486
  };
2477
2487
  l.length && i.slotUpdate && F(() => i.slotUpdate(u));
2478
2488
  let c = [];
2479
- const d = e.loadChildrenPending();
2480
- e.parser.renderChildren ? c = e.parser.renderChildren(d, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(d, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2489
+ const p = e.loadChildrenPending();
2490
+ e.parser.renderChildren ? c = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach(($) => {
2481
2491
  c.push(this.renderRule({
2482
2492
  type: "template",
2483
2493
  slot: $
@@ -2490,7 +2500,7 @@ function Yr(t) {
2490
2500
  });
2491
2501
  const m = this.getTypeSlot(e);
2492
2502
  let g;
2493
- return m ? (u.children = c, g = m(u)) : g = a ? e.parser.preview(Ge(c), e) : e.parser.render(Ge(c), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2503
+ return m ? (u.children = c, g = m(u)) : g = a ? e.parser.preview(Je(c), e) : e.parser.render(Je(c), e), g = this.renderSides(g, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), g = this.$manager.makeWrap(e, g)), e.none && (Array.isArray(g) ? g = g.map(($) => !$ || !$.tag ? $ : this.none($)) : g = this.none(g)), o && this.setCache(e, () => this.stable(g), r), g;
2494
2504
  }, this.setCache(e, s, r);
2495
2505
  }
2496
2506
  return (...s) => {
@@ -2566,7 +2576,11 @@ function Yr(t) {
2566
2576
  ctxProp(e) {
2567
2577
  const { ref: r, key: i, rule: s } = e;
2568
2578
  this.$manager.mergeProp(e), e.parser.mergeProp(e);
2569
- const n = [
2579
+ const n = b({}, e.prop.on || {}), o = {};
2580
+ Object.keys(n).forEach((l) => {
2581
+ l.indexOf("native.") === 0 && (o[l.replace("native.", "")] = n[l], delete n[l]);
2582
+ }), e.prop.on = n;
2583
+ const a = [
2570
2584
  {
2571
2585
  ref: r,
2572
2586
  key: s.key || `${i}fc`,
@@ -2575,30 +2589,33 @@ function Yr(t) {
2575
2589
  "hook:mounted": () => {
2576
2590
  this.onMounted(e);
2577
2591
  },
2578
- "fc.updateValue": (o) => {
2579
- this.$handle.onUpdateValue(e, o);
2592
+ "fc.updateValue": (l) => {
2593
+ this.$handle.onUpdateValue(e, l);
2580
2594
  },
2581
- "fc.el": (o) => {
2582
- e.exportEl = o, o && ((o.$el || o).__rule__ = e.rule);
2595
+ "fc.el": (l) => {
2596
+ e.exportEl = l, l && ((l.$el || l).__rule__ = e.rule);
2583
2597
  }
2584
2598
  }
2599
+ },
2600
+ {
2601
+ nativeOn: o
2585
2602
  }
2586
2603
  ];
2587
2604
  if (e.input) {
2588
- const o = this.tmpInput;
2605
+ const l = this.tmpInput;
2589
2606
  this.vm.$props.disabled === !0 && (e.prop.props.disabled = !0), e.prop.model = {
2590
2607
  value: this.$handle.getFormData(e),
2591
- callback: (a) => {
2592
- o && o(e.field, a, e.rule), this.onInput(e, a);
2608
+ callback: (u) => {
2609
+ l && l(e.field, u, e.rule), this.onInput(e, u);
2593
2610
  },
2594
2611
  expression: `formData.${e.id}`
2595
- }, e.prop.modelEmit && n.push({
2612
+ }, e.prop.modelEmit && a.push({
2596
2613
  on: {
2597
2614
  [e.prop.modelEmit]: () => this.onEmitInput(e)
2598
2615
  }
2599
2616
  });
2600
2617
  }
2601
- return ee(n, e.prop), e.prop;
2618
+ return ee(a, e.prop), e.prop;
2602
2619
  },
2603
2620
  onMounted(e) {
2604
2621
  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");
@@ -2615,7 +2632,7 @@ function Yr(t) {
2615
2632
  },
2616
2633
  renderChildren(e, r, i) {
2617
2634
  if (!h.trueArray(e)) return [];
2618
- const s = Oe();
2635
+ const s = Se();
2619
2636
  return e.map((n) => {
2620
2637
  if (n) {
2621
2638
  if (h.String(n)) return s.setSlot(null, i ? this.renderRule({
@@ -2624,7 +2641,7 @@ function Yr(t) {
2624
2641
  }) : n);
2625
2642
  if (n.__fc__)
2626
2643
  return this.renderSlot(s, n.__fc__, r);
2627
- n.type && T(() => {
2644
+ n.type && I(() => {
2628
2645
  this.$handle.loadChildren(e, r), this.$handle.refresh();
2629
2646
  });
2630
2647
  }
@@ -2641,7 +2658,7 @@ function Yr(t) {
2641
2658
  },
2642
2659
  createRuleVnode(e, r, i) {
2643
2660
  this.force = i !== !1, this.tmpInput = r;
2644
- const s = Oe();
2661
+ const s = Se();
2645
2662
  return this.renderSlot(s, e, e.parent), this.force = !1, this.tmpInput = null, s.getSlots();
2646
2663
  },
2647
2664
  renderRule(e, r, i) {
@@ -2656,7 +2673,7 @@ function Yr(t) {
2656
2673
  a && (s = J(a));
2657
2674
  }
2658
2675
  if (!s) return;
2659
- const n = Oe();
2676
+ const n = Se();
2660
2677
  h.trueArray(e.children) && e.children.forEach((a) => {
2661
2678
  a && n.setSlot(a == null ? void 0 : a.slot, () => this.renderRule(a));
2662
2679
  });
@@ -2714,16 +2731,16 @@ function ei(t) {
2714
2731
  let i = {}, s = e.rule, { emitPrefix: n, field: o, name: a, inject: l } = s, u = s[r ? "emit" : "nativeEmit"] || [];
2715
2732
  return h.trueArray(u) && u.forEach((c) => {
2716
2733
  if (!c) return;
2717
- let d, m = n || o || a;
2718
- if (h.Object(c) && (d = c.inject, c = c.name, m = c.prefix || m), m) {
2734
+ let p, m = n || o || a;
2735
+ if (h.Object(c) && (p = c.inject, c = c.name, m = c.prefix || m), m) {
2719
2736
  r || (m = `native-${m}`);
2720
2737
  const g = be(`${m}-${c}`), $ = (...w) => {
2721
2738
  this.vm.$emit(g, ...w), this.vm.$emit("emit-event", g, ...w), this.bus.$emit(g, ...w);
2722
2739
  };
2723
- if ($.__emit = !0, !d && l === !1)
2740
+ if ($.__emit = !0, !p && l === !1)
2724
2741
  i[c] = $;
2725
2742
  else {
2726
- let w = d || l || this.options.injectEvent;
2743
+ let w = p || l || this.options.injectEvent;
2727
2744
  i[c] = h.Undef(w) ? $ : this.inject(s, $, w);
2728
2745
  }
2729
2746
  }
@@ -2754,21 +2771,21 @@ function ei(t) {
2754
2771
  },
2755
2772
  loadStrVar(e, r, i) {
2756
2773
  if (e && typeof e == "string" && e.indexOf("{{") > -1 && e.indexOf("}}") > -1) {
2757
- const s = e, n = Wr(e);
2774
+ const s = e, n = Jr(e);
2758
2775
  let o;
2759
2776
  if (n.forEach((a) => {
2760
2777
  const l = a.split("||"), u = l[0].trim();
2761
2778
  if (u) {
2762
2779
  const c = (l[1] || "").trim();
2763
- let d, m = !1;
2780
+ let p, m = !1;
2764
2781
  if (i && u.indexOf("$form.") === 0) {
2765
2782
  const g = u.split(".");
2766
- g.shift(), D(i.value, g[0]) && (m = !0, d = r ? r({
2783
+ g.shift(), D(i.value, g[0]) && (m = !0, p = r ? r({
2767
2784
  id: "$form." + g[0] + "_" + i.rule.__fc__.id,
2768
- getValue: () => L(i.value, g)
2769
- }) : L(i.value, g));
2785
+ getValue: () => B(i.value, g)
2786
+ }) : B(i.value, g));
2770
2787
  }
2771
- m || (d = r ? r(u, c) : this.fc.getLoadData(u, c)), o = d, e = e.replaceAll(`{{${a}}}`, d == null ? "" : d);
2788
+ m || (p = r ? r(u, c) : this.fc.getLoadData(u, c)), o = p, e = e.replaceAll(`{{${a}}}`, p == null ? "" : p);
2772
2789
  }
2773
2790
  }), n.length === 1 && s === `{{${n[0]}}}`)
2774
2791
  return o;
@@ -2831,13 +2848,13 @@ function ii(t) {
2831
2848
  }
2832
2849
  function ni(t) {
2833
2850
  Object.defineProperties(t.origin, {
2834
- __fc__: Ke(ge(t), !0)
2851
+ __fc__: Xe(ge(t), !0)
2835
2852
  }), t.rule !== t.origin && Object.defineProperties(t.rule, {
2836
- __fc__: Ke(ge(t), !0)
2853
+ __fc__: Xe(ge(t), !0)
2837
2854
  });
2838
2855
  }
2839
2856
  function qt(t, e, r) {
2840
- const i = je(), s = !!e.field;
2857
+ const i = Ae(), s = !!e.field;
2841
2858
  _(this, {
2842
2859
  id: i,
2843
2860
  ref: i,
@@ -2862,7 +2879,7 @@ function qt(t, e, r) {
2862
2879
  input: s,
2863
2880
  el: void 0,
2864
2881
  exportEl: void 0,
2865
- defaultValue: s ? X(r) : void 0,
2882
+ defaultValue: s ? W(r) : void 0,
2866
2883
  field: e.field || void 0
2867
2884
  }), this.updateKey(), ni(this), this.update(t, !0);
2868
2885
  }
@@ -2903,8 +2920,8 @@ _(qt.prototype, {
2903
2920
  rule: this.rule,
2904
2921
  api: this.$api,
2905
2922
  update: (u) => {
2906
- const c = u || i, d = this.getPending(e, i);
2907
- this.setPending(e, r, c), o && o(c, d);
2923
+ const c = u || i, p = this.getPending(e, i);
2924
+ this.setPending(e, r, c), o && o(c, p);
2908
2925
  },
2909
2926
  reload: () => {
2910
2927
  const u = this.getPending(e, i);
@@ -2936,7 +2953,7 @@ _(qt.prototype, {
2936
2953
  t === void 0 ? this.payload = {} : delete this.payload[t];
2937
2954
  },
2938
2955
  updateKey(t) {
2939
- this.key = je(), t && this.parent && this.parent.updateKey(t);
2956
+ this.key = Ae(), t && this.parent && this.parent.updateKey(t);
2940
2957
  },
2941
2958
  updateType() {
2942
2959
  this.originType = this.rule.type, this.type = J(this.rule.type), this.trueType = this.$handle.getType(this.originType);
@@ -3017,14 +3034,14 @@ function si(t) {
3017
3034
  _(t.prototype, {
3018
3035
  nextRefresh(e) {
3019
3036
  const r = this.loadedId;
3020
- T(() => {
3037
+ I(() => {
3021
3038
  r === this.loadedId && (e ? e() : this.refresh());
3022
3039
  });
3023
3040
  },
3024
3041
  parseRule(e) {
3025
3042
  const r = ft(e);
3026
3043
  return Object.defineProperties(r, {
3027
- __origin__: Ke(e, !0)
3044
+ __origin__: Xe(e, !0)
3028
3045
  }), oi(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
3029
3046
  i && this.loadFn(i, r);
3030
3047
  }), this.loadCtrl(r), r.update && (r.update = z(r.update)), r;
@@ -3075,7 +3092,7 @@ function si(t) {
3075
3092
  let l = ft(o);
3076
3093
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3077
3094
  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);
3078
- let c, d = !1, m = !!o.__fc__, g = l.value;
3095
+ let c, p = !1, m = !!o.__fc__, g = l.value;
3079
3096
  if (m) {
3080
3097
  if (c = o.__fc__, g = c.defaultValue, c.deleted) {
3081
3098
  if ($t(c))
@@ -3084,7 +3101,7 @@ function si(t) {
3084
3101
  } else if (!c.check(this)) {
3085
3102
  if ($t(c))
3086
3103
  return;
3087
- e[a] = o = o._clone ? o._clone() : At(et(o)), c = null, d = !0;
3104
+ e[a] = o = o._clone ? o._clone() : At(_e(o)), c = null, p = !0;
3088
3105
  }
3089
3106
  }
3090
3107
  if (c)
@@ -3093,7 +3110,7 @@ function si(t) {
3093
3110
  const O = this.parseRule(o);
3094
3111
  c = new qt(this, O, g), this.bindParser(c);
3095
3112
  }
3096
- [!1, !0].forEach((O) => this.parseEmit(c, O)), this.syncProp(c), c.parent = r || null, c.root = e, this.setCtx(c), !d && !m && (this.effect(c, "load"), this.targetHook(c, "load")), this.effect(c, "created");
3113
+ [!1, !0].forEach((O) => this.parseEmit(c, O)), this.syncProp(c), c.parent = r || null, c.root = e, this.setCtx(c), !p && !m && (this.effect(c, "load"), this.targetHook(c, "load")), this.effect(c, "created");
3097
3114
  const $ = c.loadChildrenPending();
3098
3115
  if (c.parser.loadChildren === !1 || s($, c), !r) {
3099
3116
  const O = i(a);
@@ -3113,8 +3130,8 @@ function si(t) {
3113
3130
  const r = ai(e), i = [], s = this.api;
3114
3131
  if (!r.length) return !1;
3115
3132
  for (let a = 0; a < r.length; a++) {
3116
- const l = r[a], u = l.handle || function(d) {
3117
- return (ce[l.condition || "=="] || ce["=="])(d, l.value);
3133
+ const l = r[a], u = l.handle || function(p) {
3134
+ return (ce[l.condition || "=="] || ce["=="])(p, l.value);
3118
3135
  };
3119
3136
  if (!h.trueArray(l.rule)) continue;
3120
3137
  const c = q(b({}, l), {
@@ -3128,7 +3145,7 @@ function si(t) {
3128
3145
  const n = [];
3129
3146
  let o = !1;
3130
3147
  return this.deferSyncValue(() => {
3131
- i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: c, append: d, child: m, ctrl: g, method: $ }) => {
3148
+ i.reverse().forEach(({ isHidden: a, valid: l, rule: u, prepend: c, append: p, child: m, ctrl: g, method: $ }) => {
3132
3149
  if (a) {
3133
3150
  l ? e.ctrlRule.push({
3134
3151
  __ctrl: !0,
@@ -3150,7 +3167,7 @@ function si(t) {
3150
3167
  children: u
3151
3168
  };
3152
3169
  e.ctrlRule.push(w), this.bus.$once("load-start", () => {
3153
- c ? s.prepend(w, c, m) : d || m ? s.append(w, d || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3170
+ c ? s.prepend(w, c, m) : p || m ? s.append(w, p || e.id, m) : e.root.splice(e.root.indexOf(e.origin) + 1, 0, w);
3154
3171
  });
3155
3172
  } else {
3156
3173
  e.ctrlRule.splice(e.ctrlRule.indexOf(g), 1);
@@ -3160,7 +3177,7 @@ function si(t) {
3160
3177
  });
3161
3178
  }), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
3162
3179
  n.forEach((a) => a());
3163
- }) : n.length && T(() => {
3180
+ }) : n.length && I(() => {
3164
3181
  n.forEach((a) => a());
3165
3182
  })), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
3166
3183
  },
@@ -3209,9 +3226,9 @@ function ui(t) {
3209
3226
  rule: e.origin,
3210
3227
  api: this.api,
3211
3228
  setFlag: s || !1
3212
- }), s && T(() => {
3213
- T(() => {
3214
- T(() => {
3229
+ }), s && I(() => {
3230
+ I(() => {
3231
+ I(() => {
3215
3232
  this.api.clearValidateState(e.id);
3216
3233
  });
3217
3234
  });
@@ -3246,9 +3263,9 @@ function ui(t) {
3246
3263
  },
3247
3264
  syncForm() {
3248
3265
  const e = {}, r = this.fields(), i = [];
3249
- 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) => {
3266
+ this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = je(this.appendData, n)), s), e), r.reduce((s, n) => {
3250
3267
  const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
3251
- return this.isIgnore(o.rule) && i.push(n), s[n] = De(o.rule, "value"), s;
3268
+ return this.isIgnore(o.rule) && i.push(n), s[n] = je(o.rule, "value"), s;
3252
3269
  }, e), this.form = ne(e), this.ignoreFields = i, this.syncValue();
3253
3270
  },
3254
3271
  isIgnore(e) {
@@ -3275,7 +3292,7 @@ function ui(t) {
3275
3292
  return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
3276
3293
  },
3277
3294
  isQuote(e, r) {
3278
- return (h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3295
+ return (r instanceof Function || h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3279
3296
  },
3280
3297
  refreshUpdate(e, r, i, s) {
3281
3298
  if (h.Function(e.rule.update)) {
@@ -3308,7 +3325,7 @@ function ui(t) {
3308
3325
  function vt(t, e) {
3309
3326
  return typeof e == "function" ? "" + e : e;
3310
3327
  }
3311
- const ke = {
3328
+ const De = {
3312
3329
  init(t) {
3313
3330
  },
3314
3331
  toFormValue(t, e) {
@@ -3363,7 +3380,7 @@ function fi(t) {
3363
3380
  if (n)
3364
3381
  return n;
3365
3382
  }
3366
- return r[e.originType] || r[J(e.type)] || r[e.trueType] || ke;
3383
+ return r[e.originType] || r[J(e.type)] || r[e.trueType] || De;
3367
3384
  },
3368
3385
  bindParser(e) {
3369
3386
  e.setParser(this.getParser(e));
@@ -3377,17 +3394,17 @@ function fi(t) {
3377
3394
  },
3378
3395
  watchCtx(e) {
3379
3396
  if (kt().filter((i) => i[0] !== "_" && i[0] !== "$" && ci.indexOf(i) === -1).forEach((i) => {
3380
- const s = De(e.rule, i), n = i === "children";
3381
- e.refRule[i] = s, e.watch.push(B(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3397
+ const s = je(e.rule, i), n = i === "children";
3398
+ e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3382
3399
  let l = s.value;
3383
3400
  if (!this.isBreakWatch()) {
3384
3401
  if (n && e.parser.loadChildren === !1) {
3385
3402
  this.$render.clearCache(e), this.nextRefresh();
3386
3403
  return;
3387
3404
  }
3388
- if (this.watching = !0, T(() => {
3405
+ if (this.watching = !0, I(() => {
3389
3406
  this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
3390
- }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), T(() => {
3407
+ }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), I(() => {
3391
3408
  this.targetHook(e, "hidden", { value: l });
3392
3409
  })), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
3393
3410
  this.syncForm();
@@ -3433,8 +3450,8 @@ function fi(t) {
3433
3450
  }
3434
3451
  return s;
3435
3452
  })), e.input) {
3436
- const i = De(e.rule, "value");
3437
- e.watch.push(B(() => i.value, () => {
3453
+ const i = je(e.rule, "value");
3454
+ e.watch.push(L(() => i.value, () => {
3438
3455
  let s = e.parser.toFormValue(i.value, e);
3439
3456
  this.isChange(e, s) && this.setValue(e, i.value, s, !0);
3440
3457
  }));
@@ -3451,7 +3468,7 @@ function fi(t) {
3451
3468
  }), a = (l) => {
3452
3469
  s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : oe(e.rule, s, l);
3453
3470
  };
3454
- (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) => {
3471
+ (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) => {
3455
3472
  n = l, setTimeout(() => {
3456
3473
  a(l);
3457
3474
  });
@@ -3468,16 +3485,16 @@ function fi(t) {
3468
3485
  const l = a.mode === "OR";
3469
3486
  let u = !0;
3470
3487
  for (let c = 0; c < a.group.length; c++) {
3471
- const d = a.group[c];
3488
+ const p = a.group[c];
3472
3489
  let m, g = null;
3473
- if (d.variable)
3474
- g = JSON.stringify(this.fc.getLoadData(d.variable) || "");
3475
- else if (d.field)
3476
- g = dt(d.field || "");
3477
- else
3490
+ if (p.variable)
3491
+ g = JSON.stringify(this.fc.getLoadData(p.variable) || "");
3492
+ else if (p.field)
3493
+ g = dt(p.field || "");
3494
+ else if (!p.mode)
3478
3495
  return !0;
3479
- let $ = d.compare;
3480
- if ($ && ($ = dt($ || "")), d.mode ? m = n(d) : ce[d.condition] ? h.Function(d.handler) ? m = F(() => d.handler(this.api, e.rule)) : m = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${d.condition}'](${g}, ${$ || "$val"}); }}}}`).call(this.api.form, ce, 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)
3496
+ let $ = p.compare;
3497
+ if ($ && ($ = dt($ || "")), p.mode ? m = n(p) : ce[p.condition] ? h.Function(p.handler) ? m = F(() => p.handler(this.api, e.rule)) : m = F(() => new Function("$condition", "$val", "$form", "$scope", "$group", "$rule", `with($form){with($scope){with(this){with($group){ return $condition['${p.condition}'](${g}, ${$ || "$val"}); }}}}`).call(this.api.form, ce, p.value, this.api.top.form, this.api.top === this.api.scope ? {} : this.api.scope.form, s ? this.subRuleData[s.id] || {} : {}, e.rule)) : m = !1, l && m)
3481
3498
  return !0;
3482
3499
  l || (u = u && m);
3483
3500
  }
@@ -3502,7 +3519,7 @@ function fi(t) {
3502
3519
  fc: s.fc
3503
3520
  }, ...l);
3504
3521
  }, o), {});
3505
- 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);
3522
+ return F(() => 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));
3506
3523
  },
3507
3524
  updateChildren(e, r, i) {
3508
3525
  this.deferSyncValue(() => {
@@ -3593,7 +3610,7 @@ function di(t) {
3593
3610
  }), Object.keys(e.rule).forEach((i) => {
3594
3611
  i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
3595
3612
  }), Object.keys(r).forEach((i) => {
3596
- e.watch.push(B(r[i], (s) => {
3613
+ e.watch.push(L(r[i], (s) => {
3597
3614
  this.effect(e, "watch", { [i]: s });
3598
3615
  }, { deep: !0 }));
3599
3616
  });
@@ -3626,15 +3643,15 @@ function di(t) {
3626
3643
  Object.keys(l).forEach((u) => {
3627
3644
  const c = this.providers[u];
3628
3645
  if (!c || c.input && !i) return;
3629
- let d;
3646
+ let p;
3630
3647
  if (!c._c)
3631
- d = "*";
3648
+ p = "*";
3632
3649
  else if (c._used.indexOf(s) > -1)
3633
- d = s;
3650
+ p = s;
3634
3651
  else
3635
3652
  return;
3636
3653
  const m = b({ value: l[u], getValue: () => this.getEffect(r, u) }, a || {});
3637
- e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => te(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${d}:${c.input ? 1 : 0}`, o, [m, r, this.api]);
3654
+ e && (m.getProp = () => e.effectData(u), m.clearProp = () => e.clearEffectData(u), m.mergeProp = (g) => te(m.getProp(), [g]), m.id = e.id), this.bus.$emit(`p:${u}:${p}:${c.input ? 1 : 0}`, o, [m, r, this.api]);
3638
3655
  });
3639
3656
  }
3640
3657
  });
@@ -3660,7 +3677,7 @@ function Q(t) {
3660
3677
  return t.bus;
3661
3678
  },
3662
3679
  preview() {
3663
- return t.vm.$options.propsData.preview != null ? t.vm.$options.propsData.preview : t.options.value.preview || !1;
3680
+ 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;
3664
3681
  }
3665
3682
  }), _(this, {
3666
3683
  fc: t,
@@ -3720,7 +3737,8 @@ _(Q.prototype, {
3720
3737
  return new Promise((e, r) => {
3721
3738
  const i = t && t.beforeFetch && F(() => t.beforeFetch(t, { api: this.api }));
3722
3739
  i && h.Function(i.then) ? i.then(e).catch(r) : i === !1 ? r() : e();
3723
- }).then(() => this.globalBeforeFetch(t));
3740
+ }).then(() => this.globalBeforeFetch(t)).catch(() => {
3741
+ });
3724
3742
  }
3725
3743
  });
3726
3744
  ei(Q);
@@ -3731,7 +3749,7 @@ ui(Q);
3731
3749
  fi(Q);
3732
3750
  hi(Q);
3733
3751
  di(Q);
3734
- const gi = "fcFragment", Be = {
3752
+ const gi = "fcFragment", Le = {
3735
3753
  name: gi,
3736
3754
  functional: !0,
3737
3755
  props: ["vnode"],
@@ -3805,7 +3823,7 @@ _(Ut.prototype, {
3805
3823
  this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
3806
3824
  },
3807
3825
  updateKey() {
3808
- this.key = je();
3826
+ this.key = Ae();
3809
3827
  },
3810
3828
  //TODO interface
3811
3829
  init() {
@@ -3849,22 +3867,23 @@ const bi = function(t) {
3849
3867
  const e = {
3850
3868
  name: "loadData",
3851
3869
  _fn: [],
3852
- mounted(r, i, s) {
3853
- this.deleted(r);
3854
- let n = H(r.getValue());
3855
- const o = [];
3856
- n.forEach((a) => {
3857
- if (a && (a.attr || a.template)) {
3858
- let l = (d) => {
3859
- let m;
3860
- 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 = X(m));
3861
- const g = a.modify ? i : r.getProp();
3862
- a.to === "child" ? g.children ? E(g.children, 0, m) : E(g, "children", [m]) : oe(g, a.to || "options", m), s.sync(i);
3863
- }, u = (d) => l(d);
3864
- const c = t.watchLoadData(u);
3865
- l = se(l, a.wait || 300), a.watch !== !1 ? o.push(c) : c();
3866
- }
3867
- }), this._fn[r.id] = o;
3870
+ loaded(r, i, s) {
3871
+ this.deleted(r), I(() => {
3872
+ let n = H(r.getValue());
3873
+ const o = [];
3874
+ n.forEach((a) => {
3875
+ if (a && (a.attr || a.template)) {
3876
+ let l = (p) => {
3877
+ let m;
3878
+ a.template ? m = t.$handle.loadStrVar(a.template, p) : a.handler && h.Function(a.handler) ? m = a.handler(p, i, s) : m = p(a.attr, a.default), a.copy !== !1 && (m = W(m));
3879
+ const g = a.modify ? i : r.getProp();
3880
+ a.to === "child" ? g.children ? E(g.children, 0, m) : E(g, "children", [m]) : oe(g, a.to || "options", m), s.sync(i);
3881
+ }, u = (p) => l(p);
3882
+ const c = t.watchLoadData(u);
3883
+ l = se(l, a.wait || 300), a.watch !== !1 ? o.push(c) : c();
3884
+ }
3885
+ }), this._fn[r.id] = o;
3886
+ });
3868
3887
  },
3869
3888
  deleted(r) {
3870
3889
  this._fn[r.id] && (this._fn[r.id].forEach((i) => {
@@ -3872,7 +3891,7 @@ const bi = function(t) {
3872
3891
  }), delete this._fn[r.id]), r.clearProp();
3873
3892
  }
3874
3893
  };
3875
- return e.watch = e.mounted, e;
3894
+ return e.watch = e.loaded, e;
3876
3895
  }, _i = function(t) {
3877
3896
  const e = {
3878
3897
  name: "t",
@@ -3889,8 +3908,8 @@ const bi = function(t) {
3889
3908
  let $ = t.t(u ? l.attr : l, u ? l.params : null, g);
3890
3909
  const w = u && l.modify ? i : r.getProp();
3891
3910
  a === "child" ? w.children ? E(w.children, 0, $) : E(w, "children", [$]) : oe(w, a, $), s.sync(i);
3892
- }, d = (g) => c(g);
3893
- const m = t.watchLoadData(d);
3911
+ }, p = (g) => c(g);
3912
+ const m = t.watchLoadData(p);
3894
3913
  c = se(c, l.wait || 300), l.watch !== !1 ? o.push(m) : m();
3895
3914
  }
3896
3915
  }), this._fn[r.id] = o;
@@ -3937,43 +3956,43 @@ const bi = function(t) {
3937
3956
  function r(s, n, o) {
3938
3957
  let a = s.value;
3939
3958
  i.deleted(s), h.Function(a) && (a = a(n, o)), a = e(a);
3940
- const l = (d) => {
3941
- d === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", d), o.sync(n);
3959
+ const l = (p) => {
3960
+ p === void 0 ? s.clearProp() : oe(s.getProp(), a.to || "options", p), o.sync(n);
3942
3961
  };
3943
3962
  if (!a || !a.action && !a.key) {
3944
3963
  l(void 0);
3945
3964
  return;
3946
3965
  }
3947
- if (a = X(a), a.to || (a.to = "options"), a.key) {
3948
- const d = t.$handle.options.globalData[a.key];
3949
- if (!d) {
3966
+ if (a = W(a), a.to || (a.to = "options"), a.key) {
3967
+ const p = t.$handle.options.globalData[a.key];
3968
+ if (!p) {
3950
3969
  l(void 0);
3951
3970
  return;
3952
3971
  }
3953
- if (d.type === "static") {
3954
- l(d.data);
3972
+ if (p.type === "static") {
3973
+ l(p.data);
3955
3974
  return;
3956
3975
  } else
3957
- a = b(b({}, a), d);
3976
+ a = b(b({}, a), p);
3958
3977
  }
3959
3978
  const u = a.onError, c = () => {
3960
3979
  if (!s.getValue())
3961
3980
  return s.clearProp(), o.sync(n), !0;
3962
3981
  };
3963
- i._fn[s.id] = t.watchLoadData(se((d, m) => {
3982
+ i._fn[s.id] = t.watchLoadData(se((p, m) => {
3964
3983
  if (m && a.watch === !1)
3965
3984
  return i._fn[s.id]();
3966
- const g = t.$handle.loadFetchVar(X(a), d, n), $ = q(b({
3985
+ const g = t.$handle.loadFetchVar(W(a), p, n), $ = q(b({
3967
3986
  headers: {}
3968
3987
  }, g), {
3969
3988
  onSuccess(w, O) {
3970
3989
  if (c()) return;
3971
3990
  let G = (M) => O ? M : D(M, "data") ? M.data : M;
3972
- const P = z(g.parse);
3973
- h.Function(P) ? G = P : P && h.String(P) && (G = (M) => L(M, P)), l(G(w, n, o)), o.sync(n);
3991
+ const T = z(g.parse);
3992
+ h.Function(T) ? G = T : T && h.String(T) && (G = (M) => B(M, T)), l(G(w, n, o));
3974
3993
  },
3975
3994
  onError(w) {
3976
- l(void 0), !c() && (u || ((O) => xe(O.message || "fetch fail " + g.action)))(w, n, o);
3995
+ l(void 0), !c() && (u || ((O) => et(O.message || "fetch fail " + g.action)))(w, n, o);
3977
3996
  }
3978
3997
  });
3979
3998
  t.$handle.beforeFetch($, { rule: n, api: o }).then(() => {
@@ -4033,7 +4052,7 @@ function Fi(t) {
4033
4052
  };
4034
4053
  return e;
4035
4054
  }
4036
- const Oi = "html", Ri = {
4055
+ const Oi = "html", Si = {
4037
4056
  name: Oi,
4038
4057
  loadChildren: !1,
4039
4058
  render(t, e) {
@@ -4061,7 +4080,7 @@ function Ei(t) {
4061
4080
  }
4062
4081
  return null;
4063
4082
  }
4064
- function Si(t) {
4083
+ function Ri(t) {
4065
4084
  const e = localStorage.getItem(t);
4066
4085
  if (e)
4067
4086
  try {
@@ -4086,13 +4105,13 @@ function it(t, e) {
4086
4105
  return null;
4087
4106
  const r = e.split(".");
4088
4107
  let i = t(r.shift());
4089
- return r.length ? i == null ? null : L(i, r) : i;
4108
+ return r.length ? i == null ? null : B(i, r) : i;
4090
4109
  }
4091
4110
  function Di(t) {
4092
4111
  return it(Ei, t);
4093
4112
  }
4094
4113
  function ji(t) {
4095
- return it(Si, t);
4114
+ return it(Ri, t);
4096
4115
  }
4097
4116
  function Ai(t) {
4098
4117
  return it(ki, t);
@@ -4101,7 +4120,7 @@ function Vi(t, e) {
4101
4120
  let r;
4102
4121
  return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
4103
4122
  }
4104
- function Le() {
4123
+ function Me() {
4105
4124
  return Vi("name", ...arguments);
4106
4125
  }
4107
4126
  function Ii(t) {
@@ -4120,79 +4139,79 @@ function Pi(t, e) {
4120
4139
  }
4121
4140
  function Ti(t) {
4122
4141
  const e = t.key || [], r = t.array || [], i = t.normal || [];
4123
- St.push(...e), Ze.push(...r), Ye.push(...i), Bt([...e, ...r, ...i]);
4142
+ Rt.push(...e), Ye.push(...r), xe.push(...i), Bt([...e, ...r, ...i]);
4124
4143
  }
4125
4144
  let Bi = 1;
4126
- const U = {}, Ee = Symbol("defValue");
4145
+ const U = {}, Re = Symbol("defValue");
4127
4146
  function Gt(t) {
4128
4147
  const e = {
4129
- [Be.name]: Be
4148
+ [Le.name]: Le
4130
4149
  }, r = {}, i = {}, s = {}, n = {}, o = [], a = [], l = [
4131
4150
  t.extendApi
4132
4151
  ], u = b({}, wi), c = Xr();
4133
- let d = { global: {} };
4152
+ let p = { global: {} };
4134
4153
  const m = t.isMobile === !0, g = ne({
4135
4154
  $mobile: m
4136
4155
  }), $ = $i(), w = {}, O = {};
4137
4156
  Ti(t.attrs || {});
4138
4157
  function G(f) {
4139
- const p = U[f];
4140
- if (Array.isArray(p))
4141
- return p.map((y) => y.api());
4142
- if (p)
4143
- return p.api();
4158
+ const d = U[f];
4159
+ if (Array.isArray(d))
4160
+ return d.map((y) => y.api());
4161
+ if (d)
4162
+ return d.api();
4144
4163
  }
4145
- function P(f) {
4164
+ function T(f) {
4146
4165
  o.push(f);
4147
4166
  }
4148
4167
  function M() {
4149
- const f = Le(...arguments);
4168
+ const f = Me(...arguments);
4150
4169
  f.id && f.prop && (i[f.id] = f.prop);
4151
4170
  }
4152
4171
  function he() {
4153
- const f = Le(...arguments);
4172
+ const f = Me(...arguments);
4154
4173
  f.id && f.prop && (u[f.id] = h.Function(f.prop) ? f.prop : q(b({}, f.prop), {
4155
4174
  name: f.id
4156
4175
  }));
4157
4176
  }
4158
- function Ae(f) {
4177
+ function Ve(f) {
4159
4178
  $.use(f);
4160
4179
  }
4161
4180
  function de() {
4162
- const f = Le(...arguments);
4163
- if (!f.id || !f.prop) return ke;
4164
- const p = J(f.id), y = f.prop, v = y.merge === !0 ? r[p] : void 0;
4165
- r[p] = Re(y, v || ke), c[p] = I(p), y.maker && _(c, y.maker);
4181
+ const f = Me(...arguments);
4182
+ if (!f.id || !f.prop) return De;
4183
+ const d = J(f.id), y = f.prop, v = y.merge === !0 ? r[d] : void 0;
4184
+ r[d] = Ee(y, v || De), c[d] = P(d), y.maker && _(c, y.maker);
4166
4185
  }
4167
- function R(f, p) {
4186
+ function S(f, d) {
4168
4187
  let y;
4169
4188
  if (h.String(f)) {
4170
- if (y = f, p === void 0)
4171
- return ["form-create", "formcreate"].indexOf(y) > -1 ? S() : e[y];
4189
+ if (y = f, d === void 0)
4190
+ return ["form-create", "formcreate"].indexOf(y) > -1 ? R() : e[y];
4172
4191
  } else
4173
- y = J(f.name), p = f;
4174
- if (!y || !p) return;
4192
+ y = J(f.name), d = f;
4193
+ if (!y || !d) return;
4175
4194
  const v = J(y);
4176
- e[y] = p, e[v] = p, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], p.formCreateParser && de(y, p.formCreateParser);
4195
+ e[y] = d, e[v] = d, delete $.aliasMap[y], delete $.aliasMap[v], delete r[y], delete r[v], d.formCreateParser && de(y, d.formCreateParser);
4177
4196
  }
4178
- function S() {
4179
- return Nr(Ie, e, i);
4197
+ function R() {
4198
+ return Wr(Pe, e, i);
4180
4199
  }
4181
4200
  function N() {
4182
- return Be;
4201
+ return Le;
4183
4202
  }
4184
- function pe(f, p) {
4185
- return h.Function(f.install) ? f.install(W, p) : h.Function(f) && f(W, p), this;
4203
+ function pe(f, d) {
4204
+ return h.Function(f.install) ? f.install(K, d) : h.Function(f) && f(K, d), this;
4186
4205
  }
4187
- function W(f, p, y) {
4188
- let v = Pi(f, p || {});
4206
+ function K(f, d, y) {
4207
+ let v = Pi(f, d || {});
4189
4208
  const C = v.$refs.fc.formCreate;
4190
4209
  return C.$parent = y, Ii(C.options).appendChild(v.$el), C.api();
4191
4210
  }
4192
- Re(W, O);
4211
+ Ee(K, O);
4193
4212
  function Wt(f) {
4194
- let p = b({}, t);
4195
- return f ? p.inherit = {
4213
+ let d = b({}, t);
4214
+ return f ? d.inherit = {
4196
4215
  components: e,
4197
4216
  parsers: r,
4198
4217
  directives: i,
@@ -4202,57 +4221,57 @@ function Gt(t) {
4202
4221
  maker: c,
4203
4222
  formulas: w,
4204
4223
  loadData: g
4205
- } : delete p.inherit, Gt(p);
4224
+ } : delete d.inherit, Gt(d);
4206
4225
  }
4207
- function Kt(f, p) {
4208
- s[f] = p;
4226
+ function Kt(f, d) {
4227
+ s[f] = d;
4209
4228
  }
4210
- function Xt(f, p) {
4211
- w[f] = p;
4229
+ function Xt(f, d) {
4230
+ w[f] = d;
4212
4231
  }
4213
- function zt(f, p) {
4232
+ function zt(f, d) {
4214
4233
  const y = n[f] || {}, v = y.parsers || {};
4215
- p.parsers && Object.keys(p.parsers).forEach((C) => {
4216
- v[C] = Re(p.parsers[C], ke);
4217
- }), p.name = f, n[f] = q(b(b({}, y), p), { parsers: v });
4234
+ d.parsers && Object.keys(d.parsers).forEach((C) => {
4235
+ v[C] = Ee(d.parsers[C], De);
4236
+ }), d.name = f, n[f] = q(b(b({}, y), d), { parsers: v });
4218
4237
  }
4219
- function Ce(f) {
4220
- f && Object.keys(U).forEach((p) => {
4221
- (Array.isArray(U[p]) ? U[p] : [U[p]]).forEach((v) => {
4238
+ function we(f) {
4239
+ f && Object.keys(U).forEach((d) => {
4240
+ (Array.isArray(U[d]) ? U[d] : [U[d]]).forEach((v) => {
4222
4241
  v.bus.$emit("$loadData." + f);
4223
4242
  });
4224
4243
  });
4225
4244
  }
4226
- function Ve(f, p) {
4227
- oe(g, f, p), Ce(f);
4245
+ function Ie(f, d) {
4246
+ oe(g, f, d), we(f);
4228
4247
  }
4229
- function we(f, p) {
4230
- const y = (...v) => F(() => p(...v));
4231
- y._driver = !0, Ve(f, y);
4248
+ function Fe(f, d) {
4249
+ const y = (...v) => F(() => d(...v));
4250
+ y._driver = !0, Ie(f, y);
4232
4251
  }
4233
- function nt(f, p) {
4252
+ function nt(f, d) {
4234
4253
  const y = (f || "").split(".");
4235
4254
  f = y.shift();
4236
4255
  const v = y.join(".");
4237
- if (D(g, f) || E(g, f, Ee), g[f] !== Ee) {
4256
+ if (D(g, f) || E(g, f, Re), g[f] !== Re) {
4238
4257
  let C = g[f];
4239
- return C && C._driver ? C = C(v) : y.length && (C = L(C, y)), C == null || C === "" ? p : C;
4258
+ return C && C._driver ? C = C(v) : y.length && (C = B(C, y)), C == null || C === "" ? d : C;
4240
4259
  } else
4241
- return p;
4260
+ return d;
4242
4261
  }
4243
4262
  function Qt(f) {
4244
4263
  l.push(f);
4245
4264
  }
4246
4265
  function Zt(f) {
4247
- delete g[f], Ce(f);
4266
+ delete g[f], we(f);
4248
4267
  }
4249
- function Yt(f, p) {
4250
- a.push({ name: f, callback: p });
4268
+ function Yt(f, d) {
4269
+ a.push({ name: f, callback: d });
4251
4270
  }
4252
- function Ie(f) {
4271
+ function Pe(f) {
4253
4272
  _(this, {
4254
4273
  id: Bi++,
4255
- create: W,
4274
+ create: K,
4256
4275
  vm: f,
4257
4276
  manager: vi(t.manager),
4258
4277
  parsers: r,
@@ -4261,7 +4280,7 @@ function Gt(t) {
4261
4280
  formulas: w,
4262
4281
  isMobile: m,
4263
4282
  rules: f.$options.propsData.rule,
4264
- name: f.$options.propsData.name || je(),
4283
+ name: f.$options.propsData.name || Ae(),
4265
4284
  inFor: f.$options.propsData.inFor,
4266
4285
  prop: {
4267
4286
  components: e,
@@ -4270,7 +4289,7 @@ function Gt(t) {
4270
4289
  get: null,
4271
4290
  drivers: n,
4272
4291
  renderDriver: null,
4273
- refreshData: Ce,
4292
+ refreshData: we,
4274
4293
  loadData: g,
4275
4294
  CreateNode: $,
4276
4295
  bus: new Fi(),
@@ -4279,60 +4298,60 @@ function Gt(t) {
4279
4298
  extendApiFn: l,
4280
4299
  fetchCache: /* @__PURE__ */ new WeakMap(),
4281
4300
  tmpData: ne({})
4282
- }), a.forEach((p) => {
4283
- this.bus.$on(p.name, p.callback);
4284
- }), T(() => {
4285
- B(this.options, () => {
4301
+ }), a.forEach((d) => {
4302
+ this.bus.$on(d.name, d.callback);
4303
+ }), I(() => {
4304
+ L(this.options, () => {
4286
4305
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
4287
4306
  }, { deep: !0 });
4288
4307
  }), _(f.$options.components, e), _(f.$options.directives, i), this.$handle = new Q(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4289
4308
  }
4290
- Ie.isMobile = m, _(Ie.prototype, {
4309
+ Pe.isMobile = m, _(Pe.prototype, {
4291
4310
  init() {
4292
- this.isSub() && this.unwatch.push(B(() => this.vm.parent.fc.options.value, () => {
4311
+ this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
4293
4312
  this.initOptions(), this.$handle.api.refresh();
4294
- }, { 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();
4313
+ }, { 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();
4295
4314
  },
4296
- targetFormDriver(f, ...p) {
4315
+ targetFormDriver(f, ...d) {
4297
4316
  if (this.renderDriver && this.renderDriver[f])
4298
- return F(() => this.renderDriver[f](...p));
4317
+ return F(() => this.renderDriver[f](...d));
4299
4318
  },
4300
- t(f, p, y) {
4319
+ t(f, d, y) {
4301
4320
  let v = y ? y("$t." + f) : this.globalLanguageDriver(f);
4302
- return v == null && (v = ""), v && p && Object.keys(p).forEach((C) => {
4321
+ return v == null && (v = ""), v && d && Object.keys(d).forEach((C) => {
4303
4322
  const j = new RegExp(`{${C}}`, "g");
4304
- v = v.replace(j, p[C]);
4323
+ v = v.replace(j, d[C]);
4305
4324
  }), v;
4306
4325
  },
4307
4326
  globalDataDriver(f) {
4308
- let p = f.split(".");
4309
- const y = p.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4327
+ let d = f.split(".");
4328
+ const y = d.shift(), v = this.options.value.globalData && this.options.value.globalData[y];
4310
4329
  if (v) {
4311
4330
  if (v.type === "static")
4312
- return L(v.data, p);
4331
+ return B(v.data, d);
4313
4332
  {
4314
4333
  let C;
4315
4334
  const j = this.fetchCache.get(v);
4316
4335
  if (j) {
4317
- if (j.status && (C = L(j.data, p)), !j.loading)
4336
+ if (j.status && (C = B(j.data, d)), !j.loading)
4318
4337
  return C;
4319
4338
  j.loading = !1, this.fetchCache.set(v, j);
4320
4339
  } else
4321
4340
  this.fetchCache.set(v, { status: !1 });
4322
4341
  const k = se(() => {
4323
4342
  le();
4324
- const K = this.fetchCache.get(v);
4325
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (K && (K.loading = !0, this.fetchCache.set(v, K)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4326
- }, v.wait || 600), ae = (K) => {
4327
- this.fetchCache.set(v, { status: !0, data: K }), this.bus.$emit("$loadData.$globalData." + y);
4328
- }, Z = (K, ue) => {
4343
+ const X = this.fetchCache.get(v);
4344
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf(v) !== -1 ? (X && (X.loading = !0, this.fetchCache.set(v, X)), this.bus.$emit("$loadData.$globalData." + y)) : this.fetchCache.delete(v);
4345
+ }, v.wait || 600), ae = (X) => {
4346
+ this.fetchCache.set(v, { status: !0, data: X }), this.bus.$emit("$loadData.$globalData." + y);
4347
+ }, Z = (X, ue) => {
4329
4348
  if (ue && v.watch === !1)
4330
4349
  return le();
4331
4350
  if (ue) {
4332
4351
  k();
4333
4352
  return;
4334
4353
  }
4335
- const me = this.$handle.loadFetchVar(Ge(v), K);
4354
+ const me = this.$handle.loadFetchVar(Je(v), X);
4336
4355
  this.$handle.api.fetch(me).then((re) => {
4337
4356
  ae(re);
4338
4357
  }).catch((re) => {
@@ -4348,15 +4367,16 @@ function Gt(t) {
4348
4367
  return f && typeof f == "object" ? f.name : typeof f == "string" ? f : "zh-cn";
4349
4368
  },
4350
4369
  globalLanguageDriver(f) {
4351
- let p = this.vm.top.$props.locale, y;
4352
- if (p && typeof p == "object" && (y = L(p, f)), y == null) {
4370
+ let d = this.vm.top.$props.locale, y;
4371
+ if (d && typeof d == "object" && (y = B(d, f)), y == null) {
4353
4372
  const v = this.options.value.language || {}, C = this.getLocale();
4354
- y = L(v[C], f);
4373
+ y = B(v[C], f);
4355
4374
  }
4356
4375
  return y;
4357
4376
  },
4358
4377
  globalVarDriver(f) {
4359
- const y = f.split(".").shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4378
+ let d = f.split(".");
4379
+ const y = d.shift(), v = this.options.value.globalVariable && this.options.value.globalVariable[y];
4360
4380
  if (v) {
4361
4381
  const C = h.Function(v) ? v : z(v.handle);
4362
4382
  if (C) {
@@ -4364,14 +4384,14 @@ function Gt(t) {
4364
4384
  const k = this.watchLoadData((ae, Z) => {
4365
4385
  Z ? (this.bus.$emit("$loadData.$var." + y), k()) : j = C(ae, this.$handle.api);
4366
4386
  });
4367
- return this.unwatch.push(k), j;
4387
+ return this.unwatch.push(k), B(j, d);
4368
4388
  }
4369
4389
  }
4370
4390
  },
4371
- setData(f, p, y) {
4372
- y ? Ve(f, p) : (oe(this.vm.top.fc.tmpData, f, p), this.bus.$emit("$loadData." + f));
4391
+ setData(f, d, y) {
4392
+ y ? Ie(f, d) : (oe(this.vm.top.fc.tmpData, f, d), this.bus.$emit("$loadData." + f));
4373
4393
  },
4374
- getLoadData(f, p) {
4394
+ getLoadData(f, d) {
4375
4395
  let y = null;
4376
4396
  if (f != null) {
4377
4397
  let v = f.split(".");
@@ -4397,14 +4417,14 @@ function Gt(t) {
4397
4417
  return this.$handle.preview;
4398
4418
  {
4399
4419
  const j = this.vm.top.fc.tmpData;
4400
- D(j, C) || E(j, C, Ee), y = j[C] !== Ee ? L(j, f) : nt(f), v = [];
4420
+ D(j, C) || E(j, C, Re), y = j[C] !== Re ? B(j, f) : nt(f), v = [];
4401
4421
  }
4402
4422
  }
4403
- y && v.length && (y = L(y, v));
4423
+ y && v.length && (y = B(y, v));
4404
4424
  }
4405
- return y == null || y === "" ? p : y;
4425
+ return y == null || y === "" ? d : y;
4406
4426
  },
4407
- watchLoadData(f, p) {
4427
+ watchLoadData(f, d) {
4408
4428
  let y = {};
4409
4429
  const v = (k) => {
4410
4430
  this.get || (this.get = C), F(() => {
@@ -4414,12 +4434,12 @@ function Gt(t) {
4414
4434
  let Z;
4415
4435
  if (typeof k == "object" && (Z = k.getValue, k = k.id), y[k])
4416
4436
  return y[k].val;
4417
- const le = ye(() => Z ? Z() : this.getLoadData(k, ae)), K = k.split("."), ue = K.shift(), me = K.shift() || "", re = se(() => {
4418
- const Pe = Z ? Z() : this.getLoadData(k, ae);
4437
+ const le = ye(() => Z ? Z() : this.getLoadData(k, ae)), X = k.split("."), ue = X.shift(), me = X.shift() || "", re = se(() => {
4438
+ const Te = Z ? Z() : this.getLoadData(k, ae);
4419
4439
  if (y[k])
4420
- JSON.stringify(Pe) !== JSON.stringify(y[k].val) && (y[k].val = Pe, v(!0));
4440
+ JSON.stringify(Te) !== JSON.stringify(y[k].val) && (y[k].val = Te, v(!0));
4421
4441
  else return;
4422
- }, p || 0), er = B(le, (Pe) => {
4442
+ }, d || 0), er = L(le, (Te) => {
4423
4443
  re();
4424
4444
  });
4425
4445
  return this.bus.$on("$loadData." + ue, re), me && this.bus.$on("$loadData." + ue + "." + me, re), y[k] = {
@@ -4446,13 +4466,13 @@ function Gt(t) {
4446
4466
  resetBtn: {},
4447
4467
  globalEvent: {},
4448
4468
  globalData: {}
4449
- }, X(d));
4469
+ }, W(p));
4450
4470
  this.isSub() && (f = this.mergeOptions(f, this.vm.parent.fc.options.value || {}, !0)), f = this.mergeOptions(f, this.vm.$options.propsData.option || {}), this.updateOptions(f);
4451
4471
  },
4452
- mergeOptions(f, p, y) {
4453
- return p = b({}, p || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4454
- delete p[v];
4455
- }), p.global && (f.global = Gr(f.global, p.global), delete p.global), this.$handle.$manager.mergeOptions([p], f), f;
4472
+ mergeOptions(f, d, y) {
4473
+ return d = b({}, d || {}), y && ["page", "onSubmit", "onReset", "onCreated", "onChange", "onMounted", "mounted", "onReload", "reload", "formData", "el", "globalClass", "style"].forEach((v) => {
4474
+ delete d[v];
4475
+ }), d.global && (f.global = Hr(f.global, d.global), delete d.global), this.$handle.$manager.mergeOptions([d], f), f;
4456
4476
  },
4457
4477
  updateOptions(f) {
4458
4478
  this.options.value = this.mergeOptions(this.options.value, f), this.$handle.$manager.updateOptions(this.options.value), this.bus.$emit("$loadData.$options");
@@ -4488,12 +4508,12 @@ function Gt(t) {
4488
4508
  isMobile: m,
4489
4509
  extendApi: Qt,
4490
4510
  getData: nt,
4491
- setDataDriver: we,
4492
- setData: Ve,
4511
+ setDataDriver: Fe,
4512
+ setData: Ie,
4493
4513
  removeData: Zt,
4494
- refreshData: Ce,
4514
+ refreshData: we,
4495
4515
  maker: c,
4496
- component: R,
4516
+ component: S,
4497
4517
  directive: M,
4498
4518
  setModelField: Kt,
4499
4519
  setFormula: Xt,
@@ -4503,43 +4523,43 @@ function Gt(t) {
4503
4523
  parser: de,
4504
4524
  use: pe,
4505
4525
  factory: Wt,
4506
- componentAlias: Ae,
4526
+ componentAlias: Ve,
4507
4527
  copyRule: Vt,
4508
4528
  copyRules: It,
4509
4529
  mergeRule: te,
4510
4530
  fetch: Mt,
4511
- $form: S,
4531
+ $form: R,
4512
4532
  parseFn: z,
4513
4533
  parseJson: At,
4514
- toJson: et,
4515
- useApp: P,
4534
+ toJson: _e,
4535
+ useApp: T,
4516
4536
  getApi: G,
4517
4537
  on: Yt
4518
4538
  });
4519
4539
  }
4520
4540
  function xt(f) {
4521
4541
  _(f, {
4522
- create: W,
4523
- install(p, y) {
4524
- if (d = b(b({}, d), y || {}), p._installedFormCreate === !0) return;
4525
- p._installedFormCreate = !0;
4542
+ create: K,
4543
+ install(d, y) {
4544
+ if (p = b(b({}, p), y || {}), d._installedFormCreate === !0) return;
4545
+ d._installedFormCreate = !0;
4526
4546
  const v = function(j, k = {}) {
4527
- return W(j, k, this);
4547
+ return K(j, k, this);
4528
4548
  };
4529
- st(v), p.prototype.$formCreate = v;
4530
- const C = S();
4531
- p.component(C.name, C), p.component("FcFragment", N()), o.forEach((j) => {
4532
- F(() => j(f, p));
4549
+ st(v), d.prototype.$formCreate = v;
4550
+ const C = R();
4551
+ d.component(C.name, C), d.component("FcFragment", N()), o.forEach((j) => {
4552
+ F(() => j(f, d));
4533
4553
  });
4534
4554
  }
4535
4555
  });
4536
4556
  }
4537
- if (st(O), xt(O), we("$cookie", Di), we("$localStorage", ji), we("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && W.use(t), de(Ri), t.inherit) {
4557
+ if (st(O), xt(O), Fe("$cookie", Di), Fe("$localStorage", ji), Fe("$sessionStorage", Ai), $.use({ fragment: "fcFragment" }), t.install && K.use(t), de(Si), t.inherit) {
4538
4558
  const f = t.inherit;
4539
4559
  f.components && _(e, f.components), f.parsers && _(r, f.parsers), f.directives && _(i, f.directives), f.modelFields && _(s, f.modelFields), f.providers && _(u, f.providers), f.useApps && _(o, f.useApps), f.maker && _(c, f.maker), f.loadData && _(g, f.loadData), f.formulas && _(w, f.formulas);
4540
4560
  }
4541
- const Fe = S();
4542
- return Re(Fe, O), Object.defineProperties(Fe, {
4561
+ const Oe = R();
4562
+ return Ee(Oe, O), Object.defineProperties(Oe, {
4543
4563
  fetch: {
4544
4564
  get() {
4545
4565
  return O.fetch;
@@ -4548,7 +4568,7 @@ function Gt(t) {
4548
4568
  O.fetch = f;
4549
4569
  }
4550
4570
  }
4551
- }), Fe.util = O, Fe;
4571
+ }), Oe.util = O, Oe;
4552
4572
  }
4553
4573
  const bt = {
4554
4574
  date: "yyyy-MM-dd",
@@ -4562,25 +4582,25 @@ const bt = {
4562
4582
  }, _t = "datePicker", Li = {
4563
4583
  name: _t,
4564
4584
  maker: function() {
4565
- return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = I(_t, { type: e.toLowerCase() }), t), {});
4585
+ return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = P(_t, { type: e.toLowerCase() }), t), {});
4566
4586
  }(),
4567
4587
  mergeProp(t) {
4568
4588
  const e = t.prop.props;
4569
4589
  e.valueFormat || (e.valueFormat = bt[e.type] || bt.date);
4570
4590
  }
4571
- }, Me = "hidden", Mi = {
4572
- name: Me,
4591
+ }, Ne = "hidden", Mi = {
4592
+ name: Ne,
4573
4593
  maker: {
4574
- [Me]: (t, e) => I(Me)("", t, e)
4594
+ [Ne]: (t, e) => P(Ne)("", t, e)
4575
4595
  },
4576
4596
  render() {
4577
4597
  return [];
4578
4598
  }
4579
- }, Ne = "input", Ni = {
4580
- name: Ne,
4599
+ }, qe = "input", Ni = {
4600
+ name: qe,
4581
4601
  maker: function() {
4582
- const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = I(Ne, { type: r }), e), {});
4583
- return t.idate = I(Ne, { type: "date" }), t;
4602
+ const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = P(qe, { type: r }), e), {});
4603
+ return t.idate = P(qe, { type: "date" }), t;
4584
4604
  }(),
4585
4605
  mergeProp(t) {
4586
4606
  let { props: e } = t.prop;
@@ -4589,17 +4609,17 @@ const bt = {
4589
4609
  }, Ct = "slider", qi = {
4590
4610
  name: Ct,
4591
4611
  maker: {
4592
- sliderRange: I(Ct, { range: !0 })
4612
+ sliderRange: P(Ct, { range: !0 })
4593
4613
  },
4594
4614
  toFormValue(t, e) {
4595
4615
  let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
4596
4616
  return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
4597
4617
  }
4598
- }, qe = "timePicker", Ui = {
4599
- name: qe,
4618
+ }, Ue = "timePicker", Ui = {
4619
+ name: Ue,
4600
4620
  maker: {
4601
- time: I(qe, (t) => t.props.isRange = !1),
4602
- timeRange: I(qe, (t) => t.props.isRange = !0)
4621
+ time: P(Ue, (t) => t.props.isRange = !1),
4622
+ timeRange: P(Ue, (t) => t.props.isRange = !0)
4603
4623
  },
4604
4624
  mergeProp(t) {
4605
4625
  const e = t.prop.props;
@@ -4704,7 +4724,7 @@ function Y(t) {
4704
4724
  function Qi(t, e) {
4705
4725
  D(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4706
4726
  }
4707
- function Ue(t) {
4727
+ function He(t) {
4708
4728
  const e = b({}, t);
4709
4729
  return delete e.children, e;
4710
4730
  }
@@ -4781,7 +4801,7 @@ const Zi = {
4781
4801
  props: q(b({
4782
4802
  labelWidth: o === void 0 ? o : jt(o),
4783
4803
  label: n ? r.title.title : void 0
4784
- }, Ue(r.wrap || {})), {
4804
+ }, He(r.wrap || {})), {
4785
4805
  prop: t.id,
4786
4806
  rules: t.injectValidate()
4787
4807
  }),
@@ -4798,9 +4818,9 @@ const Zi = {
4798
4818
  return !(!e.title && !e.native || Y(e.show));
4799
4819
  },
4800
4820
  makeInfo(t, e, r) {
4801
- var c, d, m, g, $, w;
4821
+ var c, p, m, g, $, w;
4802
4822
  const i = b({}, t.title), s = b({}, t.info), n = zi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
4803
- title: (d = (c = r.refRule) == null ? void 0 : c.__$title) == null ? void 0 : d.value,
4823
+ title: (p = (c = r.refRule) == null ? void 0 : c.__$title) == null ? void 0 : p.value,
4804
4824
  rule: r.rule,
4805
4825
  options: this.options
4806
4826
  }) : ((g = (m = r.refRule) == null ? void 0 : m.__$title) == null ? void 0 : g.value) + (o.labelSuffix || o["label-suffix"] || "")];
@@ -4808,7 +4828,7 @@ const Zi = {
4808
4828
  const O = {
4809
4829
  type: s.type || "popover",
4810
4830
  slot: "label",
4811
- props: Ue(s),
4831
+ props: He(s),
4812
4832
  key: `${e}pop`
4813
4833
  };
4814
4834
  delete O.props.icon, delete O.props.show, delete O.props.info, delete O.props.align, delete O.props.native;
@@ -4823,7 +4843,7 @@ const Zi = {
4823
4843
  ]));
4824
4844
  }
4825
4845
  const u = ee([i, {
4826
- props: Ue(i),
4846
+ props: He(i),
4827
4847
  key: `${e}tit`,
4828
4848
  class: "fc-form-title",
4829
4849
  slot: i.slot || "label",
@@ -4906,16 +4926,16 @@ tn(fe);
4906
4926
  rn(fe);
4907
4927
  function Yi(t) {
4908
4928
  ["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
4909
- t[e] = I(e);
4929
+ t[e] = P(e);
4910
4930
  }), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
4911
4931
  }
4912
4932
  function xi(t) {
4913
4933
  const e = "select", r = "multiple";
4914
- t.selectMultiple = I(e, { [r]: !0 }), t.selectOne = I(e, { [r]: !1 });
4934
+ t.selectMultiple = P(e, { [r]: !0 }), t.selectOne = P(e, { [r]: !1 });
4915
4935
  }
4916
4936
  function en(t) {
4917
4937
  const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
4918
- Object.keys(r).reduce((i, s) => (i[s] = I(e, { type: r[s] }), i), t);
4938
+ Object.keys(r).reduce((i, s) => (i[s] = P(e, { type: r[s] }), i), t);
4919
4939
  }
4920
4940
  function tn(t) {
4921
4941
  const e = "upload", r = {
@@ -4924,7 +4944,7 @@ function tn(t) {
4924
4944
  uploadFileOne: ["file", 1],
4925
4945
  uploadImageOne: ["image", 1]
4926
4946
  };
4927
- Object.keys(r).reduce((i, s) => (i[s] = I(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4947
+ Object.keys(r).reduce((i, s) => (i[s] = P(e, (n) => n.props({ uploadType: r[s][0], maxLength: r[s][1] })), i), t), t.uploadImage = t.image, t.uploadFile = t.file;
4928
4948
  }
4929
4949
  function rn(t) {
4930
4950
  const e = {
@@ -4935,7 +4955,7 @@ function rn(t) {
4935
4955
  frameFileOne: ["file", 1],
4936
4956
  frameImageOne: ["image", 1]
4937
4957
  };
4938
- return Object.keys(e).reduce((r, i) => (r[i] = I("frame", (s) => s.props({ type: e[i][0], maxLength: e[i][1] })), r), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages, t;
4958
+ return Object.keys(e).reduce((r, i) => (r[i] = P("frame", (s) => s.props({ type: e[i][0], maxLength: e[i][1] })), r), t), t.frameInput = t.frameInputs, t.frameFile = t.frameFiles, t.frameImage = t.frameImages, t;
4939
4959
  }
4940
4960
  function Ft(t, e) {
4941
4961
  return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
@@ -4953,7 +4973,7 @@ function nn(t, e) {
4953
4973
  validate(r) {
4954
4974
  return new Promise((i, s) => {
4955
4975
  const n = t.children, o = [e.$manager.validate()];
4956
- n.forEach((a) => {
4976
+ n.filter((a) => !a.isScope).forEach((a) => {
4957
4977
  o.push(a.validate());
4958
4978
  }), Promise.all(o).then(() => {
4959
4979
  i(!0), r && r(!0);
@@ -4967,7 +4987,7 @@ function nn(t, e) {
4967
4987
  const o = e.getFieldCtx(r);
4968
4988
  if (!o) return;
4969
4989
  const a = e.subForm[o.id], l = [e.$manager.validateField(o.id)];
4970
- H(a).forEach((u) => {
4990
+ H(a).filter((u) => !u.isScope).forEach((u) => {
4971
4991
  l.push(u.validate());
4972
4992
  }), Promise.all(l).then(() => {
4973
4993
  s(null), i && i(null);
@@ -5025,11 +5045,11 @@ function nn(t, e) {
5025
5045
  },
5026
5046
  submit(r, i) {
5027
5047
  return new Promise((s, n) => {
5028
- t.validate().then(() => {
5029
- let o = t.formData();
5030
- h.Function(r) && F(() => r(o, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(o, t)), e.vm.$emit("submit", o, t), s(o);
5031
- }).catch((...o) => {
5032
- h.Function(i) && F(() => i(t, ...o)), n(...o);
5048
+ (e.options.validateOnSubmit === !1 ? Promise.resolve() : t.validate()).then(() => {
5049
+ let a = t.formData();
5050
+ h.Function(r) && F(() => r(a, t)), h.Function(e.options.onSubmit) && F(() => e.options.onSubmit(a, t)), e.vm.$emit("submit", a, t), s(a);
5051
+ }).catch((...a) => {
5052
+ h.Function(i) && F(() => i(t, ...a)), n(...a);
5033
5053
  });
5034
5054
  });
5035
5055
  }
@@ -5078,7 +5098,7 @@ function on(t) {
5078
5098
  function an() {
5079
5099
  return Gt({
5080
5100
  ui: "element-ui",
5081
- version: "2.7.4",
5101
+ version: "2.7.5",
5082
5102
  manager: Zi,
5083
5103
  extendApi: nn,
5084
5104
  install: on,
@@ -5089,10 +5109,10 @@ function an() {
5089
5109
  }
5090
5110
  });
5091
5111
  }
5092
- const ze = an();
5093
- typeof window != "undefined" && (window.formCreate = ze, window.Vue && ze.install(window.Vue));
5094
- const cn = ze.maker;
5112
+ const Qe = an();
5113
+ typeof window != "undefined" && (window.formCreate = Qe, window.Vue && Qe.install(window.Vue));
5114
+ const cn = Qe.maker;
5095
5115
  export {
5096
- ze as default,
5116
+ Qe as default,
5097
5117
  cn as maker
5098
5118
  };