@form-create/element-ui 2.7.1 → 2.7.2

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.1
3
+ * @form-create/element-ui v2.7.2
4
4
  * (c) 2018-2025 xaboy
5
5
  * Github https://github.com/xaboy/form-create
6
6
  * Site https://form-create.com/
@@ -9,17 +9,17 @@
9
9
  (function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode('._fc-frame .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-frame .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-frame .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-frame .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-frame .fc-files:hover .fc-upload-cover{opacity:1}._fc-frame .el-upload{display:block}._fc-frame .fc-upload-btn,.fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-upload .fc-files img{width:100%;height:100%;display:inline-block;vertical-align:top}._fc-upload .fc-upload-btn{border:1px dashed #c0ccda;cursor:pointer}._fc-upload .fc-upload-cover{opacity:0;position:absolute;inset:0;background:#0009;-webkit-transition:opacity .3s;-o-transition:opacity .3s;transition:opacity .3s}._fc-upload .fc-upload-cover i{color:#fff;font-size:20px;cursor:pointer;margin:0 2px}._fc-upload .fc-files:hover .fc-upload-cover{opacity:1}._fc-upload .fc-upload-btn,._fc-upload .fc-files{display:inline-block;width:58px;height:58px;text-align:center;line-height:58px;border:1px solid #c0ccda;border-radius:4px;overflow:hidden;background:#fff;position:relative;-webkit-box-shadow:2px 2px 5px rgba(0,0,0,.1);box-shadow:2px 2px 5px #0000001a;margin-right:4px;-webkit-box-sizing:border-box;box-sizing:border-box}._fc-group{display:flex;min-height:42px;justify-content:center;flex-direction:column}._fc-group-disabled ._fc-group-btn,._fc-group-disabled ._fc-group-add{cursor:not-allowed}._fc-group-handle{display:flex;flex-direction:row;position:absolute;bottom:-15px;right:30px;border-radius:15px;border:1px dashed #d9d9d9;padding:3px 8px;background-color:#fff}._fc-group-btn{cursor:pointer}._fc-group-idx{position:absolute;bottom:-15px;left:10px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;background:#eee;border-radius:15px;font-weight:700}._fc-group-handle ._fc-group-btn+._fc-group-btn{margin-left:7px}._fc-group-container{position:relative;display:flex;flex-direction:column;border:1px dashed #d9d9d9;padding:20px 20px 25px;margin:5px 5px 25px;border-radius:5px}._fc-group-arrow{position:relative;width:20px;height:20px}._fc-group-arrow:before{content:"";position:absolute;top:8px;left:5px;width:9px;height:9px;border-left:2px solid #999;border-top:2px solid #999}._fc-group-arrow:before{transform:rotate(45deg)}._fc-group-arrow._fc-group-down{transform:rotate(180deg)}._fc-group-plus-minus{width:20px;height:20px;position:relative;cursor:pointer}._fc-group-plus-minus:before,._fc-group-plus-minus:after{content:"";position:absolute;top:50%;left:50%;width:60%;height:2px;background-color:#409eff;transform:translate(-50%,-50%)}._fc-group-plus-minus:before{transform:translate(-50%,-50%) rotate(90deg)}._fc-group-plus-minus._fc-group-minus:before{display:none}._fc-group-plus-minus._fc-group-minus:after{background-color:#f56c6c}._fc-group-add{cursor:pointer;width:25px;height:25px;border:1px solid rgb(64 158 255 / 50%);border-radius:15px}._fc-group-add._fc-group-plus-minus:before,._fc-group-add._fc-group-plus-minus:after{width:50%}.form-create .form-create .el-form-item{margin-bottom:22px}.form-create{width:100%}.fc-form-row{box-sizing:border-box;display:flex;flex-wrap:wrap;position:relative}.form-create.is-preview .fc-clock,.form-create .fc-none,.form-create.is-preview .el-form-item.is-required>.el-form-item__label-wrap>.el-form-item__label:before,.form-create.is-preview .el-form-item.is-required>.el-form-item__label:before{display:none!important}.fc-wrap-right>.el-form-item__label{display:flex;justify-content:flex-end}.fc-wrap-left>.el-form-item__label{display:flex;justify-content:flex-start}.fc-wrap-top.el-form-item{display:block}.fc-wrap-top.el-form-item>.el-form-item__label{display:block;height:auto;line-height:22px;margin-bottom:8px;text-align:left}.fc-wrap-top.el-form-item>.el-form-item__content{margin-left:0!important}.el-form--large .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:12px}.el-form--default .fc-wrap-top.el-form-item>.el-form-item__label{line-height:22px;margin-bottom:8px}.el-form--small .fc-wrap-top.el-form-item>.el-form-item__label{line-height:20px;margin-bottom:4px}.fc-form-footer{margin-top:12px}')),document.head.appendChild(o)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
10
10
  var er = Object.defineProperty, tr = Object.defineProperties;
11
11
  var rr = Object.getOwnPropertyDescriptors;
12
- var st = Object.getOwnPropertySymbols;
12
+ var ot = Object.getOwnPropertySymbols;
13
13
  var ir = Object.prototype.hasOwnProperty, nr = Object.prototype.propertyIsEnumerable;
14
- var ot = (t, e, r) => e in t ? er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
14
+ var at = (t, e, r) => e in t ? er(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, b = (t, e) => {
15
15
  for (var r in e || (e = {}))
16
- ir.call(e, r) && ot(t, r, e[r]);
17
- if (st)
18
- for (var r of st(e))
19
- nr.call(e, r) && ot(t, r, e[r]);
16
+ ir.call(e, r) && at(t, r, e[r]);
17
+ if (ot)
18
+ for (var r of ot(e))
19
+ nr.call(e, r) && at(t, r, e[r]);
20
20
  return t;
21
- }, N = (t, e) => tr(t, rr(e));
22
- import de, { getCurrentInstance as sr, provide as or, inject as ar, toRefs as at, reactive as ee, onBeforeMount as lr, watch as B, onMounted as ur, onBeforeUnmount as cr, onUpdated as fr, nextTick as J, markRaw as fe, computed as he, toRef as Re, ref as hr } from "vue";
21
+ }, q = (t, e) => tr(t, rr(e));
22
+ import de, { getCurrentInstance as sr, provide as or, inject as ar, toRefs as lt, reactive as ee, onBeforeMount as lr, watch as L, onMounted as ur, onBeforeUnmount as cr, onUpdated as fr, nextTick as T, markRaw as fe, computed as he, toRef as Se, ref as hr } from "vue";
23
23
  function dr(t) {
24
24
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
25
25
  }
@@ -123,7 +123,7 @@ const br = "fcCheckbox", _r = {
123
123
  this.$emit("fc.el", this.$refs.el);
124
124
  }
125
125
  };
126
- function H(t) {
126
+ function G(t) {
127
127
  return Array.isArray(t) ? t : [null, void 0, ""].indexOf(t) > -1 ? [] : [t];
128
128
  }
129
129
  const Cr = "fcFrame", wr = {
@@ -168,11 +168,11 @@ const Cr = "fcFrame", wr = {
168
168
  },
169
169
  okBtnText: {
170
170
  type: String,
171
- default: "确定"
171
+ default: ""
172
172
  },
173
173
  closeBtnText: {
174
174
  type: String,
175
- default: "关闭"
175
+ default: ""
176
176
  },
177
177
  modalTitle: String,
178
178
  handleIcon: {
@@ -248,7 +248,7 @@ const Cr = "fcFrame", wr = {
248
248
  },
249
249
  data() {
250
250
  return {
251
- fileList: H(this.value),
251
+ fileList: G(this.value),
252
252
  previewVisible: !1,
253
253
  frameVisible: !1,
254
254
  previewImage: ""
@@ -256,7 +256,7 @@ const Cr = "fcFrame", wr = {
256
256
  },
257
257
  watch: {
258
258
  value(t) {
259
- this.fileList = H(t);
259
+ this.fileList = G(t);
260
260
  },
261
261
  fileList(t) {
262
262
  const e = this.maxLength === 1 ? t[0] || "" : t;
@@ -427,14 +427,14 @@ const Cr = "fcFrame", wr = {
427
427
  on: {
428
428
  click: () => this.onCancel() !== !1 && (this.frameVisible = !1)
429
429
  }
430
- }, [r]) : null, s ? t("ElButton", {
430
+ }, [r || this.formCreateInject.t("close") || "关闭"]) : null, s ? t("ElButton", {
431
431
  attrs: {
432
432
  type: "primary"
433
433
  },
434
434
  on: {
435
435
  click: () => this.onOk() !== !1 && this.closeModel()
436
436
  }
437
- }, [e]) : null]);
437
+ }, [e || this.formCreateInject.t("ok") || "确定"]) : null]);
438
438
  }
439
439
  },
