cc1-form 1.4.0 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cc1-form.js CHANGED
@@ -1,6 +1,6 @@
1
- import { ElMessage as it, ElLoading as st, ElFormItem as he, ElInput as fe, ElInputNumber as dt, ElSwitch as ge, ElSelect as ce, ElOption as ne, ElRadioGroup as je, ElRadioButton as ut, ElRadio as Pe, ElCheckboxGroup as ft, ElCheckboxButton as ct, ElCheckbox as pt, ElColorPicker as mt, ElSlider as bt, ElTreeSelect as gt, ElDatePicker as Ke, ElForm as oe, ElDialog as $e, ElButton as K, ElTableColumn as ue, ElDropdown as Ue, ElDropdownMenu as Ae, ElDropdownItem as de, ElPagination as Be, ElTable as ht } from "element-plus";
1
+ import { ElMessage as rt, ElLoading as it, ElFormItem as he, ElInput as fe, ElInputNumber as st, ElSwitch as ge, ElSelect as ce, ElOption as ne, ElRadioGroup as je, ElRadioButton as dt, ElRadio as Pe, ElCheckboxGroup as ut, ElCheckboxButton as ft, ElCheckbox as ct, ElColorPicker as pt, ElSlider as mt, ElTreeSelect as bt, ElDatePicker as Ke, ElForm as oe, ElDialog as $e, ElButton as P, ElTableColumn as ue, ElDropdown as Ue, ElDropdownMenu as Ae, ElDropdownItem as de, ElPagination as Be, ElTable as gt } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as Q, reactive as ie, onMounted as He, resolveComponent as pe, openBlock as m, createElementBlock as C, renderSlot as z, createVNode as M, withCtx as h, createTextVNode as O, createCommentVNode as V, Fragment as A, renderList as G, createBlock as y, normalizeClass as J, normalizeStyle as ye, ref as Y, watch as Ne, nextTick as Ce, unref as i, createElementVNode as D, mergeProps as S, toHandlers as $, createSlots as Z, toDisplayString as R, resolveDynamicComponent as ee, computed as ae, onUnmounted as Ie, normalizeProps as Me, guardReactiveProps as Oe, getCurrentInstance as Ge, onBeforeUnmount as yt, withModifiers as wt, resolveDirective as vt, withDirectives as kt } from "vue";
3
+ import { defineComponent as Q, reactive as ie, onMounted as He, resolveComponent as pe, openBlock as b, createElementBlock as C, renderSlot as z, createVNode as M, withCtx as h, createTextVNode as O, createCommentVNode as V, Fragment as A, renderList as G, createBlock as y, normalizeClass as J, normalizeStyle as ye, ref as Y, watch as Ne, nextTick as Ce, unref as i, createElementVNode as R, mergeProps as S, toHandlers as $, createSlots as Z, toDisplayString as F, resolveDynamicComponent as ee, computed as ae, onUnmounted as Ie, normalizeProps as Me, guardReactiveProps as Oe, getCurrentInstance as Ge, onBeforeUnmount as ht, withModifiers as yt, resolveDirective as wt, withDirectives as vt } from "vue";
4
4
  import { Scope as Fe } from "cc1-vue3";
