cc1-form 1.4.2 → 1.4.3

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