440
440
  render() {
@@ -469,7 +469,7 @@ const Cr = "fcFrame", wr = {
469
469
  src: this.previewImage
470
470
  }
471
471
  })]), t("el-dialog", V([{}, {
472
- props: N(b({
472
+ props: q(b({
473
473
  width: i,
474
474
  title: o,
475
475
  appendToBody: !0
@@ -496,8 +496,8 @@ const Cr = "fcFrame", wr = {
496
496
  mounted() {
497
497
  this.$on("fc.closeModal", this.closeModal);
498
498
  }
499
- }, Fr = "fcRadio", Or = {
500
- name: Fr,
499
+ }, Or = "fcRadio", Fr = {
500
+ name: Or,
501
501
  props: {
502
502
  formCreateInject: {
503
503
  type: Object,
@@ -666,7 +666,7 @@ const kr = "fcSelect", Er = {
666
666
  t === "selected" ? e = this.$refs.tree.getCurrentKey() : e = this.$refs.tree.getCheckedKeys(), this.$emit("input", e);
667
667
  },
668
668
  setValue() {
669
- this.type.toLocaleLowerCase() === "selected" ? this.$refs.tree.setCurrentKey(this.value) : this.$refs.tree.setCheckedKeys(H(this.value));
669
+ this.type.toLocaleLowerCase() === "selected" ? this.$refs.tree.setCurrentKey(this.value) : this.$refs.tree.setCheckedKeys(G(this.value));
670
670
  }
671
671
  },
672
672
  render() {
@@ -683,7 +683,7 @@ const kr = "fcSelect", Er = {
683
683
  this.setValue(), this.$emit("fc.el", this.$refs.tree);
684
684
  }
685
685
  };
686
- function lt(t, e) {
686
+ function ut(t, e) {
687
687
  return typeof t == "object" ? t : {
688
688
  url: t,
689
689
  is_string: !0,
@@ -691,8 +691,8 @@ function lt(t, e) {
691
691
  uid: e
692
692
  };
693
693
  }
694
- function ut(t) {
695
- return N(b({}, t), {
694
+ function ct(t) {
695
+ return q(b({}, t), {
696
696
  file: t,
697
697
  value: t
698
698
  });
@@ -727,6 +727,7 @@ const jr = "fcUpload", Ar = {
727
727
  },
728
728
  previewMask: void 0,
729
729
  showFileList: Boolean,
730
+ httpRequest: Function,
730
731
  modalTitle: String,
731
732
  listType: {
732
733
  type: String,
@@ -748,11 +749,11 @@ const jr = "fcUpload", Ar = {
748
749
  };
749
750
  },
750
751
  created() {
751
- this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = H(this.value).map(lt).map(ut);
752
+ this.formCreateInject.prop.props.showFileList === void 0 && (this.formCreateInject.prop.props.showFileList = !1), this.formCreateInject.prop.props.fileList = G(this.value).map(ut).map(ct);
752
753
  },
753
754
  watch: {
754
755
  value(t) {
755
- this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = H(t).map(lt).map(ut), this.uploadList = this.$refs.upload.uploadFiles);
756
+ this.$refs.upload.uploadFiles.every((e) => !e.status || e.status === "success") && (this.$refs.upload.uploadFiles = G(t).map(ut).map(ct), this.uploadList = this.$refs.upload.uploadFiles);
756
757
  },
757
758
  limit(t, e) {
758
759
  (e === 1 || t === 1) && this.update();
@@ -845,7 +846,7 @@ const jr = "fcUpload", Ar = {
845
846
  attrs: {
846
847
  type: "primary"
847
848
  }
848
- }, ["点击上传"]) : t("i", {
849
+ }, [this.formCreateInject.t("clickToUpload") || "点击上传"]) : t("i", {
849
850
  class: "el-icon-upload2"
850
851
  });
851
852
  },
@@ -854,7 +855,8 @@ const jr = "fcUpload", Ar = {
854
855
  return t("ElUpload", V([{}, this.formCreateInject.prop, {}, {
855
856
  props: {
856
857
  listType: this.listType,
857
- showFileList: this.listType !== "picture"
858
+ showFileList: this.listType !== "picture",
859
+ httpRequest: this.doHttpRequest
858
860
  },
859
861
  style: {
860
862
  display: "inline-block"
@@ -871,6 +873,11 @@ const jr = "fcUpload", Ar = {
871
873
  },
872
874
  handleCancel() {
873
875
  this.previewVisible = !1;
876
+ },
877
+ doHttpRequest(t) {
878
+ if (this.httpRequest)
879
+ return this.httpRequest(t);
880
+ t.source = "upload", t.method = "post", this.formCreateInject.api.fetch(t);
874
881
  }
875
882
  },
876
883
  render() {
@@ -1338,7 +1345,7 @@ const Ir = "fcGroup", Pr = {
1338
1345
  }, Lr = [
1339
1346
  _r,
1340
1347
  wr,
1341
- Or,
1348
+ Fr,
1342
1349
  Er,
1343
1350
  Sr,
1344
1351
  Ar,
@@ -1355,12 +1362,12 @@ function ye(t) {
1355
1362
  let e = t.replace(/([A-Z])/g, "-$1").toLocaleLowerCase();
1356
1363
  return e.indexOf("-") === 0 && (e = e.substr(1)), e;
1357
1364
  }
1358
- const ke = (t, e) => {
1365
+ const Ee = (t, e) => {
1359
1366
  if (!(!t || t === e || !t.$props)) {
1360
1367
  if (t.$props.formCreateInject)
1361
1368
  return t.$props.formCreateInject;
1362
1369
  if (t.$parent)
1363
- return ke(t.$parent, e);
1370
+ return Ee(t.$parent, e);
1364
1371
  }
1365
1372
  };
1366
1373
  function Mr(t, e, r) {
@@ -1423,7 +1430,7 @@ function Mr(t, e, r) {
1423
1430
  a = a.parent;
1424
1431
  else
1425
1432
  a = n;
1426
- const { rule: l, value: u, subForm: c, inFor: p } = at(s), m = ee({
1433
+ const { rule: l, value: u, subForm: c, inFor: p } = lt(s), m = ee({
1427
1434
  ctxInject: {},
1428
1435
  destroyed: !1,
1429
1436
  isShow: !0,
@@ -1432,82 +1439,82 @@ function Mr(t, e, r) {
1432
1439
  updateValue: JSON.stringify(u.value || {})
1433
1440
  }), y = new t(n), v = y.api(), w = p.value, D = () => {
1434
1441
  if (o) {
1435
- const F = ke(n, o);
1436
- if (F) {
1442
+ const O = Ee(n, o);
1443
+ if (O) {
1437
1444
  let S;
1438
- w ? (S = H(F.getSubForm()), S.push(v)) : S = v, F.subForm(S);
1445
+ w ? (S = G(O.getSubForm()), S.push(v)) : S = v, O.subForm(S);
1439
1446
  }
1440
1447
  }
1441
1448
  }, Y = () => {
1442
- const F = ke(n, o);
1443
- if (F)
1449
+ const O = Ee(n, o);
1450
+ if (O)
1444
1451
  if (w) {
1445
- const S = H(F.getSubForm()), T = S.indexOf(v);
1446
- T > -1 && S.splice(T, 1);
1452
+ const S = G(O.getSubForm()), B = S.indexOf(v);
1453
+ B > -1 && S.splice(B, 1);
1447
1454
  } else
1448
- F.subForm();
1455
+ O.subForm();
1449
1456
  };
1450
1457
  let P = null;
1451
1458
  lr(() => {
1452
- B(() => {
1453
- let F = "";
1459
+ L(() => {
1460
+ let O = "";
1454
1461
  const S = s.option && s.option.globalClass || {};
1455
- Object.keys(S).forEach((T) => {
1462
+ Object.keys(S).forEach((B) => {
1456
1463
  let re = "";
1457
- S[T].style && Object.keys(S[T].style).forEach((be) => {
1458
- re += ye(be) + ":" + S[T].style[be] + ";";
1459
- }), S[T].content && (re += S[T].content + ";"), re && (F += `.${T}{${re}}`);
1460
- }), 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 || "";
1464
+ S[B].style && Object.keys(S[B].style).forEach((be) => {
1465
+ re += ye(be) + ":" + S[B].style[be] + ";";
1466
+ }), S[B].content && (re += S[B].content + ";"), re && (O += `.${B}{${re}}`);
1467
+ }), s.option && s.option.style && (O += s.option.style), P || (P = document.createElement("style"), P.type = "text/css", document.head.appendChild(P)), P.innerHTML = O || "";
1461
1468
  }, () => {
1462
1469
  });
1463
1470
  });
1464
- const L = le(() => {
1471
+ const M = le(() => {
1465
1472
  y.bus.$emit("$loadData.$topForm");
1466
- }, 100), De = le(() => {
1473
+ }, 100), je = le(() => {
1467
1474
  y.bus.$emit("$loadData.$form");
1468
- }, 100), ve = (F) => {
1469
- y.bus.$emit("change-$form." + F);
1475
+ }, 100), ve = (O) => {
1476
+ y.bus.$emit("change-$form." + O);
1470
1477
  };
1471
1478
  return ur(() => {
1472
- o && (v.top.bus.$on("$loadData.$form", L), v.top.bus.$on("change", ve)), y.mounted();
1479
+ o && (v.top.bus.$on("$loadData.$form", M), v.top.bus.$on("change", ve)), y.mounted();
1473
1480
  }), cr(() => {
1474
- o && (v.top.bus.$off("$loadData.$form", L), v.top.bus.$off("change", ve)), P && document.head.removeChild(P), Y(), m.destroyed = !0, y.unmount();
1481
+ o && (v.top.bus.$off("$loadData.$form", M), v.top.bus.$off("change", ve)), P && document.head.removeChild(P), Y(), m.destroyed = !0, y.unmount();
1475
1482
  }), fr(() => {
1476
1483
  y.updated();
1477
- }), B(c, (F) => {
1478
- F ? D() : Y();
1479
- }, { immediate: !0 }), B(() => [...l.value], (F) => {
1480
- y.$handle.isBreakWatch() || F.length === m.renderRule.length && F.every((S) => m.renderRule.indexOf(S) > -1) || (y.$handle.updateAppendData(), y.$handle.reloadRule(l.value), n.renderRule());
1481
- }), B(() => s.option, () => {
1484
+ }), L(c, (O) => {
1485
+ O ? D() : Y();
1486
+ }, { immediate: !0 }), L(() => [...l.value], (O) => {
1487
+ y.$handle.isBreakWatch() || O.length === m.renderRule.length && O.every((S) => m.renderRule.indexOf(S) > -1) || (y.$handle.updateAppendData(), y.$handle.reloadRule(l.value), n.renderRule());
1488
+ }), L(() => s.option, () => {
1482
1489
  y.initOptions(), v.refresh();
1483
- }, { deep: !0 }), B(() => [s.disabled, s.preview], () => {
1490
+ }, { deep: !0 }), L(() => [s.disabled, s.preview], () => {
1484
1491
  v.refresh();
1485
- }), B(u, (F) => {
1486
- JSON.stringify(F || {}) !== m.updateValue && (v.config.forceCoverValue ? v.coverValue(F || {}) : v.setValue(F || {}));
1487
- }, { deep: !0, flush: "post" }), B(() => s.index, () => {
1488
- v.coverValue({}), y.$handle.updateAppendData(), J(() => {
1489
- J(() => {
1492
+ }), L(u, (O) => {
1493
+ JSON.stringify(O || {}) !== m.updateValue && (v.config.forceCoverValue ? v.coverValue(O || {}) : v.setValue(O || {}));
1494
+ }, { deep: !0, flush: "post" }), L(() => s.index, () => {
1495
+ v.coverValue({}), y.$handle.updateAppendData(), T(() => {
1496
+ T(() => {
1490
1497
  v.clearValidateState();
1491
1498
  });
1492
1499
  });
1493
- }, { flush: "sync" }), N(b({
1500
+ }, { flush: "sync" }), q(b({
1494
1501
  fc: fe(y),
1495
1502
  parent: o && fe(o),
1496
1503
  top: fe(a),
1497
1504
  fapi: fe(v)
1498
- }, at(m)), {
1499
- getGroupInject: () => ke(n, o),
1505
+ }, lt(m)), {
1506
+ getGroupInject: () => Ee(n, o),
1500
1507
  refresh() {
1501
1508
  ++m.unique;
1502
1509
  },
1503
1510
  renderRule() {
1504
1511
  m.renderRule = [...l.value || []];
1505
1512
  },
1506
- updateValue(F) {
1513
+ updateValue(O) {
1507
1514
  if (m.destroyed) return;
1508
- const S = JSON.stringify(F);
1509
- m.updateValue !== S && (m.updateValue = S, n.$emit("update:value", F), J(() => {
1510
- De(), o || L();
1515
+ const S = JSON.stringify(O);
1516
+ m.updateValue !== S && (m.updateValue = S, n.$emit("update:value", O), T(() => {
1517
+ je(), o || M();
1511
1518
  }));
1512
1519
  }
1513
1520
  });
@@ -1517,8 +1524,8 @@ function Mr(t, e, r) {
1517
1524
  }
1518
1525
  };
1519
1526
  }
1520
- const Ft = ["attrs", "props", "domProps", "scopedSlots"], Ot = ["class", "style", "directives"], kt = ["on", "nativeOn", "hook"], Q = (t, e = {}, r = {}) => {
1521
- const i = [...Ft, ...r.normal || []], s = [...Ot, ...r.array || []], n = [...kt, ...r.functional || []], o = r.props || [];
1527
+ const Ft = ["attrs", "props", "domProps", "scopedSlots"], kt = ["class", "style", "directives"], Et = ["on", "nativeOn", "hook"], Q = (t, e = {}, r = {}) => {
1528
+ const i = [...Ft, ...r.normal || []], s = [...kt, ...r.array || []], n = [...Et, ...r.functional || []], o = r.props || [];
1522
1529
  return t.reduce((a, l) => {
1523
1530
  for (const u in l)
1524
1531
  if (a[u])
@@ -1547,20 +1554,20 @@ const Ft = ["attrs", "props", "domProps", "scopedSlots"], Ot = ["class", "style"
1547
1554
  }, e);
1548
1555
  }, Nr = (t, e) => function() {
1549
1556
  t && t.apply(this, arguments), e && e.apply(this, arguments);
1550
- }, Et = ["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"];
1551
- function Rt() {
1552
- return [...Et, ...Ft, ...Ot, ...kt, ...Ze, ...Ye];
1557
+ }, 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"], Ze = ["validate", "children", "control"], Ye = ["effect", "deep", "renderSlots"];
1558
+ function St() {
1559
+ return [...Rt, ...Ft, ...kt, ...Et, ...Ze, ...Ye];
1553
1560
  }
1554
- function St(t, e, r) {
1561
+ function Dt(t, e, r) {
1555
1562
  return `[form-create ${t}]: ${e}`;
1556
1563
  }
1557
1564
  function xe(t, e) {
1558
- console.error(St("err", t));
1565
+ console.error(Dt("err", t));
1559
1566
  }
1560
- function Ur(t) {
1567
+ function qr(t) {
1561
1568
  xe(t.toString()), console.error(t);
1562
1569
  }
1563
- function Dt(t) {
1570
+ function jt(t) {
1564
1571
  return t == null ? "" : typeof t == "object" ? JSON.stringify(t, null, 2) : String(t);
1565
1572
  }
1566
1573
  const Je = "[[FORM-CREATE-PREFIX-", We = "-FORM-CREATE-SUFFIX]]";
@@ -1618,14 +1625,14 @@ err: ${s}`);
1618
1625
  }
1619
1626
  return t;
1620
1627
  }
1621
- function jt(t, e) {
1628
+ function At(t, e) {
1622
1629
  return JSON.parse(t, function(r, i) {
1623
1630
  return h.Undef(i) || !i.indexOf ? i : K(i, e);
1624
1631
  });
1625
1632
  }
1626
- let qr = 0;
1627
- function Se() {
1628
- const t = 370 + ++qr;
1633
+ let Ur = 0;
1634
+ function De() {
1635
+ const t = 370 + ++Ur;
1629
1636
  return "F" + Math.random().toString(36).substr(3, 3) + (+`${Date.now()}`).toString(36) + t.toString(36) + "c";
1630
1637
  }
1631
1638
  function te(t, e, r) {
@@ -1642,16 +1649,16 @@ function Ke(t, e) {
1642
1649
  writable: !!e
1643
1650
  };
1644
1651
  }
1645
- function At(t, e) {
1646
- return Vt([t], e || !1)[0];
1647
- }
1648
1652
  function Vt(t, e) {
1653
+ return It([t], e || !1)[0];
1654
+ }
1655
+ function It(t, e) {
1649
1656
  return $e([], [...t], e || !1);
1650
1657
  }
1651
1658
  function Z(t, e) {
1652
1659
  return Q(Array.isArray(e) ? e : [e], t, { array: Ze, normal: Ye }), t;
1653
1660
  }
1654
- function ct(t) {
1661
+ function ft(t) {
1655
1662
  const e = h.Function(t.getRule) ? t.getRule() : t;
1656
1663
  return e.type || (e.type = "input"), e;
1657
1664
  }
@@ -1660,7 +1667,7 @@ function Hr(t, e) {
1660
1667
  e[r] && (t[r] = Z(t[r] || {}, e[r]));
1661
1668
  }), t) : e;
1662
1669
  }
1663
- function It(t, e) {
1670
+ function Pt(t, e) {
1664
1671
  Object.defineProperties(t, Object.keys(e).reduce((r, i) => (r[i] = {
1665
1672
  get() {
1666
1673
  return e[i]();
@@ -1670,17 +1677,17 @@ function It(t, e) {
1670
1677
  function oe(t) {
1671
1678
  return t.__fc__ || (t.__origin__ ? t.__origin__.__fc__ : null);
1672
1679
  }
1673
- function O(t, e) {
1680
+ function F(t, e) {
1674
1681
  try {
1675
1682
  e = t();
1676
1683
  } catch (r) {
1677
- Ur(r);
1684
+ qr(r);
1678
1685
  }
1679
1686
  return e;
1680
1687
  }
1681
1688
  function Xe(t, e) {
1682
1689
  let r = null;
1683
- return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && H(r).forEach((i) => {
1690
+ return h.Function(t) ? r = t() : Array.isArray(t) ? r = t.map((i) => Xe(i, e)) : r = t, r && e && G(r).forEach((i) => {
1684
1691
  (Array.isArray(i) ? i : [i]).forEach((n) => {
1685
1692
  n && typeof n == "object" && (n.data || (n.data = {}), (!n.data.slot || n.data.slot === "default") && (n.data.slot = e || "default"));
1686
1693
  });
@@ -1734,15 +1741,15 @@ function Te() {
1734
1741
  function Fe(t, e) {
1735
1742
  return Object.setPrototypeOf(t, e), t;
1736
1743
  }
1737
- const ft = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ae = {
1738
- "==": (t, e) => JSON.stringify(t) === JSON.stringify(ft(t, e)),
1744
+ const ht = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? Number(e) : e, ae = {
1745
+ "==": (t, e) => JSON.stringify(t) === JSON.stringify(ht(t, e)),
1739
1746
  "!=": (t, e) => !ae["=="](t, e),
1740
1747
  ">": (t, e) => t > e,
1741
1748
  ">=": (t, e) => t >= e,
1742
1749
  "<": (t, e) => t < e,
1743
1750
  "<=": (t, e) => t <= e,
1744
1751
  on(t, e) {
1745
- return t && t.indexOf && t.indexOf(ft(t[0], e)) > -1;
1752
+ return t && t.indexOf && t.indexOf(ht(t[0], e)) > -1;
1746
1753
  },
1747
1754
  notOn(t, e) {
1748
1755
  return !ae.on(t, e);
@@ -1769,7 +1776,7 @@ const ft = (t, e) => typeof t == "string" ? String(e) : typeof t == "number" ? N
1769
1776
  return new RegExp(e, "g").test(t);
1770
1777
  }
1771
1778
  };
1772
- function q(t, e) {
1779
+ function H(t, e) {
1773
1780
  return (Array.isArray(e) ? e : (e || "").split(".")).forEach((r) => {
1774
1781
  t != null && (t = t[r]);
1775
1782
  }), t;
@@ -1782,13 +1789,13 @@ function Jr(t) {
1782
1789
  r[1] && (i[r[1]] = !0);
1783
1790
  return Object.keys(i);
1784
1791
  }
1785
- function ht(t) {
1792
+ function dt(t) {
1786
1793
  let e = t.split("."), r = [], i = "";
1787
1794
  return e.forEach((s, n) => {
1788
1795
  n === 0 ? i = s : i += "." + s, r.push(i);
1789
1796
  }), r.join(" && ");
1790
1797
  }
1791
- function Pt() {
1798
+ function Tt() {
1792
1799
  return {
1793
1800
  props: {},
1794
1801
  on: {},
@@ -1807,7 +1814,7 @@ function I(t, e) {
1807
1814
  };
1808
1815
  }
1809
1816
  function tt(t, e, r, i, s) {
1810
- this._data = _(Pt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
1817
+ this._data = _(Tt(), { type: t, title: e, field: r, value: i, props: s || {} }), this.event = this.on;
1811
1818
  }
1812
1819
  _(tt.prototype, {
1813
1820
  getRule() {
@@ -1818,31 +1825,31 @@ _(tt.prototype, {
1818
1825
  },
1819
1826
  _clone() {
1820
1827
  const t = new this.constructor();
1821
- return t._data = At(this._data), t;
1828
+ return t._data = Vt(this._data), t;
1822
1829
  }
1823
1830
  });
1824
- function Tt(t) {
1831
+ function Bt(t) {
1825
1832
  t.forEach((e) => {
1826
1833
  tt.prototype[e] = function(r) {
1827
1834
  return Z(this._data, { [e]: arguments.length < 2 ? r : { [r]: arguments[1] } }), this;
1828
1835
  };
1829
1836
  });
1830
1837
  }
1831
- Tt(Rt());
1832
- const Bt = I("");
1838
+ Bt(St());
1839
+ const Lt = I("");
1833
1840
  function Wr(t, e, r) {
1834
- let i = Bt("", e);
1841
+ let i = Lt("", e);
1835
1842
  return i._data.type = t, i._data.title = r, i;
1836
1843
  }
1837
- function dt(t, e, r, i) {
1838
- let s = Bt("", r);
1844
+ function pt(t, e, r, i) {
1845
+ let s = Lt("", r);
1839
1846
  return s._data.type = "template", s._data.template = t, s._data.title = i, s._data.vm = e, s;
1840
1847
  }
1841
1848
  function Kr() {
1842
1849
  return {
1843
1850
  create: Wr,
1844
- createTmp: dt,
1845
- template: dt,
1851
+ createTmp: pt,
1852
+ template: pt,
1846
1853
  factory: I
1847
1854
  };
1848
1855
  }
@@ -1850,7 +1857,7 @@ function Xr(t, e, r) {
1850
1857
  const i = `fail to ${t} ${r.status}'`, s = new Error(i);
1851
1858
  return s.status = r.status, s.url = t, s;
1852
1859
  }
1853
- function pt(t) {
1860
+ function mt(t) {
1854
1861
  const e = t.responseText || t.response;
1855
1862
  if (!e)
1856
1863
  return e;
@@ -1860,12 +1867,14 @@ function pt(t) {
1860
1867
  return e;
1861
1868
  }
1862
1869
  }
1863
- function Lt(t) {
1870
+ function Mt(t) {
1864
1871
  if (typeof XMLHttpRequest == "undefined")
1865
1872
  return;
1866
1873
  const e = new XMLHttpRequest();
1867
1874
  let r = t.action || "";
1868
- if (t.query) {
1875
+ if (e.upload && t.onProgress && e.upload.addEventListener("progress", (n) => {
1876
+ n.percent = n.total > 0 ? n.loaded / n.total * 100 : 0, t.onProgress(n);
1877
+ }), t.query) {
1869
1878
  const n = new URLSearchParams(t.query).toString();
1870
1879
  r.includes("?") ? r += `&${n}` : r += `?${n}`;
1871
1880
  }
@@ -1873,25 +1882,25 @@ function Lt(t) {
1873
1882
  t.onError(o);
1874
1883
  }, e.onload = function() {
1875
1884
  if (e.status < 200 || e.status >= 300)
1876
- return t.onError(Xr(r, t, e), pt(e));
1877
- t.onSuccess(pt(e));
1885
+ return t.onError(Xr(r, t, e), mt(e));
1886
+ t.onSuccess(mt(e));
1878
1887
  }, e.open(t.method || "get", r, !0);
1879
1888
  let i;
1880
- t.data && ((t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data).map((n) => {
1889
+ (t.data || t.file) && (t.file || (t.dataType || "").toLowerCase() !== "json" ? (i = new FormData(), Object.keys(t.data || {}).map((n) => {
1881
1890
  i.append(n, t.data[n]);
1882
- })) : (i = JSON.stringify(t.data), e.setRequestHeader("content-type", "application/json"))), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0);
1891
+ })) : (i = JSON.stringify(t.data || {}), e.setRequestHeader("content-type", "application/json"))), t.file && i.append(t.filename, t.file, t.file.name), t.withCredentials && "withCredentials" in e && (e.withCredentials = !0);
1883
1892
  const s = t.headers || {};
1884
1893
  Object.keys(s).forEach((n) => {
1885
1894
  s[n] != null && e.setRequestHeader(n, s[n]);
1886
1895
  }), e.send(i);
1887
1896
  }
1888
- function mt(t, e, r) {
1897
+ function gt(t, e, r) {
1889
1898
  return new Promise((i, s) => {
1890
- (e || Lt)(N(b({}, t), {
1899
+ (e || Mt)(q(b({}, t), {
1891
1900
  onSuccess(n) {
1892
1901
  let o = (l) => l;
1893
1902
  const a = K(t.parse);
1894
- h.Function(a) ? o = a : a && h.String(a) && (o = (l) => q(l, a)), i(o(n, void 0, r));
1903
+ h.Function(a) ? o = a : a && h.String(a) && (o = (l) => H(l, a)), i(o(n, void 0, r));
1895
1904
  },
1896
1905
  onError(n) {
1897
1906
  s(n);
@@ -2186,18 +2195,22 @@ function zr(t) {
2186
2195
  t.getCtxs(o).forEach((a) => {
2187
2196
  t.$render.clearCache(a), a.rule.value = ge(a.defaultValue);
2188
2197
  });
2189
- }), J(() => {
2190
- s.clearValidateState();
2191
- }), n == null && (h.Function(t.options.onReset) && O(() => t.options.onReset(s)), t.vm.$emit("reset", s));
2198
+ }), T(() => {
2199
+ T(() => {
2200
+ T(() => {
2201
+ s.clearValidateState(n);
2202
+ });
2203
+ });
2204
+ }), n == null && (h.Function(t.options.onReset) && F(() => t.options.onReset(s)), t.vm.$emit("reset", s));
2192
2205
  },
2193
2206
  method(n, o) {
2194
2207
  const a = s.el(n);
2195
2208
  if (!a || !a[o])
2196
- throw new Error(St("err", `${o} 方法不存在`));
2209
+ throw new Error(Dt("err", `${o} 方法不存在`));
2197
2210
  return (...l) => a[o](...l);
2198
2211
  },
2199
2212
  exec(n, o, ...a) {
2200
- return O(() => s.method(n, o)(...a));
2213
+ return F(() => s.method(n, o)(...a));
2201
2214
  },
2202
2215
  toJson(n) {
2203
2216
  return et(s.rule, n);
@@ -2268,7 +2281,7 @@ function zr(t) {
2268
2281
  t.bus.$once("next-tick", n), t.refresh();
2269
2282
  },
2270
2283
  nextRefresh(n) {
2271
- t.nextRefresh(), n && O(n);
2284
+ t.nextRefresh(), n && F(n);
2272
2285
  },
2273
2286
  emit(n, ...o) {
2274
2287
  t.vm.$emit(n, ...o);
@@ -2279,20 +2292,20 @@ function zr(t) {
2279
2292
  bus: t.bus,
2280
2293
  fetch(n) {
2281
2294
  return new Promise((o, a) => {
2282
- n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => mt(n, t.fc.create.fetch, s).then((l) => {
2283
- O(() => n.onSuccess && n.onSuccess(l)), o(l);
2295
+ n = W(n), n = t.loadFetchVar(n), t.beforeFetch(n).then(() => gt(n, t.fc.create.fetch, s).then((l) => {
2296
+ F(() => n.onSuccess && n.onSuccess(l)), o(l);
2284
2297
  }).catch((l) => {
2285
- O(() => n.onError && n.onError(l)), a(l);
2298
+ F(() => n.onError && n.onError(l)), a(l);
2286
2299
  }));
2287
2300
  });
2288
2301
  },
2289
2302
  watchFetch(n, o, a, l) {
2290
2303
  return t.fc.watchLoadData((u, c) => {
2291
2304
  let p = W(n);
2292
- p = t.loadFetchVar(p, u), !(l && l(p, c) === !1) && t.beforeFetch(p).then(() => mt(p, t.fc.create.fetch, s).then((m) => {
2293
- O(() => p.onSuccess && p.onSuccess(m)), o && o(m, c);
2305
+ p = t.loadFetchVar(p, u), !(l && l(p, c) === !1) && t.beforeFetch(p).then(() => gt(p, t.fc.create.fetch, s).then((m) => {
2306
+ F(() => p.onSuccess && p.onSuccess(m)), o && o(m, c);
2294
2307
  }).catch((m) => {
2295
- O(() => p.onError && p.onError(m)), a && a(m);
2308
+ F(() => p.onError && p.onError(m)), a && a(m);
2296
2309
  }));
2297
2310
  }, n.wait == null ? 1e3 : n.wait);
2298
2311
  },
@@ -2354,13 +2367,13 @@ function Qr(t) {
2354
2367
  }
2355
2368
  });
2356
2369
  }
2357
- function G(t) {
2370
+ function J(t) {
2358
2371
  const e = t.replace(/(-[a-z])/g, function(r) {
2359
2372
  return r.replace("-", "").toLocaleUpperCase();
2360
2373
  });
2361
- return Mt(e);
2374
+ return Nt(e);
2362
2375
  }
2363
- function Mt(t) {
2376
+ function Nt(t) {
2364
2377
  return t.replace(t[0], t[0].toLowerCase());
2365
2378
  }
2366
2379
  function Zr(t) {
@@ -2394,7 +2407,7 @@ function Zr(t) {
2394
2407
  mergeGlobal(e) {
2395
2408
  this.$handle.options.global && (this.cacheConfig[e.trueType] || (this.cacheConfig[e.trueType] = he(() => {
2396
2409
  const i = this.$handle.options.global;
2397
- return Z({}, [i["*"], i[e.originType] || i[e.type] || i[e.type] || {}]);
2410
+ return Z({}, [i["*"] || i.default || {}, i[e.originType] || i[e.type] || i[e.type] || {}]);
2398
2411
  })), e.prop = Z({}, [this.cacheConfig[e.trueType].value, e.prop]));
2399
2412
  },
2400
2413
  setOptions(e) {
@@ -2442,10 +2455,18 @@ function Zr(t) {
2442
2455
  model: n.model || {},
2443
2456
  slotValue: l
2444
2457
  };
2445
- l.length && i.slotUpdate && O(() => i.slotUpdate(u));
2446
- let c = {};
2458
+ l.length && i.slotUpdate && F(() => i.slotUpdate(u));
2459
+ let c = [];
2447
2460
  const p = e.loadChildrenPending();
2448
- e.parser.renderChildren ? c = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(p, e));
2461
+ e.parser.renderChildren ? c = e.parser.renderChildren(p, e) : e.parser.loadChildren !== !1 && (c = this.renderChildren(p, e)), Object.keys(n.renderSlots || {}).forEach((v) => {
2462
+ c.push(this.renderRule({
2463
+ type: "template",
2464
+ slot: v
2465
+ }, (() => {
2466
+ const w = this.parseSide(n.renderSlots[v], e);
2467
+ return this.renderRule(w);
2468
+ })()));
2469
+ });
2449
2470
  const m = this.getTypeSlot(e);
2450
2471
  let y;
2451
2472
  return m ? (u.children = c, y = m(u)) : y = a ? e.parser.preview(Ge(c), e) : e.parser.render(Ge(c), e), y = this.renderSides(y, e), !(!e.input && h.Undef(n.native)) && n.native !== !0 && (this.fc.targetFormDriver("updateWrap", e), y = this.$manager.makeWrap(e, y)), e.none && (Array.isArray(y) ? y = y.map((v) => !v || !v.tag ? v : this.none(v)) : y = this.none(y)), o && this.setCache(e, () => this.stable(y), r), y;
@@ -2505,6 +2526,7 @@ function Zr(t) {
2505
2526
  field: e.field,
2506
2527
  rule: e.rule,
2507
2528
  input: e.input,
2529
+ t: (...s) => this.$handle.api.t(...s),
2508
2530
  updateValue: (s) => {
2509
2531
  this.$handle.onUpdateValue(e, s);
2510
2532
  }
@@ -2577,7 +2599,7 @@ function Zr(t) {
2577
2599
  }) : n);
2578
2600
  if (n.__fc__)
2579
2601
  return this.renderSlot(s, n.__fc__, r);
2580
- n.type && J(() => {
2602
+ n.type && T(() => {
2581
2603
  this.$handle.loadChildren(e, r), this.$handle.refresh();
2582
2604
  });
2583
2605
  }
@@ -2585,7 +2607,7 @@ function Zr(t) {
2585
2607
  },
2586
2608
  defaultRender(e, r) {
2587
2609
  const i = e.prop;
2588
- return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[e.type] ? this.vNode[e.type](i, r) : this.vNode[e.originType] ? this.vNode[e.originType](i, r) : this.vNode.make(Mt(i.type), i, r);
2610
+ return i.component ? typeof i.component == "string" ? this.vNode.make(i.component, i, r) : this.vNode.makeComponent(i.component, i, r) : this.vNode[e.type] ? this.vNode[e.type](i, r) : this.vNode[e.originType] ? this.vNode[e.originType](i, r) : this.vNode.make(Nt(i.type), i, r);
2589
2611
  },
2590
2612
  renderRule(e, r, i) {
2591
2613
  if (!e) return;
@@ -2594,9 +2616,9 @@ function Zr(t) {
2594
2616
  if (i)
2595
2617
  s = e.type;
2596
2618
  else if (s = e.is, e.type) {
2597
- s = G(e.type);
2619
+ s = J(e.type);
2598
2620
  const a = this.vNode.aliasMap[s];
2599
- a && (s = G(a));
2621
+ a && (s = J(a));
2600
2622
  }
2601
2623
  if (!s) return;
2602
2624
  const n = Te();
@@ -2617,7 +2639,7 @@ function rt(t) {
2617
2639
  $manager: t.$manager,
2618
2640
  vNode: new t.fc.CreateNode(t.vm),
2619
2641
  id: Yr++
2620
- }), It(this, {
2642
+ }), Pt(this, {
2621
2643
  options() {
2622
2644
  return t.options;
2623
2645
  },
@@ -2721,7 +2743,7 @@ function xr(t) {
2721
2743
  }
2722
2744
  });
2723
2745
  }
2724
- const gt = ["hook:updated", "hook:mounted"];
2746
+ const yt = ["hook:updated", "hook:mounted"];
2725
2747
  function ei(t) {
2726
2748
  _(t.prototype, {
2727
2749
  usePage() {
@@ -2736,9 +2758,9 @@ function ei(t) {
2736
2758
  },
2737
2759
  pageLoad() {
2738
2760
  const e = () => {
2739
- this.pageEnd ? (this.vm.$off(gt, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
2761
+ this.pageEnd ? (this.vm.$off(yt, e), this.bus.$emit("page-end")) : (this.first += this.limit, this.pageEnd = this.rules.length <= this.first, this.loadRule(), this.refresh());
2740
2762
  };
2741
- this.vm.$on(gt, e);
2763
+ this.vm.$on(yt, e);
2742
2764
  }
2743
2765
  });
2744
2766
  }
@@ -2767,8 +2789,8 @@ function ii(t) {
2767
2789
  __fc__: Ke(fe(t), !0)
2768
2790
  });
2769
2791
  }
2770
- function Nt(t, e, r) {
2771
- const i = Se(), s = !!e.field;
2792
+ function qt(t, e, r) {
2793
+ const i = De(), s = !!e.field;
2772
2794
  _(this, {
2773
2795
  id: i,
2774
2796
  ref: i,
@@ -2797,7 +2819,7 @@ function Nt(t, e, r) {
2797
2819
  field: e.field || void 0
2798
2820
  }), this.updateKey(), ii(this), this.update(t, !0);
2799
2821
  }
2800
- _(Nt.prototype, {
2822
+ _(qt.prototype, {
2801
2823
  getParentGroup() {
2802
2824
  let t = this.parent;
2803
2825
  for (; t; ) {
@@ -2830,7 +2852,7 @@ _(Nt.prototype, {
2830
2852
  delete this.pending[e];
2831
2853
  let a = r;
2832
2854
  if (h.Function(r)) {
2833
- let l = O(() => r({
2855
+ let l = F(() => r({
2834
2856
  rule: this.rule,
2835
2857
  api: this.$api,
2836
2858
  update: (u) => {
@@ -2867,17 +2889,18 @@ _(Nt.prototype, {
2867
2889
  t === void 0 ? this.payload = {} : delete this.payload[t];
2868
2890
  },
2869
2891
  updateKey(t) {
2870
- this.key = Se(), t && this.parent && this.parent.updateKey(t);
2892
+ this.key = De(), t && this.parent && this.parent.updateKey(t);
2871
2893
  },
2872
2894
  updateType() {
2873
- this.originType = this.rule.type, this.type = G(this.rule.type), this.trueType = this.$handle.getType(this.originType);
2895
+ this.originType = this.rule.type, this.type = J(this.rule.type), this.trueType = this.$handle.getType(this.originType);
2874
2896
  },
2875
2897
  setParser(t) {
2876
2898
  this.parser = t, t.init(this);
2877
2899
  },
2878
2900
  initProp() {
2901
+ var e, r;
2879
2902
  const t = b({}, this.rule);
2880
- delete t.children, delete t.validate, this.prop = Z({}, [t, ...Object.keys(this.payload).map((e) => this.payload[e]), this.computed]), this.prop.validate = [...this.refRule.__$validate.value || [], ...this.prop.validate || []];
2903
+ delete t.children, delete t.validate, this.prop = Z({}, [t, ...Object.keys(this.payload).map((i) => this.payload[i]), this.computed]), this.prop.validate = [...((r = (e = this.refRule) == null ? void 0 : e.__$validate) == null ? void 0 : r.value) || [], ...this.prop.validate || []];
2881
2904
  },
2882
2905
  initNone() {
2883
2906
  this.none = !(h.Undef(this.prop.display) || this.prop.display);
@@ -2947,12 +2970,12 @@ function ni(t) {
2947
2970
  _(t.prototype, {
2948
2971
  nextRefresh(e) {
2949
2972
  const r = this.loadedId;
2950
- J(() => {
2973
+ T(() => {
2951
2974
  r === this.loadedId && (e ? e() : this.refresh());
2952
2975
  });
2953
2976
  },
2954
2977
  parseRule(e) {
2955
- const r = ct(e);
2978
+ const r = ft(e);
2956
2979
  return Object.defineProperties(r, {
2957
2980
  __origin__: Ke(e, !0)
2958
2981
  }), si(r), this.appendValue(r), [r, r.prefix, r.suffix].forEach((i) => {
@@ -3002,26 +3025,26 @@ function ni(t) {
3002
3025
  if (r && !h.Object(o) || !this.pageEnd && !r && a >= this.first) return;
3003
3026
  if (o.__fc__ && o.__fc__.root === e && this.ctxs[o.__fc__.id])
3004
3027
  return s(o.__fc__.loadChildrenPending(), o.__fc__), o.__fc__;
3005
- let l = ct(o);
3028
+ let l = ft(o);
3006
3029
  const u = () => !!(l.field && this.fieldCtx[l.field] && this.fieldCtx[l.field][0] !== o.__fc__);
3007
3030
  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);
3008
3031
  let c, p = !1, m = !!o.__fc__, y = l.value;
3009
3032
  if (m) {
3010
3033
  if (c = o.__fc__, y = c.defaultValue, c.deleted) {
3011
- if (yt(c))
3034
+ if ($t(c))
3012
3035
  return;
3013
3036
  c.update(this);
3014
3037
  } else if (!c.check(this)) {
3015
- if (yt(c))
3038
+ if ($t(c))
3016
3039
  return;
3017
- e[a] = o = o._clone ? o._clone() : jt(et(o)), c = null, p = !0;
3040
+ e[a] = o = o._clone ? o._clone() : At(et(o)), c = null, p = !0;
3018
3041
  }
3019
3042
  }
3020
3043
  if (c)
3021
3044
  c.originType !== c.rule.type && c.updateType(), this.bindParser(c), this.appendValue(c.rule), c.parent && c.parent !== r && this.rmSubRuleData(c);
3022
3045
  else {
3023
3046
  const D = this.parseRule(o);
3024
- c = new Nt(this, D, y), this.bindParser(c);
3047
+ c = new qt(this, D, y), this.bindParser(c);
3025
3048
  }
3026
3049
  [!1, !0].forEach((D) => this.parseEmit(c, D)), 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");
3027
3050
  const v = c.loadChildrenPending();
@@ -3047,8 +3070,8 @@ function ni(t) {
3047
3070
  return (ae[l.condition || "=="] || ae["=="])(p, l.value);
3048
3071
  };
3049
3072
  if (!h.trueArray(l.rule)) continue;
3050
- const c = N(b({}, l), {
3051
- valid: O(() => u(e.rule.value, s)),
3073
+ const c = q(b({}, l), {
3074
+ valid: F(() => u(e.rule.value, s)),
3052
3075
  ctrl: ai(e, l.rule),
3053
3076
  isHidden: h.String(l.rule[0])
3054
3077
  });
@@ -3090,7 +3113,7 @@ function ni(t) {
3090
3113
  });
3091
3114
  }), n.length && (this.loading ? n.length && this.bus.$once("load-end", () => {
3092
3115
  n.forEach((a) => a());
3093
- }) : n.length && J(() => {
3116
+ }) : n.length && T(() => {
3094
3117
  n.forEach((a) => a());
3095
3118
  })), this.vm.$emit("control", e.origin, this.api), this.effect(e, "control"), o;
3096
3119
  },
@@ -3113,7 +3136,7 @@ function ni(t) {
3113
3136
  });
3114
3137
  }
3115
3138
  function si(t) {
3116
- const e = Pt();
3139
+ const e = Tt();
3117
3140
  return Object.keys(e).forEach((r) => {
3118
3141
  E(t, r) || k(t, r, e[r]);
3119
3142
  }), t;
@@ -3129,7 +3152,7 @@ function ai(t, e) {
3129
3152
  return i;
3130
3153
  }
3131
3154
  }
3132
- function yt(t) {
3155
+ function $t(t) {
3133
3156
  return !!t.rule.__ctrl;
3134
3157
  }
3135
3158
  function li(t) {
@@ -3139,6 +3162,12 @@ function li(t) {
3139
3162
  rule: e.origin,
3140
3163
  api: this.api,
3141
3164
  setFlag: s || !1
3165
+ }), s && T(() => {
3166
+ T(() => {
3167
+ T(() => {
3168
+ this.api.clearValidateState(e.id);
3169
+ });
3170
+ });
3142
3171
  }));
3143
3172
  },
3144
3173
  onInput(e, r) {
@@ -3170,9 +3199,9 @@ function li(t) {
3170
3199
  },
3171
3200
  syncForm() {
3172
3201
  const e = {}, r = this.fields(), i = [];
3173
- this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Re(this.appendData, n)), s), e), r.reduce((s, n) => {
3202
+ this.options.appendValue !== !1 && Object.keys(this.appendData).reduce((s, n) => (r.indexOf(n) === -1 && (s[n] = Se(this.appendData, n)), s), e), r.reduce((s, n) => {
3174
3203
  const o = (this.fieldCtx[n] || []).filter((a) => !this.isIgnore(a.rule))[0] || this.fieldCtx[n][0];
3175
- return this.isIgnore(o.rule) && i.push(n), s[n] = Re(o.rule, "value"), s;
3204
+ return this.isIgnore(o.rule) && i.push(n), s[n] = Se(o.rule, "value"), s;
3176
3205
  }, e), this.form = ee(e), this.ignoreFields = i, this.syncValue();
3177
3206
  },
3178
3207
  isIgnore(e) {
@@ -3185,7 +3214,7 @@ function li(t) {
3185
3214
  this.subForm[e.id] = r;
3186
3215
  },
3187
3216
  deferSyncValue(e, r) {
3188
- this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), O(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
3217
+ this.deferSyncFn || (this.deferSyncFn = e), this.deferSyncFn.sync || (this.deferSyncFn.sync = r), F(e), this.deferSyncFn === e && (this.deferSyncFn = null, e.sync && this.syncForm());
3189
3218
  },
3190
3219
  syncValue() {
3191
3220
  if (this.deferSyncFn)
@@ -3196,14 +3225,14 @@ function li(t) {
3196
3225
  }), this.vm.updateValue(e);
3197
3226
  },
3198
3227
  isChange(e, r) {
3199
- return JSON.stringify(this.getFormData(e), $t) !== JSON.stringify(r, $t);
3228
+ return JSON.stringify(this.getFormData(e), vt) !== JSON.stringify(r, vt);
3200
3229
  },
3201
3230
  isQuote(e, r) {
3202
3231
  return (h.Object(r) || Array.isArray(r)) && r === e.rule.value;
3203
3232
  },
3204
3233
  refreshUpdate(e, r, i, s) {
3205
3234
  if (h.Function(e.rule.update)) {
3206
- const n = O(() => e.rule.update(r, e.origin, this.api, {
3235
+ const n = F(() => e.rule.update(r, e.origin, this.api, {
3207
3236
  origin: i || "change",
3208
3237
  linkField: s
3209
3238
  }));
@@ -3229,10 +3258,10 @@ function li(t) {
3229
3258
  }
3230
3259
  });
3231
3260
  }
3232
- function $t(t, e) {
3261
+ function vt(t, e) {
3233
3262
  return typeof e == "function" ? "" + e : e;
3234
3263
  }
3235
- const Ee = {
3264
+ const Re = {
3236
3265
  init(t) {
3237
3266
  },
3238
3267
  toFormValue(t, e) {
@@ -3283,35 +3312,35 @@ function ci(t) {
3283
3312
  getParser(e) {
3284
3313
  const r = this.fc.parsers, i = this.fc.renderDriver;
3285
3314
  if (i) {
3286
- const s = i.parsers || {}, n = s[e.originType] || s[G(e.type)] || s[e.trueType];
3315
+ const s = i.parsers || {}, n = s[e.originType] || s[J(e.type)] || s[e.trueType];
3287
3316
  if (n)
3288
3317
  return n;
3289
3318
  }
3290
- return r[e.originType] || r[G(e.type)] || r[e.trueType] || Ee;
3319
+ return r[e.originType] || r[J(e.type)] || r[e.trueType] || Re;
3291
3320
  },
3292
3321
  bindParser(e) {
3293
3322
  e.setParser(this.getParser(e));
3294
3323
  },
3295
3324
  getType(e) {
3296
- const r = this.fc.CreateNode.aliasMap, i = r[e] || r[G(e)] || e;
3297
- return G(i);
3325
+ const r = this.fc.CreateNode.aliasMap, i = r[e] || r[J(e)] || e;
3326
+ return J(i);
3298
3327
  },
3299
3328
  noWatch(e) {
3300
- this.noWatchFn || (this.noWatchFn = e), O(e), this.noWatchFn === e && (this.noWatchFn = null);
3329
+ this.noWatchFn || (this.noWatchFn = e), F(e), this.noWatchFn === e && (this.noWatchFn = null);
3301
3330
  },
3302
3331
  watchCtx(e) {
3303
- if (Rt().filter((i) => i[0] !== "_" && i[0] !== "$" && ui.indexOf(i) === -1).forEach((i) => {
3304
- const s = Re(e.rule, i), n = i === "children";
3305
- e.refRule[i] = s, e.watch.push(B(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3332
+ if (St().filter((i) => i[0] !== "_" && i[0] !== "$" && ui.indexOf(i) === -1).forEach((i) => {
3333
+ const s = Se(e.rule, i), n = i === "children";
3334
+ e.refRule[i] = s, e.watch.push(L(n ? () => h.Function(s.value) ? s.value : [...s.value || []] : () => s.value, (o, a) => {
3306
3335
  let l = s.value;
3307
3336
  if (!this.isBreakWatch()) {
3308
3337
  if (n && e.parser.loadChildren === !1) {
3309
3338
  this.$render.clearCache(e), this.nextRefresh();
3310
3339
  return;
3311
3340
  }
3312
- if (this.watching = !0, J(() => {
3341
+ if (this.watching = !0, T(() => {
3313
3342
  this.targetHook(e, "watch", { key: i, oldValue: a, newValue: l });
3314
- }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), J(() => {
3343
+ }), i === "hidden" && !!l != !!a && (this.$render.clearCacheAll(), T(() => {
3315
3344
  this.targetHook(e, "hidden", { value: l });
3316
3345
  })), i === "ignore" && e.input || i === "hidden" && e.input && (e.rule.ignore === "hidden" || this.options.ignoreHiddenFields))
3317
3346
  this.syncForm();
@@ -3336,7 +3365,7 @@ function ci(t) {
3336
3365
  s && (i = this.api.t(s[1]));
3337
3366
  }
3338
3367
  return i;
3339
- }), e.refRule.__$validate = he(() => H(e.rule.validate).map((i) => {
3368
+ }), e.refRule.__$validate = he(() => G(e.rule.validate).map((i) => {
3340
3369
  const s = b({}, i);
3341
3370
  if (s.message) {
3342
3371
  const n = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
@@ -3356,8 +3385,8 @@ function ci(t) {
3356
3385
  }
3357
3386
  return s;
3358
3387
  })), e.input) {
3359
- const i = Re(e.rule, "value");
3360
- e.watch.push(B(() => i.value, () => {
3388
+ const i = Se(e.rule, "value");
3389
+ e.watch.push(L(() => i.value, () => {
3361
3390
  let s = e.parser.toFormValue(i.value, e);
3362
3391
  this.isChange(e, s) && this.setValue(e, i.value, s, !0);
3363
3392
  }));
@@ -3374,7 +3403,7 @@ function ci(t) {
3374
3403
  }), a = (l) => {
3375
3404
  s === "value" ? this.onInput(e, l) : s[0] === "$" ? this.api.setEffect(e.id, s, l) : te(e.rule, s, l);
3376
3405
  };
3377
- (s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== q(e.rule, s)) && a(o.value), e.watch.push(B(o, (l) => {
3406
+ (s === "value" ? [void 0, null, ""].indexOf(e.rule.value) > -1 : o.value !== H(e.rule, s)) && a(o.value), e.watch.push(L(o, (l) => {
3378
3407
  n = l, setTimeout(() => {
3379
3408
  a(l);
3380
3409
  });
@@ -3396,25 +3425,25 @@ function ci(t) {
3396
3425
  if (p.variable)
3397
3426
  y = JSON.stringify(this.fc.getLoadData(p.variable) || "");
3398
3427
  else if (p.field)
3399
- y = ht(p.field || "");
3428
+ y = dt(p.field || "");
3400
3429
  else
3401
3430
  return !0;
3402
3431
  let v = p.compare;
3403
- if (v && (v = ht(v || "")), p.mode ? m = n(p) : ae[p.condition] ? h.Function(p.handler) ? m = O(() => p.handler(this.api, e.rule)) : m = new Function("$condition", "$val", "$form", "$group", "$rule", `with($form){with(this){with($group){ return $condition['${p.condition}'](${y}, ${v || "$val"}); }}}`).call(this.api.form, ae, p.value, this.api.top.form, s ? this.subRuleData[s.id] || {} : {}, e.rule) : m = !1, l && m)
3432
+ if (v && (v = dt(v || "")), p.mode ? m = n(p) : ae[p.condition] ? h.Function(p.handler) ? m = F(() => p.handler(this.api, e.rule)) : m = new Function("$condition", "$val", "$form", "$group", "$rule", `with($form){with(this){with($group){ return $condition['${p.condition}'](${y}, ${v || "$val"}); }}}`).call(this.api.form, ae, p.value, this.api.top.form, s ? this.subRuleData[s.id] || {} : {}, e.rule) : m = !1, l && m)
3404
3433
  return !0;
3405
3434
  l || (u = u && m);
3406
3435
  }
3407
3436
  return l ? !1 : u;
3408
3437
  };
3409
3438
  let o = n(r);
3410
- return o = r.invert === !0 ? !o : o, r.linkage ? o ? O(() => this.computeValue(r.linkage, e, s), void 0) : void 0 : o;
3439
+ return o = r.invert === !0 ? !o : o, r.linkage ? o ? F(() => this.computeValue(r.linkage, e, s), void 0) : void 0 : o;
3411
3440
  } else if (h.Function(r))
3412
3441
  i = () => r(this.api.form, this.api);
3413
3442
  else {
3414
3443
  const s = e.getParentGroup();
3415
3444
  i = () => this.computeValue(r, e, s);
3416
3445
  }
3417
- return O(i, void 0);
3446
+ return F(i, void 0);
3418
3447
  },
3419
3448
  computeValue(e, r, i) {
3420
3449
  const s = this, n = Object.keys(this.fc.formulas).reduce((o, a) => (o[a] = function(...l) {
@@ -3470,10 +3499,10 @@ function fi(t) {
3470
3499
  this.fc.targetFormDriver(e, this.api, this.fc), this.vm.$emit(e, this.api), this.emitEvent(e, this.api);
3471
3500
  },
3472
3501
  emitEvent(e, ...r) {
3473
- const i = this.options[e] || this.options[G("on-" + e)];
3502
+ const i = this.options[e] || this.options[J("on-" + e)];
3474
3503
  if (i) {
3475
3504
  const s = K(i);
3476
- h.Function(s) && O(() => s(...r));
3505
+ h.Function(s) && F(() => s(...r));
3477
3506
  }
3478
3507
  this.bus.$emit(e, ...r);
3479
3508
  },
@@ -3481,7 +3510,7 @@ function fi(t) {
3481
3510
  var n, o;
3482
3511
  let s = (o = (n = e.prop) == null ? void 0 : n.hook) == null ? void 0 : o[r];
3483
3512
  s && (s = Array.isArray(s) ? s : [s], s.forEach((a) => {
3484
- O(() => a(N(b({}, i || {}), { rule: e.rule, api: this.api })));
3513
+ F(() => a(q(b({}, i || {}), { rule: e.rule, api: this.api })));
3485
3514
  }));
3486
3515
  }
3487
3516
  });
@@ -3516,7 +3545,7 @@ function hi(t) {
3516
3545
  }), Object.keys(e.rule).forEach((i) => {
3517
3546
  i[0] === "$" && (r[i.substr(1)] = () => e.rule[i]);
3518
3547
  }), Object.keys(r).forEach((i) => {
3519
- e.watch.push(B(r[i], (s) => {
3548
+ e.watch.push(L(r[i], (s) => {
3520
3549
  this.effect(e, "watch", { [i]: s });
3521
3550
  }, { deep: !0 }));
3522
3551
  });
@@ -3575,7 +3604,7 @@ function pi(t) {
3575
3604
  } else return h.String(e) ? [e] : !1;
3576
3605
  }
3577
3606
  function X(t) {
3578
- It(this, {
3607
+ Pt(this, {
3579
3608
  options() {
3580
3609
  return t.options.value || {};
3581
3610
  },
@@ -3610,7 +3639,7 @@ function X(t) {
3610
3639
  this.lifecycle("reload");
3611
3640
  }
3612
3641
  }), this.initData(t.rules), this.$manager = new t.manager(this), this.$render = new rt(this), this.api = t.extendApiFn.reduce((e, r) => {
3613
- const i = O(() => r(e, this));
3642
+ const i = F(() => r(e, this));
3614
3643
  return i && i !== e && _(e, i), e;
3615
3644
  }, zr(this));
3616
3645
  }
@@ -3635,7 +3664,7 @@ _(X.prototype, {
3635
3664
  },
3636
3665
  beforeFetch(t) {
3637
3666
  return new Promise((e) => {
3638
- const r = this.options.beforeFetch && O(() => this.options.beforeFetch(t, { api: this.api }));
3667
+ const r = this.options.beforeFetch && F(() => this.options.beforeFetch(t, { api: this.api }));
3639
3668
  r && h.Function(r.then) ? r.then(e) : e();
3640
3669
  });
3641
3670
  }
@@ -3673,7 +3702,14 @@ function yi() {
3673
3702
  return (de.isReservedTag ? de.isReservedTag(r) : (o = (n = de) == null ? void 0 : n.config) != null && o.isReservedTag(r)) && (i == null || delete i.nativeOn, (a = i == null ? void 0 : i.props) == null || delete a.formCreateInject), this.makeComponent(r, i, s);
3674
3703
  },
3675
3704
  makeComponent(r, i, s) {
3705
+ var o;
3676
3706
  let n = this.$h(r, gi(i), s || []);
3707
+ if ((o = n == null ? void 0 : n.componentOptions) != null && o.propsData && (i != null && i.props)) {
3708
+ const a = Object.keys(n.componentOptions.propsData);
3709
+ n.data.attrs || (n.data.attrs = {}), Object.keys(i.props).forEach((l) => {
3710
+ n.data.attrs[l] == null && a.indexOf(l) === -1 && ["string", "number", "boolean"].indexOf(typeof i.props[l]) > -1 && (n.data.attrs[l] = i.props[l]);
3711
+ });
3712
+ }
3677
3713
  return n.context = this.vm, n;
3678
3714
  },
3679
3715
  aliasMap: t
@@ -3684,7 +3720,7 @@ function yi() {
3684
3720
  },
3685
3721
  use(r) {
3686
3722
  Object.keys(r).forEach((i) => {
3687
- const s = ye(i), n = Dt(i).toLocaleLowerCase(), o = r[i];
3723
+ const s = ye(i), n = jt(i).toLocaleLowerCase(), o = r[i];
3688
3724
  [i, s, n].forEach((a) => {
3689
3725
  e.alias(i, o), e.prototype[a] = function(l, u) {
3690
3726
  return this.make(o, l, u);
@@ -3715,7 +3751,7 @@ _(Ut.prototype, {
3715
3751
  this.$render = this.$handle.$render, this.$r = (...t) => this.$render.renderRule(...t);
3716
3752
  },
3717
3753
  updateKey() {
3718
- this.key = Se();
3754
+ this.key = De();
3719
3755
  },
3720
3756
  //TODO interface
3721
3757
  init() {
@@ -3759,9 +3795,9 @@ const vi = function(t) {
3759
3795
  const e = {
3760
3796
  name: "loadData",
3761
3797
  _fn: [],
3762
- mounted(r, i, s) {
3798
+ loaded(r, i, s) {
3763
3799
  this.deleted(r);
3764
- let n = H(r.getValue());
3800
+ let n = G(r.getValue());
3765
3801
  const o = [];
3766
3802
  n.forEach((a) => {
3767
3803
  if (a && (a.attr || a.template)) {
@@ -3812,7 +3848,7 @@ const vi = function(t) {
3812
3848
  }
3813
3849
  };
3814
3850
  return e.watch = e.loaded, e;
3815
- }, qt = {
3851
+ }, Ht = {
3816
3852
  name: "componentValidate",
3817
3853
  load(t, e, r) {
3818
3854
  let i = t.getValue();
@@ -3821,7 +3857,7 @@ const vi = function(t) {
3821
3857
  else {
3822
3858
  h.Object(i) || (i = { method: i });
3823
3859
  const s = i.method;
3824
- delete i.method, t.getProp().validate = [N(b({}, i), {
3860
+ delete i.method, t.getProp().validate = [q(b({}, i), {
3825
3861
  validator(...n) {
3826
3862
  const o = oe(e);
3827
3863
  if (o)
@@ -3835,7 +3871,7 @@ const vi = function(t) {
3835
3871
  }
3836
3872
  },
3837
3873
  watch(...t) {
3838
- qt.load(...t);
3874
+ Ht.load(...t);
3839
3875
  }
3840
3876
  }, _i = function(t) {
3841
3877
  function e(s) {
@@ -3873,14 +3909,14 @@ const vi = function(t) {
3873
3909
  i._fn[s.id] = t.watchLoadData(le((p, m) => {
3874
3910
  if (m && a.watch === !1)
3875
3911
  return i._fn[s.id]();
3876
- const y = t.$handle.loadFetchVar(W(a), p), v = N(b({
3912
+ const y = t.$handle.loadFetchVar(W(a), p), v = q(b({
3877
3913
  headers: {}
3878
3914
  }, y), {
3879
3915
  onSuccess(w, D) {
3880
3916
  if (c()) return;
3881
- let Y = (L) => D ? L : E(L, "data") ? L.data : L;
3917
+ let Y = (M) => D ? M : E(M, "data") ? M.data : M;
3882
3918
  const P = K(y.parse);
3883
- h.Function(P) ? Y = P : P && h.String(P) && (Y = (L) => q(L, P)), l(Y(w, n, o)), o.sync(n);
3919
+ h.Function(P) ? Y = P : P && h.String(P) && (Y = (M) => H(M, P)), l(Y(w, n, o)), o.sync(n);
3884
3920
  },
3885
3921
  onError(w) {
3886
3922
  l(void 0), !c() && (u || ((D) => xe(D.message || "fetch fail " + y.action)))(w, n, o);
@@ -3895,14 +3931,14 @@ const vi = function(t) {
3895
3931
  });
3896
3932
  return;
3897
3933
  }
3898
- O(() => t.create.fetch(v, { inject: s, rule: n, api: o }));
3934
+ F(() => t.create.fetch(v, { inject: s, rule: n, api: o }));
3899
3935
  });
3900
3936
  }, a.wait || 600));
3901
3937
  }
3902
3938
  const i = {
3903
3939
  name: "fetch",
3904
3940
  _fn: [],
3905
- mounted(...s) {
3941
+ loaded(...s) {
3906
3942
  r(...s);
3907
3943
  },
3908
3944
  watch(...s) {
@@ -3917,7 +3953,7 @@ const vi = function(t) {
3917
3953
  fetch: _i,
3918
3954
  loadData: vi,
3919
3955
  t: bi,
3920
- componentValidate: qt
3956
+ componentValidate: Ht
3921
3957
  };
3922
3958
  function wi(t) {
3923
3959
  t = t || /* @__PURE__ */ new Map();
@@ -3943,8 +3979,8 @@ function wi(t) {
3943
3979
  };
3944
3980
  return e;
3945
3981
  }
3946
- const Fi = "html", Oi = {
3947
- name: Fi,
3982
+ const Oi = "html", Fi = {
3983
+ name: Oi,
3948
3984
  loadChildren: !1,
3949
3985
  render(t, e) {
3950
3986
  return e.prop.domProps || (e.prop.domProps = {}), e.prop.domProps.innerHTML = t, e.vNode.make(e.prop.props.tag || "div", e.prop);
@@ -3981,30 +4017,43 @@ function Ei(t) {
3981
4017
  }
3982
4018
  return null;
3983
4019
  }
3984
- function Ht(t, e) {
4020
+ function Ri(t) {
4021
+ const e = sessionStorage.getItem(t);
4022
+ if (e)
4023
+ try {
4024
+ return JSON.parse(e);
4025
+ } catch (r) {
4026
+ return e;
4027
+ }
4028
+ return null;
4029
+ }
4030
+ function it(t, e) {
3985
4031
  if (!e)
3986
4032
  return null;
3987
4033
  const r = e.split(".");
3988
4034
  let i = t(r.shift());
3989
- return r.length ? i == null ? null : q(i, r) : i;
3990
- }
3991
- function Ri(t) {
3992
- return Ht(ki, t);
4035
+ return r.length ? i == null ? null : H(i, r) : i;
3993
4036
  }
3994
4037
  function Si(t) {
3995
- return Ht(Ei, t);
4038
+ return it(ki, t);
4039
+ }
4040
+ function Di(t) {
4041
+ return it(Ei, t);
4042
+ }
4043
+ function ji(t) {
4044
+ return it(Ri, t);
3996
4045
  }
3997
- function Di(t, e) {
4046
+ function Ai(t, e) {
3998
4047
  let r;
3999
4048
  return arguments.length === 2 ? (r = arguments[1], e = r[t]) : r = arguments[2], { id: e, prop: r };
4000
4049
  }
4001
4050
  function Le() {
4002
- return Di("name", ...arguments);
4051
+ return Ai("name", ...arguments);
4003
4052
  }
4004
- function ji(t) {
4053
+ function Vi(t) {
4005
4054
  return !t || !t.el ? window.document.body : h.Element(t.el) ? t.el : document.querySelector(t.el);
4006
4055
  }
4007
- function Ai(t, e) {
4056
+ function Ii(t, e) {
4008
4057
  const r = new Vue({
4009
4058
  data() {
4010
4059
  return { rule: t, option: e || {} };
@@ -4015,12 +4064,12 @@ function Ai(t, e) {
4015
4064
  });
4016
4065
  return r.$mount(), r;
4017
4066
  }
4018
- function Vi(t) {
4067
+ function Pi(t) {
4019
4068
  const e = t.key || [], r = t.array || [], i = t.normal || [];
4020
- Et.push(...e), Ze.push(...r), Ye.push(...i), Tt([...e, ...r, ...i]);
4069
+ Rt.push(...e), Ze.push(...r), Ye.push(...i), Bt([...e, ...r, ...i]);
4021
4070
  }
4022
- let Ii = 1;
4023
- const U = {}, Oe = Symbol("defValue");
4071
+ let Ti = 1;
4072
+ const U = {}, ke = Symbol("defValue");
4024
4073
  function Gt(t) {
4025
4074
  const e = {
4026
4075
  [Be.name]: Be
@@ -4029,7 +4078,7 @@ function Gt(t) {
4029
4078
  ], u = b({}, Ci), c = Kr();
4030
4079
  let p = { global: {} };
4031
4080
  const m = ee({}), y = yi(), v = {}, w = t.isMobile === !0, D = {};
4032
- Vi(t.attrs || {});
4081
+ Pi(t.attrs || {});
4033
4082
  function Y(f) {
4034
4083
  const d = U[f];
4035
4084
  if (Array.isArray(d))
@@ -4040,37 +4089,37 @@ function Gt(t) {
4040
4089
  function P(f) {
4041
4090
  o.push(f);
4042
4091
  }
4043
- function L() {
4092
+ function M() {
4044
4093
  const f = Le(...arguments);
4045
4094
  f.id && f.prop && (i[f.id] = f.prop);
4046
4095
  }
4047
- function De() {
4096
+ function je() {
4048
4097
  const f = Le(...arguments);
4049
- f.id && f.prop && (u[f.id] = h.Function(f.prop) ? f.prop : N(b({}, f.prop), {
4098
+ f.id && f.prop && (u[f.id] = h.Function(f.prop) ? f.prop : q(b({}, f.prop), {
4050
4099
  name: f.id
4051
4100
  }));
4052
4101
  }
4053
4102
  function ve(f) {
4054
4103
  y.use(f);
4055
4104
  }
4056
- function F() {
4105
+ function O() {
4057
4106
  const f = Le(...arguments);
4058
- if (!f.id || !f.prop) return Ee;
4059
- const d = G(f.id), g = f.prop, $ = g.merge === !0 ? r[d] : void 0;
4060
- r[d] = Fe(g, $ || Ee), c[d] = I(d), g.maker && _(c, g.maker);
4107
+ if (!f.id || !f.prop) return Re;
4108
+ const d = J(f.id), g = f.prop, $ = g.merge === !0 ? r[d] : void 0;
4109
+ r[d] = Fe(g, $ || Re), c[d] = I(d), g.maker && _(c, g.maker);
4061
4110
  }
4062
4111
  function S(f, d) {
4063
4112
  let g;
4064
4113
  if (h.String(f)) {
4065
4114
  if (g = f, d === void 0)
4066
- return ["form-create", "formcreate"].indexOf(g) > -1 ? T() : e[g];
4115
+ return ["form-create", "formcreate"].indexOf(g) > -1 ? B() : e[g];
4067
4116
  } else
4068
- g = G(f.name), d = f;
4117
+ g = J(f.name), d = f;
4069
4118
  if (!g || !d) return;
4070
- const $ = G(g);
4071
- e[g] = d, e[$] = d, delete y.aliasMap[g], delete y.aliasMap[$], delete r[g], delete r[$], d.formCreateParser && F(g, d.formCreateParser);
4119
+ const $ = J(g);
4120
+ e[g] = d, e[$] = d, delete y.aliasMap[g], delete y.aliasMap[$], delete r[g], delete r[$], d.formCreateParser && O(g, d.formCreateParser);
4072
4121
  }
4073
- function T() {
4122
+ function B() {
4074
4123
  return Mr(Ve, e, i);
4075
4124
  }
4076
4125
  function re() {
@@ -4080,9 +4129,9 @@ function Gt(t) {
4080
4129
  return h.Function(f.install) ? f.install(ie, d) : h.Function(f) && f(ie, d), this;
4081
4130
  }
4082
4131
  function ie(f, d, g) {
4083
- let $ = Ai(f, d || {});
4132
+ let $ = Ii(f, d || {});
4084
4133
  const C = $.$refs.fc.formCreate;
4085
- return C.$parent = g, ji(C.options).appendChild($.$el), C.api();
4134
+ return C.$parent = g, Vi(C.options).appendChild($.$el), C.api();
4086
4135
  }
4087
4136
  Fe(ie, D);
4088
4137
  function Wt(f) {
@@ -4108,8 +4157,8 @@ function Gt(t) {
4108
4157
  function zt(f, d) {
4109
4158
  const g = n[f] || {}, $ = g.parsers || {};
4110
4159
  d.parsers && Object.keys(d.parsers).forEach((C) => {
4111
- $[C] = Fe(d.parsers[C], Ee);
4112
- }), d.name = f, n[f] = N(b(b({}, g), d), { parsers: $ });
4160
+ $[C] = Fe(d.parsers[C], Re);
4161
+ }), d.name = f, n[f] = q(b(b({}, g), d), { parsers: $ });
4113
4162
  }
4114
4163
  function _e(f) {
4115
4164
  f && Object.keys(U).forEach((d) => {
@@ -4118,20 +4167,20 @@ function Gt(t) {
4118
4167
  });
4119
4168
  });
4120
4169
  }
4121
- function je(f, d) {
4170
+ function Ae(f, d) {
4122
4171
  te(m, f, d), _e(f);
4123
4172
  }
4124
- function Ae(f, d) {
4125
- const g = (...$) => O(() => d(...$));
4126
- g._driver = !0, je(f, g);
4173
+ function Ce(f, d) {
4174
+ const g = (...$) => F(() => d(...$));
4175
+ g._driver = !0, Ae(f, g);
4127
4176
  }
4128
- function it(f, d) {
4177
+ function nt(f, d) {
4129
4178
  const g = (f || "").split(".");
4130
4179
  f = g.shift();
4131
4180
  const $ = g.join(".");
4132
- if (E(m, f) || k(m, f, Oe), m[f] !== Oe) {
4181
+ if (E(m, f) || k(m, f, ke), m[f] !== ke) {
4133
4182
  let C = m[f];
4134
- return C && C._driver ? C = C($) : g.length && (C = q(C, g)), C == null || C === "" ? d : C;
4183
+ return C && C._driver ? C = C($) : g.length && (C = H(C, g)), C == null || C === "" ? d : C;
4135
4184
  } else
4136
4185
  return d;
4137
4186
  }
@@ -4146,7 +4195,7 @@ function Gt(t) {
4146
4195
  }
4147
4196
  function Ve(f) {
4148
4197
  _(this, {
4149
- id: Ii++,
4198
+ id: Ti++,
4150
4199
  create: ie,
4151
4200
  vm: f,
4152
4201
  manager: $i(t.manager),
@@ -4156,7 +4205,7 @@ function Gt(t) {
4156
4205
  formulas: v,
4157
4206
  isMobile: w,
4158
4207
  rules: f.$options.propsData.rule,
4159
- name: f.$options.propsData.name || Se(),
4208
+ name: f.$options.propsData.name || De(),
4160
4209
  inFor: f.$options.propsData.inFor,
4161
4210
  prop: {
4162
4211
  components: e,
@@ -4176,21 +4225,21 @@ function Gt(t) {
4176
4225
  tmpData: ee({})
4177
4226
  }), a.forEach((d) => {
4178
4227
  this.bus.$on(d.name, d.callback);
4179
- }), J(() => {
4180
- B(this.options, () => {
4228
+ }), T(() => {
4229
+ L(this.options, () => {
4181
4230
  this.$handle.$manager.updateOptions(this.options.value), this.api().refresh();
4182
4231
  }, { deep: !0 });
4183
4232
  }), _(f.$options.components, e), _(f.$options.directives, i), this.$handle = new X(this), this.name && (this.inFor ? (U[this.name] || (U[this.name] = []), U[this.name].push(this)) : U[this.name] = this);
4184
4233
  }
4185
4234
  Ve.isMobile = w, _(Ve.prototype, {
4186
4235
  init() {
4187
- this.isSub() && this.unwatch.push(B(() => this.vm.parent.fc.options.value, () => {
4236
+ this.isSub() && this.unwatch.push(L(() => this.vm.parent.fc.options.value, () => {
4188
4237
  this.initOptions(), this.$handle.api.refresh();
4189
4238
  }, { 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();
4190
4239
  },
4191
4240
  targetFormDriver(f, ...d) {
4192
4241
  if (this.renderDriver && this.renderDriver[f])
4193
- return O(() => this.renderDriver[f](...d));
4242
+ return F(() => this.renderDriver[f](...d));
4194
4243
  },
4195
4244
  t(f, d, g) {
4196
4245
  let $ = g ? g("$t." + f) : this.globalLanguageDriver(f);
@@ -4204,33 +4253,33 @@ function Gt(t) {
4204
4253
  const g = d.shift(), $ = this.options.value.globalData && this.options.value.globalData[g];
4205
4254
  if ($) {
4206
4255
  if ($.type === "static")
4207
- return q($.data, d);
4256
+ return H($.data, d);
4208
4257
  {
4209
4258
  let C;
4210
4259
  const R = this.fetchCache.get($);
4211
4260
  if (R) {
4212
- if (R.status && (C = q(R.data, d)), !R.loading)
4261
+ if (R.status && (C = H(R.data, d)), !R.loading)
4213
4262
  return C;
4214
4263
  R.loading = !1, this.fetchCache.set($, R);
4215
4264
  } else
4216
4265
  this.fetchCache.set($, { status: !1 });
4217
4266
  const A = le(() => {
4218
4267
  ce();
4219
- const M = this.fetchCache.get($);
4220
- this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (M && (M.loading = !0, this.fetchCache.set($, M)), this.bus.$emit("$loadData.$globalData." + g)) : this.fetchCache.delete($);
4221
- }, $.wait || 600), pe = (M) => {
4222
- this.fetchCache.set($, { status: !0, data: M }), this.bus.$emit("$loadData.$globalData." + g);
4223
- }, me = (M, ne) => {
4268
+ const N = this.fetchCache.get($);
4269
+ this.options.value.globalData && Object.values(this.options.value.globalData).indexOf($) !== -1 ? (N && (N.loading = !0, this.fetchCache.set($, N)), this.bus.$emit("$loadData.$globalData." + g)) : this.fetchCache.delete($);
4270
+ }, $.wait || 600), pe = (N) => {
4271
+ this.fetchCache.set($, { status: !0, data: N }), this.bus.$emit("$loadData.$globalData." + g);
4272
+ }, me = (N, ne) => {
4224
4273
  if (ne && $.watch === !1)
4225
4274
  return ce();
4226
4275
  if (ne) {
4227
4276
  A();
4228
4277
  return;
4229
4278
  }
4230
- const se = this.$handle.loadFetchVar(Ge($), M);
4231
- this.$handle.api.fetch(se).then((we) => {
4232
- pe(we);
4233
- }).catch((we) => {
4279
+ const se = this.$handle.loadFetchVar(Ge($), N);
4280
+ this.$handle.api.fetch(se).then((Oe) => {
4281
+ pe(Oe);
4282
+ }).catch((Oe) => {
4234
4283
  pe(null);
4235
4284
  });
4236
4285
  }, ce = this.watchLoadData(me);
@@ -4244,9 +4293,9 @@ function Gt(t) {
4244
4293
  },
4245
4294
  globalLanguageDriver(f) {
4246
4295
  let d = this.vm.top.$props.locale, g;
4247
- if (d && typeof d == "object" && (g = q(d, f)), g == null) {
4296
+ if (d && typeof d == "object" && (g = H(d, f)), g == null) {
4248
4297
  const $ = this.options.value.language || {}, C = this.getLocale();
4249
- g = q($[C], f);
4298
+ g = H($[C], f);
4250
4299
  }
4251
4300
  return g;
4252
4301
  },
@@ -4256,11 +4305,11 @@ function Gt(t) {
4256
4305
  if ($) {
4257
4306
  const C = h.Function($) ? $ : K($.handle);
4258
4307
  if (C)
4259
- return q(O(() => C(this.get || ((...R) => this.getLoadData(...R)), this.$handle.api)), d);
4308
+ return H(F(() => C(this.get || ((...R) => this.getLoadData(...R)), this.$handle.api)), d);
4260
4309
  }
4261
4310
  },
4262
4311
  setData(f, d, g) {
4263
- g ? je(f, d) : (te(this.vm.top.fc.tmpData, f, d), this.bus.$emit("$loadData." + f));
4312
+ g ? Ae(f, d) : (te(this.vm.top.fc.tmpData, f, d), this.bus.$emit("$loadData." + f));
4264
4313
  },
4265
4314
  getLoadData(f, d) {
4266
4315
  let g = null;
@@ -4283,32 +4332,32 @@ function Gt(t) {
4283
4332
  g = this.globalLanguageDriver($.join(".")), $ = [];
4284
4333
  else {
4285
4334
  const R = this.vm.top.fc.tmpData;
4286
- E(R, C) || k(R, C, Oe), g = R[C] !== Oe ? q(R, f) : it(f), $ = [];
4335
+ E(R, C) || k(R, C, ke), g = R[C] !== ke ? H(R, f) : nt(f), $ = [];
4287
4336
  }
4288
- g && $.length && (g = q(g, $));
4337
+ g && $.length && (g = H(g, $));
4289
4338
  }
4290
4339
  return g == null || g === "" ? d : g;
4291
4340
  },
4292
4341
  watchLoadData(f, d) {
4293
4342
  let g = {};
4294
4343
  const $ = (A) => {
4295
- this.get || (this.get = C), O(() => {
4344
+ this.get || (this.get = C), F(() => {
4296
4345
  f(C, A);
4297
4346
  }), this.get === C && (this.get = void 0);
4298
4347
  }, C = (A, pe) => {
4299
4348
  if (g[A])
4300
4349
  return g[A].val;
4301
- const me = he(() => this.getLoadData(A, pe)), ce = A.split("."), M = ce.shift(), ne = ce.shift() || "", se = le(() => {
4350
+ const me = he(() => this.getLoadData(A, pe)), ce = A.split("."), N = ce.shift(), ne = ce.shift() || "", se = le(() => {
4302
4351
  const Ie = this.getLoadData(A, pe);
4303
4352
  if (g[A])
4304
4353
  JSON.stringify(Ie) !== JSON.stringify(g[A].val) && (g[A].val = Ie, $(!0));
4305
4354
  else return;
4306
- }, d || 0), we = B(me, (Ie) => {
4355
+ }, d || 0), Oe = L(me, (Ie) => {
4307
4356
  se();
4308
4357
  });
4309
- return this.bus.$on("$loadData." + M, se), ne && this.bus.$on("$loadData." + M + "." + ne, se), g[A] = {
4358
+ return this.bus.$on("$loadData." + N, se), ne && this.bus.$on("$loadData." + N + "." + ne, se), g[A] = {
4310
4359
  fn: () => {
4311
- this.bus.$off("$loadData." + M, se), ne && this.bus.$off("$loadData." + M + "." + ne, se), we();
4360
+ this.bus.$off("$loadData." + N, se), ne && this.bus.$off("$loadData." + N + "." + ne, se), Oe();
4312
4361
  },
4313
4362
  val: me.value
4314
4363
  }, me.value;
@@ -4365,36 +4414,36 @@ function Gt(t) {
4365
4414
  this.$handle.bindNextTick(() => this.bus.$emit("next-tick", this.$handle.api));
4366
4415
  }
4367
4416
  });
4368
- function nt(f) {
4417
+ function st(f) {
4369
4418
  _(f, {
4370
4419
  version: t.version,
4371
4420
  ui: t.ui,
4372
4421
  isMobile: w,
4373
4422
  extendApi: Qt,
4374
- getData: it,
4375
- setDataDriver: Ae,
4376
- setData: je,
4423
+ getData: nt,
4424
+ setDataDriver: Ce,
4425
+ setData: Ae,
4377
4426
  removeData: Zt,
4378
4427
  refreshData: _e,
4379
4428
  maker: c,
4380
4429
  component: S,
4381
- directive: L,
4430
+ directive: M,
4382
4431
  setModelField: Kt,
4383
4432
  setFormula: Xt,
4384
4433
  setDriver: zt,
4385
- register: De,
4434
+ register: je,
4386
4435
  $vnode: re,
4387
- parser: F,
4436
+ parser: O,
4388
4437
  use: be,
4389
4438
  factory: Wt,
4390
4439
  componentAlias: ve,
4391
- copyRule: At,
4392
- copyRules: Vt,
4440
+ copyRule: Vt,
4441
+ copyRules: It,
4393
4442
  mergeRule: Z,
4394
- fetch: Lt,
4395
- $form: T,
4443
+ fetch: Mt,
4444
+ $form: B,
4396
4445
  parseFn: K,
4397
- parseJson: jt,
4446
+ parseJson: At,
4398
4447
  toJson: et,
4399
4448
  useApp: P,
4400
4449
  getApi: Y,
@@ -4410,20 +4459,20 @@ function Gt(t) {
4410
4459
  const $ = function(R, A = {}) {
4411
4460
  return ie(R, A, this);
4412
4461
  };
4413
- nt($), d.prototype.$formCreate = $;
4414
- const C = T();
4462
+ st($), d.prototype.$formCreate = $;
4463
+ const C = B();
4415
4464
  d.component(C.name, C), d.component("FcFragment", re()), o.forEach((R) => {
4416
- O(() => R(f, d));
4465
+ F(() => R(f, d));
4417
4466
  });
4418
4467
  }
4419
4468
  });
4420
4469
  }
4421
- if (nt(D), xt(D), Ae("$cookie", Ri), Ae("$localStorage", Si), y.use({ fragment: "fcFragment" }), t.install && ie.use(t), F(Oi), t.inherit) {
4470
+ if (st(D), xt(D), Ce("$cookie", Si), Ce("$localStorage", Di), Ce("$sessionStorage", ji), y.use({ fragment: "fcFragment" }), t.install && ie.use(t), O(Fi), t.inherit) {
4422
4471
  const f = t.inherit;
4423
4472
  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 && _(m, f.loadData), f.formulas && _(v, f.formulas);
4424
4473
  }
4425
- const Ce = T();
4426
- return Fe(Ce, D), Object.defineProperties(Ce, {
4474
+ const we = B();
4475
+ return Fe(we, D), Object.defineProperties(we, {
4427
4476
  fetch: {
4428
4477
  get() {
4429
4478
  return D.fetch;
@@ -4432,9 +4481,9 @@ function Gt(t) {
4432
4481
  D.fetch = f;
4433
4482
  }
4434
4483
  }
4435
- }), Ce.util = D, Ce;
4484
+ }), we.util = D, we;
4436
4485
  }
4437
- const vt = {
4486
+ const bt = {
4438
4487
  date: "yyyy-MM-dd",
4439
4488
  month: "yyyy-MM",
4440
4489
  datetime: "yyyy-MM-dd HH:mm:ss",
@@ -4443,16 +4492,16 @@ const vt = {
4443
4492
  monthrange: "yyyy-MM",
4444
4493
  datetimerange: "yyyy-MM-dd HH:mm:ss",
4445
4494
  year: "yyyy"
4446
- }, bt = "datePicker", Pi = {
4447
- name: bt,
4495
+ }, _t = "datePicker", Bi = {
4496
+ name: _t,
4448
4497
  maker: function() {
4449
- return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = I(bt, { type: e.toLowerCase() }), t), {});
4498
+ return ["year", "month", "date", "dates", "week", "datetime", "datetimeRange", "dateRange", "monthRange"].reduce((t, e) => (t[e] = I(_t, { type: e.toLowerCase() }), t), {});
4450
4499
  }(),
4451
4500
  mergeProp(t) {
4452
4501
  const e = t.prop.props;
4453
- e.valueFormat || (e.valueFormat = vt[e.type] || vt.date);
4502
+ e.valueFormat || (e.valueFormat = bt[e.type] || bt.date);
4454
4503
  }
4455
- }, Me = "hidden", Ti = {
4504
+ }, Me = "hidden", Li = {
4456
4505
  name: Me,
4457
4506
  maker: {
4458
4507
  [Me]: (t, e) => I(Me)("", t, e)
@@ -4460,7 +4509,7 @@ const vt = {
4460
4509
  render() {
4461
4510
  return [];
4462
4511
  }
4463
- }, Ne = "input", Bi = {
4512
+ }, Ne = "input", Mi = {
4464
4513
  name: Ne,
4465
4514
  maker: function() {
4466
4515
  const t = ["password", "url", "email", "text", "textarea"].reduce((e, r) => (e[r] = I(Ne, { type: r }), e), {});
@@ -4470,46 +4519,46 @@ const vt = {
4470
4519
  let { props: e } = t.prop;
4471
4520
  e && e.autosize && e.autosize.minRows && (e.rows = e.autosize.minRows || 2);
4472
4521
  }
4473
- }, _t = "slider", Li = {
4474
- name: _t,
4522
+ }, Ct = "slider", Ni = {
4523
+ name: Ct,
4475
4524
  maker: {
4476
- sliderRange: I(_t, { range: !0 })
4525
+ sliderRange: I(Ct, { range: !0 })
4477
4526
  },
4478
4527
  toFormValue(t, e) {
4479
4528
  let r = Array.isArray(t), i = e.prop.props, s = i.min || 0, n;
4480
4529
  return i.range === !0 ? n = r ? t : [s, parseFloat(t) || s] : n = r ? parseFloat(t[0]) || s : parseFloat(t), n;
4481
4530
  }
4482
- }, Ue = "timePicker", Mi = {
4483
- name: Ue,
4531
+ }, qe = "timePicker", qi = {
4532
+ name: qe,
4484
4533
  maker: {
4485
- time: I(Ue, (t) => t.props.isRange = !1),
4486
- timeRange: I(Ue, (t) => t.props.isRange = !0)
4534
+ time: I(qe, (t) => t.props.isRange = !1),
4535
+ timeRange: I(qe, (t) => t.props.isRange = !0)
4487
4536
  },
4488
4537
  mergeProp(t) {
4489
4538
  const e = t.prop.props;
4490
4539
  e.valueFormat || (e.valueFormat = "HH:mm:ss");
4491
4540
  }
4492
- }, Ni = {
4541
+ }, Ui = {
4493
4542
  name: "FcRow",
4494
4543
  render(t, e) {
4495
4544
  return e.vNode.col({ props: { span: 24 } }, [
4496
4545
  e.vNode.row(e.prop, t)
4497
4546
  ]);
4498
4547
  }
4499
- }, Ui = "select", qi = {
4500
- name: Ui,
4548
+ }, Hi = "select", Gi = {
4549
+ name: Hi,
4501
4550
  toFormValue(t, e) {
4502
- return e.prop.props.multiple && !Array.isArray(t) ? H(t) : t;
4551
+ return e.prop.props.multiple && !Array.isArray(t) ? G(t) : t;
4503
4552
  }
4504
- }, Hi = [
4505
- Pi,
4506
- Ti,
4553
+ }, Ji = [
4507
4554
  Bi,
4508
4555
  Li,
4509
4556
  Mi,
4510
4557
  Ni,
4511
- qi
4512
- ], j = "el", Gi = {
4558
+ qi,
4559
+ Ui,
4560
+ Gi
4561
+ ], j = "el", Wi = {
4513
4562
  button: j + "Button",
4514
4563
  icon: "i",
4515
4564
  slider: j + "Slider",
@@ -4542,7 +4591,7 @@ const vt = {
4542
4591
  object: "fcSubForm",
4543
4592
  subForm: "fcSubForm"
4544
4593
  };
4545
- function Ji() {
4594
+ function Ki() {
4546
4595
  return {
4547
4596
  form: {
4548
4597
  inline: !1,
@@ -4559,7 +4608,7 @@ function Ji() {
4559
4608
  type: "primary",
4560
4609
  loading: !1,
4561
4610
  disabled: !1,
4562
- innerText: "提交",
4611
+ innerText: "",
4563
4612
  show: !0,
4564
4613
  col: void 0,
4565
4614
  click: void 0
@@ -4569,30 +4618,30 @@ function Ji() {
4569
4618
  loading: !1,
4570
4619
  disabled: !1,
4571
4620
  icon: "el-icon-refresh",
4572
- innerText: "重置",
4621
+ innerText: "",
4573
4622
  show: !1,
4574
4623
  col: void 0,
4575
4624
  click: void 0
4576
4625
  }
4577
4626
  };
4578
4627
  }
4579
- function Wi(t) {
4628
+ function Xi(t) {
4580
4629
  return t.type === "tooltip";
4581
4630
  }
4582
- function Ct(t, e) {
4631
+ function wt(t, e) {
4583
4632
  E(t, e) && h.String(t[e]) && (t[e] = { [e]: t[e], show: !0 });
4584
4633
  }
4585
4634
  function z(t) {
4586
4635
  return t === !1;
4587
4636
  }
4588
- function Ki(t, e) {
4637
+ function zi(t, e) {
4589
4638
  E(t, e) && !h.Object(t[e]) && (t[e] = { show: !!t[e] });
4590
4639
  }
4591
- function qe(t) {
4640
+ function Ue(t) {
4592
4641
  const e = b({}, t);
4593
4642
  return delete e.children, e;
4594
4643
  }
4595
- const Xi = {
4644
+ const Qi = {
4596
4645
  validate() {
4597
4646
  const t = this.form();
4598
4647
  return t ? t.validate() : new Promise((e) => e());
@@ -4611,11 +4660,11 @@ const Xi = {
4611
4660
  },
4612
4661
  tidyOptions(t) {
4613
4662
  return ["submitBtn", "resetBtn", "row", "info", "wrap", "col", "title"].forEach((e) => {
4614
- Ki(t, e);
4663
+ zi(t, e);
4615
4664
  }), t;
4616
4665
  },
4617
4666
  tidyRule({ prop: t }) {
4618
- return Ct(t, "title"), Ct(t, "info"), t;
4667
+ return wt(t, "title"), wt(t, "info"), t;
4619
4668
  },
4620
4669
  mergeProp(t) {
4621
4670
  const e = {
@@ -4633,7 +4682,7 @@ const Xi = {
4633
4682
  });
4634
4683
  },
4635
4684
  getDefaultOptions() {
4636
- return Ji();
4685
+ return Ki();
4637
4686
  },
4638
4687
  update() {
4639
4688
  const t = this.options.form;
@@ -4662,10 +4711,10 @@ const Xi = {
4662
4711
  const r = t.prop, i = `${this.key}${t.key}`, s = r.col, n = this.isTitle(r) && r.wrap.title !== !1, o = !s.labelWidth && !n ? 0 : s.labelWidth, { inline: a, col: l } = this.rule.props;
4663
4712
  delete r.wrap.title;
4664
4713
  const u = z(r.wrap.show) ? e : this.$r(Q([r.wrap, {
4665
- props: N(b({
4666
- labelWidth: o === void 0 ? o : Dt(o),
4714
+ props: q(b({
4715
+ labelWidth: o === void 0 ? o : jt(o),
4667
4716
  label: n ? r.title.title : void 0
4668
- }, qe(r.wrap || {})), {
4717
+ }, Ue(r.wrap || {})), {
4669
4718
  prop: t.id,
4670
4719
  rules: t.injectValidate()
4671
4720
  }),
@@ -4682,21 +4731,22 @@ const Xi = {
4682
4731
  return !(!e.title && !e.native || z(e.show));
4683
4732
  },
4684
4733
  makeInfo(t, e, r) {
4685
- const i = b({}, t.title), s = b({}, t.info), n = Wi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
4686
- title: r.refRule.__$title.value,
4734
+ var c, p, m;
4735
+ const i = b({}, t.title), s = b({}, t.info), n = Xi(s), o = this.options.form, a = this.getSlot("title"), l = [a ? a({
4736
+ title: (c = r.refRule) == null ? void 0 : c.__$title.value,
4687
4737
  rule: r.rule,
4688
4738
  options: this.options
4689
- }) : r.refRule.__$title.value + (o.labelSuffix || o["label-suffix"] || "")];
4739
+ }) : ((p = r.refRule) == null ? void 0 : p.__$title.value) + (o.labelSuffix || o["label-suffix"] || "")];
4690
4740
  if (!z(s.show) && (s.info || s.native) && !z(s.icon)) {
4691
- const c = {
4741
+ const y = {
4692
4742
  type: s.type || "popover",
4693
4743
  slot: "label",
4694
- props: qe(s),
4744
+ props: Ue(s),
4695
4745
  key: `${e}pop`
4696
4746
  };
4697
- delete c.props.icon, delete c.props.show, delete c.props.info, delete c.props.align, delete c.props.native;
4698
- const p = "content";
4699
- s.info && !E(c.props, p) && (c.props[p] = r.refRule.__$info.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Q([s, c]), [
4747
+ delete y.props.icon, delete y.props.show, delete y.props.info, delete y.props.align, delete y.props.native;
4748
+ const v = "content";
4749
+ s.info && !E(y.props, v) && (y.props[v] = (m = r.refRule) == null ? void 0 : m.__$info.value), l[s.align !== "left" ? "unshift" : "push"](this.$r(Q([s, y]), [
4700
4750
  this.$r({
4701
4751
  type: "i",
4702
4752
  slot: n ? "default" : "reference",
@@ -4706,7 +4756,7 @@ const Xi = {
4706
4756
  ]));
4707
4757
  }
4708
4758
  const u = Q([i, {
4709
- props: qe(i),
4759
+ props: Ue(i),
4710
4760
  key: `${e}tit`,
4711
4761
  class: "fc-form-title",
4712
4762
  slot: i.slot || "label",
@@ -4749,7 +4799,7 @@ const Xi = {
4749
4799
  }, [e]);
4750
4800
  },
4751
4801
  makeResetBtn() {
4752
- const t = b({}, this.options.resetBtn), e = t.innerText;
4802
+ const t = b({}, this.options.resetBtn), e = t.innerText || this.$handle.api.t("reset") || "重置";
4753
4803
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
4754
4804
  type: "button",
4755
4805
  props: t,
@@ -4765,7 +4815,7 @@ const Xi = {
4765
4815
  }, [e]);
4766
4816
  },
4767
4817
  makeSubmitBtn() {
4768
- const t = b({}, this.options.submitBtn), e = t.innerText;
4818
+ const t = b({}, this.options.submitBtn), e = t.innerText || this.$handle.api.t("submit") || "提交";
4769
4819
  return delete t.innerText, delete t.click, delete t.col, delete t.show, this.$r({
4770
4820
  type: "button",
4771
4821
  props: t,
@@ -4782,25 +4832,25 @@ const Xi = {
4782
4832
  }, [e]);
4783
4833
  }
4784
4834
  }, ue = {};
4785
- zi(ue);
4786
- Qi(ue);
4787
4835
  Zi(ue);
4788
4836
  Yi(ue);
4789
4837
  xi(ue);
4790
- function zi(t) {
4838
+ en(ue);
4839
+ tn(ue);
4840
+ function Zi(t) {
4791
4841
  ["group", "tree", "switch", "upload", "autoComplete", "checkbox", "cascader", "colorPicker", "datePicker", "frame", "inputNumber", "radio", "rate"].forEach((e) => {
4792
4842
  t[e] = I(e);
4793
4843
  }), t.auto = t.autoComplete, t.number = t.inputNumber, t.color = t.colorPicker;
4794
4844
  }
4795
- function Qi(t) {
4845
+ function Yi(t) {
4796
4846
  const e = "select", r = "multiple";
4797
4847
  t.selectMultiple = I(e, { [r]: !0 }), t.selectOne = I(e, { [r]: !1 });
4798
4848
  }
4799
- function Zi(t) {
4849
+ function xi(t) {
4800
4850
  const e = "tree", r = { treeSelected: "selected", treeChecked: "checked" };
4801
4851
  Object.keys(r).reduce((i, s) => (i[s] = I(e, { type: r[s] }), i), t);
4802
4852
  }
4803
- function Yi(t) {
4853
+ function en(t) {
4804
4854
  const e = "upload", r = {
4805
4855
  image: ["image", 0],
4806
4856
  file: ["file", 0],
@@ -4809,7 +4859,7 @@ function Yi(t) {
4809
4859
  };
4810
4860
  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;
4811
4861
  }
4812
- function xi(t) {
4862
+ function tn(t) {
4813
4863
  const e = {
4814
4864
  frameInputs: ["input", 0],
4815
4865
  frameFiles: ["file", 0],
@@ -4820,10 +4870,10 @@ function xi(t) {
4820
4870
  };
4821
4871
  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;
4822
4872
  }
4823
- function wt(t, e) {
4873
+ function Ot(t, e) {
4824
4874
  return h.Boolean(t) ? t = { show: t } : !h.Undef(t) && !h.Object(t) && (t = { show: e }), t;
4825
4875
  }
4826
- function en(t, e) {
4876
+ function rn(t, e) {
4827
4877
  return {
4828
4878
  formEl() {
4829
4879
  return e.$manager.form();
@@ -4850,7 +4900,7 @@ function en(t, e) {
4850
4900
  const o = e.getFieldCtx(r);
4851
4901
  if (!o) return;
4852
4902
  const a = e.subForm[o.id], l = [e.$manager.validateField(o.id)];
4853
- H(a).forEach((u) => {
4903
+ G(a).forEach((u) => {
4854
4904
  l.push(u.validate());
4855
4905
  }), Promise.all(l).then(() => {
4856
4906
  s(null), i && i(null);
@@ -4899,20 +4949,20 @@ function en(t, e) {
4899
4949
  }
4900
4950
  },
4901
4951
  submitBtnProps: (r = {}) => {
4902
- let i = wt(e.options.submitBtn, !0);
4952
+ let i = Ot(e.options.submitBtn, !0);
4903
4953
  _(i, r), e.options.submitBtn = i, t.refreshOptions();
4904
4954
  },
4905
4955
  resetBtnProps: (r = {}) => {
4906
- let i = wt(e.options.resetBtn, !1);
4956
+ let i = Ot(e.options.resetBtn, !1);
4907
4957
  _(i, r), e.options.resetBtn = i, t.refreshOptions();
4908
4958
  },
4909
4959
  submit(r, i) {
4910
4960
  return new Promise((s, n) => {
4911
4961
  t.validate().then(() => {
4912
4962
  let o = t.formData();
4913
- 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);
4963
+ 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);
4914
4964
  }).catch((...o) => {
4915
- h.Function(i) && O(() => i(t, ...o)), n(...o);
4965
+ h.Function(i) && F(() => i(t, ...o)), n(...o);
4916
4966
  });
4917
4967
  });
4918
4968
  }
@@ -4921,21 +4971,21 @@ function en(t, e) {
4921
4971
  const Jt = {
4922
4972
  name: "required",
4923
4973
  load(t, e, r) {
4924
- const i = tn(t.getValue());
4974
+ const i = nn(t.getValue());
4925
4975
  if (i.required === !1)
4926
4976
  t.clearProp(), r.clearValidateState([e.field]);
4927
4977
  else {
4928
4978
  const s = b({
4929
4979
  required: !0,
4930
- validator(n, o, a) {
4931
- h.empty(o) ? a(s.message) : a();
4980
+ validator(o, a, l) {
4981
+ h.empty(a) ? l(s.message) : l();
4932
4982
  }
4933
- }, i);
4983
+ }, i), n = e.__fc__.refRule.__$title.value;
4934
4984
  if (!s.message)
4935
- s.message = e.__fc__.refRule.__$title.value + (r.getLocale() === "en" ? " is required" : "不能为空");
4985
+ s.message = r.t("required", { title: n }) || n + (r.getLocale() === "en" ? " is required" : "不能为空");
4936
4986
  else {
4937
- const n = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
4938
- n && (s.message = r.t(n[1], { title: e.__fc__.refRule.__$title.value }));
4987
+ const o = s.message.match(/^\{\{\s*\$t\.(.+)\s*\}\}$/);
4988
+ o && (s.message = r.t(o[1], { title: n }));
4939
4989
  }
4940
4990
  t.getProp().validate = [s];
4941
4991
  }
@@ -4945,25 +4995,25 @@ const Jt = {
4945
4995
  Jt.load(...t);
4946
4996
  }
4947
4997
  };
4948
- function tn(t) {
4998
+ function nn(t) {
4949
4999
  return h.Boolean(t) ? { required: t } : h.String(t) ? { message: t } : h.Undef(t) ? { required: !1 } : h.Function(t) ? { validator: t } : h.Object(t) ? t : {};
4950
5000
  }
4951
- function rn(t) {
4952
- t.componentAlias(Gi), Lr.forEach((e) => {
5001
+ function sn(t) {
5002
+ t.componentAlias(Wi), Lr.forEach((e) => {
4953
5003
  t.component(e.name, e);
4954
- }), t.register(Jt), Hi.forEach((e) => {
5004
+ }), t.register(Jt), Ji.forEach((e) => {
4955
5005
  t.parser(e);
4956
5006
  }), Object.keys(ue).forEach((e) => {
4957
5007
  t.maker[e] = ue[e];
4958
5008
  });
4959
5009
  }
4960
- function nn() {
5010
+ function on() {
4961
5011
  return Gt({
4962
5012
  ui: "element-ui",
4963
- version: "2.7.1",
4964
- manager: Xi,
4965
- extendApi: en,
4966
- install: rn,
5013
+ version: "2.7.2",
5014
+ manager: Qi,
5015
+ extendApi: rn,
5016
+ install: sn,
4967
5017
  attrs: {
4968
5018
  normal: ["col", "wrap"],
4969
5019
  array: ["className"],
@@ -4971,10 +5021,10 @@ function nn() {
4971
5021
  }
4972
5022
  });
4973
5023
  }
4974
- const ze = nn();
5024
+ const ze = on();
4975
5025
  typeof window != "undefined" && (window.formCreate = ze, window.Vue && ze.install(window.Vue));
4976
- const an = ze.maker;
5026
+ const un = ze.maker;
4977
5027
  export {
4978
5028
  ze as default,
4979
- an as maker
5029
+ un as maker
4980
5030
  };