5
5
  class E {
6
6
  /**
@@ -73,9 +73,9 @@ class E {
73
73
  * @param options 其他选项
74
74
  */
75
75
  static showMessage(o, s, t = {}) {
76
- const n = Date.now();
77
- if (!this.tipMessages[o] || n - this.tipMessages[o] > this.tipMessagesGap) {
78
- this.tipMessages[o] = n;
76
+ const l = Date.now();
77
+ if (!this.tipMessages[o] || l - this.tipMessages[o] > this.tipMessagesGap) {
78
+ this.tipMessages[o] = l;
79
79
  const e = Object.assign(
80
80
  {
81
81
  message: o,
@@ -83,7 +83,7 @@ class E {
83
83
  },
84
84
  t
85
85
  );
86
- it(e), setTimeout(() => {
86
+ rt(e), setTimeout(() => {
87
87
  delete this.tipMessages[o];
88
88
  }, this.tipMessagesGap);
89
89
  }
@@ -113,7 +113,7 @@ class E {
113
113
  */
114
114
  static loading = (o = !0, s = "Loading...") => {
115
115
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
116
- o ? this.loadingObj = st.service({
116
+ o ? this.loadingObj = it.service({
117
117
  lock: !0,
118
118
  text: s,
119
119
  background: "rgba(0, 0, 0, 0.3)"
@@ -127,11 +127,11 @@ class E {
127
127
  */
128
128
  static openUrl = (o, s = !0) => {
129
129
  if (s) {
130
- let t = screen.width / 2 - 500, n = screen.height / 2 - 800 / 2 - 30;
130
+ let t = screen.width / 2 - 500, l = screen.height / 2 - 800 / 2 - 30;
131
131
  window.open(
132
132
  o,
133
133
  "_blank",
134
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + n + ", left=" + t
134
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + l + ", left=" + t
135
135
  );
136
136
  } else
137
137
  window.open(o, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
@@ -142,10 +142,10 @@ class E {
142
142
  * @returns
143
143
  */
144
144
  static getImgPic = (o) => new Promise(async (s, t) => {
145
- let n = document.getElementById(o.id);
145
+ let l = document.getElementById(o.id);
146
146
  const e = await E.loadModule("html2canvas");
147
147
  try {
148
- e(n, {
148
+ e(l, {
149
149
  logging: !1,
150
150
  allowTaint: !0,
151
151
  scale: window.devicePixelRatio,
@@ -156,15 +156,15 @@ class E {
156
156
  useCORS: !0,
157
157
  backgroundColor: "#ffffff00"
158
158
  }).then(function(r) {
159
- let l = r.toDataURL("image/png");
160
- s(l);
159
+ let n = r.toDataURL("image/png");
160
+ s(n);
161
161
  });
162
162
  } catch (r) {
163
163
  t(r);
164
164
  }
165
165
  });
166
166
  }
167
- class T {
167
+ class B {
168
168
  /**
169
169
  * 全局配置对象
170
170
  */
@@ -539,7 +539,7 @@ class T {
539
539
  * @param config - 需要覆盖的配置项(深度 Partial)
540
540
  */
541
541
  static setConfig = (o) => {
542
- T.config = ObjectUtil.deepMerge(T.config, o);
542
+ B.config = ObjectUtil.deepMerge(B.config, o);
543
543
  };
544
544
  }
545
545
  class q {
@@ -565,9 +565,9 @@ class q {
565
565
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
566
566
  */
567
567
  static findOptions = (o, s) => {
568
- const t = o.column.find((e) => e.key === s), n = (e) => e.replace(/-([a-z])/g, (r, l) => l.toUpperCase());
568
+ const t = o.column.find((e) => e.key === s), l = (e) => e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
569
569
  if (t)
570
- return t.options[n(t.type)];
570
+ return t.options[l(t.type)];
571
571
  };
572
572
  /**
573
573
  * 更新组件数据
@@ -586,8 +586,8 @@ class q {
586
586
  )
587
587
  */
588
588
  static setOptionsData = (o, s, t) => {
589
- const n = q.findOptions(o, s);
590
- n && (n.data = t);
589
+ const l = q.findOptions(o, s);
590
+ l && (l.data = t);
591
591
  };
592
592
  static form = {
593
593
  openBefore: {
@@ -598,9 +598,9 @@ class q {
598
598
  * @param treeData 树形数据
599
599
  * @param option 组件配置
600
600
  */
601
- parentId: (o, s, t, n) => {
602
- const e = T.config.table.rowKey;
603
- o ? s.type === E.EDialog.Add ? (s.form.parentId = o[e], s.form.sort = o.children.length + 1) : s.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (s.form.parentId = "0", s.form.sort = t.length + 1), q.setOptionsData(n, "parentId", [{ [e]: "0", title: "根", children: t }]);
601
+ parentId: (o, s, t, l) => {
602
+ const e = B.config.table.rowKey;
603
+ o ? s.type === E.EDialog.Add ? (s.form.parentId = o[e], s.form.sort = o.children.length + 1) : s.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (s.form.parentId = "0", s.form.sort = t.length + 1), q.setOptionsData(l, "parentId", [{ [e]: "0", title: "根", children: t }]);
604
604
  }
605
605
  }
606
606
  };
@@ -617,12 +617,12 @@ class X {
617
617
  */
618
618
  static setId = (o, s, t) => {
619
619
  s[o] || (s[o] = []);
620
- const n = T.config.table.rowKey;
620
+ const l = B.config.table.rowKey;
621
621
  s[o].forEach((e) => {
622
622
  t.forEach((r) => {
623
- let l = r.default ?? "";
624
- r.type === "number" && (l = r.default ?? 0), r.type === "boolean" && (l = r.default ?? !1), r.type === "time" && (l = r.default ?? /* @__PURE__ */ new Date()), e[r.value] === void 0 && (e[r.value] = l);
625
- }), e[n] || (e[n] = X.getIdFun());
623
+ let n = r.default ?? "";
624
+ r.type === "number" && (n = r.default ?? 0), r.type === "boolean" && (n = r.default ?? !1), r.type === "time" && (n = r.default ?? /* @__PURE__ */ new Date()), e[r.value] === void 0 && (e[r.value] = n);
625
+ }), e[l] || (e[l] = X.getIdFun());
626
626
  });
627
627
  };
628
628
  /**
@@ -632,19 +632,19 @@ class X {
632
632
  * @param itemFields 元素字段-如:[{label:'',value:''}]
633
633
  * @param callback 回调函数
634
634
  */
635
- static add = (o, s, t, n) => {
635
+ static add = (o, s, t, l) => {
636
636
  const e = JSONUtil.cp(t);
637
637
  X.setId(o, s, t);
638
- const r = T.config.table.rowKey;
638
+ const r = B.config.table.rowKey;
639
639
  s[o].push(
640
640
  e.reduce(
641
- (l, u) => {
641
+ (n, u) => {
642
642
  let f = u.default ?? "";
643
- return u.type === "number" && (f = u.default ?? 0), u.type === "boolean" && (f = u.default ?? !1), u.type === "time" && (f = u.default ?? /* @__PURE__ */ new Date()), l[u.value] = f, l;
643
+ return u.type === "number" && (f = u.default ?? 0), u.type === "boolean" && (f = u.default ?? !1), u.type === "time" && (f = u.default ?? /* @__PURE__ */ new Date()), n[u.value] = f, n;
644
644
  },
645
645
  { [r]: X.getIdFun() }
646
646
  )
647
- ), n?.(s);
647
+ ), l?.(s);
648
648
  };
649
649
  /**
650
650
  * 删除数组元素
@@ -653,9 +653,9 @@ class X {
653
653
  * @param item 元素-如:{_id:''}
654
654
  * @param callback 回调函数
655
655
  */
656
- static remove = (o, s, t, n) => {
657
- const e = T.config.table.rowKey;
658
- s[o] = s[o].filter((r) => r[e] !== t[e]), n?.(s);
656
+ static remove = (o, s, t, l) => {
657
+ const e = B.config.table.rowKey;
658
+ s[o] = s[o].filter((r) => r[e] !== t[e]), l?.(s);
659
659
  };
660
660
  /**
661
661
  * 获取没有id的数据
@@ -664,20 +664,20 @@ class X {
664
664
  * @returns 没有id的数据
665
665
  */
666
666
  static getNoIdData = (o, s) => {
667
- const t = JSONUtil.cp(o), n = T.config.table.rowKey;
667
+ const t = JSONUtil.cp(o), l = B.config.table.rowKey;
668
668
  return t.forEach((e) => {
669
- e[n] && delete e[n], s && e[s] && X.getNoIdData(e[s], s);
669
+ e[l] && delete e[l], s && e[s] && X.getNoIdData(e[s], s);
670
670
  }), t;
671
671
  };
672
672
  }
673
- const Ct = {
673
+ const kt = {
674
674
  key: 0,
675
675
  class: "column curd-form-com-list",
676
676
  style: { width: "100%", gap: "10px" }
677
- }, Vt = { key: 0 }, St = {
677
+ }, Ct = { key: 0 }, Vt = {
678
678
  class: "row items-center",
679
679
  style: { gap: "10px", width: "100%" }
680
- }, Et = { key: 1 }, We = /* @__PURE__ */ Q({
680
+ }, St = { key: 1 }, We = /* @__PURE__ */ Q({
681
681
  __name: "list",
682
682
  props: {
683
683
  row: {
@@ -718,27 +718,27 @@ const Ct = {
718
718
  setup(a, { emit: o }) {
719
719
  const s = a, t = ie({
720
720
  show: !1,
721
- add: (e, r, l) => {
722
- X.add(e, r, l, () => {
723
- n("change");
721
+ add: (e, r, n) => {
722
+ X.add(e, r, n, () => {
723
+ l("change");
724
724
  });
725
725
  },
726
- remove: (e, r, l) => {
727
- X.remove(e, r, l, () => {
728
- n("change");
726
+ remove: (e, r, n) => {
727
+ X.remove(e, r, n, () => {
728
+ l("change");
729
729
  });
730
730
  }
731
731
  });
732
732
  He(() => {
733
733
  X.setId(s.field, s.row, s.itemFields), t.show = !0;
734
734
  });
735
- const n = o;
735
+ const l = o;
736
736
  return (e, r) => {
737
- const l = pe("el-button"), u = pe("el-input");
738
- return t.show ? (m(), C("div", Ct, [
737
+ const n = pe("el-button"), u = pe("el-input");
738
+ return t.show ? (b(), C("div", kt, [
739
739
  z(e.$slots, "list-start", { row: a.row }),
740
- a.addBottom ? V("", !0) : (m(), C("div", Vt, [
741
- M(l, {
740
+ a.addBottom ? V("", !0) : (b(), C("div", Ct, [
741
+ M(n, {
742
742
  link: "",
743
743
  type: "primary",
744
744
  onClick: r[0] || (r[0] = (f) => t.add(a.field, a.row, a.itemFields))
@@ -749,24 +749,24 @@ const Ct = {
749
749
  _: 1
750
750
  })
751
751
  ])),
752
- (m(!0), C(A, null, G(a.row[a.field], (f) => (m(), C("div", St, [
752
+ (b(!0), C(A, null, G(a.row[a.field], (f) => (b(), C("div", Vt, [
753
753
  z(e.$slots, "item-start", {
754
754
  item: f,
755
755
  row: a.row
756
756
  }),
757
- (m(!0), C(A, null, G(a.itemFields, (d) => (m(), y(u, {
757
+ (b(!0), C(A, null, G(a.itemFields, (d) => (b(), y(u, {
758
758
  modelValue: f[d.value],
759
- "onUpdate:modelValue": (b) => f[d.value] = b,
759
+ "onUpdate:modelValue": (m) => f[d.value] = m,
760
760
  style: ye({ width: a.inputWidth }),
761
761
  class: J(a.inputClass),
762
762
  placeholder: d[a.label] || d[a.value],
763
- onChange: r[1] || (r[1] = (b) => n("change"))
763
+ onChange: r[1] || (r[1] = (m) => l("change"))
764
764
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
765
765
  z(e.$slots, "item-end", {
766
766
  item: f,
767
767
  row: a.row
768
768
  }),
769
- M(l, {
769
+ M(n, {
770
770
  link: "",
771
771
  type: "danger",
772
772
  onClick: (d) => t.remove(a.field, a.row, f)
@@ -777,8 +777,8 @@ const Ct = {
777
777
  _: 2
778
778
  }, 1032, ["onClick"])
779
779
  ]))), 256)),
780
- a.addBottom ? (m(), C("div", Et, [
781
- M(l, {
780
+ a.addBottom ? (b(), C("div", St, [
781
+ M(n, {
782
782
  link: "",
783
783
  type: "primary",
784
784
  onClick: r[2] || (r[2] = (f) => t.add(a.field, a.row, a.itemFields))
@@ -793,10 +793,10 @@ const Ct = {
793
793
  ])) : V("", !0);
794
794
  };
795
795
  }
796
- }), zt = {
796
+ }), Et = {
797
797
  class: "row form-item-content",
798
798
  style: { width: "100%" }
799
- }, $t = { class: "col column form-item-content-item" }, Mt = { class: "col" }, Ot = ["innerHTML"], Ft = /* @__PURE__ */ Q({
799
+ }, zt = { class: "col column form-item-content-item" }, $t = { class: "col" }, Mt = ["innerHTML"], Ot = /* @__PURE__ */ Q({
800
800
  __name: "field",
801
801
  props: {
802
802
  item: {},
@@ -811,16 +811,16 @@ const Ct = {
811
811
  const o = a, s = Y(), t = () => {
812
812
  const e = s.value?.validateState;
813
813
  return e && typeof e == "object" && "value" in e ? e.value : e;
814
- }, n = () => {
814
+ }, l = () => {
815
815
  t() === "error" && s.value?.clearValidate?.();
816
816
  };
817
817
  return Ne(
818
818
  () => o.form?.[o.item.key],
819
819
  () => {
820
- n(), Ce(() => n());
820
+ l(), Ce(() => l());
821
821
  },
822
822
  { deep: !0, flush: "post" }
823
- ), (e, r) => (m(), y(i(he), {
823
+ ), (e, r) => (b(), y(i(he), {
824
824
  ref_key: "formItemRef",
825
825
  ref: s,
826
826
  label: e.item.text?.form?.label ?? e.item.label,
@@ -828,143 +828,143 @@ const Ct = {
828
828
  "label-width": e.item.text?.form?.label == "" ? 0 : e.item.form?.labelWidth || e.labelWidth
829
829
  }, {
830
830
  default: h(() => [
831
- D("div", zt, [
831
+ R("div", Et, [
832
832
  z(e.$slots, "form-" + e.item.key + "-start", {
833
833
  row: e.form,
834
834
  item: e.item
835
835
  }),
836
- D("div", $t, [
837
- D("div", Mt, [
836
+ R("div", zt, [
837
+ R("div", $t, [
838
838
  z(e.$slots, "form-" + e.item.key, {
839
839
  row: e.form,
840
840
  item: e.item
841
841
  }, () => [
842
- e.item.type === "input" ? (m(), y(i(fe), S({
842
+ e.item.type === "input" ? (b(), y(i(fe), S({
843
843
  key: 0,
844
844
  modelValue: e.form[e.item.key],
845
- "onUpdate:modelValue": r[0] || (r[0] = (l) => e.form[e.item.key] = l)
845
+ "onUpdate:modelValue": r[0] || (r[0] = (n) => e.form[e.item.key] = n)
846
846
  }, e.getBind(e.item), $(e.getOn(e.item)), {
847
847
  disabled: e.getDisabled(e.item)
848
848
  }), Z({ _: 2 }, [
849
849
  e.getBind(e.item).prepend ? {
850
850
  name: "prepend",
851
851
  fn: h(() => [
852
- O(R(typeof e.getBind(e.item).prepend == "function" ? e.getBind(e.item).prepend(e.form) : e.getBind(e.item).prepend), 1)
852
+ O(F(typeof e.getBind(e.item).prepend == "function" ? e.getBind(e.item).prepend(e.form) : e.getBind(e.item).prepend), 1)
853
853
  ]),
854
854
  key: "0"
855
855
  } : void 0
856
- ]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (m(), y(i(dt), S({
856
+ ]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (b(), y(i(st), S({
857
857
  key: 1,
858
858
  modelValue: e.form[e.item.key],
859
- "onUpdate:modelValue": r[1] || (r[1] = (l) => e.form[e.item.key] = l)
859
+ "onUpdate:modelValue": r[1] || (r[1] = (n) => e.form[e.item.key] = n)
860
860
  }, e.getBind(e.item), $(e.getOn(e.item)), {
861
861
  disabled: e.getDisabled(e.item)
862
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (m(), y(i(fe), S({
862
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (b(), y(i(fe), S({
863
863
  key: 2,
864
864
  type: "textarea",
865
865
  modelValue: e.form[e.item.key],
866
- "onUpdate:modelValue": r[2] || (r[2] = (l) => e.form[e.item.key] = l)
866
+ "onUpdate:modelValue": r[2] || (r[2] = (n) => e.form[e.item.key] = n)
867
867
  }, e.getBind(e.item), $(e.getOn(e.item)), {
868
868
  disabled: e.getDisabled(e.item)
869
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (m(), y(i(ge), S({
869
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (b(), y(i(ge), S({
870
870
  key: 3,
871
871
  modelValue: e.form[e.item.key],
872
- "onUpdate:modelValue": r[3] || (r[3] = (l) => e.form[e.item.key] = l)
872
+ "onUpdate:modelValue": r[3] || (r[3] = (n) => e.form[e.item.key] = n)
873
873
  }, e.getBind(e.item), $(e.getOn(e.item)), {
874
874
  disabled: e.getDisabled(e.item)
875
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (m(), y(i(ce), S({
875
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (b(), y(i(ce), S({
876
876
  key: 4,
877
877
  modelValue: e.form[e.item.key],
878
- "onUpdate:modelValue": r[4] || (r[4] = (l) => e.form[e.item.key] = l)
878
+ "onUpdate:modelValue": r[4] || (r[4] = (n) => e.form[e.item.key] = n)
879
879
  }, e.getBind(e.item), $(e.getOn(e.item)), {
880
880
  disabled: e.getDisabled(e.item),
881
881
  style: { width: "100%" }
882
882
  }), {
883
883
  default: h(() => [
884
- (m(!0), C(A, null, G(e.getBind(e.item).data || [], (l) => (m(), y(i(ne), S({
885
- key: l.value,
884
+ (b(!0), C(A, null, G(e.getBind(e.item).data || [], (n) => (b(), y(i(ne), S({
885
+ key: n.value,
886
886
  ref_for: !0
887
- }, l, $(l.on || {})), null, 16))), 128))
887
+ }, n, $(n.on || {})), null, 16))), 128))
888
888
  ]),
889
889
  _: 1
890
- }, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (m(), y(i(je), S({
890
+ }, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (b(), y(i(je), S({
891
891
  key: 5,
892
892
  modelValue: e.form[e.item.key],
893
- "onUpdate:modelValue": r[5] || (r[5] = (l) => e.form[e.item.key] = l)
893
+ "onUpdate:modelValue": r[5] || (r[5] = (n) => e.form[e.item.key] = n)
894
894
  }, e.getBind(e.item), $(e.getOn(e.item)), {
895
895
  disabled: e.getDisabled(e.item),
896
896
  style: { width: "100%" }
897
897
  }), {
898
898
  default: h(() => [
899
- e.getBind(e.item).type === "group" ? (m(!0), C(A, { key: 0 }, G(e.getBind(e.item).data || [], (l) => (m(), y(i(ut), S({
900
- key: l.value,
899
+ e.getBind(e.item).type === "group" ? (b(!0), C(A, { key: 0 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(dt), S({
900
+ key: n.value,
901
901
  ref_for: !0
902
- }, l, $(l.on || {})), null, 16))), 128)) : (m(!0), C(A, { key: 1 }, G(e.getBind(e.item).data || [], (l) => (m(), y(i(Pe), S({
903
- key: l.value,
902
+ }, n, $(n.on || {})), null, 16))), 128)) : (b(!0), C(A, { key: 1 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(Pe), S({
903
+ key: n.value,
904
904
  ref_for: !0
905
- }, l, $(l.on || {})), null, 16))), 128))
905
+ }, n, $(n.on || {})), null, 16))), 128))
906
906
  ]),
907
907
  _: 1
908
- }, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (m(), y(i(ft), S({
908
+ }, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (b(), y(i(ut), S({
909
909
  key: 6,
910
910
  modelValue: e.form[e.item.key],
911
- "onUpdate:modelValue": r[6] || (r[6] = (l) => e.form[e.item.key] = l)
911
+ "onUpdate:modelValue": r[6] || (r[6] = (n) => e.form[e.item.key] = n)
912
912
  }, e.getBind(e.item), $(e.getOn(e.item)), {
913
913
  disabled: e.getDisabled(e.item),
914
914
  style: { width: "100%" }
915
915
  }), {
916
916
  default: h(() => [
917
- e.getBind(e.item).type === "group" ? (m(!0), C(A, { key: 0 }, G(e.getBind(e.item).data || [], (l) => (m(), y(i(ct), S({
918
- key: l.value,
917
+ e.getBind(e.item).type === "group" ? (b(!0), C(A, { key: 0 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(ft), S({
918
+ key: n.value,
919
919
  ref_for: !0
920
- }, l, $(l.on || {})), null, 16))), 128)) : (m(!0), C(A, { key: 1 }, G(e.getBind(e.item).data || [], (l) => (m(), y(i(pt), S({
921
- key: l.value,
920
+ }, n, $(n.on || {})), null, 16))), 128)) : (b(!0), C(A, { key: 1 }, G(e.getBind(e.item).data || [], (n) => (b(), y(i(ct), S({
921
+ key: n.value,
922
922
  ref_for: !0
923
- }, l, $(l.on || {})), null, 16))), 128))
923
+ }, n, $(n.on || {})), null, 16))), 128))
924
924
  ]),
925
925
  _: 1
926
- }, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (m(), y(i(mt), S({
926
+ }, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (b(), y(i(pt), S({
927
927
  key: 7,
928
928
  modelValue: e.form[e.item.key],
929
- "onUpdate:modelValue": r[7] || (r[7] = (l) => e.form[e.item.key] = l)
929
+ "onUpdate:modelValue": r[7] || (r[7] = (n) => e.form[e.item.key] = n)
930
930
  }, e.getBind(e.item), $(e.getOn(e.item)), {
931
931
  disabled: e.getDisabled(e.item)
932
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (m(), y(i(bt), S({
932
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (b(), y(i(mt), S({
933
933
  key: 8,
934
934
  modelValue: e.form[e.item.key],
935
- "onUpdate:modelValue": r[8] || (r[8] = (l) => e.form[e.item.key] = l)
935
+ "onUpdate:modelValue": r[8] || (r[8] = (n) => e.form[e.item.key] = n)
936
936
  }, e.getBind(e.item), $(e.getOn(e.item)), {
937
937
  disabled: e.getDisabled(e.item)
938
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (m(), y(We, S({
938
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (b(), y(We, S({
939
939
  key: 9,
940
940
  row: e.form,
941
941
  field: e.item.key
942
942
  }, e.getBind(e.item), $(e.getOn(e.item)), {
943
943
  disabled: e.getDisabled(e.item),
944
944
  style: { width: "100%" }
945
- }), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (m(), y(i(gt), S({
945
+ }), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (b(), y(i(bt), S({
946
946
  key: 10,
947
947
  modelValue: e.form[e.item.key],
948
- "onUpdate:modelValue": r[9] || (r[9] = (l) => e.form[e.item.key] = l)
948
+ "onUpdate:modelValue": r[9] || (r[9] = (n) => e.form[e.item.key] = n)
949
949
  }, e.getBind(e.item), $(e.getOn(e.item)), {
950
950
  disabled: e.getDisabled(e.item),
951
951
  style: { width: "100%" }
952
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (m(), y(i(Ke), S({
952
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (b(), y(i(Ke), S({
953
953
  key: 11,
954
954
  modelValue: e.form[e.item.key],
955
- "onUpdate:modelValue": r[10] || (r[10] = (l) => e.form[e.item.key] = l)
955
+ "onUpdate:modelValue": r[10] || (r[10] = (n) => e.form[e.item.key] = n)
956
956
  }, e.getBind(e.item), $(e.getOn(e.item)), {
957
957
  disabled: e.getDisabled(e.item)
958
- }), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (m(), y(ee(e.item.type), S({
958
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (b(), y(ee(e.item.type), S({
959
959
  key: 12,
960
960
  modelValue: e.form[e.item.key],
961
- "onUpdate:modelValue": r[11] || (r[11] = (l) => e.form[e.item.key] = l)
961
+ "onUpdate:modelValue": r[11] || (r[11] = (n) => e.form[e.item.key] = n)
962
962
  }, e.getBind(e.item), $(e.getOn(e.item)), {
963
963
  disabled: e.getDisabled(e.item)
964
- }), null, 16, ["modelValue", "disabled"])) : e.item.type && (i(q).customComponent[e.item.type] || i(q).customComponent[e.item.type]?.form) ? (m(), y(ee(i(q).customComponent[e.item.type]?.form || i(q).customComponent[e.item.type]), S({
964
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type && (i(q).customComponent[e.item.type] || i(q).customComponent[e.item.type]?.form) ? (b(), y(ee(i(q).customComponent[e.item.type]?.form || i(q).customComponent[e.item.type]), S({
965
965
  key: 13,
966
966
  modelValue: e.form[e.item.key],
967
- "onUpdate:modelValue": r[12] || (r[12] = (l) => e.form[e.item.key] = l)
967
+ "onUpdate:modelValue": r[12] || (r[12] = (n) => e.form[e.item.key] = n)
968
968
  }, e.getBind(e.item), $(e.getOn(e.item)), {
969
969
  disabled: e.getDisabled(e.item)
970
970
  }), null, 16, ["modelValue", "disabled"])) : V("", !0)
@@ -978,11 +978,11 @@ const Ct = {
978
978
  row: e.form,
979
979
  item: e.item
980
980
  }, () => [
981
- e.item.form?.tipText ? (m(), C("div", {
981
+ e.item.form?.tipText ? (b(), C("div", {
982
982
  key: 0,
983
983
  class: "form-tip-text",
984
984
  innerHTML: typeof e.item.form?.tipText == "function" ? e.item.form?.tipText(e.form, e.type) : e.item.form?.tipText
985
- }, null, 8, Ot)) : V("", !0)
985
+ }, null, 8, Mt)) : V("", !0)
986
986
  ])
987
987
  ]),
988
988
  z(e.$slots, "form-" + e.item.key + "-end", {
@@ -995,7 +995,7 @@ const Ct = {
995
995
  }, 8, ["label", "prop", "label-width"]));
996
996
  }
997
997
  });
998
- const Rt = {
998
+ const Ft = {
999
999
  search: "搜索",
1000
1000
  add: "新增",
1001
1001
  edit: "编辑",
@@ -1044,7 +1044,7 @@ class k {
1044
1044
  return o(...s);
1045
1045
  o = String(o);
1046
1046
  let t = 0;
1047
- return o.replace(/{([^}]+)}/g, (n, e) => t < s.length ? String(s[t++]) : `{${e}}`);
1047
+ return o.replace(/{([^}]+)}/g, (l, e) => t < s.length ? String(s[t++]) : `{${e}}`);
1048
1048
  }
1049
1049
  static setI18n = (o) => {
1050
1050
  k.curd = ObjectUtil.deepMerge(k.curd, o);
@@ -1054,7 +1054,7 @@ class k {
1054
1054
  return this.t(this.curd[o], ...s);
1055
1055
  }
1056
1056
  /** curd表单 */
1057
- static curd = Rt;
1057
+ static curd = Ft;
1058
1058
  }
1059
1059
  class x {
1060
1060
  /**
@@ -1075,15 +1075,15 @@ class x {
1075
1075
  * @returns
1076
1076
  */
1077
1077
  static setValue = (o, s, t = !1) => {
1078
- t && x.delAllKey(o), Object.keys(s).forEach((n) => {
1079
- o[n] !== s[n] && (o[n] = s[n]);
1078
+ t && x.delAllKey(o), Object.keys(s).forEach((l) => {
1079
+ o[l] !== s[l] && (o[l] = s[l]);
1080
1080
  });
1081
1081
  };
1082
1082
  }
1083
1083
  const we = (a) => {
1084
1084
  const o = ie({}), s = () => typeof a == "function" ? a() : a, t = () => {
1085
- const n = s();
1086
- return n ?? o;
1085
+ const l = s();
1086
+ return l ?? o;
1087
1087
  };
1088
1088
  return {
1089
1089
  internal: o,
@@ -1091,11 +1091,11 @@ const we = (a) => {
1091
1091
  get() {
1092
1092
  return t();
1093
1093
  },
1094
- set(n) {
1095
- x.setValue(t(), n, !0);
1094
+ set(l) {
1095
+ x.setValue(t(), l, !0);
1096
1096
  },
1097
- merge(n) {
1098
- x.setValue(t(), n, !1);
1097
+ merge(l) {
1098
+ x.setValue(t(), l, !1);
1099
1099
  },
1100
1100
  clear() {
1101
1101
  x.delAllKey(t());
@@ -1108,18 +1108,18 @@ const we = (a) => {
1108
1108
  error: o.error || ""
1109
1109
  });
1110
1110
  });
1111
- }, Dt = (a) => a ? typeof a == "string" ? a : a instanceof Error ? a.message : a.message || String(a) : "", ve = (a) => !a || typeof a != "object" ? [] : Object.keys(a).flatMap((o) => (Array.isArray(a[o]) ? a[o] : [a[o]]).map((t) => ({
1111
+ }, Rt = (a) => a ? typeof a == "string" ? a : a instanceof Error ? a.message : a.message || String(a) : "", ve = (a) => !a || typeof a != "object" ? [] : Object.keys(a).flatMap((o) => (Array.isArray(a[o]) ? a[o] : [a[o]]).map((t) => ({
1112
1112
  field: t?.field || o,
1113
- error: Dt(t)
1114
- }))), be = E.EDialog, le = (a) => typeof a.type == "object" ? "component" : a.type || "input", Ut = (a, o, s) => {
1115
- const t = we(() => o.form), n = (r) => De(r.update.formGrid || [], r.update.form, r.update.type, r.update.formMaxSpan).map((u) => u.item.key).filter(Boolean), e = async (r) => {
1116
- const l = s.ruleFormRef.value;
1117
- if (!l) return !0;
1113
+ error: Rt(t)
1114
+ }))), be = E.EDialog, le = (a) => typeof a.type == "object" ? "component" : a.type || "input", Dt = (a, o, s) => {
1115
+ const t = we(() => o.form), l = (r) => De(r.update.formGrid || [], r.update.form, r.update.type, r.update.formMaxSpan).map((u) => u.item.key).filter(Boolean), e = async (r) => {
1116
+ const n = s.ruleFormRef.value;
1117
+ if (!n) return !0;
1118
1118
  await Ce();
1119
- const u = n(r), f = Object.keys(r.update.rules || {}).filter((b) => !u.includes(b));
1120
- if (f.length && l.clearValidate(f), !u.length) return !0;
1121
- if (!await l.validateField(u, async (b, c) => {
1122
- b || me(ve(c));
1119
+ const u = l(r), f = Object.keys(r.update.rules || {}).filter((m) => !u.includes(m));
1120
+ if (f.length && n.clearValidate(f), !u.length) return !0;
1121
+ if (!await n.validateField(u, async (m, c) => {
1122
+ m || me(ve(c));
1123
1123
  })) throw !1;
1124
1124
  return !0;
1125
1125
  };
@@ -1141,26 +1141,26 @@ const we = (a) => {
1141
1141
  formColumn: [],
1142
1142
  formGrid: [],
1143
1143
  formMaxSpan: 12,
1144
- getDisabled: (r, l = !1) => {
1144
+ getDisabled: (r, n = !1) => {
1145
1145
  const u = a();
1146
- return o.option.table?.editMode && l ? r.disabled?.table === void 0 ? !1 : E.isFun(r.disabled?.table, u.update.form) : Qe(r, u.update.type, u.update.form);
1146
+ return o.option.table?.editMode && n ? r.disabled?.table === void 0 ? !1 : E.isFun(r.disabled?.table, u.update.form) : Qe(r, u.update.type, u.update.form);
1147
1147
  },
1148
1148
  getBind: (r) => {
1149
- const l = a();
1150
- return Xe(r, l.update.type);
1149
+ const n = a();
1150
+ return Xe(r, n.update.type);
1151
1151
  },
1152
- getOn: (r, l) => {
1152
+ getOn: (r, n) => {
1153
1153
  const u = a();
1154
- return Ye(r, u.update.type, [l || u.update.form, r]);
1154
+ return Ye(r, u.update.type, [n || u.update.form, r]);
1155
1155
  },
1156
1156
  getOptions: (r) => {
1157
- const l = a();
1157
+ const n = a();
1158
1158
  try {
1159
- const f = et(l.update.formGrid?.length ? l.update.formGrid : l.update.formColumn).find((d) => d.item.key === r)?.item;
1159
+ const f = Lt(n.update.formGrid?.length ? n.update.formGrid : n.update.formColumn).find((d) => d.item.key === r)?.item;
1160
1160
  return f ? {
1161
1161
  options: f.options,
1162
1162
  //@ts-ignore
1163
- bind: l.update.getBind(f)
1163
+ bind: n.update.getBind(f)
1164
1164
  } : { options: {}, bind: {} };
1165
1165
  } catch {
1166
1166
  return { options: {}, bind: {} };
@@ -1169,27 +1169,27 @@ const we = (a) => {
1169
1169
  edit: {
1170
1170
  data: {},
1171
1171
  getApiData: (r) => {
1172
- const l = a();
1172
+ const n = a();
1173
1173
  if (o.option.form?.editAll) return r;
1174
1174
  const u = {
1175
- [o.option.table?.rowKey]: l.update.edit.data[o.option.table?.rowKey]
1175
+ [o.option.table?.rowKey]: n.update.edit.data[o.option.table?.rowKey]
1176
1176
  };
1177
- return Object.keys(l.update.edit.data).forEach((f) => {
1178
- r[f] !== l.update.edit.data[f] && (u[f] = r[f]);
1177
+ return Object.keys(n.update.edit.data).forEach((f) => {
1178
+ r[f] !== n.update.edit.data[f] && (u[f] = r[f]);
1179
1179
  }), u;
1180
1180
  }
1181
1181
  },
1182
1182
  view: {},
1183
1183
  openLoading: !1,
1184
- open: async (r, l) => {
1184
+ open: async (r, n) => {
1185
1185
  const u = a();
1186
1186
  if (!(u.update.showContent || u.update.openLoading)) {
1187
1187
  E.loading(!0), u.update.openLoading = !0;
1188
1188
  try {
1189
1189
  u.update.type = r;
1190
1190
  const f = r === be.Add;
1191
- u.update.edit.data = f ? void 0 : JSONUtil.cp(l), u.update.title = k.tCurd(f ? "add" : r === be.View ? "view" : "edit");
1192
- const d = f ? ObjectUtil.deepMerge(JSONUtil.cp(u.update.formDefault), l ? JSONUtil.cp(l) : {}) : JSONUtil.cp(l);
1191
+ u.update.edit.data = f ? void 0 : JSONUtil.cp(n), u.update.title = k.tCurd(f ? "add" : r === be.View ? "view" : "edit");
1192
+ const d = f ? ObjectUtil.deepMerge(JSONUtil.cp(u.update.formDefault), n ? JSONUtil.cp(n) : {}) : JSONUtil.cp(n);
1193
1193
  x.setValue(u.update.form, d, !0), await u.initApiData("update"), await o.option.form?.openBefore?.(u.update.form, u.update), (!o.option.table?.inlineEdit || f) && (u.update.show = !0, u.update.showContent = !0), o.option.form?.openAfter?.(u.update.form, u.update);
1194
1194
  } catch (f) {
1195
1195
  console.error(f);
@@ -1198,16 +1198,20 @@ const we = (a) => {
1198
1198
  }
1199
1199
  }
1200
1200
  },
1201
+ /** 临时错误信息,直接赋值会取最后一个完成校验的错误信息,使用setErrorText方法只会提示第一个设置的错误信息 */
1202
+ errorText: "",
1203
+ /** 设置临时错误信息,只会提示第一个设置的错误信息 */
1204
+ setErrorText: (r) => {
1205
+ const n = a();
1206
+ n.update.errorText || (n.update.errorText = r);
1207
+ },
1201
1208
  validate: async (r = !0) => {
1202
- const l = a();
1209
+ const n = a();
1203
1210
  try {
1204
- const u = o.option.table?.editMode ? l.tableEditValidate.validate() : e(l);
1205
- return await Promise.all([
1206
- u,
1207
- l.formRef.validate()
1208
- ]), !0;
1211
+ const u = o.option.table?.editMode ? n.tableEditValidate.validate() : e(n);
1212
+ return await Promise.all([u, n.formRef.validate()]), !0;
1209
1213
  } catch {
1210
- return r && E.fail(k.tCurd("checkFormData")), !1;
1214
+ return r && E.fail(n.update.errorText || k.tCurd("checkFormData")), n.update.errorText = "", !1;
1211
1215
  }
1212
1216
  },
1213
1217
  submit: async () => {
@@ -1223,18 +1227,18 @@ const we = (a) => {
1223
1227
  }
1224
1228
  let f = ObjectUtil.deepMerge(r.update.form, {});
1225
1229
  delete f.children;
1226
- const d = new Set(o.option.column.filter((b) => b.type === "datetime").map((b) => b.key));
1227
- Object.keys(f).forEach((b) => {
1228
- if (d.has(b) && f[b] != null) {
1229
- const c = new Date(f[b]).getTime();
1230
- isNaN(c) || (f[b] = c);
1230
+ const d = new Set(o.option.column.filter((m) => m.type === "datetime").map((m) => m.key));
1231
+ Object.keys(f).forEach((m) => {
1232
+ if (d.has(m) && f[m] != null) {
1233
+ const c = new Date(f[m]).getTime();
1234
+ isNaN(c) || (f[m] = c);
1231
1235
  }
1232
1236
  });
1233
1237
  try {
1234
1238
  if (!u) return;
1235
1239
  await u({ ...f }), r.update.close(), await r.table.getList(), o.option.form?.submitAfter?.(f, r.update);
1236
- } catch (b) {
1237
- console.error(b);
1240
+ } catch (m) {
1241
+ console.error(m);
1238
1242
  } finally {
1239
1243
  r.update.loading = !1;
1240
1244
  }
@@ -1249,7 +1253,7 @@ const we = (a) => {
1249
1253
  };
1250
1254
  }, W = 12, ke = (a, o) => {
1251
1255
  a.isForm = o, Array.isArray(a.children) && a.children.forEach((s) => ke(s, o));
1252
- }, At = (a) => a.isForm === !1 ? !1 : typeof a.show?.form == "boolean" ? a.show.form : !0, qe = (a) => a > W ? Math.floor(a / 2) : a, Bt = (a, o, s) => (a.form = a.form || { span: o }, s === "column" ? a.form.span = a.form.span ?? 12 : a.form.span = a.form.span ?? o, a.form.span = qe(a.form.span), a.form.span), Je = (a) => {
1256
+ }, Ut = (a) => a.isForm === !1 ? !1 : typeof a.show?.form == "boolean" ? a.show.form : !0, qe = (a) => a > W ? Math.floor(a / 2) : a, At = (a, o, s) => (a.form = a.form || { span: o }, s === "column" ? a.form.span = a.form.span ?? 12 : a.form.span = a.form.span ?? o, a.form.span = qe(a.form.span), a.form.span), Je = (a) => {
1253
1257
  const o = a.form;
1254
1258
  return o?.row != null && o.row > 0 ? qe(o.row) : W;
1255
1259
  }, re = (a) => Math.floor((a.gridRow - 1) / W), Qe = (a, o, s) => {
@@ -1262,22 +1266,22 @@ const we = (a) => {
1262
1266
  return a.options?.[o === E.EDialog.Add ? "formAdd" : "formUpdate"]?.[s] || a.options?.[s] || {};
1263
1267
  }, Ye = (a, o, s = []) => {
1264
1268
  const t = le(a), e = a.options?.[o === E.EDialog.Add ? "formAdd" : "formUpdate"]?.[t]?.on || a.options?.[t]?.on || {}, r = {};
1265
- return Object.keys(e).forEach((l) => {
1266
- const u = e[l];
1267
- typeof u == "function" ? r[l] = function(...f) {
1269
+ return Object.keys(e).forEach((n) => {
1270
+ const u = e[n];
1271
+ typeof u == "function" ? r[n] = function(...f) {
1268
1272
  return u.apply(this, [...f, ...s]);
1269
- } : r[l] = u;
1273
+ } : r[n] = u;
1270
1274
  }), r;
1271
- }, Ze = (a, o, s, t, n) => {
1275
+ }, Ze = (a, o, s, t, l) => {
1272
1276
  const e = a, r = e.colSpan ?? a.span;
1273
1277
  if (!a.item.form?.spanCol)
1274
1278
  return r;
1275
- const l = n?.maxSpan || 12, u = n?.defaultSpan || l / 2, f = e.gridBand, b = o.filter((c) => f != null ? c.gridBand === f && !E.isFun(c.item.show?.form, s, t) : c.gridRow === e.gridRow && !E.isFun(c.item.show?.form, s, t)).reduce((c, p) => c + (p.colSpan ?? p.span ?? u), 0);
1276
- return r + b;
1277
- }, Lt = (a, o) => {
1278
- const s = (t, n) => {
1279
- const e = t.gridRow, r = t.gridRow + t.rowSpan - 1, l = n.gridRow, u = n.gridRow + n.rowSpan - 1;
1280
- return e <= u && l <= r;
1279
+ const n = l?.maxSpan || 12, u = l?.defaultSpan || n / 2, f = e.gridBand, m = o.filter((c) => f != null ? c.gridBand === f && !E.isFun(c.item.show?.form, s, t) : c.gridRow === e.gridRow && !E.isFun(c.item.show?.form, s, t)).reduce((c, p) => c + (p.colSpan ?? p.span ?? u), 0);
1280
+ return r + m;
1281
+ }, Bt = (a, o) => {
1282
+ const s = (t, l) => {
1283
+ const e = t.gridRow, r = t.gridRow + t.rowSpan - 1, n = l.gridRow, u = l.gridRow + l.rowSpan - 1;
1284
+ return e <= u && n <= r;
1281
1285
  };
1282
1286
  return a.map((t) => a.filter((e) => s(t, e)).length !== 1 || t.colSpan >= o ? t : {
1283
1287
  ...t,
@@ -1286,75 +1290,75 @@ const we = (a) => {
1286
1290
  gridColumn: 1
1287
1291
  });
1288
1292
  }, xe = (a, o, s = {}) => {
1289
- const t = /* @__PURE__ */ new Set(), n = [];
1293
+ const t = /* @__PURE__ */ new Set(), l = [];
1290
1294
  let e = 0, r = 0;
1291
- const l = (p) => Math.floor(p / W) * W, u = (p, w) => `${p},${w}`, f = (p, w, F, B) => {
1292
- if (w + F > o) return !1;
1293
- for (let L = 0; L < B; L++)
1294
- for (let j = 0; j < F; j++)
1295
- if (t.has(u(p + L, w + j))) return !1;
1295
+ const n = (p) => Math.floor(p / W) * W, u = (p, w) => `${p},${w}`, f = (p, w, U, K) => {
1296
+ if (w + U > o) return !1;
1297
+ for (let L = 0; L < K; L++)
1298
+ for (let T = 0; T < U; T++)
1299
+ if (t.has(u(p + L, w + T))) return !1;
1296
1300
  return !0;
1297
- }, d = (p, w, F, B) => {
1298
- for (let L = 0; L < B; L++)
1299
- for (let j = 0; j < F; j++)
1300
- t.add(u(p + L, w + j));
1301
- }, b = (p, w, F, B) => {
1302
- for (let j = l(p); j < 500 * W; j += W) {
1303
- const Ve = j + W, Se = j === l(p) ? Math.max(j, p) : j;
1301
+ }, d = (p, w, U, K) => {
1302
+ for (let L = 0; L < K; L++)
1303
+ for (let T = 0; T < U; T++)
1304
+ t.add(u(p + L, w + T));
1305
+ }, m = (p, w, U, K) => {
1306
+ for (let T = n(p); T < 500 * W; T += W) {
1307
+ const Ve = T + W, Se = T === n(p) ? Math.max(T, p) : T;
1304
1308
  for (let _ = Se; _ < Ve; _++) {
1305
1309
  const Ee = _ === p ? w : 0;
1306
- for (let te = Ee; te <= o - F; te++)
1307
- if (f(_, te, F, B)) return { tr: _, tc: te };
1310
+ for (let te = Ee; te <= o - U; te++)
1311
+ if (f(_, te, U, K)) return { tr: _, tc: te };
1308
1312
  }
1309
1313
  }
1310
1314
  return { tr: p, tc: w };
1311
- }, c = (p, w, F, B) => {
1312
- const L = l(p);
1313
- if (B < W && p + B < L + W) {
1314
- e = p + B, r = w;
1315
+ }, c = (p, w, U, K) => {
1316
+ const L = n(p);
1317
+ if (K < W && p + K < L + W) {
1318
+ e = p + K, r = w;
1315
1319
  return;
1316
1320
  }
1317
- const j = w + F;
1318
- if (j < o) {
1319
- r = j, e = L;
1321
+ const T = w + U;
1322
+ if (T < o) {
1323
+ r = T, e = L;
1320
1324
  return;
1321
1325
  }
1322
1326
  r = 0, e = L + W;
1323
1327
  };
1324
1328
  return a.forEach((p) => {
1325
- const w = p.colSpan ?? (p.span === 0 ? o : p.span), F = p.rowSpan ?? Je(p.item);
1326
- p.item.form?.rowBreak && n.length && (r = 0, e = l(e) + W);
1327
- let { tr: B, tc: L } = f(e, r, w, F) ? { tr: e, tc: r } : b(e, r, w, F);
1328
- f(B, L, w, F) || ({ tr: B, tc: L } = b(0, 0, w, F)), d(B, L, w, F);
1329
- const j = B + 1;
1330
- n.push({
1329
+ const w = p.colSpan ?? (p.span === 0 ? o : p.span), U = p.rowSpan ?? Je(p.item);
1330
+ p.item.form?.rowBreak && l.length && (r = 0, e = n(e) + W);
1331
+ let { tr: K, tc: L } = f(e, r, w, U) ? { tr: e, tc: r } : m(e, r, w, U);
1332
+ f(K, L, w, U) || ({ tr: K, tc: L } = m(0, 0, w, U)), d(K, L, w, U);
1333
+ const T = K + 1;
1334
+ l.push({
1331
1335
  ...p,
1332
1336
  span: w,
1333
1337
  colSpan: w,
1334
- rowSpan: F,
1335
- gridRow: j,
1338
+ rowSpan: U,
1339
+ gridRow: T,
1336
1340
  gridColumn: L + 1,
1337
- gridBand: re({ gridRow: j })
1338
- }), c(B, L, w, F);
1339
- }), s.fillSingleRows ? Lt(n, o) : n;
1341
+ gridBand: re({ gridRow: T })
1342
+ }), c(K, L, w, U);
1343
+ }), s.fillSingleRows ? Bt(l, o) : l;
1340
1344
  }, De = (a, o, s, t = W) => {
1341
- const n = a.filter((l) => E.isFun(l.item.show?.form, o, s)), e = /* @__PURE__ */ new Map();
1342
- a.forEach((l) => {
1343
- const f = `${l.gridBand ?? re(l)}:${l.gridColumn}:${l.colSpan}`;
1344
- e.has(f) || e.set(f, []), e.get(f).push(l);
1345
+ const l = a.filter((n) => E.isFun(n.item.show?.form, o, s)), e = /* @__PURE__ */ new Map();
1346
+ a.forEach((n) => {
1347
+ const f = `${n.gridBand ?? re(n)}:${n.gridColumn}:${n.colSpan}`;
1348
+ e.has(f) || e.set(f, []), e.get(f).push(n);
1345
1349
  });
1346
1350
  const r = /* @__PURE__ */ new Map();
1347
- return e.forEach((l) => {
1348
- const u = l.reduce((c, p) => c + p.rowSpan, 0);
1349
- if (!(l.length > 1 && u === W && l.every((c) => c.rowSpan < W))) return;
1350
- const d = l.filter((c) => E.isFun(c.item.show?.form, o, s));
1351
+ return e.forEach((n) => {
1352
+ const u = n.reduce((c, p) => c + p.rowSpan, 0);
1353
+ if (!(n.length > 1 && u === W && n.every((c) => c.rowSpan < W))) return;
1354
+ const d = n.filter((c) => E.isFun(c.item.show?.form, o, s));
1351
1355
  if (d.length !== 1) return;
1352
- const b = d[0];
1353
- r.set(b.item.key, {
1354
- ...b,
1356
+ const m = d[0];
1357
+ r.set(m.item.key, {
1358
+ ...m,
1355
1359
  rowSpan: W
1356
1360
  });
1357
- }), xe(n.map((l) => r.get(l.item.key) || l), t, {
1361
+ }), xe(l.map((n) => r.get(n.item.key) || n), t, {
1358
1362
  fillSingleRows: !0
1359
1363
  });
1360
1364
  }, _e = (a) => {
@@ -1363,37 +1367,37 @@ const we = (a) => {
1363
1367
  const t = s.gridBand ?? re(s);
1364
1368
  o.has(t) || o.set(t, []), o.get(t).push(s);
1365
1369
  }), Array.from(o.keys()).sort((s, t) => s - t).map((s) => o.get(s));
1366
- }, et = (a) => a?.length ? Array.isArray(a[0]) ? a.flat() : a : [], Tt = (a, o) => {
1367
- if (!At(a) || !a.key) return null;
1368
- const s = o.defaultSpan ?? (o.maxSpan || 12) / 2, t = Bt(a, s, o.layout);
1370
+ }, Lt = (a) => a?.length ? Array.isArray(a[0]) ? a.flat() : a : [], Tt = (a, o) => {
1371
+ if (!Ut(a) || !a.key) return null;
1372
+ const s = o.defaultSpan ?? (o.maxSpan || 12) / 2, t = At(a, s, o.layout);
1369
1373
  return { item: a, span: t };
1370
1374
  }, jt = (a, o = {}) => {
1371
- const s = [], t = (n) => {
1372
- if (n.children?.length) {
1373
- n.children.forEach((r) => t(r));
1375
+ const s = [], t = (l) => {
1376
+ if (l.children?.length) {
1377
+ l.children.forEach((r) => t(r));
1374
1378
  return;
1375
1379
  }
1376
- const e = Tt(n, o);
1380
+ const e = Tt(l, o);
1377
1381
  e && s.push(e);
1378
1382
  };
1379
- return a.forEach((n) => t(n)), s;
1380
- }, tt = (a, o = {}) => {
1381
- const s = o.maxSpan ?? 12, t = o.defaultSpan ?? s / 2, n = o.layout ?? "row", r = jt(a, { maxSpan: s, defaultSpan: t, layout: n });
1382
- if (n === "column") {
1383
- const l = [];
1383
+ return a.forEach((l) => t(l)), s;
1384
+ }, et = (a, o = {}) => {
1385
+ const s = o.maxSpan ?? 12, t = o.defaultSpan ?? s / 2, l = o.layout ?? "row", r = jt(a, { maxSpan: s, defaultSpan: t, layout: l });
1386
+ if (l === "column") {
1387
+ const n = [];
1384
1388
  let u = 1;
1385
1389
  return r.forEach((f) => {
1386
- const d = Je(f.item), b = s;
1387
- l.push({
1390
+ const d = Je(f.item), m = s;
1391
+ n.push({
1388
1392
  ...f,
1389
- span: b,
1390
- colSpan: b,
1393
+ span: m,
1394
+ colSpan: m,
1391
1395
  rowSpan: d,
1392
1396
  gridRow: u,
1393
1397
  gridColumn: 1,
1394
1398
  gridBand: re({ gridRow: u })
1395
1399
  }), u += d;
1396
- }), { cells: l, maxSpan: s };
1400
+ }), { cells: n, maxSpan: s };
1397
1401
  }
1398
1402
  return { cells: xe(r, s), maxSpan: s };
1399
1403
  }, Pt = (a) => a.map((o) => o.item?.show?.form), Kt = (a, o, s) => {
@@ -1402,52 +1406,52 @@ const we = (a) => {
1402
1406
  required: !0,
1403
1407
  message: o(a),
1404
1408
  trigger: "blur"
1405
- }, n = le(a), e = a.options?.datetime?.type, r = n === "datetime" && typeof e == "string" && e.includes("range"), l = n === "select" && !!a.options?.select?.multiple;
1406
- (r || n === "checkbox" || l) && (t.type = "array", t.min = r ? 2 : 1);
1409
+ }, l = le(a), e = a.options?.datetime?.type, r = l === "datetime" && typeof e == "string" && e.includes("range"), n = l === "select" && !!a.options?.select?.multiple;
1410
+ (r || l === "checkbox" || n) && (t.type = "array", t.min = r ? 2 : 1);
1407
1411
  const u = typeof a.rules == "boolean" ? [t] : a.rules;
1408
1412
  return s ? u.map((f) => s(f)) : u;
1409
- }, Le = (a) => typeof a == "function" ? a() : a, ot = (a) => (o, s) => Kt(o, a, (t) => {
1410
- const n = (e, r) => {
1413
+ }, Le = (a) => typeof a == "function" ? a() : a, tt = (a) => (o, s) => Kt(o, a, (t) => {
1414
+ const l = (e, r) => {
1411
1415
  if (r && Object.prototype.hasOwnProperty.call(r, o.key) && r[o.key] !== void 0) return r[o.key];
1412
- const l = Le(s);
1413
- return l && Object.prototype.hasOwnProperty.call(l, o.key) ? l[o.key] : e;
1416
+ const n = Le(s);
1417
+ return n && Object.prototype.hasOwnProperty.call(n, o.key) ? n[o.key] : e;
1414
1418
  };
1415
1419
  if (t.validator) {
1416
1420
  const e = t.validator;
1417
1421
  return {
1418
1422
  ...t,
1419
- validator: (r, l, u, f) => {
1423
+ validator: (r, n, u, f) => {
1420
1424
  const d = Le(s);
1421
- return e(r, n(l, f), u, d || f);
1425
+ return e(r, l(n, f), u, d || f);
1422
1426
  }
1423
1427
  };
1424
1428
  }
1425
1429
  return t;
1426
- }), at = (a, o) => {
1430
+ }), ot = (a, o) => {
1427
1431
  const s = {
1428
1432
  input: k.tCurd("placeholderInput"),
1429
1433
  select: k.tCurd("placeholderSelect")
1430
1434
  }, t = (s[le(a) || "input"] || s.input) + a.label;
1431
1435
  return (o || q.error.callback)?.(a.key, a) || t;
1432
- }, nt = (a) => ot((o) => at(o, a?.error)), Ht = (a, o, s) => {
1433
- const t = {}, n = {}, e = o?.maxSpan || 12, r = o?.defaultSpan || e / 2, l = nt(o);
1434
- a.forEach((d) => ke(d, !0)), Re(a, t, n, (d) => l(d, s));
1435
- const { cells: u, maxSpan: f } = tt(a, {
1436
+ }, at = (a) => tt((o) => ot(o, a?.error)), Ht = (a, o, s) => {
1437
+ const t = {}, l = {}, e = o?.maxSpan || 12, r = o?.defaultSpan || e / 2, n = at(o);
1438
+ a.forEach((d) => ke(d, !0)), Re(a, t, l, (d) => n(d, s));
1439
+ const { cells: u, maxSpan: f } = et(a, {
1436
1440
  maxSpan: e,
1437
1441
  defaultSpan: r,
1438
1442
  layout: o?.layout
1439
1443
  });
1440
1444
  return {
1441
1445
  formDefault: t,
1442
- rules: n,
1446
+ rules: l,
1443
1447
  formGrid: u,
1444
1448
  formMaxSpan: f,
1445
1449
  formColumn: _e(u)
1446
1450
  };
1447
1451
  }, Re = (a, o, s, t) => {
1448
- const n = (e) => {
1452
+ const l = (e) => {
1449
1453
  if (e.children?.length) {
1450
- e.children.forEach((r) => n(r));
1454
+ e.children.forEach((r) => l(r));
1451
1455
  return;
1452
1456
  }
1453
1457
  if (e.key) {
@@ -1456,8 +1460,8 @@ const we = (a) => {
1456
1460
  r && (s[e.key] = r);
1457
1461
  }
1458
1462
  };
1459
- a.forEach(n);
1460
- }, Nt = { class: "curd-form-cell-inner" }, lt = /* @__PURE__ */ Q({
1463
+ a.forEach(l);
1464
+ }, Nt = { class: "curd-form-cell-inner" }, nt = /* @__PURE__ */ Q({
1461
1465
  __name: "layout",
1462
1466
  props: {
1463
1467
  formGrid: {},
@@ -1472,7 +1476,7 @@ const we = (a) => {
1472
1476
  getDisabled: { type: Function }
1473
1477
  },
1474
1478
  setup(a) {
1475
- const o = E.isFun, s = a, t = ae(() => De(s.formGrid, s.form, s.type, s.maxSpan)), n = ae(() => {
1479
+ const o = E.isFun, s = a, t = ae(() => De(s.formGrid, s.form, s.type, s.maxSpan)), l = ae(() => {
1476
1480
  const c = Array.from(
1477
1481
  new Set(
1478
1482
  t.value.map((p) => p.gridBand ?? re(p))
@@ -1487,38 +1491,38 @@ const we = (a) => {
1487
1491
  const w = p.gridRow + p.rowSpan - 1;
1488
1492
  w > c && (c = w);
1489
1493
  }), c;
1490
- }), l = (c) => c.gridRow + c.rowSpan - 1 >= r.value, u = (c) => c.rowSpan >= W, f = (c) => {
1494
+ }), n = (c) => c.gridRow + c.rowSpan - 1 >= r.value, u = (c) => c.rowSpan >= W, f = (c) => {
1491
1495
  const p = c.gridBand ?? re(c);
1492
- return n.value.get(p) ?? p;
1496
+ return l.value.get(p) ?? p;
1493
1497
  }, d = (c) => Ze(c, t.value, s.form, s.type, {
1494
1498
  maxSpan: s.maxSpan,
1495
1499
  defaultSpan: s.formOption?.defaultSpan
1496
- }), b = (c) => {
1500
+ }), m = (c) => {
1497
1501
  const p = d(c) || c.colSpan;
1498
1502
  return {
1499
1503
  gridRow: `${c.gridRow} / span ${c.rowSpan}`,
1500
1504
  gridColumn: `${c.gridColumn} / span ${p}`
1501
1505
  };
1502
1506
  };
1503
- return (c, p) => i(o)(i(Pt)(c.formGrid), c.form, c.type) ? (m(), C(A, { key: 0 }, [
1507
+ return (c, p) => i(o)(i(Pt)(c.formGrid), c.form, c.type) ? (b(), C(A, { key: 0 }, [
1504
1508
  z(c.$slots, "form-start", { row: c.form }),
1505
- D("div", {
1509
+ R("div", {
1506
1510
  class: J(["curd-form-grid", { stripe: c.stripe !== !1 }]),
1507
1511
  style: ye(e.value)
1508
1512
  }, [
1509
- (m(!0), C(A, null, G(t.value, (w) => (m(), C("div", {
1513
+ (b(!0), C(A, null, G(t.value, (w) => (b(), C("div", {
1510
1514
  key: w.item.key,
1511
1515
  class: J(["curd-form-grid-cell", [
1512
1516
  c.stripe !== !1 && f(w) % 2 === 0 ? "stripe-band-odd" : "",
1513
1517
  w.gridColumn > 1 ? "has-col-border" : "",
1514
- c.stripe !== !1 && l(w) ? "is-last-row" : "",
1518
+ c.stripe !== !1 && n(w) ? "is-last-row" : "",
1515
1519
  u(w) ? "is-row-span" : "",
1516
1520
  `form-item-col-${w.item.key}`
1517
1521
  ]]),
1518
- style: ye(b(w))
1522
+ style: ye(m(w))
1519
1523
  }, [
1520
- D("div", Nt, [
1521
- i(o)(w.item.show?.form, c.form, c.type) ? (m(), y(Ft, {
1524
+ R("div", Nt, [
1525
+ i(o)(w.item.show?.form, c.form, c.type) ? (b(), y(Ot, {
1522
1526
  key: 0,
1523
1527
  class: J({ "is-row-span-field": u(w) }),
1524
1528
  item: w.item,
@@ -1529,10 +1533,10 @@ const we = (a) => {
1529
1533
  "get-on": c.getOn,
1530
1534
  "get-disabled": c.getDisabled
1531
1535
  }, Z({ _: 2 }, [
1532
- G(c.$slots, (F, B) => ({
1533
- name: B,
1536
+ G(c.$slots, (U, K) => ({
1537
+ name: K,
1534
1538
  fn: h((L) => [
1535
- z(c.$slots, B, S({ ref_for: !0 }, L || {}))
1539
+ z(c.$slots, K, S({ ref_for: !0 }, L || {}))
1536
1540
  ])
1537
1541
  }))
1538
1542
  ]), 1032, ["class", "item", "form", "type", "label-width", "get-bind", "get-on", "get-disabled"])) : V("", !0)
@@ -1559,17 +1563,17 @@ const we = (a) => {
1559
1563
  }
1560
1564
  },
1561
1565
  setup(a, { expose: o }) {
1562
- const s = E.EDialog, t = Y(), n = a;
1563
- let e = we(n.form);
1564
- const r = Fe.getConf("curdConf"), l = "formRef-" + StrUtil.getId();
1566
+ const s = E.EDialog, t = Y(), l = a;
1567
+ let e = we(l.form);
1568
+ const r = Fe.getConf("curdConf"), n = "formRef-" + StrUtil.getId();
1565
1569
  Ie(() => {
1566
- r?.formRef?.remove(l);
1570
+ r?.formRef?.remove(n);
1567
1571
  });
1568
1572
  const u = ie({
1569
1573
  rules: {},
1570
1574
  show: !0,
1571
1575
  formDefault: {},
1572
- type: n.type || r?.update?.type || s.Add,
1576
+ type: l.type || r?.update?.type || s.Add,
1573
1577
  formColumn: [],
1574
1578
  formGrid: [],
1575
1579
  formMaxSpan: 12,
@@ -1583,38 +1587,38 @@ const we = (a) => {
1583
1587
  getBind: (f) => Xe(f, u.type),
1584
1588
  getOn: (f) => Ye(f, u.type, [u.form, f]),
1585
1589
  initColumnForm: () => {
1586
- const f = e, d = Ht(n.option.column, n.option.form, () => f.get());
1587
- u.formDefault = d.formDefault, u.rules = d.rules, u.formGrid = d.formGrid, u.formMaxSpan = d.formMaxSpan, u.formColumn = d.formColumn, u.type === s.Add ? f.isExternal() ? f.merge(JSONUtil.cp(u.formDefault)) : f.set(JSONUtil.cp(u.formDefault)) : !f.isExternal() && n.form && f.set(JSONUtil.cp(n.form));
1590
+ const f = e, d = Ht(l.option.column, l.option.form, () => f.get());
1591
+ u.formDefault = d.formDefault, u.rules = d.rules, u.formGrid = d.formGrid, u.formMaxSpan = d.formMaxSpan, u.formColumn = d.formColumn, u.type === s.Add ? f.isExternal() ? f.merge(JSONUtil.cp(u.formDefault)) : f.set(JSONUtil.cp(u.formDefault)) : !f.isExternal() && l.form && f.set(JSONUtil.cp(l.form));
1588
1592
  }
1589
1593
  });
1590
- return r?.formRef?.set(l, {
1594
+ return r?.formRef?.set(n, {
1591
1595
  validate: async (f) => {
1592
1596
  const d = t.value;
1593
1597
  if (!d)
1594
1598
  return f?.(!0), !0;
1595
1599
  await Ce();
1596
- const b = De(u.formGrid || [], u.form, u.type, u.formMaxSpan).map((w) => w.item.key).filter(Boolean), c = Object.keys(u.rules || {}).filter((w) => !b.includes(w));
1597
- if (c.length && d.clearValidate(c), !b.length)
1600
+ const m = De(u.formGrid || [], u.form, u.type, u.formMaxSpan).map((w) => w.item.key).filter(Boolean), c = Object.keys(u.rules || {}).filter((w) => !m.includes(w));
1601
+ if (c.length && d.clearValidate(c), !m.length)
1598
1602
  return f?.(!0), !0;
1599
- const p = await d.validateField(b, async (w, F) => {
1600
- w || me(ve(F));
1603
+ const p = await d.validateField(m, async (w, U) => {
1604
+ w || me(ve(U));
1601
1605
  });
1602
1606
  if (f?.(!!p), !p) throw !1;
1603
1607
  return !0;
1604
1608
  }
1605
- }), n.option.form?.initStart?.(u), u.initColumnForm(), n.option.form?.initEnd?.(u), Ne(
1606
- () => n.form,
1609
+ }), l.option.form?.initStart?.(u), u.initColumnForm(), l.option.form?.initEnd?.(u), Ne(
1610
+ () => l.form,
1607
1611
  (f) => {
1608
1612
  e = we(f), u.initColumnForm();
1609
1613
  }
1610
- ), o({ ref: t, conf: u }), (f, d) => (m(), y(i(oe), {
1614
+ ), o({ ref: t, conf: u }), (f, d) => (b(), y(i(oe), {
1611
1615
  ref_key: "ruleFormRef",
1612
1616
  ref: t,
1613
1617
  model: u.form,
1614
1618
  rules: u.rules
1615
1619
  }, {
1616
1620
  default: h(() => [
1617
- u.show ? (m(), y(lt, {
1621
+ u.show ? (b(), y(nt, {
1618
1622
  key: 0,
1619
1623
  "form-grid": u.formGrid,
1620
1624
  "max-span": u.formMaxSpan,
@@ -1627,7 +1631,7 @@ const we = (a) => {
1627
1631
  "get-on": u.getOn,
1628
1632
  "get-disabled": u.getDisabled
1629
1633
  }, Z({ _: 2 }, [
1630
- G(f.$slots, (b, c) => ({
1634
+ G(f.$slots, (m, c) => ({
1631
1635
  name: c,
1632
1636
  fn: h((p) => [
1633
1637
  z(f.$slots, c, Me(Oe(p || {})))
@@ -1641,14 +1645,14 @@ const we = (a) => {
1641
1645
  }), Gt = (a) => a?.value || a, Wt = (a) => {
1642
1646
  const o = Gt(a);
1643
1647
  return o?.validate ? new Promise((s, t) => {
1644
- let n = !1;
1645
- const e = (r, l) => {
1646
- n || (n = !0, r === !1 ? (me(ve(l)), t(!1)) : s(!0));
1648
+ let l = !1;
1649
+ const e = (r, n) => {
1650
+ l || (l = !0, r === !1 ? (me(ve(n)), t(!1)) : s(!0));
1647
1651
  };
1648
1652
  try {
1649
1653
  const r = o.validate(e);
1650
- r && typeof r.then == "function" ? r.then((l) => e(l)).catch((l) => {
1651
- me(ve(l?.fields || l)), t(l);
1654
+ r && typeof r.then == "function" ? r.then((n) => e(n)).catch((n) => {
1655
+ me(ve(n?.fields || n)), t(n);
1652
1656
  }) : (r !== void 0 || o.validate.length === 0) && e(r);
1653
1657
  } catch (r) {
1654
1658
  t(r);
@@ -1687,11 +1691,11 @@ const we = (a) => {
1687
1691
  */
1688
1692
  regFormRef(o, s, t) {
1689
1693
  o ? t ? a.formRef.set(s, {
1690
- validate: async (n) => {
1694
+ validate: async (l) => {
1691
1695
  try {
1692
- n(await t());
1696
+ l(await t());
1693
1697
  } catch {
1694
- n(!1);
1698
+ l(!1);
1695
1699
  }
1696
1700
  }
1697
1701
  }) : a.formRef.set(s, o) : a.formRef.remove(s);
@@ -1712,22 +1716,22 @@ const we = (a) => {
1712
1716
  s.set(t);
1713
1717
  },
1714
1718
  formDefault: {},
1715
- getPlaceholder: (t, n = k.tCurd("placeholderInput")) => t.text?.search?.placeholder === void 0 ? `${n}${t.label}` : t.text?.search?.placeholder,
1719
+ getPlaceholder: (t, l = k.tCurd("placeholderInput")) => t.text?.search?.placeholder === void 0 ? `${l}${t.label}` : t.text?.search?.placeholder,
1716
1720
  getFormData: () => {
1717
1721
  const t = a();
1718
- let n = {};
1722
+ let l = {};
1719
1723
  o.option.column.forEach((r) => {
1720
- (typeof r.show?.search == "function" ? r.show?.search(t.search.form) : r.show?.search) && (n[r.key] = t.search.form[r.key]);
1724
+ (typeof r.show?.search == "function" ? r.show?.search(t.search.form) : r.show?.search) && (l[r.key] = t.search.form[r.key]);
1721
1725
  });
1722
- const e = o.option.search?.before?.(n);
1723
- return e && (n = e), n;
1726
+ const e = o.option.search?.before?.(l);
1727
+ return e && (l = e), l;
1724
1728
  },
1725
1729
  reset: () => {
1726
- const t = a(), n = t.search.formDefault;
1727
- Object.keys(n).forEach((r) => {
1728
- o.option.search?.resetMode === "none" ? n[r] = void 0 : n[r] = t.search.formDefault[r];
1730
+ const t = a(), l = t.search.formDefault;
1731
+ Object.keys(l).forEach((r) => {
1732
+ o.option.search?.resetMode === "none" ? l[r] = void 0 : l[r] = t.search.formDefault[r];
1729
1733
  });
1730
- const e = ObjectUtil.deepMerge(n, {});
1734
+ const e = ObjectUtil.deepMerge(l, {});
1731
1735
  x.setValue(t.search.form, e, !0), t.page.num = 1, o.option.init !== !1 && t.table.getList();
1732
1736
  },
1733
1737
  submit: () => {
@@ -1740,16 +1744,16 @@ const we = (a) => {
1740
1744
  page: {
1741
1745
  num: 1,
1742
1746
  total: 0,
1743
- layout: o.option.page?.layout || T.config.pagination.layout,
1744
- showTools: o.option.page?.showTools || T.config.pagination.showTools,
1745
- size: o.option.page?.size || T.config.pagination.size,
1746
- sizeList: o.option.page?.sizeList || T.config.pagination.pageSizes,
1747
- pagerCount: o.option.page?.pagerCount || T.config.pagination.pagerCount,
1747
+ layout: o.option.page?.layout || B.config.pagination.layout,
1748
+ showTools: o.option.page?.showTools || B.config.pagination.showTools,
1749
+ size: o.option.page?.size || B.config.pagination.size,
1750
+ sizeList: o.option.page?.sizeList || B.config.pagination.pageSizes,
1751
+ pagerCount: o.option.page?.pagerCount || B.config.pagination.pagerCount,
1748
1752
  getQuery: (s = {}) => {
1749
1753
  const t = a();
1750
1754
  return {
1751
- [T.config.field.page.size]: s.size || t.page.size,
1752
- [T.config.field.page.num]: s.num || t.page.num,
1755
+ [B.config.field.page.size]: s.size || t.page.size,
1756
+ [B.config.field.page.num]: s.num || t.page.num,
1753
1757
  ...t.search.getFormData()
1754
1758
  };
1755
1759
  }
@@ -1759,29 +1763,29 @@ const we = (a) => {
1759
1763
  return {
1760
1764
  table: {
1761
1765
  op: {
1762
- width: (...n) => n.filter((r) => r).length * 30 + 60
1766
+ width: (...l) => l.filter((r) => r).length * 30 + 60
1763
1767
  },
1764
1768
  loading: !1,
1765
1769
  data: [],
1766
1770
  expand: {
1767
1771
  isExpand: !1,
1768
1772
  rowKeys: [],
1769
- change: (n, e) => {
1773
+ change: (l, e) => {
1770
1774
  },
1771
1775
  all: () => {
1772
- const n = t();
1773
- if (n.table.expand.isExpand)
1774
- n.table.expand.rowKeys = [];
1776
+ const l = t();
1777
+ if (l.table.expand.isExpand)
1778
+ l.table.expand.rowKeys = [];
1775
1779
  else {
1776
1780
  const e = (r) => {
1777
- let l = [];
1781
+ let n = [];
1778
1782
  return r.forEach((u) => {
1779
- l.push(u[o.option.table.rowKey]), u.children?.length && (l = l.concat(e(u.children)));
1780
- }), l;
1783
+ n.push(u[o.option.table.rowKey]), u.children?.length && (n = n.concat(e(u.children)));
1784
+ }), n;
1781
1785
  };
1782
- n.table.expand.rowKeys = e(n.table.data);
1786
+ l.table.expand.rowKeys = e(l.table.data);
1783
1787
  }
1784
- n.table.expand.isExpand = !n.table.expand.isExpand;
1788
+ l.table.expand.isExpand = !l.table.expand.isExpand;
1785
1789
  }
1786
1790
  },
1787
1791
  column: {
@@ -1798,115 +1802,115 @@ const we = (a) => {
1798
1802
  modulePromise: void 0,
1799
1803
  getOption: () => o.option.table?.sortable || {},
1800
1804
  showTriggerButton: () => {
1801
- const n = t();
1802
- return o.option.table?.sortable?.button && !n.table.sortable.mode;
1805
+ const l = t();
1806
+ return o.option.table?.sortable?.button && !l.table.sortable.mode;
1803
1807
  },
1804
1808
  showActionButton: () => {
1805
- const n = t();
1806
- return o.option.table?.sortable?.button && n.table.sortable.mode;
1809
+ const l = t();
1810
+ return o.option.table?.sortable?.button && l.table.sortable.mode;
1807
1811
  },
1808
1812
  showSaveButton: () => !o.option.table?.sortable?.button && o.option.table?.sortable?.show && o.option.table?.sortable?.saveButton,
1809
1813
  isActive: () => {
1810
- const n = t(), e = n.table.sortable.getOption();
1811
- return e.button ? n.table.sortable.mode : !!e.show;
1814
+ const l = t(), e = l.table.sortable.getOption();
1815
+ return e.button ? l.table.sortable.mode : !!e.show;
1812
1816
  },
1813
1817
  showPagination: () => {
1814
- const n = t();
1815
- return !n.table.sortable.isActive() || n.table.sortable.getOption().page;
1818
+ const l = t();
1819
+ return !l.table.sortable.isActive() || l.table.sortable.getOption().page;
1816
1820
  },
1817
1821
  disableScroll: () => {
1818
- const n = t(), e = n.table.sortable.getOption();
1819
- return n.table.sortable.isActive() && !e.page && !e.scroll;
1822
+ const l = t(), e = l.table.sortable.getOption();
1823
+ return l.table.sortable.isActive() && !e.page && !e.scroll;
1820
1824
  },
1821
1825
  getTableBindOption: () => {
1822
- const n = t();
1826
+ const l = t();
1823
1827
  return {
1824
1828
  ...o.option.table || {},
1825
- ...n.table.sortable.disableScroll() ? {
1829
+ ...l.table.sortable.disableScroll() ? {
1826
1830
  height: void 0,
1827
1831
  maxHeight: void 0
1828
1832
  } : {}
1829
1833
  };
1830
1834
  },
1831
1835
  getColumnBind: () => {
1832
- const { show: n, button: e, page: r, scroll: l, field: u, rule: f, api: d, onEnd: b, ...c } = t().table.sortable.getOption();
1836
+ const { show: l, button: e, page: r, scroll: n, field: u, rule: f, api: d, onEnd: m, ...c } = t().table.sortable.getOption();
1833
1837
  return c;
1834
1838
  },
1835
1839
  destroy: () => {
1836
- const n = t();
1837
- n.table.sortable.instance?.destroy(), n.table.sortable.instance = void 0;
1840
+ const l = t();
1841
+ l.table.sortable.instance?.destroy(), l.table.sortable.instance = void 0;
1838
1842
  },
1839
1843
  getBody: () => s.tableRef.value?.$el?.querySelector(".el-table__body-wrapper tbody"),
1840
1844
  loadModule: async () => {
1841
- const n = t();
1842
- n.table.sortable.modulePromise ??= E.loadModule("sortablejs");
1843
- const e = await n.table.sortable.modulePromise;
1845
+ const l = t();
1846
+ l.table.sortable.modulePromise ??= E.loadModule("sortablejs");
1847
+ const e = await l.table.sortable.modulePromise;
1844
1848
  return e.default || e;
1845
1849
  },
1846
- applyRule: (n, e, r, l) => {
1850
+ applyRule: (l, e, r, n) => {
1847
1851
  if (r === "value") {
1848
- n.forEach((u, f) => {
1849
- u[e] = l[f];
1852
+ l.forEach((u, f) => {
1853
+ u[e] = n[f];
1850
1854
  });
1851
1855
  return;
1852
1856
  }
1853
- n.forEach((u, f) => {
1857
+ l.forEach((u, f) => {
1854
1858
  u[e] = f + 1;
1855
1859
  });
1856
1860
  },
1857
1861
  sync: async () => {
1858
- const n = t();
1859
- if (n.table.sortable.destroy(), !n.table.sortable.isActive() || n.table.loading) return;
1862
+ const l = t();
1863
+ if (l.table.sortable.destroy(), !l.table.sortable.isActive() || l.table.loading) return;
1860
1864
  await Ce();
1861
- const e = n.table.sortable.getBody();
1865
+ const e = l.table.sortable.getBody();
1862
1866
  if (!e) return;
1863
- const r = await n.table.sortable.loadModule(), l = n.table.sortable.getOption();
1864
- n.table.sortable.instance = r.create(e, {
1867
+ const r = await l.table.sortable.loadModule(), n = l.table.sortable.getOption();
1868
+ l.table.sortable.instance = r.create(e, {
1865
1869
  animation: 150,
1866
1870
  handle: ".cc1-form-drag-handle",
1867
1871
  draggable: ".el-table__row",
1868
1872
  onEnd: ({ oldIndex: u, newIndex: f }) => {
1869
1873
  const d = (c, p, w) => {
1870
1874
  if (!Number.isInteger(p) || !Number.isInteger(w) || p === w || p < 0 || w < 0 || p >= c.length || w >= c.length) return;
1871
- const F = c.splice(p, 1)[0];
1872
- c.splice(w, 0, F);
1873
- }, b = n.table.data.map((c) => c?.[l.field]);
1874
- d(n.table.data, u, f), l.onEnd ? l.onEnd(n.table.data) : n.table.sortable.applyRule(n.table.data, l.field, l.rule, b);
1875
+ const U = c.splice(p, 1)[0];
1876
+ c.splice(w, 0, U);
1877
+ }, m = l.table.data.map((c) => c?.[n.field]);
1878
+ d(l.table.data, u, f), n.onEnd ? n.onEnd(l.table.data) : l.table.sortable.applyRule(l.table.data, n.field, n.rule, m);
1875
1879
  }
1876
1880
  });
1877
1881
  },
1878
1882
  refreshList: async () => {
1879
- const n = t();
1880
- await n.table.getList(n.table.sortable.isActive() ? "sortable" : void 0), n.table.sortable.sync();
1883
+ const l = t();
1884
+ await l.table.getList(l.table.sortable.isActive() ? "sortable" : void 0), l.table.sortable.sync();
1881
1885
  },
1882
1886
  /** 临时保存fitHeight,用于排序时临时关闭 */
1883
1887
  fitHeight: !1,
1884
1888
  start: async () => {
1885
- const n = t(), e = n.table?.sortable.getOption();
1886
- n.table.sortable.fitHeight = o.option.table.fitHeight, e.scroll || (o.option.table.fitHeight = !1), n.table.sortable.mode = !0, await n.table.sortable.refreshList();
1889
+ const l = t(), e = l.table?.sortable.getOption();
1890
+ l.table.sortable.fitHeight = o.option.table.fitHeight, e.scroll || (o.option.table.fitHeight = !1), l.table.sortable.mode = !0, await l.table.sortable.refreshList();
1887
1891
  },
1888
1892
  exit: async () => {
1889
- const n = t();
1890
- o.option.table.fitHeight = n.table.sortable.fitHeight, await n.table.getList(), n.table.sortable.mode = !1, n.table.sortable.destroy();
1893
+ const l = t();
1894
+ o.option.table.fitHeight = l.table.sortable.fitHeight, await l.table.getList(), l.table.sortable.mode = !1, l.table.sortable.destroy();
1891
1895
  },
1892
1896
  save: async () => {
1893
- const n = t(), r = n.table.sortable.getOption().api?.update || o.option.api.update;
1897
+ const l = t(), r = l.table.sortable.getOption().api?.update || o.option.api.update;
1894
1898
  if (!r) {
1895
1899
  E.fail(k.tCurd("sortableUpdateApiRequired"));
1896
1900
  return;
1897
1901
  }
1898
- n.table.sortable.actionLoading = !0, n.table.loading = !0;
1902
+ l.table.sortable.actionLoading = !0, l.table.loading = !0;
1899
1903
  try {
1900
- await r(n.table.data, "sortable"), E.success(k.tCurd("operationSuccess")), await n.table.sortable.exit();
1901
- } catch (l) {
1902
- console.error(l);
1904
+ await r(l.table.data, "sortable"), E.success(k.tCurd("operationSuccess")), await l.table.sortable.exit();
1905
+ } catch (n) {
1906
+ console.error(n);
1903
1907
  } finally {
1904
- n.table.sortable.actionLoading = !1, n.table.loading = !1;
1908
+ l.table.sortable.actionLoading = !1, l.table.loading = !1;
1905
1909
  }
1906
1910
  },
1907
- command: async (n) => {
1911
+ command: async (l) => {
1908
1912
  const e = t();
1909
- if (n === "save") {
1913
+ if (l === "save") {
1910
1914
  await e.table.sortable.save();
1911
1915
  return;
1912
1916
  }
@@ -1917,56 +1921,53 @@ const we = (a) => {
1917
1921
  group: {
1918
1922
  expand: !1,
1919
1923
  toggleExpandAll: () => {
1920
- const n = t(), e = !n.table.header.group.expand;
1921
- n.table.header.group.expand = e;
1922
- const r = (l) => {
1923
- l.forEach((u) => {
1924
+ const l = t(), e = !l.table.header.group.expand;
1925
+ l.table.header.group.expand = e;
1926
+ const r = (n) => {
1927
+ n.forEach((u) => {
1924
1928
  u.table?.header?.group !== void 0 && (u.table.header.group = !e), u.table?.header?.groupKey !== void 0 && (u.table.header.show = e), Array.isArray(u.children) && u.children.length && r(u.children);
1925
1929
  });
1926
1930
  };
1927
- r(n.table.column.list);
1931
+ r(l.table.column.list);
1928
1932
  }
1929
1933
  }
1930
1934
  },
1931
- parseListResult: async (n) => {
1932
- const e = t(), r = T.config.field.result, l = n?.data || { [r.list]: n }, u = Array.isArray(l) ? l : (Array.isArray(l[r.list]), l[r.list]), f = et(e.update.formGrid?.length ? e.update.formGrid : e.update.formColumn), b = ObjectUtil.deepMerge({ data: u }, {}).data.map((c) => (Object.keys(c).forEach((w) => {
1933
- const F = f.find((B) => B.item.key === w);
1934
- F && ["select", "radio"].includes(F.item.type) && (F.item.table.format || (F.item.table.format = (B) => F.item.options[F.item.type].data?.find((L) => L.value == B[w])?.label || B[w]));
1935
- }), c));
1935
+ parseListResult: async (l) => {
1936
+ const e = B.config.field.result, r = l?.data || { [e.list]: l }, n = Array.isArray(r) ? r : (Array.isArray(r[e.list]), r[e.list]), f = ObjectUtil.deepMerge({ data: n }, {}).data;
1936
1937
  return {
1937
- data: o.option.data ? await o.option.data(b, u) : b,
1938
- total: l[r.total] || 0
1938
+ data: o.option.data ? await o.option.data(f, n) : f,
1939
+ total: r[e.total] || 0
1939
1940
  };
1940
1941
  },
1941
- applyListResult: async (n, e) => {
1942
- const r = t(), l = await r.table.parseListResult(n);
1943
- return r.table.data = l.data, r.page.total = e ?? l.total, r.tableEditValidate?.clear?.(), l;
1942
+ applyListResult: async (l, e) => {
1943
+ const r = t(), n = await r.table.parseListResult(l);
1944
+ return r.table.data = n.data, r.page.total = e ?? n.total, r.tableEditValidate?.clear?.(), n;
1944
1945
  },
1945
- getList: async (n) => {
1946
+ getList: async (l) => {
1946
1947
  const e = t();
1947
1948
  e.table.loading = !0;
1948
- const r = o.option.table?.sortable, l = n === "sortable" && r?.api?.list || o.option.api.list, u = JSONUtil.cp(e.table.selection.list);
1949
+ const r = o.option.table?.sortable, n = l === "sortable" && r?.api?.list || o.option.api.list, u = JSONUtil.cp(e.table.selection.list);
1949
1950
  try {
1950
1951
  await e.initApiData("init");
1951
1952
  let f = {};
1952
1953
  if (e.table.sort.prop) {
1953
- const { props: c, order: p } = T.config.table.sort;
1954
+ const { props: c, order: p } = B.config.table.sort;
1954
1955
  f = {
1955
1956
  [c.field]: e.table.sort.prop,
1956
1957
  [p.field]: e.table.sort.order
1957
1958
  };
1958
1959
  }
1959
- const d = n === "sortable" && r?.page === !1 ? e.page.getQuery({
1960
+ const d = l === "sortable" && r?.page === !1 ? e.page.getQuery({
1960
1961
  num: 1,
1961
1962
  size: e.page.total || 999999
1962
- }) : e.page.getQuery(), b = await l(
1963
+ }) : e.page.getQuery(), m = await n(
1963
1964
  {
1964
1965
  ...d,
1965
1966
  ...f
1966
1967
  },
1967
- n
1968
+ l
1968
1969
  );
1969
- await e.table.applyListResult(b, n === "sortable" && r?.page === !1 ? e.page.total : void 0), setTimeout(() => {
1970
+ await e.table.applyListResult(m, l === "sortable" && r?.page === !1 ? e.page.total : void 0), setTimeout(() => {
1970
1971
  e.table.selection.setList(u), o.option.table?.sortable?.show && !o.option.table?.sortable?.button && e.table.sortable.sync();
1971
1972
  }, 20);
1972
1973
  } catch (f) {
@@ -1977,75 +1978,75 @@ const we = (a) => {
1977
1978
  },
1978
1979
  selection: {
1979
1980
  list: [],
1980
- change: (n) => {
1981
- t().table.selection.list = n;
1981
+ change: (l) => {
1982
+ t().table.selection.list = l;
1982
1983
  },
1983
- setList: (n, e) => {
1984
+ setList: (l, e) => {
1984
1985
  const r = t();
1985
1986
  r.table.selection.list = [];
1986
- const l = s.tableRef.value;
1987
- if (l?.clearSelection(), !l || !n?.length) return;
1987
+ const n = s.tableRef.value;
1988
+ if (n?.clearSelection(), !n || !l?.length) return;
1988
1989
  const u = o.option.table?.rowKey, f = (d) => {
1989
- const b = (c) => {
1990
+ const m = (c) => {
1990
1991
  for (const p of c) {
1991
1992
  if (u != null && u !== "") {
1992
1993
  if (p[u] === d[u]) return p;
1993
1994
  } else if (p === d)
1994
1995
  return p;
1995
1996
  if (Array.isArray(p.children) && p.children.length) {
1996
- const w = b(p.children);
1997
+ const w = m(p.children);
1997
1998
  if (w !== void 0) return w;
1998
1999
  }
1999
2000
  }
2000
2001
  };
2001
- return b(r.table.data);
2002
+ return m(r.table.data);
2002
2003
  };
2003
- n.forEach((d) => {
2004
- const b = f(d);
2005
- if (b)
2004
+ l.forEach((d) => {
2005
+ const m = f(d);
2006
+ if (m)
2006
2007
  if (e) {
2007
- const c = () => l.toggleRowSelection(b, !0, !1);
2008
+ const c = () => n.toggleRowSelection(m, !0, !1);
2008
2009
  e(d) !== !1 && c();
2009
2010
  } else
2010
- l.toggleRowSelection(b, !0, !1);
2011
+ n.toggleRowSelection(m, !0, !1);
2011
2012
  });
2012
2013
  }
2013
2014
  },
2014
2015
  sort: {
2015
2016
  prop: "",
2016
2017
  order: "",
2017
- change: (n) => {
2018
+ change: (l) => {
2018
2019
  const e = t();
2019
- T.config.table.sort.resetPage && (e.page.num = 1);
2020
- const r = T.config.table.sort;
2020
+ B.config.table.sort.resetPage && (e.page.num = 1);
2021
+ const r = B.config.table.sort;
2021
2022
  if (r.change) {
2022
- r.change(n, e);
2023
+ r.change(l, e);
2023
2024
  return;
2024
2025
  }
2025
- e.table.sort.prop = n.prop, n.order === null ? (e.table.sort.order = "", e.table.sort.prop = "") : e.table.sort.order = n.order === "ascending" ? r.order.asc : r.order.desc, e.table.getList();
2026
+ e.table.sort.prop = l.prop, l.order === null ? (e.table.sort.order = "", e.table.sort.prop = "") : e.table.sort.order = l.order === "ascending" ? r.order.asc : r.order.desc, e.table.getList();
2026
2027
  }
2027
2028
  }
2028
2029
  }
2029
2030
  };
2030
2031
  }, Yt = (a, o) => {
2031
2032
  const s = ie({}), t = /* @__PURE__ */ new WeakMap();
2032
- let n = 0;
2033
+ let l = 0;
2033
2034
  const e = (g) => {
2034
2035
  let v = t.get(g);
2035
- return v || (n += 1, v = `fallback-${n}`, t.set(g, v)), v;
2036
+ return v || (l += 1, v = `fallback-${l}`, t.set(g, v)), v;
2036
2037
  }, r = (g) => {
2037
- const v = o.option.table?.rowKey, U = v ? g[v] : void 0;
2038
- return U != null && U !== "" ? String(U) : e(g);
2039
- }, l = (g, v) => `${r(g)}-${v.key}`, u = (g) => at(g, o.option.form?.error), f = ot(u), d = () => {
2038
+ const v = o.option.table?.rowKey, D = v ? g[v] : void 0;
2039
+ return D != null && D !== "" ? String(D) : e(g);
2040
+ }, n = (g, v) => `${r(g)}-${v.key}`, u = (g) => ot(g, o.option.form?.error), f = tt(u), d = () => {
2040
2041
  Object.keys(s).forEach((g) => {
2041
2042
  delete s[g];
2042
2043
  });
2043
- }, b = (g, v) => {
2044
- delete s[l(g, v)];
2045
- }, c = (g, v) => s[l(g, v)] || "", p = (g, v) => g.message || u(v), w = (g) => g == null || g === "" || Array.isArray(g) && g.length === 0, F = (g) => {
2044
+ }, m = (g, v) => {
2045
+ delete s[n(g, v)];
2046
+ }, c = (g, v) => s[n(g, v)] || "", p = (g, v) => g.message || u(v), w = (g) => g == null || g === "" || Array.isArray(g) && g.length === 0, U = (g) => {
2046
2047
  if (typeof g == "number") return g;
2047
2048
  if (typeof g == "string" || Array.isArray(g)) return g.length;
2048
- }, B = (g, v) => {
2049
+ }, K = (g, v) => {
2049
2050
  if (g === "array") return Array.isArray(v);
2050
2051
  if (g === "integer") return typeof v == "number" && Number.isInteger(v);
2051
2052
  if (g === "float") return typeof v == "number" && !Number.isInteger(v);
@@ -2061,88 +2062,88 @@ const we = (a) => {
2061
2062
  return !1;
2062
2063
  }
2063
2064
  return g === "string" ? typeof v == "string" : !0;
2064
- }, L = (g, v, U) => typeof g.validator != "function" ? Promise.resolve(!0) : new Promise((H) => {
2065
+ }, L = (g, v, D) => typeof g.validator != "function" ? Promise.resolve(!0) : new Promise((H) => {
2065
2066
  let N = !1;
2066
- const P = (I) => {
2067
+ const j = (I) => {
2067
2068
  if (!N) {
2068
2069
  if (N = !0, I == null) {
2069
2070
  H(!0);
2070
2071
  return;
2071
2072
  }
2072
2073
  if (I instanceof Error) {
2073
- H(I.message || p(g, U));
2074
+ H(I.message || p(g, D));
2074
2075
  return;
2075
2076
  }
2076
2077
  if (Array.isArray(I)) {
2077
2078
  const ze = I[0];
2078
- H(ze instanceof Error ? ze.message : String(ze || p(g, U)));
2079
+ H(ze instanceof Error ? ze.message : String(ze || p(g, D)));
2079
2080
  return;
2080
2081
  }
2081
2082
  H(String(I));
2082
2083
  }
2083
2084
  };
2084
2085
  try {
2085
- const I = g.validator(g, v, P);
2086
- I && typeof I.then == "function" ? I.then(() => P()).catch(P) : I === !1 ? P(p(g, U)) : typeof I == "string" || I instanceof Error ? P(I) : g.validator.length < 3 && P();
2086
+ const I = g.validator(g, v, j);
2087
+ I && typeof I.then == "function" ? I.then(() => j()).catch(j) : I === !1 ? j(p(g, D)) : typeof I == "string" || I instanceof Error ? j(I) : g.validator.length < 3 && j();
2087
2088
  } catch (I) {
2088
- P(I);
2089
+ j(I);
2089
2090
  }
2090
- }), j = async (g, v, U) => {
2091
+ }), T = async (g, v, D) => {
2091
2092
  const H = typeof g.transform == "function" ? g.transform(v) : v, N = w(H);
2092
- if (g.required && N) return p(g, U);
2093
+ if (g.required && N) return p(g, D);
2093
2094
  if (N && !g.required) return !0;
2094
- if (g.whitespace && typeof H == "string" && H.trim() === "" || g.type && !B(g.type, H) || Array.isArray(g.enum) && !g.enum.includes(H) || g.pattern && !new RegExp(g.pattern).test(String(H))) return p(g, U);
2095
- const P = F(H);
2096
- return g.len !== void 0 && P !== void 0 && P !== g.len || g.min !== void 0 && P !== void 0 && P < g.min || g.max !== void 0 && P !== void 0 && P > g.max ? p(g, U) : L(g, H, U);
2095
+ if (g.whitespace && typeof H == "string" && H.trim() === "" || g.type && !K(g.type, H) || Array.isArray(g.enum) && !g.enum.includes(H) || g.pattern && !new RegExp(g.pattern).test(String(H))) return p(g, D);
2096
+ const j = U(H);
2097
+ return g.len !== void 0 && j !== void 0 && j !== g.len || g.min !== void 0 && j !== void 0 && j < g.min || g.max !== void 0 && j !== void 0 && j > g.max ? p(g, D) : L(g, H, D);
2097
2098
  }, Ve = (g) => {
2098
2099
  const v = a();
2099
2100
  return !g.key || !v.table.column.show.list.includes(g.key) || g.table?.header?.groupKey !== void 0 && !g.table.header.show ? !1 : g.show?.table !== void 0 ? E.isFun(g.show?.table, v.table.data) : !0;
2100
2101
  }, Se = (g, v) => g.show?.form !== void 0 ? E.isFun(g.show.form, v, E.EDialog.Update) : !0, _ = () => {
2101
- const g = a(), v = [], U = (H) => {
2102
+ const g = a(), v = [], D = (H) => {
2102
2103
  H.forEach((N) => {
2103
2104
  if (Ve(N)) {
2104
2105
  if (N.children?.length) {
2105
- U(N.children);
2106
+ D(N.children);
2106
2107
  return;
2107
2108
  }
2108
2109
  v.push(N);
2109
2110
  }
2110
2111
  });
2111
2112
  };
2112
- return U(g.table.column.list), v;
2113
+ return D(g.table.column.list), v;
2113
2114
  }, Ee = async (g, v) => {
2114
2115
  if (!Se(v, g))
2115
- return b(g, v), !0;
2116
- const U = f(v, g);
2117
- if (!U) return !0;
2118
- b(g, v);
2119
- const H = Array.isArray(U) ? U : [U];
2116
+ return m(g, v), !0;
2117
+ const D = f(v, g);
2118
+ if (!D) return !0;
2119
+ m(g, v);
2120
+ const H = Array.isArray(D) ? D : [D];
2120
2121
  for (const N of H) {
2121
- const P = await j(N, g[v.key], v);
2122
- if (P !== !0)
2123
- return s[l(g, v)] = P, {
2122
+ const j = await T(N, g[v.key], v);
2123
+ if (j !== !0)
2124
+ return s[n(g, v)] = j, {
2124
2125
  field: v.key,
2125
- error: P
2126
+ error: j
2126
2127
  };
2127
2128
  }
2128
2129
  return !0;
2129
2130
  }, te = (g) => {
2130
- const v = [], U = (H) => {
2131
+ const v = [], D = (H) => {
2131
2132
  H.forEach((N) => {
2132
- v.push(N), Array.isArray(N.children) && N.children.length && U(N.children);
2133
+ v.push(N), Array.isArray(N.children) && N.children.length && D(N.children);
2133
2134
  });
2134
2135
  };
2135
- return U(g), v;
2136
+ return D(g), v;
2136
2137
  };
2137
2138
  return {
2138
2139
  tableEditValidate: {
2139
2140
  errors: s,
2140
2141
  clear: d,
2141
- clearField: b,
2142
+ clearField: m,
2142
2143
  getFieldError: c,
2143
2144
  validate: async () => {
2144
2145
  if (d(), !o.option.table?.editMode) return !0;
2145
- const g = a(), v = _(), U = te(g.table.data || []), N = (await Promise.all(U.flatMap((P) => v.map((I) => Ee(P, I))))).filter((P) => P !== !0);
2146
+ const g = a(), v = _(), D = te(g.table.data || []), N = (await Promise.all(D.flatMap((j) => v.map((I) => Ee(j, I))))).filter((j) => j !== !0);
2146
2147
  if (N.length)
2147
2148
  throw me(N), !1;
2148
2149
  return !0;
@@ -2160,22 +2161,22 @@ class Zt {
2160
2161
  */
2161
2162
  static exportToExcel = async (o, s, t) => {
2162
2163
  if (!o || o.length === 0) return;
2163
- const n = await E.loadModule("xlsx"), e = o.map((u) => {
2164
+ const l = await E.loadModule("xlsx"), e = o.map((u) => {
2164
2165
  const f = {};
2165
2166
  return s.forEach((d) => {
2166
2167
  f[d.label] = u[d.key];
2167
2168
  }), f;
2168
- }), r = n.utils.json_to_sheet(e), l = n.utils.book_new();
2169
- n.utils.book_append_sheet(l, r, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, n.writeFile(l, `${t}.xlsx`);
2169
+ }), r = l.utils.json_to_sheet(e), n = l.utils.book_new();
2170
+ l.utils.book_append_sheet(n, r, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(n, `${t}.xlsx`);
2170
2171
  };
2171
2172
  }
2172
2173
  const xt = (a, o) => ({
2173
2174
  export: {
2174
2175
  run: {
2175
2176
  start: async (s) => {
2176
- let n = await a().export.run[s]();
2177
- const e = o.option.column, r = ObjectUtil.deepMerge({ data: n, columns: e }, {}), l = o.option.tools?.export || {};
2178
- l.before?.(r), Zt.exportToExcel(r.data, r.columns, l.fileName);
2177
+ let l = await a().export.run[s]();
2178
+ const e = o.option.column, r = ObjectUtil.deepMerge({ data: l, columns: e }, {}), n = o.option.tools?.export || {};
2179
+ n.before?.(r), Zt.exportToExcel(r.data, r.columns, n.fileName);
2179
2180
  },
2180
2181
  select: async () => {
2181
2182
  const s = a();
@@ -2226,10 +2227,10 @@ const xt = (a, o) => ({
2226
2227
  });
2227
2228
  return;
2228
2229
  }
2229
- const t = o.option.api.list, n = await t({
2230
+ const t = o.option.api.list, l = await t({
2230
2231
  ...s.page.getQuery({ size: 999999, num: 1 })
2231
2232
  });
2232
- return (n.data || { [T.config.field.result.list]: n })[T.config.field.result.list];
2233
+ return (l.data || { [B.config.field.result.list]: l })[B.config.field.result.list];
2233
2234
  } catch (t) {
2234
2235
  console.error(t);
2235
2236
  } finally {
@@ -2268,11 +2269,11 @@ const xt = (a, o) => ({
2268
2269
  try {
2269
2270
  if (!t) return;
2270
2271
  await t({
2271
- [o.option.table?.rowKey]: s.remove.items.map((n) => n[o.option.table?.rowKey]),
2272
+ [o.option.table?.rowKey]: s.remove.items.map((l) => l[o.option.table?.rowKey]),
2272
2273
  items: s.remove.items
2273
2274
  }), E.success(k.tCurd("operationSuccess")), s.table.data.length <= 1 && s.page.num > 1 && (s.page.num -= 1), s.remove.close(), await s.table.getList();
2274
- } catch (n) {
2275
- console.error(n);
2275
+ } catch (l) {
2276
+ console.error(l);
2276
2277
  } finally {
2277
2278
  s.remove.loading = !1;
2278
2279
  }
@@ -2281,11 +2282,11 @@ const xt = (a, o) => ({
2281
2282
  }
2282
2283
  }), eo = (a, o, s) => ({
2283
2284
  apiDataMap: {},
2284
- getColumnSpan: (t, n) => {
2285
- const e = a(), r = e.update.formGrid?.length ? e.update.formGrid : n || [];
2285
+ getColumnSpan: (t, l) => {
2286
+ const e = a(), r = e.update.formGrid?.length ? e.update.formGrid : l || [];
2286
2287
  return Ze(t, r, e.update.form, e.update.type, {
2287
2288
  maxSpan: e.update.formMaxSpan || o.option.form?.maxSpan,
2288
- defaultSpan: o.option.form?.defaultSpan || T.config.form.defaultSpan
2289
+ defaultSpan: o.option.form?.defaultSpan || B.config.form.defaultSpan
2289
2290
  });
2290
2291
  },
2291
2292
  init: () => {
@@ -2293,83 +2294,87 @@ const xt = (a, o) => ({
2293
2294
  t.initCurdConfig(), t.initColumnOptions(), t.initColumnForm();
2294
2295
  },
2295
2296
  initApiData: async (t) => {
2296
- const n = a(), e = [], r = (l) => {
2297
- if (l.children?.length) {
2298
- l.children.forEach((f) => r(f));
2297
+ const l = a(), e = [], r = (n) => {
2298
+ if (n.children?.length) {
2299
+ n.children.forEach((d) => r(d));
2299
2300
  return;
2300
2301
  }
2301
- const u = le(l);
2302
- if (l.options?.[u]?.dataApi && l.options?.[u]?.dataApiConfig?.[t]) {
2303
- if (n.apiDataMap[l.key] && l.options?.[u]?.dataApiConfig?.once) return;
2304
- const f = (async () => {
2302
+ const u = le(n), f = () => {
2303
+ n.table?.format || (n.table ??= {}, n.table.format = (d) => n.options[u].data.find((c) => c.value === d[n.key])?.label ?? d[n.key]);
2304
+ };
2305
+ if (n.options?.[u]?.dataApi && n.options?.[u]?.dataApiConfig?.[t]) {
2306
+ if (l.apiDataMap[n.key] && n.options?.[u]?.dataApiConfig?.once) return;
2307
+ const d = (async () => {
2305
2308
  try {
2306
- let d = await l.options?.[u]?.dataApi?.(n.update.form, n.update.type);
2307
- if (d) {
2308
- const b = l.options?.[u]?.dataPath;
2309
- !Array.isArray(d) && b && (d = ObjectUtil.getPathValue(d, b)), l.options[u].data = d, l.options.search[u].data = d, l.options.search[l.options.search.type ?? u] || (l.options.search[l.options.search.type ?? u] = {}), l.options.search[l.options.search.type ?? u].data = d, l.options.formAdd[u].data = d, l.options.formUpdate[u].data = d, n.apiDataMap[l.key] = d;
2309
+ let m = await n.options?.[u]?.dataApi?.(l.update.form, l.update.type);
2310
+ if (m) {
2311
+ const c = n.options?.[u]?.dataPath;
2312
+ !Array.isArray(m) && c && (m = ObjectUtil.getPathValue(m, c)), n.options[u].data = m, n.options.search[u].data = m;
2313
+ const p = n.options.search.type ?? u;
2314
+ n.options.search[p] ??= {}, n.options.search[p].data = m, n.options.formAdd[u].data = m, n.options.formUpdate[u].data = m, f(), l.apiDataMap[n.key] = m;
2310
2315
  }
2311
2316
  } catch {
2312
2317
  }
2313
2318
  })();
2314
- e.push(f);
2315
- }
2319
+ e.push(d);
2320
+ } else Array.isArray(n.options?.[u]?.data) && f();
2316
2321
  };
2317
- return o.option.column.forEach((l) => r(l)), await Promise.all(e), !0;
2322
+ return o.option.column.forEach((n) => r(n)), await Promise.all(e), !0;
2318
2323
  },
2319
2324
  initCurdConfig: () => {
2320
- const t = ObjectUtil.deepMerge(T.config, {});
2325
+ const t = ObjectUtil.deepMerge(B.config, {});
2321
2326
  t.table.emptyText = k.tCurd("noData"), o.option.size = o.option.size || {}, t.table.size = o.option.size.table || t.size.table, t.form.size = o.option.size.form || t.size.form, t.size.search = o.option.size.search || t.size.search;
2322
- const n = ObjectUtil.deepMerge(t, o.option || {});
2323
- Object.keys(n).forEach((e) => {
2324
- o.option[e] = n[e];
2327
+ const l = ObjectUtil.deepMerge(t, o.option || {});
2328
+ Object.keys(l).forEach((e) => {
2329
+ o.option[e] = l[e];
2325
2330
  });
2326
2331
  },
2327
2332
  initColumnOptions: () => {
2328
2333
  const t = a();
2329
- let n = JSONUtil.cp(T.config.columnConfig);
2330
- n.options = ObjectUtil.deepMerge(
2334
+ let l = JSONUtil.cp(B.config.columnConfig);
2335
+ l.options = ObjectUtil.deepMerge(
2331
2336
  {
2332
2337
  switch: {
2333
2338
  activeText: k.tCurd("switchOn"),
2334
2339
  inactiveText: k.tCurd("switchOff")
2335
2340
  }
2336
2341
  },
2337
- n.options
2342
+ l.options
2338
2343
  );
2339
2344
  const e = (r) => {
2340
- const l = le(r);
2341
- for (const f in n) {
2345
+ const n = le(r);
2346
+ for (const f in l) {
2342
2347
  if (f === "table") {
2343
- if (r.table = ObjectUtil.deepMerge(n.table, r.table || {}), r.children) {
2348
+ if (r.table = ObjectUtil.deepMerge(l.table, r.table || {}), r.children) {
2344
2349
  r.children.forEach((d) => e(d));
2345
2350
  return;
2346
2351
  }
2347
- } else f === "type" ? r.type = r.type || n.type : r[f] = ObjectUtil.deepMerge(n[f], r[f] || {});
2348
- r.options = r.options || {}, r.options[l] = r.options[l] || {}, r.options[l].size = o.option.size.form;
2352
+ } else f === "type" ? r.type = r.type || l.type : r[f] = ObjectUtil.deepMerge(l[f], r[f] || {});
2353
+ r.options = r.options || {}, r.options[n] = r.options[n] || {}, r.options[n].size = o.option.size.form;
2349
2354
  }
2350
2355
  ["search", "formAdd", "formUpdate"].forEach((f) => {
2351
- r.options[f] = ObjectUtil.deepMerge(r.options, r.options[f] || {}), f === "search" ? o.option.size.search && (r.options[f][l].size = o.option.size.search) : o.option.size.form && (r.options[f][l].size = o.option.size.form);
2352
- }), r.table = ObjectUtil.deepMerge(r.table, r.options[l].table || {}), l === "switch" && (r.options.switch.tableBeforeChange = async (f, d) => {
2353
- const b = r.options?.switch;
2356
+ r.options[f] = ObjectUtil.deepMerge(r.options, r.options[f] || {}), f === "search" ? o.option.size.search && (r.options[f][n].size = o.option.size.search) : o.option.size.form && (r.options[f][n].size = o.option.size.form);
2357
+ }), r.table = ObjectUtil.deepMerge(r.table, r.options[n].table || {}), n === "switch" && (r.options.switch.tableBeforeChange = async (f, d) => {
2358
+ const m = r.options?.switch;
2354
2359
  try {
2355
- b.tableConfig?.confirm && await s.switchConfirmRef.value?.open({
2360
+ m.tableConfig?.confirm && await s.switchConfirmRef.value?.open({
2356
2361
  title: k.tCurd("confirmModify"),
2357
2362
  content: k.tCurd("confirmSwitchMessage")
2358
2363
  });
2359
2364
  try {
2360
- if (!o.option.api.update && !b.tableConfig?.api) return;
2365
+ if (!o.option.api.update && !m.tableConfig?.api) return;
2361
2366
  const c = d[o.option.table?.rowKey];
2362
- b.loadingMap || (b.loadingMap = {}), b.loadingMap[c] || (b.loadingMap[c] = { loading: !1 }), b.loadingMap[c].loading = !0;
2363
- const p = d[f] === b.activeValue ? b.inactiveValue : b.activeValue, w = b.tableConfig?.api ? b.tableConfig.api : o.option.api.update;
2367
+ m.loadingMap || (m.loadingMap = {}), m.loadingMap[c] || (m.loadingMap[c] = { loading: !1 }), m.loadingMap[c].loading = !0;
2368
+ const p = d[f] === m.activeValue ? m.inactiveValue : m.activeValue, w = m.tableConfig?.api ? m.tableConfig.api : o.option.api.update;
2364
2369
  if (!w) return;
2365
2370
  try {
2366
2371
  await w({ ...d, [f]: p }, "switch");
2367
2372
  } catch {
2368
2373
  return !1;
2369
2374
  } finally {
2370
- b.loadingMap[c].loading = !1;
2375
+ m.loadingMap[c].loading = !1;
2371
2376
  }
2372
- return E.success(k.tCurd("operationSuccess")), b.tableConfig?.loadList && (t.table.loading = !0, t.table.getList(), t.table.loading = !1), !0;
2377
+ return E.success(k.tCurd("operationSuccess")), m.tableConfig?.loadList && (t.table.loading = !0, t.table.getList(), t.table.loading = !1), !0;
2373
2378
  } catch (c) {
2374
2379
  return console.error(c), !1;
2375
2380
  } finally {
@@ -2378,26 +2383,26 @@ const xt = (a, o) => ({
2378
2383
  } catch {
2379
2384
  return !1;
2380
2385
  }
2381
- }), l === "treeSelect" && (r.options.treeSelect.rowKey = o.option.table?.rowKey, r.options.treeSelect.nodeKey = o.option.table?.rowKey);
2386
+ }), n === "treeSelect" && (r.options.treeSelect.rowKey = o.option.table?.rowKey, r.options.treeSelect.nodeKey = o.option.table?.rowKey);
2382
2387
  };
2383
2388
  o.option.column.forEach(e), o.option.table?.column?.forEach(e);
2384
2389
  },
2385
2390
  initColumnForm: () => {
2386
- const t = a(), n = o.option;
2391
+ const t = a(), l = o.option;
2387
2392
  t.update.formColumn = [], t.update.formGrid = [], t.update.formMaxSpan = 12, t.table.column.show = { list: [], listSource: [] };
2388
- const e = o.option.form?.maxSpan || 12, r = o.option.form?.defaultSpan || e / 2, l = nt(o.option.form), u = (c) => {
2393
+ const e = o.option.form?.maxSpan || 12, r = o.option.form?.defaultSpan || e / 2, n = at(o.option.form), u = (c) => {
2389
2394
  if (c.children) {
2390
2395
  t.table.column.show.list.push(c.key), c.children.forEach((p) => u(p));
2391
2396
  return;
2392
2397
  }
2393
2398
  t.update.formDefault[c.key] = c.value, c.table?.table && (c.show?.table && t.table.column.show.list.push(c.key), t.table.column.show.listSource.push(c.key));
2394
2399
  };
2395
- n.column.forEach((c) => {
2400
+ l.column.forEach((c) => {
2396
2401
  ke(c, !0), u(c);
2397
2402
  }), o.option.table?.column?.forEach((c) => {
2398
2403
  ke(c, !1), u(c);
2399
- }), t.search.column.list = n.column.concat(n.table?.column || []), t.table.column.list = t.search.column.list.filter((c) => c.table?.table), t.search.column.list.sort((c, p) => c.sort?.search - p.sort?.search), t.table.column.list.sort((c, p) => c.sort?.table - p.sort?.table), t.update.rules = {}, Re(n.column, t.update.formDefault, t.update.rules, (c) => l(c, () => t.update.form)), n.table?.editMode && Re(n.table?.column || [], t.update.formDefault, t.update.rules, (c) => l(c, () => t.update.form));
2400
- const f = tt(n.column, {
2404
+ }), t.search.column.list = l.column.concat(l.table?.column || []), t.table.column.list = t.search.column.list.filter((c) => c.table?.table), t.search.column.list.sort((c, p) => c.sort?.search - p.sort?.search), t.table.column.list.sort((c, p) => c.sort?.table - p.sort?.table), t.update.rules = {}, Re(l.column, t.update.formDefault, t.update.rules, (c) => n(c, () => t.update.form)), l.table?.editMode && Re(l.table?.column || [], t.update.formDefault, t.update.rules, (c) => n(c, () => t.update.form));
2405
+ const f = et(l.column, {
2401
2406
  maxSpan: e,
2402
2407
  defaultSpan: r,
2403
2408
  layout: o.option.form?.layout
@@ -2406,41 +2411,41 @@ const xt = (a, o) => ({
2406
2411
  const d = o.option.search?.formDefault;
2407
2412
  d && Object.keys(d).forEach((c) => {
2408
2413
  t.search.formDefault[c] = d[c];
2409
- }), n.column.forEach((c) => {
2414
+ }), l.column.forEach((c) => {
2410
2415
  c.show?.search || (t.search.formDefault[c.key] = void 0);
2411
2416
  });
2412
- const b = ObjectUtil.deepMerge(t.search.formDefault, {});
2413
- x.setValue(t.search.form, b, !0);
2417
+ const m = ObjectUtil.deepMerge(t.search.formDefault, {});
2418
+ x.setValue(t.search.form, m, !0);
2414
2419
  }
2415
2420
  }), to = (a) => {
2416
- const o = Y(), s = Y(), t = Y(), n = { switchConfirmRef: o, ruleFormRef: s, tableRef: t }, e = Ge(), r = Fe.getConf("curdConf"), l = (b) => {
2417
- b = b || f;
2418
- let c = b, p = b;
2421
+ const o = Y(), s = Y(), t = Y(), l = { switchConfirmRef: o, ruleFormRef: s, tableRef: t }, e = Ge(), r = Fe.getConf("curdConf"), n = (m) => {
2422
+ m = m || f;
2423
+ let c = m, p = m;
2419
2424
  for (; c?.parentCurdConf; )
2420
2425
  p = c.parentCurdConf, c = c.parentCurdConf;
2421
2426
  return p;
2422
2427
  }, u = () => f;
2423
2428
  let f = ie({
2424
2429
  parentCurdConf: r,
2425
- getCurdConf: l,
2426
- getRootCurdConf: l,
2430
+ getCurdConf: n,
2431
+ getRootCurdConf: n,
2427
2432
  ...qt(),
2428
2433
  option: a.option,
2429
2434
  ...Jt(u, a),
2430
2435
  ...Qt(u, a),
2431
- ...Xt(u, a, n),
2436
+ ...Xt(u, a, l),
2432
2437
  ...Yt(u, a),
2433
2438
  ...xt(u, a),
2434
- ...Ut(u, a, n),
2439
+ ...Dt(u, a, l),
2435
2440
  ..._t(u, a),
2436
- ...eo(u, a, n)
2441
+ ...eo(u, a, l)
2437
2442
  });
2438
2443
  f.init();
2439
2444
  const d = e ? `curdRef-${e.uid}` : "";
2440
2445
  return r?.formRef && d && (r.formRef.set(d, {
2441
- validate: async (b) => {
2446
+ validate: async (m) => {
2442
2447
  const c = await f.update.validate(!1);
2443
- if (b?.(!!c), !c) throw !1;
2448
+ if (m?.(!!c), !c) throw !1;
2444
2449
  return !0;
2445
2450
  }
2446
2451
  }), Ie(() => {
@@ -2453,7 +2458,7 @@ const xt = (a, o) => ({
2453
2458
  }
2454
2459
  f.table.getList();
2455
2460
  }
2456
- }), yt(() => {
2461
+ }), ht(() => {
2457
2462
  f.table.sortable.destroy();
2458
2463
  }), Fe.setConf("curdConf", f), { conf: f, switchConfirmRef: o, ruleFormRef: s, tableRef: t };
2459
2464
  }, oo = { class: "dialog-footer" }, ao = /* @__PURE__ */ Q({
@@ -2462,22 +2467,22 @@ const xt = (a, o) => ({
2462
2467
  size: {}
2463
2468
  },
2464
2469
  setup(a, { expose: o }) {
2465
- const s = Y(!1), t = Y("确认修改"), n = Y("确认要修改状态吗?");
2470
+ const s = Y(!1), t = Y("确认修改"), l = Y("确认要修改状态吗?");
2466
2471
  let e = null, r = null;
2467
- const l = (d) => (d?.title && (t.value = d.title), d?.content && (n.value = d.content), s.value = !0, new Promise((b, c) => {
2468
- e = b, r = c;
2472
+ const n = (d) => (d?.title && (t.value = d.title), d?.content && (l.value = d.content), s.value = !0, new Promise((m, c) => {
2473
+ e = m, r = c;
2469
2474
  })), u = () => {
2470
2475
  s.value = !1, e?.(!0), e = null, r = null;
2471
2476
  }, f = () => {
2472
2477
  s.value = !1, r?.(new Error("用户取消操作")), e = null, r = null;
2473
2478
  };
2474
2479
  return o({
2475
- open: l
2476
- }), (d, b) => {
2480
+ open: n
2481
+ }), (d, m) => {
2477
2482
  const c = pe("el-form");
2478
- return m(), y(i($e), {
2483
+ return b(), y(i($e), {
2479
2484
  modelValue: s.value,
2480
- "onUpdate:modelValue": b[0] || (b[0] = (p) => s.value = p),
2485
+ "onUpdate:modelValue": m[0] || (m[0] = (p) => s.value = p),
2481
2486
  title: t.value,
2482
2487
  "close-on-click-modal": !1,
2483
2488
  width: "400px"
@@ -2485,18 +2490,18 @@ const xt = (a, o) => ({
2485
2490
  footer: h(() => [
2486
2491
  M(c, { size: d.size }, {
2487
2492
  default: h(() => [
2488
- D("span", oo, [
2489
- M(i(K), { onClick: f }, {
2490
- default: h(() => b[1] || (b[1] = [
2493
+ R("span", oo, [
2494
+ M(i(P), { onClick: f }, {
2495
+ default: h(() => m[1] || (m[1] = [
2491
2496
  O("取消")
2492
2497
  ])),
2493
2498
  _: 1
2494
2499
  }),
2495
- M(i(K), {
2500
+ M(i(P), {
2496
2501
  type: "primary",
2497
2502
  onClick: u
2498
2503
  }, {
2499
- default: h(() => b[2] || (b[2] = [
2504
+ default: h(() => m[2] || (m[2] = [
2500
2505
  O("确认")
2501
2506
  ])),
2502
2507
  _: 1
@@ -2507,7 +2512,7 @@ const xt = (a, o) => ({
2507
2512
  }, 8, ["size"])
2508
2513
  ]),
2509
2514
  default: h(() => [
2510
- D("div", null, R(n.value), 1)
2515
+ R("div", null, F(l.value), 1)
2511
2516
  ]),
2512
2517
  _: 1
2513
2518
  }, 8, ["modelValue", "title"]);
@@ -2521,7 +2526,7 @@ const xt = (a, o) => ({
2521
2526
  },
2522
2527
  setup(a) {
2523
2528
  const o = a, s = ae(() => typeof o.content == "function" ? o.content(o.value) : o.content);
2524
- return (t, n) => typeof s.value == "object" ? (m(), y(ee(s.value), { key: 0 })) : (m(), C("div", {
2529
+ return (t, l) => typeof s.value == "object" ? (b(), y(ee(s.value), { key: 0 })) : (b(), C("div", {
2525
2530
  key: 1,
2526
2531
  innerHTML: s.value
2527
2532
  }, null, 8, no));
@@ -2540,93 +2545,93 @@ const xt = (a, o) => ({
2540
2545
  o.item?.key !== void 0 && (o.conf.search.form[o.item.key] = t);
2541
2546
  }
2542
2547
  });
2543
- return (t, n) => i(q).customComponent[t.type ?? ""]?.search ? (m(), y(ee(i(q).customComponent[t.type ?? ""]?.search), S({
2548
+ return (t, l) => i(q).customComponent[t.type ?? ""]?.search ? (b(), y(ee(i(q).customComponent[t.type ?? ""]?.search), S({
2544
2549
  key: 0,
2545
2550
  modelValue: s.value,
2546
- "onUpdate:modelValue": n[0] || (n[0] = (e) => s.value = e)
2547
- }, t.item.options?.search?.[t.type ?? ""], $(t.item.options?.search?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : t.type === "input" ? (m(), y(i(fe), S({
2551
+ "onUpdate:modelValue": l[0] || (l[0] = (e) => s.value = e)
2552
+ }, t.item.options?.search?.[t.type ?? ""], $(t.item.options?.search?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : t.type === "input" ? (b(), y(i(fe), S({
2548
2553
  key: 1,
2549
2554
  modelValue: s.value,
2550
- "onUpdate:modelValue": n[1] || (n[1] = (e) => s.value = e),
2555
+ "onUpdate:modelValue": l[1] || (l[1] = (e) => s.value = e),
2551
2556
  placeholder: t.conf.search.getPlaceholder(t.item),
2552
2557
  clearable: "",
2553
2558
  disabled: t.item.disabled?.search
2554
- }, t.item.options?.search?.input || t.item.options?.input, $(t.item.options?.search?.input?.on || t.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (m(), y(i(ce), S({
2559
+ }, t.item.options?.search?.input || t.item.options?.input, $(t.item.options?.search?.input?.on || t.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "switch" ? (b(), y(i(ce), S({
2555
2560
  key: 2,
2556
2561
  modelValue: s.value,
2557
- "onUpdate:modelValue": n[2] || (n[2] = (e) => s.value = e),
2562
+ "onUpdate:modelValue": l[2] || (l[2] = (e) => s.value = e),
2558
2563
  placeholder: t.conf.search.getPlaceholder(t.item, i(k).tCurd("placeholderSelect")),
2559
2564
  clearable: "",
2560
2565
  disabled: t.item.disabled?.search
2561
2566
  }, t.item.options?.search?.switch || t.item.options?.switch, $(t.item.options?.search?.switch?.on || t.item.options?.switch?.on || {})), {
2562
2567
  default: h(() => [
2563
- (m(), y(i(ne), {
2568
+ (b(), y(i(ne), {
2564
2569
  key: t.item.options?.switch?.activeValue,
2565
2570
  label: t.item.options?.switch?.activeText,
2566
2571
  value: t.item.options?.switch?.activeValue
2567
2572
  }, null, 8, ["label", "value"])),
2568
- (m(), y(i(ne), {
2573
+ (b(), y(i(ne), {
2569
2574
  key: t.item.options?.switch?.inactiveValue,
2570
2575
  label: t.item.options?.switch?.inactiveText,
2571
2576
  value: t.item.options?.switch?.inactiveValue
2572
2577
  }, null, 8, ["label", "value"]))
2573
2578
  ]),
2574
2579
  _: 1
2575
- }, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "select" ? (m(), y(i(ce), S({
2580
+ }, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "select" ? (b(), y(i(ce), S({
2576
2581
  key: 3,
2577
2582
  modelValue: s.value,
2578
- "onUpdate:modelValue": n[3] || (n[3] = (e) => s.value = e),
2583
+ "onUpdate:modelValue": l[3] || (l[3] = (e) => s.value = e),
2579
2584
  placeholder: t.conf.search.getPlaceholder(t.item, i(k).tCurd("placeholderSelect")),
2580
2585
  clearable: "",
2581
2586
  disabled: t.item.disabled?.search
2582
2587
  }, t.item.options?.search?.select || t.item.options?.select, $(t.item.options?.search?.select?.on || t.item.options?.select?.on || {})), {
2583
2588
  default: h(() => [
2584
- (m(!0), C(A, null, G(t.item.options?.search?.select?.data || t.item.options?.select?.data || [], (e) => (m(), y(i(ne), {
2589
+ (b(!0), C(A, null, G(t.item.options?.search?.select?.data || t.item.options?.select?.data || [], (e) => (b(), y(i(ne), {
2585
2590
  key: e.value,
2586
2591
  label: e.label,
2587
2592
  value: e.value
2588
2593
  }, null, 8, ["label", "value"]))), 128))
2589
2594
  ]),
2590
2595
  _: 1
2591
- }, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "radio" ? (m(), y(i(je), S({
2596
+ }, 16, ["modelValue", "placeholder", "disabled"])) : t.type === "radio" ? (b(), y(i(je), S({
2592
2597
  key: 4,
2593
2598
  modelValue: s.value,
2594
- "onUpdate:modelValue": n[4] || (n[4] = (e) => s.value = e),
2599
+ "onUpdate:modelValue": l[4] || (l[4] = (e) => s.value = e),
2595
2600
  disabled: t.item.disabled?.search
2596
2601
  }, t.item.options?.search?.radio || t.item.options?.radio, $(t.item.options?.search?.radio?.on || t.item.options?.radio?.on || {})), {
2597
2602
  default: h(() => [
2598
- (m(!0), C(A, null, G(t.item.options?.radio?.data, (e) => (m(), y(i(Pe), {
2603
+ (b(!0), C(A, null, G(t.item.options?.radio?.data, (e) => (b(), y(i(Pe), {
2599
2604
  key: e.value,
2600
2605
  label: e.label,
2601
2606
  value: e.value
2602
2607
  }, null, 8, ["label", "value"]))), 128))
2603
2608
  ]),
2604
2609
  _: 1
2605
- }, 16, ["modelValue", "disabled"])) : t.type === "datetime" ? (m(), y(i(Ke), S({
2610
+ }, 16, ["modelValue", "disabled"])) : t.type === "datetime" ? (b(), y(i(Ke), S({
2606
2611
  key: 5,
2607
2612
  modelValue: s.value,
2608
- "onUpdate:modelValue": n[5] || (n[5] = (e) => s.value = e),
2613
+ "onUpdate:modelValue": l[5] || (l[5] = (e) => s.value = e),
2609
2614
  disabled: t.item.disabled?.search
2610
- }, t.item.options?.search?.datetime || t.item.options?.datetime, $(t.item.options?.search?.datetime?.on || t.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : t.type && i(q).customComponent[t.type] ? (m(), y(ee(i(q).customComponent[t.type]), S({
2615
+ }, t.item.options?.search?.datetime || t.item.options?.datetime, $(t.item.options?.search?.datetime?.on || t.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : t.type && i(q).customComponent[t.type] ? (b(), y(ee(i(q).customComponent[t.type]), S({
2611
2616
  key: 6,
2612
2617
  modelValue: s.value,
2613
- "onUpdate:modelValue": n[6] || (n[6] = (e) => s.value = e)
2618
+ "onUpdate:modelValue": l[6] || (l[6] = (e) => s.value = e)
2614
2619
  }, t.item.options?.search?.[t.type] || t.item.options?.[t.type], $(t.item.options?.search?.[t.type]?.on || t.item.options?.[t.type]?.on || {}), {
2615
2620
  disabled: t.item.disabled?.search
2616
2621
  }), null, 16, ["modelValue", "disabled"])) : V("", !0);
2617
2622
  }
2618
2623
  }), se = (a, o) => {
2619
2624
  const s = a.__vccOpts || a;
2620
- for (const [t, n] of o)
2621
- s[t] = n;
2625
+ for (const [t, l] of o)
2626
+ s[t] = l;
2622
2627
  return s;
2623
2628
  }, ro = {}, io = {
2624
2629
  xmlns: "http://www.w3.org/2000/svg",
2625
2630
  viewBox: "64 64 896 896"
2626
2631
  };
2627
2632
  function so(a, o) {
2628
- return m(), C("svg", io, o[0] || (o[0] = [
2629
- D("path", {
2633
+ return b(), C("svg", io, o[0] || (o[0] = [
2634
+ R("path", {
2630
2635
  fill: "currentColor",
2631
2636
  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"
2632
2637
  }, null, -1)
@@ -2637,8 +2642,8 @@ const uo = /* @__PURE__ */ se(ro, [["render", so]]), fo = {}, co = {
2637
2642
  viewBox: "64 64 896 896"
2638
2643
  };
2639
2644
  function po(a, o) {
2640
- return m(), C("svg", co, o[0] || (o[0] = [
2641
- D("path", {
2645
+ return b(), C("svg", co, o[0] || (o[0] = [
2646
+ R("path", {
2642
2647
  fill: "currentColor",
2643
2648
  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"
2644
2649
  }, null, -1)
@@ -2649,8 +2654,8 @@ const mo = /* @__PURE__ */ se(fo, [["render", po]]), bo = {}, go = {
2649
2654
  viewBox: "0 0 1024 1024"
2650
2655
  };
2651
2656
  function ho(a, o) {
2652
- return m(), C("svg", go, o[0] || (o[0] = [
2653
- D("path", {
2657
+ return b(), C("svg", go, o[0] || (o[0] = [
2658
+ R("path", {
2654
2659
  fill: "currentColor",
2655
2660
  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"
2656
2661
  }, null, -1)
@@ -2662,21 +2667,21 @@ const yo = /* @__PURE__ */ se(bo, [["render", ho]]), wo = {}, vo = {
2662
2667
  viewBox: "0 0 1024 1024"
2663
2668
  };
2664
2669
  function ko(a, o) {
2665
- return m(), C("svg", vo, o[0] || (o[0] = [
2666
- D("path", {
2670
+ return b(), C("svg", vo, o[0] || (o[0] = [
2671
+ R("path", {
2667
2672
  fill: "currentColor",
2668
2673
  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"
2669
2674
  }, null, -1)
2670
2675
  ]));
2671
2676
  }
2672
- const rt = /* @__PURE__ */ se(wo, [["render", ko]]), Co = {}, Vo = {
2677
+ const lt = /* @__PURE__ */ se(wo, [["render", ko]]), Co = {}, Vo = {
2673
2678
  "data-v-58697b5c": "",
2674
2679
  xmlns: "http://www.w3.org/2000/svg",
2675
2680
  viewBox: "0 0 1024 1024"
2676
2681
  };
2677
2682
  function So(a, o) {
2678
- return m(), C("svg", Vo, o[0] || (o[0] = [
2679
- D("path", {
2683
+ return b(), C("svg", Vo, o[0] || (o[0] = [
2684
+ R("path", {
2680
2685
  fill: "currentColor",
2681
2686
  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"
2682
2687
  }, null, -1)
@@ -2688,8 +2693,8 @@ const Eo = /* @__PURE__ */ se(Co, [["render", So]]), zo = {}, $o = {
2688
2693
  viewBox: "0 0 1024 1024"
2689
2694
  };
2690
2695
  function Mo(a, o) {
2691
- return m(), C("svg", $o, o[0] || (o[0] = [
2692
- D("path", {
2696
+ return b(), C("svg", $o, o[0] || (o[0] = [
2697
+ R("path", {
2693
2698
  fill: "currentColor",
2694
2699
  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"
2695
2700
  }, null, -1)
@@ -2709,208 +2714,208 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
2709
2714
  option: {}
2710
2715
  },
2711
2716
  setup(a) {
2712
- const o = E.isFun, s = a, n = Ge().type, e = (l) => l === !0 ? !0 : (Array.isArray(l) ? l : l ? [l] : []).some((f) => f?.required === !0), r = (l) => s.option.table?.editMode ? e(l.rules) || e(s.conf.update.rules?.[l.key]) : !1;
2713
- return (l, u) => {
2717
+ const o = E.isFun, s = a, l = Ge().type, e = (n) => n === !0 ? !0 : (Array.isArray(n) ? n : n ? [n] : []).some((f) => f?.required === !0), r = (n) => s.option.table?.editMode ? e(n.rules) || e(s.conf.update.rules?.[n.key]) : !1;
2718
+ return (n, u) => {
2714
2719
  const f = pe("el-tooltip");
2715
- return m(!0), C(A, null, G(l.columnList, (d) => (m(), C(A, {
2720
+ return b(!0), C(A, null, G(n.columnList, (d) => (b(), C(A, {
2716
2721
  key: d.key
2717
2722
  }, [
2718
- l.conf.table.column.show.list.includes(d.key) && (d.show?.table === void 0 || i(o)(d.show?.table, l.conf.table.data)) ? (m(), C(A, { key: 0 }, [
2719
- d.table?.header?.groupKey === void 0 || d.table.header.show ? (m(), y(i(ue), S({
2723
+ n.conf.table.column.show.list.includes(d.key) && (d.show?.table === void 0 || i(o)(d.show?.table, n.conf.table.data)) ? (b(), C(A, { key: 0 }, [
2724
+ d.table?.header?.groupKey === void 0 || d.table.header.show ? (b(), y(i(ue), S({
2720
2725
  key: 0,
2721
2726
  prop: d.key,
2722
2727
  label: d.label,
2723
2728
  ref_for: !0
2724
2729
  }, d.table), {
2725
2730
  header: h(() => [
2726
- z(l.$slots, "table-header-" + d.key, { item: d }, () => [
2727
- D("div", Fo, [
2728
- d.table?.header?.tooltip ? (m(), y(f, {
2731
+ z(n.$slots, "table-header-" + d.key, { item: d }, () => [
2732
+ R("div", Fo, [
2733
+ d.table?.header?.tooltip ? (b(), y(f, {
2729
2734
  key: 0,
2730
2735
  effect: "dark",
2731
2736
  placement: "top"
2732
2737
  }, {
2733
2738
  content: h(() => [
2734
- D("div", {
2739
+ R("div", {
2735
2740
  innerHTML: d.table?.header?.tooltip
2736
2741
  }, null, 8, Do)
2737
2742
  ]),
2738
2743
  default: h(() => [
2739
- D("span", Ro, [
2740
- M(rt)
2744
+ R("span", Ro, [
2745
+ M(lt)
2741
2746
  ])
2742
2747
  ]),
2743
2748
  _: 2
2744
2749
  }, 1024)) : V("", !0),
2745
- r(d) ? (m(), C("span", Uo, "*")) : V("", !0),
2746
- O(" " + R(d.label) + " ", 1),
2747
- d.table?.header?.group !== void 0 ? (m(), C("span", {
2750
+ r(d) ? (b(), C("span", Uo, "*")) : V("", !0),
2751
+ O(" " + F(d.label) + " ", 1),
2752
+ d.table?.header?.group !== void 0 ? (b(), C("span", {
2748
2753
  key: 2,
2749
2754
  class: "table-header-plus",
2750
- onClick: wt(
2755
+ onClick: yt(
2751
2756
  () => {
2752
- d.table.header.group = !d.table.header.group, l.columnList.forEach((b) => {
2753
- b.table?.header?.groupKey === d.key && (b.table.header.show = !d.table.header.group);
2757
+ d.table.header.group = !d.table.header.group, n.columnList.forEach((m) => {
2758
+ m.table?.header?.groupKey === d.key && (m.table.header.show = !d.table.header.group);
2754
2759
  });
2755
2760
  },
2756
2761
  ["stop"]
2757
2762
  )
2758
2763
  }, [
2759
- d.table.header.group ? (m(), y(Eo, { key: 0 })) : (m(), y(Oo, { key: 1 }))
2764
+ d.table.header.group ? (b(), y(Eo, { key: 0 })) : (b(), y(Oo, { key: 1 }))
2760
2765
  ], 8, Ao)) : V("", !0)
2761
2766
  ])
2762
2767
  ])
2763
2768
  ]),
2764
- default: h(({ row: b }) => [
2765
- d.children ? (m(), C(A, { key: 0 }, [
2769
+ default: h(({ row: m }) => [
2770
+ d.children ? (b(), C(A, { key: 0 }, [
2766
2771
  u[0] || (u[0] = O("   ")),
2767
- (m(), y(ee(i(n)), {
2768
- conf: l.conf,
2772
+ (b(), y(ee(i(l)), {
2773
+ conf: n.conf,
2769
2774
  columnList: d.children,
2770
- option: l.option
2775
+ option: n.option
2771
2776
  }, Z({ _: 2 }, [
2772
- G(l.$slots, (c, p) => ({
2777
+ G(n.$slots, (c, p) => ({
2773
2778
  name: p,
2774
2779
  fn: h((w) => [
2775
- z(l.$slots, p, S({ ref_for: !0 }, w || {}))
2780
+ z(n.$slots, p, S({ ref_for: !0 }, w || {}))
2776
2781
  ])
2777
2782
  }))
2778
2783
  ]), 1032, ["conf", "columnList", "option"]))
2779
- ], 64)) : (m(), C(A, { key: 1 }, [
2780
- l.option.table?.editMode ? (m(), C("div", Bo, [
2784
+ ], 64)) : (b(), C(A, { key: 1 }, [
2785
+ n.option.table?.editMode ? (b(), C("div", Bo, [
2781
2786
  M(i(he), {
2782
- size: l.option.size?.table,
2783
- error: l.conf.tableEditValidate.getFieldError(b, d),
2787
+ size: n.option.size?.table,
2788
+ error: n.conf.tableEditValidate.getFieldError(m, d),
2784
2789
  class: "table-edit-form-item"
2785
2790
  }, {
2786
2791
  default: h(() => [
2787
- D("div", {
2792
+ R("div", {
2788
2793
  class: J(["row", ["table-edit-" + d.key]]),
2789
2794
  style: { width: "100%" }
2790
2795
  }, [
2791
- z(l.$slots, "table-edit-left-" + d.key, {
2792
- row: b,
2796
+ z(n.$slots, "table-edit-left-" + d.key, {
2797
+ row: m,
2793
2798
  item: d
2794
2799
  }),
2795
- d.type === "input" ? (m(), y(i(fe), S({
2800
+ d.type === "input" ? (b(), y(i(fe), S({
2796
2801
  key: 0,
2797
- modelValue: b[d.key],
2798
- "onUpdate:modelValue": (c) => b[d.key] = c,
2799
- disabled: l.conf.update.getDisabled(d, !0),
2802
+ modelValue: m[d.key],
2803
+ "onUpdate:modelValue": (c) => m[d.key] = c,
2804
+ disabled: n.conf.update.getDisabled(d, !0),
2800
2805
  class: "col",
2801
2806
  ref_for: !0
2802
- }, l.conf.update.getBind(d), $(l.conf.update.getOn(d, b)), {
2803
- "onUpdate:modelValue": (c) => l.conf.tableEditValidate.clearField(b, d)
2807
+ }, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
2808
+ "onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(m, d)
2804
2809
  }), Z({ _: 2 }, [
2805
2810
  d.options?.input?.prepend ? {
2806
2811
  name: "prepend",
2807
2812
  fn: h(() => [
2808
- O(R(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(b) : d.options?.input?.prepend), 1)
2813
+ O(F(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(m) : d.options?.input?.prepend), 1)
2809
2814
  ]),
2810
2815
  key: "0"
2811
2816
  } : void 0
2812
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (m(), y(i(ce), S({
2817
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (b(), y(i(ce), S({
2813
2818
  key: 1,
2814
- modelValue: b[d.key],
2815
- "onUpdate:modelValue": (c) => b[d.key] = c,
2816
- disabled: l.conf.update.getDisabled(d, !0),
2819
+ modelValue: m[d.key],
2820
+ "onUpdate:modelValue": (c) => m[d.key] = c,
2821
+ disabled: n.conf.update.getDisabled(d, !0),
2817
2822
  class: "col",
2818
2823
  ref_for: !0
2819
- }, l.conf.update.getBind(d), $(l.conf.update.getOn(d, b)), {
2820
- "onUpdate:modelValue": (c) => l.conf.tableEditValidate.clearField(b, d)
2824
+ }, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
2825
+ "onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(m, d)
2821
2826
  }), {
2822
2827
  default: h(() => [
2823
- (m(!0), C(A, null, G(d.options?.search?.select?.data || d.options?.select?.data, (c) => (m(), y(i(ne), {
2828
+ (b(!0), C(A, null, G(d.options?.search?.select?.data || d.options?.select?.data, (c) => (b(), y(i(ne), {
2824
2829
  key: c.value,
2825
2830
  label: c.label,
2826
2831
  value: c.value
2827
2832
  }, null, 8, ["label", "value"]))), 128))
2828
2833
  ]),
2829
2834
  _: 2
2830
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (m(), y(i(ge), S({
2835
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (b(), y(i(ge), S({
2831
2836
  key: 2,
2832
- modelValue: b[d.key],
2833
- "onUpdate:modelValue": (c) => b[d.key] = c,
2834
- disabled: l.conf.update.getDisabled(d, !0),
2837
+ modelValue: m[d.key],
2838
+ "onUpdate:modelValue": (c) => m[d.key] = c,
2839
+ disabled: n.conf.update.getDisabled(d, !0),
2835
2840
  class: "col",
2836
2841
  ref_for: !0
2837
- }, l.conf.update.getBind(d), $(l.conf.update.getOn(d, b)), {
2838
- "onUpdate:modelValue": (c) => l.conf.tableEditValidate.clearField(b, d)
2842
+ }, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
2843
+ "onUpdate:modelValue": (c) => n.conf.tableEditValidate.clearField(m, d)
2839
2844
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : V("", !0),
2840
- z(l.$slots, "table-edit-right-" + d.key, {
2841
- row: b,
2845
+ z(n.$slots, "table-edit-right-" + d.key, {
2846
+ row: m,
2842
2847
  item: d
2843
2848
  })
2844
2849
  ], 2)
2845
2850
  ]),
2846
2851
  _: 2
2847
2852
  }, 1032, ["size", "error"])
2848
- ])) : (m(), C(A, { key: 1 }, [
2849
- l.conf.update.type === i(E).EDialog.Update && i(o)(d.show?.form, l.conf.update.form, i(E).EDialog.Update) && l.option.table?.inlineEdit && l.conf.update.form[l.option.table?.rowKey] === b[l.option.table?.rowKey] && (d.type === "input" || d.type === "select") ? (m(), C(A, { key: 0 }, [
2850
- d.type === "input" ? (m(), y(i(fe), S({
2853
+ ])) : (b(), C(A, { key: 1 }, [
2854
+ n.conf.update.type === i(E).EDialog.Update && i(o)(d.show?.form, n.conf.update.form, i(E).EDialog.Update) && n.option.table?.inlineEdit && n.conf.update.form[n.option.table?.rowKey] === m[n.option.table?.rowKey] && (d.type === "input" || d.type === "select") ? (b(), C(A, { key: 0 }, [
2855
+ d.type === "input" ? (b(), y(i(fe), S({
2851
2856
  key: 0,
2852
- modelValue: l.conf.update.form[d.key],
2853
- "onUpdate:modelValue": (c) => l.conf.update.form[d.key] = c,
2854
- disabled: l.conf.update.getDisabled(d, !0),
2857
+ modelValue: n.conf.update.form[d.key],
2858
+ "onUpdate:modelValue": (c) => n.conf.update.form[d.key] = c,
2859
+ disabled: n.conf.update.getDisabled(d, !0),
2855
2860
  ref_for: !0
2856
- }, l.conf.update.getBind(d), $(l.conf.update.getOn(d, b)), { style: { width: "100%" } }), Z({ _: 2 }, [
2861
+ }, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), { style: { width: "100%" } }), Z({ _: 2 }, [
2857
2862
  d.options?.input?.prepend ? {
2858
2863
  name: "prepend",
2859
2864
  fn: h(() => [
2860
- O(R(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(b) : d.options?.input?.prepend), 1)
2865
+ O(F(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(m) : d.options?.input?.prepend), 1)
2861
2866
  ]),
2862
2867
  key: "0"
2863
2868
  } : void 0
2864
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (m(), y(i(ce), S({
2869
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (b(), y(i(ce), S({
2865
2870
  key: 1,
2866
- modelValue: l.conf.update.form[d.key],
2867
- "onUpdate:modelValue": (c) => l.conf.update.form[d.key] = c,
2868
- disabled: l.conf.update.getDisabled(d, !0),
2871
+ modelValue: n.conf.update.form[d.key],
2872
+ "onUpdate:modelValue": (c) => n.conf.update.form[d.key] = c,
2873
+ disabled: n.conf.update.getDisabled(d, !0),
2869
2874
  ref_for: !0
2870
- }, l.conf.update.getBind(d), $(l.conf.update.getOn(d, b)), { style: { width: "100%" } }), {
2875
+ }, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), { style: { width: "100%" } }), {
2871
2876
  default: h(() => [
2872
- (m(!0), C(A, null, G(d.options?.search?.select?.data || d.options?.select?.data, (c) => (m(), y(i(ne), {
2877
+ (b(!0), C(A, null, G(d.options?.search?.select?.data || d.options?.select?.data, (c) => (b(), y(i(ne), {
2873
2878
  key: c.value,
2874
2879
  label: c.label,
2875
2880
  value: c.value
2876
2881
  }, null, 8, ["label", "value"]))), 128))
2877
2882
  ]),
2878
2883
  _: 2
2879
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (m(), y(i(ge), S({
2884
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (b(), y(i(ge), S({
2880
2885
  key: 2,
2881
- modelValue: l.conf.update.form[d.key],
2882
- "onUpdate:modelValue": (c) => l.conf.update.form[d.key] = c,
2886
+ modelValue: n.conf.update.form[d.key],
2887
+ "onUpdate:modelValue": (c) => n.conf.update.form[d.key] = c,
2883
2888
  ref_for: !0
2884
- }, l.conf.update.getBind(d), $(l.conf.update.getOn(d, b)), {
2885
- disabled: l.conf.update.getDisabled(d, !0)
2889
+ }, n.conf.update.getBind(d), $(n.conf.update.getOn(d, m)), {
2890
+ disabled: n.conf.update.getDisabled(d, !0)
2886
2891
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : V("", !0)
2887
- ], 64)) : z(l.$slots, "table-" + d.key, {
2892
+ ], 64)) : z(n.$slots, "table-" + d.key, {
2888
2893
  key: 1,
2889
- row: b,
2894
+ row: m,
2890
2895
  item: d
2891
2896
  }, () => [
2892
- i(q).customComponent[d.type ?? ""]?.table ? (m(), y(ee(i(q).customComponent[d.type ?? ""]?.table), S({
2897
+ i(q).customComponent[d.type ?? ""]?.table ? (b(), y(ee(i(q).customComponent[d.type ?? ""]?.table), S({
2893
2898
  key: 0,
2894
- modelValue: b[d.key],
2895
- "onUpdate:modelValue": (c) => b[d.key] = c,
2899
+ modelValue: m[d.key],
2900
+ "onUpdate:modelValue": (c) => m[d.key] = c,
2896
2901
  ref_for: !0
2897
- }, d.options?.[d.type ?? ""], $(d.options?.[d.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : d.type === "switch" ? (m(), C(A, { key: 1 }, [
2898
- d.options?.switch?.tableConfig?.change ? (m(), y(i(ge), S({
2902
+ }, d.options?.[d.type ?? ""], $(d.options?.[d.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : d.type === "switch" ? (b(), C(A, { key: 1 }, [
2903
+ d.options?.switch?.tableConfig?.change ? (b(), y(i(ge), S({
2899
2904
  key: 0,
2900
- modelValue: b[d.key],
2901
- "onUpdate:modelValue": (c) => b[d.key] = c,
2902
- loading: d.options?.switch?.loadingMap?.[b[l.option.table?.rowKey]]?.loading,
2903
- "before-change": () => d.options?.switch?.tableBeforeChange?.(d.key, b),
2905
+ modelValue: m[d.key],
2906
+ "onUpdate:modelValue": (c) => m[d.key] = c,
2907
+ loading: d.options?.switch?.loadingMap?.[m[n.option.table?.rowKey]]?.loading,
2908
+ "before-change": () => d.options?.switch?.tableBeforeChange?.(d.key, m),
2904
2909
  ref_for: !0
2905
- }, d.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (m(), C("span", Lo, R(b[d.key] === d.options?.switch?.activeValue ? d.options?.switch?.activeText : d.options?.switch?.inactiveText), 1))
2906
- ], 64)) : (m(), C("span", {
2910
+ }, d.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (b(), C("span", Lo, F(m[d.key] === d.options?.switch?.activeValue ? d.options?.switch?.activeText : d.options?.switch?.inactiveText), 1))
2911
+ ], 64)) : (b(), C("span", {
2907
2912
  key: 2,
2908
2913
  style: ye({
2909
2914
  "--table-text-click-color": d.table?.click?.color
2910
2915
  }),
2911
2916
  class: J({ "table-text-click": d.table?.click?.callback }),
2912
- onClick: (c) => d.table?.click?.callback?.(b),
2913
- innerHTML: d.table?.format ? d.table?.format(b) : b[d.key]
2917
+ onClick: (c) => d.table?.click?.callback?.(m),
2918
+ innerHTML: d.table?.format ? d.table?.format(m) : m[d.key]
2914
2919
  }, null, 14, To))
2915
2920
  ])
2916
2921
  ], 64))
@@ -2957,23 +2962,23 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
2957
2962
  }
2958
2963
  },
2959
2964
  setup(a, { expose: o }) {
2960
- const s = E.EDialog, t = a, n = E.isFun, { conf: e, switchConfirmRef: r, ruleFormRef: l, tableRef: u } = to(t);
2965
+ const s = E.EDialog, t = a, l = E.isFun, { conf: e, switchConfirmRef: r, ruleFormRef: n, tableRef: u } = to(t);
2961
2966
  return o({
2962
2967
  conf: e
2963
2968
  }), (f, d) => {
2964
- const b = pe("el-tooltip"), c = vt("loading");
2965
- return m(), C("div", {
2969
+ const m = pe("el-tooltip"), c = wt("loading");
2970
+ return b(), C("div", {
2966
2971
  class: J(["relative cc1-form-box", [a.option.table?.fitHeight ? "col" : "no-min-height"]])
2967
2972
  }, [
2968
- D("div", {
2973
+ R("div", {
2969
2974
  class: J(["row", [a.option.table?.fitHeight ? "absolute fit" : ""]]),
2970
2975
  style: { overflow: "hidden" }
2971
2976
  }, [
2972
2977
  z(f.$slots, "box-left"),
2973
- D("div", {
2978
+ R("div", {
2974
2979
  class: J(["column fit-width no-wrap", [a.option.table?.fitHeight ? "col" : ""]])
2975
2980
  }, [
2976
- a.option.search?.show !== !1 ? (m(), C("div", Po, [
2981
+ a.option.search?.show !== !1 ? (b(), C("div", Po, [
2977
2982
  M(i(oe), {
2978
2983
  model: i(e).search.form,
2979
2984
  inline: "",
@@ -2983,13 +2988,13 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
2983
2988
  z(f.$slots, "search-start", {
2984
2989
  row: i(e).search.form
2985
2990
  }),
2986
- (m(!0), C(A, null, G(i(e).search.column.list, (p) => (m(), C(A, {
2991
+ (b(!0), C(A, null, G(i(e).search.column.list, (p) => (b(), C(A, {
2987
2992
  key: p.key
2988
2993
  }, [
2989
2994
  z(f.$slots, "search-" + p.key + "-start", {
2990
2995
  row: i(e).search.form
2991
2996
  }),
2992
- (typeof p.show?.search == "function" ? p.show?.search(i(e).search.form) : p.show?.search) ? (m(), y(i(he), {
2997
+ (typeof p.show?.search == "function" ? p.show?.search(i(e).search.form) : p.show?.search) ? (b(), y(i(he), {
2993
2998
  key: 0,
2994
2999
  label: p.text?.search?.label ?? p.label
2995
3000
  }, {
@@ -3000,12 +3005,12 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3000
3005
  z(f.$slots, "search-" + p.key, {
3001
3006
  row: i(e).search.form
3002
3007
  }, () => [
3003
- p.options?.search?.type ? (m(), y(Te, {
3008
+ p.options?.search?.type ? (b(), y(Te, {
3004
3009
  key: 0,
3005
3010
  item: p,
3006
3011
  conf: i(e),
3007
3012
  type: p.options.search.type
3008
- }, null, 8, ["item", "conf", "type"])) : (m(), y(Te, {
3013
+ }, null, 8, ["item", "conf", "type"])) : (b(), y(Te, {
3009
3014
  key: 1,
3010
3015
  item: p,
3011
3016
  conf: i(e),
@@ -3025,24 +3030,24 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3025
3030
  z(f.$slots, "search-center", {
3026
3031
  row: i(e).search.form
3027
3032
  }),
3028
- a.option.tools?.search || a.option.tools?.reset ? (m(), y(i(he), { key: 0 }, {
3033
+ a.option.tools?.search || a.option.tools?.reset ? (b(), y(i(he), { key: 0 }, {
3029
3034
  default: h(() => [
3030
- a.option.tools?.search ? (m(), y(i(K), {
3035
+ a.option.tools?.search ? (b(), y(i(P), {
3031
3036
  key: 0,
3032
3037
  type: "primary",
3033
3038
  onClick: i(e).search.submit
3034
3039
  }, {
3035
3040
  default: h(() => [
3036
- O(R(i(k).tCurd("search")), 1)
3041
+ O(F(i(k).tCurd("search")), 1)
3037
3042
  ]),
3038
3043
  _: 1
3039
3044
  }, 8, ["onClick"])) : V("", !0),
3040
- a.option.tools?.reset ? (m(), y(i(K), {
3045
+ a.option.tools?.reset ? (b(), y(i(P), {
3041
3046
  key: 1,
3042
3047
  onClick: i(e).search.reset
3043
3048
  }, {
3044
3049
  default: h(() => [
3045
- O(R(i(k).tCurd("reset")), 1)
3050
+ O(F(i(k).tCurd("reset")), 1)
3046
3051
  ]),
3047
3052
  _: 1
3048
3053
  }, 8, ["onClick"])) : V("", !0)
@@ -3056,46 +3061,46 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3056
3061
  _: 3
3057
3062
  }, 8, ["model", "size"])
3058
3063
  ])) : V("", !0),
3059
- D("div", Ko, [
3060
- D("div", Ho, [
3061
- i(n)(a.option.tools?.add) ? (m(), C("div", No, [
3062
- M(i(K), {
3064
+ R("div", Ko, [
3065
+ R("div", Ho, [
3066
+ i(l)(a.option.tools?.add) ? (b(), C("div", No, [
3067
+ M(i(P), {
3063
3068
  type: "primary",
3064
3069
  onClick: d[0] || (d[0] = (p) => i(e).update.open(i(s).Add)),
3065
3070
  size: a.option.size?.search
3066
3071
  }, {
3067
3072
  default: h(() => [
3068
- O(R(i(k).tCurd("add")), 1)
3073
+ O(F(i(k).tCurd("add")), 1)
3069
3074
  ]),
3070
3075
  _: 1
3071
3076
  }, 8, ["size"])
3072
3077
  ])) : V("", !0),
3073
- i(n)(a.option.tools?.delete) ? (m(), C("div", Io, [
3074
- M(i(K), {
3078
+ i(l)(a.option.tools?.delete) ? (b(), C("div", Io, [
3079
+ M(i(P), {
3075
3080
  type: "danger",
3076
3081
  onClick: d[1] || (d[1] = (p) => i(e).remove.open(i(e).table.selection.list)),
3077
3082
  size: a.option.size?.search
3078
3083
  }, {
3079
3084
  default: h(() => [
3080
- O(R(i(k).tCurd("delete")), 1)
3085
+ O(F(i(k).tCurd("delete")), 1)
3081
3086
  ]),
3082
3087
  _: 1
3083
3088
  }, 8, ["size"])
3084
3089
  ])) : V("", !0),
3085
- a.option.tools?.expand ? (m(), C("div", Go, [
3086
- M(i(K), {
3090
+ a.option.tools?.expand ? (b(), C("div", Go, [
3091
+ M(i(P), {
3087
3092
  type: "warning",
3088
3093
  onClick: d[2] || (d[2] = (p) => i(e).table.expand.all()),
3089
3094
  size: a.option.size?.search
3090
3095
  }, {
3091
3096
  default: h(() => [
3092
- O(R(i(k).tCurd("expandCollapse")), 1)
3097
+ O(F(i(k).tCurd("expandCollapse")), 1)
3093
3098
  ]),
3094
3099
  _: 1
3095
3100
  }, 8, ["size"])
3096
3101
  ])) : V("", !0),
3097
- a.option.tools?.export?.show ? (m(), C(A, { key: 3 }, [
3098
- a.option.tools?.export?.dropdown?.show ? (m(), y(i(Ue), {
3102
+ a.option.tools?.export?.show ? (b(), C(A, { key: 3 }, [
3103
+ a.option.tools?.export?.dropdown?.show ? (b(), y(i(Ue), {
3099
3104
  key: 0,
3100
3105
  onCommand: i(e).export.click
3101
3106
  }, {
@@ -3104,30 +3109,30 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3104
3109
  size: a.option.size?.search
3105
3110
  }, {
3106
3111
  default: h(() => [
3107
- a.option.tools?.export?.dropdown?.select && (a.option.table?.selectable || i(n)(a.option.tools?.delete)) ? (m(), y(i(de), {
3112
+ a.option.tools?.export?.dropdown?.select && (a.option.table?.selectable || i(l)(a.option.tools?.delete)) ? (b(), y(i(de), {
3108
3113
  key: 0,
3109
3114
  command: "select"
3110
3115
  }, {
3111
3116
  default: h(() => [
3112
- O(R(i(k).tCurd("exportSelect")), 1)
3117
+ O(F(i(k).tCurd("exportSelect")), 1)
3113
3118
  ]),
3114
3119
  _: 1
3115
3120
  })) : V("", !0),
3116
- a.option.tools?.export?.dropdown?.page ? (m(), y(i(de), {
3121
+ a.option.tools?.export?.dropdown?.page ? (b(), y(i(de), {
3117
3122
  key: 1,
3118
3123
  command: "page"
3119
3124
  }, {
3120
3125
  default: h(() => [
3121
- O(R(i(k).tCurd("exportPage")), 1)
3126
+ O(F(i(k).tCurd("exportPage")), 1)
3122
3127
  ]),
3123
3128
  _: 1
3124
3129
  })) : V("", !0),
3125
- a.option.tools?.export?.dropdown?.all ? (m(), y(i(de), {
3130
+ a.option.tools?.export?.dropdown?.all ? (b(), y(i(de), {
3126
3131
  key: 2,
3127
3132
  command: "all"
3128
3133
  }, {
3129
3134
  default: h(() => [
3130
- O(R(i(k).tCurd("exportAll")), 1)
3135
+ O(F(i(k).tCurd("exportAll")), 1)
3131
3136
  ]),
3132
3137
  _: 1
3133
3138
  })) : V("", !0)
@@ -3136,29 +3141,29 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3136
3141
  }, 8, ["size"])
3137
3142
  ]),
3138
3143
  default: h(() => [
3139
- D("div", Wo, [
3140
- M(i(K), {
3144
+ R("div", Wo, [
3145
+ M(i(P), {
3141
3146
  type: "warning",
3142
3147
  loading: i(e).export.loading,
3143
3148
  size: a.option.size?.search
3144
3149
  }, {
3145
3150
  default: h(() => [
3146
- O(R(i(k).tCurd("export")), 1)
3151
+ O(F(i(k).tCurd("export")), 1)
3147
3152
  ]),
3148
3153
  _: 1
3149
3154
  }, 8, ["loading", "size"])
3150
3155
  ])
3151
3156
  ]),
3152
3157
  _: 1
3153
- }, 8, ["onCommand"])) : (m(), C("div", qo, [
3154
- M(i(K), {
3158
+ }, 8, ["onCommand"])) : (b(), C("div", qo, [
3159
+ M(i(P), {
3155
3160
  type: "warning",
3156
3161
  loading: i(e).export.loading,
3157
3162
  size: a.option.size?.search,
3158
3163
  onClick: d[3] || (d[3] = (p) => i(e).export.run.start("all"))
3159
3164
  }, {
3160
3165
  default: h(() => [
3161
- O(R(i(k).tCurd("export")), 1)
3166
+ O(F(i(k).tCurd("export")), 1)
3162
3167
  ]),
3163
3168
  _: 1
3164
3169
  }, 8, ["loading", "size"])
@@ -3166,9 +3171,9 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3166
3171
  ], 64)) : V("", !0),
3167
3172
  z(f.$slots, "tools-left")
3168
3173
  ]),
3169
- D("div", Jo, [
3174
+ R("div", Jo, [
3170
3175
  z(f.$slots, "tools-right"),
3171
- i(e).page.showTools && i(e).table.sortable.showPagination() ? (m(), y(i(Be), S({
3176
+ i(e).page.showTools && i(e).table.sortable.showPagination() ? (b(), y(i(Be), S({
3172
3177
  key: 0,
3173
3178
  "current-page": i(e).page.num,
3174
3179
  "onUpdate:currentPage": d[4] || (d[4] = (p) => i(e).page.num = p),
@@ -3183,7 +3188,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3183
3188
  onSizeChange: i(e).table.sortable.refreshList,
3184
3189
  onCurrentChange: i(e).table.sortable.refreshList
3185
3190
  }, a.option.page?.pagination || {}, $(a.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : V("", !0),
3186
- i(e).table.sortable.showTriggerButton() ? (m(), y(i(K), {
3191
+ i(e).table.sortable.showTriggerButton() ? (b(), y(i(P), {
3187
3192
  key: 1,
3188
3193
  type: "warning",
3189
3194
  onClick: i(e).table.sortable.start,
@@ -3191,11 +3196,11 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3191
3196
  loading: i(e).table.sortable.actionLoading
3192
3197
  }, {
3193
3198
  default: h(() => [
3194
- O(R(i(k).tCurd("sortableStart")), 1)
3199
+ O(F(i(k).tCurd("sortableStart")), 1)
3195
3200
  ]),
3196
3201
  _: 1
3197
3202
  }, 8, ["onClick", "size", "loading"])) : V("", !0),
3198
- i(e).table.sortable.showActionButton() ? (m(), y(i(Ue), {
3203
+ i(e).table.sortable.showActionButton() ? (b(), y(i(Ue), {
3199
3204
  key: 2,
3200
3205
  onCommand: i(e).table.sortable.command
3201
3206
  }, {
@@ -3206,13 +3211,13 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3206
3211
  default: h(() => [
3207
3212
  M(i(de), { command: "save" }, {
3208
3213
  default: h(() => [
3209
- O(R(i(k).tCurd("sortableSave")), 1)
3214
+ O(F(i(k).tCurd("sortableSave")), 1)
3210
3215
  ]),
3211
3216
  _: 1
3212
3217
  }),
3213
3218
  M(i(de), { command: "exit" }, {
3214
3219
  default: h(() => [
3215
- O(R(i(k).tCurd("sortableExit")), 1)
3220
+ O(F(i(k).tCurd("sortableExit")), 1)
3216
3221
  ]),
3217
3222
  _: 1
3218
3223
  })
@@ -3221,20 +3226,20 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3221
3226
  }, 8, ["size"])
3222
3227
  ]),
3223
3228
  default: h(() => [
3224
- M(i(K), {
3229
+ M(i(P), {
3225
3230
  type: "warning",
3226
3231
  size: a.option.size?.search,
3227
3232
  loading: i(e).table.sortable.actionLoading
3228
3233
  }, {
3229
3234
  default: h(() => [
3230
- O(R(i(k).tCurd("sortableAction")), 1)
3235
+ O(F(i(k).tCurd("sortableAction")), 1)
3231
3236
  ]),
3232
3237
  _: 1
3233
3238
  }, 8, ["size", "loading"])
3234
3239
  ]),
3235
3240
  _: 1
3236
3241
  }, 8, ["onCommand"])) : V("", !0),
3237
- i(e).table.sortable.showSaveButton() ? (m(), y(i(K), {
3242
+ i(e).table.sortable.showSaveButton() ? (b(), y(i(P), {
3238
3243
  key: 3,
3239
3244
  type: "warning",
3240
3245
  onClick: i(e).table.sortable.save,
@@ -3242,28 +3247,28 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3242
3247
  loading: i(e).table.sortable.actionLoading
3243
3248
  }, {
3244
3249
  default: h(() => [
3245
- O(R(i(k).tCurd("sortableSave")), 1)
3250
+ O(F(i(k).tCurd("sortableSave")), 1)
3246
3251
  ]),
3247
3252
  _: 1
3248
3253
  }, 8, ["onClick", "size", "loading"])) : V("", !0),
3249
- a.option.tools?.expandColumn === void 0 || a.option.tools?.expandColumn ? (m(), y(b, {
3254
+ a.option.tools?.expandColumn === void 0 || a.option.tools?.expandColumn ? (b(), y(m, {
3250
3255
  key: 4,
3251
3256
  effect: "dark",
3252
3257
  content: i(e).table.header.group.expand ? i(k).tCurd("mergeColumn") : i(k).tCurd("expandColumn"),
3253
3258
  placement: "top"
3254
3259
  }, {
3255
3260
  default: h(() => [
3256
- D("div", {
3261
+ R("div", {
3257
3262
  class: J(["refresh-btn", [a.option.size?.search]]),
3258
3263
  onClick: d[6] || (d[6] = //@ts-ignore
3259
3264
  (...p) => i(e).table.header.group.toggleExpandAll && i(e).table.header.group.toggleExpandAll(...p))
3260
3265
  }, [
3261
- i(e).table.header.group.expand ? (m(), y(uo, { key: 0 })) : (m(), y(mo, { key: 1 }))
3266
+ i(e).table.header.group.expand ? (b(), y(uo, { key: 0 })) : (b(), y(mo, { key: 1 }))
3262
3267
  ], 2)
3263
3268
  ]),
3264
3269
  _: 1
3265
3270
  }, 8, ["content"])) : V("", !0),
3266
- a.option.tools?.refresh === void 0 || a.option.tools?.refresh ? (m(), C("div", {
3271
+ a.option.tools?.refresh === void 0 || a.option.tools?.refresh ? (b(), C("div", {
3267
3272
  key: 5,
3268
3273
  class: J(["refresh-btn", [a.option.size?.search]]),
3269
3274
  onClick: d[7] || (d[7] = //@ts-ignore
@@ -3273,13 +3278,13 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3273
3278
  ], 2)) : V("", !0)
3274
3279
  ])
3275
3280
  ]),
3276
- D("div", {
3281
+ R("div", {
3277
3282
  class: J(["fit-width relative form-box", [a.option.table?.fitHeight ? "col " : "", a.option.table?.editMode ? "edit-mode" : ""]])
3278
3283
  }, [
3279
- D("div", {
3284
+ R("div", {
3280
3285
  class: J(["column form-box-content", [a.option.table?.fitHeight ? "absolute fit" : ""]])
3281
3286
  }, [
3282
- kt((m(), y(i(ht), S({
3287
+ vt((b(), y(i(gt), S({
3283
3288
  ref_key: "tableRef",
3284
3289
  ref: u,
3285
3290
  data: i(e).table.data,
@@ -3291,7 +3296,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3291
3296
  onExpandChange: i(e).table.expand.change
3292
3297
  }, i(e).table.sortable.getTableBindOption(), $(a.option.table?.on || {})), {
3293
3298
  default: h(() => [
3294
- (typeof a.option.table?.selectable == "object" ? a.option.table?.selectable?.show : a.option.table?.selectable) || i(n)(a.option.tools?.delete) || a.option.tools?.export?.show && a.option.tools?.export?.select ? (m(), y(i(ue), S({
3299
+ (typeof a.option.table?.selectable == "object" ? a.option.table?.selectable?.show : a.option.table?.selectable) || i(l)(a.option.tools?.delete) || a.option.tools?.export?.show && a.option.tools?.export?.select ? (b(), y(i(ue), S({
3295
3300
  key: 0,
3296
3301
  type: "selection",
3297
3302
  width: "40",
@@ -3300,7 +3305,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3300
3305
  "show-overflow-tooltip": !1,
3301
3306
  className: "cc1-form-selectable-column"
3302
3307
  }, typeof a.option.table?.selectable == "object" ? a.option.table?.selectable : {}, $(typeof a.option.table?.selectable == "object" ? a.option.table?.selectable?.on || {} : {})), null, 16)) : V("", !0),
3303
- (typeof a.option.table?.index == "object" ? a.option.table?.index?.show : a.option.table?.index) ? (m(), y(i(ue), S({
3308
+ (typeof a.option.table?.index == "object" ? a.option.table?.index?.show : a.option.table?.index) ? (b(), y(i(ue), S({
3304
3309
  key: 1,
3305
3310
  type: "index",
3306
3311
  fixed: "left",
@@ -3310,7 +3315,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3310
3315
  "show-overflow-tooltip": !1,
3311
3316
  className: "cc1-form-index-column"
3312
3317
  }, typeof a.option.table?.index == "object" ? a.option.table?.index : {}, $(typeof a.option.table?.index == "object" ? a.option.table?.index?.on || {} : {})), null, 16)) : V("", !0),
3313
- i(e).table.sortable.isActive() ? (m(), y(i(ue), S({
3318
+ i(e).table.sortable.isActive() ? (b(), y(i(ue), S({
3314
3319
  key: 2,
3315
3320
  align: "center",
3316
3321
  "show-overflow-tooltip": !1,
@@ -3318,18 +3323,18 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3318
3323
  }, i(e).table.sortable.getColumnBind(), $(i(e).table.sortable.getColumnBind().on || {})), {
3319
3324
  header: h(() => [
3320
3325
  z(f.$slots, "table-header-sortable", {}, () => [
3321
- M(b, {
3326
+ M(m, {
3322
3327
  effect: "dark",
3323
3328
  placement: "top"
3324
3329
  }, {
3325
3330
  content: h(() => [
3326
- D("div", {
3331
+ R("div", {
3327
3332
  innerHTML: a.option.table?.sortable?.tipText ?? i(k).tCurd("sortable")
3328
3333
  }, null, 8, Xo)
3329
3334
  ]),
3330
3335
  default: h(() => [
3331
- D("span", Qo, [
3332
- M(rt)
3336
+ R("span", Qo, [
3337
+ M(lt)
3333
3338
  ])
3334
3339
  ]),
3335
3340
  _: 1
@@ -3337,7 +3342,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3337
3342
  ])
3338
3343
  ]),
3339
3344
  default: h(() => d[12] || (d[12] = [
3340
- D("span", { class: "cc1-form-drag-handle" }, "::", -1)
3345
+ R("span", { class: "cc1-form-drag-handle" }, "::", -1)
3341
3346
  ])),
3342
3347
  _: 3
3343
3348
  }, 16)) : V("", !0),
@@ -3348,12 +3353,12 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3348
3353
  }, Z({ _: 2 }, [
3349
3354
  G(f.$slots, (p, w) => ({
3350
3355
  name: w,
3351
- fn: h((F) => [
3352
- z(f.$slots, w, Me(Oe(F || {})))
3356
+ fn: h((U) => [
3357
+ z(f.$slots, w, Me(Oe(U || {})))
3353
3358
  ])
3354
3359
  }))
3355
3360
  ]), 1032, ["conf", "columnList", "option"]),
3356
- i(n)(a.option.table?.add) || i(n)(a.option.table?.update) || i(n)(a.option.table?.delete) || i(n)(a.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (m(), y(i(ue), S({
3361
+ i(l)(a.option.table?.add) || i(l)(a.option.table?.update) || i(l)(a.option.table?.delete) || i(l)(a.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (b(), y(i(ue), S({
3357
3362
  key: 3,
3358
3363
  align: "center",
3359
3364
  fixed: "right"
@@ -3363,7 +3368,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3363
3368
  }), {
3364
3369
  header: h(() => [
3365
3370
  z(f.$slots, "table-header-op", {}, () => [
3366
- O(R(i(k).tCurd("operation")), 1)
3371
+ O(F(i(k).tCurd("operation")), 1)
3367
3372
  ])
3368
3373
  ]),
3369
3374
  default: h(({ row: p }) => [
@@ -3372,71 +3377,71 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3372
3377
  }, {
3373
3378
  default: h(() => [
3374
3379
  z(f.$slots, "table-op-left", { row: p }),
3375
- i(e).update.type === i(s).Update && a.option.table?.inlineEdit && i(e).update.form[t.option.table?.rowKey] === p[t.option.table?.rowKey] ? (m(), C(A, { key: 0 }, [
3376
- M(i(K), {
3380
+ i(e).update.type === i(s).Update && a.option.table?.inlineEdit && i(e).update.form[t.option.table?.rowKey] === p[t.option.table?.rowKey] ? (b(), C(A, { key: 0 }, [
3381
+ M(i(P), {
3377
3382
  link: "",
3378
3383
  type: "info",
3379
3384
  onClick: i(e).update.close
3380
3385
  }, {
3381
3386
  default: h(() => [
3382
- O(R(i(k).tCurd("cancel")), 1)
3387
+ O(F(i(k).tCurd("cancel")), 1)
3383
3388
  ]),
3384
3389
  _: 1
3385
3390
  }, 8, ["onClick"]),
3386
- M(i(K), {
3391
+ M(i(P), {
3387
3392
  link: "",
3388
3393
  type: "primary",
3389
3394
  onClick: i(e).update.submit,
3390
3395
  loading: i(e).update.loading
3391
3396
  }, {
3392
3397
  default: h(() => [
3393
- O(R(i(k).tCurd("confirm")), 1)
3398
+ O(F(i(k).tCurd("confirm")), 1)
3394
3399
  ]),
3395
3400
  _: 1
3396
3401
  }, 8, ["onClick", "loading"]),
3397
3402
  z(f.$slots, "table-op-edit-right", { row: p })
3398
- ], 64)) : (m(), C(A, { key: 1 }, [
3399
- i(n)(a.option.table?.add, p) ? (m(), y(i(K), {
3403
+ ], 64)) : (b(), C(A, { key: 1 }, [
3404
+ i(l)(a.option.table?.add, p) ? (b(), y(i(P), {
3400
3405
  key: 0,
3401
3406
  link: "",
3402
3407
  type: "primary",
3403
3408
  onClick: (w) => i(e).update.open(i(s).Add, p)
3404
3409
  }, {
3405
3410
  default: h(() => [
3406
- O(R(i(k).tCurd("add")), 1)
3411
+ O(F(i(k).tCurd("add")), 1)
3407
3412
  ]),
3408
3413
  _: 2
3409
3414
  }, 1032, ["onClick"])) : V("", !0),
3410
- i(n)(a.option.table?.view, p) ? (m(), y(i(K), {
3415
+ i(l)(a.option.table?.view, p) ? (b(), y(i(P), {
3411
3416
  key: 1,
3412
3417
  link: "",
3413
3418
  type: "primary",
3414
3419
  onClick: (w) => i(e).update.open(i(s).View, p)
3415
3420
  }, {
3416
3421
  default: h(() => [
3417
- O(R(i(k).tCurd("view")), 1)
3422
+ O(F(i(k).tCurd("view")), 1)
3418
3423
  ]),
3419
3424
  _: 2
3420
3425
  }, 1032, ["onClick"])) : V("", !0),
3421
- i(n)(a.option.table?.update, p) ? (m(), y(i(K), {
3426
+ i(l)(a.option.table?.update, p) ? (b(), y(i(P), {
3422
3427
  key: 2,
3423
3428
  link: "",
3424
3429
  type: "warning",
3425
3430
  onClick: (w) => i(e).update.open(i(s).Update, p)
3426
3431
  }, {
3427
3432
  default: h(() => [
3428
- O(R(i(k).tCurd("edit")), 1)
3433
+ O(F(i(k).tCurd("edit")), 1)
3429
3434
  ]),
3430
3435
  _: 2
3431
3436
  }, 1032, ["onClick"])) : V("", !0),
3432
- i(n)(a.option.table?.delete, p) ? (m(), y(i(K), {
3437
+ i(l)(a.option.table?.delete, p) ? (b(), y(i(P), {
3433
3438
  key: 3,
3434
3439
  link: "",
3435
3440
  type: "danger",
3436
3441
  onClick: (w) => i(e).remove.open([p])
3437
3442
  }, {
3438
3443
  default: h(() => [
3439
- O(R(i(k).tCurd("delete")), 1)
3444
+ O(F(i(k).tCurd("delete")), 1)
3440
3445
  ]),
3441
3446
  _: 2
3442
3447
  }, 1032, ["onClick"])) : V("", !0),
@@ -3455,8 +3460,8 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3455
3460
  ])
3456
3461
  ], 2)
3457
3462
  ], 2),
3458
- D("div", Yo, [
3459
- (a.option.page?.show === void 0 || a.option.page?.show) && !i(e).page.showTools && i(e).table.sortable.showPagination() ? (m(), y(i(Be), S({
3463
+ R("div", Yo, [
3464
+ (a.option.page?.show === void 0 || a.option.page?.show) && !i(e).page.showTools && i(e).table.sortable.showPagination() ? (b(), y(i(Be), S({
3460
3465
  key: 0,
3461
3466
  "current-page": i(e).page.num,
3462
3467
  "onUpdate:currentPage": d[8] || (d[8] = (p) => i(e).page.num = p),
@@ -3482,7 +3487,7 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3482
3487
  "before-close": i(e).update.close
3483
3488
  }, a.option.dialog), {
3484
3489
  footer: h(() => [
3485
- D("span", Zo, [
3490
+ R("span", Zo, [
3486
3491
  M(i(oe), {
3487
3492
  size: a.option.size?.form
3488
3493
  }, {
@@ -3490,22 +3495,22 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3490
3495
  z(f.$slots, "dialog-footer", {
3491
3496
  row: i(e).update
3492
3497
  }, () => [
3493
- M(i(K), {
3498
+ M(i(P), {
3494
3499
  onClick: i(e).update.close
3495
3500
  }, {
3496
3501
  default: h(() => [
3497
- O(R(i(k).tCurd("close")), 1)
3502
+ O(F(i(k).tCurd("close")), 1)
3498
3503
  ]),
3499
3504
  _: 1
3500
3505
  }, 8, ["onClick"]),
3501
- i(e).update.type !== i(s).View ? (m(), y(i(K), {
3506
+ i(e).update.type !== i(s).View ? (b(), y(i(P), {
3502
3507
  key: 0,
3503
3508
  type: "primary",
3504
3509
  onClick: i(e).update.submit,
3505
3510
  loading: i(e).update.loading
3506
3511
  }, {
3507
3512
  default: h(() => [
3508
- O(R(i(k).tCurd("submit")), 1)
3513
+ O(F(i(k).tCurd("submit")), 1)
3509
3514
  ]),
3510
3515
  _: 1
3511
3516
  }, 8, ["onClick", "loading"])) : V("", !0)
@@ -3521,14 +3526,14 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3521
3526
  }),
3522
3527
  M(i(oe), {
3523
3528
  ref_key: "ruleFormRef",
3524
- ref: l,
3529
+ ref: n,
3525
3530
  model: i(e).update.form,
3526
3531
  rules: i(e).update.rules,
3527
3532
  size: a.option.size?.form,
3528
3533
  class: "update-dialog-form"
3529
3534
  }, {
3530
3535
  default: h(() => [
3531
- i(e).update.showContent ? (m(), y(lt, {
3536
+ i(e).update.showContent ? (b(), y(nt, {
3532
3537
  key: 0,
3533
3538
  "form-grid": i(e).update.formGrid,
3534
3539
  "max-span": i(e).update.formMaxSpan,
@@ -3543,8 +3548,8 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3543
3548
  }, Z({ _: 2 }, [
3544
3549
  G(f.$slots, (p, w) => ({
3545
3550
  name: w,
3546
- fn: h((F) => [
3547
- z(f.$slots, w, Me(Oe(F || {})))
3551
+ fn: h((U) => [
3552
+ z(f.$slots, w, Me(Oe(U || {})))
3548
3553
  ])
3549
3554
  }))
3550
3555
  ]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : V("", !0)
@@ -3564,26 +3569,26 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3564
3569
  "close-on-click-modal": !1
3565
3570
  }, {
3566
3571
  footer: h(() => [
3567
- D("span", ea, [
3572
+ R("span", ea, [
3568
3573
  M(i(oe), {
3569
3574
  size: a.option.size?.form
3570
3575
  }, {
3571
3576
  default: h(() => [
3572
- M(i(K), {
3577
+ M(i(P), {
3573
3578
  onClick: i(e).remove.close
3574
3579
  }, {
3575
3580
  default: h(() => [
3576
- O(R(i(k).tCurd("close")), 1)
3581
+ O(F(i(k).tCurd("close")), 1)
3577
3582
  ]),
3578
3583
  _: 1
3579
3584
  }, 8, ["onClick"]),
3580
- M(i(K), {
3585
+ M(i(P), {
3581
3586
  type: "danger",
3582
3587
  onClick: i(e).remove.submit,
3583
3588
  loading: i(e).remove.loading
3584
3589
  }, {
3585
3590
  default: h(() => [
3586
- O(R(i(k).tCurd("confirmDelete")), 1)
3591
+ O(F(i(k).tCurd("confirmDelete")), 1)
3587
3592
  ]),
3588
3593
  _: 1
3589
3594
  }, 8, ["onClick", "loading"])
@@ -3593,12 +3598,12 @@ const Oo = /* @__PURE__ */ se(zo, [["render", Mo]]), Fo = { class: "row flex-cen
3593
3598
  ])
3594
3599
  ]),
3595
3600
  default: h(() => [
3596
- a.option.dialog?.delete?.content ? (m(), C("div", xo, [
3601
+ a.option.dialog?.delete?.content ? (b(), C("div", xo, [
3597
3602
  M(lo, {
3598
3603
  content: a.option.dialog?.delete?.content,
3599
3604
  value: i(e).remove.items
3600
3605
  }, null, 8, ["content", "value"])
3601
- ])) : (m(), C("div", _o, R(i(k).tCurd("confirmDeleteMessage", i(e).remove.items.length)), 1))
3606
+ ])) : (b(), C("div", _o, F(i(k).tCurd("confirmDeleteMessage", i(e).remove.items.length)), 1))
3602
3607
  ]),
3603
3608
  _: 1
3604
3609
  }, 8, ["modelValue", "title"]),
@@ -3628,8 +3633,8 @@ class ia {
3628
3633
  * @param name
3629
3634
  */
3630
3635
  static exportJSONFile = (o, s) => {
3631
- const t = new Blob([JSON.stringify(o)], { type: "application/json" }), n = URL.createObjectURL(t), e = document.createElement("a");
3632
- e.href = n, e.download = `${s || "config"}.json`, e.click();
3636
+ const t = new Blob([JSON.stringify(o)], { type: "application/json" }), l = URL.createObjectURL(t), e = document.createElement("a");
3637
+ e.href = l, e.download = `${s || "config"}.json`, e.click();
3633
3638
  };
3634
3639
  /**
3635
3640
  * 导入文件内容,默认为json
@@ -3637,12 +3642,12 @@ class ia {
3637
3642
  * @returns
3638
3643
  */
3639
3644
  static importFile = async (o) => new Promise((s, t) => {
3640
- const n = document.createElement("input");
3641
- n.type = "file";
3645
+ const l = document.createElement("input");
3646
+ l.type = "file";
3642
3647
  const e = o?.accept || ".json";
3643
- n.accept = e, n.style.display = "none", n.onchange = (r) => {
3644
- const l = r.target.files[0];
3645
- if (!l) {
3648
+ l.accept = e, l.style.display = "none", l.onchange = (r) => {
3649
+ const n = r.target.files[0];
3650
+ if (!n) {
3646
3651
  E.fail("未选择文件"), t("未选择文件");
3647
3652
  return;
3648
3653
  }
@@ -3652,8 +3657,8 @@ class ia {
3652
3657
  s(d);
3653
3658
  }, u.onerror = () => {
3654
3659
  E.fail("文件读取失败"), t("文件读取失败");
3655
- }, u.readAsText(l), document.body.removeChild(n);
3656
- }, document.body.appendChild(n), n.click();
3660
+ }, u.readAsText(n), document.body.removeChild(l);
3661
+ }, document.body.appendChild(l), l.click();
3657
3662
  });
3658
3663
  }
3659
3664
  const oa = (a, o) => {
@@ -3672,7 +3677,7 @@ export {
3672
3677
  ta as TCurd,
3673
3678
  ia as TFile,
3674
3679
  q as TForm,
3675
- T as TFormConfig,
3680
+ B as TFormConfig,
3676
3681
  k as TFormI18n,
3677
3682
  We as TFormList,
3678
3683
  E as TSys,