cc1-form 1.1.43 → 1.2.0

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.
package/dist/cc1-form.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ElMessage as ce, ElLoading as me, ElForm as N, ElFormItem as G, ElInput as Y, ElSwitch as oe, ElSelect as W, ElOption as K, ElRadioGroup as re, ElRadio as se, ElTreeSelect as de, ElDatePicker as ae, ElDialog as _, ElButton as T, ElTableColumn as ee, ElDropdown as he, ElDropdownMenu as ye, ElDropdownItem as x, ElPagination as ie, ElTable as ge } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as J, reactive as le, onMounted as ue, resolveComponent as X, createElementBlock as g, createCommentVNode as k, openBlock as f, renderSlot as C, createVNode as z, withCtx as m, createTextVNode as $, Fragment as D, renderList as L, createBlock as h, normalizeClass as j, normalizeStyle as fe, ref as H, unref as a, createElementVNode as F, mergeProps as v, toHandlers as S, resolveDynamicComponent as q, toDisplayString as U, getCurrentInstance as be, createSlots as te, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
3
+ import { defineComponent as J, reactive as le, onMounted as ue, resolveComponent as X, createElementBlock as g, createCommentVNode as k, openBlock as f, renderSlot as C, createVNode as z, withCtx as m, createTextVNode as $, Fragment as S, renderList as L, createBlock as h, normalizeClass as j, normalizeStyle as fe, ref as H, unref as a, createElementVNode as F, mergeProps as v, toHandlers as D, resolveDynamicComponent as q, toDisplayString as U, getCurrentInstance as be, createSlots as te, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
4
4
  class E {
5
5
  /**
6
6
  * Vue Router 实例,需在应用初始化时赋值
@@ -63,9 +63,9 @@ class E {
63
63
  * @param options 其他选项
64
64
  */
65
65
  static showMessage(o, u, t = {}) {
66
- const i = Date.now();
67
- if (!this.tipMessages[o] || i - this.tipMessages[o] > this.tipMessagesGap) {
68
- this.tipMessages[o] = i;
66
+ const r = Date.now();
67
+ if (!this.tipMessages[o] || r - this.tipMessages[o] > this.tipMessagesGap) {
68
+ this.tipMessages[o] = r;
69
69
  const l = Object.assign(
70
70
  {
71
71
  message: o,
@@ -117,11 +117,11 @@ class E {
117
117
  */
118
118
  static openUrl = (o, u = !0) => {
119
119
  if (u) {
120
- let t = screen.width / 2 - 500, i = screen.height / 2 - 800 / 2 - 30;
120
+ let t = screen.width / 2 - 500, r = screen.height / 2 - 800 / 2 - 30;
121
121
  window.open(
122
122
  o,
123
123
  "_blank",
124
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + i + ", left=" + t
124
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + r + ", left=" + t
125
125
  );
126
126
  } else
127
127
  window.open(o, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
@@ -132,10 +132,10 @@ class E {
132
132
  * @returns
133
133
  */
134
134
  static getImgPic = (o) => new Promise(async (u, t) => {
135
- let i = document.getElementById(o.id);
135
+ let r = document.getElementById(o.id);
136
136
  const l = await E.loadModule("html2canvas");
137
137
  try {
138
- l(i, {
138
+ l(r, {
139
139
  logging: !1,
140
140
  allowTaint: !0,
141
141
  scale: window.devicePixelRatio,
@@ -525,9 +525,9 @@ class M {
525
525
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
526
526
  */
527
527
  static findOptions = (o, u) => {
528
- const t = o.column.find((l) => l.key === u), i = (l) => l.replace(/-([a-z])/g, (e, s) => s.toUpperCase());
528
+ const t = o.column.find((l) => l.key === u), r = (l) => l.replace(/-([a-z])/g, (e, s) => s.toUpperCase());
529
529
  if (t)
530
- return t.options[i(t.type)];
530
+ return t.options[r(t.type)];
531
531
  };
532
532
  /**
533
533
  * 更新组件数据
@@ -546,8 +546,8 @@ class M {
546
546
  )
547
547
  */
548
548
  static setOptionsData = (o, u, t) => {
549
- const i = M.findOptions(o, u);
550
- i && (i.data = t);
549
+ const r = M.findOptions(o, u);
550
+ r && (r.data = t);
551
551
  };
552
552
  static form = {
553
553
  openBefore: {
@@ -558,9 +558,9 @@ class M {
558
558
  * @param treeData 树形数据
559
559
  * @param option 组件配置
560
560
  */
561
- parentId: (o, u, t, i) => {
561
+ parentId: (o, u, t, r) => {
562
562
  const l = O.config.table.rowKey;
563
- o ? u.type === E.EDialog.Add ? (u.form.parentId = o[l], u.form.sort = o.children.length + 1) : u.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (u.form.parentId = "0", u.form.sort = t.length + 1), M.setOptionsData(i, "parentId", [{ [l]: "0", title: "根", children: t }]);
563
+ o ? u.type === E.EDialog.Add ? (u.form.parentId = o[l], u.form.sort = o.children.length + 1) : u.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (u.form.parentId = "0", u.form.sort = t.length + 1), M.setOptionsData(r, "parentId", [{ [l]: "0", title: "根", children: t }]);
564
564
  }
565
565
  }
566
566
  };
@@ -605,7 +605,7 @@ class y {
605
605
  return o(...u);
606
606
  o = String(o);
607
607
  let t = 0;
608
- return o.replace(/{([^}]+)}/g, (i, l) => t < u.length ? String(u[t++]) : `{${l}}`);
608
+ return o.replace(/{([^}]+)}/g, (r, l) => t < u.length ? String(u[t++]) : `{${l}}`);
609
609
  }
610
610
  static setI18n = (o) => {
611
611
  y.curd = ObjectUtil.deepMerge(y.curd, o);
@@ -629,12 +629,12 @@ class P {
629
629
  */
630
630
  static setId = (o, u, t) => {
631
631
  u[o] || (u[o] = []);
632
- const i = O.config.table.rowKey;
632
+ const r = O.config.table.rowKey;
633
633
  u[o].forEach((l) => {
634
634
  t.forEach((e) => {
635
635
  let s = e.default ?? "";
636
636
  e.type === "number" && (s = e.default ?? 0), e.type === "boolean" && (s = e.default ?? !1), e.type === "time" && (s = e.default ?? /* @__PURE__ */ new Date()), l[e.value] === void 0 && (l[e.value] = s);
637
- }), l[i] || (l[i] = P.getIdFun());
637
+ }), l[r] || (l[r] = P.getIdFun());
638
638
  });
639
639
  };
640
640
  /**
@@ -644,7 +644,7 @@ class P {
644
644
  * @param itemFields 元素字段-如:[{label:'',value:''}]
645
645
  * @param callback 回调函数
646
646
  */
647
- static add = (o, u, t, i) => {
647
+ static add = (o, u, t, r) => {
648
648
  const l = JSONUtil.cp(t);
649
649
  P.setId(o, u, t);
650
650
  const e = O.config.table.rowKey;
@@ -656,7 +656,7 @@ class P {
656
656
  },
657
657
  { [e]: P.getIdFun() }
658
658
  )
659
- ), i?.(u);
659
+ ), r?.(u);
660
660
  };
661
661
  /**
662
662
  * 删除数组元素
@@ -665,9 +665,9 @@ class P {
665
665
  * @param item 元素-如:{_id:''}
666
666
  * @param callback 回调函数
667
667
  */
668
- static remove = (o, u, t, i) => {
668
+ static remove = (o, u, t, r) => {
669
669
  const l = O.config.table.rowKey;
670
- u[o] = u[o].filter((e) => e[l] !== t[l]), i?.(u);
670
+ u[o] = u[o].filter((e) => e[l] !== t[l]), r?.(u);
671
671
  };
672
672
  /**
673
673
  * 获取没有id的数据
@@ -676,9 +676,9 @@ class P {
676
676
  * @returns 没有id的数据
677
677
  */
678
678
  static getNoIdData = (o, u) => {
679
- const t = JSONUtil.cp(o), i = O.config.table.rowKey;
679
+ const t = JSONUtil.cp(o), r = O.config.table.rowKey;
680
680
  return t.forEach((l) => {
681
- l[i] && delete l[i], u && l[u] && P.getNoIdData(l[u], u);
681
+ l[r] && delete l[r], u && l[u] && P.getNoIdData(l[u], u);
682
682
  }), t;
683
683
  };
684
684
  }
@@ -727,33 +727,33 @@ const ze = {
727
727
  }
728
728
  },
729
729
  emits: ["change"],
730
- setup(r, { emit: o }) {
731
- const u = r, t = le({
730
+ setup(i, { emit: o }) {
731
+ const u = i, t = le({
732
732
  show: !1,
733
733
  add: (l, e, s) => {
734
734
  P.add(l, e, s, () => {
735
- i("change");
735
+ r("change");
736
736
  });
737
737
  },
738
738
  remove: (l, e, s) => {
739
739
  P.remove(l, e, s, () => {
740
- i("change");
740
+ r("change");
741
741
  });
742
742
  }
743
743
  });
744
744
  ue(() => {
745
745
  P.setId(u.field, u.row, u.itemFields), t.show = !0;
746
746
  });
747
- const i = o;
747
+ const r = o;
748
748
  return (l, e) => {
749
749
  const s = X("el-button"), p = X("el-input");
750
750
  return t.show ? (f(), g("div", ze, [
751
- C(l.$slots, "list-start", { row: r.row }),
752
- r.addBottom ? k("", !0) : (f(), g("div", $e, [
751
+ C(l.$slots, "list-start", { row: i.row }),
752
+ i.addBottom ? k("", !0) : (f(), g("div", $e, [
753
753
  z(s, {
754
754
  link: "",
755
755
  type: "primary",
756
- onClick: e[0] || (e[0] = (c) => t.add(r.field, r.row, r.itemFields))
756
+ onClick: e[0] || (e[0] = (c) => t.add(i.field, i.row, i.itemFields))
757
757
  }, {
758
758
  default: m(() => e[3] || (e[3] = [
759
759
  $("添加")
@@ -761,27 +761,27 @@ const ze = {
761
761
  _: 1
762
762
  })
763
763
  ])),
764
- (f(!0), g(D, null, L(r.row[r.field], (c) => (f(), g("div", De, [
764
+ (f(!0), g(S, null, L(i.row[i.field], (c) => (f(), g("div", De, [
765
765
  C(l.$slots, "item-start", {
766
766
  item: c,
767
- row: r.row
767
+ row: i.row
768
768
  }),
769
- (f(!0), g(D, null, L(r.itemFields, (b) => (f(), h(p, {
769
+ (f(!0), g(S, null, L(i.itemFields, (b) => (f(), h(p, {
770
770
  modelValue: c[b.value],
771
771
  "onUpdate:modelValue": (n) => c[b.value] = n,
772
- style: fe({ width: r.inputWidth }),
773
- class: j(r.inputClass),
774
- placeholder: b[r.label] || b[r.value],
775
- onChange: e[1] || (e[1] = (n) => i("change"))
772
+ style: fe({ width: i.inputWidth }),
773
+ class: j(i.inputClass),
774
+ placeholder: b[i.label] || b[i.value],
775
+ onChange: e[1] || (e[1] = (n) => r("change"))
776
776
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
777
777
  C(l.$slots, "item-end", {
778
778
  item: c,
779
- row: r.row
779
+ row: i.row
780
780
  }),
781
781
  z(s, {
782
782
  link: "",
783
783
  type: "danger",
784
- onClick: (b) => t.remove(r.field, r.row, c)
784
+ onClick: (b) => t.remove(i.field, i.row, c)
785
785
  }, {
786
786
  default: m(() => e[4] || (e[4] = [
787
787
  $("删除")
@@ -789,11 +789,11 @@ const ze = {
789
789
  _: 2
790
790
  }, 1032, ["onClick"])
791
791
  ]))), 256)),
792
- r.addBottom ? (f(), g("div", Se, [
792
+ i.addBottom ? (f(), g("div", Se, [
793
793
  z(s, {
794
794
  link: "",
795
795
  type: "primary",
796
- onClick: e[2] || (e[2] = (c) => t.add(r.field, r.row, r.itemFields))
796
+ onClick: e[2] || (e[2] = (c) => t.add(i.field, i.row, i.itemFields))
797
797
  }, {
798
798
  default: m(() => e[5] || (e[5] = [
799
799
  $("添加")
@@ -801,7 +801,7 @@ const ze = {
801
801
  _: 1
802
802
  })
803
803
  ])) : k("", !0),
804
- C(l.$slots, "list-end", { row: r.row })
804
+ C(l.$slots, "list-end", { row: i.row })
805
805
  ])) : k("", !0);
806
806
  };
807
807
  }
@@ -824,8 +824,8 @@ const ze = {
824
824
  default: ""
825
825
  }
826
826
  },
827
- setup(r, { expose: o }) {
828
- const u = E.isFun, t = E.EDialog, i = H(), l = r, e = le({
827
+ setup(i, { expose: o }) {
828
+ const u = E.isFun, t = E.EDialog, r = H(), l = i, e = le({
829
829
  rules: {},
830
830
  show: !0,
831
831
  form: {},
@@ -880,16 +880,16 @@ const ze = {
880
880
  }
881
881
  });
882
882
  return e.initColumnForm(), o({
883
- ref: i,
883
+ ref: r,
884
884
  conf: e
885
885
  }), (s, p) => (f(), h(a(N), {
886
886
  ref_key: "ruleFormRef",
887
- ref: i,
887
+ ref: r,
888
888
  model: e.form,
889
889
  rules: e.rules
890
890
  }, {
891
891
  default: m(() => [
892
- e.show ? (f(!0), g(D, { key: 0 }, L(e.formColumn, (c, b) => (f(), g(D, { key: b }, [
892
+ e.show ? (f(!0), g(S, { key: 0 }, L(e.formColumn, (c, b) => (f(), g(S, { key: b }, [
893
893
  a(u)(
894
894
  c.map((n) => n.item?.show?.form),
895
895
  e.form,
@@ -897,13 +897,13 @@ const ze = {
897
897
  ) ? (f(), g("div", {
898
898
  key: 0,
899
899
  class: j(["row curd-row", {
900
- stripe: r.option.form?.stripe === void 0 ? !0 : r.option.form?.stripe
900
+ stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
901
901
  }])
902
902
  }, [
903
903
  C(s.$slots, "form-start", {
904
904
  row: e.form
905
905
  }),
906
- (f(!0), g(D, null, L(c, (n) => (f(), g(D, {
906
+ (f(!0), g(S, null, L(c, (n) => (f(), g(S, {
907
907
  key: n.item.key
908
908
  }, [
909
909
  a(u)(n.item.show?.form, e.form, e.type) ? (f(), g("div", {
@@ -916,7 +916,7 @@ const ze = {
916
916
  }),
917
917
  label: typeof n.item.text?.form?.label == "string" ? n.item.text?.form?.label : n.item.label,
918
918
  prop: n.item.key,
919
- "label-width": n.item.form?.labelWidth || r.option.form?.labelWidth || "100px"
919
+ "label-width": n.item.form?.labelWidth || i.option.form?.labelWidth || "100px"
920
920
  }, {
921
921
  default: m(() => [
922
922
  F("div", Ee, [
@@ -935,26 +935,26 @@ const ze = {
935
935
  modelValue: e.form[n.item.key],
936
936
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
937
937
  ref_for: !0
938
- }, e.getBind(n.item), S(e.getOn(n.item)), {
938
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
939
939
  disabled: e.getDisabled(n.item)
940
940
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "switch" ? (f(), h(a(oe), v({
941
941
  key: 1,
942
942
  modelValue: e.form[n.item.key],
943
943
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
944
944
  ref_for: !0
945
- }, e.getBind(n.item), S(e.getOn(n.item)), {
945
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
946
946
  disabled: e.getDisabled(n.item)
947
947
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "select" ? (f(), h(a(W), v({
948
948
  key: 2,
949
949
  modelValue: e.form[n.item.key],
950
950
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
951
951
  ref_for: !0
952
- }, e.getBind(n.item), S(e.getOn(n.item)), {
952
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
953
953
  disabled: e.getDisabled(n.item),
954
954
  style: { width: "100%" }
955
955
  }), {
956
956
  default: m(() => [
957
- (f(!0), g(D, null, L(n.item.options?.select?.data, (d) => (f(), h(a(K), {
957
+ (f(!0), g(S, null, L(n.item.options?.select?.data, (d) => (f(), h(a(K), {
958
958
  key: d.value,
959
959
  label: d.label,
960
960
  value: d.value
@@ -966,12 +966,12 @@ const ze = {
966
966
  modelValue: e.form[n.item.key],
967
967
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
968
968
  ref_for: !0
969
- }, e.getBind(n.item), S(e.getOn(n.item)), {
969
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
970
970
  disabled: e.getDisabled(n.item),
971
971
  style: { width: "100%" }
972
972
  }), {
973
973
  default: m(() => [
974
- (f(!0), g(D, null, L(n.item.options?.radio?.data, (d) => (f(), h(a(se), {
974
+ (f(!0), g(S, null, L(n.item.options?.radio?.data, (d) => (f(), h(a(se), {
975
975
  key: d.value,
976
976
  label: d.label,
977
977
  value: d.value
@@ -983,7 +983,7 @@ const ze = {
983
983
  row: e.form,
984
984
  field: n.item.key,
985
985
  ref_for: !0
986
- }, e.getBind(n.item), S(e.getOn(n.item)), {
986
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
987
987
  disabled: e.getDisabled(n.item),
988
988
  style: { width: "100%" }
989
989
  }), null, 16, ["row", "field", "disabled"])) : n.item.type === "treeSelect" ? (f(), h(a(de), v({
@@ -991,7 +991,7 @@ const ze = {
991
991
  modelValue: e.form[n.item.key],
992
992
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
993
993
  ref_for: !0
994
- }, e.getBind(n.item), S(e.getOn(n.item)), {
994
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
995
995
  disabled: e.getDisabled(n.item),
996
996
  style: { width: "100%" }
997
997
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "datetime" ? (f(), h(a(ae), v({
@@ -999,14 +999,14 @@ const ze = {
999
999
  modelValue: e.form[n.item.key],
1000
1000
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
1001
1001
  ref_for: !0
1002
- }, e.getBind(n.item), S(e.getOn(n.item)), {
1002
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
1003
1003
  disabled: e.getDisabled(n.item)
1004
1004
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type && (a(M).customComponent[n.item.type] || a(M).customComponent[n.item.type]?.form) ? (f(), h(q(a(M).customComponent[n.item.type]?.form || a(M).customComponent[n.item.type]), v({
1005
1005
  key: 7,
1006
1006
  modelValue: e.form[n.item.key],
1007
1007
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
1008
1008
  ref_for: !0
1009
- }, e.getBind(n.item), S(e.getOn(n.item)), {
1009
+ }, e.getBind(n.item), D(e.getOn(n.item)), {
1010
1010
  disabled: e.getDisabled(n.item)
1011
1011
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
1012
1012
  ]),
@@ -1056,18 +1056,18 @@ class Te {
1056
1056
  */
1057
1057
  static exportToExcel = async (o, u, t) => {
1058
1058
  if (!o || o.length === 0) return;
1059
- const i = await E.loadModule("xlsx"), l = o.map((p) => {
1059
+ const r = await E.loadModule("xlsx"), l = o.map((p) => {
1060
1060
  const c = {};
1061
1061
  return u.forEach((b) => {
1062
1062
  c[b.label] = p[b.key];
1063
1063
  }), c;
1064
- }), e = i.utils.json_to_sheet(l), s = i.utils.book_new();
1065
- i.utils.book_append_sheet(s, e, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(s, `${t}.xlsx`);
1064
+ }), e = r.utils.json_to_sheet(l), s = r.utils.book_new();
1065
+ r.utils.book_append_sheet(s, e, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, r.writeFile(s, `${t}.xlsx`);
1066
1066
  };
1067
1067
  }
1068
- const I = E.EDialog, Le = (r) => {
1068
+ const I = E.EDialog, Le = (i) => {
1069
1069
  const o = H(), u = H(), t = le({
1070
- option: r.option,
1070
+ option: i.option,
1071
1071
  /** 查询区域相关配置对象 */
1072
1072
  search: {
1073
1073
  /** 查询表单列集合 */
@@ -1080,22 +1080,22 @@ const I = E.EDialog, Le = (r) => {
1080
1080
  /** 搜索表单默认值 */
1081
1081
  formDefault: {},
1082
1082
  /** 获取占位符 */
1083
- getPlaceholder: (i, l = y.tCurd("placeholderInput")) => i.text?.search?.placeholder === void 0 ? `${l}${i.label}` : i.text?.search?.placeholder,
1083
+ getPlaceholder: (r, l = y.tCurd("placeholderInput")) => r.text?.search?.placeholder === void 0 ? `${l}${r.label}` : r.text?.search?.placeholder,
1084
1084
  /** 组装实际要搜索的数据对象 */
1085
1085
  getFormData: () => {
1086
- let i = {};
1087
- r.option.column.forEach((e) => {
1088
- (typeof e.show?.search == "function" ? e.show?.search(t.search.form) : e.show?.search) && (i[e.key] = t.search.form[e.key]);
1086
+ let r = {};
1087
+ i.option.column.forEach((e) => {
1088
+ (typeof e.show?.search == "function" ? e.show?.search(t.search.form) : e.show?.search) && (r[e.key] = t.search.form[e.key]);
1089
1089
  });
1090
- const l = r.option.search?.before?.(i);
1091
- return l && (i = l), i;
1090
+ const l = i.option.search?.before?.(r);
1091
+ return l && (r = l), r;
1092
1092
  },
1093
1093
  /** 重置搜索表单 */
1094
1094
  reset: () => {
1095
- const i = t.search.formDefault;
1096
- Object.keys(i).forEach((l) => {
1097
- r.option.search?.resetMode === "none" ? i[l] = void 0 : i[l] = t.search.formDefault[l];
1098
- }), t.search.form = JSONUtil.cp(i), t.page.num = 1, r.option.init !== !1 && t.table.getList();
1095
+ const r = t.search.formDefault;
1096
+ Object.keys(r).forEach((l) => {
1097
+ i.option.search?.resetMode === "none" ? r[l] = void 0 : r[l] = t.search.formDefault[l];
1098
+ }), t.search.form = JSONUtil.cp(r), t.page.num = 1, i.option.init !== !1 && t.table.getList();
1099
1099
  },
1100
1100
  /** 提交搜索表单 */
1101
1101
  submit: () => {
@@ -1109,19 +1109,19 @@ const I = E.EDialog, Le = (r) => {
1109
1109
  /** 总条数 */
1110
1110
  total: 0,
1111
1111
  /** 分页控件的布局方式 */
1112
- layout: r.option.page?.layout || O.config.pagination.layout,
1112
+ layout: i.option.page?.layout || O.config.pagination.layout,
1113
1113
  /** 是否显示到工具栏 默认不显示 配置后show属性无效 */
1114
- showTools: r.option.page?.showTools || O.config.pagination.showTools,
1114
+ showTools: i.option.page?.showTools || O.config.pagination.showTools,
1115
1115
  /** 当前每页条数 */
1116
- size: r.option.page?.size || O.config.pagination.size,
1116
+ size: i.option.page?.size || O.config.pagination.size,
1117
1117
  /** 支持切换的每页条数选项 */
1118
- sizeList: r.option.page?.sizeList || O.config.pagination.pageSizes,
1118
+ sizeList: i.option.page?.sizeList || O.config.pagination.pageSizes,
1119
1119
  /** 分页器计数 */
1120
- pagerCount: r.option.page?.pagerCount || O.config.pagination.pagerCount,
1120
+ pagerCount: i.option.page?.pagerCount || O.config.pagination.pagerCount,
1121
1121
  /** 获取分页查询参数 */
1122
- getQuery: (i = {}) => ({
1123
- [O.config.field.page.size]: i.size || t.page.size,
1124
- [O.config.field.page.num]: i.num || t.page.num,
1122
+ getQuery: (r = {}) => ({
1123
+ [O.config.field.page.size]: r.size || t.page.size,
1124
+ [O.config.field.page.num]: r.num || t.page.num,
1125
1125
  ...t.search.getFormData()
1126
1126
  })
1127
1127
  },
@@ -1130,7 +1130,7 @@ const I = E.EDialog, Le = (r) => {
1130
1130
  /** 操作列相关配置 */
1131
1131
  op: {
1132
1132
  /** 动态计算操作列宽度 */
1133
- width: (...i) => i.filter((e) => e).length * 30 + 60
1133
+ width: (...r) => r.filter((e) => e).length * 30 + 60
1134
1134
  },
1135
1135
  /** 表格加载中状态 */
1136
1136
  loading: !1,
@@ -1143,20 +1143,20 @@ const I = E.EDialog, Le = (r) => {
1143
1143
  /** 已经展开的行key集合 */
1144
1144
  rowKeys: [],
1145
1145
  /** 行展开触发变更函数 */
1146
- change: (i, l) => {
1146
+ change: (r, l) => {
1147
1147
  },
1148
1148
  /** 全部展开/收起 */
1149
1149
  all: () => {
1150
1150
  if (t.table.expand.isExpand)
1151
1151
  t.table.expand.rowKeys = [];
1152
1152
  else {
1153
- const i = (l) => {
1153
+ const r = (l) => {
1154
1154
  let e = [];
1155
1155
  return l.forEach((s) => {
1156
- e.push(s[r.option.table.rowKey]), s.children && s.children.length > 0 && (e = e.concat(i(s.children)));
1156
+ e.push(s[i.option.table.rowKey]), s.children && s.children.length > 0 && (e = e.concat(r(s.children)));
1157
1157
  }), e;
1158
1158
  };
1159
- t.table.expand.rowKeys = i(t.table.data);
1159
+ t.table.expand.rowKeys = r(t.table.data);
1160
1160
  }
1161
1161
  t.table.expand.isExpand = !t.table.expand.isExpand;
1162
1162
  }
@@ -1176,7 +1176,7 @@ const I = E.EDialog, Le = (r) => {
1176
1176
  /** 获取数据列表接口实现 */
1177
1177
  getList: async () => {
1178
1178
  t.table.loading = !0;
1179
- const i = r.option.api.list;
1179
+ const r = i.option.api.list;
1180
1180
  try {
1181
1181
  await t.initApiData("init");
1182
1182
  let l = {};
@@ -1187,7 +1187,7 @@ const I = E.EDialog, Le = (r) => {
1187
1187
  [V.field]: t.table.sort.order
1188
1188
  };
1189
1189
  }
1190
- const e = await i({
1190
+ const e = await r({
1191
1191
  ...t.page.getQuery(),
1192
1192
  ...l
1193
1193
  }), s = O.config.field.result, p = e.data || { [s.list]: e };
@@ -1196,7 +1196,7 @@ const I = E.EDialog, Le = (r) => {
1196
1196
  const A = b.find((B) => B.item.key === w);
1197
1197
  A && ["select", "radio"].includes(A.item.type) && (A.item.table.format || (A.item.table.format = (B) => A.item.options[A.item.type].data?.find((R) => R.value == B[w])?.label || B[w]));
1198
1198
  }), d));
1199
- t.table.data = r.option.data ? await r.option.data(n, c) : n, t.page.total = p[s.total] || 0;
1199
+ t.table.data = i.option.data ? await i.option.data(n, c) : n, t.page.total = p[s.total] || 0;
1200
1200
  } catch (l) {
1201
1201
  console.error(l);
1202
1202
  } finally {
@@ -1208,8 +1208,8 @@ const I = E.EDialog, Le = (r) => {
1208
1208
  /** 已选数据项 */
1209
1209
  list: [],
1210
1210
  /** 选中状态回调 */
1211
- change: (i) => {
1212
- t.table.selection.list = i;
1211
+ change: (r) => {
1212
+ t.table.selection.list = r;
1213
1213
  }
1214
1214
  },
1215
1215
  /** 表格排序相关配置 */
@@ -1219,14 +1219,14 @@ const I = E.EDialog, Le = (r) => {
1219
1219
  /** 当前排序顺序值 */
1220
1220
  order: "",
1221
1221
  /** 排序变更回调 */
1222
- change: (i) => {
1222
+ change: (r) => {
1223
1223
  O.config.table.sort.resetPage && (t.page.num = 1);
1224
1224
  const l = O.config.table.sort;
1225
1225
  if (l.change) {
1226
- l.change(i, t);
1226
+ l.change(r, t);
1227
1227
  return;
1228
1228
  }
1229
- t.table.sort.prop = i.prop, i.order === null ? t.table.sort.order = "" : t.table.sort.order = i.order === "ascending" ? l.order.asc : l.order.desc, t.table.getList();
1229
+ t.table.sort.prop = r.prop, r.order === null ? t.table.sort.order = "" : t.table.sort.order = r.order === "ascending" ? l.order.asc : l.order.desc, t.table.getList();
1230
1230
  }
1231
1231
  }
1232
1232
  },
@@ -1235,20 +1235,20 @@ const I = E.EDialog, Le = (r) => {
1235
1235
  /** 导出逻辑方法集合 */
1236
1236
  run: {
1237
1237
  /** 执行指定方式的导出(如select、page、all) */
1238
- start: async (i) => {
1239
- let l = await t.export.run[i](), e = r.option.column;
1238
+ start: async (r) => {
1239
+ let l = await t.export.run[r](), e = i.option.column;
1240
1240
  const s = JSONUtil.cp({
1241
1241
  data: l,
1242
1242
  columns: e
1243
- }), p = r.option.tools?.export || {};
1243
+ }), p = i.option.tools?.export || {};
1244
1244
  p.before && p.before(s), Te.exportToExcel(s.data, s.columns, p.fileName);
1245
1245
  },
1246
1246
  /** 获取当前选中项进行导出 */
1247
1247
  select: async () => {
1248
1248
  t.export.loading = !0;
1249
1249
  try {
1250
- if (r.option.tools?.export?.select) {
1251
- await r.option.tools?.export?.select({
1250
+ if (i.option.tools?.export?.select) {
1251
+ await i.option.tools?.export?.select({
1252
1252
  ...t.page.getQuery(),
1253
1253
  items: t.table.selection.list
1254
1254
  });
@@ -1257,8 +1257,8 @@ const I = E.EDialog, Le = (r) => {
1257
1257
  if (t.table.selection.list.length === 0)
1258
1258
  throw E.fail(y.tCurd("selectDataToExport")), new Error(y.tCurd("selectDataToExport"));
1259
1259
  return t.table.selection.list;
1260
- } catch (i) {
1261
- console.error(i);
1260
+ } catch (r) {
1261
+ console.error(r);
1262
1262
  } finally {
1263
1263
  t.export.loading = !1;
1264
1264
  }
@@ -1267,8 +1267,8 @@ const I = E.EDialog, Le = (r) => {
1267
1267
  page: async () => {
1268
1268
  t.export.loading = !0;
1269
1269
  try {
1270
- if (r.option.tools?.export?.page) {
1271
- await r.option.tools?.export?.page({
1270
+ if (i.option.tools?.export?.page) {
1271
+ await i.option.tools?.export?.page({
1272
1272
  ...t.page.getQuery()
1273
1273
  });
1274
1274
  return;
@@ -1276,8 +1276,8 @@ const I = E.EDialog, Le = (r) => {
1276
1276
  if (t.table.data.length === 0)
1277
1277
  throw E.fail(y.tCurd("noData")), new Error(y.tCurd("noData"));
1278
1278
  return t.table.data;
1279
- } catch (i) {
1280
- console.error(i);
1279
+ } catch (r) {
1280
+ console.error(r);
1281
1281
  } finally {
1282
1282
  t.export.loading = !1;
1283
1283
  }
@@ -1286,21 +1286,21 @@ const I = E.EDialog, Le = (r) => {
1286
1286
  all: async () => {
1287
1287
  t.export.loading = !0;
1288
1288
  try {
1289
- if (r.option.tools?.export?.all) {
1290
- await r.option.tools?.export?.all({
1289
+ if (i.option.tools?.export?.all) {
1290
+ await i.option.tools?.export?.all({
1291
1291
  ...t.page.getQuery()
1292
1292
  });
1293
1293
  return;
1294
1294
  }
1295
- const i = r.option.api.list, l = await i({
1295
+ const r = i.option.api.list, l = await r({
1296
1296
  ...t.page.getQuery({
1297
1297
  size: 999999,
1298
1298
  num: 1
1299
1299
  })
1300
1300
  });
1301
1301
  return (l.data || { [O.config.field.result.list]: l })[O.config.field.result.list];
1302
- } catch (i) {
1303
- console.error(i);
1302
+ } catch (r) {
1303
+ console.error(r);
1304
1304
  } finally {
1305
1305
  t.export.loading = !1;
1306
1306
  }
@@ -1309,8 +1309,8 @@ const I = E.EDialog, Le = (r) => {
1309
1309
  /** 导出时loading状态 */
1310
1310
  loading: !1,
1311
1311
  /** 执行导出操作的触发函数 */
1312
- click: (i) => {
1313
- t.export.loading || t.export.run.start(i);
1312
+ click: (r) => {
1313
+ t.export.loading || t.export.run.start(r);
1314
1314
  }
1315
1315
  },
1316
1316
  /** 表单增删改弹窗相关对象 */
@@ -1334,15 +1334,15 @@ const I = E.EDialog, Le = (r) => {
1334
1334
  /** 表单所有列,二维数组结构按行分组 */
1335
1335
  formColumn: [],
1336
1336
  /** 判断是否禁用当前字段 */
1337
- getDisabled: (i) => t.update.type === I.View ? i.disabled?.view === void 0 ? !0 : i.disabled?.view : i.disabled?.[t.update.type === I.Add ? "create" : "update"],
1337
+ getDisabled: (r) => t.update.type === I.View ? r.disabled?.view === void 0 ? !0 : r.disabled?.view : r.disabled?.[t.update.type === I.Add ? "create" : "update"],
1338
1338
  /** 获取表单组件绑定属性 */
1339
- getBind: (i) => i.options?.[t.update.type === I.Add ? "formAdd" : "formUpdate"]?.[i.type] || i.options?.[i.type] || {},
1339
+ getBind: (r) => r.options?.[t.update.type === I.Add ? "formAdd" : "formUpdate"]?.[r.type] || r.options?.[r.type] || {},
1340
1340
  /** 获取表单组件事件属性 */
1341
- getOn: (i) => i.options?.[t.update.type === I.Add ? "formAdd" : "formUpdate"]?.[i.type]?.on || i.options?.[i.type]?.on || {},
1341
+ getOn: (r) => r.options?.[t.update.type === I.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
1342
1342
  /** 获取表单组件绑定属性和事件 */
1343
- getOptions: (i) => {
1343
+ getOptions: (r) => {
1344
1344
  try {
1345
- const e = t.update.formColumn.flat().find((s) => s.item.key === i)?.item;
1345
+ const e = t.update.formColumn.flat().find((s) => s.item.key === r)?.item;
1346
1346
  return e ? {
1347
1347
  options: e.options,
1348
1348
  // @ts-ignore
@@ -1357,30 +1357,26 @@ const I = E.EDialog, Le = (r) => {
1357
1357
  /** 当前编辑的数据原始项对象 */
1358
1358
  data: {},
1359
1359
  /** 返回编辑时与原值的变更数据,用于局部更新API */
1360
- getApiData: (i) => {
1361
- if (r.option.form?.editAll)
1362
- return i;
1360
+ getApiData: (r) => {
1361
+ if (i.option.form?.editAll)
1362
+ return r;
1363
1363
  let l = {
1364
- [r.option.table?.rowKey]: t.update.edit.data[r.option.table?.rowKey]
1364
+ [i.option.table?.rowKey]: t.update.edit.data[i.option.table?.rowKey]
1365
1365
  };
1366
1366
  return Object.keys(t.update.edit.data).forEach((e) => {
1367
- i[e] !== t.update.edit.data[e] && (l[e] = i[e]);
1367
+ r[e] !== t.update.edit.data[e] && (l[e] = r[e]);
1368
1368
  }), l;
1369
1369
  }
1370
1370
  },
1371
1371
  view: {},
1372
1372
  /** 打开增改弹窗 */
1373
- open: (i, l) => {
1373
+ open: (r, l) => {
1374
1374
  t.update.showContent || FunUtil.throttle(async () => {
1375
1375
  E.loading(!0);
1376
1376
  try {
1377
- t.update.type = i, await t.initApiData("update");
1378
- const e = i === I.Add;
1379
- if (!e && r.option.table?.inlineEdit) {
1380
- t.inlineEdit.open(l);
1381
- return;
1382
- }
1383
- t.update.edit.data = l, t.update.title = y.tCurd(e ? "add" : i === I.View ? "view" : "edit"), t.update.form = JSONUtil.cp(e ? t.update.formDefault : l), await r.option.form?.openBefore?.(t.update.form, t.update), t.inlineEdit.data || (t.update.show = !0), t.update.showContent = !0, r.option.form?.openAfter?.(t.update.form, t.update);
1377
+ t.update.type = r, await t.initApiData("update");
1378
+ const e = r === I.Add;
1379
+ t.update.edit.data = l, t.update.title = y.tCurd(e ? "add" : r === I.View ? "view" : "edit"), t.update.form = JSONUtil.cp(e ? t.update.formDefault : l), await i.option.form?.openBefore?.(t.update.form, t.update), !e && i.option.table?.inlineEdit ? t.inlineEdit.open(l) : (t.update.show = !0, t.update.showContent = !0), i.option.form?.openAfter?.(t.update.form, t.update);
1384
1380
  } catch (e) {
1385
1381
  console.error(e);
1386
1382
  } finally {
@@ -1394,16 +1390,16 @@ const I = E.EDialog, Le = (r) => {
1394
1390
  await u.value?.validate(async (s, p) => new Promise((c, b) => {
1395
1391
  s || (E.fail(y.tCurd("checkFormData")), b(!1)), c();
1396
1392
  })), t.update.loading = !0;
1397
- const i = t.update.type === I.Add ? r.option.api.create : r.option.api.update;
1393
+ const r = t.update.type === I.Add ? i.option.api.create : i.option.api.update;
1398
1394
  try {
1399
- await r.option.form?.submitBefore?.(t.update.form, t.update);
1395
+ await i.option.form?.submitBefore?.(t.update.form, t.update);
1400
1396
  } catch {
1401
1397
  t.update.loading = !1;
1402
1398
  return;
1403
1399
  }
1404
1400
  let l = JSONUtil.cp(t.update.form);
1405
1401
  delete l.children;
1406
- const e = new Set(r.option.column.filter((s) => s.type === "datetime").map((s) => s.key));
1402
+ const e = new Set(i.option.column.filter((s) => s.type === "datetime").map((s) => s.key));
1407
1403
  Object.keys(l).forEach((s) => {
1408
1404
  if (e.has(s) && l[s] != null) {
1409
1405
  const p = new Date(l[s]).getTime();
@@ -1411,10 +1407,10 @@ const I = E.EDialog, Le = (r) => {
1411
1407
  }
1412
1408
  });
1413
1409
  try {
1414
- if (!i) return;
1415
- await i({
1410
+ if (!r) return;
1411
+ await r({
1416
1412
  ...l
1417
- }), t.update.close(), await t.table.getList(), r.option.form?.submitAfter?.(l, t.update);
1413
+ }), t.update.close(), await t.table.getList(), i.option.form?.submitAfter?.(l, t.update);
1418
1414
  } catch (s) {
1419
1415
  console.error(s);
1420
1416
  } finally {
@@ -1434,8 +1430,8 @@ const I = E.EDialog, Le = (r) => {
1434
1430
  /** 行内编辑当前行对象 */
1435
1431
  data: null,
1436
1432
  /** 打开行内编辑 */
1437
- open: (i) => {
1438
- t.inlineEdit.data = i, t.update.open(I.Update, i);
1433
+ open: (r) => {
1434
+ t.inlineEdit.data = r, t.update.open(I.Update, r);
1439
1435
  },
1440
1436
  /** 关闭行内编辑 */
1441
1437
  close: () => {
@@ -1457,22 +1453,22 @@ const I = E.EDialog, Le = (r) => {
1457
1453
  t.remove.show = !1;
1458
1454
  },
1459
1455
  /** 打开删除弹窗并设置待删除项 */
1460
- open: (i) => {
1461
- if (i.length === 0) {
1456
+ open: (r) => {
1457
+ if (r.length === 0) {
1462
1458
  E.fail(y.tCurd("selectDataToDelete"));
1463
1459
  return;
1464
1460
  }
1465
- t.remove.items = i, t.remove.show = !0;
1461
+ t.remove.items = r, t.remove.show = !0;
1466
1462
  },
1467
1463
  /** 执行删除实际操作 */
1468
1464
  submit: () => {
1469
1465
  FunUtil.throttle(async () => {
1470
1466
  t.remove.loading = !0;
1471
- const i = r.option.api.delete;
1467
+ const r = i.option.api.delete;
1472
1468
  try {
1473
- if (!i) return;
1474
- await i({
1475
- [r.option.table?.rowKey]: t.remove.items.map((l) => l[r.option.table?.rowKey]),
1469
+ if (!r) return;
1470
+ await r({
1471
+ [i.option.table?.rowKey]: t.remove.items.map((l) => l[i.option.table?.rowKey]),
1476
1472
  items: t.remove.items
1477
1473
  }), E.success(y.tCurd("operationSuccess")), t.table.data.length <= 1 && t.page.num > 1 && (t.page.num -= 1), t.remove.close(), await t.table.getList();
1478
1474
  } catch (l) {
@@ -1490,17 +1486,17 @@ const I = E.EDialog, Le = (r) => {
1490
1486
  /** 下拉请求等数据缓存 */
1491
1487
  apiDataMap: {},
1492
1488
  /** 获取并绑定curd中所有下拉数据等远程依赖 */
1493
- initApiData: async (i) => {
1489
+ initApiData: async (r) => {
1494
1490
  const l = [], e = (s) => {
1495
1491
  if (s.children && s.children.length) {
1496
1492
  s.children.forEach((p) => e(p));
1497
1493
  return;
1498
1494
  }
1499
- if (s.options?.[s.type]?.dataApi && s.options?.[s.type]?.dataApiConfig?.[i]) {
1495
+ if (s.options?.[s.type]?.dataApi && s.options?.[s.type]?.dataApiConfig?.[r]) {
1500
1496
  if (t.apiDataMap[s.key] && s.options?.[s.type]?.dataApiConfig?.once) return;
1501
1497
  const p = (async () => {
1502
1498
  try {
1503
- let c = await s.options?.[s.type]?.dataApi?.(t.update.form, i);
1499
+ let c = await s.options?.[s.type]?.dataApi?.(t.update.form, r);
1504
1500
  if (c) {
1505
1501
  const b = s.options?.[s.type]?.dataPath;
1506
1502
  b && (c = ObjectUtil.getPathValue(c, b)), s.options[s.type].data = c, s.options.search[s.type].data = c, s.options.formAdd[s.type].data = c, s.options.formUpdate[s.type].data = c, t.apiDataMap[s.key] = c;
@@ -1511,17 +1507,17 @@ const I = E.EDialog, Le = (r) => {
1511
1507
  l.push(p);
1512
1508
  }
1513
1509
  };
1514
- return r.option.column.forEach((s) => {
1510
+ return i.option.column.forEach((s) => {
1515
1511
  e(s);
1516
1512
  }), await Promise.all(l), !0;
1517
1513
  },
1518
1514
  /** 初始化curd配置(option默认值合并等) */
1519
1515
  initCurdConfig: () => {
1520
- const i = JSONUtil.cp(O.config);
1521
- i.table.emptyText = y.tCurd("noData"), r.option.size = r.option.size || {}, i.table.size = r.option.size.table || i.size.table, i.form.size = r.option.size.form || i.size.form, i.size.search = r.option.size.search || i.size.search;
1522
- const l = ObjectUtil.deepMerge(i, r.option || {});
1516
+ const r = JSONUtil.cp(O.config);
1517
+ r.table.emptyText = y.tCurd("noData"), i.option.size = i.option.size || {}, r.table.size = i.option.size.table || r.size.table, r.form.size = i.option.size.form || r.size.form, r.size.search = i.option.size.search || r.size.search;
1518
+ const l = ObjectUtil.deepMerge(r, i.option || {});
1523
1519
  Object.keys(l).forEach((e) => {
1524
- r.option[e] = l[e];
1520
+ i.option[e] = l[e];
1525
1521
  });
1526
1522
  },
1527
1523
  /**
@@ -1530,25 +1526,25 @@ const I = E.EDialog, Le = (r) => {
1530
1526
  * @returns
1531
1527
  */
1532
1528
  initColumnOptions: () => {
1533
- let i = JSONUtil.cp(O.config.columnConfig);
1534
- i.options = ObjectUtil.deepMerge(i.options, {
1529
+ let r = JSONUtil.cp(O.config.columnConfig);
1530
+ r.options = ObjectUtil.deepMerge(r.options, {
1535
1531
  switch: {
1536
1532
  activeLabel: y.tCurd("switchOn"),
1537
1533
  inactiveLabel: y.tCurd("switchOff")
1538
1534
  }
1539
1535
  });
1540
1536
  const l = (e) => {
1541
- for (const s in i) {
1537
+ for (const s in r) {
1542
1538
  if (s === "table") {
1543
- if (e.table = ObjectUtil.deepMerge(i.table, e.table || {}), e.children) {
1539
+ if (e.table = ObjectUtil.deepMerge(r.table, e.table || {}), e.children) {
1544
1540
  e.children.forEach((c) => {
1545
1541
  l(c);
1546
1542
  });
1547
1543
  return;
1548
1544
  }
1549
- } else s === "type" ? e.type = e.type || i.type : e[s] = ObjectUtil.deepMerge(i[s], e[s] || {});
1550
- e.options = e.options || {}, e.options[e.type] = e.options[e.type] || {}, e.options[e.type].size = r.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
1551
- e.options[c] = e.options[c] || JSONUtil.cp(e.options), e.options[c][e.type] = e.options[c][e.type] || {}, e.options[c][e.type].size = c === "search" ? r.option.size.search : r.option.size.form;
1545
+ } else s === "type" ? e.type = e.type || r.type : e[s] = ObjectUtil.deepMerge(r[s], e[s] || {});
1546
+ e.options = e.options || {}, e.options[e.type] = e.options[e.type] || {}, e.options[e.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
1547
+ e.options[c] = e.options[c] || JSONUtil.cp(e.options), e.options[c][e.type] = e.options[c][e.type] || {}, e.options[c][e.type].size = c === "search" ? i.option.size.search : i.option.size.form;
1552
1548
  }), e.table = ObjectUtil.deepMerge(e.table, e.options[e.type].table || {});
1553
1549
  }
1554
1550
  e.type === "switch" && (e.options.switch.tableBeforeChange = async (s, p) => {
@@ -1559,8 +1555,8 @@ const I = E.EDialog, Le = (r) => {
1559
1555
  content: y.tCurd("confirmSwitchMessage")
1560
1556
  }), t.table.loading = !0;
1561
1557
  try {
1562
- return r.option.api.update ? (await r.option.api.update({
1563
- [r.option.table?.rowKey]: p[r.option.table?.rowKey],
1558
+ return i.option.api.update ? (await i.option.api.update({
1559
+ [i.option.table?.rowKey]: p[i.option.table?.rowKey],
1564
1560
  [s]: p[s] === c.activeValue ? c.inactiveValue : c.activeValue,
1565
1561
  final(b, n, d) {
1566
1562
  t.table.loading = !1;
@@ -1574,25 +1570,25 @@ const I = E.EDialog, Le = (r) => {
1574
1570
  } catch {
1575
1571
  return !1;
1576
1572
  }
1577
- }), e.type === "treeSelect" && (e.options.treeSelect.rowKey = r.option.table?.rowKey, e.options.treeSelect.nodeKey = r.option.table?.rowKey);
1573
+ }), e.type === "treeSelect" && (e.options.treeSelect.rowKey = i.option.table?.rowKey, e.options.treeSelect.nodeKey = i.option.table?.rowKey);
1578
1574
  };
1579
- r.option.column.forEach(l), r.option.table?.column?.forEach(l);
1575
+ i.option.column.forEach(l), i.option.table?.column?.forEach(l);
1580
1576
  },
1581
- getColumnSpan: (i, l) => {
1582
- if (i.item.form?.spanCol) {
1577
+ getColumnSpan: (r, l) => {
1578
+ if (r.item.form?.spanCol) {
1583
1579
  const e = O.config.form.defaultSpan, p = l.filter((c) => !E.isFun(c.item.show?.form, t.update.form, t.update.type)).reduce((c, b) => c + (b.item.form?.span || e), 0);
1584
- return (i.item?.form.span || e) + p;
1580
+ return (r.item?.form.span || e) + p;
1585
1581
  }
1586
- return i.item.form.span;
1582
+ return r.item.form.span;
1587
1583
  },
1588
1584
  /** 初始化配置并生成表单列及默认值及规则 */
1589
1585
  initColumnForm: () => {
1590
- const i = r.option;
1586
+ const r = i.option;
1591
1587
  t.update.formColumn = [], t.table.column.show = {
1592
1588
  list: [],
1593
1589
  listSource: []
1594
1590
  };
1595
- const l = [], e = r.option.form?.maxSpan || 12, s = r.option.form?.defaultSpan || e / 2;
1591
+ const l = [], e = i.option.form?.maxSpan || 12, s = i.option.form?.defaultSpan || e / 2;
1596
1592
  let p = [];
1597
1593
  const c = (d) => {
1598
1594
  if (d.children) {
@@ -1622,31 +1618,31 @@ const I = E.EDialog, Le = (r) => {
1622
1618
  }, b = (d, V) => {
1623
1619
  d.isForm = V, Array.isArray(d.children) && d.children.forEach((w) => b(w, V));
1624
1620
  };
1625
- i.column.forEach((d) => {
1621
+ r.column.forEach((d) => {
1626
1622
  d.isForm = !0, b(d, !0), c(d);
1627
- }), r.option.table?.column?.forEach((d) => {
1623
+ }), i.option.table?.column?.forEach((d) => {
1628
1624
  b(d, !1), c(d);
1629
- }), t.search.column.list = i.column.concat(i.table?.column || []), t.table.column.list = t.search.column.list.filter((d) => d.table?.table), t.search.column.list.sort((d, V) => d.sort?.search - V.sort?.search), t.table.column.list.sort((d, V) => d.sort?.table - V.sort?.table), p.length > 0 && l.push(p), t.update.formColumn = l;
1630
- const n = r.option.search?.formDefault;
1625
+ }), t.search.column.list = r.column.concat(r.table?.column || []), t.table.column.list = t.search.column.list.filter((d) => d.table?.table), t.search.column.list.sort((d, V) => d.sort?.search - V.sort?.search), t.table.column.list.sort((d, V) => d.sort?.table - V.sort?.table), p.length > 0 && l.push(p), t.update.formColumn = l;
1626
+ const n = i.option.search?.formDefault;
1631
1627
  n && Object.keys(n).forEach((d) => {
1632
1628
  t.search.formDefault[d] = n[d];
1633
- }), i.column.forEach((d) => {
1629
+ }), r.column.forEach((d) => {
1634
1630
  d.show?.search || (t.search.formDefault[d.key] = void 0);
1635
1631
  }), t.search.form = JSONUtil.cp(t.search.formDefault);
1636
1632
  }
1637
1633
  });
1638
1634
  return t.init(), ue(() => {
1639
- r.option.init !== !1 && t.table.getList();
1635
+ i.option.init !== !1 && t.table.getList();
1640
1636
  }), { conf: t, switchConfirmRef: o, ruleFormRef: u };
1641
1637
  }, Me = { class: "dialog-footer" }, Be = /* @__PURE__ */ J({
1642
1638
  __name: "switchConfirm",
1643
1639
  props: {
1644
1640
  size: {}
1645
1641
  },
1646
- setup(r, { expose: o }) {
1647
- const u = H(!1), t = H("确认修改"), i = H("确认要修改状态吗?");
1642
+ setup(i, { expose: o }) {
1643
+ const u = H(!1), t = H("确认修改"), r = H("确认要修改状态吗?");
1648
1644
  let l = null, e = null;
1649
- const s = (b) => (b?.title && (t.value = b.title), b?.content && (i.value = b.content), u.value = !0, new Promise((n, d) => {
1645
+ const s = (b) => (b?.title && (t.value = b.title), b?.content && (r.value = b.content), u.value = !0, new Promise((n, d) => {
1650
1646
  l = n, e = d;
1651
1647
  })), p = () => {
1652
1648
  u.value = !1, l?.(!0), l = null, e = null;
@@ -1689,22 +1685,22 @@ const I = E.EDialog, Le = (r) => {
1689
1685
  }, 8, ["size"])
1690
1686
  ]),
1691
1687
  default: m(() => [
1692
- F("div", null, U(i.value), 1)
1688
+ F("div", null, U(r.value), 1)
1693
1689
  ]),
1694
1690
  _: 1
1695
1691
  }, 8, ["modelValue", "title"]);
1696
1692
  };
1697
1693
  }
1698
- }), pe = (r, o) => {
1699
- const u = r.__vccOpts || r;
1700
- for (const [t, i] of o)
1701
- u[t] = i;
1694
+ }), pe = (i, o) => {
1695
+ const u = i.__vccOpts || i;
1696
+ for (const [t, r] of o)
1697
+ u[t] = r;
1702
1698
  return u;
1703
1699
  }, je = {}, Ie = {
1704
1700
  xmlns: "http://www.w3.org/2000/svg",
1705
1701
  viewBox: "0 0 1024 1024"
1706
1702
  };
1707
- function Re(r, o) {
1703
+ function Re(i, o) {
1708
1704
  return f(), g("svg", Ie, o[0] || (o[0] = [
1709
1705
  F("path", {
1710
1706
  fill: "currentColor",
@@ -1717,7 +1713,7 @@ const Pe = /* @__PURE__ */ pe(je, [["render", Re]]), Ne = {}, Ke = {
1717
1713
  xmlns: "http://www.w3.org/2000/svg",
1718
1714
  viewBox: "0 0 1024 1024"
1719
1715
  };
1720
- function He(r, o) {
1716
+ function He(i, o) {
1721
1717
  return f(), g("svg", Ke, o[0] || (o[0] = [
1722
1718
  F("path", {
1723
1719
  fill: "currentColor",
@@ -1732,11 +1728,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1732
1728
  columnList: {},
1733
1729
  option: {}
1734
1730
  },
1735
- setup(r) {
1731
+ setup(i) {
1736
1732
  const o = E.isFun, u = be().type;
1737
- return (t, i) => {
1733
+ return (t, r) => {
1738
1734
  const l = X("el-tooltip");
1739
- return f(!0), g(D, null, L(t.columnList, (e) => (f(), g(D, {
1735
+ return f(!0), g(S, null, L(t.columnList, (e) => (f(), g(S, {
1740
1736
  key: e.key
1741
1737
  }, [
1742
1738
  t.conf.table.column.show.list.includes(e.key) ? (f(), h(a(ee), v({
@@ -1766,8 +1762,8 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1766
1762
  ])
1767
1763
  ]),
1768
1764
  default: m(({ row: s }) => [
1769
- e.children ? (f(), g(D, { key: 0 }, [
1770
- i[0] || (i[0] = $("   ")),
1765
+ e.children ? (f(), g(S, { key: 0 }, [
1766
+ r[0] || (r[0] = $("   ")),
1771
1767
  (f(), h(q(a(u)), {
1772
1768
  conf: t.conf,
1773
1769
  columnList: e.children,
@@ -1780,21 +1776,21 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1780
1776
  ])
1781
1777
  }))
1782
1778
  ]), 1032, ["conf", "columnList", "option"]))
1783
- ], 64)) : (f(), g(D, { key: 1 }, [
1784
- a(o)(e.show?.form, t.conf.update.form, a(E).EDialog.Update) && t.option.table?.inlineEdit && t.conf.inlineEdit.data === s && (e.type === "input" || e.type === "select") ? (f(), g(D, { key: 0 }, [
1779
+ ], 64)) : (f(), g(S, { key: 1 }, [
1780
+ a(o)(e.show?.form, t.conf.update.form, a(E).EDialog.Update) && t.option.table?.inlineEdit && t.conf.inlineEdit.data === s && (e.type === "input" || e.type === "select") ? (f(), g(S, { key: 0 }, [
1785
1781
  e.type === "input" ? (f(), h(a(Y), v({
1786
1782
  key: 0,
1787
1783
  modelValue: t.conf.update.form[e.key],
1788
1784
  "onUpdate:modelValue": (p) => t.conf.update.form[e.key] = p,
1789
1785
  ref_for: !0
1790
- }, t.conf.update.getBind(e), S(t.conf.update.getOn(e)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "select" ? (f(), h(a(W), v({
1786
+ }, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "select" ? (f(), h(a(W), v({
1791
1787
  key: 1,
1792
1788
  modelValue: t.conf.update.form[e.key],
1793
1789
  "onUpdate:modelValue": (p) => t.conf.update.form[e.key] = p,
1794
1790
  ref_for: !0
1795
- }, t.conf.update.getBind(e), S(t.conf.update.getOn(e)), { style: { width: "100%" } }), {
1791
+ }, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), { style: { width: "100%" } }), {
1796
1792
  default: m(() => [
1797
- (f(!0), g(D, null, L(e.options?.search?.select?.data || e.options?.select?.data, (p) => (f(), h(a(K), {
1793
+ (f(!0), g(S, null, L(e.options?.search?.select?.data || e.options?.select?.data, (p) => (f(), h(a(K), {
1798
1794
  key: p.value,
1799
1795
  label: p.label,
1800
1796
  value: p.value
@@ -1812,7 +1808,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1812
1808
  modelValue: s[e.key],
1813
1809
  "onUpdate:modelValue": (p) => s[e.key] = p,
1814
1810
  ref_for: !0
1815
- }, e.options?.[e.type ?? ""], S(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (f(), h(a(oe), v({
1811
+ }, e.options?.[e.type ?? ""], D(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (f(), h(a(oe), v({
1816
1812
  key: 1,
1817
1813
  modelValue: s[e.key],
1818
1814
  "onUpdate:modelValue": (p) => s[e.key] = p,
@@ -1844,7 +1840,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1844
1840
  conf: {},
1845
1841
  item: {}
1846
1842
  },
1847
- setup(r) {
1843
+ setup(i) {
1848
1844
  return (o, u) => (f(), h(a(G), {
1849
1845
  class: j({
1850
1846
  "hide-label": typeof o.item.item.text?.form?.label == "boolean" ? !o.item.item.text?.form?.label : !1
@@ -1869,24 +1865,24 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1869
1865
  key: 0,
1870
1866
  modelValue: o.conf.update.form[o.item.item.key],
1871
1867
  "onUpdate:modelValue": u[0] || (u[0] = (t) => o.conf.update.form[o.item.item.key] = t)
1872
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1868
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1873
1869
  disabled: o.conf.update.getDisabled(o.item.item)
1874
1870
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (f(), h(a(oe), v({
1875
1871
  key: 1,
1876
1872
  modelValue: o.conf.update.form[o.item.item.key],
1877
1873
  "onUpdate:modelValue": u[1] || (u[1] = (t) => o.conf.update.form[o.item.item.key] = t)
1878
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1874
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1879
1875
  disabled: o.conf.update.getDisabled(o.item.item)
1880
1876
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (f(), h(a(W), v({
1881
1877
  key: 2,
1882
1878
  modelValue: o.conf.update.form[o.item.item.key],
1883
1879
  "onUpdate:modelValue": u[2] || (u[2] = (t) => o.conf.update.form[o.item.item.key] = t)
1884
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1880
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1885
1881
  disabled: o.conf.update.getDisabled(o.item.item),
1886
1882
  style: { width: "100%" }
1887
1883
  }), {
1888
1884
  default: m(() => [
1889
- (f(!0), g(D, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(K), {
1885
+ (f(!0), g(S, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(K), {
1890
1886
  key: t.value,
1891
1887
  label: t.label,
1892
1888
  value: t.value
@@ -1897,12 +1893,12 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1897
1893
  key: 3,
1898
1894
  modelValue: o.conf.update.form[o.item.item.key],
1899
1895
  "onUpdate:modelValue": u[3] || (u[3] = (t) => o.conf.update.form[o.item.item.key] = t)
1900
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1896
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1901
1897
  disabled: o.conf.update.getDisabled(o.item.item),
1902
1898
  style: { width: "100%" }
1903
1899
  }), {
1904
1900
  default: m(() => [
1905
- (f(!0), g(D, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(se), {
1901
+ (f(!0), g(S, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(se), {
1906
1902
  key: t.value,
1907
1903
  label: t.label,
1908
1904
  value: t.value
@@ -1913,27 +1909,27 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1913
1909
  key: 4,
1914
1910
  row: o.conf.update.form,
1915
1911
  field: o.item.item.key
1916
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1912
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1917
1913
  disabled: o.conf.update.getDisabled(o.item.item),
1918
1914
  style: { width: "100%" }
1919
1915
  }), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (f(), h(a(de), v({
1920
1916
  key: 5,
1921
1917
  modelValue: o.conf.update.form[o.item.item.key],
1922
1918
  "onUpdate:modelValue": u[4] || (u[4] = (t) => o.conf.update.form[o.item.item.key] = t)
1923
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1919
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1924
1920
  disabled: o.conf.update.getDisabled(o.item.item),
1925
1921
  style: { width: "100%" }
1926
1922
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (f(), h(a(ae), v({
1927
1923
  key: 6,
1928
1924
  modelValue: o.conf.update.form[o.item.item.key],
1929
1925
  "onUpdate:modelValue": u[5] || (u[5] = (t) => o.conf.update.form[o.item.item.key] = t)
1930
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1926
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1931
1927
  disabled: o.conf.update.getDisabled(o.item.item)
1932
1928
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (a(M).customComponent[o.item.item.type] || a(M).customComponent[o.item.item.type]?.form) ? (f(), h(q(a(M).customComponent[o.item.item.type]?.form || a(M).customComponent[o.item.item.type]), v({
1933
1929
  key: 7,
1934
1930
  modelValue: o.conf.update.form[o.item.item.key],
1935
1931
  "onUpdate:modelValue": u[6] || (u[6] = (t) => o.conf.update.form[o.item.item.key] = t)
1936
- }, o.conf.update.getBind(o.item.item), S(o.conf.update.getOn(o.item.item)), {
1932
+ }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1937
1933
  disabled: o.conf.update.getDisabled(o.item.item)
1938
1934
  }), null, 16, ["modelValue", "disabled"])) : k("", !0)
1939
1935
  ]),
@@ -1984,34 +1980,34 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1984
1980
  default: {}
1985
1981
  }
1986
1982
  },
1987
- setup(r, { expose: o }) {
1988
- const u = E.EDialog, t = r, i = E.isFun, { conf: l, switchConfirmRef: e, ruleFormRef: s } = Le(t);
1983
+ setup(i, { expose: o }) {
1984
+ const u = E.EDialog, t = i, r = E.isFun, { conf: l, switchConfirmRef: e, ruleFormRef: s } = Le(t);
1989
1985
  return o({
1990
1986
  conf: l
1991
1987
  }), (p, c) => {
1992
1988
  const b = we("loading");
1993
1989
  return f(), g("div", {
1994
- class: j(["relative cc1-form-box", [r.option.table?.fitHeight ? "col" : "no-min-height"]])
1990
+ class: j(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
1995
1991
  }, [
1996
1992
  F("div", {
1997
- class: j(["row", [r.option.table?.fitHeight ? "absolute fit" : ""]]),
1993
+ class: j(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
1998
1994
  style: { overflow: "hidden" }
1999
1995
  }, [
2000
1996
  C(p.$slots, "box-left"),
2001
1997
  F("div", {
2002
- class: j(["column fit-width no-wrap", [r.option.table?.fitHeight ? "col" : ""]])
1998
+ class: j(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
2003
1999
  }, [
2004
- r.option.search?.show !== !1 ? (f(), g("div", et, [
2000
+ i.option.search?.show !== !1 ? (f(), g("div", et, [
2005
2001
  z(a(N), {
2006
2002
  model: a(l).search.form,
2007
2003
  inline: "",
2008
- size: r.option.size?.search
2004
+ size: i.option.size?.search
2009
2005
  }, {
2010
2006
  default: m(() => [
2011
2007
  C(p.$slots, "search-start", {
2012
2008
  row: a(l).search.form
2013
2009
  }),
2014
- (f(!0), g(D, null, L(a(l).search.column.list, (n) => (f(), g(D, {
2010
+ (f(!0), g(S, null, L(a(l).search.column.list, (n) => (f(), g(S, {
2015
2011
  key: n.key
2016
2012
  }, [
2017
2013
  (typeof n.show?.search == "function" ? n.show?.search(a(l).search.form) : n.show?.search) ? (f(), h(a(G), {
@@ -2033,7 +2029,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2033
2029
  clearable: "",
2034
2030
  disabled: n.disabled?.search,
2035
2031
  ref_for: !0
2036
- }, n.options?.search?.input || n.options?.input, S(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (f(), h(a(W), v({
2032
+ }, n.options?.search?.input || n.options?.input, D(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (f(), h(a(W), v({
2037
2033
  key: 1,
2038
2034
  modelValue: a(l).search.form[n.key],
2039
2035
  "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
@@ -2041,7 +2037,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2041
2037
  clearable: "",
2042
2038
  disabled: n.disabled?.search,
2043
2039
  ref_for: !0
2044
- }, n.options?.search?.switch || n.options?.switch, S(n.options?.search?.switch?.on || n.options?.switch?.on || {})), {
2040
+ }, n.options?.search?.switch || n.options?.switch, D(n.options?.search?.switch?.on || n.options?.switch?.on || {})), {
2045
2041
  default: m(() => [
2046
2042
  (f(), h(a(K), {
2047
2043
  key: n.options?.switch?.activeValue,
@@ -2063,9 +2059,9 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2063
2059
  clearable: "",
2064
2060
  disabled: n.disabled?.search,
2065
2061
  ref_for: !0
2066
- }, n.options?.search?.select || n.options?.select, S(n.options?.search?.select?.on || n.options?.select?.on || {})), {
2062
+ }, n.options?.search?.select || n.options?.select, D(n.options?.search?.select?.on || n.options?.select?.on || {})), {
2067
2063
  default: m(() => [
2068
- (f(!0), g(D, null, L(n.options?.select?.data, (d) => (f(), h(a(K), {
2064
+ (f(!0), g(S, null, L(n.options?.select?.data, (d) => (f(), h(a(K), {
2069
2065
  key: d.value,
2070
2066
  label: d.label,
2071
2067
  value: d.value
@@ -2078,12 +2074,12 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2078
2074
  "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2079
2075
  disabled: n.disabled?.search,
2080
2076
  ref_for: !0
2081
- }, n.options?.search?.datetime || n.options?.datetime, S(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && a(M).customComponent[n.type] ? (f(), h(q(a(M).customComponent[n.type]), v({
2077
+ }, n.options?.search?.datetime || n.options?.datetime, D(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && a(M).customComponent[n.type] ? (f(), h(q(a(M).customComponent[n.type]), v({
2082
2078
  key: 4,
2083
2079
  modelValue: a(l).search.form[n.key],
2084
2080
  "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2085
2081
  ref_for: !0
2086
- }, n.options?.search?.[n.type] || n.options?.[n.type], S(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
2082
+ }, n.options?.search?.[n.type] || n.options?.[n.type], D(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
2087
2083
  disabled: n.disabled?.search
2088
2084
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
2089
2085
  ]),
@@ -2097,9 +2093,9 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2097
2093
  C(p.$slots, "search-center", {
2098
2094
  row: a(l).search.form
2099
2095
  }),
2100
- r.option.tools?.search || r.option.tools?.reset ? (f(), h(a(G), { key: 0 }, {
2096
+ i.option.tools?.search || i.option.tools?.reset ? (f(), h(a(G), { key: 0 }, {
2101
2097
  default: m(() => [
2102
- r.option.tools?.search ? (f(), h(a(T), {
2098
+ i.option.tools?.search ? (f(), h(a(T), {
2103
2099
  key: 0,
2104
2100
  type: "primary",
2105
2101
  onClick: a(l).search.submit
@@ -2109,7 +2105,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2109
2105
  ]),
2110
2106
  _: 1
2111
2107
  }, 8, ["onClick"])) : k("", !0),
2112
- r.option.tools?.reset ? (f(), h(a(T), {
2108
+ i.option.tools?.reset ? (f(), h(a(T), {
2113
2109
  key: 1,
2114
2110
  onClick: a(l).search.reset
2115
2111
  }, {
@@ -2130,11 +2126,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2130
2126
  ])) : k("", !0),
2131
2127
  F("div", tt, [
2132
2128
  F("div", ot, [
2133
- a(i)(r.option.tools?.add) ? (f(), g("div", at, [
2129
+ a(r)(i.option.tools?.add) ? (f(), g("div", at, [
2134
2130
  z(a(T), {
2135
2131
  type: "primary",
2136
2132
  onClick: c[0] || (c[0] = (n) => a(l).update.open(a(u).Add)),
2137
- size: r.option.size?.search
2133
+ size: i.option.size?.search
2138
2134
  }, {
2139
2135
  default: m(() => [
2140
2136
  $(U(a(y).tCurd("add")), 1)
@@ -2142,11 +2138,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2142
2138
  _: 1
2143
2139
  }, 8, ["size"])
2144
2140
  ])) : k("", !0),
2145
- r.option.table?.selectable && a(i)(r.option.tools?.delete) ? (f(), g("div", lt, [
2141
+ i.option.table?.selectable && a(r)(i.option.tools?.delete) ? (f(), g("div", lt, [
2146
2142
  z(a(T), {
2147
2143
  type: "danger",
2148
2144
  onClick: c[1] || (c[1] = (n) => a(l).remove.open(a(l).table.selection.list)),
2149
- size: r.option.size?.search
2145
+ size: i.option.size?.search
2150
2146
  }, {
2151
2147
  default: m(() => [
2152
2148
  $(U(a(y).tCurd("delete")), 1)
@@ -2154,11 +2150,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2154
2150
  _: 1
2155
2151
  }, 8, ["size"])
2156
2152
  ])) : k("", !0),
2157
- r.option.tools?.expand ? (f(), g("div", nt, [
2153
+ i.option.tools?.expand ? (f(), g("div", nt, [
2158
2154
  z(a(T), {
2159
2155
  type: "warning",
2160
2156
  onClick: c[2] || (c[2] = (n) => a(l).table.expand.all()),
2161
- size: r.option.size?.search
2157
+ size: i.option.size?.search
2162
2158
  }, {
2163
2159
  default: m(() => [
2164
2160
  $(U(a(y).tCurd("expandCollapse")), 1)
@@ -2166,17 +2162,17 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2166
2162
  _: 1
2167
2163
  }, 8, ["size"])
2168
2164
  ])) : k("", !0),
2169
- r.option.tools?.export?.show ? (f(), g(D, { key: 3 }, [
2170
- r.option.tools?.export?.dropdown?.show ? (f(), h(a(he), {
2165
+ i.option.tools?.export?.show ? (f(), g(S, { key: 3 }, [
2166
+ i.option.tools?.export?.dropdown?.show ? (f(), h(a(he), {
2171
2167
  key: 0,
2172
2168
  onCommand: a(l).export.click
2173
2169
  }, {
2174
2170
  dropdown: m(() => [
2175
2171
  z(a(ye), {
2176
- size: r.option.size?.search
2172
+ size: i.option.size?.search
2177
2173
  }, {
2178
2174
  default: m(() => [
2179
- r.option.tools?.export?.dropdown?.select && (r.option.table?.selectable || a(i)(r.option.tools?.delete)) ? (f(), h(a(x), {
2175
+ i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || a(r)(i.option.tools?.delete)) ? (f(), h(a(x), {
2180
2176
  key: 0,
2181
2177
  command: "select"
2182
2178
  }, {
@@ -2185,7 +2181,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2185
2181
  ]),
2186
2182
  _: 1
2187
2183
  })) : k("", !0),
2188
- r.option.tools?.export?.dropdown?.page ? (f(), h(a(x), {
2184
+ i.option.tools?.export?.dropdown?.page ? (f(), h(a(x), {
2189
2185
  key: 1,
2190
2186
  command: "page"
2191
2187
  }, {
@@ -2194,7 +2190,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2194
2190
  ]),
2195
2191
  _: 1
2196
2192
  })) : k("", !0),
2197
- r.option.tools?.export?.dropdown?.all ? (f(), h(a(x), {
2193
+ i.option.tools?.export?.dropdown?.all ? (f(), h(a(x), {
2198
2194
  key: 2,
2199
2195
  command: "all"
2200
2196
  }, {
@@ -2212,7 +2208,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2212
2208
  z(a(T), {
2213
2209
  type: "warning",
2214
2210
  loading: a(l).export.loading,
2215
- size: r.option.size?.search
2211
+ size: i.option.size?.search
2216
2212
  }, {
2217
2213
  default: m(() => [
2218
2214
  $(U(a(y).tCurd("export")), 1)
@@ -2226,7 +2222,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2226
2222
  z(a(T), {
2227
2223
  type: "warning",
2228
2224
  loading: a(l).export.loading,
2229
- size: r.option.size?.search,
2225
+ size: i.option.size?.search,
2230
2226
  onClick: c[3] || (c[3] = (n) => a(l).export.run.start("all"))
2231
2227
  }, {
2232
2228
  default: m(() => [
@@ -2251,13 +2247,13 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2251
2247
  "pager-count": a(l).page.pagerCount,
2252
2248
  layout: a(l).page.layout,
2253
2249
  total: a(l).page.total,
2254
- size: r.option.size?.table,
2250
+ size: i.option.size?.table,
2255
2251
  onSizeChange: a(l).table.getList,
2256
2252
  onCurrentChange: a(l).table.getList
2257
- }, r.option.page?.pagination || {}, S(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0),
2258
- r.option.tools?.refresh === void 0 || r.option.tools?.refresh ? (f(), g("div", {
2253
+ }, i.option.page?.pagination || {}, D(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0),
2254
+ i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (f(), g("div", {
2259
2255
  key: 1,
2260
- class: j(["refresh-btn", [r.option.size?.search]]),
2256
+ class: j(["refresh-btn", [i.option.size?.search]]),
2261
2257
  onClick: c[6] || (c[6] = //@ts-ignore
2262
2258
  (...n) => a(l).table.getList && a(l).table.getList(...n))
2263
2259
  }, [
@@ -2266,33 +2262,33 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2266
2262
  ])
2267
2263
  ]),
2268
2264
  F("div", {
2269
- class: j(["fit-width relative form-box", [r.option.table?.fitHeight ? "col " : ""]])
2265
+ class: j(["fit-width relative form-box", [i.option.table?.fitHeight ? "col " : ""]])
2270
2266
  }, [
2271
2267
  F("div", {
2272
- class: j(["column form-box-content", [r.option.table?.fitHeight ? "absolute fit" : ""]])
2268
+ class: j(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
2273
2269
  }, [
2274
2270
  ke((f(), h(a(ge), v({
2275
2271
  data: a(l).table.data,
2276
- border: r.option.table?.border === void 0 ? !0 : r.option.table?.border,
2272
+ border: i.option.table?.border === void 0 ? !0 : i.option.table?.border,
2277
2273
  onSelectionChange: a(l).table.selection.change,
2278
2274
  onSortChange: a(l).table.sort.change,
2279
2275
  "expand-row-keys": a(l).table.expand.rowKeys,
2280
2276
  onExpandChange: a(l).table.expand.change
2281
- }, r.option.table, S(r.option.table?.on || {})), {
2277
+ }, i.option.table, D(i.option.table?.on || {})), {
2282
2278
  default: m(() => [
2283
- r.option.table?.selectable || a(i)(r.option.tools?.delete) || r.option.tools?.export?.show ? (f(), h(a(ee), {
2279
+ (typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || a(r)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (f(), h(a(ee), v({
2284
2280
  key: 0,
2285
2281
  type: "selection",
2286
- selectable: typeof r.option.table?.selectable == "function" ? r.option.table?.selectable : void 0,
2287
2282
  width: "40",
2288
2283
  align: "center",
2289
2284
  fixed: "left",
2290
- "show-overflow-tooltip": !1
2291
- }, null, 8, ["selectable"])) : k("", !0),
2285
+ "show-overflow-tooltip": !1,
2286
+ className: "cc1-form-selectable-column"
2287
+ }, typeof i.option.table?.selectable == "object" ? i.option.table?.selectable : {}, D(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.on || {} : {})), null, 16)) : k("", !0),
2292
2288
  z(Ge, {
2293
2289
  conf: a(l),
2294
2290
  columnList: a(l).table.column.list,
2295
- option: r.option
2291
+ option: i.option
2296
2292
  }, te({ _: 2 }, [
2297
2293
  L(p.$slots, (n, d) => ({
2298
2294
  name: d,
@@ -2301,12 +2297,12 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2301
2297
  ])
2302
2298
  }))
2303
2299
  ]), 1032, ["conf", "columnList", "option"]),
2304
- a(i)(r.option.table?.add) || a(i)(r.option.table?.update) || a(i)(r.option.table?.delete) || a(i)(r.option.table?.view) || p.$slots["table-op-left"] || p.$slots["table-op-right"] ? (f(), h(a(ee), v({
2300
+ a(r)(i.option.table?.add) || a(r)(i.option.table?.update) || a(r)(i.option.table?.delete) || a(r)(i.option.table?.view) || p.$slots["table-op-left"] || p.$slots["table-op-right"] ? (f(), h(a(ee), v({
2305
2301
  key: 1,
2306
- width: a(l).table.op.width(a(i)(r.option.table?.add), a(i)(r.option.table?.update), a(i)(r.option.table?.delete), a(i)(r.option.table?.view), p.$slots["table-op-left"], p.$slots["table-op-right"]),
2302
+ width: a(l).table.op.width(a(r)(i.option.table?.add), a(r)(i.option.table?.update), a(r)(i.option.table?.delete), a(r)(i.option.table?.view), p.$slots["table-op-left"], p.$slots["table-op-right"]),
2307
2303
  align: "center",
2308
2304
  fixed: "right"
2309
- }, r.option.table?.operate), {
2305
+ }, i.option.table?.operate), {
2310
2306
  header: m(() => [
2311
2307
  C(p.$slots, "table-header-op", {}, () => [
2312
2308
  $(U(a(y).tCurd("operation")), 1)
@@ -2314,11 +2310,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2314
2310
  ]),
2315
2311
  default: m(({ row: n }) => [
2316
2312
  z(a(N), {
2317
- size: r.option.size?.table
2313
+ size: i.option.size?.table
2318
2314
  }, {
2319
2315
  default: m(() => [
2320
2316
  C(p.$slots, "table-op-left", { row: n }),
2321
- r.option.table?.inlineEdit && a(l).inlineEdit.data === n ? (f(), g(D, { key: 0 }, [
2317
+ i.option.table?.inlineEdit && a(l).inlineEdit.data === n ? (f(), g(S, { key: 0 }, [
2322
2318
  z(a(T), {
2323
2319
  link: "",
2324
2320
  type: "info",
@@ -2341,8 +2337,8 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2341
2337
  _: 1
2342
2338
  }, 8, ["onClick", "loading"]),
2343
2339
  C(p.$slots, "table-op-edit-right", { row: n })
2344
- ], 64)) : (f(), g(D, { key: 1 }, [
2345
- a(i)(r.option.table?.add, n) ? (f(), h(a(T), {
2340
+ ], 64)) : (f(), g(S, { key: 1 }, [
2341
+ a(r)(i.option.table?.add, n) ? (f(), h(a(T), {
2346
2342
  key: 0,
2347
2343
  link: "",
2348
2344
  type: "primary",
@@ -2353,7 +2349,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2353
2349
  ]),
2354
2350
  _: 2
2355
2351
  }, 1032, ["onClick"])) : k("", !0),
2356
- a(i)(r.option.table?.view, n) ? (f(), h(a(T), {
2352
+ a(r)(i.option.table?.view, n) ? (f(), h(a(T), {
2357
2353
  key: 1,
2358
2354
  link: "",
2359
2355
  type: "primary",
@@ -2364,7 +2360,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2364
2360
  ]),
2365
2361
  _: 2
2366
2362
  }, 1032, ["onClick"])) : k("", !0),
2367
- a(i)(r.option.table?.update, n) ? (f(), h(a(T), {
2363
+ a(r)(i.option.table?.update, n) ? (f(), h(a(T), {
2368
2364
  key: 2,
2369
2365
  link: "",
2370
2366
  type: "warning",
@@ -2375,7 +2371,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2375
2371
  ]),
2376
2372
  _: 2
2377
2373
  }, 1032, ["onClick"])) : k("", !0),
2378
- a(i)(r.option.table?.delete, n) ? (f(), h(a(T), {
2374
+ a(r)(i.option.table?.delete, n) ? (f(), h(a(T), {
2379
2375
  key: 3,
2380
2376
  link: "",
2381
2377
  type: "danger",
@@ -2402,7 +2398,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2402
2398
  ], 2)
2403
2399
  ], 2),
2404
2400
  F("div", dt, [
2405
- (r.option.page?.show === void 0 || r.option.page?.show) && !a(l).page.showTools ? (f(), h(a(ie), v({
2401
+ (i.option.page?.show === void 0 || i.option.page?.show) && !a(l).page.showTools ? (f(), h(a(ie), v({
2406
2402
  key: 0,
2407
2403
  "current-page": a(l).page.num,
2408
2404
  "onUpdate:currentPage": c[7] || (c[7] = (n) => a(l).page.num = n),
@@ -2413,10 +2409,10 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2413
2409
  "pager-count": a(l).page.pagerCount,
2414
2410
  layout: a(l).page.layout,
2415
2411
  total: a(l).page.total,
2416
- size: r.option.size?.table,
2412
+ size: i.option.size?.table,
2417
2413
  onSizeChange: a(l).table.getList,
2418
2414
  onCurrentChange: a(l).table.getList
2419
- }, r.option.page?.pagination || {}, S(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0)
2415
+ }, i.option.page?.pagination || {}, D(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0)
2420
2416
  ])
2421
2417
  ], 2),
2422
2418
  C(p.$slots, "box-right")
@@ -2426,11 +2422,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2426
2422
  "onUpdate:modelValue": c[9] || (c[9] = (n) => a(l).update.show = n),
2427
2423
  title: a(l).update.title,
2428
2424
  "before-close": a(l).update.close
2429
- }, r.option.dialog), {
2425
+ }, i.option.dialog), {
2430
2426
  footer: m(() => [
2431
2427
  F("span", ut, [
2432
2428
  z(a(N), {
2433
- size: r.option.size?.form
2429
+ size: i.option.size?.form
2434
2430
  }, {
2435
2431
  default: m(() => [
2436
2432
  z(a(T), {
@@ -2463,11 +2459,11 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2463
2459
  ref: s,
2464
2460
  model: a(l).update.form,
2465
2461
  rules: a(l).update.rules,
2466
- size: r.option.size?.form
2462
+ size: i.option.size?.form
2467
2463
  }, {
2468
2464
  default: m(() => [
2469
- a(l).update.showContent ? (f(!0), g(D, { key: 0 }, L(a(l).update.formColumn, (n) => (f(), g(D, null, [
2470
- a(i)(
2465
+ a(l).update.showContent ? (f(!0), g(S, { key: 0 }, L(a(l).update.formColumn, (n) => (f(), g(S, null, [
2466
+ a(r)(
2471
2467
  (() => {
2472
2468
  const d = [], V = (w) => {
2473
2469
  w?.item?.children ? V(w.item.children) : d.push(...w.map((A) => A.item?.show?.form));
@@ -2479,18 +2475,18 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2479
2475
  ) ? (f(), g("div", {
2480
2476
  key: 0,
2481
2477
  class: j(["row curd-row", {
2482
- stripe: r.option.form?.stripe === void 0 ? !0 : r.option.form?.stripe
2478
+ stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
2483
2479
  }])
2484
2480
  }, [
2485
2481
  C(p.$slots, "form-start", {
2486
2482
  row: a(l).update.form
2487
2483
  }),
2488
- (f(!0), g(D, null, L(n, (d) => (f(), g(D, null, [
2489
- a(i)(d.item.show?.form, a(l).update.form, a(l).update.type) ? (f(), g("div", {
2484
+ (f(!0), g(S, null, L(n, (d) => (f(), g(S, null, [
2485
+ a(r)(d.item.show?.form, a(l).update.form, a(l).update.type) ? (f(), g("div", {
2490
2486
  key: 0,
2491
2487
  class: j([d.item.form.span > 0 ? `col-${a(l).getColumnSpan(d, n)}` : "col", `form-item-col-${d.item.key}`])
2492
2488
  }, [
2493
- (f(!0), g(D, null, L(d.item.children ? d.children : [d], (V) => (f(), h(_e, {
2489
+ (f(!0), g(S, null, L(d.item.children ? d.children : [d], (V) => (f(), h(_e, {
2494
2490
  key: V.item.key,
2495
2491
  conf: a(l),
2496
2492
  item: V
@@ -2524,7 +2520,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2524
2520
  footer: m(() => [
2525
2521
  F("span", ft, [
2526
2522
  z(a(N), {
2527
- size: r.option.size?.form
2523
+ size: i.option.size?.form
2528
2524
  }, {
2529
2525
  default: m(() => [
2530
2526
  z(a(T), {
@@ -2558,7 +2554,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2558
2554
  z(Be, {
2559
2555
  ref_key: "switchConfirmRef",
2560
2556
  ref: e,
2561
- size: r.option.size?.form
2557
+ size: i.option.size?.form
2562
2558
  }, null, 8, ["size"])
2563
2559
  ], 2);
2564
2560
  };
@@ -2581,8 +2577,8 @@ class gt {
2581
2577
  * @param name
2582
2578
  */
2583
2579
  static exportJSONFile = (o, u) => {
2584
- const t = new Blob([JSON.stringify(o)], { type: "application/json" }), i = URL.createObjectURL(t), l = document.createElement("a");
2585
- l.href = i, l.download = `${u || "config"}.json`, l.click();
2580
+ const t = new Blob([JSON.stringify(o)], { type: "application/json" }), r = URL.createObjectURL(t), l = document.createElement("a");
2581
+ l.href = r, l.download = `${u || "config"}.json`, l.click();
2586
2582
  };
2587
2583
  /**
2588
2584
  * 导入文件内容,默认为json
@@ -2590,10 +2586,10 @@ class gt {
2590
2586
  * @returns
2591
2587
  */
2592
2588
  static importFile = async (o) => new Promise((u, t) => {
2593
- const i = document.createElement("input");
2594
- i.type = "file";
2589
+ const r = document.createElement("input");
2590
+ r.type = "file";
2595
2591
  const l = o?.accept || ".json";
2596
- i.accept = l, i.style.display = "none", i.onchange = (e) => {
2592
+ r.accept = l, r.style.display = "none", r.onchange = (e) => {
2597
2593
  const s = e.target.files[0];
2598
2594
  if (!s) {
2599
2595
  E.fail("未选择文件"), t("未选择文件");
@@ -2605,15 +2601,15 @@ class gt {
2605
2601
  u(b);
2606
2602
  }, p.onerror = () => {
2607
2603
  E.fail("文件读取失败"), t("文件读取失败");
2608
- }, p.readAsText(s), document.body.removeChild(i);
2609
- }, document.body.appendChild(i), i.click();
2604
+ }, p.readAsText(s), document.body.removeChild(r);
2605
+ }, document.body.appendChild(r), r.click();
2610
2606
  });
2611
2607
  }
2612
- const ct = (r, o) => {
2613
- if (r.component("TCurd", pt), r.component("TFormList", ne), r.component("TColumn", Ae), o?.customComponent) {
2608
+ const ct = (i, o) => {
2609
+ if (i.component("TCurd", pt), i.component("TFormList", ne), i.component("TColumn", Ae), o?.customComponent) {
2614
2610
  M.customComponent = o.customComponent;
2615
2611
  for (const u in o.customComponent)
2616
- r.component(u, o.customComponent[u]);
2612
+ i.component(u, o.customComponent[u]);
2617
2613
  }
2618
2614
  }, bt = {
2619
2615
  install: ct