cc1-form 1.2.25 → 1.2.26

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
@@ -27,7 +27,7 @@ class S {
27
27
  * @param data 数据
28
28
  * @returns 是否显示
29
29
  */
30
- static isFun = (n, ...l) => Array.isArray(n) ? n.some((o) => typeof o == "function" ? o(...l) : o) : typeof n == "function" ? n(...l) : n;
30
+ static isFun = (n, ...l) => Array.isArray(n) ? n.some((a) => typeof a == "function" ? a(...l) : a) : typeof n == "function" ? n(...l) : n;
31
31
  /**
32
32
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
33
33
  */
@@ -63,18 +63,18 @@ class S {
63
63
  * @param type 消息类型
64
64
  * @param options 其他选项
65
65
  */
66
- static showMessage(n, l, o = {}) {
66
+ static showMessage(n, l, a = {}) {
67
67
  const i = Date.now();
68
68
  if (!this.tipMessages[n] || i - this.tipMessages[n] > this.tipMessagesGap) {
69
69
  this.tipMessages[n] = i;
70
- const a = Object.assign(
70
+ const o = Object.assign(
71
71
  {
72
72
  message: n,
73
73
  type: l
74
74
  },
75
- o
75
+ a
76
76
  );
77
- Ie(a), setTimeout(() => {
77
+ Ie(o), setTimeout(() => {
78
78
  delete this.tipMessages[n];
79
79
  }, this.tipMessagesGap);
80
80
  }
@@ -118,11 +118,11 @@ class S {
118
118
  */
119
119
  static openUrl = (n, l = !0) => {
120
120
  if (l) {
121
- let o = screen.width / 2 - 500, i = screen.height / 2 - 800 / 2 - 30;
121
+ let a = screen.width / 2 - 500, i = screen.height / 2 - 800 / 2 - 30;
122
122
  window.open(
123
123
  n,
124
124
  "_blank",
125
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + i + ", left=" + o
125
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + i + ", left=" + a
126
126
  );
127
127
  } else
128
128
  window.open(n, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
@@ -132,11 +132,11 @@ class S {
132
132
  * @param param
133
133
  * @returns
134
134
  */
135
- static getImgPic = (n) => new Promise(async (l, o) => {
135
+ static getImgPic = (n) => new Promise(async (l, a) => {
136
136
  let i = document.getElementById(n.id);
137
- const a = await S.loadModule("html2canvas");
137
+ const o = await S.loadModule("html2canvas");
138
138
  try {
139
- a(i, {
139
+ o(i, {
140
140
  logging: !1,
141
141
  allowTaint: !0,
142
142
  scale: window.devicePixelRatio,
@@ -151,7 +151,7 @@ class S {
151
151
  l(s);
152
152
  });
153
153
  } catch (t) {
154
- o(t);
154
+ a(t);
155
155
  }
156
156
  });
157
157
  }
@@ -539,9 +539,9 @@ class P {
539
539
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
540
540
  */
541
541
  static findOptions = (n, l) => {
542
- const o = n.column.find((a) => a.key === l), i = (a) => a.replace(/-([a-z])/g, (t, s) => s.toUpperCase());
543
- if (o)
544
- return o.options[i(o.type)];
542
+ const a = n.column.find((o) => o.key === l), i = (o) => o.replace(/-([a-z])/g, (t, s) => s.toUpperCase());
543
+ if (a)
544
+ return a.options[i(a.type)];
545
545
  };
546
546
  /**
547
547
  * 更新组件数据
@@ -559,9 +559,9 @@ class P {
559
559
  }))
560
560
  )
561
561
  */
562
- static setOptionsData = (n, l, o) => {
562
+ static setOptionsData = (n, l, a) => {
563
563
  const i = P.findOptions(n, l);
564
- i && (i.data = o);
564
+ i && (i.data = a);
565
565
  };
566
566
  static form = {
567
567
  openBefore: {
@@ -572,9 +572,9 @@ class P {
572
572
  * @param treeData 树形数据
573
573
  * @param option 组件配置
574
574
  */
575
- parentId: (n, l, o, i) => {
576
- const a = M.config.table.rowKey;
577
- n ? l.type === S.EDialog.Add ? (l.form.parentId = n[a], l.form.sort = n.children.length + 1) : l.form.parentId = n.parentId.substring(n.parentId.lastIndexOf(",") + 1) : (l.form.parentId = "0", l.form.sort = o.length + 1), P.setOptionsData(i, "parentId", [{ [a]: "0", title: "根", children: o }]);
575
+ parentId: (n, l, a, i) => {
576
+ const o = M.config.table.rowKey;
577
+ n ? l.type === S.EDialog.Add ? (l.form.parentId = n[o], l.form.sort = n.children.length + 1) : l.form.parentId = n.parentId.substring(n.parentId.lastIndexOf(",") + 1) : (l.form.parentId = "0", l.form.sort = a.length + 1), P.setOptionsData(i, "parentId", [{ [o]: "0", title: "根", children: a }]);
578
578
  }
579
579
  }
580
580
  };
@@ -589,14 +589,14 @@ class N {
589
589
  * @param field 字段名
590
590
  * @param row 行数据
591
591
  */
592
- static setId = (n, l, o) => {
592
+ static setId = (n, l, a) => {
593
593
  l[n] || (l[n] = []);
594
594
  const i = M.config.table.rowKey;
595
- l[n].forEach((a) => {
596
- o.forEach((t) => {
595
+ l[n].forEach((o) => {
596
+ a.forEach((t) => {
597
597
  let s = t.default ?? "";
598
- t.type === "number" && (s = t.default ?? 0), t.type === "boolean" && (s = t.default ?? !1), t.type === "time" && (s = t.default ?? /* @__PURE__ */ new Date()), a[t.value] === void 0 && (a[t.value] = s);
599
- }), a[i] || (a[i] = N.getIdFun());
598
+ t.type === "number" && (s = t.default ?? 0), t.type === "boolean" && (s = t.default ?? !1), t.type === "time" && (s = t.default ?? /* @__PURE__ */ new Date()), o[t.value] === void 0 && (o[t.value] = s);
599
+ }), o[i] || (o[i] = N.getIdFun());
600
600
  });
601
601
  };
602
602
  /**
@@ -606,15 +606,15 @@ class N {
606
606
  * @param itemFields 元素字段-如:[{label:'',value:''}]
607
607
  * @param callback 回调函数
608
608
  */
609
- static add = (n, l, o, i) => {
610
- const a = JSONUtil.cp(o);
611
- N.setId(n, l, o);
609
+ static add = (n, l, a, i) => {
610
+ const o = JSONUtil.cp(a);
611
+ N.setId(n, l, a);
612
612
  const t = M.config.table.rowKey;
613
613
  l[n].push(
614
- a.reduce(
615
- (s, c) => {
616
- let d = c.default ?? "";
617
- return c.type === "number" && (d = c.default ?? 0), c.type === "boolean" && (d = c.default ?? !1), c.type === "time" && (d = c.default ?? /* @__PURE__ */ new Date()), s[c.value] = d, s;
614
+ o.reduce(
615
+ (s, f) => {
616
+ let d = f.default ?? "";
617
+ return f.type === "number" && (d = f.default ?? 0), f.type === "boolean" && (d = f.default ?? !1), f.type === "time" && (d = f.default ?? /* @__PURE__ */ new Date()), s[f.value] = d, s;
618
618
  },
619
619
  { [t]: N.getIdFun() }
620
620
  )
@@ -627,9 +627,9 @@ class N {
627
627
  * @param item 元素-如:{_id:''}
628
628
  * @param callback 回调函数
629
629
  */
630
- static remove = (n, l, o, i) => {
631
- const a = M.config.table.rowKey;
632
- l[n] = l[n].filter((t) => t[a] !== o[a]), i?.(l);
630
+ static remove = (n, l, a, i) => {
631
+ const o = M.config.table.rowKey;
632
+ l[n] = l[n].filter((t) => t[o] !== a[o]), i?.(l);
633
633
  };
634
634
  /**
635
635
  * 获取没有id的数据
@@ -638,10 +638,10 @@ class N {
638
638
  * @returns 没有id的数据
639
639
  */
640
640
  static getNoIdData = (n, l) => {
641
- const o = JSONUtil.cp(n), i = M.config.table.rowKey;
642
- return o.forEach((a) => {
643
- a[i] && delete a[i], l && a[l] && N.getNoIdData(a[l], l);
644
- }), o;
641
+ const a = JSONUtil.cp(n), i = M.config.table.rowKey;
642
+ return a.forEach((o) => {
643
+ o[i] && delete o[i], l && o[l] && N.getNoIdData(o[l], l);
644
+ }), a;
645
645
  };
646
646
  }
647
647
  const Ze = {
@@ -690,32 +690,32 @@ const Ze = {
690
690
  },
691
691
  emits: ["change"],
692
692
  setup(e, { emit: n }) {
693
- const l = e, o = me({
693
+ const l = e, a = me({
694
694
  show: !1,
695
- add: (a, t, s) => {
696
- N.add(a, t, s, () => {
695
+ add: (o, t, s) => {
696
+ N.add(o, t, s, () => {
697
697
  i("change");
698
698
  });
699
699
  },
700
- remove: (a, t, s) => {
701
- N.remove(a, t, s, () => {
700
+ remove: (o, t, s) => {
701
+ N.remove(o, t, s, () => {
702
702
  i("change");
703
703
  });
704
704
  }
705
705
  });
706
706
  Ve(() => {
707
- N.setId(l.field, l.row, l.itemFields), o.show = !0;
707
+ N.setId(l.field, l.row, l.itemFields), a.show = !0;
708
708
  });
709
709
  const i = n;
710
- return (a, t) => {
711
- const s = ae("el-button"), c = ae("el-input");
712
- return o.show ? (u(), p("div", Ze, [
713
- k(a.$slots, "list-start", { row: e.row }),
710
+ return (o, t) => {
711
+ const s = ae("el-button"), f = ae("el-input");
712
+ return a.show ? (u(), p("div", Ze, [
713
+ k(o.$slots, "list-start", { row: e.row }),
714
714
  e.addBottom ? w("", !0) : (u(), p("div", _e, [
715
715
  $(s, {
716
716
  link: "",
717
717
  type: "primary",
718
- onClick: t[0] || (t[0] = (d) => o.add(e.field, e.row, e.itemFields))
718
+ onClick: t[0] || (t[0] = (d) => a.add(e.field, e.row, e.itemFields))
719
719
  }, {
720
720
  default: y(() => [...t[3] || (t[3] = [
721
721
  V("添加", -1)
@@ -724,26 +724,26 @@ const Ze = {
724
724
  })
725
725
  ])),
726
726
  (u(!0), p(F, null, j(e.row[e.field], (d) => (u(), p("div", et, [
727
- k(a.$slots, "item-start", {
727
+ k(o.$slots, "item-start", {
728
728
  item: d,
729
729
  row: e.row
730
730
  }),
731
- (u(!0), p(F, null, j(e.itemFields, (f) => (u(), h(c, {
732
- modelValue: d[f.value],
733
- "onUpdate:modelValue": (v) => d[f.value] = v,
731
+ (u(!0), p(F, null, j(e.itemFields, (c) => (u(), h(f, {
732
+ modelValue: d[c.value],
733
+ "onUpdate:modelValue": (v) => d[c.value] = v,
734
734
  style: de({ width: e.inputWidth }),
735
735
  class: I(e.inputClass),
736
- placeholder: f[e.label] || f[e.value],
736
+ placeholder: c[e.label] || c[e.value],
737
737
  onChange: t[1] || (t[1] = (v) => i("change"))
738
738
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
739
- k(a.$slots, "item-end", {
739
+ k(o.$slots, "item-end", {
740
740
  item: d,
741
741
  row: e.row
742
742
  }),
743
743
  $(s, {
744
744
  link: "",
745
745
  type: "danger",
746
- onClick: (f) => o.remove(e.field, e.row, d)
746
+ onClick: (c) => a.remove(e.field, e.row, d)
747
747
  }, {
748
748
  default: y(() => [...t[4] || (t[4] = [
749
749
  V("删除", -1)
@@ -755,7 +755,7 @@ const Ze = {
755
755
  $(s, {
756
756
  link: "",
757
757
  type: "primary",
758
- onClick: t[2] || (t[2] = (d) => o.add(e.field, e.row, e.itemFields))
758
+ onClick: t[2] || (t[2] = (d) => a.add(e.field, e.row, e.itemFields))
759
759
  }, {
760
760
  default: y(() => [...t[5] || (t[5] = [
761
761
  V("添加", -1)
@@ -763,7 +763,7 @@ const Ze = {
763
763
  _: 1
764
764
  })
765
765
  ])) : w("", !0),
766
- k(a.$slots, "list-end", { row: e.row })
766
+ k(o.$slots, "list-end", { row: e.row })
767
767
  ])) : w("", !0);
768
768
  };
769
769
  }
@@ -802,7 +802,7 @@ const Ze = {
802
802
  e.item.type === "input" ? (u(), h(r(se), C({
803
803
  key: 0,
804
804
  modelValue: e.form[e.item.key],
805
- "onUpdate:modelValue": l[0] || (l[0] = (o) => e.form[e.item.key] = o)
805
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => e.form[e.item.key] = a)
806
806
  }, e.getBind(e.item), E(e.getOn(e.item)), {
807
807
  disabled: e.getDisabled(e.item)
808
808
  }), W({ _: 2 }, [
@@ -816,35 +816,35 @@ const Ze = {
816
816
  ]), 1040, ["modelValue", "disabled"])) : e.item.type === "switch" ? (u(), h(r(ie), C({
817
817
  key: 1,
818
818
  modelValue: e.form[e.item.key],
819
- "onUpdate:modelValue": l[1] || (l[1] = (o) => e.form[e.item.key] = o)
819
+ "onUpdate:modelValue": l[1] || (l[1] = (a) => e.form[e.item.key] = a)
820
820
  }, e.getBind(e.item), E(e.getOn(e.item)), {
821
821
  disabled: e.getDisabled(e.item)
822
822
  }), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (u(), h(r(oe), C({
823
823
  key: 2,
824
824
  modelValue: e.form[e.item.key],
825
- "onUpdate:modelValue": l[2] || (l[2] = (o) => e.form[e.item.key] = o)
825
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => e.form[e.item.key] = a)
826
826
  }, e.getBind(e.item), E(e.getOn(e.item)), {
827
827
  disabled: e.getDisabled(e.item),
828
828
  style: { width: "100%" }
829
829
  }), {
830
830
  default: y(() => [
831
- (u(!0), p(F, null, j(e.getBind(e.item).data || [], (o) => (u(), h(r(X), C({
832
- key: o.value
833
- }, { ref_for: !0 }, o, E(o.on || {})), null, 16))), 128))
831
+ (u(!0), p(F, null, j(e.getBind(e.item).data || [], (a) => (u(), h(r(X), C({
832
+ key: a.value
833
+ }, { ref_for: !0 }, a, E(a.on || {})), null, 16))), 128))
834
834
  ]),
835
835
  _: 1
836
836
  }, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (u(), h(r(Ce), C({
837
837
  key: 3,
838
838
  modelValue: e.form[e.item.key],
839
- "onUpdate:modelValue": l[3] || (l[3] = (o) => e.form[e.item.key] = o)
839
+ "onUpdate:modelValue": l[3] || (l[3] = (a) => e.form[e.item.key] = a)
840
840
  }, e.getBind(e.item), E(e.getOn(e.item)), {
841
841
  disabled: e.getDisabled(e.item),
842
842
  style: { width: "100%" }
843
843
  }), {
844
844
  default: y(() => [
845
- (u(!0), p(F, null, j(e.getBind(e.item).data || [], (o) => (u(), h(r(xe), C({
846
- key: o.value
847
- }, { ref_for: !0 }, o, E(o.on || {})), null, 16))), 128))
845
+ (u(!0), p(F, null, j(e.getBind(e.item).data || [], (a) => (u(), h(r(xe), C({
846
+ key: a.value
847
+ }, { ref_for: !0 }, a, E(a.on || {})), null, 16))), 128))
848
848
  ]),
849
849
  _: 1
850
850
  }, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (u(), h($e, C({
@@ -857,20 +857,20 @@ const Ze = {
857
857
  }), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (u(), h(r(He), C({
858
858
  key: 5,
859
859
  modelValue: e.form[e.item.key],
860
- "onUpdate:modelValue": l[4] || (l[4] = (o) => e.form[e.item.key] = o)
860
+ "onUpdate:modelValue": l[4] || (l[4] = (a) => e.form[e.item.key] = a)
861
861
  }, e.getBind(e.item), E(e.getOn(e.item)), {
862
862
  disabled: e.getDisabled(e.item),
863
863
  style: { width: "100%" }
864
864
  }), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (u(), h(r(Se), C({
865
865
  key: 6,
866
866
  modelValue: e.form[e.item.key],
867
- "onUpdate:modelValue": l[5] || (l[5] = (o) => e.form[e.item.key] = o)
867
+ "onUpdate:modelValue": l[5] || (l[5] = (a) => e.form[e.item.key] = a)
868
868
  }, e.getBind(e.item), E(e.getOn(e.item)), {
869
869
  disabled: e.getDisabled(e.item)
870
870
  }), null, 16, ["modelValue", "disabled"])) : e.item.type && (r(P).customComponent[e.item.type] || r(P).customComponent[e.item.type]?.form) ? (u(), h(Y(r(P).customComponent[e.item.type]?.form || r(P).customComponent[e.item.type]), C({
871
871
  key: 7,
872
872
  modelValue: e.form[e.item.key],
873
- "onUpdate:modelValue": l[6] || (l[6] = (o) => e.form[e.item.key] = o)
873
+ "onUpdate:modelValue": l[6] || (l[6] = (a) => e.form[e.item.key] = a)
874
874
  }, e.getBind(e.item), E(e.getOn(e.item)), {
875
875
  disabled: e.getDisabled(e.item)
876
876
  }), null, 16, ["modelValue", "disabled"])) : w("", !0)
@@ -943,8 +943,8 @@ class b {
943
943
  if (typeof n == "function")
944
944
  return n(...l);
945
945
  n = String(n);
946
- let o = 0;
947
- return n.replace(/{([^}]+)}/g, (i, a) => o < l.length ? String(l[o++]) : `{${a}}`);
946
+ let a = 0;
947
+ return n.replace(/{([^}]+)}/g, (i, o) => a < l.length ? String(l[a++]) : `{${o}}`);
948
948
  }
949
949
  static setI18n = (n) => {
950
950
  b.curd = ObjectUtil.deepMerge(b.curd, n);
@@ -956,52 +956,52 @@ class b {
956
956
  /** curd表单 */
957
957
  static curd = rt;
958
958
  }
959
- const K = 12, ce = (e, n) => {
960
- e.isForm = n, Array.isArray(e.children) && e.children.forEach((l) => ce(l, n));
959
+ const K = 12, ue = (e, n) => {
960
+ e.isForm = n, Array.isArray(e.children) && e.children.forEach((l) => ue(l, n));
961
961
  }, st = (e) => e.isForm === !1 ? !1 : typeof e.show?.form == "boolean" ? e.show.form : !0, dt = (e, n, l) => (e.form = e.form || { span: n }, l === "column" ? e.form.span = e.form.span ?? 12 : e.form.span = e.form.span ?? n, e.form.span), ve = (e) => {
962
962
  const n = e.form;
963
963
  return n?.row != null && n.row > 0 ? n.row : K;
964
- }, ue = (e) => Math.floor((e.gridRow - 1) / K), Ee = (e, n, l) => {
964
+ }, ce = (e) => Math.floor((e.gridRow - 1) / K), Ee = (e, n, l) => {
965
965
  if (n === S.EDialog.View)
966
966
  return e.disabled?.view === void 0 ? !0 : S.isFun(e.disabled?.view, l);
967
- const o = e.disabled?.[n === S.EDialog.Add ? "create" : "update"];
968
- return S.isFun(o, l);
967
+ const a = e.disabled?.[n === S.EDialog.Add ? "create" : "update"];
968
+ return S.isFun(a, l);
969
969
  }, De = (e, n) => e.options?.[n === S.EDialog.Add ? "formAdd" : "formUpdate"]?.[e.type] || e.options?.[e.type] || {}, Oe = (e, n, l = []) => {
970
- const i = e.options?.[n === S.EDialog.Add ? "formAdd" : "formUpdate"]?.[e.type]?.on || e.options?.[e.type]?.on || {}, a = {};
970
+ const i = e.options?.[n === S.EDialog.Add ? "formAdd" : "formUpdate"]?.[e.type]?.on || e.options?.[e.type]?.on || {}, o = {};
971
971
  return Object.keys(i).forEach((t) => {
972
972
  const s = i[t];
973
- typeof s == "function" ? a[t] = function(...c) {
974
- return s.apply(this, [...c, ...l]);
975
- } : a[t] = s;
976
- }), a;
977
- }, Me = (e, n, l, o, i) => {
978
- const a = e, t = a.colSpan ?? e.span;
973
+ typeof s == "function" ? o[t] = function(...f) {
974
+ return s.apply(this, [...f, ...l]);
975
+ } : o[t] = s;
976
+ }), o;
977
+ }, Me = (e, n, l, a, i) => {
978
+ const o = e, t = o.colSpan ?? e.span;
979
979
  if (!e.item.form?.spanCol)
980
980
  return t;
981
- const s = i?.maxSpan || 12, c = i?.defaultSpan || s / 2, d = a.gridBand, v = n.filter((m) => d != null ? m.gridBand === d && !S.isFun(m.item.show?.form, l, o) : m.gridRow === a.gridRow && !S.isFun(m.item.show?.form, l, o)).reduce((m, g) => m + (g.colSpan ?? g.span ?? c), 0);
981
+ const s = i?.maxSpan || 12, f = i?.defaultSpan || s / 2, d = o.gridBand, v = n.filter((m) => d != null ? m.gridBand === d && !S.isFun(m.item.show?.form, l, a) : m.gridRow === o.gridRow && !S.isFun(m.item.show?.form, l, a)).reduce((m, g) => m + (g.colSpan ?? g.span ?? f), 0);
982
982
  return t + v;
983
983
  }, Fe = (e) => {
984
984
  const n = /* @__PURE__ */ new Map();
985
985
  return e.forEach((l) => {
986
- const o = l.gridBand ?? ue(l);
987
- n.has(o) || n.set(o, []), n.get(o).push(l);
988
- }), Array.from(n.keys()).sort((l, o) => l - o).map((l) => n.get(l));
989
- }, Ue = (e) => e?.length ? Array.isArray(e[0]) ? e.flat() : e : [], ct = (e, n) => {
986
+ const a = l.gridBand ?? ce(l);
987
+ n.has(a) || n.set(a, []), n.get(a).push(l);
988
+ }), Array.from(n.keys()).sort((l, a) => l - a).map((l) => n.get(l));
989
+ }, Ue = (e) => e?.length ? Array.isArray(e[0]) ? e.flat() : e : [], ut = (e, n) => {
990
990
  if (!st(e) || !e.key) return null;
991
- const l = n.defaultSpan ?? (n.maxSpan || 12) / 2, o = dt(e, l, n.layout);
992
- return { item: e, span: o };
993
- }, ut = (e, n = {}) => {
994
- const l = [], o = (i) => {
991
+ const l = n.defaultSpan ?? (n.maxSpan || 12) / 2, a = dt(e, l, n.layout);
992
+ return { item: e, span: a };
993
+ }, ct = (e, n = {}) => {
994
+ const l = [], a = (i) => {
995
995
  if (i.children?.length) {
996
- i.children.forEach((t) => o(t));
996
+ i.children.forEach((t) => a(t));
997
997
  return;
998
998
  }
999
- const a = ct(i, n);
1000
- a && l.push(a);
999
+ const o = ut(i, n);
1000
+ o && l.push(o);
1001
1001
  };
1002
- return e.forEach((i) => o(i)), l;
1002
+ return e.forEach((i) => a(i)), l;
1003
1003
  }, Ae = (e, n = {}) => {
1004
- const l = n.maxSpan ?? 12, o = n.defaultSpan ?? l / 2, i = n.layout ?? "row", t = ut(e, { maxSpan: l, defaultSpan: o, layout: i });
1004
+ const l = n.maxSpan ?? 12, a = n.defaultSpan ?? l / 2, i = n.layout ?? "row", t = ct(e, { maxSpan: l, defaultSpan: a, layout: i });
1005
1005
  if (i === "column") {
1006
1006
  const x = [];
1007
1007
  let z = 1;
@@ -1014,12 +1014,12 @@ const K = 12, ce = (e, n) => {
1014
1014
  rowSpan: L,
1015
1015
  gridRow: z,
1016
1016
  gridColumn: 1,
1017
- gridBand: ue({ gridRow: z })
1017
+ gridBand: ce({ gridRow: z })
1018
1018
  }), z += L;
1019
1019
  }), { cells: x, maxSpan: l };
1020
1020
  }
1021
- const s = /* @__PURE__ */ new Set(), c = [];
1022
- let d = 0, f = 0;
1021
+ const s = /* @__PURE__ */ new Set(), f = [];
1022
+ let d = 0, c = 0;
1023
1023
  const v = (x) => Math.floor(x / K) * K, m = (x, z) => `${x},${z}`, g = (x, z, U, L) => {
1024
1024
  if (z + U > l) return !1;
1025
1025
  for (let A = 0; A < L; A++)
@@ -1044,52 +1044,52 @@ const K = 12, ce = (e, n) => {
1044
1044
  }, _ = (x, z, U, L) => {
1045
1045
  const A = v(x);
1046
1046
  if (L < K && x + L < A + K) {
1047
- d = x + L, f = z;
1047
+ d = x + L, c = z;
1048
1048
  return;
1049
1049
  }
1050
1050
  const R = z + U;
1051
1051
  if (R < l) {
1052
- f = R, d = A;
1052
+ c = R, d = A;
1053
1053
  return;
1054
1054
  }
1055
- f = 0, d = A + K;
1055
+ c = 0, d = A + K;
1056
1056
  };
1057
1057
  for (const x of t) {
1058
1058
  const z = x.span === 0 ? l : x.span, U = ve(x.item);
1059
- x.item.form?.rowBreak && c.length && (f = 0, d = v(d) + K);
1060
- let { tr: L, tc: A } = g(d, f, z, U) ? { tr: d, tc: f } : H(d, f, z, U);
1059
+ x.item.form?.rowBreak && f.length && (c = 0, d = v(d) + K);
1060
+ let { tr: L, tc: A } = g(d, c, z, U) ? { tr: d, tc: c } : H(d, c, z, U);
1061
1061
  g(L, A, z, U) || ({ tr: L, tc: A } = H(0, 0, z, U)), B(L, A, z, U);
1062
1062
  const R = L + 1;
1063
- c.push({
1063
+ f.push({
1064
1064
  ...x,
1065
1065
  span: z,
1066
1066
  colSpan: z,
1067
1067
  rowSpan: U,
1068
1068
  gridRow: R,
1069
1069
  gridColumn: A + 1,
1070
- gridBand: ue({ gridRow: R })
1070
+ gridBand: ce({ gridRow: R })
1071
1071
  }), _(L, A, z, U);
1072
1072
  }
1073
- return { cells: c, maxSpan: l };
1073
+ return { cells: f, maxSpan: l };
1074
1074
  }, ft = (e) => e.map((n) => n.item?.show?.form), mt = (e, n, l) => {
1075
1075
  if (!e.rules) return;
1076
- const o = typeof e.rules == "boolean" ? [
1076
+ const a = typeof e.rules == "boolean" ? [
1077
1077
  {
1078
1078
  required: !0,
1079
1079
  message: n(e),
1080
1080
  trigger: "blur"
1081
1081
  }
1082
1082
  ] : e.rules;
1083
- return l ? o.map((i) => l(i)) : o;
1084
- }, Re = (e) => (n, l) => mt(n, e, (o) => {
1085
- if (o.validator) {
1086
- const i = o.validator;
1083
+ return l ? a.map((i) => l(i)) : a;
1084
+ }, Re = (e) => (n, l) => mt(n, e, (a) => {
1085
+ if (a.validator) {
1086
+ const i = a.validator;
1087
1087
  return {
1088
- ...o,
1089
- validator: (a, t, s) => i(a, t, s, l)
1088
+ ...a,
1089
+ validator: (o, t, s) => i(o, t, s, l)
1090
1090
  };
1091
1091
  }
1092
- return o;
1092
+ return a;
1093
1093
  }), gt = () => Re((e) => {
1094
1094
  const n = {
1095
1095
  input: b.tCurd("placeholderInput"),
@@ -1097,30 +1097,30 @@ const K = 12, ce = (e, n) => {
1097
1097
  };
1098
1098
  return (n[e.type || "input"] || n.input) + e.label;
1099
1099
  }), ht = (e, n, l) => {
1100
- const o = {}, i = {}, a = n?.maxSpan || 12, t = n?.defaultSpan || a / 2, s = gt();
1101
- e.forEach((f) => ce(f, !0)), Be(e, o, i, (f) => s(f, l));
1102
- const { cells: c, maxSpan: d } = Ae(e, {
1103
- maxSpan: a,
1100
+ const a = {}, i = {}, o = n?.maxSpan || 12, t = n?.defaultSpan || o / 2, s = gt();
1101
+ e.forEach((c) => ue(c, !0)), Be(e, a, i, (c) => s(c, l));
1102
+ const { cells: f, maxSpan: d } = Ae(e, {
1103
+ maxSpan: o,
1104
1104
  defaultSpan: t,
1105
1105
  layout: n?.layout
1106
1106
  });
1107
1107
  return {
1108
- formDefault: o,
1108
+ formDefault: a,
1109
1109
  rules: i,
1110
- formGrid: c,
1110
+ formGrid: f,
1111
1111
  formMaxSpan: d,
1112
- formColumn: Fe(c)
1112
+ formColumn: Fe(f)
1113
1113
  };
1114
- }, Be = (e, n, l, o) => {
1115
- const i = (a) => {
1116
- if (a.children?.length) {
1117
- a.children.forEach((t) => i(t));
1114
+ }, Be = (e, n, l, a) => {
1115
+ const i = (o) => {
1116
+ if (o.children?.length) {
1117
+ o.children.forEach((t) => i(t));
1118
1118
  return;
1119
1119
  }
1120
- if (a.key) {
1121
- n[a.key] = a.value;
1122
- const t = o(a);
1123
- t && (l[a.key] = t);
1120
+ if (o.key) {
1121
+ n[o.key] = o.value;
1122
+ const t = a(o);
1123
+ t && (l[o.key] = t);
1124
1124
  }
1125
1125
  };
1126
1126
  e.forEach(i);
@@ -1139,36 +1139,36 @@ const K = 12, ce = (e, n) => {
1139
1139
  getDisabled: { type: Function }
1140
1140
  },
1141
1141
  setup(e) {
1142
- const n = S.isFun, l = e, o = te(
1143
- () => l.formGrid.filter((f) => n(f.item.show?.form, l.form, l.type))
1142
+ const n = S.isFun, l = e, a = te(
1143
+ () => l.formGrid.filter((c) => n(c.item.show?.form, l.form, l.type))
1144
1144
  ), i = te(() => ({
1145
1145
  gridTemplateColumns: `repeat(${l.maxSpan}, minmax(0, 1fr))`
1146
- })), a = te(() => {
1147
- let f = 0;
1148
- return o.value.forEach((v) => {
1146
+ })), o = te(() => {
1147
+ let c = 0;
1148
+ return a.value.forEach((v) => {
1149
1149
  const m = v.gridRow + v.rowSpan - 1;
1150
- m > f && (f = m);
1151
- }), f;
1152
- }), t = (f) => f.gridRow + f.rowSpan - 1 >= a.value, s = (f) => f.rowSpan >= K, c = (f) => Me(f, l.formGrid, l.form, l.type, {
1150
+ m > c && (c = m);
1151
+ }), c;
1152
+ }), t = (c) => c.gridRow + c.rowSpan - 1 >= o.value, s = (c) => c.rowSpan >= K, f = (c) => Me(c, l.formGrid, l.form, l.type, {
1153
1153
  maxSpan: l.maxSpan,
1154
1154
  defaultSpan: l.formOption?.defaultSpan
1155
- }), d = (f) => {
1156
- const v = c(f) || f.colSpan;
1155
+ }), d = (c) => {
1156
+ const v = f(c) || c.colSpan;
1157
1157
  return {
1158
- gridRow: `${f.gridRow} / span ${f.rowSpan}`,
1159
- gridColumn: `${f.gridColumn} / span ${v}`
1158
+ gridRow: `${c.gridRow} / span ${c.rowSpan}`,
1159
+ gridColumn: `${c.gridColumn} / span ${v}`
1160
1160
  };
1161
1161
  };
1162
- return (f, v) => r(n)(r(ft)(e.formGrid), e.form, e.type) ? (u(), p(F, { key: 0 }, [
1163
- k(f.$slots, "form-start", { row: e.form }),
1162
+ return (c, v) => r(n)(r(ft)(e.formGrid), e.form, e.type) ? (u(), p(F, { key: 0 }, [
1163
+ k(c.$slots, "form-start", { row: e.form }),
1164
1164
  O("div", {
1165
1165
  class: I(["curd-form-grid", { stripe: e.stripe !== !1 }]),
1166
1166
  style: de(i.value)
1167
1167
  }, [
1168
- (u(!0), p(F, null, j(o.value, (m) => (u(), p("div", {
1168
+ (u(!0), p(F, null, j(a.value, (m) => (u(), p("div", {
1169
1169
  key: m.item.key,
1170
1170
  class: I(["curd-form-grid-cell", [
1171
- e.stripe !== !1 && r(ue)(m) % 2 === 0 ? "stripe-band-odd" : "",
1171
+ e.stripe !== !1 && r(ce)(m) % 2 === 0 ? "stripe-band-odd" : "",
1172
1172
  m.gridColumn > 1 ? "has-col-border" : "",
1173
1173
  e.stripe !== !1 && t(m) ? "is-last-row" : "",
1174
1174
  s(m) ? "is-row-span" : "",
@@ -1188,17 +1188,17 @@ const K = 12, ce = (e, n) => {
1188
1188
  "get-on": e.getOn,
1189
1189
  "get-disabled": e.getDisabled
1190
1190
  }, W({ _: 2 }, [
1191
- j(f.$slots, (g, B) => ({
1191
+ j(c.$slots, (g, B) => ({
1192
1192
  name: B,
1193
1193
  fn: y((H) => [
1194
- k(f.$slots, B, C({ ref_for: !0 }, H || {}))
1194
+ k(c.$slots, B, C({ ref_for: !0 }, H || {}))
1195
1195
  ])
1196
1196
  }))
1197
1197
  ]), 1032, ["class", "item", "form", "type", "label-width", "get-bind", "get-on", "get-disabled"])) : w("", !0)
1198
1198
  ])
1199
1199
  ], 6))), 128))
1200
1200
  ], 6),
1201
- k(f.$slots, "form-end", { row: e.form })
1201
+ k(c.$slots, "form-end", { row: e.form })
1202
1202
  ], 64)) : w("", !0);
1203
1203
  }
1204
1204
  });
@@ -1220,14 +1220,14 @@ class J {
1220
1220
  * @param delAll 是否删除目标对象所有属性
1221
1221
  * @returns
1222
1222
  */
1223
- static setValue = (n, l, o = !1) => {
1224
- o && J.delAllKey(n), Object.keys(l).forEach((i) => {
1223
+ static setValue = (n, l, a = !1) => {
1224
+ a && J.delAllKey(n), Object.keys(l).forEach((i) => {
1225
1225
  n[i] !== l[i] && (n[i] = l[i]);
1226
1226
  });
1227
1227
  };
1228
1228
  }
1229
1229
  const fe = (e) => {
1230
- const n = me({}), l = () => typeof e == "function" ? e() : e, o = () => {
1230
+ const n = me({}), l = () => typeof e == "function" ? e() : e, a = () => {
1231
1231
  const i = l();
1232
1232
  return i ?? n;
1233
1233
  };
@@ -1235,16 +1235,16 @@ const fe = (e) => {
1235
1235
  internal: n,
1236
1236
  isExternal: () => l() != null,
1237
1237
  get() {
1238
- return o();
1238
+ return a();
1239
1239
  },
1240
1240
  set(i) {
1241
- J.setValue(o(), i, !0);
1241
+ J.setValue(a(), i, !0);
1242
1242
  },
1243
1243
  merge(i) {
1244
- J.setValue(o(), i, !1);
1244
+ J.setValue(a(), i, !1);
1245
1245
  },
1246
1246
  clear() {
1247
- J.delAllKey(o());
1247
+ J.delAllKey(a());
1248
1248
  }
1249
1249
  };
1250
1250
  }, bt = /* @__PURE__ */ G({
@@ -1264,10 +1264,10 @@ const fe = (e) => {
1264
1264
  }
1265
1265
  },
1266
1266
  setup(e, { expose: n }) {
1267
- const l = S.EDialog, o = Q(), i = e;
1268
- let a = fe(i.form);
1267
+ const l = S.EDialog, a = Q(), i = e;
1268
+ let o = fe(i.form);
1269
1269
  const t = ze.getConf();
1270
- t?.formRef?.set("formRef-" + StrUtil.getId(), o);
1270
+ t?.formRef?.set("formRef-" + StrUtil.getId(), a);
1271
1271
  const s = me({
1272
1272
  rules: {},
1273
1273
  show: !0,
@@ -1277,27 +1277,27 @@ const fe = (e) => {
1277
1277
  formGrid: [],
1278
1278
  formMaxSpan: 12,
1279
1279
  get form() {
1280
- return a.get();
1280
+ return o.get();
1281
1281
  },
1282
- set form(c) {
1283
- a.set(c);
1282
+ set form(f) {
1283
+ o.set(f);
1284
1284
  },
1285
- getDisabled: (c) => Ee(c, s.type, s.form),
1286
- getBind: (c) => De(c, s.type),
1287
- getOn: (c) => Oe(c, s.type, [s.form, c]),
1285
+ getDisabled: (f) => Ee(f, s.type, s.form),
1286
+ getBind: (f) => De(f, s.type),
1287
+ getOn: (f) => Oe(f, s.type, [s.form, f]),
1288
1288
  initColumnForm: () => {
1289
- const c = a, d = ht(i.option.column, i.option.form, c.get());
1290
- s.formDefault = d.formDefault, s.rules = d.rules, s.formGrid = d.formGrid, s.formMaxSpan = d.formMaxSpan, s.formColumn = d.formColumn, s.type === l.Add ? c.isExternal() ? c.merge(JSONUtil.cp(s.formDefault)) : c.set(JSONUtil.cp(s.formDefault)) : !c.isExternal() && i.form && c.set(JSONUtil.cp(i.form));
1289
+ const f = o, d = ht(i.option.column, i.option.form, f.get());
1290
+ s.formDefault = d.formDefault, s.rules = d.rules, s.formGrid = d.formGrid, s.formMaxSpan = d.formMaxSpan, s.formColumn = d.formColumn, s.type === l.Add ? f.isExternal() ? f.merge(JSONUtil.cp(s.formDefault)) : f.set(JSONUtil.cp(s.formDefault)) : !f.isExternal() && i.form && f.set(JSONUtil.cp(i.form));
1291
1291
  }
1292
1292
  });
1293
1293
  return s.initColumnForm(), Je(
1294
1294
  () => i.form,
1295
- (c) => {
1296
- a = fe(c), s.initColumnForm();
1295
+ (f) => {
1296
+ o = fe(f), s.initColumnForm();
1297
1297
  }
1298
- ), n({ ref: o, conf: s }), (c, d) => (u(), h(r(q), {
1298
+ ), n({ ref: a, conf: s }), (f, d) => (u(), h(r(q), {
1299
1299
  ref_key: "ruleFormRef",
1300
- ref: o,
1300
+ ref: a,
1301
1301
  model: s.form,
1302
1302
  rules: s.rules
1303
1303
  }, {
@@ -1315,10 +1315,10 @@ const fe = (e) => {
1315
1315
  "get-on": s.getOn,
1316
1316
  "get-disabled": s.getDisabled
1317
1317
  }, W({ _: 2 }, [
1318
- j(c.$slots, (f, v) => ({
1318
+ j(f.$slots, (c, v) => ({
1319
1319
  name: v,
1320
1320
  fn: y((m) => [
1321
- k(c.$slots, v, be(pe(m || {})))
1321
+ k(f.$slots, v, be(pe(m || {})))
1322
1322
  ])
1323
1323
  }))
1324
1324
  ]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : w("", !0)
@@ -1338,8 +1338,8 @@ const fe = (e) => {
1338
1338
  const l = Object.keys(this.map);
1339
1339
  await Promise.all(
1340
1340
  l.map(
1341
- (o) => this.map[o]?.validate(async (i) => new Promise((a, t) => {
1342
- i || t(!1), a(!0);
1341
+ (a) => this.map[a]?.validate(async (i) => new Promise((o, t) => {
1342
+ i || t(!1), o(!0);
1343
1343
  }))
1344
1344
  )
1345
1345
  ), e(!0);
@@ -1359,31 +1359,31 @@ const fe = (e) => {
1359
1359
  get form() {
1360
1360
  return l.get();
1361
1361
  },
1362
- set form(o) {
1363
- l.set(o);
1362
+ set form(a) {
1363
+ l.set(a);
1364
1364
  },
1365
1365
  formDefault: {},
1366
- getPlaceholder: (o, i = b.tCurd("placeholderInput")) => o.text?.search?.placeholder === void 0 ? `${i}${o.label}` : o.text?.search?.placeholder,
1366
+ getPlaceholder: (a, i = b.tCurd("placeholderInput")) => a.text?.search?.placeholder === void 0 ? `${i}${a.label}` : a.text?.search?.placeholder,
1367
1367
  getFormData: () => {
1368
- const o = e();
1368
+ const a = e();
1369
1369
  let i = {};
1370
1370
  n.option.column.forEach((t) => {
1371
- (typeof t.show?.search == "function" ? t.show?.search(o.search.form) : t.show?.search) && (i[t.key] = o.search.form[t.key]);
1371
+ (typeof t.show?.search == "function" ? t.show?.search(a.search.form) : t.show?.search) && (i[t.key] = a.search.form[t.key]);
1372
1372
  });
1373
- const a = n.option.search?.before?.(i);
1374
- return a && (i = a), i;
1373
+ const o = n.option.search?.before?.(i);
1374
+ return o && (i = o), i;
1375
1375
  },
1376
1376
  reset: () => {
1377
- const o = e(), i = o.search.formDefault;
1377
+ const a = e(), i = a.search.formDefault;
1378
1378
  Object.keys(i).forEach((t) => {
1379
- n.option.search?.resetMode === "none" ? i[t] = void 0 : i[t] = o.search.formDefault[t];
1379
+ n.option.search?.resetMode === "none" ? i[t] = void 0 : i[t] = a.search.formDefault[t];
1380
1380
  });
1381
- const a = ObjectUtil.deepMerge(i, {});
1382
- J.setValue(o.search.form, a, !0), o.page.num = 1, n.option.init !== !1 && o.table.getList();
1381
+ const o = ObjectUtil.deepMerge(i, {});
1382
+ J.setValue(a.search.form, o, !0), a.page.num = 1, n.option.init !== !1 && a.table.getList();
1383
1383
  },
1384
1384
  submit: () => {
1385
- const o = e();
1386
- o.page.num = 1, o.table.getList();
1385
+ const a = e();
1386
+ a.page.num = 1, a.table.getList();
1387
1387
  }
1388
1388
  }
1389
1389
  };
@@ -1397,40 +1397,40 @@ const fe = (e) => {
1397
1397
  sizeList: n.option.page?.sizeList || M.config.pagination.pageSizes,
1398
1398
  pagerCount: n.option.page?.pagerCount || M.config.pagination.pagerCount,
1399
1399
  getQuery: (l = {}) => {
1400
- const o = e();
1400
+ const a = e();
1401
1401
  return {
1402
- [M.config.field.page.size]: l.size || o.page.size,
1403
- [M.config.field.page.num]: l.num || o.page.num,
1404
- ...o.search.getFormData()
1402
+ [M.config.field.page.size]: l.size || a.page.size,
1403
+ [M.config.field.page.num]: l.num || a.page.num,
1404
+ ...a.search.getFormData()
1405
1405
  };
1406
1406
  }
1407
1407
  }
1408
1408
  }), kt = (e, n, l) => ({
1409
1409
  table: {
1410
1410
  op: {
1411
- width: (...o) => o.filter((a) => a).length * 30 + 60
1411
+ width: (...a) => a.filter((o) => o).length * 30 + 60
1412
1412
  },
1413
1413
  loading: !1,
1414
1414
  data: [],
1415
1415
  expand: {
1416
1416
  isExpand: !1,
1417
1417
  rowKeys: [],
1418
- change: (o, i) => {
1418
+ change: (a, i) => {
1419
1419
  },
1420
1420
  all: () => {
1421
- const o = e();
1422
- if (o.table.expand.isExpand)
1423
- o.table.expand.rowKeys = [];
1421
+ const a = e();
1422
+ if (a.table.expand.isExpand)
1423
+ a.table.expand.rowKeys = [];
1424
1424
  else {
1425
- const i = (a) => {
1425
+ const i = (o) => {
1426
1426
  let t = [];
1427
- return a.forEach((s) => {
1427
+ return o.forEach((s) => {
1428
1428
  t.push(s[n.option.table.rowKey]), s.children?.length && (t = t.concat(i(s.children)));
1429
1429
  }), t;
1430
1430
  };
1431
- o.table.expand.rowKeys = i(o.table.data);
1431
+ a.table.expand.rowKeys = i(a.table.data);
1432
1432
  }
1433
- o.table.expand.isExpand = !o.table.expand.isExpand;
1433
+ a.table.expand.isExpand = !a.table.expand.isExpand;
1434
1434
  }
1435
1435
  },
1436
1436
  column: {
@@ -1444,95 +1444,95 @@ const fe = (e) => {
1444
1444
  group: {
1445
1445
  expand: !1,
1446
1446
  toggleExpandAll: () => {
1447
- const o = e(), i = !o.table.header.group.expand;
1448
- o.table.header.group.expand = i;
1449
- const a = (t) => {
1447
+ const a = e(), i = !a.table.header.group.expand;
1448
+ a.table.header.group.expand = i;
1449
+ const o = (t) => {
1450
1450
  t.forEach((s) => {
1451
- s.table?.header?.group !== void 0 && (s.table.header.group = !i), s.table?.header?.groupKey !== void 0 && (s.table.header.show = i), Array.isArray(s.children) && s.children.length && a(s.children);
1451
+ s.table?.header?.group !== void 0 && (s.table.header.group = !i), s.table?.header?.groupKey !== void 0 && (s.table.header.show = i), Array.isArray(s.children) && s.children.length && o(s.children);
1452
1452
  });
1453
1453
  };
1454
- a(o.table.column.list);
1454
+ o(a.table.column.list);
1455
1455
  }
1456
1456
  }
1457
1457
  },
1458
1458
  getList: async () => {
1459
- const o = e();
1460
- o.table.loading = !0;
1461
- const i = n.option.api.list, a = JSONUtil.cp(o.table.selection.list);
1459
+ const a = e();
1460
+ a.table.loading = !0;
1461
+ const i = n.option.api.list, o = JSONUtil.cp(a.table.selection.list);
1462
1462
  try {
1463
- await o.initApiData("init");
1463
+ await a.initApiData("init");
1464
1464
  let t = {};
1465
- if (o.table.sort.prop) {
1465
+ if (a.table.sort.prop) {
1466
1466
  const { props: B, order: H } = M.config.table.sort;
1467
1467
  t = {
1468
- [B.field]: o.table.sort.prop,
1469
- [H.field]: o.table.sort.order
1468
+ [B.field]: a.table.sort.prop,
1469
+ [H.field]: a.table.sort.order
1470
1470
  };
1471
1471
  }
1472
1472
  const s = await i({
1473
- ...o.page.getQuery(),
1473
+ ...a.page.getQuery(),
1474
1474
  ...t
1475
- }), c = M.config.field.result, d = s.data || { [c.list]: s }, f = (Array.isArray(d[c.list]), d[c.list]), v = Ue(o.update.formGrid?.length ? o.update.formGrid : o.update.formColumn), g = ObjectUtil.deepMerge({ data: f }, {}).data.map((B) => (Object.keys(B).forEach((_) => {
1475
+ }), f = M.config.field.result, d = s.data || { [f.list]: s }, c = (Array.isArray(d[f.list]), d[f.list]), v = Ue(a.update.formGrid?.length ? a.update.formGrid : a.update.formColumn), g = ObjectUtil.deepMerge({ data: c }, {}).data.map((B) => (Object.keys(B).forEach((_) => {
1476
1476
  const x = v.find((z) => z.item.key === _);
1477
1477
  x && ["select", "radio"].includes(x.item.type) && (x.item.table.format || (x.item.table.format = (z) => x.item.options[x.item.type].data?.find((U) => U.value == z[_])?.label || z[_]));
1478
1478
  }), B));
1479
- o.table.data = n.option.data ? await n.option.data(g, f) : g, o.page.total = d[c.total] || 0, setTimeout(() => {
1480
- o.table.selection.setList(a);
1479
+ a.table.data = n.option.data ? await n.option.data(g, c) : g, a.page.total = d[f.total] || 0, setTimeout(() => {
1480
+ a.table.selection.setList(o);
1481
1481
  }, 20);
1482
1482
  } catch (t) {
1483
1483
  console.error(t);
1484
1484
  } finally {
1485
- o.table.loading = !1;
1485
+ a.table.loading = !1;
1486
1486
  }
1487
1487
  },
1488
1488
  selection: {
1489
1489
  list: [],
1490
- change: (o) => {
1491
- e().table.selection.list = o;
1490
+ change: (a) => {
1491
+ e().table.selection.list = a;
1492
1492
  },
1493
- setList: (o, i) => {
1494
- const a = e();
1495
- a.table.selection.list = [];
1493
+ setList: (a, i) => {
1494
+ const o = e();
1495
+ o.table.selection.list = [];
1496
1496
  const t = l.tableRef.value;
1497
- if (t?.clearSelection(), !t || !o?.length) return;
1498
- const s = n.option.table?.rowKey, c = (d) => {
1499
- const f = (v) => {
1497
+ if (t?.clearSelection(), !t || !a?.length) return;
1498
+ const s = n.option.table?.rowKey, f = (d) => {
1499
+ const c = (v) => {
1500
1500
  for (const m of v) {
1501
1501
  if (s != null && s !== "") {
1502
1502
  if (m[s] === d[s]) return m;
1503
1503
  } else if (m === d)
1504
1504
  return m;
1505
1505
  if (Array.isArray(m.children) && m.children.length) {
1506
- const g = f(m.children);
1506
+ const g = c(m.children);
1507
1507
  if (g !== void 0) return g;
1508
1508
  }
1509
1509
  }
1510
1510
  };
1511
- return f(a.table.data);
1511
+ return c(o.table.data);
1512
1512
  };
1513
- o.forEach((d) => {
1514
- const f = c(d);
1515
- if (f)
1513
+ a.forEach((d) => {
1514
+ const c = f(d);
1515
+ if (c)
1516
1516
  if (i) {
1517
- const v = () => t.toggleRowSelection(f, !0, !1);
1517
+ const v = () => t.toggleRowSelection(c, !0, !1);
1518
1518
  i(d) !== !1 && v();
1519
1519
  } else
1520
- t.toggleRowSelection(f, !0, !1);
1520
+ t.toggleRowSelection(c, !0, !1);
1521
1521
  });
1522
1522
  }
1523
1523
  },
1524
1524
  sort: {
1525
1525
  prop: "",
1526
1526
  order: "",
1527
- change: (o) => {
1527
+ change: (a) => {
1528
1528
  const i = e();
1529
1529
  M.config.table.sort.resetPage && (i.page.num = 1);
1530
- const a = M.config.table.sort;
1531
- if (a.change) {
1532
- a.change(o, i);
1530
+ const o = M.config.table.sort;
1531
+ if (o.change) {
1532
+ o.change(a, i);
1533
1533
  return;
1534
1534
  }
1535
- i.table.sort.prop = o.prop, o.order === null ? (i.table.sort.order = "", i.table.sort.prop = "") : i.table.sort.order = o.order === "ascending" ? a.order.asc : a.order.desc, i.table.getList();
1535
+ i.table.sort.prop = a.prop, a.order === null ? (i.table.sort.order = "", i.table.sort.prop = "") : i.table.sort.order = a.order === "ascending" ? o.order.asc : o.order.desc, i.table.getList();
1536
1536
  }
1537
1537
  }
1538
1538
  }
@@ -1545,15 +1545,15 @@ class Ct {
1545
1545
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
1546
1546
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
1547
1547
  */
1548
- static exportToExcel = async (n, l, o) => {
1548
+ static exportToExcel = async (n, l, a) => {
1549
1549
  if (!n || n.length === 0) return;
1550
- const i = await S.loadModule("xlsx"), a = n.map((c) => {
1550
+ const i = await S.loadModule("xlsx"), o = n.map((f) => {
1551
1551
  const d = {};
1552
- return l.forEach((f) => {
1553
- d[f.label] = c[f.key];
1552
+ return l.forEach((c) => {
1553
+ d[c.label] = f[c.key];
1554
1554
  }), d;
1555
- }), t = i.utils.json_to_sheet(a), s = i.utils.book_new();
1556
- i.utils.book_append_sheet(s, t, "Sheet1"), o ? typeof o == "function" && (o = o()) : o = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(s, `${o}.xlsx`);
1555
+ }), t = i.utils.json_to_sheet(o), s = i.utils.book_new();
1556
+ i.utils.book_append_sheet(s, t, "Sheet1"), a ? typeof a == "function" && (a = a()) : a = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(s, `${a}.xlsx`);
1557
1557
  };
1558
1558
  }
1559
1559
  const xt = (e, n) => ({
@@ -1561,7 +1561,7 @@ const xt = (e, n) => ({
1561
1561
  run: {
1562
1562
  start: async (l) => {
1563
1563
  let i = await e().export.run[l]();
1564
- const a = n.option.column, t = ObjectUtil.deepMerge({ data: i, columns: a }, {}), s = n.option.tools?.export || {};
1564
+ const o = n.option.column, t = ObjectUtil.deepMerge({ data: i, columns: o }, {}), s = n.option.tools?.export || {};
1565
1565
  s.before?.(t), Ct.exportToExcel(t.data, t.columns, s.fileName);
1566
1566
  },
1567
1567
  select: async () => {
@@ -1578,8 +1578,8 @@ const xt = (e, n) => ({
1578
1578
  if (l.table.selection.list.length === 0)
1579
1579
  throw S.fail(b.tCurd("selectDataToExport")), new Error(b.tCurd("selectDataToExport"));
1580
1580
  return l.table.selection.list;
1581
- } catch (o) {
1582
- console.error(o);
1581
+ } catch (a) {
1582
+ console.error(a);
1583
1583
  } finally {
1584
1584
  l.export.loading = !1;
1585
1585
  }
@@ -1597,8 +1597,8 @@ const xt = (e, n) => ({
1597
1597
  if (l.table.data.length === 0)
1598
1598
  throw S.fail(b.tCurd("noData")), new Error(b.tCurd("noData"));
1599
1599
  return l.table.data;
1600
- } catch (o) {
1601
- console.error(o);
1600
+ } catch (a) {
1601
+ console.error(a);
1602
1602
  } finally {
1603
1603
  l.export.loading = !1;
1604
1604
  }
@@ -1613,12 +1613,12 @@ const xt = (e, n) => ({
1613
1613
  });
1614
1614
  return;
1615
1615
  }
1616
- const o = n.option.api.list, i = await o({
1616
+ const a = n.option.api.list, i = await a({
1617
1617
  ...l.page.getQuery({ size: 999999, num: 1 })
1618
1618
  });
1619
1619
  return (i.data || { [M.config.field.result.list]: i })[M.config.field.result.list];
1620
- } catch (o) {
1621
- console.error(o);
1620
+ } catch (a) {
1621
+ console.error(a);
1622
1622
  } finally {
1623
1623
  l.export.loading = !1;
1624
1624
  }
@@ -1626,12 +1626,12 @@ const xt = (e, n) => ({
1626
1626
  },
1627
1627
  loading: !1,
1628
1628
  click: (l) => {
1629
- const o = e();
1630
- o.export.loading || o.export.run.start(l);
1629
+ const a = e();
1630
+ a.export.loading || a.export.run.start(l);
1631
1631
  }
1632
1632
  }
1633
1633
  }), le = S.EDialog, St = (e, n, l) => {
1634
- const o = fe(() => n.form);
1634
+ const a = fe(() => n.form);
1635
1635
  return {
1636
1636
  update: {
1637
1637
  title: "",
@@ -1641,35 +1641,35 @@ const xt = (e, n) => ({
1641
1641
  loading: !1,
1642
1642
  type: le.Update,
1643
1643
  get form() {
1644
- return o.get();
1644
+ return a.get();
1645
1645
  },
1646
1646
  set form(i) {
1647
- o.set(i);
1647
+ a.set(i);
1648
1648
  },
1649
1649
  formDefault: {},
1650
1650
  formColumn: [],
1651
1651
  formGrid: [],
1652
1652
  formMaxSpan: 12,
1653
- getDisabled: (i, a = !1) => {
1653
+ getDisabled: (i, o = !1) => {
1654
1654
  const t = e();
1655
- return n.option.table?.editMode && a ? i.disabled?.table === void 0 ? !1 : S.isFun(i.disabled?.table, t.update.form) : Ee(i, t.update.type, t.update.form);
1655
+ return n.option.table?.editMode && o ? i.disabled?.table === void 0 ? !1 : S.isFun(i.disabled?.table, t.update.form) : Ee(i, t.update.type, t.update.form);
1656
1656
  },
1657
1657
  getBind: (i) => {
1658
- const a = e();
1659
- return De(i, a.update.type);
1658
+ const o = e();
1659
+ return De(i, o.update.type);
1660
1660
  },
1661
- getOn: (i, a) => {
1661
+ getOn: (i, o) => {
1662
1662
  const t = e();
1663
- return Oe(i, t.update.type, [a || t.update.form, i]);
1663
+ return Oe(i, t.update.type, [o || t.update.form, i]);
1664
1664
  },
1665
1665
  getOptions: (i) => {
1666
- const a = e();
1666
+ const o = e();
1667
1667
  try {
1668
- const s = Ue(a.update.formGrid?.length ? a.update.formGrid : a.update.formColumn).find((c) => c.item.key === i)?.item;
1668
+ const s = Ue(o.update.formGrid?.length ? o.update.formGrid : o.update.formColumn).find((f) => f.item.key === i)?.item;
1669
1669
  return s ? {
1670
1670
  options: s.options,
1671
1671
  //@ts-ignore
1672
- bind: a.update.getBind(s)
1672
+ bind: o.update.getBind(s)
1673
1673
  } : { options: {}, bind: {} };
1674
1674
  } catch {
1675
1675
  return { options: {}, bind: {} };
@@ -1678,27 +1678,27 @@ const xt = (e, n) => ({
1678
1678
  edit: {
1679
1679
  data: {},
1680
1680
  getApiData: (i) => {
1681
- const a = e();
1681
+ const o = e();
1682
1682
  if (n.option.form?.editAll) return i;
1683
1683
  const t = {
1684
- [n.option.table?.rowKey]: a.update.edit.data[n.option.table?.rowKey]
1684
+ [n.option.table?.rowKey]: o.update.edit.data[n.option.table?.rowKey]
1685
1685
  };
1686
- return Object.keys(a.update.edit.data).forEach((s) => {
1687
- i[s] !== a.update.edit.data[s] && (t[s] = i[s]);
1686
+ return Object.keys(o.update.edit.data).forEach((s) => {
1687
+ i[s] !== o.update.edit.data[s] && (t[s] = i[s]);
1688
1688
  }), t;
1689
1689
  }
1690
1690
  },
1691
1691
  view: {},
1692
- open: (i, a) => {
1692
+ open: (i, o) => {
1693
1693
  const t = e();
1694
1694
  t.update.showContent || FunUtil.throttle(async () => {
1695
1695
  S.loading(!0);
1696
1696
  try {
1697
1697
  t.update.type = i;
1698
1698
  const s = i === le.Add;
1699
- t.update.edit.data = s ? void 0 : JSONUtil.cp(a), t.update.title = b.tCurd(s ? "add" : i === le.View ? "view" : "edit");
1700
- const c = s ? ObjectUtil.deepMerge(JSONUtil.cp(t.update.formDefault), a ? JSONUtil.cp(a) : {}) : JSONUtil.cp(a);
1701
- J.setValue(t.update.form, c, !0), await t.initApiData("update"), await n.option.form?.openBefore?.(t.update.form, t.update), (!n.option.table?.inlineEdit || s) && (t.update.show = !0, t.update.showContent = !0), n.option.form?.openAfter?.(t.update.form, t.update);
1699
+ t.update.edit.data = s ? void 0 : JSONUtil.cp(o), t.update.title = b.tCurd(s ? "add" : i === le.View ? "view" : "edit");
1700
+ const f = s ? ObjectUtil.deepMerge(JSONUtil.cp(t.update.formDefault), o ? JSONUtil.cp(o) : {}) : JSONUtil.cp(o);
1701
+ J.setValue(t.update.form, f, !0), await t.initApiData("update"), await n.option.form?.openBefore?.(t.update.form, t.update), (!n.option.table?.inlineEdit || s) && (t.update.show = !0, t.update.showContent = !0), n.option.form?.openAfter?.(t.update.form, t.update);
1702
1702
  } catch (s) {
1703
1703
  console.error(s);
1704
1704
  } finally {
@@ -1706,42 +1706,45 @@ const xt = (e, n) => ({
1706
1706
  }
1707
1707
  });
1708
1708
  },
1709
+ validate: async () => {
1710
+ const i = e();
1711
+ try {
1712
+ return await Promise.all([
1713
+ l.ruleFormRef.value?.validate(async (o) => new Promise((t, s) => {
1714
+ o || s(!1), t(void 0);
1715
+ })),
1716
+ i.formRef.validate()
1717
+ ]), !0;
1718
+ } catch {
1719
+ S.fail(b.tCurd("checkFormData"));
1720
+ }
1721
+ },
1709
1722
  submit: () => {
1710
1723
  FunUtil.throttle(async () => {
1711
1724
  const i = e();
1712
- try {
1713
- await Promise.all([
1714
- l.ruleFormRef.value?.validate(async (c) => new Promise((d, f) => {
1715
- c || f(!1), d(void 0);
1716
- })),
1717
- i.formRef.validate()
1718
- ]);
1719
- } catch {
1720
- S.fail(b.tCurd("checkFormData"));
1721
- return;
1722
- }
1725
+ if (!await i.update.validate()) return;
1723
1726
  i.update.loading = !0;
1724
- const a = i.update.type === le.Add ? n.option.api.create : n.option.api.update;
1727
+ const t = i.update.type === le.Add ? n.option.api.create : n.option.api.update;
1725
1728
  try {
1726
1729
  await n.option.form?.submitBefore?.(i.update.form, i.update);
1727
1730
  } catch {
1728
1731
  i.update.loading = !1;
1729
1732
  return;
1730
1733
  }
1731
- let t = ObjectUtil.deepMerge(i.update.form, {});
1732
- delete t.children;
1733
- const s = new Set(n.option.column.filter((c) => c.type === "datetime").map((c) => c.key));
1734
- Object.keys(t).forEach((c) => {
1735
- if (s.has(c) && t[c] != null) {
1736
- const d = new Date(t[c]).getTime();
1737
- isNaN(d) || (t[c] = d);
1734
+ let s = ObjectUtil.deepMerge(i.update.form, {});
1735
+ delete s.children;
1736
+ const f = new Set(n.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1737
+ Object.keys(s).forEach((d) => {
1738
+ if (f.has(d) && s[d] != null) {
1739
+ const c = new Date(s[d]).getTime();
1740
+ isNaN(c) || (s[d] = c);
1738
1741
  }
1739
1742
  });
1740
1743
  try {
1741
- if (!a) return;
1742
- await a({ ...t }), i.update.close(), await i.table.getList(), n.option.form?.submitAfter?.(t, i.update);
1743
- } catch (c) {
1744
- console.error(c);
1744
+ if (!t) return;
1745
+ await t({ ...s }), i.update.close(), await i.table.getList(), n.option.form?.submitAfter?.(s, i.update);
1746
+ } catch (d) {
1747
+ console.error(d);
1745
1748
  } finally {
1746
1749
  i.update.loading = !1;
1747
1750
  }
@@ -1750,7 +1753,7 @@ const xt = (e, n) => ({
1750
1753
  close: () => {
1751
1754
  const i = e();
1752
1755
  i.update.show = !1, i.update.edit.data = void 0, setTimeout(() => {
1753
- i.update.showContent = !1, l.ruleFormRef.value?.resetFields?.(), o.clear();
1756
+ i.update.showContent = !1, l.ruleFormRef.value?.resetFields?.(), a.clear();
1754
1757
  }, 350);
1755
1758
  }
1756
1759
  }
@@ -1769,17 +1772,17 @@ const xt = (e, n) => ({
1769
1772
  S.fail(b.tCurd("selectDataToDelete"));
1770
1773
  return;
1771
1774
  }
1772
- const o = e();
1773
- o.remove.items = l, o.remove.show = !0;
1775
+ const a = e();
1776
+ a.remove.items = l, a.remove.show = !0;
1774
1777
  },
1775
1778
  submit: () => {
1776
1779
  FunUtil.throttle(async () => {
1777
1780
  const l = e();
1778
1781
  l.remove.loading = !0;
1779
- const o = n.option.api.delete;
1782
+ const a = n.option.api.delete;
1780
1783
  try {
1781
- if (!o) return;
1782
- await o({
1784
+ if (!a) return;
1785
+ await a({
1783
1786
  [n.option.table?.rowKey]: l.remove.items.map((i) => i[n.option.table?.rowKey]),
1784
1787
  items: l.remove.items
1785
1788
  }), S.success(b.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
@@ -1793,50 +1796,50 @@ const xt = (e, n) => ({
1793
1796
  }
1794
1797
  }), zt = (e, n, l) => ({
1795
1798
  apiDataMap: {},
1796
- getColumnSpan: (o, i) => {
1797
- const a = e(), t = a.update.formGrid?.length ? a.update.formGrid : i || [];
1798
- return Me(o, t, a.update.form, a.update.type, {
1799
- maxSpan: a.update.formMaxSpan || n.option.form?.maxSpan,
1799
+ getColumnSpan: (a, i) => {
1800
+ const o = e(), t = o.update.formGrid?.length ? o.update.formGrid : i || [];
1801
+ return Me(a, t, o.update.form, o.update.type, {
1802
+ maxSpan: o.update.formMaxSpan || n.option.form?.maxSpan,
1800
1803
  defaultSpan: n.option.form?.defaultSpan || M.config.form.defaultSpan
1801
1804
  });
1802
1805
  },
1803
1806
  init: () => {
1804
- const o = e();
1805
- o.initCurdConfig(), o.initColumnOptions(), o.initColumnForm();
1807
+ const a = e();
1808
+ a.initCurdConfig(), a.initColumnOptions(), a.initColumnForm();
1806
1809
  },
1807
- initApiData: async (o) => {
1808
- const i = e(), a = [], t = (s) => {
1810
+ initApiData: async (a) => {
1811
+ const i = e(), o = [], t = (s) => {
1809
1812
  if (s.children?.length) {
1810
- s.children.forEach((c) => t(c));
1813
+ s.children.forEach((f) => t(f));
1811
1814
  return;
1812
1815
  }
1813
- if (s.options?.[s.type]?.dataApi && s.options?.[s.type]?.dataApiConfig?.[o]) {
1816
+ if (s.options?.[s.type]?.dataApi && s.options?.[s.type]?.dataApiConfig?.[a]) {
1814
1817
  if (i.apiDataMap[s.key] && s.options?.[s.type]?.dataApiConfig?.once) return;
1815
- const c = (async () => {
1818
+ const f = (async () => {
1816
1819
  try {
1817
1820
  let d = await s.options?.[s.type]?.dataApi?.(i.update.form, i.update.type);
1818
1821
  if (d) {
1819
- const f = s.options?.[s.type]?.dataPath;
1820
- !Array.isArray(d) && f && (d = ObjectUtil.getPathValue(d, f)), s.options[s.type].data = d, s.options.search[s.type].data = d, s.options.search[s.options.search.type ?? s.type] || (s.options.search[s.options.search.type ?? s.type] = {}), s.options.search[s.options.search.type ?? s.type].data = d, s.options.formAdd[s.type].data = d, s.options.formUpdate[s.type].data = d, i.apiDataMap[s.key] = d;
1822
+ const c = s.options?.[s.type]?.dataPath;
1823
+ !Array.isArray(d) && c && (d = ObjectUtil.getPathValue(d, c)), s.options[s.type].data = d, s.options.search[s.type].data = d, s.options.search[s.options.search.type ?? s.type] || (s.options.search[s.options.search.type ?? s.type] = {}), s.options.search[s.options.search.type ?? s.type].data = d, s.options.formAdd[s.type].data = d, s.options.formUpdate[s.type].data = d, i.apiDataMap[s.key] = d;
1821
1824
  }
1822
1825
  } catch {
1823
1826
  }
1824
1827
  })();
1825
- a.push(c);
1828
+ o.push(f);
1826
1829
  }
1827
1830
  };
1828
- return n.option.column.forEach((s) => t(s)), await Promise.all(a), !0;
1831
+ return n.option.column.forEach((s) => t(s)), await Promise.all(o), !0;
1829
1832
  },
1830
1833
  initCurdConfig: () => {
1831
- const o = ObjectUtil.deepMerge(M.config, {});
1832
- o.table.emptyText = b.tCurd("noData"), n.option.size = n.option.size || {}, o.table.size = n.option.size.table || o.size.table, o.form.size = n.option.size.form || o.size.form, o.size.search = n.option.size.search || o.size.search;
1833
- const i = ObjectUtil.deepMerge(o, n.option || {});
1834
- Object.keys(i).forEach((a) => {
1835
- n.option[a] = i[a];
1834
+ const a = ObjectUtil.deepMerge(M.config, {});
1835
+ a.table.emptyText = b.tCurd("noData"), n.option.size = n.option.size || {}, a.table.size = n.option.size.table || a.size.table, a.form.size = n.option.size.form || a.size.form, a.size.search = n.option.size.search || a.size.search;
1836
+ const i = ObjectUtil.deepMerge(a, n.option || {});
1837
+ Object.keys(i).forEach((o) => {
1838
+ n.option[o] = i[o];
1836
1839
  });
1837
1840
  },
1838
1841
  initColumnOptions: () => {
1839
- const o = e();
1842
+ const a = e();
1840
1843
  let i = JSONUtil.cp(M.config.columnConfig);
1841
1844
  i.options = ObjectUtil.deepMerge(
1842
1845
  {
@@ -1847,11 +1850,11 @@ const xt = (e, n) => ({
1847
1850
  },
1848
1851
  i.options
1849
1852
  );
1850
- const a = (t) => {
1853
+ const o = (t) => {
1851
1854
  for (const s in i) {
1852
1855
  if (s === "table") {
1853
1856
  if (t.table = ObjectUtil.deepMerge(i.table, t.table || {}), t.children) {
1854
- t.children.forEach((d) => a(d));
1857
+ t.children.forEach((d) => o(d));
1855
1858
  return;
1856
1859
  }
1857
1860
  } else s === "type" ? t.type = t.type || i.type : t[s] = ObjectUtil.deepMerge(i[s], t[s] || {});
@@ -1859,7 +1862,7 @@ const xt = (e, n) => ({
1859
1862
  t.options[d] = t.options[d] || ObjectUtil.deepMerge(t.options, {}), t.options[d][t.type] = t.options[d][t.type] || {}, t.options[d][t.type].size = d === "search" ? n.option.size.search : n.option.size.form;
1860
1863
  }), t.table = ObjectUtil.deepMerge(t.table, t.options[t.type].table || {});
1861
1864
  }
1862
- t.type === "switch" && (t.options.switch.tableBeforeChange = async (s, c) => {
1865
+ t.type === "switch" && (t.options.switch.tableBeforeChange = async (s, f) => {
1863
1866
  const d = t.options?.switch;
1864
1867
  try {
1865
1868
  d.tableConfig?.confirm && await l.switchConfirmRef.value?.open({
@@ -1868,71 +1871,71 @@ const xt = (e, n) => ({
1868
1871
  });
1869
1872
  try {
1870
1873
  if (!n.option.api.update && !d.tableConfig?.api) return;
1871
- const f = c[n.option.table?.rowKey];
1872
- d.loadingMap || (d.loadingMap = {}), d.loadingMap[f] || (d.loadingMap[f] = { loading: !1 }), d.loadingMap[f].loading = !0;
1873
- const v = c[s] === d.activeValue ? d.inactiveValue : d.activeValue, m = d.tableConfig?.api ? d.tableConfig.api : n.option.api.update;
1874
+ const c = f[n.option.table?.rowKey];
1875
+ d.loadingMap || (d.loadingMap = {}), d.loadingMap[c] || (d.loadingMap[c] = { loading: !1 }), d.loadingMap[c].loading = !0;
1876
+ const v = f[s] === d.activeValue ? d.inactiveValue : d.activeValue, m = d.tableConfig?.api ? d.tableConfig.api : n.option.api.update;
1874
1877
  if (!m) return;
1875
1878
  try {
1876
- await m({ ...c, [s]: v }, "switch");
1879
+ await m({ ...f, [s]: v }, "switch");
1877
1880
  } catch {
1878
1881
  return !1;
1879
1882
  } finally {
1880
- d.loadingMap[f].loading = !1;
1883
+ d.loadingMap[c].loading = !1;
1881
1884
  }
1882
- return S.success(b.tCurd("operationSuccess")), d.tableConfig?.loadList && (o.table.loading = !0, o.table.getList(), o.table.loading = !1), !0;
1883
- } catch (f) {
1884
- return console.error(f), !1;
1885
+ return S.success(b.tCurd("operationSuccess")), d.tableConfig?.loadList && (a.table.loading = !0, a.table.getList(), a.table.loading = !1), !0;
1886
+ } catch (c) {
1887
+ return console.error(c), !1;
1885
1888
  } finally {
1886
- o.table.loading = !1;
1889
+ a.table.loading = !1;
1887
1890
  }
1888
1891
  } catch {
1889
1892
  return !1;
1890
1893
  }
1891
1894
  }), t.type === "treeSelect" && (t.options.treeSelect.rowKey = n.option.table?.rowKey, t.options.treeSelect.nodeKey = n.option.table?.rowKey);
1892
1895
  };
1893
- n.option.column.forEach(a), n.option.table?.column?.forEach(a);
1896
+ n.option.column.forEach(o), n.option.table?.column?.forEach(o);
1894
1897
  },
1895
1898
  initColumnForm: () => {
1896
- const o = e(), i = n.option;
1897
- o.update.formColumn = [], o.update.formGrid = [], o.update.formMaxSpan = 12, o.table.column.show = { list: [], listSource: [] };
1898
- const a = n.option.form?.maxSpan || 12, t = n.option.form?.defaultSpan || a / 2, s = Re((m) => {
1899
+ const a = e(), i = n.option;
1900
+ a.update.formColumn = [], a.update.formGrid = [], a.update.formMaxSpan = 12, a.table.column.show = { list: [], listSource: [] };
1901
+ const o = n.option.form?.maxSpan || 12, t = n.option.form?.defaultSpan || o / 2, s = Re((m) => {
1899
1902
  const g = {
1900
1903
  input: b.tCurd("placeholderInput"),
1901
1904
  select: b.tCurd("placeholderSelect")
1902
1905
  };
1903
1906
  return (g[m.type || "input"] || g.input) + m.label;
1904
- }), c = (m) => {
1907
+ }), f = (m) => {
1905
1908
  if (m.children) {
1906
- o.table.column.show.list.push(m.key), m.children.forEach((g) => c(g));
1909
+ a.table.column.show.list.push(m.key), m.children.forEach((g) => f(g));
1907
1910
  return;
1908
1911
  }
1909
- o.update.formDefault[m.key] = m.value, m.table?.table && (m.show?.table && o.table.column.show.list.push(m.key), o.table.column.show.listSource.push(m.key));
1912
+ a.update.formDefault[m.key] = m.value, m.table?.table && (m.show?.table && a.table.column.show.list.push(m.key), a.table.column.show.listSource.push(m.key));
1910
1913
  };
1911
1914
  i.column.forEach((m) => {
1912
- ce(m, !0), c(m);
1915
+ ue(m, !0), f(m);
1913
1916
  }), n.option.table?.column?.forEach((m) => {
1914
- ce(m, !1), c(m);
1915
- }), o.search.column.list = i.column.concat(i.table?.column || []), o.table.column.list = o.search.column.list.filter((m) => m.table?.table), o.search.column.list.sort((m, g) => m.sort?.search - g.sort?.search), o.table.column.list.sort((m, g) => m.sort?.table - g.sort?.table), o.update.rules = {}, Be(i.column, o.update.formDefault, o.update.rules, (m) => s(m, o.update.form));
1917
+ ue(m, !1), f(m);
1918
+ }), a.search.column.list = i.column.concat(i.table?.column || []), a.table.column.list = a.search.column.list.filter((m) => m.table?.table), a.search.column.list.sort((m, g) => m.sort?.search - g.sort?.search), a.table.column.list.sort((m, g) => m.sort?.table - g.sort?.table), a.update.rules = {}, Be(i.column, a.update.formDefault, a.update.rules, (m) => s(m, a.update.form));
1916
1919
  const d = Ae(i.column, {
1917
- maxSpan: a,
1920
+ maxSpan: o,
1918
1921
  defaultSpan: t,
1919
1922
  layout: n.option.form?.layout
1920
1923
  });
1921
- o.update.formGrid = d.cells, o.update.formMaxSpan = d.maxSpan, o.update.formColumn = Fe(d.cells);
1922
- const f = n.option.search?.formDefault;
1923
- f && Object.keys(f).forEach((m) => {
1924
- o.search.formDefault[m] = f[m];
1924
+ a.update.formGrid = d.cells, a.update.formMaxSpan = d.maxSpan, a.update.formColumn = Fe(d.cells);
1925
+ const c = n.option.search?.formDefault;
1926
+ c && Object.keys(c).forEach((m) => {
1927
+ a.search.formDefault[m] = c[m];
1925
1928
  }), i.column.forEach((m) => {
1926
- m.show?.search || (o.search.formDefault[m.key] = void 0);
1929
+ m.show?.search || (a.search.formDefault[m.key] = void 0);
1927
1930
  });
1928
- const v = ObjectUtil.deepMerge(o.search.formDefault, {});
1929
- J.setValue(o.search.form, v, !0);
1931
+ const v = ObjectUtil.deepMerge(a.search.formDefault, {});
1932
+ J.setValue(a.search.form, v, !0);
1930
1933
  }
1931
1934
  }), $t = (e) => {
1932
- const n = Q(), l = Q(), o = Q(), i = { switchConfirmRef: n, ruleFormRef: l, tableRef: o };
1933
- let a;
1934
- const t = () => a;
1935
- return a = me({
1935
+ const n = Q(), l = Q(), a = Q(), i = { switchConfirmRef: n, ruleFormRef: l, tableRef: a };
1936
+ let o;
1937
+ const t = () => o;
1938
+ return o = me({
1936
1939
  ...pt(),
1937
1940
  option: e.option,
1938
1941
  ...wt(t, e),
@@ -1942,32 +1945,32 @@ const xt = (e, n) => ({
1942
1945
  ...St(t, e, i),
1943
1946
  ...Vt(t, e),
1944
1947
  ...zt(t, e, i)
1945
- }), a.init(), Ve(() => {
1946
- e.option.init !== !1 && a.table.getList();
1947
- }), ze.setConf(a), { conf: a, switchConfirmRef: n, ruleFormRef: l, tableRef: o };
1948
+ }), o.init(), Ve(() => {
1949
+ e.option.init !== !1 && o.table.getList();
1950
+ }), ze.setConf(o), { conf: o, switchConfirmRef: n, ruleFormRef: l, tableRef: a };
1948
1951
  }, Et = { class: "dialog-footer" }, Dt = /* @__PURE__ */ G({
1949
1952
  __name: "switchConfirm",
1950
1953
  props: {
1951
1954
  size: {}
1952
1955
  },
1953
1956
  setup(e, { expose: n }) {
1954
- const l = Q(!1), o = Q("确认修改"), i = Q("确认要修改状态吗?");
1955
- let a = null, t = null;
1956
- const s = (f) => (f?.title && (o.value = f.title), f?.content && (i.value = f.content), l.value = !0, new Promise((v, m) => {
1957
- a = v, t = m;
1958
- })), c = () => {
1959
- l.value = !1, a?.(!0), a = null, t = null;
1957
+ const l = Q(!1), a = Q("确认修改"), i = Q("确认要修改状态吗?");
1958
+ let o = null, t = null;
1959
+ const s = (c) => (c?.title && (a.value = c.title), c?.content && (i.value = c.content), l.value = !0, new Promise((v, m) => {
1960
+ o = v, t = m;
1961
+ })), f = () => {
1962
+ l.value = !1, o?.(!0), o = null, t = null;
1960
1963
  }, d = () => {
1961
- l.value = !1, t?.(new Error("用户取消操作")), a = null, t = null;
1964
+ l.value = !1, t?.(new Error("用户取消操作")), o = null, t = null;
1962
1965
  };
1963
1966
  return n({
1964
1967
  open: s
1965
- }), (f, v) => {
1968
+ }), (c, v) => {
1966
1969
  const m = ae("el-form");
1967
1970
  return u(), h(r(ye), {
1968
1971
  modelValue: l.value,
1969
1972
  "onUpdate:modelValue": v[0] || (v[0] = (g) => l.value = g),
1970
- title: o.value,
1973
+ title: a.value,
1971
1974
  "close-on-click-modal": !1,
1972
1975
  width: "400px"
1973
1976
  }, {
@@ -1983,7 +1986,7 @@ const xt = (e, n) => ({
1983
1986
  }),
1984
1987
  $(r(T), {
1985
1988
  type: "primary",
1986
- onClick: c
1989
+ onClick: f
1987
1990
  }, {
1988
1991
  default: y(() => [...v[2] || (v[2] = [
1989
1992
  V("确认", -1)
@@ -2002,24 +2005,7 @@ const xt = (e, n) => ({
2002
2005
  }, 8, ["modelValue", "title"]);
2003
2006
  };
2004
2007
  }
2005
- }), Z = (e, n) => {
2006
- const l = e.__vccOpts || e;
2007
- for (const [o, i] of n)
2008
- l[o] = i;
2009
- return l;
2010
- }, Ot = {}, Mt = {
2011
- xmlns: "http://www.w3.org/2000/svg",
2012
- viewBox: "0 0 1024 1024"
2013
- };
2014
- function Ft(e, n) {
2015
- return u(), p("svg", Mt, [...n[0] || (n[0] = [
2016
- O("path", {
2017
- fill: "currentColor",
2018
- d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
2019
- }, null, -1)
2020
- ])]);
2021
- }
2022
- const Ut = /* @__PURE__ */ Z(Ot, [["render", Ft]]), At = ["innerHTML"], Rt = /* @__PURE__ */ G({
2008
+ }), Ot = ["innerHTML"], Mt = /* @__PURE__ */ G({
2023
2009
  __name: "text",
2024
2010
  props: {
2025
2011
  content: {},
@@ -2027,26 +2013,130 @@ const Ut = /* @__PURE__ */ Z(Ot, [["render", Ft]]), At = ["innerHTML"], Rt = /*
2027
2013
  },
2028
2014
  setup(e) {
2029
2015
  const n = e, l = te(() => typeof n.content == "function" ? n.content(n.value) : n.content);
2030
- return (o, i) => typeof l.value == "object" ? (u(), h(Y(l.value), { key: 0 })) : (u(), p("div", {
2016
+ return (a, i) => typeof l.value == "object" ? (u(), h(Y(l.value), { key: 0 })) : (u(), p("div", {
2031
2017
  key: 1,
2032
2018
  innerHTML: l.value
2033
- }, null, 8, At));
2019
+ }, null, 8, Ot));
2034
2020
  }
2035
- }), Bt = {}, Tt = {
2036
- "data-v-58697b5c": "",
2021
+ }), ke = /* @__PURE__ */ G({
2022
+ __name: "searchField",
2023
+ props: {
2024
+ item: {},
2025
+ conf: {},
2026
+ type: {}
2027
+ },
2028
+ setup(e) {
2029
+ const n = e, l = te({
2030
+ get: () => n.conf.search.form?.[n.item?.key],
2031
+ set: (a) => {
2032
+ n.item?.key !== void 0 && (n.conf.search.form[n.item.key] = a);
2033
+ }
2034
+ });
2035
+ return (a, i) => r(P).customComponent[e.type ?? ""]?.search ? (u(), h(Y(r(P).customComponent[e.type ?? ""]?.search), C({
2036
+ key: 0,
2037
+ modelValue: l.value,
2038
+ "onUpdate:modelValue": i[0] || (i[0] = (o) => l.value = o)
2039
+ }, e.item.options?.search?.[e.type ?? ""], E(e.item.options?.search?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : e.type === "input" ? (u(), h(r(se), C({
2040
+ key: 1,
2041
+ modelValue: l.value,
2042
+ "onUpdate:modelValue": i[1] || (i[1] = (o) => l.value = o),
2043
+ placeholder: e.conf.search.getPlaceholder(e.item),
2044
+ clearable: "",
2045
+ disabled: e.item.disabled?.search
2046
+ }, e.item.options?.search?.input || e.item.options?.input, E(e.item.options?.search?.input?.on || e.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "switch" ? (u(), h(r(oe), C({
2047
+ key: 2,
2048
+ modelValue: l.value,
2049
+ "onUpdate:modelValue": i[2] || (i[2] = (o) => l.value = o),
2050
+ placeholder: e.conf.search.getPlaceholder(e.item, r(b).tCurd("placeholderSelect")),
2051
+ clearable: "",
2052
+ disabled: e.item.disabled?.search
2053
+ }, e.item.options?.search?.switch || e.item.options?.switch, E(e.item.options?.search?.switch?.on || e.item.options?.switch?.on || {})), {
2054
+ default: y(() => [
2055
+ (u(), h(r(X), {
2056
+ key: e.item.options?.switch?.activeValue,
2057
+ label: e.item.options?.switch?.activeText,
2058
+ value: e.item.options?.switch?.activeValue
2059
+ }, null, 8, ["label", "value"])),
2060
+ (u(), h(r(X), {
2061
+ key: e.item.options?.switch?.inactiveValue,
2062
+ label: e.item.options?.switch?.inactiveText,
2063
+ value: e.item.options?.switch?.inactiveValue
2064
+ }, null, 8, ["label", "value"]))
2065
+ ]),
2066
+ _: 1
2067
+ }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "select" ? (u(), h(r(oe), C({
2068
+ key: 3,
2069
+ modelValue: l.value,
2070
+ "onUpdate:modelValue": i[3] || (i[3] = (o) => l.value = o),
2071
+ placeholder: e.conf.search.getPlaceholder(e.item, r(b).tCurd("placeholderSelect")),
2072
+ clearable: "",
2073
+ disabled: e.item.disabled?.search
2074
+ }, e.item.options?.search?.select || e.item.options?.select, E(e.item.options?.search?.select?.on || e.item.options?.select?.on || {})), {
2075
+ default: y(() => [
2076
+ (u(!0), p(F, null, j(e.item.options?.search?.select?.data || e.item.options?.select?.data || [], (o) => (u(), h(r(X), {
2077
+ key: o.value,
2078
+ label: o.label,
2079
+ value: o.value
2080
+ }, null, 8, ["label", "value"]))), 128))
2081
+ ]),
2082
+ _: 1
2083
+ }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (u(), h(r(Ce), C({
2084
+ key: 4,
2085
+ modelValue: l.value,
2086
+ "onUpdate:modelValue": i[4] || (i[4] = (o) => l.value = o),
2087
+ disabled: e.item.disabled?.search
2088
+ }, e.item.options?.search?.radio || e.item.options?.radio, E(e.item.options?.search?.radio?.on || e.item.options?.radio?.on || {})), {
2089
+ default: y(() => [
2090
+ (u(!0), p(F, null, j(e.item.options?.radio?.data, (o) => (u(), h(r(xe), {
2091
+ key: o.value,
2092
+ label: o.label,
2093
+ value: o.value
2094
+ }, null, 8, ["label", "value"]))), 128))
2095
+ ]),
2096
+ _: 1
2097
+ }, 16, ["modelValue", "disabled"])) : e.type === "datetime" ? (u(), h(r(Se), C({
2098
+ key: 5,
2099
+ modelValue: l.value,
2100
+ "onUpdate:modelValue": i[5] || (i[5] = (o) => l.value = o),
2101
+ disabled: e.item.disabled?.search
2102
+ }, e.item.options?.search?.datetime || e.item.options?.datetime, E(e.item.options?.search?.datetime?.on || e.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : e.type && r(P).customComponent[e.type] ? (u(), h(Y(r(P).customComponent[e.type]), C({
2103
+ key: 6,
2104
+ modelValue: l.value,
2105
+ "onUpdate:modelValue": i[6] || (i[6] = (o) => l.value = o)
2106
+ }, e.item.options?.search?.[e.type] || e.item.options?.[e.type], E(e.item.options?.search?.[e.type]?.on || e.item.options?.[e.type]?.on || {}), {
2107
+ disabled: e.item.disabled?.search
2108
+ }), null, 16, ["modelValue", "disabled"])) : w("", !0);
2109
+ }
2110
+ }), Z = (e, n) => {
2111
+ const l = e.__vccOpts || e;
2112
+ for (const [a, i] of n)
2113
+ l[a] = i;
2114
+ return l;
2115
+ }, Ft = {}, Ut = {
2037
2116
  xmlns: "http://www.w3.org/2000/svg",
2038
- viewBox: "0 0 1024 1024"
2117
+ viewBox: "64 64 896 896"
2118
+ };
2119
+ function At(e, n) {
2120
+ return u(), p("svg", Ut, [...n[0] || (n[0] = [
2121
+ O("path", {
2122
+ fill: "currentColor",
2123
+ d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
2124
+ }, null, -1)
2125
+ ])]);
2126
+ }
2127
+ const Rt = /* @__PURE__ */ Z(Ft, [["render", At]]), Bt = {}, Tt = {
2128
+ xmlns: "http://www.w3.org/2000/svg",
2129
+ viewBox: "64 64 896 896"
2039
2130
  };
2040
2131
  function Lt(e, n) {
2041
2132
  return u(), p("svg", Tt, [...n[0] || (n[0] = [
2042
2133
  O("path", {
2043
2134
  fill: "currentColor",
2044
- d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
2135
+ d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
2045
2136
  }, null, -1)
2046
2137
  ])]);
2047
2138
  }
2048
2139
  const jt = /* @__PURE__ */ Z(Bt, [["render", Lt]]), Pt = {}, It = {
2049
- "data-v-58697b5c": "",
2050
2140
  xmlns: "http://www.w3.org/2000/svg",
2051
2141
  viewBox: "0 0 1024 1024"
2052
2142
  };
@@ -2054,7 +2144,7 @@ function Kt(e, n) {
2054
2144
  return u(), p("svg", It, [...n[0] || (n[0] = [
2055
2145
  O("path", {
2056
2146
  fill: "currentColor",
2057
- d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z"
2147
+ d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
2058
2148
  }, null, -1)
2059
2149
  ])]);
2060
2150
  }
@@ -2065,13 +2155,39 @@ const Ht = /* @__PURE__ */ Z(Pt, [["render", Kt]]), Gt = {}, Nt = {
2065
2155
  };
2066
2156
  function Wt(e, n) {
2067
2157
  return u(), p("svg", Nt, [...n[0] || (n[0] = [
2158
+ O("path", {
2159
+ fill: "currentColor",
2160
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
2161
+ }, null, -1)
2162
+ ])]);
2163
+ }
2164
+ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = {}, qt = {
2165
+ "data-v-58697b5c": "",
2166
+ xmlns: "http://www.w3.org/2000/svg",
2167
+ viewBox: "0 0 1024 1024"
2168
+ };
2169
+ function Xt(e, n) {
2170
+ return u(), p("svg", qt, [...n[0] || (n[0] = [
2171
+ O("path", {
2172
+ fill: "currentColor",
2173
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z"
2174
+ }, null, -1)
2175
+ ])]);
2176
+ }
2177
+ const Yt = /* @__PURE__ */ Z(Qt, [["render", Xt]]), Zt = {}, _t = {
2178
+ "data-v-58697b5c": "",
2179
+ xmlns: "http://www.w3.org/2000/svg",
2180
+ viewBox: "0 0 1024 1024"
2181
+ };
2182
+ function eo(e, n) {
2183
+ return u(), p("svg", _t, [...n[0] || (n[0] = [
2068
2184
  O("path", {
2069
2185
  fill: "currentColor",
2070
2186
  d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"
2071
2187
  }, null, -1)
2072
2188
  ])]);
2073
2189
  }
2074
- const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-center table-header-label inline" }, qt = { class: "table-header-tooltip" }, Xt = ["innerHTML"], Yt = ["onClick"], Zt = { key: 1 }, _t = ["onClick", "innerHTML"], eo = /* @__PURE__ */ G({
2190
+ const to = /* @__PURE__ */ Z(Zt, [["render", eo]]), oo = { class: "row flex-center table-header-label inline" }, ao = { class: "table-header-tooltip" }, no = ["innerHTML"], lo = ["onClick"], io = { key: 1 }, ro = ["onClick", "innerHTML"], so = /* @__PURE__ */ G({
2075
2191
  __name: "tableColumn",
2076
2192
  props: {
2077
2193
  conf: {},
@@ -2080,8 +2196,8 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2080
2196
  },
2081
2197
  setup(e) {
2082
2198
  const n = S.isFun, l = Qe().type;
2083
- return (o, i) => {
2084
- const a = ae("el-tooltip");
2199
+ return (a, i) => {
2200
+ const o = ae("el-tooltip");
2085
2201
  return u(!0), p(F, null, j(e.columnList, (t) => (u(), p(F, {
2086
2202
  key: t.key
2087
2203
  }, [
@@ -2092,9 +2208,9 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2092
2208
  label: t.label
2093
2209
  }, { ref_for: !0 }, t.table), {
2094
2210
  header: y(() => [
2095
- k(o.$slots, "table-header-" + t.key, { item: t }, () => [
2096
- O("div", Qt, [
2097
- t.table?.header?.tooltip ? (u(), h(a, {
2211
+ k(a.$slots, "table-header-" + t.key, { item: t }, () => [
2212
+ O("div", oo, [
2213
+ t.table?.header?.tooltip ? (u(), h(o, {
2098
2214
  key: 0,
2099
2215
  effect: "dark",
2100
2216
  placement: "top"
@@ -2102,11 +2218,11 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2102
2218
  content: y(() => [
2103
2219
  O("div", {
2104
2220
  innerHTML: t.table?.header?.tooltip
2105
- }, null, 8, Xt)
2221
+ }, null, 8, no)
2106
2222
  ]),
2107
2223
  default: y(() => [
2108
- O("span", qt, [
2109
- $(jt)
2224
+ O("span", ao, [
2225
+ $(Jt)
2110
2226
  ])
2111
2227
  ]),
2112
2228
  _: 2
@@ -2124,8 +2240,8 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2124
2240
  ["stop"]
2125
2241
  )
2126
2242
  }, [
2127
- t.table.header.group ? (u(), h(Ht, { key: 0 })) : (u(), h(Jt, { key: 1 }))
2128
- ], 8, Yt)) : w("", !0)
2243
+ t.table.header.group ? (u(), h(Yt, { key: 0 })) : (u(), h(to, { key: 1 }))
2244
+ ], 8, lo)) : w("", !0)
2129
2245
  ])
2130
2246
  ])
2131
2247
  ]),
@@ -2137,10 +2253,10 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2137
2253
  columnList: t.children,
2138
2254
  option: e.option
2139
2255
  }, W({ _: 2 }, [
2140
- j(o.$slots, (c, d) => ({
2256
+ j(a.$slots, (f, d) => ({
2141
2257
  name: d,
2142
- fn: y((f) => [
2143
- k(o.$slots, d, C({ ref_for: !0 }, f || {}))
2258
+ fn: y((c) => [
2259
+ k(a.$slots, d, C({ ref_for: !0 }, c || {}))
2144
2260
  ])
2145
2261
  }))
2146
2262
  ]), 1032, ["conf", "columnList", "option"]))
@@ -2150,14 +2266,14 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2150
2266
  class: I(["row", ["table-edit-" + t.key]]),
2151
2267
  style: { width: "100%" }
2152
2268
  }, [
2153
- k(o.$slots, "table-edit-left-" + t.key, {
2269
+ k(a.$slots, "table-edit-left-" + t.key, {
2154
2270
  row: s,
2155
2271
  item: t
2156
2272
  }),
2157
2273
  t.type === "input" ? (u(), h(r(se), C({
2158
2274
  key: 0,
2159
2275
  modelValue: s[t.key],
2160
- "onUpdate:modelValue": (c) => s[t.key] = c,
2276
+ "onUpdate:modelValue": (f) => s[t.key] = f,
2161
2277
  disabled: e.conf.update.getDisabled(t, !0),
2162
2278
  class: "col"
2163
2279
  }, { ref_for: !0 }, e.conf.update.getBind(t), E(e.conf.update.getOn(t, s))), W({ _: 2 }, [
@@ -2171,26 +2287,26 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2171
2287
  ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "select" ? (u(), h(r(oe), C({
2172
2288
  key: 1,
2173
2289
  modelValue: s[t.key],
2174
- "onUpdate:modelValue": (c) => s[t.key] = c,
2290
+ "onUpdate:modelValue": (f) => s[t.key] = f,
2175
2291
  disabled: e.conf.update.getDisabled(t, !0),
2176
2292
  class: "col"
2177
2293
  }, { ref_for: !0 }, e.conf.update.getBind(t), E(e.conf.update.getOn(t, s))), {
2178
2294
  default: y(() => [
2179
- (u(!0), p(F, null, j(t.options?.search?.select?.data || t.options?.select?.data, (c) => (u(), h(r(X), {
2180
- key: c.value,
2181
- label: c.label,
2182
- value: c.value
2295
+ (u(!0), p(F, null, j(t.options?.search?.select?.data || t.options?.select?.data, (f) => (u(), h(r(X), {
2296
+ key: f.value,
2297
+ label: f.label,
2298
+ value: f.value
2183
2299
  }, null, 8, ["label", "value"]))), 128))
2184
2300
  ]),
2185
2301
  _: 2
2186
2302
  }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "switch" ? (u(), h(r(ie), C({
2187
2303
  key: 2,
2188
2304
  modelValue: s[t.key],
2189
- "onUpdate:modelValue": (c) => s[t.key] = c,
2305
+ "onUpdate:modelValue": (f) => s[t.key] = f,
2190
2306
  disabled: e.conf.update.getDisabled(t, !0),
2191
2307
  class: "col"
2192
2308
  }, { ref_for: !0 }, e.conf.update.getBind(t), E(e.conf.update.getOn(t, s))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : w("", !0),
2193
- k(o.$slots, "table-edit-right-" + t.key, {
2309
+ k(a.$slots, "table-edit-right-" + t.key, {
2194
2310
  row: s,
2195
2311
  item: t
2196
2312
  })
@@ -2199,7 +2315,7 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2199
2315
  t.type === "input" ? (u(), h(r(se), C({
2200
2316
  key: 0,
2201
2317
  modelValue: e.conf.update.form[t.key],
2202
- "onUpdate:modelValue": (c) => e.conf.update.form[t.key] = c,
2318
+ "onUpdate:modelValue": (f) => e.conf.update.form[t.key] = f,
2203
2319
  disabled: e.conf.update.getDisabled(t, !0)
2204
2320
  }, { ref_for: !0 }, e.conf.update.getBind(t), E(e.conf.update.getOn(t, s)), { style: { width: "100%" } }), W({ _: 2 }, [
2205
2321
  t.options?.input?.prepend ? {
@@ -2212,25 +2328,25 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2212
2328
  ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "select" ? (u(), h(r(oe), C({
2213
2329
  key: 1,
2214
2330
  modelValue: e.conf.update.form[t.key],
2215
- "onUpdate:modelValue": (c) => e.conf.update.form[t.key] = c,
2331
+ "onUpdate:modelValue": (f) => e.conf.update.form[t.key] = f,
2216
2332
  disabled: e.conf.update.getDisabled(t, !0)
2217
2333
  }, { ref_for: !0 }, e.conf.update.getBind(t), E(e.conf.update.getOn(t, s)), { style: { width: "100%" } }), {
2218
2334
  default: y(() => [
2219
- (u(!0), p(F, null, j(t.options?.search?.select?.data || t.options?.select?.data, (c) => (u(), h(r(X), {
2220
- key: c.value,
2221
- label: c.label,
2222
- value: c.value
2335
+ (u(!0), p(F, null, j(t.options?.search?.select?.data || t.options?.select?.data, (f) => (u(), h(r(X), {
2336
+ key: f.value,
2337
+ label: f.label,
2338
+ value: f.value
2223
2339
  }, null, 8, ["label", "value"]))), 128))
2224
2340
  ]),
2225
2341
  _: 2
2226
2342
  }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "switch" ? (u(), h(r(ie), C({
2227
2343
  key: 2,
2228
2344
  modelValue: e.conf.update.form[t.key],
2229
- "onUpdate:modelValue": (c) => e.conf.update.form[t.key] = c
2345
+ "onUpdate:modelValue": (f) => e.conf.update.form[t.key] = f
2230
2346
  }, { ref_for: !0 }, e.conf.update.getBind(t), E(e.conf.update.getOn(t, s)), {
2231
2347
  disabled: e.conf.update.getDisabled(t, !0)
2232
2348
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : w("", !0)
2233
- ], 64)) : k(o.$slots, "table-" + t.key, {
2349
+ ], 64)) : k(a.$slots, "table-" + t.key, {
2234
2350
  key: 1,
2235
2351
  row: s,
2236
2352
  item: t
@@ -2238,24 +2354,24 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2238
2354
  r(P).customComponent[t.type ?? ""]?.table ? (u(), h(Y(r(P).customComponent[t.type ?? ""]?.table), C({
2239
2355
  key: 0,
2240
2356
  modelValue: s[t.key],
2241
- "onUpdate:modelValue": (c) => s[t.key] = c
2357
+ "onUpdate:modelValue": (f) => s[t.key] = f
2242
2358
  }, { ref_for: !0 }, t.options?.[t.type ?? ""], E(t.options?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : t.type === "switch" ? (u(), p(F, { key: 1 }, [
2243
2359
  t.options?.switch?.tableConfig?.change ? (u(), h(r(ie), C({
2244
2360
  key: 0,
2245
2361
  modelValue: s[t.key],
2246
- "onUpdate:modelValue": (c) => s[t.key] = c,
2362
+ "onUpdate:modelValue": (f) => s[t.key] = f,
2247
2363
  loading: t.options?.switch?.loadingMap?.[s[e.option.table?.rowKey]]?.loading,
2248
2364
  "before-change": () => t.options?.switch?.tableBeforeChange?.(t.key, s)
2249
- }, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (u(), p("span", Zt, D(s[t.key] === t.options?.switch?.activeValue ? t.options?.switch?.activeText : t.options?.switch?.inactiveText), 1))
2365
+ }, { ref_for: !0 }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (u(), p("span", io, D(s[t.key] === t.options?.switch?.activeValue ? t.options?.switch?.activeText : t.options?.switch?.inactiveText), 1))
2250
2366
  ], 64)) : (u(), p("span", {
2251
2367
  key: 2,
2252
2368
  style: de({
2253
2369
  "--table-text-click-color": t.table?.click?.color
2254
2370
  }),
2255
2371
  class: I({ "table-text-click": t.table?.click?.callback }),
2256
- onClick: (c) => t.table?.click?.callback?.(s),
2372
+ onClick: (f) => t.table?.click?.callback?.(s),
2257
2373
  innerHTML: t.table?.format ? t.table?.format(s) : s[t.key]
2258
- }, null, 14, _t))
2374
+ }, null, 14, ro))
2259
2375
  ])
2260
2376
  ], 64))
2261
2377
  ], 64))
@@ -2266,123 +2382,10 @@ const Jt = /* @__PURE__ */ Z(Gt, [["render", Wt]]), Qt = { class: "row flex-cent
2266
2382
  ], 64))), 128);
2267
2383
  };
2268
2384
  }
2269
- }), to = {}, oo = {
2270
- xmlns: "http://www.w3.org/2000/svg",
2271
- viewBox: "64 64 896 896"
2272
- };
2273
- function ao(e, n) {
2274
- return u(), p("svg", oo, [...n[0] || (n[0] = [
2275
- O("path", {
2276
- fill: "currentColor",
2277
- d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
2278
- }, null, -1)
2279
- ])]);
2280
- }
2281
- const no = /* @__PURE__ */ Z(to, [["render", ao]]), lo = {}, io = {
2282
- xmlns: "http://www.w3.org/2000/svg",
2283
- viewBox: "64 64 896 896"
2284
- };
2285
- function ro(e, n) {
2286
- return u(), p("svg", io, [...n[0] || (n[0] = [
2287
- O("path", {
2288
- fill: "currentColor",
2289
- d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
2290
- }, null, -1)
2291
- ])]);
2292
- }
2293
- const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2294
- __name: "searchField",
2295
- props: {
2296
- item: {},
2297
- conf: {},
2298
- type: {}
2299
- },
2300
- setup(e) {
2301
- const n = e, l = te({
2302
- get: () => n.conf.search.form?.[n.item?.key],
2303
- set: (o) => {
2304
- n.item?.key !== void 0 && (n.conf.search.form[n.item.key] = o);
2305
- }
2306
- });
2307
- return (o, i) => r(P).customComponent[e.type ?? ""]?.search ? (u(), h(Y(r(P).customComponent[e.type ?? ""]?.search), C({
2308
- key: 0,
2309
- modelValue: l.value,
2310
- "onUpdate:modelValue": i[0] || (i[0] = (a) => l.value = a)
2311
- }, e.item.options?.search?.[e.type ?? ""], E(e.item.options?.search?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : e.type === "input" ? (u(), h(r(se), C({
2312
- key: 1,
2313
- modelValue: l.value,
2314
- "onUpdate:modelValue": i[1] || (i[1] = (a) => l.value = a),
2315
- placeholder: e.conf.search.getPlaceholder(e.item),
2316
- clearable: "",
2317
- disabled: e.item.disabled?.search
2318
- }, e.item.options?.search?.input || e.item.options?.input, E(e.item.options?.search?.input?.on || e.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "switch" ? (u(), h(r(oe), C({
2319
- key: 2,
2320
- modelValue: l.value,
2321
- "onUpdate:modelValue": i[2] || (i[2] = (a) => l.value = a),
2322
- placeholder: e.conf.search.getPlaceholder(e.item, r(b).tCurd("placeholderSelect")),
2323
- clearable: "",
2324
- disabled: e.item.disabled?.search
2325
- }, e.item.options?.search?.switch || e.item.options?.switch, E(e.item.options?.search?.switch?.on || e.item.options?.switch?.on || {})), {
2326
- default: y(() => [
2327
- (u(), h(r(X), {
2328
- key: e.item.options?.switch?.activeValue,
2329
- label: e.item.options?.switch?.activeText,
2330
- value: e.item.options?.switch?.activeValue
2331
- }, null, 8, ["label", "value"])),
2332
- (u(), h(r(X), {
2333
- key: e.item.options?.switch?.inactiveValue,
2334
- label: e.item.options?.switch?.inactiveText,
2335
- value: e.item.options?.switch?.inactiveValue
2336
- }, null, 8, ["label", "value"]))
2337
- ]),
2338
- _: 1
2339
- }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "select" ? (u(), h(r(oe), C({
2340
- key: 3,
2341
- modelValue: l.value,
2342
- "onUpdate:modelValue": i[3] || (i[3] = (a) => l.value = a),
2343
- placeholder: e.conf.search.getPlaceholder(e.item, r(b).tCurd("placeholderSelect")),
2344
- clearable: "",
2345
- disabled: e.item.disabled?.search
2346
- }, e.item.options?.search?.select || e.item.options?.select, E(e.item.options?.search?.select?.on || e.item.options?.select?.on || {})), {
2347
- default: y(() => [
2348
- (u(!0), p(F, null, j(e.item.options?.search?.select?.data || e.item.options?.select?.data || [], (a) => (u(), h(r(X), {
2349
- key: a.value,
2350
- label: a.label,
2351
- value: a.value
2352
- }, null, 8, ["label", "value"]))), 128))
2353
- ]),
2354
- _: 1
2355
- }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (u(), h(r(Ce), C({
2356
- key: 4,
2357
- modelValue: l.value,
2358
- "onUpdate:modelValue": i[4] || (i[4] = (a) => l.value = a),
2359
- disabled: e.item.disabled?.search
2360
- }, e.item.options?.search?.radio || e.item.options?.radio, E(e.item.options?.search?.radio?.on || e.item.options?.radio?.on || {})), {
2361
- default: y(() => [
2362
- (u(!0), p(F, null, j(e.item.options?.radio?.data, (a) => (u(), h(r(xe), {
2363
- key: a.value,
2364
- label: a.label,
2365
- value: a.value
2366
- }, null, 8, ["label", "value"]))), 128))
2367
- ]),
2368
- _: 1
2369
- }, 16, ["modelValue", "disabled"])) : e.type === "datetime" ? (u(), h(r(Se), C({
2370
- key: 5,
2371
- modelValue: l.value,
2372
- "onUpdate:modelValue": i[5] || (i[5] = (a) => l.value = a),
2373
- disabled: e.item.disabled?.search
2374
- }, e.item.options?.search?.datetime || e.item.options?.datetime, E(e.item.options?.search?.datetime?.on || e.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : e.type && r(P).customComponent[e.type] ? (u(), h(Y(r(P).customComponent[e.type]), C({
2375
- key: 6,
2376
- modelValue: l.value,
2377
- "onUpdate:modelValue": i[6] || (i[6] = (a) => l.value = a)
2378
- }, e.item.options?.search?.[e.type] || e.item.options?.[e.type], E(e.item.options?.search?.[e.type]?.on || e.item.options?.[e.type]?.on || {}), {
2379
- disabled: e.item.disabled?.search
2380
- }), null, 16, ["modelValue", "disabled"])) : w("", !0);
2381
- }
2382
- }), co = {
2385
+ }), uo = {
2383
2386
  key: 0,
2384
2387
  class: "relative curd-search fit-width"
2385
- }, uo = { class: "mb-10 flex justify-between items-center fit-width" }, fo = {
2388
+ }, co = { class: "mb-10 flex justify-between items-center fit-width" }, fo = {
2386
2389
  class: "flex items-center",
2387
2390
  style: { gap: "10px" }
2388
2391
  }, mo = { key: 0 }, go = { key: 1 }, ho = { key: 2 }, yo = { class: "export-btn" }, bo = {
@@ -2414,10 +2417,10 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2414
2417
  }
2415
2418
  },
2416
2419
  setup(e, { expose: n }) {
2417
- const l = S.EDialog, o = e, i = S.isFun, { conf: a, switchConfirmRef: t, ruleFormRef: s, tableRef: c } = $t(o);
2420
+ const l = S.EDialog, a = e, i = S.isFun, { conf: o, switchConfirmRef: t, ruleFormRef: s, tableRef: f } = $t(a);
2418
2421
  return n({
2419
- conf: a
2420
- }), (d, f) => {
2422
+ conf: o
2423
+ }), (d, c) => {
2421
2424
  const v = ae("el-tooltip"), m = Xe("loading");
2422
2425
  return u(), p("div", {
2423
2426
  class: I(["relative cc1-form-box", [e.option.table?.fitHeight ? "col" : "no-min-height"]])
@@ -2430,64 +2433,64 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2430
2433
  O("div", {
2431
2434
  class: I(["column fit-width no-wrap", [e.option.table?.fitHeight ? "col" : ""]])
2432
2435
  }, [
2433
- e.option.search?.show !== !1 ? (u(), p("div", co, [
2436
+ e.option.search?.show !== !1 ? (u(), p("div", uo, [
2434
2437
  $(r(q), {
2435
- model: r(a).search.form,
2438
+ model: r(o).search.form,
2436
2439
  inline: "",
2437
2440
  size: e.option.size?.search
2438
2441
  }, {
2439
2442
  default: y(() => [
2440
2443
  k(d.$slots, "search-start", {
2441
- row: r(a).search.form
2444
+ row: r(o).search.form
2442
2445
  }),
2443
- (u(!0), p(F, null, j(r(a).search.column.list, (g) => (u(), p(F, {
2446
+ (u(!0), p(F, null, j(r(o).search.column.list, (g) => (u(), p(F, {
2444
2447
  key: g.key
2445
2448
  }, [
2446
2449
  k(d.$slots, "search-" + g.key + "-start", {
2447
- row: r(a).search.form
2450
+ row: r(o).search.form
2448
2451
  }),
2449
- (typeof g.show?.search == "function" ? g.show?.search(r(a).search.form) : g.show?.search) ? (u(), h(r(he), {
2452
+ (typeof g.show?.search == "function" ? g.show?.search(r(o).search.form) : g.show?.search) ? (u(), h(r(he), {
2450
2453
  key: 0,
2451
2454
  label: g.text?.search?.label ?? g.label
2452
2455
  }, {
2453
2456
  default: y(() => [
2454
2457
  k(d.$slots, "search-" + g.key + "-left", {
2455
- row: r(a).search.form
2458
+ row: r(o).search.form
2456
2459
  }),
2457
2460
  k(d.$slots, "search-" + g.key, {
2458
- row: r(a).search.form
2461
+ row: r(o).search.form
2459
2462
  }, () => [
2460
2463
  g.options?.search?.type ? (u(), h(ke, {
2461
2464
  key: 0,
2462
2465
  item: g,
2463
- conf: r(a),
2466
+ conf: r(o),
2464
2467
  type: g.options.search.type
2465
2468
  }, null, 8, ["item", "conf", "type"])) : (u(), h(ke, {
2466
2469
  key: 1,
2467
2470
  item: g,
2468
- conf: r(a),
2471
+ conf: r(o),
2469
2472
  type: g.type
2470
2473
  }, null, 8, ["item", "conf", "type"]))
2471
2474
  ]),
2472
2475
  k(d.$slots, "search-" + g.key + "-right", {
2473
- row: r(a).search.form
2476
+ row: r(o).search.form
2474
2477
  })
2475
2478
  ]),
2476
2479
  _: 2
2477
2480
  }, 1032, ["label"])) : w("", !0),
2478
2481
  k(d.$slots, "search-" + g.key + "-end", {
2479
- row: r(a).search.form
2482
+ row: r(o).search.form
2480
2483
  })
2481
2484
  ], 64))), 128)),
2482
2485
  k(d.$slots, "search-center", {
2483
- row: r(a).search.form
2486
+ row: r(o).search.form
2484
2487
  }),
2485
2488
  e.option.tools?.search || e.option.tools?.reset ? (u(), h(r(he), { key: 0 }, {
2486
2489
  default: y(() => [
2487
2490
  e.option.tools?.search ? (u(), h(r(T), {
2488
2491
  key: 0,
2489
2492
  type: "primary",
2490
- onClick: r(a).search.submit
2493
+ onClick: r(o).search.submit
2491
2494
  }, {
2492
2495
  default: y(() => [
2493
2496
  V(D(r(b).tCurd("search")), 1)
@@ -2496,7 +2499,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2496
2499
  }, 8, ["onClick"])) : w("", !0),
2497
2500
  e.option.tools?.reset ? (u(), h(r(T), {
2498
2501
  key: 1,
2499
- onClick: r(a).search.reset
2502
+ onClick: r(o).search.reset
2500
2503
  }, {
2501
2504
  default: y(() => [
2502
2505
  V(D(r(b).tCurd("reset")), 1)
@@ -2507,18 +2510,18 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2507
2510
  _: 1
2508
2511
  })) : w("", !0),
2509
2512
  k(d.$slots, "search-end", {
2510
- row: r(a).search.form
2513
+ row: r(o).search.form
2511
2514
  })
2512
2515
  ]),
2513
2516
  _: 3
2514
2517
  }, 8, ["model", "size"])
2515
2518
  ])) : w("", !0),
2516
- O("div", uo, [
2519
+ O("div", co, [
2517
2520
  O("div", fo, [
2518
2521
  r(i)(e.option.tools?.add) ? (u(), p("div", mo, [
2519
2522
  $(r(T), {
2520
2523
  type: "primary",
2521
- onClick: f[0] || (f[0] = (g) => r(a).update.open(r(l).Add)),
2524
+ onClick: c[0] || (c[0] = (g) => r(o).update.open(r(l).Add)),
2522
2525
  size: e.option.size?.search
2523
2526
  }, {
2524
2527
  default: y(() => [
@@ -2530,7 +2533,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2530
2533
  e.option.table?.selectable && r(i)(e.option.tools?.delete) ? (u(), p("div", go, [
2531
2534
  $(r(T), {
2532
2535
  type: "danger",
2533
- onClick: f[1] || (f[1] = (g) => r(a).remove.open(r(a).table.selection.list)),
2536
+ onClick: c[1] || (c[1] = (g) => r(o).remove.open(r(o).table.selection.list)),
2534
2537
  size: e.option.size?.search
2535
2538
  }, {
2536
2539
  default: y(() => [
@@ -2542,7 +2545,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2542
2545
  e.option.tools?.expand ? (u(), p("div", ho, [
2543
2546
  $(r(T), {
2544
2547
  type: "warning",
2545
- onClick: f[2] || (f[2] = (g) => r(a).table.expand.all()),
2548
+ onClick: c[2] || (c[2] = (g) => r(o).table.expand.all()),
2546
2549
  size: e.option.size?.search
2547
2550
  }, {
2548
2551
  default: y(() => [
@@ -2554,7 +2557,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2554
2557
  e.option.tools?.export?.show ? (u(), p(F, { key: 3 }, [
2555
2558
  e.option.tools?.export?.dropdown?.show ? (u(), h(r(Ge), {
2556
2559
  key: 0,
2557
- onCommand: r(a).export.click
2560
+ onCommand: r(o).export.click
2558
2561
  }, {
2559
2562
  dropdown: y(() => [
2560
2563
  $(r(Ne), {
@@ -2596,7 +2599,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2596
2599
  O("div", yo, [
2597
2600
  $(r(T), {
2598
2601
  type: "warning",
2599
- loading: r(a).export.loading,
2602
+ loading: r(o).export.loading,
2600
2603
  size: e.option.size?.search
2601
2604
  }, {
2602
2605
  default: y(() => [
@@ -2610,9 +2613,9 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2610
2613
  }, 8, ["onCommand"])) : (u(), p("div", bo, [
2611
2614
  $(r(T), {
2612
2615
  type: "warning",
2613
- loading: r(a).export.loading,
2616
+ loading: r(o).export.loading,
2614
2617
  size: e.option.size?.search,
2615
- onClick: f[3] || (f[3] = (g) => r(a).export.run.start("all"))
2618
+ onClick: c[3] || (c[3] = (g) => r(o).export.run.start("all"))
2616
2619
  }, {
2617
2620
  default: y(() => [
2618
2621
  V(D(r(b).tCurd("export")), 1)
@@ -2625,34 +2628,34 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2625
2628
  ]),
2626
2629
  O("div", po, [
2627
2630
  k(d.$slots, "tools-right"),
2628
- r(a).page.showTools ? (u(), h(r(we), C({
2631
+ r(o).page.showTools ? (u(), h(r(we), C({
2629
2632
  key: 0,
2630
- "current-page": r(a).page.num,
2631
- "onUpdate:currentPage": f[4] || (f[4] = (g) => r(a).page.num = g),
2632
- "page-size": r(a).page.size,
2633
- "onUpdate:pageSize": f[5] || (f[5] = (g) => r(a).page.size = g),
2633
+ "current-page": r(o).page.num,
2634
+ "onUpdate:currentPage": c[4] || (c[4] = (g) => r(o).page.num = g),
2635
+ "page-size": r(o).page.size,
2636
+ "onUpdate:pageSize": c[5] || (c[5] = (g) => r(o).page.size = g),
2634
2637
  background: "",
2635
- "page-sizes": r(a).page.sizeList,
2636
- "pager-count": r(a).page.pagerCount,
2637
- layout: r(a).page.layout,
2638
- total: r(a).page.total,
2638
+ "page-sizes": r(o).page.sizeList,
2639
+ "pager-count": r(o).page.pagerCount,
2640
+ layout: r(o).page.layout,
2641
+ total: r(o).page.total,
2639
2642
  size: e.option.size?.table,
2640
- onSizeChange: r(a).table.getList,
2641
- onCurrentChange: r(a).table.getList
2643
+ onSizeChange: r(o).table.getList,
2644
+ onCurrentChange: r(o).table.getList
2642
2645
  }, e.option.page?.pagination || {}, E(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : w("", !0),
2643
2646
  e.option.tools?.expandColumn === void 0 || e.option.tools?.expandColumn ? (u(), h(v, {
2644
2647
  key: 1,
2645
2648
  effect: "dark",
2646
- content: r(a).table.header.group.expand ? r(b).tCurd("mergeColumn") : r(b).tCurd("expandColumn"),
2649
+ content: r(o).table.header.group.expand ? r(b).tCurd("mergeColumn") : r(b).tCurd("expandColumn"),
2647
2650
  placement: "top"
2648
2651
  }, {
2649
2652
  default: y(() => [
2650
2653
  O("div", {
2651
2654
  class: I(["refresh-btn", [e.option.size?.search]]),
2652
- onClick: f[6] || (f[6] = //@ts-ignore
2653
- (...g) => r(a).table.header.group.toggleExpandAll && r(a).table.header.group.toggleExpandAll(...g))
2655
+ onClick: c[6] || (c[6] = //@ts-ignore
2656
+ (...g) => r(o).table.header.group.toggleExpandAll && r(o).table.header.group.toggleExpandAll(...g))
2654
2657
  }, [
2655
- r(a).table.header.group.expand ? (u(), h(no, { key: 0 })) : (u(), h(so, { key: 1 }))
2658
+ r(o).table.header.group.expand ? (u(), h(Rt, { key: 0 })) : (u(), h(jt, { key: 1 }))
2656
2659
  ], 2)
2657
2660
  ]),
2658
2661
  _: 1
@@ -2660,10 +2663,10 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2660
2663
  e.option.tools?.refresh === void 0 || e.option.tools?.refresh ? (u(), p("div", {
2661
2664
  key: 2,
2662
2665
  class: I(["refresh-btn", [e.option.size?.search]]),
2663
- onClick: f[7] || (f[7] = //@ts-ignore
2664
- (...g) => r(a).table.getList && r(a).table.getList(...g))
2666
+ onClick: c[7] || (c[7] = //@ts-ignore
2667
+ (...g) => r(o).table.getList && r(o).table.getList(...g))
2665
2668
  }, [
2666
- $(Ut)
2669
+ $(Ht)
2667
2670
  ], 2)) : w("", !0)
2668
2671
  ])
2669
2672
  ]),
@@ -2675,13 +2678,13 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2675
2678
  }, [
2676
2679
  Ye((u(), h(r(We), C({
2677
2680
  ref_key: "tableRef",
2678
- ref: c,
2679
- data: r(a).table.data,
2681
+ ref: f,
2682
+ data: r(o).table.data,
2680
2683
  border: e.option.table?.border === void 0 ? !0 : e.option.table?.border,
2681
- onSelectionChange: r(a).table.selection.change,
2682
- onSortChange: r(a).table.sort.change,
2683
- "expand-row-keys": r(a).table.expand.rowKeys,
2684
- onExpandChange: r(a).table.expand.change
2684
+ onSelectionChange: r(o).table.selection.change,
2685
+ onSortChange: r(o).table.sort.change,
2686
+ "expand-row-keys": r(o).table.expand.rowKeys,
2687
+ onExpandChange: r(o).table.expand.change
2685
2688
  }, e.option.table, E(e.option.table?.on || {})), {
2686
2689
  default: y(() => [
2687
2690
  (typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.show : e.option.table?.selectable) || r(i)(e.option.tools?.delete) || e.option.tools?.export?.show && e.option.tools?.export?.select ? (u(), h(r(re), C({
@@ -2703,9 +2706,9 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2703
2706
  "show-overflow-tooltip": !1,
2704
2707
  className: "cc1-form-index-column"
2705
2708
  }, typeof e.option.table?.index == "object" ? e.option.table?.index : {}, E(typeof e.option.table?.index == "object" ? e.option.table?.index?.on || {} : {})), null, 16)) : w("", !0),
2706
- $(eo, {
2707
- conf: r(a),
2708
- columnList: r(a).table.column.list,
2709
+ $(so, {
2710
+ conf: r(o),
2711
+ columnList: r(o).table.column.list,
2709
2712
  option: e.option
2710
2713
  }, W({ _: 2 }, [
2711
2714
  j(d.$slots, (g, B) => ({
@@ -2717,11 +2720,12 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2717
2720
  ]), 1032, ["conf", "columnList", "option"]),
2718
2721
  r(i)(e.option.table?.add) || r(i)(e.option.table?.update) || r(i)(e.option.table?.delete) || r(i)(e.option.table?.view) || d.$slots["table-op-left"] || d.$slots["table-op-right"] ? (u(), h(r(re), C({
2719
2722
  key: 2,
2720
- width: "auto",
2721
- "max-width": "200",
2722
2723
  align: "center",
2723
2724
  fixed: "right"
2724
- }, e.option.table?.operate, { "show-overflow-tooltip": !1 }), {
2725
+ }, e.option.table?.operate, {
2726
+ width: e.option.table?.operate?.width || 120,
2727
+ "show-overflow-tooltip": !1
2728
+ }), {
2725
2729
  header: y(() => [
2726
2730
  k(d.$slots, "table-header-op", {}, () => [
2727
2731
  V(D(r(b).tCurd("operation")), 1)
@@ -2733,11 +2737,11 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2733
2737
  }, {
2734
2738
  default: y(() => [
2735
2739
  k(d.$slots, "table-op-left", { row: g }),
2736
- r(a).update.type === r(l).Update && e.option.table?.inlineEdit && r(a).update.form[o.option.table?.rowKey] === g[o.option.table?.rowKey] ? (u(), p(F, { key: 0 }, [
2740
+ r(o).update.type === r(l).Update && e.option.table?.inlineEdit && r(o).update.form[a.option.table?.rowKey] === g[a.option.table?.rowKey] ? (u(), p(F, { key: 0 }, [
2737
2741
  $(r(T), {
2738
2742
  link: "",
2739
2743
  type: "info",
2740
- onClick: r(a).update.close
2744
+ onClick: r(o).update.close
2741
2745
  }, {
2742
2746
  default: y(() => [
2743
2747
  V(D(r(b).tCurd("cancel")), 1)
@@ -2747,8 +2751,8 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2747
2751
  $(r(T), {
2748
2752
  link: "",
2749
2753
  type: "primary",
2750
- onClick: r(a).update.submit,
2751
- loading: r(a).update.loading
2754
+ onClick: r(o).update.submit,
2755
+ loading: r(o).update.loading
2752
2756
  }, {
2753
2757
  default: y(() => [
2754
2758
  V(D(r(b).tCurd("confirm")), 1)
@@ -2761,7 +2765,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2761
2765
  key: 0,
2762
2766
  link: "",
2763
2767
  type: "primary",
2764
- onClick: (B) => r(a).update.open(r(l).Add, g)
2768
+ onClick: (B) => r(o).update.open(r(l).Add, g)
2765
2769
  }, {
2766
2770
  default: y(() => [
2767
2771
  V(D(r(b).tCurd("add")), 1)
@@ -2772,7 +2776,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2772
2776
  key: 1,
2773
2777
  link: "",
2774
2778
  type: "primary",
2775
- onClick: (B) => r(a).update.open(r(l).View, g)
2779
+ onClick: (B) => r(o).update.open(r(l).View, g)
2776
2780
  }, {
2777
2781
  default: y(() => [
2778
2782
  V(D(r(b).tCurd("view")), 1)
@@ -2783,7 +2787,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2783
2787
  key: 2,
2784
2788
  link: "",
2785
2789
  type: "warning",
2786
- onClick: (B) => r(a).update.open(r(l).Update, g)
2790
+ onClick: (B) => r(o).update.open(r(l).Update, g)
2787
2791
  }, {
2788
2792
  default: y(() => [
2789
2793
  V(D(r(b).tCurd("edit")), 1)
@@ -2794,7 +2798,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2794
2798
  key: 3,
2795
2799
  link: "",
2796
2800
  type: "danger",
2797
- onClick: (B) => r(a).remove.open([g])
2801
+ onClick: (B) => r(o).remove.open([g])
2798
2802
  }, {
2799
2803
  default: y(() => [
2800
2804
  V(D(r(b).tCurd("delete")), 1)
@@ -2808,39 +2812,39 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2808
2812
  }, 1032, ["size"])
2809
2813
  ]),
2810
2814
  _: 3
2811
- }, 16)) : w("", !0)
2815
+ }, 16, ["width"])) : w("", !0)
2812
2816
  ]),
2813
2817
  _: 3
2814
2818
  }, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
2815
- [m, r(a).table.loading]
2819
+ [m, r(o).table.loading]
2816
2820
  ])
2817
2821
  ], 2)
2818
2822
  ], 2),
2819
2823
  O("div", wo, [
2820
- (e.option.page?.show === void 0 || e.option.page?.show) && !r(a).page.showTools ? (u(), h(r(we), C({
2824
+ (e.option.page?.show === void 0 || e.option.page?.show) && !r(o).page.showTools ? (u(), h(r(we), C({
2821
2825
  key: 0,
2822
- "current-page": r(a).page.num,
2823
- "onUpdate:currentPage": f[8] || (f[8] = (g) => r(a).page.num = g),
2824
- "page-size": r(a).page.size,
2825
- "onUpdate:pageSize": f[9] || (f[9] = (g) => r(a).page.size = g),
2826
+ "current-page": r(o).page.num,
2827
+ "onUpdate:currentPage": c[8] || (c[8] = (g) => r(o).page.num = g),
2828
+ "page-size": r(o).page.size,
2829
+ "onUpdate:pageSize": c[9] || (c[9] = (g) => r(o).page.size = g),
2826
2830
  background: "",
2827
- "page-sizes": r(a).page.sizeList,
2828
- "pager-count": r(a).page.pagerCount,
2829
- layout: r(a).page.layout,
2830
- total: r(a).page.total,
2831
+ "page-sizes": r(o).page.sizeList,
2832
+ "pager-count": r(o).page.pagerCount,
2833
+ layout: r(o).page.layout,
2834
+ total: r(o).page.total,
2831
2835
  size: e.option.size?.table,
2832
- onSizeChange: r(a).table.getList,
2833
- onCurrentChange: r(a).table.getList
2836
+ onSizeChange: r(o).table.getList,
2837
+ onCurrentChange: r(o).table.getList
2834
2838
  }, e.option.page?.pagination || {}, E(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : w("", !0)
2835
2839
  ])
2836
2840
  ], 2),
2837
2841
  k(d.$slots, "box-right")
2838
2842
  ], 2),
2839
2843
  $(r(ye), C({
2840
- modelValue: r(a).update.show,
2841
- "onUpdate:modelValue": f[10] || (f[10] = (g) => r(a).update.show = g),
2842
- title: r(a).update.title,
2843
- "before-close": r(a).update.close
2844
+ modelValue: r(o).update.show,
2845
+ "onUpdate:modelValue": c[10] || (c[10] = (g) => r(o).update.show = g),
2846
+ title: r(o).update.title,
2847
+ "before-close": r(o).update.close
2844
2848
  }, e.option.dialog), {
2845
2849
  footer: y(() => [
2846
2850
  O("span", vo, [
@@ -2848,52 +2852,59 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2848
2852
  size: e.option.size?.form
2849
2853
  }, {
2850
2854
  default: y(() => [
2851
- $(r(T), {
2852
- onClick: r(a).update.close
2853
- }, {
2854
- default: y(() => [
2855
- V(D(r(b).tCurd("close")), 1)
2856
- ]),
2857
- _: 1
2858
- }, 8, ["onClick"]),
2859
- r(a).update.type !== r(l).View ? (u(), h(r(T), {
2860
- key: 0,
2861
- type: "primary",
2862
- onClick: r(a).update.submit,
2863
- loading: r(a).update.loading
2864
- }, {
2865
- default: y(() => [
2866
- V(D(r(b).tCurd("submit")), 1)
2867
- ]),
2868
- _: 1
2869
- }, 8, ["onClick", "loading"])) : w("", !0)
2855
+ k(d.$slots, "dialog-footer", {
2856
+ row: r(o).update
2857
+ }, () => [
2858
+ $(r(T), {
2859
+ onClick: r(o).update.close
2860
+ }, {
2861
+ default: y(() => [
2862
+ V(D(r(b).tCurd("close")), 1)
2863
+ ]),
2864
+ _: 1
2865
+ }, 8, ["onClick"]),
2866
+ r(o).update.type !== r(l).View ? (u(), h(r(T), {
2867
+ key: 0,
2868
+ type: "primary",
2869
+ onClick: r(o).update.submit,
2870
+ loading: r(o).update.loading
2871
+ }, {
2872
+ default: y(() => [
2873
+ V(D(r(b).tCurd("submit")), 1)
2874
+ ]),
2875
+ _: 1
2876
+ }, 8, ["onClick", "loading"])) : w("", !0)
2877
+ ])
2870
2878
  ]),
2871
- _: 1
2879
+ _: 3
2872
2880
  }, 8, ["size"])
2873
2881
  ])
2874
2882
  ]),
2875
2883
  default: y(() => [
2884
+ k(d.$slots, "dialog-start", {
2885
+ row: r(o).update
2886
+ }),
2876
2887
  $(r(q), {
2877
2888
  ref_key: "ruleFormRef",
2878
2889
  ref: s,
2879
- model: r(a).update.form,
2880
- rules: r(a).update.rules,
2890
+ model: r(o).update.form,
2891
+ rules: r(o).update.rules,
2881
2892
  size: e.option.size?.form,
2882
2893
  class: "update-dialog-form"
2883
2894
  }, {
2884
2895
  default: y(() => [
2885
- r(a).update.showContent ? (u(), h(Te, {
2896
+ r(o).update.showContent ? (u(), h(Te, {
2886
2897
  key: 0,
2887
- "form-grid": r(a).update.formGrid,
2888
- "max-span": r(a).update.formMaxSpan,
2889
- form: r(a).update.form,
2890
- type: r(a).update.type,
2898
+ "form-grid": r(o).update.formGrid,
2899
+ "max-span": r(o).update.formMaxSpan,
2900
+ form: r(o).update.form,
2901
+ type: r(o).update.type,
2891
2902
  stripe: e.option.form?.stripe,
2892
2903
  "label-width": e.option.form?.labelWidth,
2893
2904
  "form-option": e.option.form,
2894
- "get-bind": r(a).update.getBind,
2895
- "get-on": r(a).update.getOn,
2896
- "get-disabled": r(a).update.getDisabled
2905
+ "get-bind": r(o).update.getBind,
2906
+ "get-on": r(o).update.getOn,
2907
+ "get-disabled": r(o).update.getDisabled
2897
2908
  }, W({ _: 2 }, [
2898
2909
  j(d.$slots, (g, B) => ({
2899
2910
  name: B,
@@ -2904,14 +2915,17 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2904
2915
  ]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : w("", !0)
2905
2916
  ]),
2906
2917
  _: 3
2907
- }, 8, ["model", "rules", "size"])
2918
+ }, 8, ["model", "rules", "size"]),
2919
+ k(d.$slots, "dialog-end", {
2920
+ row: r(o).update
2921
+ })
2908
2922
  ]),
2909
2923
  _: 3
2910
2924
  }, 16, ["modelValue", "title", "before-close"]),
2911
2925
  $(r(ye), {
2912
- modelValue: r(a).remove.show,
2913
- "onUpdate:modelValue": f[11] || (f[11] = (g) => r(a).remove.show = g),
2914
- title: r(a).remove.title,
2926
+ modelValue: r(o).remove.show,
2927
+ "onUpdate:modelValue": c[11] || (c[11] = (g) => r(o).remove.show = g),
2928
+ title: r(o).remove.title,
2915
2929
  "close-on-click-modal": !1
2916
2930
  }, {
2917
2931
  footer: y(() => [
@@ -2921,7 +2935,7 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2921
2935
  }, {
2922
2936
  default: y(() => [
2923
2937
  $(r(T), {
2924
- onClick: r(a).remove.close
2938
+ onClick: r(o).remove.close
2925
2939
  }, {
2926
2940
  default: y(() => [
2927
2941
  V(D(r(b).tCurd("close")), 1)
@@ -2930,8 +2944,8 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2930
2944
  }, 8, ["onClick"]),
2931
2945
  $(r(T), {
2932
2946
  type: "danger",
2933
- onClick: r(a).remove.submit,
2934
- loading: r(a).remove.loading
2947
+ onClick: r(o).remove.submit,
2948
+ loading: r(o).remove.loading
2935
2949
  }, {
2936
2950
  default: y(() => [
2937
2951
  V(D(r(b).tCurd("confirmDelete")), 1)
@@ -2945,11 +2959,11 @@ const so = /* @__PURE__ */ Z(lo, [["render", ro]]), ke = /* @__PURE__ */ G({
2945
2959
  ]),
2946
2960
  default: y(() => [
2947
2961
  e.option.dialog?.delete?.content ? (u(), p("div", ko, [
2948
- $(Rt, {
2962
+ $(Mt, {
2949
2963
  content: e.option.dialog?.delete?.content,
2950
- value: r(a).remove.items
2964
+ value: r(o).remove.items
2951
2965
  }, null, 8, ["content", "value"])
2952
- ])) : (u(), p("div", Co, D(r(b).tCurd("confirmDeleteMessage", r(a).remove.items.length)), 1))
2966
+ ])) : (u(), p("div", Co, D(r(b).tCurd("confirmDeleteMessage", r(o).remove.items.length)), 1))
2953
2967
  ]),
2954
2968
  _: 1
2955
2969
  }, 8, ["modelValue", "title"]),
@@ -2970,8 +2984,8 @@ class Oo {
2970
2984
  * @param name - 下载后的文件名,默认 `'download.png'`
2971
2985
  */
2972
2986
  static async download(n, l = "download.png") {
2973
- const o = document.createElement("a");
2974
- o.style.display = "none", o.href = n, o.setAttribute("download", l), typeof o.download > "u" && o.setAttribute("target", "_blank"), document.body.appendChild(o), o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(n);
2987
+ const a = document.createElement("a");
2988
+ a.style.display = "none", a.href = n, a.setAttribute("download", l), typeof a.download > "u" && a.setAttribute("target", "_blank"), document.body.appendChild(a), a.click(), document.body.removeChild(a), window.URL.revokeObjectURL(n);
2975
2989
  }
2976
2990
  /**
2977
2991
  * 将json对象或者json数组导出为json文件保存
@@ -2979,31 +2993,31 @@ class Oo {
2979
2993
  * @param name
2980
2994
  */
2981
2995
  static exportJSONFile = (n, l) => {
2982
- const o = new Blob([JSON.stringify(n)], { type: "application/json" }), i = URL.createObjectURL(o), a = document.createElement("a");
2983
- a.href = i, a.download = `${l || "config"}.json`, a.click();
2996
+ const a = new Blob([JSON.stringify(n)], { type: "application/json" }), i = URL.createObjectURL(a), o = document.createElement("a");
2997
+ o.href = i, o.download = `${l || "config"}.json`, o.click();
2984
2998
  };
2985
2999
  /**
2986
3000
  * 导入文件内容,默认为json
2987
3001
  * @param param
2988
3002
  * @returns
2989
3003
  */
2990
- static importFile = async (n) => new Promise((l, o) => {
3004
+ static importFile = async (n) => new Promise((l, a) => {
2991
3005
  const i = document.createElement("input");
2992
3006
  i.type = "file";
2993
- const a = n?.accept || ".json";
2994
- i.accept = a, i.style.display = "none", i.onchange = (t) => {
3007
+ const o = n?.accept || ".json";
3008
+ i.accept = o, i.style.display = "none", i.onchange = (t) => {
2995
3009
  const s = t.target.files[0];
2996
3010
  if (!s) {
2997
- S.fail("未选择文件"), o("未选择文件");
3011
+ S.fail("未选择文件"), a("未选择文件");
2998
3012
  return;
2999
3013
  }
3000
- const c = new FileReader();
3001
- c.onload = async (d) => {
3002
- const f = a == ".json" ? JSON.parse(d.target.result) : d.target.result;
3003
- l(f);
3004
- }, c.onerror = () => {
3005
- S.fail("文件读取失败"), o("文件读取失败");
3006
- }, c.readAsText(s), document.body.removeChild(i);
3014
+ const f = new FileReader();
3015
+ f.onload = async (d) => {
3016
+ const c = o == ".json" ? JSON.parse(d.target.result) : d.target.result;
3017
+ l(c);
3018
+ }, f.onerror = () => {
3019
+ S.fail("文件读取失败"), a("文件读取失败");
3020
+ }, f.readAsText(s), document.body.removeChild(i);
3007
3021
  }, document.body.appendChild(i), i.click();
3008
3022
  });
3009
3023
  }