cc1-form 1.3.5 → 1.3.7

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 et, ElLoading as tt, ElFormItem as be, ElInput as ue, ElInputNumber as ot, ElSwitch as he, ElSelect as ce, ElOption as ne, ElRadioGroup as Ue, ElRadioButton as at, ElRadio as Ae, ElCheckboxGroup as nt, ElCheckboxButton as lt, ElCheckbox as it, ElColorPicker as rt, ElSlider as st, ElTreeSelect as dt, ElDatePicker as Be, ElForm as oe, ElDialog as Ee, ElButton as N, ElTableColumn as ye, ElDropdown as ut, ElDropdownMenu as ct, ElDropdownItem as Se, ElPagination as Oe, ElTable as ft } from "element-plus";
1
+ import { ElMessage as nt, ElLoading as lt, ElFormItem as be, ElInput as ue, ElInputNumber as it, ElSwitch as he, ElSelect as ce, ElOption as ne, ElRadioGroup as Be, ElRadioButton as rt, ElRadio as Te, ElCheckboxGroup as st, ElCheckboxButton as dt, ElCheckbox as ut, ElColorPicker as ct, ElSlider as ft, ElTreeSelect as mt, ElDatePicker as Le, ElForm as oe, ElDialog as Ee, ElButton as G, ElTableColumn as ye, ElDropdown as gt, ElDropdownMenu as ht, ElDropdownItem as Se, ElPagination as Re, ElTable as yt } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as q, reactive as re, onMounted as Te, resolveComponent as fe, openBlock as g, createElementBlock as v, renderSlot as S, createVNode as F, withCtx as p, createTextVNode as M, createCommentVNode as V, Fragment as B, renderList as G, createBlock as b, normalizeClass as J, normalizeStyle as pe, ref as X, unref as l, createElementVNode as R, mergeProps as x, toHandlers as E, createSlots as Y, toDisplayString as U, resolveDynamicComponent as ee, nextTick as mt, computed as ae, onUnmounted as Le, watch as gt, normalizeProps as $e, guardReactiveProps as ze, getCurrentInstance as je, withModifiers as ht, resolveDirective as yt, withDirectives as bt } from "vue";
3
+ import { defineComponent as q, reactive as re, onMounted as je, resolveComponent as fe, openBlock as g, createElementBlock as v, renderSlot as S, createVNode as F, withCtx as p, createTextVNode as M, createCommentVNode as V, Fragment as B, renderList as N, createBlock as b, normalizeClass as J, normalizeStyle as pe, ref as X, watch as Ke, nextTick as De, unref as r, createElementVNode as R, mergeProps as x, toHandlers as E, createSlots as Y, toDisplayString as U, resolveDynamicComponent as ee, computed as ae, onUnmounted as Pe, normalizeProps as $e, guardReactiveProps as ze, getCurrentInstance as Ie, withModifiers as bt, resolveDirective as pt, withDirectives as wt } from "vue";
4
4
  import { Scope as Me } from "cc1-vue3";
5
5
  class $ {
6
6
  /**
@@ -27,7 +27,7 @@ class $ {
27
27
  * @param data 数据
28
28
  * @returns 是否显示
29
29
  */
30
- static isFun = (t, ...n) => Array.isArray(t) ? t.some((o) => typeof o == "function" ? o(...n) : o) : typeof t == "function" ? t(...n) : t;
30
+ static isFun = (t, ...n) => Array.isArray(t) ? t.some((a) => typeof a == "function" ? a(...n) : a) : typeof t == "function" ? t(...n) : t;
31
31
  /**
32
32
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
33
33
  */
@@ -63,18 +63,18 @@ class $ {
63
63
  * @param type 消息类型
64
64
  * @param options 其他选项
65
65
  */
66
- static showMessage(t, n, o = {}) {
67
- const r = Date.now();
68
- if (!this.tipMessages[t] || r - this.tipMessages[t] > this.tipMessagesGap) {
69
- this.tipMessages[t] = r;
70
- const a = Object.assign(
66
+ static showMessage(t, n, a = {}) {
67
+ const s = Date.now();
68
+ if (!this.tipMessages[t] || s - this.tipMessages[t] > this.tipMessagesGap) {
69
+ this.tipMessages[t] = s;
70
+ const o = Object.assign(
71
71
  {
72
72
  message: t,
73
73
  type: n
74
74
  },
75
- o
75
+ a
76
76
  );
77
- et(a), setTimeout(() => {
77
+ nt(o), setTimeout(() => {
78
78
  delete this.tipMessages[t];
79
79
  }, this.tipMessagesGap);
80
80
  }
@@ -104,7 +104,7 @@ class $ {
104
104
  */
105
105
  static loading = (t = !0, n = "Loading...") => {
106
106
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
107
- t ? this.loadingObj = tt.service({
107
+ t ? this.loadingObj = lt.service({
108
108
  lock: !0,
109
109
  text: n,
110
110
  background: "rgba(0, 0, 0, 0.3)"
@@ -118,11 +118,11 @@ class $ {
118
118
  */
119
119
  static openUrl = (t, n = !0) => {
120
120
  if (n) {
121
- let o = screen.width / 2 - 500, r = screen.height / 2 - 800 / 2 - 30;
121
+ let a = screen.width / 2 - 500, s = screen.height / 2 - 800 / 2 - 30;
122
122
  window.open(
123
123
  t,
124
124
  "_blank",
125
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + r + ", left=" + o
125
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + s + ", left=" + a
126
126
  );
127
127
  } else
128
128
  window.open(t, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
@@ -132,11 +132,11 @@ class $ {
132
132
  * @param param
133
133
  * @returns
134
134
  */
135
- static getImgPic = (t) => new Promise(async (n, o) => {
136
- let r = document.getElementById(t.id);
137
- const a = await $.loadModule("html2canvas");
135
+ static getImgPic = (t) => new Promise(async (n, a) => {
136
+ let s = document.getElementById(t.id);
137
+ const o = await $.loadModule("html2canvas");
138
138
  try {
139
- a(r, {
139
+ o(s, {
140
140
  logging: !1,
141
141
  allowTaint: !0,
142
142
  scale: window.devicePixelRatio,
@@ -146,12 +146,12 @@ class $ {
146
146
  windowHeight: t.windowHeight,
147
147
  useCORS: !0,
148
148
  backgroundColor: "#ffffff00"
149
- }).then(function(i) {
150
- let u = i.toDataURL("image/png");
151
- n(u);
149
+ }).then(function(l) {
150
+ let i = l.toDataURL("image/png");
151
+ n(i);
152
152
  });
153
- } catch (i) {
154
- o(i);
153
+ } catch (l) {
154
+ a(l);
155
155
  }
156
156
  });
157
157
  }
@@ -543,9 +543,9 @@ class W {
543
543
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
544
544
  */
545
545
  static findOptions = (t, n) => {
546
- const o = t.column.find((a) => a.key === n), r = (a) => a.replace(/-([a-z])/g, (i, u) => u.toUpperCase());
547
- if (o)
548
- return o.options[r(o.type)];
546
+ const a = t.column.find((o) => o.key === n), s = (o) => o.replace(/-([a-z])/g, (l, i) => i.toUpperCase());
547
+ if (a)
548
+ return a.options[s(a.type)];
549
549
  };
550
550
  /**
551
551
  * 更新组件数据
@@ -563,9 +563,9 @@ class W {
563
563
  }))
564
564
  )
565
565
  */
566
- static setOptionsData = (t, n, o) => {
567
- const r = W.findOptions(t, n);
568
- r && (r.data = o);
566
+ static setOptionsData = (t, n, a) => {
567
+ const s = W.findOptions(t, n);
568
+ s && (s.data = a);
569
569
  };
570
570
  static form = {
571
571
  openBefore: {
@@ -576,9 +576,9 @@ class W {
576
576
  * @param treeData 树形数据
577
577
  * @param option 组件配置
578
578
  */
579
- parentId: (t, n, o, r) => {
580
- const a = L.config.table.rowKey;
581
- t ? n.type === $.EDialog.Add ? (n.form.parentId = t[a], n.form.sort = t.children.length + 1) : n.form.parentId = t.parentId.substring(t.parentId.lastIndexOf(",") + 1) : (n.form.parentId = "0", n.form.sort = o.length + 1), W.setOptionsData(r, "parentId", [{ [a]: "0", title: "根", children: o }]);
579
+ parentId: (t, n, a, s) => {
580
+ const o = L.config.table.rowKey;
581
+ t ? n.type === $.EDialog.Add ? (n.form.parentId = t[o], n.form.sort = t.children.length + 1) : n.form.parentId = t.parentId.substring(t.parentId.lastIndexOf(",") + 1) : (n.form.parentId = "0", n.form.sort = a.length + 1), W.setOptionsData(s, "parentId", [{ [o]: "0", title: "根", children: a }]);
582
582
  }
583
583
  }
584
584
  };
@@ -593,14 +593,14 @@ class Q {
593
593
  * @param field 字段名
594
594
  * @param row 行数据
595
595
  */
596
- static setId = (t, n, o) => {
596
+ static setId = (t, n, a) => {
597
597
  n[t] || (n[t] = []);
598
- const r = L.config.table.rowKey;
599
- n[t].forEach((a) => {
600
- o.forEach((i) => {
601
- let u = i.default ?? "";
602
- i.type === "number" && (u = i.default ?? 0), i.type === "boolean" && (u = i.default ?? !1), i.type === "time" && (u = i.default ?? /* @__PURE__ */ new Date()), a[i.value] === void 0 && (a[i.value] = u);
603
- }), a[r] || (a[r] = Q.getIdFun());
598
+ const s = L.config.table.rowKey;
599
+ n[t].forEach((o) => {
600
+ a.forEach((l) => {
601
+ let i = l.default ?? "";
602
+ l.type === "number" && (i = l.default ?? 0), l.type === "boolean" && (i = l.default ?? !1), l.type === "time" && (i = l.default ?? /* @__PURE__ */ new Date()), o[l.value] === void 0 && (o[l.value] = i);
603
+ }), o[s] || (o[s] = Q.getIdFun());
604
604
  });
605
605
  };
606
606
  /**
@@ -610,19 +610,19 @@ class Q {
610
610
  * @param itemFields 元素字段-如:[{label:'',value:''}]
611
611
  * @param callback 回调函数
612
612
  */
613
- static add = (t, n, o, r) => {
614
- const a = JSONUtil.cp(o);
615
- Q.setId(t, n, o);
616
- const i = L.config.table.rowKey;
613
+ static add = (t, n, a, s) => {
614
+ const o = JSONUtil.cp(a);
615
+ Q.setId(t, n, a);
616
+ const l = L.config.table.rowKey;
617
617
  n[t].push(
618
- a.reduce(
619
- (u, c) => {
620
- let d = c.default ?? "";
621
- return c.type === "number" && (d = c.default ?? 0), c.type === "boolean" && (d = c.default ?? !1), c.type === "time" && (d = c.default ?? /* @__PURE__ */ new Date()), u[c.value] = d, u;
618
+ o.reduce(
619
+ (i, c) => {
620
+ let u = c.default ?? "";
621
+ return c.type === "number" && (u = c.default ?? 0), c.type === "boolean" && (u = c.default ?? !1), c.type === "time" && (u = c.default ?? /* @__PURE__ */ new Date()), i[c.value] = u, i;
622
622
  },
623
- { [i]: Q.getIdFun() }
623
+ { [l]: Q.getIdFun() }
624
624
  )
625
- ), r?.(n);
625
+ ), s?.(n);
626
626
  };
627
627
  /**
628
628
  * 删除数组元素
@@ -631,9 +631,9 @@ class Q {
631
631
  * @param item 元素-如:{_id:''}
632
632
  * @param callback 回调函数
633
633
  */
634
- static remove = (t, n, o, r) => {
635
- const a = L.config.table.rowKey;
636
- n[t] = n[t].filter((i) => i[a] !== o[a]), r?.(n);
634
+ static remove = (t, n, a, s) => {
635
+ const o = L.config.table.rowKey;
636
+ n[t] = n[t].filter((l) => l[o] !== a[o]), s?.(n);
637
637
  };
638
638
  /**
639
639
  * 获取没有id的数据
@@ -642,20 +642,20 @@ class Q {
642
642
  * @returns 没有id的数据
643
643
  */
644
644
  static getNoIdData = (t, n) => {
645
- const o = JSONUtil.cp(t), r = L.config.table.rowKey;
646
- return o.forEach((a) => {
647
- a[r] && delete a[r], n && a[n] && Q.getNoIdData(a[n], n);
648
- }), o;
645
+ const a = JSONUtil.cp(t), s = L.config.table.rowKey;
646
+ return a.forEach((o) => {
647
+ o[s] && delete o[s], n && o[n] && Q.getNoIdData(o[n], n);
648
+ }), a;
649
649
  };
650
650
  }
651
- const pt = {
651
+ const kt = {
652
652
  key: 0,
653
653
  class: "column curd-form-com-list",
654
654
  style: { width: "100%", gap: "10px" }
655
- }, wt = { key: 0 }, kt = {
655
+ }, vt = { key: 0 }, Ct = {
656
656
  class: "row items-center",
657
657
  style: { gap: "10px", width: "100%" }
658
- }, vt = { key: 1 }, Ke = /* @__PURE__ */ q({
658
+ }, xt = { key: 1 }, Ge = /* @__PURE__ */ q({
659
659
  __name: "list",
660
660
  props: {
661
661
  row: {
@@ -694,87 +694,87 @@ const pt = {
694
694
  },
695
695
  emits: ["change"],
696
696
  setup(e, { emit: t }) {
697
- const n = e, o = re({
697
+ const n = e, a = re({
698
698
  show: !1,
699
- add: (a, i, u) => {
700
- Q.add(a, i, u, () => {
701
- r("change");
699
+ add: (o, l, i) => {
700
+ Q.add(o, l, i, () => {
701
+ s("change");
702
702
  });
703
703
  },
704
- remove: (a, i, u) => {
705
- Q.remove(a, i, u, () => {
706
- r("change");
704
+ remove: (o, l, i) => {
705
+ Q.remove(o, l, i, () => {
706
+ s("change");
707
707
  });
708
708
  }
709
709
  });
710
- Te(() => {
711
- Q.setId(n.field, n.row, n.itemFields), o.show = !0;
710
+ je(() => {
711
+ Q.setId(n.field, n.row, n.itemFields), a.show = !0;
712
712
  });
713
- const r = t;
714
- return (a, i) => {
715
- const u = fe("el-button"), c = fe("el-input");
716
- return o.show ? (g(), v("div", pt, [
717
- S(a.$slots, "list-start", { row: e.row }),
718
- e.addBottom ? V("", !0) : (g(), v("div", wt, [
719
- F(u, {
713
+ const s = t;
714
+ return (o, l) => {
715
+ const i = fe("el-button"), c = fe("el-input");
716
+ return a.show ? (g(), v("div", kt, [
717
+ S(o.$slots, "list-start", { row: e.row }),
718
+ e.addBottom ? V("", !0) : (g(), v("div", vt, [
719
+ F(i, {
720
720
  link: "",
721
721
  type: "primary",
722
- onClick: i[0] || (i[0] = (d) => o.add(e.field, e.row, e.itemFields))
722
+ onClick: l[0] || (l[0] = (u) => a.add(e.field, e.row, e.itemFields))
723
723
  }, {
724
- default: p(() => [...i[3] || (i[3] = [
724
+ default: p(() => [...l[3] || (l[3] = [
725
725
  M("添加", -1)
726
726
  ])]),
727
727
  _: 1
728
728
  })
729
729
  ])),
730
- (g(!0), v(B, null, G(e.row[e.field], (d) => (g(), v("div", kt, [
731
- S(a.$slots, "item-start", {
732
- item: d,
730
+ (g(!0), v(B, null, N(e.row[e.field], (u) => (g(), v("div", Ct, [
731
+ S(o.$slots, "item-start", {
732
+ item: u,
733
733
  row: e.row
734
734
  }),
735
- (g(!0), v(B, null, G(e.itemFields, (s) => (g(), b(c, {
736
- modelValue: d[s.value],
737
- "onUpdate:modelValue": (h) => d[s.value] = h,
735
+ (g(!0), v(B, null, N(e.itemFields, (d) => (g(), b(c, {
736
+ modelValue: u[d.value],
737
+ "onUpdate:modelValue": (h) => u[d.value] = h,
738
738
  style: pe({ width: e.inputWidth }),
739
739
  class: J(e.inputClass),
740
- placeholder: s[e.label] || s[e.value],
741
- onChange: i[1] || (i[1] = (h) => r("change"))
740
+ placeholder: d[e.label] || d[e.value],
741
+ onChange: l[1] || (l[1] = (h) => s("change"))
742
742
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
743
- S(a.$slots, "item-end", {
744
- item: d,
743
+ S(o.$slots, "item-end", {
744
+ item: u,
745
745
  row: e.row
746
746
  }),
747
- F(u, {
747
+ F(i, {
748
748
  link: "",
749
749
  type: "danger",
750
- onClick: (s) => o.remove(e.field, e.row, d)
750
+ onClick: (d) => a.remove(e.field, e.row, u)
751
751
  }, {
752
- default: p(() => [...i[4] || (i[4] = [
752
+ default: p(() => [...l[4] || (l[4] = [
753
753
  M("删除", -1)
754
754
  ])]),
755
755
  _: 1
756
756
  }, 8, ["onClick"])
757
757
  ]))), 256)),
758
- e.addBottom ? (g(), v("div", vt, [
759
- F(u, {
758
+ e.addBottom ? (g(), v("div", xt, [
759
+ F(i, {
760
760
  link: "",
761
761
  type: "primary",
762
- onClick: i[2] || (i[2] = (d) => o.add(e.field, e.row, e.itemFields))
762
+ onClick: l[2] || (l[2] = (u) => a.add(e.field, e.row, e.itemFields))
763
763
  }, {
764
- default: p(() => [...i[5] || (i[5] = [
764
+ default: p(() => [...l[5] || (l[5] = [
765
765
  M("添加", -1)
766
766
  ])]),
767
767
  _: 1
768
768
  })
769
769
  ])) : V("", !0),
770
- S(a.$slots, "list-end", { row: e.row })
770
+ S(o.$slots, "list-end", { row: e.row })
771
771
  ])) : V("", !0);
772
772
  };
773
773
  }
774
- }), Ct = {
774
+ }), Vt = {
775
775
  class: "row form-item-content",
776
776
  style: { width: "100%" }
777
- }, xt = { class: "col column form-item-content-item" }, Vt = { class: "col" }, St = ["innerHTML"], Et = /* @__PURE__ */ q({
777
+ }, St = { class: "col column form-item-content-item" }, Et = { class: "col" }, $t = ["innerHTML"], zt = /* @__PURE__ */ q({
778
778
  __name: "field",
779
779
  props: {
780
780
  item: {},
@@ -786,24 +786,19 @@ const pt = {
786
786
  getDisabled: { type: Function }
787
787
  },
788
788
  setup(e) {
789
- const t = e, n = X(), o = () => {
790
- const u = n.value?.validateState;
791
- return u && typeof u == "object" && "value" in u ? u.value : u;
792
- }, r = async (u) => {
793
- u && (await mt(), await n.value?.validate?.("").catch(() => {
794
- }));
795
- }, a = (u, c) => Array.isArray(u) ? Promise.all(u.map((d) => typeof d == "function" ? d(...c) : d)) : typeof u == "function" ? u(...c) : void 0, i = (u) => {
796
- const c = t.getOn(u);
797
- return {
798
- ...c,
799
- change: (...d) => {
800
- const s = o() === "error", h = a(c.change, d);
801
- return Promise.resolve(h).then(() => r(s), () => r(s)).catch(() => {
802
- }), h;
803
- }
804
- };
789
+ const t = e, n = X(), a = () => {
790
+ const o = n.value?.validateState;
791
+ return o && typeof o == "object" && "value" in o ? o.value : o;
792
+ }, s = () => {
793
+ a() === "error" && n.value?.clearValidate?.();
805
794
  };
806
- return (u, c) => (g(), b(l(be), {
795
+ return Ke(
796
+ () => t.form?.[t.item.key],
797
+ () => {
798
+ s(), De(() => s());
799
+ },
800
+ { deep: !0, flush: "post" }
801
+ ), (o, l) => (g(), b(r(be), {
807
802
  ref_key: "formItemRef",
808
803
  ref: n,
809
804
  label: e.item.text?.form?.label ?? e.item.label,
@@ -811,21 +806,21 @@ const pt = {
811
806
  "label-width": e.item.text?.form?.label == "" ? 0 : e.item.form?.labelWidth || e.labelWidth
812
807
  }, {
813
808
  default: p(() => [
814
- R("div", Ct, [
815
- S(u.$slots, "form-" + e.item.key + "-start", {
809
+ R("div", Vt, [
810
+ S(o.$slots, "form-" + e.item.key + "-start", {
816
811
  row: e.form,
817
812
  item: e.item
818
813
  }),
819
- R("div", xt, [
820
- R("div", Vt, [
821
- S(u.$slots, "form-" + e.item.key, {
814
+ R("div", St, [
815
+ R("div", Et, [
816
+ S(o.$slots, "form-" + e.item.key, {
822
817
  row: e.form,
823
818
  item: e.item
824
819
  }, () => [
825
- e.item.type === "input" ? (g(), b(l(ue), x({
820
+ e.item.type === "input" ? (g(), b(r(ue), x({
826
821
  key: 0,
827
822
  modelValue: e.form[e.item.key],
828
- "onUpdate:modelValue": c[0] || (c[0] = (d) => e.form[e.item.key] = d)
823
+ "onUpdate:modelValue": l[0] || (l[0] = (i) => e.form[e.item.key] = i)
829
824
  }, e.getBind(e.item), E(e.getOn(e.item)), {
830
825
  disabled: e.getDisabled(e.item)
831
826
  }), Y({ _: 2 }, [
@@ -836,123 +831,123 @@ const pt = {
836
831
  ]),
837
832
  key: "0"
838
833
  } : void 0
839
- ]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (g(), b(l(ot), x({
834
+ ]), 1040, ["modelValue", "disabled"])) : e.item.type === "number" ? (g(), b(r(it), x({
840
835
  key: 1,
841
836
  modelValue: e.form[e.item.key],
842
- "onUpdate:modelValue": c[1] || (c[1] = (d) => e.form[e.item.key] = d)
837
+ "onUpdate:modelValue": l[1] || (l[1] = (i) => e.form[e.item.key] = i)
843
838
  }, e.getBind(e.item), E(e.getOn(e.item)), {
844
839
  disabled: e.getDisabled(e.item)
845
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (g(), b(l(ue), x({
840
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "textarea" ? (g(), b(r(ue), x({
846
841
  key: 2,
847
842
  type: "textarea",
848
843
  modelValue: e.form[e.item.key],
849
- "onUpdate:modelValue": c[2] || (c[2] = (d) => e.form[e.item.key] = d)
844
+ "onUpdate:modelValue": l[2] || (l[2] = (i) => e.form[e.item.key] = i)
850
845
  }, e.getBind(e.item), E(e.getOn(e.item)), {
851
846
  disabled: e.getDisabled(e.item)
852
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (g(), b(l(he), x({
847
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "switch" ? (g(), b(r(he), x({
853
848
  key: 3,
854
849
  modelValue: e.form[e.item.key],
855
- "onUpdate:modelValue": c[3] || (c[3] = (d) => e.form[e.item.key] = d)
850
+ "onUpdate:modelValue": l[3] || (l[3] = (i) => e.form[e.item.key] = i)
856
851
  }, e.getBind(e.item), E(e.getOn(e.item)), {
857
852
  disabled: e.getDisabled(e.item)
858
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (g(), b(l(ce), x({
853
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "select" ? (g(), b(r(ce), x({
859
854
  key: 4,
860
855
  modelValue: e.form[e.item.key],
861
- "onUpdate:modelValue": c[4] || (c[4] = (d) => e.form[e.item.key] = d)
862
- }, e.getBind(e.item), E(i(e.item)), {
856
+ "onUpdate:modelValue": l[4] || (l[4] = (i) => e.form[e.item.key] = i)
857
+ }, e.getBind(e.item), E(e.getOn(e.item)), {
863
858
  disabled: e.getDisabled(e.item),
864
859
  style: { width: "100%" }
865
860
  }), {
866
861
  default: p(() => [
867
- (g(!0), v(B, null, G(e.getBind(e.item).data || [], (d) => (g(), b(l(ne), x({
868
- key: d.value
869
- }, { ref_for: !0 }, d, E(d.on || {})), null, 16))), 128))
862
+ (g(!0), v(B, null, N(e.getBind(e.item).data || [], (i) => (g(), b(r(ne), x({
863
+ key: i.value
864
+ }, { ref_for: !0 }, i, E(i.on || {})), null, 16))), 128))
870
865
  ]),
871
866
  _: 1
872
- }, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (g(), b(l(Ue), x({
867
+ }, 16, ["modelValue", "disabled"])) : e.item.type === "radio" ? (g(), b(r(Be), x({
873
868
  key: 5,
874
869
  modelValue: e.form[e.item.key],
875
- "onUpdate:modelValue": c[5] || (c[5] = (d) => e.form[e.item.key] = d)
870
+ "onUpdate:modelValue": l[5] || (l[5] = (i) => e.form[e.item.key] = i)
876
871
  }, e.getBind(e.item), E(e.getOn(e.item)), {
877
872
  disabled: e.getDisabled(e.item),
878
873
  style: { width: "100%" }
879
874
  }), {
880
875
  default: p(() => [
881
- e.getBind(e.item).type === "group" ? (g(!0), v(B, { key: 0 }, G(e.getBind(e.item).data || [], (d) => (g(), b(l(at), x({
882
- key: d.value
883
- }, { ref_for: !0 }, d, E(d.on || {})), null, 16))), 128)) : (g(!0), v(B, { key: 1 }, G(e.getBind(e.item).data || [], (d) => (g(), b(l(Ae), x({
884
- key: d.value
885
- }, { ref_for: !0 }, d, E(d.on || {})), null, 16))), 128))
876
+ e.getBind(e.item).type === "group" ? (g(!0), v(B, { key: 0 }, N(e.getBind(e.item).data || [], (i) => (g(), b(r(rt), x({
877
+ key: i.value
878
+ }, { ref_for: !0 }, i, E(i.on || {})), null, 16))), 128)) : (g(!0), v(B, { key: 1 }, N(e.getBind(e.item).data || [], (i) => (g(), b(r(Te), x({
879
+ key: i.value
880
+ }, { ref_for: !0 }, i, E(i.on || {})), null, 16))), 128))
886
881
  ]),
887
882
  _: 1
888
- }, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (g(), b(l(nt), x({
883
+ }, 16, ["modelValue", "disabled"])) : e.item.type === "checkbox" ? (g(), b(r(st), x({
889
884
  key: 6,
890
885
  modelValue: e.form[e.item.key],
891
- "onUpdate:modelValue": c[6] || (c[6] = (d) => e.form[e.item.key] = d)
892
- }, e.getBind(e.item), E(i(e.item)), {
886
+ "onUpdate:modelValue": l[6] || (l[6] = (i) => e.form[e.item.key] = i)
887
+ }, e.getBind(e.item), E(e.getOn(e.item)), {
893
888
  disabled: e.getDisabled(e.item),
894
889
  style: { width: "100%" }
895
890
  }), {
896
891
  default: p(() => [
897
- e.getBind(e.item).type === "group" ? (g(!0), v(B, { key: 0 }, G(e.getBind(e.item).data || [], (d) => (g(), b(l(lt), x({
898
- key: d.value
899
- }, { ref_for: !0 }, d, E(d.on || {})), null, 16))), 128)) : (g(!0), v(B, { key: 1 }, G(e.getBind(e.item).data || [], (d) => (g(), b(l(it), x({
900
- key: d.value
901
- }, { ref_for: !0 }, d, E(d.on || {})), null, 16))), 128))
892
+ e.getBind(e.item).type === "group" ? (g(!0), v(B, { key: 0 }, N(e.getBind(e.item).data || [], (i) => (g(), b(r(dt), x({
893
+ key: i.value
894
+ }, { ref_for: !0 }, i, E(i.on || {})), null, 16))), 128)) : (g(!0), v(B, { key: 1 }, N(e.getBind(e.item).data || [], (i) => (g(), b(r(ut), x({
895
+ key: i.value
896
+ }, { ref_for: !0 }, i, E(i.on || {})), null, 16))), 128))
902
897
  ]),
903
898
  _: 1
904
- }, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (g(), b(l(rt), x({
899
+ }, 16, ["modelValue", "disabled"])) : e.item.type === "color" ? (g(), b(r(ct), x({
905
900
  key: 7,
906
901
  modelValue: e.form[e.item.key],
907
- "onUpdate:modelValue": c[7] || (c[7] = (d) => e.form[e.item.key] = d)
902
+ "onUpdate:modelValue": l[7] || (l[7] = (i) => e.form[e.item.key] = i)
908
903
  }, e.getBind(e.item), E(e.getOn(e.item)), {
909
904
  disabled: e.getDisabled(e.item)
910
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (g(), b(l(st), x({
905
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "slider" ? (g(), b(r(ft), x({
911
906
  key: 8,
912
907
  modelValue: e.form[e.item.key],
913
- "onUpdate:modelValue": c[8] || (c[8] = (d) => e.form[e.item.key] = d)
908
+ "onUpdate:modelValue": l[8] || (l[8] = (i) => e.form[e.item.key] = i)
914
909
  }, e.getBind(e.item), E(e.getOn(e.item)), {
915
910
  disabled: e.getDisabled(e.item)
916
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (g(), b(Ke, x({
911
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "list" ? (g(), b(Ge, x({
917
912
  key: 9,
918
913
  row: e.form,
919
914
  field: e.item.key
920
915
  }, e.getBind(e.item), E(e.getOn(e.item)), {
921
916
  disabled: e.getDisabled(e.item),
922
917
  style: { width: "100%" }
923
- }), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (g(), b(l(dt), x({
918
+ }), null, 16, ["row", "field", "disabled"])) : e.item.type === "treeSelect" ? (g(), b(r(mt), x({
924
919
  key: 10,
925
920
  modelValue: e.form[e.item.key],
926
- "onUpdate:modelValue": c[9] || (c[9] = (d) => e.form[e.item.key] = d)
921
+ "onUpdate:modelValue": l[9] || (l[9] = (i) => e.form[e.item.key] = i)
927
922
  }, e.getBind(e.item), E(e.getOn(e.item)), {
928
923
  disabled: e.getDisabled(e.item),
929
924
  style: { width: "100%" }
930
- }), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (g(), b(l(Be), x({
925
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type === "datetime" ? (g(), b(r(Le), x({
931
926
  key: 11,
932
927
  modelValue: e.form[e.item.key],
933
- "onUpdate:modelValue": c[10] || (c[10] = (d) => e.form[e.item.key] = d)
934
- }, e.getBind(e.item), E(i(e.item)), {
928
+ "onUpdate:modelValue": l[10] || (l[10] = (i) => e.form[e.item.key] = i)
929
+ }, e.getBind(e.item), E(e.getOn(e.item)), {
935
930
  disabled: e.getDisabled(e.item)
936
931
  }), null, 16, ["modelValue", "disabled"])) : e.item.type && typeof e.item.type == "object" ? (g(), b(ee(e.item.type), x({
937
932
  key: 12,
938
933
  modelValue: e.form[e.item.key],
939
- "onUpdate:modelValue": c[11] || (c[11] = (d) => e.form[e.item.key] = d)
934
+ "onUpdate:modelValue": l[11] || (l[11] = (i) => e.form[e.item.key] = i)
940
935
  }, e.getBind(e.item), E(e.getOn(e.item)), {
941
936
  disabled: e.getDisabled(e.item)
942
- }), null, 16, ["modelValue", "disabled"])) : e.item.type && (l(W).customComponent[e.item.type] || l(W).customComponent[e.item.type]?.form) ? (g(), b(ee(l(W).customComponent[e.item.type]?.form || l(W).customComponent[e.item.type]), x({
937
+ }), null, 16, ["modelValue", "disabled"])) : e.item.type && (r(W).customComponent[e.item.type] || r(W).customComponent[e.item.type]?.form) ? (g(), b(ee(r(W).customComponent[e.item.type]?.form || r(W).customComponent[e.item.type]), x({
943
938
  key: 13,
944
939
  modelValue: e.form[e.item.key],
945
- "onUpdate:modelValue": c[12] || (c[12] = (d) => e.form[e.item.key] = d)
940
+ "onUpdate:modelValue": l[12] || (l[12] = (i) => e.form[e.item.key] = i)
946
941
  }, e.getBind(e.item), E(e.getOn(e.item)), {
947
942
  disabled: e.getDisabled(e.item)
948
943
  }), null, 16, ["modelValue", "disabled"])) : V("", !0)
949
944
  ]),
950
- S(u.$slots, "form-" + e.item.key + "-right", {
945
+ S(o.$slots, "form-" + e.item.key + "-right", {
951
946
  row: e.form,
952
947
  item: e.item
953
948
  })
954
949
  ]),
955
- S(u.$slots, "form-" + e.item.key + "-tip", {
950
+ S(o.$slots, "form-" + e.item.key + "-tip", {
956
951
  row: e.form,
957
952
  item: e.item
958
953
  }, () => [
@@ -960,10 +955,10 @@ const pt = {
960
955
  key: 0,
961
956
  class: "form-tip-text",
962
957
  innerHTML: typeof e.item.form?.tipText == "function" ? e.item.form?.tipText(e.form, e.type) : e.item.form?.tipText
963
- }, null, 8, St)) : V("", !0)
958
+ }, null, 8, $t)) : V("", !0)
964
959
  ])
965
960
  ]),
966
- S(u.$slots, "form-" + e.item.key + "-end", {
961
+ S(o.$slots, "form-" + e.item.key + "-end", {
967
962
  row: e.form,
968
963
  item: e.item
969
964
  })
@@ -973,7 +968,7 @@ const pt = {
973
968
  }, 8, ["label", "prop", "label-width"]));
974
969
  }
975
970
  });
976
- const $t = {
971
+ const Mt = {
977
972
  search: "搜索",
978
973
  add: "新增",
979
974
  edit: "编辑",
@@ -1015,8 +1010,8 @@ class C {
1015
1010
  if (typeof t == "function")
1016
1011
  return t(...n);
1017
1012
  t = String(t);
1018
- let o = 0;
1019
- return t.replace(/{([^}]+)}/g, (r, a) => o < n.length ? String(n[o++]) : `{${a}}`);
1013
+ let a = 0;
1014
+ return t.replace(/{([^}]+)}/g, (s, o) => a < n.length ? String(n[a++]) : `{${o}}`);
1020
1015
  }
1021
1016
  static setI18n = (t) => {
1022
1017
  C.curd = ObjectUtil.deepMerge(C.curd, t);
@@ -1026,7 +1021,7 @@ class C {
1026
1021
  return this.t(this.curd[t], ...n);
1027
1022
  }
1028
1023
  /** curd表单 */
1029
- static curd = $t;
1024
+ static curd = Mt;
1030
1025
  }
1031
1026
  class Z {
1032
1027
  /**
@@ -1046,31 +1041,31 @@ class Z {
1046
1041
  * @param delAll 是否删除目标对象所有属性
1047
1042
  * @returns
1048
1043
  */
1049
- static setValue = (t, n, o = !1) => {
1050
- o && Z.delAllKey(t), Object.keys(n).forEach((r) => {
1051
- t[r] !== n[r] && (t[r] = n[r]);
1044
+ static setValue = (t, n, a = !1) => {
1045
+ a && Z.delAllKey(t), Object.keys(n).forEach((s) => {
1046
+ t[s] !== n[s] && (t[s] = n[s]);
1052
1047
  });
1053
1048
  };
1054
1049
  }
1055
1050
  const we = (e) => {
1056
- const t = re({}), n = () => typeof e == "function" ? e() : e, o = () => {
1057
- const r = n();
1058
- return r ?? t;
1051
+ const t = re({}), n = () => typeof e == "function" ? e() : e, a = () => {
1052
+ const s = n();
1053
+ return s ?? t;
1059
1054
  };
1060
1055
  return {
1061
1056
  internal: t,
1062
1057
  isExternal: () => n() != null,
1063
1058
  get() {
1064
- return o();
1059
+ return a();
1065
1060
  },
1066
- set(r) {
1067
- Z.setValue(o(), r, !0);
1061
+ set(s) {
1062
+ Z.setValue(a(), s, !0);
1068
1063
  },
1069
- merge(r) {
1070
- Z.setValue(o(), r, !1);
1064
+ merge(s) {
1065
+ Z.setValue(a(), s, !1);
1071
1066
  },
1072
1067
  clear() {
1073
- Z.delAllKey(o());
1068
+ Z.delAllKey(a());
1074
1069
  }
1075
1070
  };
1076
1071
  }, me = (e) => {
@@ -1080,16 +1075,17 @@ const we = (e) => {
1080
1075
  error: t.error || ""
1081
1076
  });
1082
1077
  });
1083
- }, zt = (e) => e ? typeof e == "string" ? e : e instanceof Error ? e.message : e.message || String(e) : "", ke = (e) => !e || typeof e != "object" ? [] : Object.keys(e).flatMap((t) => (Array.isArray(e[t]) ? e[t] : [e[t]]).map((o) => ({
1084
- field: o?.field || t,
1085
- error: zt(o)
1086
- }))), ge = $.EDialog, le = (e) => typeof e.type == "object" ? "component" : e.type || "input", Mt = (e, t, n) => {
1087
- const o = we(() => t.form), r = (i) => De(i.update.formGrid || [], i.update.form, i.update.type, i.update.formMaxSpan).map((c) => c.item.key).filter(Boolean), a = async (i) => {
1088
- const u = n.ruleFormRef.value;
1089
- if (!u) return !0;
1090
- const c = r(i), d = Object.keys(i.update.rules || {}).filter((h) => !c.includes(h));
1091
- if (d.length && u.clearValidate(d), !c.length) return !0;
1092
- if (!await u.validateField(c, async (h, f) => {
1078
+ }, Ft = (e) => e ? typeof e == "string" ? e : e instanceof Error ? e.message : e.message || String(e) : "", ke = (e) => !e || typeof e != "object" ? [] : Object.keys(e).flatMap((t) => (Array.isArray(e[t]) ? e[t] : [e[t]]).map((a) => ({
1079
+ field: a?.field || t,
1080
+ error: Ft(a)
1081
+ }))), ge = $.EDialog, le = (e) => typeof e.type == "object" ? "component" : e.type || "input", Dt = (e, t, n) => {
1082
+ const a = we(() => t.form), s = (l) => Oe(l.update.formGrid || [], l.update.form, l.update.type, l.update.formMaxSpan).map((c) => c.item.key).filter(Boolean), o = async (l) => {
1083
+ const i = n.ruleFormRef.value;
1084
+ if (!i) return !0;
1085
+ await De();
1086
+ const c = s(l), u = Object.keys(l.update.rules || {}).filter((h) => !c.includes(h));
1087
+ if (u.length && i.clearValidate(u), !c.length) return !0;
1088
+ if (!await i.validateField(c, async (h, f) => {
1093
1089
  h || me(ke(f));
1094
1090
  })) throw !1;
1095
1091
  return !0;
@@ -1103,35 +1099,35 @@ const we = (e) => {
1103
1099
  loading: !1,
1104
1100
  type: ge.Update,
1105
1101
  get form() {
1106
- return o.get();
1102
+ return a.get();
1107
1103
  },
1108
- set form(i) {
1109
- o.set(i);
1104
+ set form(l) {
1105
+ a.set(l);
1110
1106
  },
1111
1107
  formDefault: {},
1112
1108
  formColumn: [],
1113
1109
  formGrid: [],
1114
1110
  formMaxSpan: 12,
1115
- getDisabled: (i, u = !1) => {
1111
+ getDisabled: (l, i = !1) => {
1116
1112
  const c = e();
1117
- return t.option.table?.editMode && u ? i.disabled?.table === void 0 ? !1 : $.isFun(i.disabled?.table, c.update.form) : Ie(i, c.update.type, c.update.form);
1113
+ return t.option.table?.editMode && i ? l.disabled?.table === void 0 ? !1 : $.isFun(l.disabled?.table, c.update.form) : We(l, c.update.type, c.update.form);
1118
1114
  },
1119
- getBind: (i) => {
1120
- const u = e();
1121
- return Ne(i, u.update.type);
1115
+ getBind: (l) => {
1116
+ const i = e();
1117
+ return Je(l, i.update.type);
1122
1118
  },
1123
- getOn: (i, u) => {
1119
+ getOn: (l, i) => {
1124
1120
  const c = e();
1125
- return Ge(i, c.update.type, [u || c.update.form, i]);
1121
+ return qe(l, c.update.type, [i || c.update.form, l]);
1126
1122
  },
1127
- getOptions: (i) => {
1128
- const u = e();
1123
+ getOptions: (l) => {
1124
+ const i = e();
1129
1125
  try {
1130
- const d = qe(u.update.formGrid?.length ? u.update.formGrid : u.update.formColumn).find((s) => s.item.key === i)?.item;
1131
- return d ? {
1132
- options: d.options,
1126
+ const u = Ze(i.update.formGrid?.length ? i.update.formGrid : i.update.formColumn).find((d) => d.item.key === l)?.item;
1127
+ return u ? {
1128
+ options: u.options,
1133
1129
  //@ts-ignore
1134
- bind: u.update.getBind(d)
1130
+ bind: i.update.getBind(u)
1135
1131
  } : { options: {}, bind: {} };
1136
1132
  } catch {
1137
1133
  return { options: {}, bind: {} };
@@ -1139,166 +1135,166 @@ const we = (e) => {
1139
1135
  },
1140
1136
  edit: {
1141
1137
  data: {},
1142
- getApiData: (i) => {
1143
- const u = e();
1144
- if (t.option.form?.editAll) return i;
1138
+ getApiData: (l) => {
1139
+ const i = e();
1140
+ if (t.option.form?.editAll) return l;
1145
1141
  const c = {
1146
- [t.option.table?.rowKey]: u.update.edit.data[t.option.table?.rowKey]
1142
+ [t.option.table?.rowKey]: i.update.edit.data[t.option.table?.rowKey]
1147
1143
  };
1148
- return Object.keys(u.update.edit.data).forEach((d) => {
1149
- i[d] !== u.update.edit.data[d] && (c[d] = i[d]);
1144
+ return Object.keys(i.update.edit.data).forEach((u) => {
1145
+ l[u] !== i.update.edit.data[u] && (c[u] = l[u]);
1150
1146
  }), c;
1151
1147
  }
1152
1148
  },
1153
1149
  view: {},
1154
1150
  openLoading: !1,
1155
- open: async (i, u) => {
1151
+ open: async (l, i) => {
1156
1152
  const c = e();
1157
1153
  if (!(c.update.showContent || c.update.openLoading)) {
1158
1154
  $.loading(!0), c.update.openLoading = !0;
1159
1155
  try {
1160
- c.update.type = i;
1161
- const d = i === ge.Add;
1162
- c.update.edit.data = d ? void 0 : JSONUtil.cp(u), c.update.title = C.tCurd(d ? "add" : i === ge.View ? "view" : "edit");
1163
- const s = d ? ObjectUtil.deepMerge(JSONUtil.cp(c.update.formDefault), u ? JSONUtil.cp(u) : {}) : JSONUtil.cp(u);
1164
- Z.setValue(c.update.form, s, !0), await c.initApiData("update"), await t.option.form?.openBefore?.(c.update.form, c.update), (!t.option.table?.inlineEdit || d) && (c.update.show = !0, c.update.showContent = !0), t.option.form?.openAfter?.(c.update.form, c.update);
1165
- } catch (d) {
1166
- console.error(d);
1156
+ c.update.type = l;
1157
+ const u = l === ge.Add;
1158
+ c.update.edit.data = u ? void 0 : JSONUtil.cp(i), c.update.title = C.tCurd(u ? "add" : l === ge.View ? "view" : "edit");
1159
+ const d = u ? ObjectUtil.deepMerge(JSONUtil.cp(c.update.formDefault), i ? JSONUtil.cp(i) : {}) : JSONUtil.cp(i);
1160
+ Z.setValue(c.update.form, d, !0), await c.initApiData("update"), await t.option.form?.openBefore?.(c.update.form, c.update), (!t.option.table?.inlineEdit || u) && (c.update.show = !0, c.update.showContent = !0), t.option.form?.openAfter?.(c.update.form, c.update);
1161
+ } catch (u) {
1162
+ console.error(u);
1167
1163
  } finally {
1168
1164
  $.loading(!1), c.update.openLoading = !1;
1169
1165
  }
1170
1166
  }
1171
1167
  },
1172
- validate: async (i = !0) => {
1173
- const u = e();
1168
+ validate: async (l = !0) => {
1169
+ const i = e();
1174
1170
  try {
1175
- const c = t.option.table?.editMode ? u.tableEditValidate.validate() : a(u);
1171
+ const c = t.option.table?.editMode ? i.tableEditValidate.validate() : o(i);
1176
1172
  return await Promise.all([
1177
1173
  c,
1178
- u.formRef.validate()
1174
+ i.formRef.validate()
1179
1175
  ]), !0;
1180
1176
  } catch {
1181
- return i && $.fail(C.tCurd("checkFormData")), !1;
1177
+ return l && $.fail(C.tCurd("checkFormData")), !1;
1182
1178
  }
1183
1179
  },
1184
1180
  submit: async () => {
1185
- const i = e();
1186
- if (!await i.update.validate() || i.update.loading) return;
1187
- i.update.loading = !0;
1188
- const c = i.update.type === ge.Add ? t.option.api.create : t.option.api.update;
1181
+ const l = e();
1182
+ if (!await l.update.validate() || l.update.loading) return;
1183
+ l.update.loading = !0;
1184
+ const c = l.update.type === ge.Add ? t.option.api.create : t.option.api.update;
1189
1185
  try {
1190
- await t.option.form?.submitBefore?.(i.update.form, i.update);
1186
+ await t.option.form?.submitBefore?.(l.update.form, l.update);
1191
1187
  } catch {
1192
- i.update.loading = !1;
1188
+ l.update.loading = !1;
1193
1189
  return;
1194
1190
  }
1195
- let d = ObjectUtil.deepMerge(i.update.form, {});
1196
- delete d.children;
1197
- const s = new Set(t.option.column.filter((h) => h.type === "datetime").map((h) => h.key));
1198
- Object.keys(d).forEach((h) => {
1199
- if (s.has(h) && d[h] != null) {
1200
- const f = new Date(d[h]).getTime();
1201
- isNaN(f) || (d[h] = f);
1191
+ let u = ObjectUtil.deepMerge(l.update.form, {});
1192
+ delete u.children;
1193
+ const d = new Set(t.option.column.filter((h) => h.type === "datetime").map((h) => h.key));
1194
+ Object.keys(u).forEach((h) => {
1195
+ if (d.has(h) && u[h] != null) {
1196
+ const f = new Date(u[h]).getTime();
1197
+ isNaN(f) || (u[h] = f);
1202
1198
  }
1203
1199
  });
1204
1200
  try {
1205
1201
  if (!c) return;
1206
- await c({ ...d }), i.update.close(), await i.table.getList(), t.option.form?.submitAfter?.(d, i.update);
1202
+ await c({ ...u }), l.update.close(), await l.table.getList(), t.option.form?.submitAfter?.(u, l.update);
1207
1203
  } catch (h) {
1208
1204
  console.error(h);
1209
1205
  } finally {
1210
- i.update.loading = !1;
1206
+ l.update.loading = !1;
1211
1207
  }
1212
1208
  },
1213
1209
  close: () => {
1214
- const i = e();
1215
- i.update.show = !1, i.update.edit.data = void 0, setTimeout(() => {
1216
- i.update.showContent = !1, n.ruleFormRef.value?.resetFields?.(), o.clear();
1210
+ const l = e();
1211
+ l.update.show = !1, l.update.edit.data = void 0, setTimeout(() => {
1212
+ l.update.showContent = !1, n.ruleFormRef.value?.resetFields?.(), a.clear();
1217
1213
  }, 350);
1218
1214
  }
1219
1215
  }
1220
1216
  };
1221
1217
  }, H = 12, ve = (e, t) => {
1222
1218
  e.isForm = t, Array.isArray(e.children) && e.children.forEach((n) => ve(n, t));
1223
- }, Ft = (e) => e.isForm === !1 ? !1 : typeof e.show?.form == "boolean" ? e.show.form : !0, Dt = (e, t, n) => (e.form = e.form || { span: t }, n === "column" ? e.form.span = e.form.span ?? 12 : e.form.span = e.form.span ?? t, e.form.span), Pe = (e) => {
1219
+ }, Ot = (e) => e.isForm === !1 ? !1 : typeof e.show?.form == "boolean" ? e.show.form : !0, Ne = (e) => e > H ? Math.floor(e / 2) : e, Rt = (e, t, n) => (e.form = e.form || { span: t }, n === "column" ? e.form.span = e.form.span ?? 12 : e.form.span = e.form.span ?? t, e.form.span = Ne(e.form.span), e.form.span), He = (e) => {
1224
1220
  const t = e.form;
1225
- return t?.row != null && t.row > 0 ? t.row : H;
1226
- }, ie = (e) => Math.floor((e.gridRow - 1) / H), Ie = (e, t, n) => {
1221
+ return t?.row != null && t.row > 0 ? Ne(t.row) : H;
1222
+ }, ie = (e) => Math.floor((e.gridRow - 1) / H), We = (e, t, n) => {
1227
1223
  if (t === $.EDialog.View)
1228
1224
  return e.disabled?.view === void 0 ? !0 : $.isFun(e.disabled?.view, n);
1229
- const o = e.disabled?.[t === $.EDialog.Add ? "create" : "update"];
1230
- return $.isFun(o, n);
1231
- }, Ne = (e, t) => {
1225
+ const a = e.disabled?.[t === $.EDialog.Add ? "create" : "update"];
1226
+ return $.isFun(a, n);
1227
+ }, Je = (e, t) => {
1232
1228
  const n = le(e);
1233
1229
  return e.options?.[t === $.EDialog.Add ? "formAdd" : "formUpdate"]?.[n] || e.options?.[n] || {};
1234
- }, Ge = (e, t, n = []) => {
1235
- const o = le(e), a = e.options?.[t === $.EDialog.Add ? "formAdd" : "formUpdate"]?.[o]?.on || e.options?.[o]?.on || {}, i = {};
1236
- return Object.keys(a).forEach((u) => {
1237
- const c = a[u];
1238
- typeof c == "function" ? i[u] = function(...d) {
1239
- return c.apply(this, [...d, ...n]);
1240
- } : i[u] = c;
1241
- }), i;
1242
- }, He = (e, t, n, o, r) => {
1243
- const a = e, i = a.colSpan ?? e.span;
1230
+ }, qe = (e, t, n = []) => {
1231
+ const a = le(e), o = e.options?.[t === $.EDialog.Add ? "formAdd" : "formUpdate"]?.[a]?.on || e.options?.[a]?.on || {}, l = {};
1232
+ return Object.keys(o).forEach((i) => {
1233
+ const c = o[i];
1234
+ typeof c == "function" ? l[i] = function(...u) {
1235
+ return c.apply(this, [...u, ...n]);
1236
+ } : l[i] = c;
1237
+ }), l;
1238
+ }, Qe = (e, t, n, a, s) => {
1239
+ const o = e, l = o.colSpan ?? e.span;
1244
1240
  if (!e.item.form?.spanCol)
1245
- return i;
1246
- const u = r?.maxSpan || 12, c = r?.defaultSpan || u / 2, d = a.gridBand, h = t.filter((f) => d != null ? f.gridBand === d && !$.isFun(f.item.show?.form, n, o) : f.gridRow === a.gridRow && !$.isFun(f.item.show?.form, n, o)).reduce((f, m) => f + (m.colSpan ?? m.span ?? c), 0);
1247
- return i + h;
1248
- }, Ot = (e, t) => {
1249
- const n = (o, r) => {
1250
- const a = o.gridRow, i = o.gridRow + o.rowSpan - 1, u = r.gridRow, c = r.gridRow + r.rowSpan - 1;
1251
- return a <= c && u <= i;
1241
+ return l;
1242
+ const i = s?.maxSpan || 12, c = s?.defaultSpan || i / 2, u = o.gridBand, h = t.filter((f) => u != null ? f.gridBand === u && !$.isFun(f.item.show?.form, n, a) : f.gridRow === o.gridRow && !$.isFun(f.item.show?.form, n, a)).reduce((f, m) => f + (m.colSpan ?? m.span ?? c), 0);
1243
+ return l + h;
1244
+ }, Ut = (e, t) => {
1245
+ const n = (a, s) => {
1246
+ const o = a.gridRow, l = a.gridRow + a.rowSpan - 1, i = s.gridRow, c = s.gridRow + s.rowSpan - 1;
1247
+ return o <= c && i <= l;
1252
1248
  };
1253
- return e.map((o) => e.filter((a) => n(o, a)).length !== 1 || o.colSpan >= t ? o : {
1254
- ...o,
1249
+ return e.map((a) => e.filter((o) => n(a, o)).length !== 1 || a.colSpan >= t ? a : {
1250
+ ...a,
1255
1251
  span: t,
1256
1252
  colSpan: t,
1257
1253
  gridColumn: 1
1258
1254
  });
1259
- }, We = (e, t, n = {}) => {
1260
- const o = /* @__PURE__ */ new Set(), r = [];
1261
- let a = 0, i = 0;
1262
- const u = (m) => Math.floor(m / H) * H, c = (m, w) => `${m},${w}`, d = (m, w, D, T) => {
1255
+ }, Xe = (e, t, n = {}) => {
1256
+ const a = /* @__PURE__ */ new Set(), s = [];
1257
+ let o = 0, l = 0;
1258
+ const i = (m) => Math.floor(m / H) * H, c = (m, w) => `${m},${w}`, u = (m, w, D, T) => {
1263
1259
  if (w + D > t) return !1;
1264
1260
  for (let O = 0; O < T; O++)
1265
1261
  for (let A = 0; A < D; A++)
1266
- if (o.has(c(m + O, w + A))) return !1;
1262
+ if (a.has(c(m + O, w + A))) return !1;
1267
1263
  return !0;
1268
- }, s = (m, w, D, T) => {
1264
+ }, d = (m, w, D, T) => {
1269
1265
  for (let O = 0; O < T; O++)
1270
1266
  for (let A = 0; A < D; A++)
1271
- o.add(c(m + O, w + A));
1267
+ a.add(c(m + O, w + A));
1272
1268
  }, h = (m, w, D, T) => {
1273
- for (let A = u(m); A < 500 * H; A += H) {
1274
- const de = A + H, Ce = A === u(m) ? Math.max(A, m) : A;
1269
+ for (let A = i(m); A < 500 * H; A += H) {
1270
+ const de = A + H, Ce = A === i(m) ? Math.max(A, m) : A;
1275
1271
  for (let _ = Ce; _ < de; _++) {
1276
1272
  const xe = _ === m ? w : 0;
1277
1273
  for (let te = xe; te <= t - D; te++)
1278
- if (d(_, te, D, T)) return { tr: _, tc: te };
1274
+ if (u(_, te, D, T)) return { tr: _, tc: te };
1279
1275
  }
1280
1276
  }
1281
1277
  return { tr: m, tc: w };
1282
1278
  }, f = (m, w, D, T) => {
1283
- const O = u(m);
1279
+ const O = i(m);
1284
1280
  if (T < H && m + T < O + H) {
1285
- a = m + T, i = w;
1281
+ o = m + T, l = w;
1286
1282
  return;
1287
1283
  }
1288
1284
  const A = w + D;
1289
1285
  if (A < t) {
1290
- i = A, a = O;
1286
+ l = A, o = O;
1291
1287
  return;
1292
1288
  }
1293
- i = 0, a = O + H;
1289
+ l = 0, o = O + H;
1294
1290
  };
1295
1291
  return e.forEach((m) => {
1296
- const w = m.colSpan ?? (m.span === 0 ? t : m.span), D = m.rowSpan ?? Pe(m.item);
1297
- m.item.form?.rowBreak && r.length && (i = 0, a = u(a) + H);
1298
- let { tr: T, tc: O } = d(a, i, w, D) ? { tr: a, tc: i } : h(a, i, w, D);
1299
- d(T, O, w, D) || ({ tr: T, tc: O } = h(0, 0, w, D)), s(T, O, w, D);
1292
+ const w = m.colSpan ?? (m.span === 0 ? t : m.span), D = m.rowSpan ?? He(m.item);
1293
+ m.item.form?.rowBreak && s.length && (l = 0, o = i(o) + H);
1294
+ let { tr: T, tc: O } = u(o, l, w, D) ? { tr: o, tc: l } : h(o, l, w, D);
1295
+ u(T, O, w, D) || ({ tr: T, tc: O } = h(0, 0, w, D)), d(T, O, w, D);
1300
1296
  const A = T + 1;
1301
- r.push({
1297
+ s.push({
1302
1298
  ...m,
1303
1299
  span: w,
1304
1300
  colSpan: w,
@@ -1307,132 +1303,128 @@ const we = (e) => {
1307
1303
  gridColumn: O + 1,
1308
1304
  gridBand: ie({ gridRow: A })
1309
1305
  }), f(T, O, w, D);
1310
- }), n.fillSingleRows ? Ot(r, t) : r;
1311
- }, De = (e, t, n, o = H) => {
1312
- const r = e.filter((u) => $.isFun(u.item.show?.form, t, n)), a = /* @__PURE__ */ new Map();
1313
- e.forEach((u) => {
1314
- const d = `${u.gridBand ?? ie(u)}:${u.gridColumn}:${u.colSpan}`;
1315
- a.has(d) || a.set(d, []), a.get(d).push(u);
1306
+ }), n.fillSingleRows ? Ut(s, t) : s;
1307
+ }, Oe = (e, t, n, a = H) => {
1308
+ const s = e.filter((i) => $.isFun(i.item.show?.form, t, n)), o = /* @__PURE__ */ new Map();
1309
+ e.forEach((i) => {
1310
+ const u = `${i.gridBand ?? ie(i)}:${i.gridColumn}:${i.colSpan}`;
1311
+ o.has(u) || o.set(u, []), o.get(u).push(i);
1316
1312
  });
1317
- const i = /* @__PURE__ */ new Map();
1318
- return a.forEach((u) => {
1319
- const c = u.reduce((f, m) => f + m.rowSpan, 0);
1320
- if (!(u.length > 1 && c === H && u.every((f) => f.rowSpan < H))) return;
1321
- const s = u.filter((f) => $.isFun(f.item.show?.form, t, n));
1322
- if (s.length !== 1) return;
1323
- const h = s[0];
1324
- i.set(h.item.key, {
1313
+ const l = /* @__PURE__ */ new Map();
1314
+ return o.forEach((i) => {
1315
+ const c = i.reduce((f, m) => f + m.rowSpan, 0);
1316
+ if (!(i.length > 1 && c === H && i.every((f) => f.rowSpan < H))) return;
1317
+ const d = i.filter((f) => $.isFun(f.item.show?.form, t, n));
1318
+ if (d.length !== 1) return;
1319
+ const h = d[0];
1320
+ l.set(h.item.key, {
1325
1321
  ...h,
1326
1322
  rowSpan: H
1327
1323
  });
1328
- }), We(r.map((u) => i.get(u.item.key) || u), o, {
1324
+ }), Xe(s.map((i) => l.get(i.item.key) || i), a, {
1329
1325
  fillSingleRows: !0
1330
1326
  });
1331
- }, Je = (e) => {
1327
+ }, Ye = (e) => {
1332
1328
  const t = /* @__PURE__ */ new Map();
1333
1329
  return e.forEach((n) => {
1334
- const o = n.gridBand ?? ie(n);
1335
- t.has(o) || t.set(o, []), t.get(o).push(n);
1336
- }), Array.from(t.keys()).sort((n, o) => n - o).map((n) => t.get(n));
1337
- }, qe = (e) => e?.length ? Array.isArray(e[0]) ? e.flat() : e : [], Rt = (e, t) => {
1338
- if (!Ft(e) || !e.key) return null;
1339
- const n = t.defaultSpan ?? (t.maxSpan || 12) / 2, o = Dt(e, n, t.layout);
1340
- return { item: e, span: o };
1341
- }, Ut = (e, t = {}) => {
1342
- const n = [], o = (r) => {
1343
- if (r.children?.length) {
1344
- r.children.forEach((i) => o(i));
1330
+ const a = n.gridBand ?? ie(n);
1331
+ t.has(a) || t.set(a, []), t.get(a).push(n);
1332
+ }), Array.from(t.keys()).sort((n, a) => n - a).map((n) => t.get(n));
1333
+ }, Ze = (e) => e?.length ? Array.isArray(e[0]) ? e.flat() : e : [], At = (e, t) => {
1334
+ if (!Ot(e) || !e.key) return null;
1335
+ const n = t.defaultSpan ?? (t.maxSpan || 12) / 2, a = Rt(e, n, t.layout);
1336
+ return { item: e, span: a };
1337
+ }, Bt = (e, t = {}) => {
1338
+ const n = [], a = (s) => {
1339
+ if (s.children?.length) {
1340
+ s.children.forEach((l) => a(l));
1345
1341
  return;
1346
1342
  }
1347
- const a = Rt(r, t);
1348
- a && n.push(a);
1343
+ const o = At(s, t);
1344
+ o && n.push(o);
1349
1345
  };
1350
- return e.forEach((r) => o(r)), n;
1351
- }, Qe = (e, t = {}) => {
1352
- const n = t.maxSpan ?? 12, o = t.defaultSpan ?? n / 2, r = t.layout ?? "row", i = Ut(e, { maxSpan: n, defaultSpan: o, layout: r });
1353
- if (r === "column") {
1354
- const u = [];
1346
+ return e.forEach((s) => a(s)), n;
1347
+ }, _e = (e, t = {}) => {
1348
+ const n = t.maxSpan ?? 12, a = t.defaultSpan ?? n / 2, s = t.layout ?? "row", l = Bt(e, { maxSpan: n, defaultSpan: a, layout: s });
1349
+ if (s === "column") {
1350
+ const i = [];
1355
1351
  let c = 1;
1356
- return i.forEach((d) => {
1357
- const s = Pe(d.item), h = n;
1358
- u.push({
1359
- ...d,
1352
+ return l.forEach((u) => {
1353
+ const d = He(u.item), h = n;
1354
+ i.push({
1355
+ ...u,
1360
1356
  span: h,
1361
1357
  colSpan: h,
1362
- rowSpan: s,
1358
+ rowSpan: d,
1363
1359
  gridRow: c,
1364
1360
  gridColumn: 1,
1365
1361
  gridBand: ie({ gridRow: c })
1366
- }), c += s;
1367
- }), { cells: u, maxSpan: n };
1362
+ }), c += d;
1363
+ }), { cells: i, maxSpan: n };
1368
1364
  }
1369
- return { cells: We(i, n), maxSpan: n };
1370
- }, At = (e) => e.map((t) => t.item?.show?.form), Bt = (e, t, n) => {
1365
+ return { cells: Xe(l, n), maxSpan: n };
1366
+ }, Tt = (e) => e.map((t) => t.item?.show?.form), Lt = (e, t, n) => {
1371
1367
  if (!e.rules) return;
1372
- const o = {
1368
+ const a = {
1373
1369
  required: !0,
1374
1370
  message: t(e),
1375
1371
  trigger: "blur"
1376
- }, r = le(e), a = e.options?.datetime?.type, i = r === "datetime" && typeof a == "string" && a.includes("range"), u = r === "select" && !!e.options?.select?.multiple;
1377
- (i || r === "checkbox" || u) && (o.type = "array", o.min = i ? 2 : 1);
1378
- const c = typeof e.rules == "boolean" ? [o] : e.rules;
1379
- return n ? c.map((d) => n(d)) : c;
1380
- }, Xe = (e) => (t, n) => Bt(t, e, (o) => {
1381
- const r = (i) => {
1382
- if (!n || !Object.prototype.hasOwnProperty.call(n, t.key)) return i;
1383
- const u = n[t.key];
1384
- return u === void 0 ? i : u;
1385
- }, a = (i) => {
1386
- const u = r(i);
1387
- return typeof o.transform == "function" ? o.transform(u) : u;
1372
+ }, s = le(e), o = e.options?.datetime?.type, l = s === "datetime" && typeof o == "string" && o.includes("range"), i = s === "select" && !!e.options?.select?.multiple;
1373
+ (l || s === "checkbox" || i) && (a.type = "array", a.min = l ? 2 : 1);
1374
+ const c = typeof e.rules == "boolean" ? [a] : e.rules;
1375
+ return n ? c.map((u) => n(u)) : c;
1376
+ }, Ue = (e) => typeof e == "function" ? e() : e, et = (e) => (t, n) => Lt(t, e, (a) => {
1377
+ const s = (o, l) => {
1378
+ if (l && Object.prototype.hasOwnProperty.call(l, t.key) && l[t.key] !== void 0) return l[t.key];
1379
+ const i = Ue(n);
1380
+ return i && Object.prototype.hasOwnProperty.call(i, t.key) ? i[t.key] : o;
1388
1381
  };
1389
- if (o.validator) {
1390
- const i = o.validator;
1382
+ if (a.validator) {
1383
+ const o = a.validator;
1391
1384
  return {
1392
- ...o,
1393
- transform: a,
1394
- validator: (u, c, d) => i(u, c, d, n)
1385
+ ...a,
1386
+ validator: (l, i, c, u) => {
1387
+ const d = Ue(n);
1388
+ return o(l, s(i, u), c, d || u);
1389
+ }
1395
1390
  };
1396
1391
  }
1397
- return {
1398
- ...o,
1399
- transform: a
1400
- };
1401
- }), Ye = (e, t) => {
1392
+ return a;
1393
+ }), tt = (e, t) => {
1402
1394
  const n = {
1403
1395
  input: C.tCurd("placeholderInput"),
1404
1396
  select: C.tCurd("placeholderSelect")
1405
- }, o = (n[le(e) || "input"] || n.input) + e.label;
1406
- return (t || W.error.callback)?.(e.key, e) || o;
1407
- }, Ze = (e) => Xe((t) => Ye(t, e?.error)), Tt = (e, t, n) => {
1408
- const o = {}, r = {}, a = t?.maxSpan || 12, i = t?.defaultSpan || a / 2, u = Ze(t);
1409
- e.forEach((s) => ve(s, !0)), Fe(e, o, r, (s) => u(s, n));
1410
- const { cells: c, maxSpan: d } = Qe(e, {
1411
- maxSpan: a,
1412
- defaultSpan: i,
1397
+ }, a = (n[le(e) || "input"] || n.input) + e.label;
1398
+ return (t || W.error.callback)?.(e.key, e) || a;
1399
+ }, ot = (e) => et((t) => tt(t, e?.error)), jt = (e, t, n) => {
1400
+ const a = {}, s = {}, o = t?.maxSpan || 12, l = t?.defaultSpan || o / 2, i = ot(t);
1401
+ e.forEach((d) => ve(d, !0)), Fe(e, a, s, (d) => i(d, n));
1402
+ const { cells: c, maxSpan: u } = _e(e, {
1403
+ maxSpan: o,
1404
+ defaultSpan: l,
1413
1405
  layout: t?.layout
1414
1406
  });
1415
1407
  return {
1416
- formDefault: o,
1417
- rules: r,
1408
+ formDefault: a,
1409
+ rules: s,
1418
1410
  formGrid: c,
1419
- formMaxSpan: d,
1420
- formColumn: Je(c)
1411
+ formMaxSpan: u,
1412
+ formColumn: Ye(c)
1421
1413
  };
1422
- }, Fe = (e, t, n, o) => {
1423
- const r = (a) => {
1424
- if (a.children?.length) {
1425
- a.children.forEach((i) => r(i));
1414
+ }, Fe = (e, t, n, a) => {
1415
+ const s = (o) => {
1416
+ if (o.children?.length) {
1417
+ o.children.forEach((l) => s(l));
1426
1418
  return;
1427
1419
  }
1428
- if (a.key) {
1429
- t[a.key] = a.value;
1430
- const i = o(a);
1431
- i && (n[a.key] = i);
1420
+ if (o.key) {
1421
+ t[o.key] = o.value;
1422
+ const l = a(o);
1423
+ l && (n[o.key] = l);
1432
1424
  }
1433
1425
  };
1434
- e.forEach(r);
1435
- }, Lt = { class: "curd-form-cell-inner" }, _e = /* @__PURE__ */ q({
1426
+ e.forEach(s);
1427
+ }, Kt = { class: "curd-form-cell-inner" }, at = /* @__PURE__ */ q({
1436
1428
  __name: "layout",
1437
1429
  props: {
1438
1430
  formGrid: {},
@@ -1447,53 +1439,53 @@ const we = (e) => {
1447
1439
  getDisabled: { type: Function }
1448
1440
  },
1449
1441
  setup(e) {
1450
- const t = $.isFun, n = e, o = ae(() => De(n.formGrid, n.form, n.type, n.maxSpan)), r = ae(() => {
1442
+ const t = $.isFun, n = e, a = ae(() => Oe(n.formGrid, n.form, n.type, n.maxSpan)), s = ae(() => {
1451
1443
  const f = Array.from(
1452
1444
  new Set(
1453
- o.value.map((m) => m.gridBand ?? ie(m))
1445
+ a.value.map((m) => m.gridBand ?? ie(m))
1454
1446
  )
1455
1447
  ).sort((m, w) => m - w);
1456
1448
  return new Map(f.map((m, w) => [m, w]));
1457
- }), a = ae(() => ({
1449
+ }), o = ae(() => ({
1458
1450
  gridTemplateColumns: `repeat(${n.maxSpan}, minmax(0, 1fr))`
1459
- })), i = ae(() => {
1451
+ })), l = ae(() => {
1460
1452
  let f = 0;
1461
- return o.value.forEach((m) => {
1453
+ return a.value.forEach((m) => {
1462
1454
  const w = m.gridRow + m.rowSpan - 1;
1463
1455
  w > f && (f = w);
1464
1456
  }), f;
1465
- }), u = (f) => f.gridRow + f.rowSpan - 1 >= i.value, c = (f) => f.rowSpan >= H, d = (f) => {
1457
+ }), i = (f) => f.gridRow + f.rowSpan - 1 >= l.value, c = (f) => f.rowSpan >= H, u = (f) => {
1466
1458
  const m = f.gridBand ?? ie(f);
1467
- return r.value.get(m) ?? m;
1468
- }, s = (f) => He(f, o.value, n.form, n.type, {
1459
+ return s.value.get(m) ?? m;
1460
+ }, d = (f) => Qe(f, a.value, n.form, n.type, {
1469
1461
  maxSpan: n.maxSpan,
1470
1462
  defaultSpan: n.formOption?.defaultSpan
1471
1463
  }), h = (f) => {
1472
- const m = s(f) || f.colSpan;
1464
+ const m = d(f) || f.colSpan;
1473
1465
  return {
1474
1466
  gridRow: `${f.gridRow} / span ${f.rowSpan}`,
1475
1467
  gridColumn: `${f.gridColumn} / span ${m}`
1476
1468
  };
1477
1469
  };
1478
- return (f, m) => l(t)(l(At)(e.formGrid), e.form, e.type) ? (g(), v(B, { key: 0 }, [
1470
+ return (f, m) => r(t)(r(Tt)(e.formGrid), e.form, e.type) ? (g(), v(B, { key: 0 }, [
1479
1471
  S(f.$slots, "form-start", { row: e.form }),
1480
1472
  R("div", {
1481
1473
  class: J(["curd-form-grid", { stripe: e.stripe !== !1 }]),
1482
- style: pe(a.value)
1474
+ style: pe(o.value)
1483
1475
  }, [
1484
- (g(!0), v(B, null, G(o.value, (w) => (g(), v("div", {
1476
+ (g(!0), v(B, null, N(a.value, (w) => (g(), v("div", {
1485
1477
  key: w.item.key,
1486
1478
  class: J(["curd-form-grid-cell", [
1487
- e.stripe !== !1 && d(w) % 2 === 0 ? "stripe-band-odd" : "",
1479
+ e.stripe !== !1 && u(w) % 2 === 0 ? "stripe-band-odd" : "",
1488
1480
  w.gridColumn > 1 ? "has-col-border" : "",
1489
- e.stripe !== !1 && u(w) ? "is-last-row" : "",
1481
+ e.stripe !== !1 && i(w) ? "is-last-row" : "",
1490
1482
  c(w) ? "is-row-span" : "",
1491
1483
  `form-item-col-${w.item.key}`
1492
1484
  ]]),
1493
1485
  style: pe(h(w))
1494
1486
  }, [
1495
- R("div", Lt, [
1496
- l(t)(w.item.show?.form, e.form, e.type) ? (g(), b(Et, {
1487
+ R("div", Kt, [
1488
+ r(t)(w.item.show?.form, e.form, e.type) ? (g(), b(zt, {
1497
1489
  key: 0,
1498
1490
  class: J({ "is-row-span-field": c(w) }),
1499
1491
  item: w.item,
@@ -1504,7 +1496,7 @@ const we = (e) => {
1504
1496
  "get-on": e.getOn,
1505
1497
  "get-disabled": e.getDisabled
1506
1498
  }, Y({ _: 2 }, [
1507
- G(f.$slots, (D, T) => ({
1499
+ N(f.$slots, (D, T) => ({
1508
1500
  name: T,
1509
1501
  fn: p((O) => [
1510
1502
  S(f.$slots, T, x({ ref_for: !0 }, O || {}))
@@ -1517,7 +1509,7 @@ const we = (e) => {
1517
1509
  S(f.$slots, "form-end", { row: e.form })
1518
1510
  ], 64)) : V("", !0);
1519
1511
  }
1520
- }), jt = /* @__PURE__ */ q({
1512
+ }), Pt = /* @__PURE__ */ q({
1521
1513
  __name: "column",
1522
1514
  props: {
1523
1515
  option: {
@@ -1534,61 +1526,62 @@ const we = (e) => {
1534
1526
  }
1535
1527
  },
1536
1528
  setup(e, { expose: t }) {
1537
- const n = $.EDialog, o = X(), r = e;
1538
- let a = we(r.form);
1539
- const i = Me.getConf("curdConf"), u = "formRef-" + StrUtil.getId();
1540
- Le(() => {
1541
- i?.formRef?.remove(u);
1529
+ const n = $.EDialog, a = X(), s = e;
1530
+ let o = we(s.form);
1531
+ const l = Me.getConf("curdConf"), i = "formRef-" + StrUtil.getId();
1532
+ Pe(() => {
1533
+ l?.formRef?.remove(i);
1542
1534
  });
1543
1535
  const c = re({
1544
1536
  rules: {},
1545
1537
  show: !0,
1546
1538
  formDefault: {},
1547
- type: r.type || i?.update?.type || n.Add,
1539
+ type: s.type || l?.update?.type || n.Add,
1548
1540
  formColumn: [],
1549
1541
  formGrid: [],
1550
1542
  formMaxSpan: 12,
1551
1543
  get form() {
1552
- return a.get();
1544
+ return o.get();
1553
1545
  },
1554
- set form(d) {
1555
- a.set(d);
1546
+ set form(u) {
1547
+ o.set(u);
1556
1548
  },
1557
- getDisabled: (d) => Ie(d, c.type, c.form),
1558
- getBind: (d) => Ne(d, c.type),
1559
- getOn: (d) => Ge(d, c.type, [c.form, d]),
1549
+ getDisabled: (u) => We(u, c.type, c.form),
1550
+ getBind: (u) => Je(u, c.type),
1551
+ getOn: (u) => qe(u, c.type, [c.form, u]),
1560
1552
  initColumnForm: () => {
1561
- const d = a, s = Tt(r.option.column, r.option.form, d.get());
1562
- c.formDefault = s.formDefault, c.rules = s.rules, c.formGrid = s.formGrid, c.formMaxSpan = s.formMaxSpan, c.formColumn = s.formColumn, c.type === n.Add ? d.isExternal() ? d.merge(JSONUtil.cp(c.formDefault)) : d.set(JSONUtil.cp(c.formDefault)) : !d.isExternal() && r.form && d.set(JSONUtil.cp(r.form));
1553
+ const u = o, d = jt(s.option.column, s.option.form, () => u.get());
1554
+ c.formDefault = d.formDefault, c.rules = d.rules, c.formGrid = d.formGrid, c.formMaxSpan = d.formMaxSpan, c.formColumn = d.formColumn, c.type === n.Add ? u.isExternal() ? u.merge(JSONUtil.cp(c.formDefault)) : u.set(JSONUtil.cp(c.formDefault)) : !u.isExternal() && s.form && u.set(JSONUtil.cp(s.form));
1563
1555
  }
1564
1556
  });
1565
- return i?.formRef?.set(u, {
1566
- validate: async (d) => {
1567
- const s = o.value;
1568
- if (!s)
1569
- return d?.(!0), !0;
1570
- const h = De(c.formGrid || [], c.form, c.type, c.formMaxSpan).map((w) => w.item.key).filter(Boolean), f = Object.keys(c.rules || {}).filter((w) => !h.includes(w));
1571
- if (f.length && s.clearValidate(f), !h.length)
1572
- return d?.(!0), !0;
1573
- const m = await s.validateField(h, async (w, D) => {
1557
+ return l?.formRef?.set(i, {
1558
+ validate: async (u) => {
1559
+ const d = a.value;
1560
+ if (!d)
1561
+ return u?.(!0), !0;
1562
+ await De();
1563
+ const h = Oe(c.formGrid || [], c.form, c.type, c.formMaxSpan).map((w) => w.item.key).filter(Boolean), f = Object.keys(c.rules || {}).filter((w) => !h.includes(w));
1564
+ if (f.length && d.clearValidate(f), !h.length)
1565
+ return u?.(!0), !0;
1566
+ const m = await d.validateField(h, async (w, D) => {
1574
1567
  w || me(ke(D));
1575
1568
  });
1576
- if (d?.(!!m), !m) throw !1;
1569
+ if (u?.(!!m), !m) throw !1;
1577
1570
  return !0;
1578
1571
  }
1579
- }), r.option.form?.initStart?.(c), c.initColumnForm(), r.option.form?.initEnd?.(c), gt(
1580
- () => r.form,
1581
- (d) => {
1582
- a = we(d), c.initColumnForm();
1572
+ }), s.option.form?.initStart?.(c), c.initColumnForm(), s.option.form?.initEnd?.(c), Ke(
1573
+ () => s.form,
1574
+ (u) => {
1575
+ o = we(u), c.initColumnForm();
1583
1576
  }
1584
- ), t({ ref: o, conf: c }), (d, s) => (g(), b(l(oe), {
1577
+ ), t({ ref: a, conf: c }), (u, d) => (g(), b(r(oe), {
1585
1578
  ref_key: "ruleFormRef",
1586
- ref: o,
1579
+ ref: a,
1587
1580
  model: c.form,
1588
1581
  rules: c.rules
1589
1582
  }, {
1590
1583
  default: p(() => [
1591
- c.show ? (g(), b(_e, {
1584
+ c.show ? (g(), b(at, {
1592
1585
  key: 0,
1593
1586
  "form-grid": c.formGrid,
1594
1587
  "max-span": c.formMaxSpan,
@@ -1601,10 +1594,10 @@ const we = (e) => {
1601
1594
  "get-on": c.getOn,
1602
1595
  "get-disabled": c.getDisabled
1603
1596
  }, Y({ _: 2 }, [
1604
- G(d.$slots, (h, f) => ({
1597
+ N(u.$slots, (h, f) => ({
1605
1598
  name: f,
1606
1599
  fn: p((m) => [
1607
- S(d.$slots, f, $e(ze(m || {})))
1600
+ S(u.$slots, f, $e(ze(m || {})))
1608
1601
  ])
1609
1602
  }))
1610
1603
  ]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : V("", !0)
@@ -1612,23 +1605,23 @@ const we = (e) => {
1612
1605
  _: 3
1613
1606
  }, 8, ["model", "rules"]));
1614
1607
  }
1615
- }), Kt = (e) => e?.value || e, Pt = (e) => {
1616
- const t = Kt(e);
1617
- return t?.validate ? new Promise((n, o) => {
1618
- let r = !1;
1619
- const a = (i, u) => {
1620
- r || (r = !0, i === !1 ? (me(ke(u)), o(!1)) : n(!0));
1608
+ }), It = (e) => e?.value || e, Gt = (e) => {
1609
+ const t = It(e);
1610
+ return t?.validate ? new Promise((n, a) => {
1611
+ let s = !1;
1612
+ const o = (l, i) => {
1613
+ s || (s = !0, l === !1 ? (me(ke(i)), a(!1)) : n(!0));
1621
1614
  };
1622
1615
  try {
1623
- const i = t.validate(a);
1624
- i && typeof i.then == "function" ? i.then((u) => a(u)).catch((u) => {
1625
- me(ke(u?.fields || u)), o(u);
1626
- }) : (i !== void 0 || t.validate.length === 0) && a(i);
1627
- } catch (i) {
1628
- o(i);
1616
+ const l = t.validate(o);
1617
+ l && typeof l.then == "function" ? l.then((i) => o(i)).catch((i) => {
1618
+ me(ke(i?.fields || i)), a(i);
1619
+ }) : (l !== void 0 || t.validate.length === 0) && o(l);
1620
+ } catch (l) {
1621
+ a(l);
1629
1622
  }
1630
1623
  }) : Promise.resolve(!0);
1631
- }, It = () => {
1624
+ }, Nt = () => {
1632
1625
  const e = re({
1633
1626
  formRef: {
1634
1627
  map: {},
@@ -1640,7 +1633,7 @@ const we = (e) => {
1640
1633
  },
1641
1634
  validate() {
1642
1635
  const t = Object.keys(e.formRef.map).map((n) => e.formRef.map[n]);
1643
- return Promise.all(t.map((n) => Pt(n))).then(() => !0);
1636
+ return Promise.all(t.map((n) => Gt(n))).then(() => !0);
1644
1637
  }
1645
1638
  },
1646
1639
  /**
@@ -1659,20 +1652,20 @@ const we = (e) => {
1659
1652
  * } }, 'formRef-1')
1660
1653
  * @returns
1661
1654
  */
1662
- regFormRef(t, n, o) {
1663
- t ? o ? e.formRef.set(n, {
1664
- validate: async (r) => {
1655
+ regFormRef(t, n, a) {
1656
+ t ? a ? e.formRef.set(n, {
1657
+ validate: async (s) => {
1665
1658
  try {
1666
- r(await o());
1659
+ s(await a());
1667
1660
  } catch {
1668
- r(!1);
1661
+ s(!1);
1669
1662
  }
1670
1663
  }
1671
1664
  }) : e.formRef.set(n, t) : e.formRef.remove(n);
1672
1665
  }
1673
1666
  });
1674
1667
  return e;
1675
- }, Nt = (e, t) => {
1668
+ }, Ht = (e, t) => {
1676
1669
  const n = we(() => t.searchForm);
1677
1670
  return {
1678
1671
  search: {
@@ -1682,35 +1675,35 @@ const we = (e) => {
1682
1675
  get form() {
1683
1676
  return n.get();
1684
1677
  },
1685
- set form(o) {
1686
- n.set(o);
1678
+ set form(a) {
1679
+ n.set(a);
1687
1680
  },
1688
1681
  formDefault: {},
1689
- getPlaceholder: (o, r = C.tCurd("placeholderInput")) => o.text?.search?.placeholder === void 0 ? `${r}${o.label}` : o.text?.search?.placeholder,
1682
+ getPlaceholder: (a, s = C.tCurd("placeholderInput")) => a.text?.search?.placeholder === void 0 ? `${s}${a.label}` : a.text?.search?.placeholder,
1690
1683
  getFormData: () => {
1691
- const o = e();
1692
- let r = {};
1693
- t.option.column.forEach((i) => {
1694
- (typeof i.show?.search == "function" ? i.show?.search(o.search.form) : i.show?.search) && (r[i.key] = o.search.form[i.key]);
1684
+ const a = e();
1685
+ let s = {};
1686
+ t.option.column.forEach((l) => {
1687
+ (typeof l.show?.search == "function" ? l.show?.search(a.search.form) : l.show?.search) && (s[l.key] = a.search.form[l.key]);
1695
1688
  });
1696
- const a = t.option.search?.before?.(r);
1697
- return a && (r = a), r;
1689
+ const o = t.option.search?.before?.(s);
1690
+ return o && (s = o), s;
1698
1691
  },
1699
1692
  reset: () => {
1700
- const o = e(), r = o.search.formDefault;
1701
- Object.keys(r).forEach((i) => {
1702
- t.option.search?.resetMode === "none" ? r[i] = void 0 : r[i] = o.search.formDefault[i];
1693
+ const a = e(), s = a.search.formDefault;
1694
+ Object.keys(s).forEach((l) => {
1695
+ t.option.search?.resetMode === "none" ? s[l] = void 0 : s[l] = a.search.formDefault[l];
1703
1696
  });
1704
- const a = ObjectUtil.deepMerge(r, {});
1705
- Z.setValue(o.search.form, a, !0), o.page.num = 1, t.option.init !== !1 && o.table.getList();
1697
+ const o = ObjectUtil.deepMerge(s, {});
1698
+ Z.setValue(a.search.form, o, !0), a.page.num = 1, t.option.init !== !1 && a.table.getList();
1706
1699
  },
1707
1700
  submit: () => {
1708
- const o = e();
1709
- o.page.num = 1, o.table.getList();
1701
+ const a = e();
1702
+ a.page.num = 1, a.table.getList();
1710
1703
  }
1711
1704
  }
1712
1705
  };
1713
- }, Gt = (e, t) => ({
1706
+ }, Wt = (e, t) => ({
1714
1707
  page: {
1715
1708
  num: 1,
1716
1709
  total: 0,
@@ -1720,40 +1713,40 @@ const we = (e) => {
1720
1713
  sizeList: t.option.page?.sizeList || L.config.pagination.pageSizes,
1721
1714
  pagerCount: t.option.page?.pagerCount || L.config.pagination.pagerCount,
1722
1715
  getQuery: (n = {}) => {
1723
- const o = e();
1716
+ const a = e();
1724
1717
  return {
1725
- [L.config.field.page.size]: n.size || o.page.size,
1726
- [L.config.field.page.num]: n.num || o.page.num,
1727
- ...o.search.getFormData()
1718
+ [L.config.field.page.size]: n.size || a.page.size,
1719
+ [L.config.field.page.num]: n.num || a.page.num,
1720
+ ...a.search.getFormData()
1728
1721
  };
1729
1722
  }
1730
1723
  }
1731
- }), Ht = (e, t, n) => ({
1724
+ }), Jt = (e, t, n) => ({
1732
1725
  table: {
1733
1726
  op: {
1734
- width: (...o) => o.filter((a) => a).length * 30 + 60
1727
+ width: (...a) => a.filter((o) => o).length * 30 + 60
1735
1728
  },
1736
1729
  loading: !1,
1737
1730
  data: [],
1738
1731
  expand: {
1739
1732
  isExpand: !1,
1740
1733
  rowKeys: [],
1741
- change: (o, r) => {
1734
+ change: (a, s) => {
1742
1735
  },
1743
1736
  all: () => {
1744
- const o = e();
1745
- if (o.table.expand.isExpand)
1746
- o.table.expand.rowKeys = [];
1737
+ const a = e();
1738
+ if (a.table.expand.isExpand)
1739
+ a.table.expand.rowKeys = [];
1747
1740
  else {
1748
- const r = (a) => {
1749
- let i = [];
1750
- return a.forEach((u) => {
1751
- i.push(u[t.option.table.rowKey]), u.children?.length && (i = i.concat(r(u.children)));
1752
- }), i;
1741
+ const s = (o) => {
1742
+ let l = [];
1743
+ return o.forEach((i) => {
1744
+ l.push(i[t.option.table.rowKey]), i.children?.length && (l = l.concat(s(i.children)));
1745
+ }), l;
1753
1746
  };
1754
- o.table.expand.rowKeys = r(o.table.data);
1747
+ a.table.expand.rowKeys = s(a.table.data);
1755
1748
  }
1756
- o.table.expand.isExpand = !o.table.expand.isExpand;
1749
+ a.table.expand.isExpand = !a.table.expand.isExpand;
1757
1750
  }
1758
1751
  },
1759
1752
  column: {
@@ -1767,114 +1760,114 @@ const we = (e) => {
1767
1760
  group: {
1768
1761
  expand: !1,
1769
1762
  toggleExpandAll: () => {
1770
- const o = e(), r = !o.table.header.group.expand;
1771
- o.table.header.group.expand = r;
1772
- const a = (i) => {
1773
- i.forEach((u) => {
1774
- u.table?.header?.group !== void 0 && (u.table.header.group = !r), u.table?.header?.groupKey !== void 0 && (u.table.header.show = r), Array.isArray(u.children) && u.children.length && a(u.children);
1763
+ const a = e(), s = !a.table.header.group.expand;
1764
+ a.table.header.group.expand = s;
1765
+ const o = (l) => {
1766
+ l.forEach((i) => {
1767
+ i.table?.header?.group !== void 0 && (i.table.header.group = !s), i.table?.header?.groupKey !== void 0 && (i.table.header.show = s), Array.isArray(i.children) && i.children.length && o(i.children);
1775
1768
  });
1776
1769
  };
1777
- a(o.table.column.list);
1770
+ o(a.table.column.list);
1778
1771
  }
1779
1772
  }
1780
1773
  },
1781
1774
  getList: async () => {
1782
- const o = e();
1783
- o.table.loading = !0;
1784
- const r = t.option.api.list, a = JSONUtil.cp(o.table.selection.list);
1775
+ const a = e();
1776
+ a.table.loading = !0;
1777
+ const s = t.option.api.list, o = JSONUtil.cp(a.table.selection.list);
1785
1778
  try {
1786
- await o.initApiData("init");
1787
- let i = {};
1788
- if (o.table.sort.prop) {
1779
+ await a.initApiData("init");
1780
+ let l = {};
1781
+ if (a.table.sort.prop) {
1789
1782
  const { props: w, order: D } = L.config.table.sort;
1790
- i = {
1791
- [w.field]: o.table.sort.prop,
1792
- [D.field]: o.table.sort.order
1783
+ l = {
1784
+ [w.field]: a.table.sort.prop,
1785
+ [D.field]: a.table.sort.order
1793
1786
  };
1794
1787
  }
1795
- const u = await r({
1796
- ...o.page.getQuery(),
1797
- ...i
1798
- }), c = L.config.field.result, d = u.data || { [c.list]: u }, s = (Array.isArray(d[c.list]), d[c.list]), h = qe(o.update.formGrid?.length ? o.update.formGrid : o.update.formColumn), m = ObjectUtil.deepMerge({ data: s }, {}).data.map((w) => (Object.keys(w).forEach((T) => {
1788
+ const i = await s({
1789
+ ...a.page.getQuery(),
1790
+ ...l
1791
+ }), c = L.config.field.result, u = i.data || { [c.list]: i }, d = (Array.isArray(u[c.list]), u[c.list]), h = Ze(a.update.formGrid?.length ? a.update.formGrid : a.update.formColumn), m = ObjectUtil.deepMerge({ data: d }, {}).data.map((w) => (Object.keys(w).forEach((T) => {
1799
1792
  const O = h.find((A) => A.item.key === T);
1800
1793
  O && ["select", "radio"].includes(O.item.type) && (O.item.table.format || (O.item.table.format = (A) => O.item.options[O.item.type].data?.find((de) => de.value == A[T])?.label || A[T]));
1801
1794
  }), w));
1802
- o.table.data = t.option.data ? await t.option.data(m, s) : m, o.tableEditValidate?.clear?.(), o.page.total = d[c.total] || 0, setTimeout(() => {
1803
- o.table.selection.setList(a);
1795
+ a.table.data = t.option.data ? await t.option.data(m, d) : m, a.tableEditValidate?.clear?.(), a.page.total = u[c.total] || 0, setTimeout(() => {
1796
+ a.table.selection.setList(o);
1804
1797
  }, 20);
1805
- } catch (i) {
1806
- console.error(i);
1798
+ } catch (l) {
1799
+ console.error(l);
1807
1800
  } finally {
1808
- o.table.loading = !1;
1801
+ a.table.loading = !1;
1809
1802
  }
1810
1803
  },
1811
1804
  selection: {
1812
1805
  list: [],
1813
- change: (o) => {
1814
- e().table.selection.list = o;
1806
+ change: (a) => {
1807
+ e().table.selection.list = a;
1815
1808
  },
1816
- setList: (o, r) => {
1817
- const a = e();
1818
- a.table.selection.list = [];
1819
- const i = n.tableRef.value;
1820
- if (i?.clearSelection(), !i || !o?.length) return;
1821
- const u = t.option.table?.rowKey, c = (d) => {
1822
- const s = (h) => {
1809
+ setList: (a, s) => {
1810
+ const o = e();
1811
+ o.table.selection.list = [];
1812
+ const l = n.tableRef.value;
1813
+ if (l?.clearSelection(), !l || !a?.length) return;
1814
+ const i = t.option.table?.rowKey, c = (u) => {
1815
+ const d = (h) => {
1823
1816
  for (const f of h) {
1824
- if (u != null && u !== "") {
1825
- if (f[u] === d[u]) return f;
1826
- } else if (f === d)
1817
+ if (i != null && i !== "") {
1818
+ if (f[i] === u[i]) return f;
1819
+ } else if (f === u)
1827
1820
  return f;
1828
1821
  if (Array.isArray(f.children) && f.children.length) {
1829
- const m = s(f.children);
1822
+ const m = d(f.children);
1830
1823
  if (m !== void 0) return m;
1831
1824
  }
1832
1825
  }
1833
1826
  };
1834
- return s(a.table.data);
1827
+ return d(o.table.data);
1835
1828
  };
1836
- o.forEach((d) => {
1837
- const s = c(d);
1838
- if (s)
1839
- if (r) {
1840
- const h = () => i.toggleRowSelection(s, !0, !1);
1841
- r(d) !== !1 && h();
1829
+ a.forEach((u) => {
1830
+ const d = c(u);
1831
+ if (d)
1832
+ if (s) {
1833
+ const h = () => l.toggleRowSelection(d, !0, !1);
1834
+ s(u) !== !1 && h();
1842
1835
  } else
1843
- i.toggleRowSelection(s, !0, !1);
1836
+ l.toggleRowSelection(d, !0, !1);
1844
1837
  });
1845
1838
  }
1846
1839
  },
1847
1840
  sort: {
1848
1841
  prop: "",
1849
1842
  order: "",
1850
- change: (o) => {
1851
- const r = e();
1852
- L.config.table.sort.resetPage && (r.page.num = 1);
1853
- const a = L.config.table.sort;
1854
- if (a.change) {
1855
- a.change(o, r);
1843
+ change: (a) => {
1844
+ const s = e();
1845
+ L.config.table.sort.resetPage && (s.page.num = 1);
1846
+ const o = L.config.table.sort;
1847
+ if (o.change) {
1848
+ o.change(a, s);
1856
1849
  return;
1857
1850
  }
1858
- r.table.sort.prop = o.prop, o.order === null ? (r.table.sort.order = "", r.table.sort.prop = "") : r.table.sort.order = o.order === "ascending" ? a.order.asc : a.order.desc, r.table.getList();
1851
+ s.table.sort.prop = a.prop, a.order === null ? (s.table.sort.order = "", s.table.sort.prop = "") : s.table.sort.order = a.order === "ascending" ? o.order.asc : o.order.desc, s.table.getList();
1859
1852
  }
1860
1853
  }
1861
1854
  }
1862
- }), Wt = (e, t) => {
1863
- const n = re({}), o = /* @__PURE__ */ new WeakMap();
1864
- let r = 0;
1865
- const a = (y) => {
1866
- let k = o.get(y);
1867
- return k || (r += 1, k = `fallback-${r}`, o.set(y, k)), k;
1868
- }, i = (y) => {
1855
+ }), qt = (e, t) => {
1856
+ const n = re({}), a = /* @__PURE__ */ new WeakMap();
1857
+ let s = 0;
1858
+ const o = (y) => {
1859
+ let k = a.get(y);
1860
+ return k || (s += 1, k = `fallback-${s}`, a.set(y, k)), k;
1861
+ }, l = (y) => {
1869
1862
  const k = t.option.table?.rowKey, z = k ? y[k] : void 0;
1870
- return z != null && z !== "" ? String(z) : a(y);
1871
- }, u = (y, k) => `${i(y)}-${k.key}`, c = (y) => Ye(y, t.option.form?.error), d = Xe(c), s = () => {
1863
+ return z != null && z !== "" ? String(z) : o(y);
1864
+ }, i = (y, k) => `${l(y)}-${k.key}`, c = (y) => tt(y, t.option.form?.error), u = et(c), d = () => {
1872
1865
  Object.keys(n).forEach((y) => {
1873
1866
  delete n[y];
1874
1867
  });
1875
1868
  }, h = (y, k) => {
1876
- delete n[u(y, k)];
1877
- }, f = (y, k) => n[u(y, k)] || "", m = (y, k) => y.message || c(k), w = (y) => y == null || y === "" || Array.isArray(y) && y.length === 0, D = (y) => {
1869
+ delete n[i(y, k)];
1870
+ }, f = (y, k) => n[i(y, k)] || "", m = (y, k) => y.message || c(k), w = (y) => y == null || y === "" || Array.isArray(y) && y.length === 0, D = (y) => {
1878
1871
  if (typeof y == "number") return y;
1879
1872
  if (typeof y == "string" || Array.isArray(y)) return y.length;
1880
1873
  }, T = (y, k) => {
@@ -1945,14 +1938,14 @@ const we = (e) => {
1945
1938
  }, xe = async (y, k) => {
1946
1939
  if (!Ce(k, y))
1947
1940
  return h(y, k), !0;
1948
- const z = d(k, y);
1941
+ const z = u(k, y);
1949
1942
  if (!z) return !0;
1950
1943
  h(y, k);
1951
1944
  const K = Array.isArray(z) ? z : [z];
1952
1945
  for (const P of K) {
1953
1946
  const j = await A(P, y[k.key], k);
1954
1947
  if (j !== !0)
1955
- return n[u(y, k)] = j, {
1948
+ return n[i(y, k)] = j, {
1956
1949
  field: k.key,
1957
1950
  error: j
1958
1951
  };
@@ -1969,11 +1962,11 @@ const we = (e) => {
1969
1962
  return {
1970
1963
  tableEditValidate: {
1971
1964
  errors: n,
1972
- clear: s,
1965
+ clear: d,
1973
1966
  clearField: h,
1974
1967
  getFieldError: f,
1975
1968
  validate: async () => {
1976
- if (s(), !t.option.table?.editMode) return !0;
1969
+ if (d(), !t.option.table?.editMode) return !0;
1977
1970
  const y = e(), k = _(), z = te(y.table.data || []), P = (await Promise.all(z.flatMap((j) => k.map((I) => xe(j, I))))).filter((j) => j !== !0);
1978
1971
  if (P.length)
1979
1972
  throw me(P), !1;
@@ -1982,7 +1975,7 @@ const we = (e) => {
1982
1975
  }
1983
1976
  };
1984
1977
  };
1985
- class Jt {
1978
+ class Qt {
1986
1979
  /**
1987
1980
  * 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
1988
1981
  *
@@ -1990,24 +1983,24 @@ class Jt {
1990
1983
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
1991
1984
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
1992
1985
  */
1993
- static exportToExcel = async (t, n, o) => {
1986
+ static exportToExcel = async (t, n, a) => {
1994
1987
  if (!t || t.length === 0) return;
1995
- const r = await $.loadModule("xlsx"), a = t.map((c) => {
1996
- const d = {};
1997
- return n.forEach((s) => {
1998
- d[s.label] = c[s.key];
1999
- }), d;
2000
- }), i = r.utils.json_to_sheet(a), u = r.utils.book_new();
2001
- r.utils.book_append_sheet(u, i, "Sheet1"), o ? typeof o == "function" && (o = o()) : o = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, r.writeFile(u, `${o}.xlsx`);
1988
+ const s = await $.loadModule("xlsx"), o = t.map((c) => {
1989
+ const u = {};
1990
+ return n.forEach((d) => {
1991
+ u[d.label] = c[d.key];
1992
+ }), u;
1993
+ }), l = s.utils.json_to_sheet(o), i = s.utils.book_new();
1994
+ s.utils.book_append_sheet(i, l, "Sheet1"), a ? typeof a == "function" && (a = a()) : a = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, s.writeFile(i, `${a}.xlsx`);
2002
1995
  };
2003
1996
  }
2004
- const qt = (e, t) => ({
1997
+ const Xt = (e, t) => ({
2005
1998
  export: {
2006
1999
  run: {
2007
2000
  start: async (n) => {
2008
- let r = await e().export.run[n]();
2009
- const a = t.option.column, i = ObjectUtil.deepMerge({ data: r, columns: a }, {}), u = t.option.tools?.export || {};
2010
- u.before?.(i), Jt.exportToExcel(i.data, i.columns, u.fileName);
2001
+ let s = await e().export.run[n]();
2002
+ const o = t.option.column, l = ObjectUtil.deepMerge({ data: s, columns: o }, {}), i = t.option.tools?.export || {};
2003
+ i.before?.(l), Qt.exportToExcel(l.data, l.columns, i.fileName);
2011
2004
  },
2012
2005
  select: async () => {
2013
2006
  const n = e();
@@ -2023,8 +2016,8 @@ const qt = (e, t) => ({
2023
2016
  if (n.table.selection.list.length === 0)
2024
2017
  throw $.fail(C.tCurd("selectDataToExport")), new Error(C.tCurd("selectDataToExport"));
2025
2018
  return n.table.selection.list;
2026
- } catch (o) {
2027
- console.error(o);
2019
+ } catch (a) {
2020
+ console.error(a);
2028
2021
  } finally {
2029
2022
  n.export.loading = !1;
2030
2023
  }
@@ -2042,8 +2035,8 @@ const qt = (e, t) => ({
2042
2035
  if (n.table.data.length === 0)
2043
2036
  throw $.fail(C.tCurd("noData")), new Error(C.tCurd("noData"));
2044
2037
  return n.table.data;
2045
- } catch (o) {
2046
- console.error(o);
2038
+ } catch (a) {
2039
+ console.error(a);
2047
2040
  } finally {
2048
2041
  n.export.loading = !1;
2049
2042
  }
@@ -2058,12 +2051,12 @@ const qt = (e, t) => ({
2058
2051
  });
2059
2052
  return;
2060
2053
  }
2061
- const o = t.option.api.list, r = await o({
2054
+ const a = t.option.api.list, s = await a({
2062
2055
  ...n.page.getQuery({ size: 999999, num: 1 })
2063
2056
  });
2064
- return (r.data || { [L.config.field.result.list]: r })[L.config.field.result.list];
2065
- } catch (o) {
2066
- console.error(o);
2057
+ return (s.data || { [L.config.field.result.list]: s })[L.config.field.result.list];
2058
+ } catch (a) {
2059
+ console.error(a);
2067
2060
  } finally {
2068
2061
  n.export.loading = !1;
2069
2062
  }
@@ -2071,11 +2064,11 @@ const qt = (e, t) => ({
2071
2064
  },
2072
2065
  loading: !1,
2073
2066
  click: (n) => {
2074
- const o = e();
2075
- o.export.loading || o.export.run.start(n);
2067
+ const a = e();
2068
+ a.export.loading || a.export.run.start(n);
2076
2069
  }
2077
2070
  }
2078
- }), Qt = (e, t) => ({
2071
+ }), Yt = (e, t) => ({
2079
2072
  remove: {
2080
2073
  title: C.tCurd("deleteTitle"),
2081
2074
  show: !1,
@@ -2089,100 +2082,100 @@ const qt = (e, t) => ({
2089
2082
  $.fail(C.tCurd("selectDataToDelete"));
2090
2083
  return;
2091
2084
  }
2092
- const o = e();
2093
- o.remove.items = n, o.remove.show = !0;
2085
+ const a = e();
2086
+ a.remove.items = n, a.remove.show = !0;
2094
2087
  },
2095
2088
  submit: () => {
2096
2089
  FunUtil.throttle(async () => {
2097
2090
  const n = e();
2098
2091
  n.remove.loading = !0;
2099
- const o = t.option.api.delete;
2092
+ const a = t.option.api.delete;
2100
2093
  try {
2101
- if (!o) return;
2102
- await o({
2103
- [t.option.table?.rowKey]: n.remove.items.map((r) => r[t.option.table?.rowKey]),
2094
+ if (!a) return;
2095
+ await a({
2096
+ [t.option.table?.rowKey]: n.remove.items.map((s) => s[t.option.table?.rowKey]),
2104
2097
  items: n.remove.items
2105
2098
  }), $.success(C.tCurd("operationSuccess")), n.table.data.length <= 1 && n.page.num > 1 && (n.page.num -= 1), n.remove.close(), await n.table.getList();
2106
- } catch (r) {
2107
- console.error(r);
2099
+ } catch (s) {
2100
+ console.error(s);
2108
2101
  } finally {
2109
2102
  n.remove.loading = !1;
2110
2103
  }
2111
2104
  });
2112
2105
  }
2113
2106
  }
2114
- }), Xt = (e, t, n) => ({
2107
+ }), Zt = (e, t, n) => ({
2115
2108
  apiDataMap: {},
2116
- getColumnSpan: (o, r) => {
2117
- const a = e(), i = a.update.formGrid?.length ? a.update.formGrid : r || [];
2118
- return He(o, i, a.update.form, a.update.type, {
2119
- maxSpan: a.update.formMaxSpan || t.option.form?.maxSpan,
2109
+ getColumnSpan: (a, s) => {
2110
+ const o = e(), l = o.update.formGrid?.length ? o.update.formGrid : s || [];
2111
+ return Qe(a, l, o.update.form, o.update.type, {
2112
+ maxSpan: o.update.formMaxSpan || t.option.form?.maxSpan,
2120
2113
  defaultSpan: t.option.form?.defaultSpan || L.config.form.defaultSpan
2121
2114
  });
2122
2115
  },
2123
2116
  init: () => {
2124
- const o = e();
2125
- o.initCurdConfig(), o.initColumnOptions(), o.initColumnForm();
2117
+ const a = e();
2118
+ a.initCurdConfig(), a.initColumnOptions(), a.initColumnForm();
2126
2119
  },
2127
- initApiData: async (o) => {
2128
- const r = e(), a = [], i = (u) => {
2129
- if (u.children?.length) {
2130
- u.children.forEach((d) => i(d));
2120
+ initApiData: async (a) => {
2121
+ const s = e(), o = [], l = (i) => {
2122
+ if (i.children?.length) {
2123
+ i.children.forEach((u) => l(u));
2131
2124
  return;
2132
2125
  }
2133
- const c = le(u);
2134
- if (u.options?.[c]?.dataApi && u.options?.[c]?.dataApiConfig?.[o]) {
2135
- if (r.apiDataMap[u.key] && u.options?.[c]?.dataApiConfig?.once) return;
2136
- const d = (async () => {
2126
+ const c = le(i);
2127
+ if (i.options?.[c]?.dataApi && i.options?.[c]?.dataApiConfig?.[a]) {
2128
+ if (s.apiDataMap[i.key] && i.options?.[c]?.dataApiConfig?.once) return;
2129
+ const u = (async () => {
2137
2130
  try {
2138
- let s = await u.options?.[c]?.dataApi?.(r.update.form, r.update.type);
2139
- if (s) {
2140
- const h = u.options?.[c]?.dataPath;
2141
- !Array.isArray(s) && h && (s = ObjectUtil.getPathValue(s, h)), u.options[c].data = s, u.options.search[c].data = s, u.options.search[u.options.search.type ?? c] || (u.options.search[u.options.search.type ?? c] = {}), u.options.search[u.options.search.type ?? c].data = s, u.options.formAdd[c].data = s, u.options.formUpdate[c].data = s, r.apiDataMap[u.key] = s;
2131
+ let d = await i.options?.[c]?.dataApi?.(s.update.form, s.update.type);
2132
+ if (d) {
2133
+ const h = i.options?.[c]?.dataPath;
2134
+ !Array.isArray(d) && h && (d = ObjectUtil.getPathValue(d, h)), i.options[c].data = d, i.options.search[c].data = d, i.options.search[i.options.search.type ?? c] || (i.options.search[i.options.search.type ?? c] = {}), i.options.search[i.options.search.type ?? c].data = d, i.options.formAdd[c].data = d, i.options.formUpdate[c].data = d, s.apiDataMap[i.key] = d;
2142
2135
  }
2143
2136
  } catch {
2144
2137
  }
2145
2138
  })();
2146
- a.push(d);
2139
+ o.push(u);
2147
2140
  }
2148
2141
  };
2149
- return t.option.column.forEach((u) => i(u)), await Promise.all(a), !0;
2142
+ return t.option.column.forEach((i) => l(i)), await Promise.all(o), !0;
2150
2143
  },
2151
2144
  initCurdConfig: () => {
2152
- const o = ObjectUtil.deepMerge(L.config, {});
2153
- o.table.emptyText = C.tCurd("noData"), t.option.size = t.option.size || {}, o.table.size = t.option.size.table || o.size.table, o.form.size = t.option.size.form || o.size.form, o.size.search = t.option.size.search || o.size.search;
2154
- const r = ObjectUtil.deepMerge(o, t.option || {});
2155
- Object.keys(r).forEach((a) => {
2156
- t.option[a] = r[a];
2145
+ const a = ObjectUtil.deepMerge(L.config, {});
2146
+ a.table.emptyText = C.tCurd("noData"), t.option.size = t.option.size || {}, a.table.size = t.option.size.table || a.size.table, a.form.size = t.option.size.form || a.size.form, a.size.search = t.option.size.search || a.size.search;
2147
+ const s = ObjectUtil.deepMerge(a, t.option || {});
2148
+ Object.keys(s).forEach((o) => {
2149
+ t.option[o] = s[o];
2157
2150
  });
2158
2151
  },
2159
2152
  initColumnOptions: () => {
2160
- const o = e();
2161
- let r = JSONUtil.cp(L.config.columnConfig);
2162
- r.options = ObjectUtil.deepMerge(
2153
+ const a = e();
2154
+ let s = JSONUtil.cp(L.config.columnConfig);
2155
+ s.options = ObjectUtil.deepMerge(
2163
2156
  {
2164
2157
  switch: {
2165
2158
  activeText: C.tCurd("switchOn"),
2166
2159
  inactiveText: C.tCurd("switchOff")
2167
2160
  }
2168
2161
  },
2169
- r.options
2162
+ s.options
2170
2163
  );
2171
- const a = (i) => {
2172
- const u = le(i);
2173
- for (const d in r) {
2174
- if (d === "table") {
2175
- if (i.table = ObjectUtil.deepMerge(r.table, i.table || {}), i.children) {
2176
- i.children.forEach((s) => a(s));
2164
+ const o = (l) => {
2165
+ const i = le(l);
2166
+ for (const u in s) {
2167
+ if (u === "table") {
2168
+ if (l.table = ObjectUtil.deepMerge(s.table, l.table || {}), l.children) {
2169
+ l.children.forEach((d) => o(d));
2177
2170
  return;
2178
2171
  }
2179
- } else d === "type" ? i.type = i.type || r.type : i[d] = ObjectUtil.deepMerge(r[d], i[d] || {});
2180
- i.options = i.options || {}, i.options[u] = i.options[u] || {}, i.options[u].size = t.option.size.form;
2172
+ } else u === "type" ? l.type = l.type || s.type : l[u] = ObjectUtil.deepMerge(s[u], l[u] || {});
2173
+ l.options = l.options || {}, l.options[i] = l.options[i] || {}, l.options[i].size = t.option.size.form;
2181
2174
  }
2182
- ["search", "formAdd", "formUpdate"].forEach((d) => {
2183
- i.options[d] = ObjectUtil.deepMerge(i.options, i.options[d] || {}), d === "search" ? t.option.size.search && (i.options[d][u].size = t.option.size.search) : t.option.size.form && (i.options[d][u].size = t.option.size.form);
2184
- }), i.table = ObjectUtil.deepMerge(i.table, i.options[u].table || {}), u === "switch" && (i.options.switch.tableBeforeChange = async (d, s) => {
2185
- const h = i.options?.switch;
2175
+ ["search", "formAdd", "formUpdate"].forEach((u) => {
2176
+ l.options[u] = ObjectUtil.deepMerge(l.options, l.options[u] || {}), u === "search" ? t.option.size.search && (l.options[u][i].size = t.option.size.search) : t.option.size.form && (l.options[u][i].size = t.option.size.form);
2177
+ }), l.table = ObjectUtil.deepMerge(l.table, l.options[i].table || {}), i === "switch" && (l.options.switch.tableBeforeChange = async (u, d) => {
2178
+ const h = l.options?.switch;
2186
2179
  try {
2187
2180
  h.tableConfig?.confirm && await n.switchConfirmRef.value?.open({
2188
2181
  title: C.tCurd("confirmModify"),
@@ -2190,133 +2183,133 @@ const qt = (e, t) => ({
2190
2183
  });
2191
2184
  try {
2192
2185
  if (!t.option.api.update && !h.tableConfig?.api) return;
2193
- const f = s[t.option.table?.rowKey];
2186
+ const f = d[t.option.table?.rowKey];
2194
2187
  h.loadingMap || (h.loadingMap = {}), h.loadingMap[f] || (h.loadingMap[f] = { loading: !1 }), h.loadingMap[f].loading = !0;
2195
- const m = s[d] === h.activeValue ? h.inactiveValue : h.activeValue, w = h.tableConfig?.api ? h.tableConfig.api : t.option.api.update;
2188
+ const m = d[u] === h.activeValue ? h.inactiveValue : h.activeValue, w = h.tableConfig?.api ? h.tableConfig.api : t.option.api.update;
2196
2189
  if (!w) return;
2197
2190
  try {
2198
- await w({ ...s, [d]: m }, "switch");
2191
+ await w({ ...d, [u]: m }, "switch");
2199
2192
  } catch {
2200
2193
  return !1;
2201
2194
  } finally {
2202
2195
  h.loadingMap[f].loading = !1;
2203
2196
  }
2204
- return $.success(C.tCurd("operationSuccess")), h.tableConfig?.loadList && (o.table.loading = !0, o.table.getList(), o.table.loading = !1), !0;
2197
+ return $.success(C.tCurd("operationSuccess")), h.tableConfig?.loadList && (a.table.loading = !0, a.table.getList(), a.table.loading = !1), !0;
2205
2198
  } catch (f) {
2206
2199
  return console.error(f), !1;
2207
2200
  } finally {
2208
- o.table.loading = !1;
2201
+ a.table.loading = !1;
2209
2202
  }
2210
2203
  } catch {
2211
2204
  return !1;
2212
2205
  }
2213
- }), u === "treeSelect" && (i.options.treeSelect.rowKey = t.option.table?.rowKey, i.options.treeSelect.nodeKey = t.option.table?.rowKey);
2206
+ }), i === "treeSelect" && (l.options.treeSelect.rowKey = t.option.table?.rowKey, l.options.treeSelect.nodeKey = t.option.table?.rowKey);
2214
2207
  };
2215
- t.option.column.forEach(a), t.option.table?.column?.forEach(a);
2208
+ t.option.column.forEach(o), t.option.table?.column?.forEach(o);
2216
2209
  },
2217
2210
  initColumnForm: () => {
2218
- const o = e(), r = t.option;
2219
- o.update.formColumn = [], o.update.formGrid = [], o.update.formMaxSpan = 12, o.table.column.show = { list: [], listSource: [] };
2220
- const a = t.option.form?.maxSpan || 12, i = t.option.form?.defaultSpan || a / 2, u = Ze(t.option.form), c = (f) => {
2211
+ const a = e(), s = t.option;
2212
+ a.update.formColumn = [], a.update.formGrid = [], a.update.formMaxSpan = 12, a.table.column.show = { list: [], listSource: [] };
2213
+ const o = t.option.form?.maxSpan || 12, l = t.option.form?.defaultSpan || o / 2, i = ot(t.option.form), c = (f) => {
2221
2214
  if (f.children) {
2222
- o.table.column.show.list.push(f.key), f.children.forEach((m) => c(m));
2215
+ a.table.column.show.list.push(f.key), f.children.forEach((m) => c(m));
2223
2216
  return;
2224
2217
  }
2225
- o.update.formDefault[f.key] = f.value, f.table?.table && (f.show?.table && o.table.column.show.list.push(f.key), o.table.column.show.listSource.push(f.key));
2218
+ a.update.formDefault[f.key] = f.value, f.table?.table && (f.show?.table && a.table.column.show.list.push(f.key), a.table.column.show.listSource.push(f.key));
2226
2219
  };
2227
- r.column.forEach((f) => {
2220
+ s.column.forEach((f) => {
2228
2221
  ve(f, !0), c(f);
2229
2222
  }), t.option.table?.column?.forEach((f) => {
2230
2223
  ve(f, !1), c(f);
2231
- }), o.search.column.list = r.column.concat(r.table?.column || []), o.table.column.list = o.search.column.list.filter((f) => f.table?.table), o.search.column.list.sort((f, m) => f.sort?.search - m.sort?.search), o.table.column.list.sort((f, m) => f.sort?.table - m.sort?.table), o.update.rules = {}, Fe(r.column, o.update.formDefault, o.update.rules, (f) => u(f, o.update.form)), r.table?.editMode && Fe(r.table?.column || [], o.update.formDefault, o.update.rules, (f) => u(f, o.update.form));
2232
- const d = Qe(r.column, {
2233
- maxSpan: a,
2234
- defaultSpan: i,
2224
+ }), a.search.column.list = s.column.concat(s.table?.column || []), a.table.column.list = a.search.column.list.filter((f) => f.table?.table), a.search.column.list.sort((f, m) => f.sort?.search - m.sort?.search), a.table.column.list.sort((f, m) => f.sort?.table - m.sort?.table), a.update.rules = {}, Fe(s.column, a.update.formDefault, a.update.rules, (f) => i(f, () => a.update.form)), s.table?.editMode && Fe(s.table?.column || [], a.update.formDefault, a.update.rules, (f) => i(f, () => a.update.form));
2225
+ const u = _e(s.column, {
2226
+ maxSpan: o,
2227
+ defaultSpan: l,
2235
2228
  layout: t.option.form?.layout
2236
2229
  });
2237
- o.update.formGrid = d.cells, o.update.formMaxSpan = d.maxSpan, o.update.formColumn = Je(d.cells);
2238
- const s = t.option.search?.formDefault;
2239
- s && Object.keys(s).forEach((f) => {
2240
- o.search.formDefault[f] = s[f];
2241
- }), r.column.forEach((f) => {
2242
- f.show?.search || (o.search.formDefault[f.key] = void 0);
2230
+ a.update.formGrid = u.cells, a.update.formMaxSpan = u.maxSpan, a.update.formColumn = Ye(u.cells);
2231
+ const d = t.option.search?.formDefault;
2232
+ d && Object.keys(d).forEach((f) => {
2233
+ a.search.formDefault[f] = d[f];
2234
+ }), s.column.forEach((f) => {
2235
+ f.show?.search || (a.search.formDefault[f.key] = void 0);
2243
2236
  });
2244
- const h = ObjectUtil.deepMerge(o.search.formDefault, {});
2245
- Z.setValue(o.search.form, h, !0);
2237
+ const h = ObjectUtil.deepMerge(a.search.formDefault, {});
2238
+ Z.setValue(a.search.form, h, !0);
2246
2239
  }
2247
- }), Yt = (e) => {
2248
- const t = X(), n = X(), o = X(), r = { switchConfirmRef: t, ruleFormRef: n, tableRef: o }, a = je(), i = Me.getConf("curdConf"), u = (h) => {
2249
- h = h || d;
2240
+ }), _t = (e) => {
2241
+ const t = X(), n = X(), a = X(), s = { switchConfirmRef: t, ruleFormRef: n, tableRef: a }, o = Ie(), l = Me.getConf("curdConf"), i = (h) => {
2242
+ h = h || u;
2250
2243
  let f = h, m = h;
2251
2244
  for (; f?.parentCurdConf; )
2252
2245
  m = f.parentCurdConf, f = f.parentCurdConf;
2253
2246
  return m;
2254
- }, c = () => d;
2255
- let d = re({
2256
- parentCurdConf: i,
2257
- getCurdConf: u,
2258
- getRootCurdConf: u,
2259
- ...It(),
2247
+ }, c = () => u;
2248
+ let u = re({
2249
+ parentCurdConf: l,
2250
+ getCurdConf: i,
2251
+ getRootCurdConf: i,
2252
+ ...Nt(),
2260
2253
  option: e.option,
2261
- ...Nt(c, e),
2262
- ...Gt(c, e),
2263
- ...Ht(c, e, r),
2254
+ ...Ht(c, e),
2264
2255
  ...Wt(c, e),
2256
+ ...Jt(c, e, s),
2265
2257
  ...qt(c, e),
2266
- ...Mt(c, e, r),
2267
- ...Qt(c, e),
2268
- ...Xt(c, e, r)
2258
+ ...Xt(c, e),
2259
+ ...Dt(c, e, s),
2260
+ ...Yt(c, e),
2261
+ ...Zt(c, e, s)
2269
2262
  });
2270
- d.init();
2271
- const s = a ? `curdRef-${a.uid}` : "";
2272
- return i?.formRef && s && (i.formRef.set(s, {
2263
+ u.init();
2264
+ const d = o ? `curdRef-${o.uid}` : "";
2265
+ return l?.formRef && d && (l.formRef.set(d, {
2273
2266
  validate: async (h) => {
2274
- const f = await d.update.validate(!1);
2267
+ const f = await u.update.validate(!1);
2275
2268
  if (h?.(!!f), !f) throw !1;
2276
2269
  return !0;
2277
2270
  }
2278
- }), Le(() => {
2279
- i.formRef.remove(s);
2280
- })), Te(() => {
2281
- e.option.init !== !1 && d.table.getList();
2282
- }), Me.setConf("curdConf", d), { conf: d, switchConfirmRef: t, ruleFormRef: n, tableRef: o };
2283
- }, Zt = { class: "dialog-footer" }, _t = /* @__PURE__ */ q({
2271
+ }), Pe(() => {
2272
+ l.formRef.remove(d);
2273
+ })), je(() => {
2274
+ e.option.init !== !1 && u.table.getList();
2275
+ }), Me.setConf("curdConf", u), { conf: u, switchConfirmRef: t, ruleFormRef: n, tableRef: a };
2276
+ }, eo = { class: "dialog-footer" }, to = /* @__PURE__ */ q({
2284
2277
  __name: "switchConfirm",
2285
2278
  props: {
2286
2279
  size: {}
2287
2280
  },
2288
2281
  setup(e, { expose: t }) {
2289
- const n = X(!1), o = X("确认修改"), r = X("确认要修改状态吗?");
2290
- let a = null, i = null;
2291
- const u = (s) => (s?.title && (o.value = s.title), s?.content && (r.value = s.content), n.value = !0, new Promise((h, f) => {
2292
- a = h, i = f;
2282
+ const n = X(!1), a = X("确认修改"), s = X("确认要修改状态吗?");
2283
+ let o = null, l = null;
2284
+ const i = (d) => (d?.title && (a.value = d.title), d?.content && (s.value = d.content), n.value = !0, new Promise((h, f) => {
2285
+ o = h, l = f;
2293
2286
  })), c = () => {
2294
- n.value = !1, a?.(!0), a = null, i = null;
2295
- }, d = () => {
2296
- n.value = !1, i?.(new Error("用户取消操作")), a = null, i = null;
2287
+ n.value = !1, o?.(!0), o = null, l = null;
2288
+ }, u = () => {
2289
+ n.value = !1, l?.(new Error("用户取消操作")), o = null, l = null;
2297
2290
  };
2298
2291
  return t({
2299
- open: u
2300
- }), (s, h) => {
2292
+ open: i
2293
+ }), (d, h) => {
2301
2294
  const f = fe("el-form");
2302
- return g(), b(l(Ee), {
2295
+ return g(), b(r(Ee), {
2303
2296
  modelValue: n.value,
2304
2297
  "onUpdate:modelValue": h[0] || (h[0] = (m) => n.value = m),
2305
- title: o.value,
2298
+ title: a.value,
2306
2299
  "close-on-click-modal": !1,
2307
2300
  width: "400px"
2308
2301
  }, {
2309
2302
  footer: p(() => [
2310
2303
  F(f, { size: e.size }, {
2311
2304
  default: p(() => [
2312
- R("span", Zt, [
2313
- F(l(N), { onClick: d }, {
2305
+ R("span", eo, [
2306
+ F(r(G), { onClick: u }, {
2314
2307
  default: p(() => [...h[1] || (h[1] = [
2315
2308
  M("取消", -1)
2316
2309
  ])]),
2317
2310
  _: 1
2318
2311
  }),
2319
- F(l(N), {
2312
+ F(r(G), {
2320
2313
  type: "primary",
2321
2314
  onClick: c
2322
2315
  }, {
@@ -2331,13 +2324,13 @@ const qt = (e, t) => ({
2331
2324
  }, 8, ["size"])
2332
2325
  ]),
2333
2326
  default: p(() => [
2334
- R("div", null, U(r.value), 1)
2327
+ R("div", null, U(s.value), 1)
2335
2328
  ]),
2336
2329
  _: 1
2337
2330
  }, 8, ["modelValue", "title"]);
2338
2331
  };
2339
2332
  }
2340
- }), eo = ["innerHTML"], to = /* @__PURE__ */ q({
2333
+ }), oo = ["innerHTML"], ao = /* @__PURE__ */ q({
2341
2334
  __name: "text",
2342
2335
  props: {
2343
2336
  content: {},
@@ -2345,12 +2338,12 @@ const qt = (e, t) => ({
2345
2338
  },
2346
2339
  setup(e) {
2347
2340
  const t = e, n = ae(() => typeof t.content == "function" ? t.content(t.value) : t.content);
2348
- return (o, r) => typeof n.value == "object" ? (g(), b(ee(n.value), { key: 0 })) : (g(), v("div", {
2341
+ return (a, s) => typeof n.value == "object" ? (g(), b(ee(n.value), { key: 0 })) : (g(), v("div", {
2349
2342
  key: 1,
2350
2343
  innerHTML: n.value
2351
- }, null, 8, eo));
2344
+ }, null, 8, oo));
2352
2345
  }
2353
- }), Re = /* @__PURE__ */ q({
2346
+ }), Ae = /* @__PURE__ */ q({
2354
2347
  __name: "searchField",
2355
2348
  props: {
2356
2349
  item: {},
@@ -2360,172 +2353,172 @@ const qt = (e, t) => ({
2360
2353
  setup(e) {
2361
2354
  const t = e, n = ae({
2362
2355
  get: () => t.conf.search.form?.[t.item?.key],
2363
- set: (o) => {
2364
- t.item?.key !== void 0 && (t.conf.search.form[t.item.key] = o);
2356
+ set: (a) => {
2357
+ t.item?.key !== void 0 && (t.conf.search.form[t.item.key] = a);
2365
2358
  }
2366
2359
  });
2367
- return (o, r) => l(W).customComponent[e.type ?? ""]?.search ? (g(), b(ee(l(W).customComponent[e.type ?? ""]?.search), x({
2360
+ return (a, s) => r(W).customComponent[e.type ?? ""]?.search ? (g(), b(ee(r(W).customComponent[e.type ?? ""]?.search), x({
2368
2361
  key: 0,
2369
2362
  modelValue: n.value,
2370
- "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a)
2371
- }, e.item.options?.search?.[e.type ?? ""], E(e.item.options?.search?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : e.type === "input" ? (g(), b(l(ue), x({
2363
+ "onUpdate:modelValue": s[0] || (s[0] = (o) => n.value = o)
2364
+ }, e.item.options?.search?.[e.type ?? ""], E(e.item.options?.search?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue"])) : e.type === "input" ? (g(), b(r(ue), x({
2372
2365
  key: 1,
2373
2366
  modelValue: n.value,
2374
- "onUpdate:modelValue": r[1] || (r[1] = (a) => n.value = a),
2367
+ "onUpdate:modelValue": s[1] || (s[1] = (o) => n.value = o),
2375
2368
  placeholder: e.conf.search.getPlaceholder(e.item),
2376
2369
  clearable: "",
2377
2370
  disabled: e.item.disabled?.search
2378
- }, e.item.options?.search?.input || e.item.options?.input, E(e.item.options?.search?.input?.on || e.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "switch" ? (g(), b(l(ce), x({
2371
+ }, e.item.options?.search?.input || e.item.options?.input, E(e.item.options?.search?.input?.on || e.item.options?.input?.on || {})), null, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "switch" ? (g(), b(r(ce), x({
2379
2372
  key: 2,
2380
2373
  modelValue: n.value,
2381
- "onUpdate:modelValue": r[2] || (r[2] = (a) => n.value = a),
2382
- placeholder: e.conf.search.getPlaceholder(e.item, l(C).tCurd("placeholderSelect")),
2374
+ "onUpdate:modelValue": s[2] || (s[2] = (o) => n.value = o),
2375
+ placeholder: e.conf.search.getPlaceholder(e.item, r(C).tCurd("placeholderSelect")),
2383
2376
  clearable: "",
2384
2377
  disabled: e.item.disabled?.search
2385
2378
  }, e.item.options?.search?.switch || e.item.options?.switch, E(e.item.options?.search?.switch?.on || e.item.options?.switch?.on || {})), {
2386
2379
  default: p(() => [
2387
- (g(), b(l(ne), {
2380
+ (g(), b(r(ne), {
2388
2381
  key: e.item.options?.switch?.activeValue,
2389
2382
  label: e.item.options?.switch?.activeText,
2390
2383
  value: e.item.options?.switch?.activeValue
2391
2384
  }, null, 8, ["label", "value"])),
2392
- (g(), b(l(ne), {
2385
+ (g(), b(r(ne), {
2393
2386
  key: e.item.options?.switch?.inactiveValue,
2394
2387
  label: e.item.options?.switch?.inactiveText,
2395
2388
  value: e.item.options?.switch?.inactiveValue
2396
2389
  }, null, 8, ["label", "value"]))
2397
2390
  ]),
2398
2391
  _: 1
2399
- }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "select" ? (g(), b(l(ce), x({
2392
+ }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "select" ? (g(), b(r(ce), x({
2400
2393
  key: 3,
2401
2394
  modelValue: n.value,
2402
- "onUpdate:modelValue": r[3] || (r[3] = (a) => n.value = a),
2403
- placeholder: e.conf.search.getPlaceholder(e.item, l(C).tCurd("placeholderSelect")),
2395
+ "onUpdate:modelValue": s[3] || (s[3] = (o) => n.value = o),
2396
+ placeholder: e.conf.search.getPlaceholder(e.item, r(C).tCurd("placeholderSelect")),
2404
2397
  clearable: "",
2405
2398
  disabled: e.item.disabled?.search
2406
2399
  }, e.item.options?.search?.select || e.item.options?.select, E(e.item.options?.search?.select?.on || e.item.options?.select?.on || {})), {
2407
2400
  default: p(() => [
2408
- (g(!0), v(B, null, G(e.item.options?.search?.select?.data || e.item.options?.select?.data || [], (a) => (g(), b(l(ne), {
2409
- key: a.value,
2410
- label: a.label,
2411
- value: a.value
2401
+ (g(!0), v(B, null, N(e.item.options?.search?.select?.data || e.item.options?.select?.data || [], (o) => (g(), b(r(ne), {
2402
+ key: o.value,
2403
+ label: o.label,
2404
+ value: o.value
2412
2405
  }, null, 8, ["label", "value"]))), 128))
2413
2406
  ]),
2414
2407
  _: 1
2415
- }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (g(), b(l(Ue), x({
2408
+ }, 16, ["modelValue", "placeholder", "disabled"])) : e.type === "radio" ? (g(), b(r(Be), x({
2416
2409
  key: 4,
2417
2410
  modelValue: n.value,
2418
- "onUpdate:modelValue": r[4] || (r[4] = (a) => n.value = a),
2411
+ "onUpdate:modelValue": s[4] || (s[4] = (o) => n.value = o),
2419
2412
  disabled: e.item.disabled?.search
2420
2413
  }, e.item.options?.search?.radio || e.item.options?.radio, E(e.item.options?.search?.radio?.on || e.item.options?.radio?.on || {})), {
2421
2414
  default: p(() => [
2422
- (g(!0), v(B, null, G(e.item.options?.radio?.data, (a) => (g(), b(l(Ae), {
2423
- key: a.value,
2424
- label: a.label,
2425
- value: a.value
2415
+ (g(!0), v(B, null, N(e.item.options?.radio?.data, (o) => (g(), b(r(Te), {
2416
+ key: o.value,
2417
+ label: o.label,
2418
+ value: o.value
2426
2419
  }, null, 8, ["label", "value"]))), 128))
2427
2420
  ]),
2428
2421
  _: 1
2429
- }, 16, ["modelValue", "disabled"])) : e.type === "datetime" ? (g(), b(l(Be), x({
2422
+ }, 16, ["modelValue", "disabled"])) : e.type === "datetime" ? (g(), b(r(Le), x({
2430
2423
  key: 5,
2431
2424
  modelValue: n.value,
2432
- "onUpdate:modelValue": r[5] || (r[5] = (a) => n.value = a),
2425
+ "onUpdate:modelValue": s[5] || (s[5] = (o) => n.value = o),
2433
2426
  disabled: e.item.disabled?.search
2434
- }, e.item.options?.search?.datetime || e.item.options?.datetime, E(e.item.options?.search?.datetime?.on || e.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : e.type && l(W).customComponent[e.type] ? (g(), b(ee(l(W).customComponent[e.type]), x({
2427
+ }, e.item.options?.search?.datetime || e.item.options?.datetime, E(e.item.options?.search?.datetime?.on || e.item.options?.datetime?.on || {})), null, 16, ["modelValue", "disabled"])) : e.type && r(W).customComponent[e.type] ? (g(), b(ee(r(W).customComponent[e.type]), x({
2435
2428
  key: 6,
2436
2429
  modelValue: n.value,
2437
- "onUpdate:modelValue": r[6] || (r[6] = (a) => n.value = a)
2430
+ "onUpdate:modelValue": s[6] || (s[6] = (o) => n.value = o)
2438
2431
  }, e.item.options?.search?.[e.type] || e.item.options?.[e.type], E(e.item.options?.search?.[e.type]?.on || e.item.options?.[e.type]?.on || {}), {
2439
2432
  disabled: e.item.disabled?.search
2440
2433
  }), null, 16, ["modelValue", "disabled"])) : V("", !0);
2441
2434
  }
2442
2435
  }), se = (e, t) => {
2443
2436
  const n = e.__vccOpts || e;
2444
- for (const [o, r] of t)
2445
- n[o] = r;
2437
+ for (const [a, s] of t)
2438
+ n[a] = s;
2446
2439
  return n;
2447
- }, oo = {}, ao = {
2440
+ }, no = {}, lo = {
2448
2441
  xmlns: "http://www.w3.org/2000/svg",
2449
2442
  viewBox: "64 64 896 896"
2450
2443
  };
2451
- function no(e, t) {
2452
- return g(), v("svg", ao, [...t[0] || (t[0] = [
2444
+ function io(e, t) {
2445
+ return g(), v("svg", lo, [...t[0] || (t[0] = [
2453
2446
  R("path", {
2454
2447
  fill: "currentColor",
2455
2448
  d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
2456
2449
  }, null, -1)
2457
2450
  ])]);
2458
2451
  }
2459
- const lo = /* @__PURE__ */ se(oo, [["render", no]]), io = {}, ro = {
2452
+ const ro = /* @__PURE__ */ se(no, [["render", io]]), so = {}, uo = {
2460
2453
  xmlns: "http://www.w3.org/2000/svg",
2461
2454
  viewBox: "64 64 896 896"
2462
2455
  };
2463
- function so(e, t) {
2464
- return g(), v("svg", ro, [...t[0] || (t[0] = [
2456
+ function co(e, t) {
2457
+ return g(), v("svg", uo, [...t[0] || (t[0] = [
2465
2458
  R("path", {
2466
2459
  fill: "currentColor",
2467
2460
  d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
2468
2461
  }, null, -1)
2469
2462
  ])]);
2470
2463
  }
2471
- const uo = /* @__PURE__ */ se(io, [["render", so]]), co = {}, fo = {
2464
+ const fo = /* @__PURE__ */ se(so, [["render", co]]), mo = {}, go = {
2472
2465
  xmlns: "http://www.w3.org/2000/svg",
2473
2466
  viewBox: "0 0 1024 1024"
2474
2467
  };
2475
- function mo(e, t) {
2476
- return g(), v("svg", fo, [...t[0] || (t[0] = [
2468
+ function ho(e, t) {
2469
+ return g(), v("svg", go, [...t[0] || (t[0] = [
2477
2470
  R("path", {
2478
2471
  fill: "currentColor",
2479
2472
  d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
2480
2473
  }, null, -1)
2481
2474
  ])]);
2482
2475
  }
2483
- const go = /* @__PURE__ */ se(co, [["render", mo]]), ho = {}, yo = {
2476
+ const yo = /* @__PURE__ */ se(mo, [["render", ho]]), bo = {}, po = {
2484
2477
  "data-v-58697b5c": "",
2485
2478
  xmlns: "http://www.w3.org/2000/svg",
2486
2479
  viewBox: "0 0 1024 1024"
2487
2480
  };
2488
- function bo(e, t) {
2489
- return g(), v("svg", yo, [...t[0] || (t[0] = [
2481
+ function wo(e, t) {
2482
+ return g(), v("svg", po, [...t[0] || (t[0] = [
2490
2483
  R("path", {
2491
2484
  fill: "currentColor",
2492
2485
  d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
2493
2486
  }, null, -1)
2494
2487
  ])]);
2495
2488
  }
2496
- const po = /* @__PURE__ */ se(ho, [["render", bo]]), wo = {}, ko = {
2489
+ const ko = /* @__PURE__ */ se(bo, [["render", wo]]), vo = {}, Co = {
2497
2490
  "data-v-58697b5c": "",
2498
2491
  xmlns: "http://www.w3.org/2000/svg",
2499
2492
  viewBox: "0 0 1024 1024"
2500
2493
  };
2501
- function vo(e, t) {
2502
- return g(), v("svg", ko, [...t[0] || (t[0] = [
2494
+ function xo(e, t) {
2495
+ return g(), v("svg", Co, [...t[0] || (t[0] = [
2503
2496
  R("path", {
2504
2497
  fill: "currentColor",
2505
2498
  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"
2506
2499
  }, null, -1)
2507
2500
  ])]);
2508
2501
  }
2509
- const Co = /* @__PURE__ */ se(wo, [["render", vo]]), xo = {}, Vo = {
2502
+ const Vo = /* @__PURE__ */ se(vo, [["render", xo]]), So = {}, Eo = {
2510
2503
  "data-v-58697b5c": "",
2511
2504
  xmlns: "http://www.w3.org/2000/svg",
2512
2505
  viewBox: "0 0 1024 1024"
2513
2506
  };
2514
- function So(e, t) {
2515
- return g(), v("svg", Vo, [...t[0] || (t[0] = [
2507
+ function $o(e, t) {
2508
+ return g(), v("svg", Eo, [...t[0] || (t[0] = [
2516
2509
  R("path", {
2517
2510
  fill: "currentColor",
2518
2511
  d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"
2519
2512
  }, null, -1)
2520
2513
  ])]);
2521
2514
  }
2522
- const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-center table-header-label inline" }, zo = { class: "table-header-tooltip" }, Mo = ["innerHTML"], Fo = {
2515
+ const zo = /* @__PURE__ */ se(So, [["render", $o]]), Mo = { class: "row flex-center table-header-label inline" }, Fo = { class: "table-header-tooltip" }, Do = ["innerHTML"], Oo = {
2523
2516
  key: 1,
2524
2517
  class: "table-header-required"
2525
- }, Do = ["onClick"], Oo = {
2518
+ }, Ro = ["onClick"], Uo = {
2526
2519
  key: 0,
2527
2520
  class: "table-edit-form"
2528
- }, Ro = { key: 1 }, Uo = ["onClick", "innerHTML"], Ao = /* @__PURE__ */ q({
2521
+ }, Ao = { key: 1 }, Bo = ["onClick", "innerHTML"], To = /* @__PURE__ */ q({
2529
2522
  __name: "tableColumn",
2530
2523
  props: {
2531
2524
  conf: {},
@@ -2533,200 +2526,200 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
2533
2526
  option: {}
2534
2527
  },
2535
2528
  setup(e) {
2536
- const t = $.isFun, n = e, r = je().type, a = (u) => u === !0 ? !0 : (Array.isArray(u) ? u : u ? [u] : []).some((d) => d?.required === !0), i = (u) => n.option.table?.editMode ? a(u.rules) || a(n.conf.update.rules?.[u.key]) : !1;
2537
- return (u, c) => {
2538
- const d = fe("el-tooltip");
2539
- return g(!0), v(B, null, G(e.columnList, (s) => (g(), v(B, {
2540
- key: s.key
2529
+ const t = $.isFun, n = e, s = Ie().type, o = (i) => i === !0 ? !0 : (Array.isArray(i) ? i : i ? [i] : []).some((u) => u?.required === !0), l = (i) => n.option.table?.editMode ? o(i.rules) || o(n.conf.update.rules?.[i.key]) : !1;
2530
+ return (i, c) => {
2531
+ const u = fe("el-tooltip");
2532
+ return g(!0), v(B, null, N(e.columnList, (d) => (g(), v(B, {
2533
+ key: d.key
2541
2534
  }, [
2542
- e.conf.table.column.show.list.includes(s.key) && (s.show?.table === void 0 || l(t)(s.show?.table, e.conf.table.data)) ? (g(), v(B, { key: 0 }, [
2543
- s.table?.header?.groupKey === void 0 || s.table.header.show ? (g(), b(l(ye), x({
2535
+ e.conf.table.column.show.list.includes(d.key) && (d.show?.table === void 0 || r(t)(d.show?.table, e.conf.table.data)) ? (g(), v(B, { key: 0 }, [
2536
+ d.table?.header?.groupKey === void 0 || d.table.header.show ? (g(), b(r(ye), x({
2544
2537
  key: 0,
2545
- prop: s.key,
2546
- label: s.label
2547
- }, { ref_for: !0 }, s.table), {
2538
+ prop: d.key,
2539
+ label: d.label
2540
+ }, { ref_for: !0 }, d.table), {
2548
2541
  header: p(() => [
2549
- S(u.$slots, "table-header-" + s.key, { item: s }, () => [
2550
- R("div", $o, [
2551
- s.table?.header?.tooltip ? (g(), b(d, {
2542
+ S(i.$slots, "table-header-" + d.key, { item: d }, () => [
2543
+ R("div", Mo, [
2544
+ d.table?.header?.tooltip ? (g(), b(u, {
2552
2545
  key: 0,
2553
2546
  effect: "dark",
2554
2547
  placement: "top"
2555
2548
  }, {
2556
2549
  content: p(() => [
2557
2550
  R("div", {
2558
- innerHTML: s.table?.header?.tooltip
2559
- }, null, 8, Mo)
2551
+ innerHTML: d.table?.header?.tooltip
2552
+ }, null, 8, Do)
2560
2553
  ]),
2561
2554
  default: p(() => [
2562
- R("span", zo, [
2563
- F(po)
2555
+ R("span", Fo, [
2556
+ F(ko)
2564
2557
  ])
2565
2558
  ]),
2566
2559
  _: 2
2567
2560
  }, 1024)) : V("", !0),
2568
- i(s) ? (g(), v("span", Fo, "*")) : V("", !0),
2569
- M(" " + U(s.label) + " ", 1),
2570
- s.table?.header?.group !== void 0 ? (g(), v("span", {
2561
+ l(d) ? (g(), v("span", Oo, "*")) : V("", !0),
2562
+ M(" " + U(d.label) + " ", 1),
2563
+ d.table?.header?.group !== void 0 ? (g(), v("span", {
2571
2564
  key: 2,
2572
2565
  class: "table-header-plus",
2573
- onClick: ht(
2566
+ onClick: bt(
2574
2567
  () => {
2575
- s.table.header.group = !s.table.header.group, e.columnList.forEach((h) => {
2576
- h.table?.header?.groupKey === s.key && (h.table.header.show = !s.table.header.group);
2568
+ d.table.header.group = !d.table.header.group, e.columnList.forEach((h) => {
2569
+ h.table?.header?.groupKey === d.key && (h.table.header.show = !d.table.header.group);
2577
2570
  });
2578
2571
  },
2579
2572
  ["stop"]
2580
2573
  )
2581
2574
  }, [
2582
- s.table.header.group ? (g(), b(Co, { key: 0 })) : (g(), b(Eo, { key: 1 }))
2583
- ], 8, Do)) : V("", !0)
2575
+ d.table.header.group ? (g(), b(Vo, { key: 0 })) : (g(), b(zo, { key: 1 }))
2576
+ ], 8, Ro)) : V("", !0)
2584
2577
  ])
2585
2578
  ])
2586
2579
  ]),
2587
2580
  default: p(({ row: h }) => [
2588
- s.children ? (g(), v(B, { key: 0 }, [
2581
+ d.children ? (g(), v(B, { key: 0 }, [
2589
2582
  c[0] || (c[0] = M("   ", -1)),
2590
- (g(), b(ee(l(r)), {
2583
+ (g(), b(ee(r(s)), {
2591
2584
  conf: e.conf,
2592
- columnList: s.children,
2585
+ columnList: d.children,
2593
2586
  option: e.option
2594
2587
  }, Y({ _: 2 }, [
2595
- G(u.$slots, (f, m) => ({
2588
+ N(i.$slots, (f, m) => ({
2596
2589
  name: m,
2597
2590
  fn: p((w) => [
2598
- S(u.$slots, m, x({ ref_for: !0 }, w || {}))
2591
+ S(i.$slots, m, x({ ref_for: !0 }, w || {}))
2599
2592
  ])
2600
2593
  }))
2601
2594
  ]), 1032, ["conf", "columnList", "option"]))
2602
2595
  ], 64)) : (g(), v(B, { key: 1 }, [
2603
- e.option.table?.editMode ? (g(), v("div", Oo, [
2604
- F(l(be), {
2596
+ e.option.table?.editMode ? (g(), v("div", Uo, [
2597
+ F(r(be), {
2605
2598
  size: e.option.size?.table,
2606
- error: e.conf.tableEditValidate.getFieldError(h, s),
2599
+ error: e.conf.tableEditValidate.getFieldError(h, d),
2607
2600
  class: "table-edit-form-item"
2608
2601
  }, {
2609
2602
  default: p(() => [
2610
2603
  R("div", {
2611
- class: J(["row", ["table-edit-" + s.key]]),
2604
+ class: J(["row", ["table-edit-" + d.key]]),
2612
2605
  style: { width: "100%" }
2613
2606
  }, [
2614
- S(u.$slots, "table-edit-left-" + s.key, {
2607
+ S(i.$slots, "table-edit-left-" + d.key, {
2615
2608
  row: h,
2616
- item: s
2609
+ item: d
2617
2610
  }),
2618
- s.type === "input" ? (g(), b(l(ue), x({
2611
+ d.type === "input" ? (g(), b(r(ue), x({
2619
2612
  key: 0,
2620
- modelValue: h[s.key],
2621
- "onUpdate:modelValue": (f) => h[s.key] = f,
2622
- disabled: e.conf.update.getDisabled(s, !0),
2613
+ modelValue: h[d.key],
2614
+ "onUpdate:modelValue": (f) => h[d.key] = f,
2615
+ disabled: e.conf.update.getDisabled(d, !0),
2623
2616
  class: "col"
2624
- }, { ref_for: !0 }, e.conf.update.getBind(s), E(e.conf.update.getOn(s, h)), {
2625
- "onUpdate:modelValue": (f) => e.conf.tableEditValidate.clearField(h, s)
2617
+ }, { ref_for: !0 }, e.conf.update.getBind(d), E(e.conf.update.getOn(d, h)), {
2618
+ "onUpdate:modelValue": (f) => e.conf.tableEditValidate.clearField(h, d)
2626
2619
  }), Y({ _: 2 }, [
2627
- s.options?.input?.prepend ? {
2620
+ d.options?.input?.prepend ? {
2628
2621
  name: "prepend",
2629
2622
  fn: p(() => [
2630
- M(U(typeof s.options?.input?.prepend == "function" ? s.options?.input?.prepend(h) : s.options?.input?.prepend), 1)
2623
+ M(U(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(h) : d.options?.input?.prepend), 1)
2631
2624
  ]),
2632
2625
  key: "0"
2633
2626
  } : void 0
2634
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type === "select" ? (g(), b(l(ce), x({
2627
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (g(), b(r(ce), x({
2635
2628
  key: 1,
2636
- modelValue: h[s.key],
2637
- "onUpdate:modelValue": (f) => h[s.key] = f,
2638
- disabled: e.conf.update.getDisabled(s, !0),
2629
+ modelValue: h[d.key],
2630
+ "onUpdate:modelValue": (f) => h[d.key] = f,
2631
+ disabled: e.conf.update.getDisabled(d, !0),
2639
2632
  class: "col"
2640
- }, { ref_for: !0 }, e.conf.update.getBind(s), E(e.conf.update.getOn(s, h)), {
2641
- "onUpdate:modelValue": (f) => e.conf.tableEditValidate.clearField(h, s)
2633
+ }, { ref_for: !0 }, e.conf.update.getBind(d), E(e.conf.update.getOn(d, h)), {
2634
+ "onUpdate:modelValue": (f) => e.conf.tableEditValidate.clearField(h, d)
2642
2635
  }), {
2643
2636
  default: p(() => [
2644
- (g(!0), v(B, null, G(s.options?.search?.select?.data || s.options?.select?.data, (f) => (g(), b(l(ne), {
2637
+ (g(!0), v(B, null, N(d.options?.search?.select?.data || d.options?.select?.data, (f) => (g(), b(r(ne), {
2645
2638
  key: f.value,
2646
2639
  label: f.label,
2647
2640
  value: f.value
2648
2641
  }, null, 8, ["label", "value"]))), 128))
2649
2642
  ]),
2650
2643
  _: 2
2651
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type === "switch" ? (g(), b(l(he), x({
2644
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (g(), b(r(he), x({
2652
2645
  key: 2,
2653
- modelValue: h[s.key],
2654
- "onUpdate:modelValue": (f) => h[s.key] = f,
2655
- disabled: e.conf.update.getDisabled(s, !0),
2646
+ modelValue: h[d.key],
2647
+ "onUpdate:modelValue": (f) => h[d.key] = f,
2648
+ disabled: e.conf.update.getDisabled(d, !0),
2656
2649
  class: "col"
2657
- }, { ref_for: !0 }, e.conf.update.getBind(s), E(e.conf.update.getOn(s, h)), {
2658
- "onUpdate:modelValue": (f) => e.conf.tableEditValidate.clearField(h, s)
2650
+ }, { ref_for: !0 }, e.conf.update.getBind(d), E(e.conf.update.getOn(d, h)), {
2651
+ "onUpdate:modelValue": (f) => e.conf.tableEditValidate.clearField(h, d)
2659
2652
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : V("", !0),
2660
- S(u.$slots, "table-edit-right-" + s.key, {
2653
+ S(i.$slots, "table-edit-right-" + d.key, {
2661
2654
  row: h,
2662
- item: s
2655
+ item: d
2663
2656
  })
2664
2657
  ], 2)
2665
2658
  ]),
2666
2659
  _: 2
2667
2660
  }, 1032, ["size", "error"])
2668
2661
  ])) : (g(), v(B, { key: 1 }, [
2669
- e.conf.update.type === l($).EDialog.Update && l(t)(s.show?.form, e.conf.update.form, l($).EDialog.Update) && e.option.table?.inlineEdit && e.conf.update.form[e.option.table?.rowKey] === h[e.option.table?.rowKey] && (s.type === "input" || s.type === "select") ? (g(), v(B, { key: 0 }, [
2670
- s.type === "input" ? (g(), b(l(ue), x({
2662
+ e.conf.update.type === r($).EDialog.Update && r(t)(d.show?.form, e.conf.update.form, r($).EDialog.Update) && e.option.table?.inlineEdit && e.conf.update.form[e.option.table?.rowKey] === h[e.option.table?.rowKey] && (d.type === "input" || d.type === "select") ? (g(), v(B, { key: 0 }, [
2663
+ d.type === "input" ? (g(), b(r(ue), x({
2671
2664
  key: 0,
2672
- modelValue: e.conf.update.form[s.key],
2673
- "onUpdate:modelValue": (f) => e.conf.update.form[s.key] = f,
2674
- disabled: e.conf.update.getDisabled(s, !0)
2675
- }, { ref_for: !0 }, e.conf.update.getBind(s), E(e.conf.update.getOn(s, h)), { style: { width: "100%" } }), Y({ _: 2 }, [
2676
- s.options?.input?.prepend ? {
2665
+ modelValue: e.conf.update.form[d.key],
2666
+ "onUpdate:modelValue": (f) => e.conf.update.form[d.key] = f,
2667
+ disabled: e.conf.update.getDisabled(d, !0)
2668
+ }, { ref_for: !0 }, e.conf.update.getBind(d), E(e.conf.update.getOn(d, h)), { style: { width: "100%" } }), Y({ _: 2 }, [
2669
+ d.options?.input?.prepend ? {
2677
2670
  name: "prepend",
2678
2671
  fn: p(() => [
2679
- M(U(typeof s.options?.input?.prepend == "function" ? s.options?.input?.prepend(h) : s.options?.input?.prepend), 1)
2672
+ M(U(typeof d.options?.input?.prepend == "function" ? d.options?.input?.prepend(h) : d.options?.input?.prepend), 1)
2680
2673
  ]),
2681
2674
  key: "0"
2682
2675
  } : void 0
2683
- ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type === "select" ? (g(), b(l(ce), x({
2676
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "select" ? (g(), b(r(ce), x({
2684
2677
  key: 1,
2685
- modelValue: e.conf.update.form[s.key],
2686
- "onUpdate:modelValue": (f) => e.conf.update.form[s.key] = f,
2687
- disabled: e.conf.update.getDisabled(s, !0)
2688
- }, { ref_for: !0 }, e.conf.update.getBind(s), E(e.conf.update.getOn(s, h)), { style: { width: "100%" } }), {
2678
+ modelValue: e.conf.update.form[d.key],
2679
+ "onUpdate:modelValue": (f) => e.conf.update.form[d.key] = f,
2680
+ disabled: e.conf.update.getDisabled(d, !0)
2681
+ }, { ref_for: !0 }, e.conf.update.getBind(d), E(e.conf.update.getOn(d, h)), { style: { width: "100%" } }), {
2689
2682
  default: p(() => [
2690
- (g(!0), v(B, null, G(s.options?.search?.select?.data || s.options?.select?.data, (f) => (g(), b(l(ne), {
2683
+ (g(!0), v(B, null, N(d.options?.search?.select?.data || d.options?.select?.data, (f) => (g(), b(r(ne), {
2691
2684
  key: f.value,
2692
2685
  label: f.label,
2693
2686
  value: f.value
2694
2687
  }, null, 8, ["label", "value"]))), 128))
2695
2688
  ]),
2696
2689
  _: 2
2697
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type === "switch" ? (g(), b(l(he), x({
2690
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.type === "switch" ? (g(), b(r(he), x({
2698
2691
  key: 2,
2699
- modelValue: e.conf.update.form[s.key],
2700
- "onUpdate:modelValue": (f) => e.conf.update.form[s.key] = f
2701
- }, { ref_for: !0 }, e.conf.update.getBind(s), E(e.conf.update.getOn(s, h)), {
2702
- disabled: e.conf.update.getDisabled(s, !0)
2692
+ modelValue: e.conf.update.form[d.key],
2693
+ "onUpdate:modelValue": (f) => e.conf.update.form[d.key] = f
2694
+ }, { ref_for: !0 }, e.conf.update.getBind(d), E(e.conf.update.getOn(d, h)), {
2695
+ disabled: e.conf.update.getDisabled(d, !0)
2703
2696
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : V("", !0)
2704
- ], 64)) : S(u.$slots, "table-" + s.key, {
2697
+ ], 64)) : S(i.$slots, "table-" + d.key, {
2705
2698
  key: 1,
2706
2699
  row: h,
2707
- item: s
2700
+ item: d
2708
2701
  }, () => [
2709
- l(W).customComponent[s.type ?? ""]?.table ? (g(), b(ee(l(W).customComponent[s.type ?? ""]?.table), x({
2702
+ r(W).customComponent[d.type ?? ""]?.table ? (g(), b(ee(r(W).customComponent[d.type ?? ""]?.table), x({
2710
2703
  key: 0,
2711
- modelValue: h[s.key],
2712
- "onUpdate:modelValue": (f) => h[s.key] = f
2713
- }, { ref_for: !0 }, s.options?.[s.type ?? ""], E(s.options?.[s.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : s.type === "switch" ? (g(), v(B, { key: 1 }, [
2714
- s.options?.switch?.tableConfig?.change ? (g(), b(l(he), x({
2704
+ modelValue: h[d.key],
2705
+ "onUpdate:modelValue": (f) => h[d.key] = f
2706
+ }, { ref_for: !0 }, d.options?.[d.type ?? ""], E(d.options?.[d.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : d.type === "switch" ? (g(), v(B, { key: 1 }, [
2707
+ d.options?.switch?.tableConfig?.change ? (g(), b(r(he), x({
2715
2708
  key: 0,
2716
- modelValue: h[s.key],
2717
- "onUpdate:modelValue": (f) => h[s.key] = f,
2718
- loading: s.options?.switch?.loadingMap?.[h[e.option.table?.rowKey]]?.loading,
2719
- "before-change": () => s.options?.switch?.tableBeforeChange?.(s.key, h)
2720
- }, { ref_for: !0 }, s.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (g(), v("span", Ro, U(h[s.key] === s.options?.switch?.activeValue ? s.options?.switch?.activeText : s.options?.switch?.inactiveText), 1))
2709
+ modelValue: h[d.key],
2710
+ "onUpdate:modelValue": (f) => h[d.key] = f,
2711
+ loading: d.options?.switch?.loadingMap?.[h[e.option.table?.rowKey]]?.loading,
2712
+ "before-change": () => d.options?.switch?.tableBeforeChange?.(d.key, h)
2713
+ }, { ref_for: !0 }, d.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (g(), v("span", Ao, U(h[d.key] === d.options?.switch?.activeValue ? d.options?.switch?.activeText : d.options?.switch?.inactiveText), 1))
2721
2714
  ], 64)) : (g(), v("span", {
2722
2715
  key: 2,
2723
2716
  style: pe({
2724
- "--table-text-click-color": s.table?.click?.color
2717
+ "--table-text-click-color": d.table?.click?.color
2725
2718
  }),
2726
- class: J({ "table-text-click": s.table?.click?.callback }),
2727
- onClick: (f) => s.table?.click?.callback?.(h),
2728
- innerHTML: s.table?.format ? s.table?.format(h) : h[s.key]
2729
- }, null, 14, Uo))
2719
+ class: J({ "table-text-click": d.table?.click?.callback }),
2720
+ onClick: (f) => d.table?.click?.callback?.(h),
2721
+ innerHTML: d.table?.format ? d.table?.format(h) : h[d.key]
2722
+ }, null, 14, Bo))
2730
2723
  ])
2731
2724
  ], 64))
2732
2725
  ], 64))
@@ -2737,19 +2730,19 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
2737
2730
  ], 64))), 128);
2738
2731
  };
2739
2732
  }
2740
- }), Bo = {
2733
+ }), Lo = {
2741
2734
  key: 0,
2742
2735
  class: "relative curd-search fit-width"
2743
- }, To = { class: "mb-10 flex justify-between items-center fit-width" }, Lo = {
2736
+ }, jo = { class: "mb-10 flex justify-between items-center fit-width" }, Ko = {
2744
2737
  class: "flex items-center",
2745
2738
  style: { gap: "10px" }
2746
- }, jo = { key: 0 }, Ko = { key: 1 }, Po = { key: 2 }, Io = { class: "export-btn" }, No = {
2739
+ }, Po = { key: 0 }, Io = { key: 1 }, Go = { key: 2 }, No = { class: "export-btn" }, Ho = {
2747
2740
  key: 1,
2748
2741
  class: "export-btn"
2749
- }, Go = {
2742
+ }, Wo = {
2750
2743
  class: "flex items-center table-tools-right",
2751
2744
  style: { gap: "10px" }
2752
- }, Ho = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, Wo = { class: "dialog-footer" }, Jo = { key: 0 }, qo = { key: 1 }, Qo = { class: "dialog-footer" }, Xo = /* @__PURE__ */ q({
2745
+ }, Jo = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, qo = { class: "dialog-footer" }, Qo = { key: 0 }, Xo = { key: 1 }, Yo = { class: "dialog-footer" }, Zo = /* @__PURE__ */ q({
2753
2746
  __name: "index",
2754
2747
  props: {
2755
2748
  /**
@@ -2772,11 +2765,11 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
2772
2765
  }
2773
2766
  },
2774
2767
  setup(e, { expose: t }) {
2775
- const n = $.EDialog, o = e, r = $.isFun, { conf: a, switchConfirmRef: i, ruleFormRef: u, tableRef: c } = Yt(o);
2768
+ const n = $.EDialog, a = e, s = $.isFun, { conf: o, switchConfirmRef: l, ruleFormRef: i, tableRef: c } = _t(a);
2776
2769
  return t({
2777
- conf: a
2778
- }), (d, s) => {
2779
- const h = fe("el-tooltip"), f = yt("loading");
2770
+ conf: o
2771
+ }), (u, d) => {
2772
+ const h = fe("el-tooltip"), f = pt("loading");
2780
2773
  return g(), v("div", {
2781
2774
  class: J(["relative cc1-form-box", [e.option.table?.fitHeight ? "col" : "no-min-height"]])
2782
2775
  }, [
@@ -2784,165 +2777,165 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
2784
2777
  class: J(["row", [e.option.table?.fitHeight ? "absolute fit" : ""]]),
2785
2778
  style: { overflow: "hidden" }
2786
2779
  }, [
2787
- S(d.$slots, "box-left"),
2780
+ S(u.$slots, "box-left"),
2788
2781
  R("div", {
2789
2782
  class: J(["column fit-width no-wrap", [e.option.table?.fitHeight ? "col" : ""]])
2790
2783
  }, [
2791
- e.option.search?.show !== !1 ? (g(), v("div", Bo, [
2792
- F(l(oe), {
2793
- model: l(a).search.form,
2784
+ e.option.search?.show !== !1 ? (g(), v("div", Lo, [
2785
+ F(r(oe), {
2786
+ model: r(o).search.form,
2794
2787
  inline: "",
2795
2788
  size: e.option.size?.search
2796
2789
  }, {
2797
2790
  default: p(() => [
2798
- S(d.$slots, "search-start", {
2799
- row: l(a).search.form
2791
+ S(u.$slots, "search-start", {
2792
+ row: r(o).search.form
2800
2793
  }),
2801
- (g(!0), v(B, null, G(l(a).search.column.list, (m) => (g(), v(B, {
2794
+ (g(!0), v(B, null, N(r(o).search.column.list, (m) => (g(), v(B, {
2802
2795
  key: m.key
2803
2796
  }, [
2804
- S(d.$slots, "search-" + m.key + "-start", {
2805
- row: l(a).search.form
2797
+ S(u.$slots, "search-" + m.key + "-start", {
2798
+ row: r(o).search.form
2806
2799
  }),
2807
- (typeof m.show?.search == "function" ? m.show?.search(l(a).search.form) : m.show?.search) ? (g(), b(l(be), {
2800
+ (typeof m.show?.search == "function" ? m.show?.search(r(o).search.form) : m.show?.search) ? (g(), b(r(be), {
2808
2801
  key: 0,
2809
2802
  label: m.text?.search?.label ?? m.label
2810
2803
  }, {
2811
2804
  default: p(() => [
2812
- S(d.$slots, "search-" + m.key + "-left", {
2813
- row: l(a).search.form
2805
+ S(u.$slots, "search-" + m.key + "-left", {
2806
+ row: r(o).search.form
2814
2807
  }),
2815
- S(d.$slots, "search-" + m.key, {
2816
- row: l(a).search.form
2808
+ S(u.$slots, "search-" + m.key, {
2809
+ row: r(o).search.form
2817
2810
  }, () => [
2818
- m.options?.search?.type ? (g(), b(Re, {
2811
+ m.options?.search?.type ? (g(), b(Ae, {
2819
2812
  key: 0,
2820
2813
  item: m,
2821
- conf: l(a),
2814
+ conf: r(o),
2822
2815
  type: m.options.search.type
2823
- }, null, 8, ["item", "conf", "type"])) : (g(), b(Re, {
2816
+ }, null, 8, ["item", "conf", "type"])) : (g(), b(Ae, {
2824
2817
  key: 1,
2825
2818
  item: m,
2826
- conf: l(a),
2819
+ conf: r(o),
2827
2820
  type: m.type
2828
2821
  }, null, 8, ["item", "conf", "type"]))
2829
2822
  ]),
2830
- S(d.$slots, "search-" + m.key + "-right", {
2831
- row: l(a).search.form
2823
+ S(u.$slots, "search-" + m.key + "-right", {
2824
+ row: r(o).search.form
2832
2825
  })
2833
2826
  ]),
2834
2827
  _: 2
2835
2828
  }, 1032, ["label"])) : V("", !0),
2836
- S(d.$slots, "search-" + m.key + "-end", {
2837
- row: l(a).search.form
2829
+ S(u.$slots, "search-" + m.key + "-end", {
2830
+ row: r(o).search.form
2838
2831
  })
2839
2832
  ], 64))), 128)),
2840
- S(d.$slots, "search-center", {
2841
- row: l(a).search.form
2833
+ S(u.$slots, "search-center", {
2834
+ row: r(o).search.form
2842
2835
  }),
2843
- e.option.tools?.search || e.option.tools?.reset ? (g(), b(l(be), { key: 0 }, {
2836
+ e.option.tools?.search || e.option.tools?.reset ? (g(), b(r(be), { key: 0 }, {
2844
2837
  default: p(() => [
2845
- e.option.tools?.search ? (g(), b(l(N), {
2838
+ e.option.tools?.search ? (g(), b(r(G), {
2846
2839
  key: 0,
2847
2840
  type: "primary",
2848
- onClick: l(a).search.submit
2841
+ onClick: r(o).search.submit
2849
2842
  }, {
2850
2843
  default: p(() => [
2851
- M(U(l(C).tCurd("search")), 1)
2844
+ M(U(r(C).tCurd("search")), 1)
2852
2845
  ]),
2853
2846
  _: 1
2854
2847
  }, 8, ["onClick"])) : V("", !0),
2855
- e.option.tools?.reset ? (g(), b(l(N), {
2848
+ e.option.tools?.reset ? (g(), b(r(G), {
2856
2849
  key: 1,
2857
- onClick: l(a).search.reset
2850
+ onClick: r(o).search.reset
2858
2851
  }, {
2859
2852
  default: p(() => [
2860
- M(U(l(C).tCurd("reset")), 1)
2853
+ M(U(r(C).tCurd("reset")), 1)
2861
2854
  ]),
2862
2855
  _: 1
2863
2856
  }, 8, ["onClick"])) : V("", !0)
2864
2857
  ]),
2865
2858
  _: 1
2866
2859
  })) : V("", !0),
2867
- S(d.$slots, "search-end", {
2868
- row: l(a).search.form
2860
+ S(u.$slots, "search-end", {
2861
+ row: r(o).search.form
2869
2862
  })
2870
2863
  ]),
2871
2864
  _: 3
2872
2865
  }, 8, ["model", "size"])
2873
2866
  ])) : V("", !0),
2874
- R("div", To, [
2875
- R("div", Lo, [
2876
- l(r)(e.option.tools?.add) ? (g(), v("div", jo, [
2877
- F(l(N), {
2867
+ R("div", jo, [
2868
+ R("div", Ko, [
2869
+ r(s)(e.option.tools?.add) ? (g(), v("div", Po, [
2870
+ F(r(G), {
2878
2871
  type: "primary",
2879
- onClick: s[0] || (s[0] = (m) => l(a).update.open(l(n).Add)),
2872
+ onClick: d[0] || (d[0] = (m) => r(o).update.open(r(n).Add)),
2880
2873
  size: e.option.size?.search
2881
2874
  }, {
2882
2875
  default: p(() => [
2883
- M(U(l(C).tCurd("add")), 1)
2876
+ M(U(r(C).tCurd("add")), 1)
2884
2877
  ]),
2885
2878
  _: 1
2886
2879
  }, 8, ["size"])
2887
2880
  ])) : V("", !0),
2888
- e.option.table?.selectable && l(r)(e.option.tools?.delete) ? (g(), v("div", Ko, [
2889
- F(l(N), {
2881
+ e.option.table?.selectable && r(s)(e.option.tools?.delete) ? (g(), v("div", Io, [
2882
+ F(r(G), {
2890
2883
  type: "danger",
2891
- onClick: s[1] || (s[1] = (m) => l(a).remove.open(l(a).table.selection.list)),
2884
+ onClick: d[1] || (d[1] = (m) => r(o).remove.open(r(o).table.selection.list)),
2892
2885
  size: e.option.size?.search
2893
2886
  }, {
2894
2887
  default: p(() => [
2895
- M(U(l(C).tCurd("delete")), 1)
2888
+ M(U(r(C).tCurd("delete")), 1)
2896
2889
  ]),
2897
2890
  _: 1
2898
2891
  }, 8, ["size"])
2899
2892
  ])) : V("", !0),
2900
- e.option.tools?.expand ? (g(), v("div", Po, [
2901
- F(l(N), {
2893
+ e.option.tools?.expand ? (g(), v("div", Go, [
2894
+ F(r(G), {
2902
2895
  type: "warning",
2903
- onClick: s[2] || (s[2] = (m) => l(a).table.expand.all()),
2896
+ onClick: d[2] || (d[2] = (m) => r(o).table.expand.all()),
2904
2897
  size: e.option.size?.search
2905
2898
  }, {
2906
2899
  default: p(() => [
2907
- M(U(l(C).tCurd("expandCollapse")), 1)
2900
+ M(U(r(C).tCurd("expandCollapse")), 1)
2908
2901
  ]),
2909
2902
  _: 1
2910
2903
  }, 8, ["size"])
2911
2904
  ])) : V("", !0),
2912
2905
  e.option.tools?.export?.show ? (g(), v(B, { key: 3 }, [
2913
- e.option.tools?.export?.dropdown?.show ? (g(), b(l(ut), {
2906
+ e.option.tools?.export?.dropdown?.show ? (g(), b(r(gt), {
2914
2907
  key: 0,
2915
- onCommand: l(a).export.click
2908
+ onCommand: r(o).export.click
2916
2909
  }, {
2917
2910
  dropdown: p(() => [
2918
- F(l(ct), {
2911
+ F(r(ht), {
2919
2912
  size: e.option.size?.search
2920
2913
  }, {
2921
2914
  default: p(() => [
2922
- e.option.tools?.export?.dropdown?.select && (e.option.table?.selectable || l(r)(e.option.tools?.delete)) ? (g(), b(l(Se), {
2915
+ e.option.tools?.export?.dropdown?.select && (e.option.table?.selectable || r(s)(e.option.tools?.delete)) ? (g(), b(r(Se), {
2923
2916
  key: 0,
2924
2917
  command: "select"
2925
2918
  }, {
2926
2919
  default: p(() => [
2927
- M(U(l(C).tCurd("exportSelect")), 1)
2920
+ M(U(r(C).tCurd("exportSelect")), 1)
2928
2921
  ]),
2929
2922
  _: 1
2930
2923
  })) : V("", !0),
2931
- e.option.tools?.export?.dropdown?.page ? (g(), b(l(Se), {
2924
+ e.option.tools?.export?.dropdown?.page ? (g(), b(r(Se), {
2932
2925
  key: 1,
2933
2926
  command: "page"
2934
2927
  }, {
2935
2928
  default: p(() => [
2936
- M(U(l(C).tCurd("exportPage")), 1)
2929
+ M(U(r(C).tCurd("exportPage")), 1)
2937
2930
  ]),
2938
2931
  _: 1
2939
2932
  })) : V("", !0),
2940
- e.option.tools?.export?.dropdown?.all ? (g(), b(l(Se), {
2933
+ e.option.tools?.export?.dropdown?.all ? (g(), b(r(Se), {
2941
2934
  key: 2,
2942
2935
  command: "all"
2943
2936
  }, {
2944
2937
  default: p(() => [
2945
- M(U(l(C).tCurd("exportAll")), 1)
2938
+ M(U(r(C).tCurd("exportAll")), 1)
2946
2939
  ]),
2947
2940
  _: 1
2948
2941
  })) : V("", !0)
@@ -2951,66 +2944,66 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
2951
2944
  }, 8, ["size"])
2952
2945
  ]),
2953
2946
  default: p(() => [
2954
- R("div", Io, [
2955
- F(l(N), {
2947
+ R("div", No, [
2948
+ F(r(G), {
2956
2949
  type: "warning",
2957
- loading: l(a).export.loading,
2950
+ loading: r(o).export.loading,
2958
2951
  size: e.option.size?.search
2959
2952
  }, {
2960
2953
  default: p(() => [
2961
- M(U(l(C).tCurd("export")), 1)
2954
+ M(U(r(C).tCurd("export")), 1)
2962
2955
  ]),
2963
2956
  _: 1
2964
2957
  }, 8, ["loading", "size"])
2965
2958
  ])
2966
2959
  ]),
2967
2960
  _: 1
2968
- }, 8, ["onCommand"])) : (g(), v("div", No, [
2969
- F(l(N), {
2961
+ }, 8, ["onCommand"])) : (g(), v("div", Ho, [
2962
+ F(r(G), {
2970
2963
  type: "warning",
2971
- loading: l(a).export.loading,
2964
+ loading: r(o).export.loading,
2972
2965
  size: e.option.size?.search,
2973
- onClick: s[3] || (s[3] = (m) => l(a).export.run.start("all"))
2966
+ onClick: d[3] || (d[3] = (m) => r(o).export.run.start("all"))
2974
2967
  }, {
2975
2968
  default: p(() => [
2976
- M(U(l(C).tCurd("export")), 1)
2969
+ M(U(r(C).tCurd("export")), 1)
2977
2970
  ]),
2978
2971
  _: 1
2979
2972
  }, 8, ["loading", "size"])
2980
2973
  ]))
2981
2974
  ], 64)) : V("", !0),
2982
- S(d.$slots, "tools-left")
2975
+ S(u.$slots, "tools-left")
2983
2976
  ]),
2984
- R("div", Go, [
2985
- S(d.$slots, "tools-right"),
2986
- l(a).page.showTools ? (g(), b(l(Oe), x({
2977
+ R("div", Wo, [
2978
+ S(u.$slots, "tools-right"),
2979
+ r(o).page.showTools ? (g(), b(r(Re), x({
2987
2980
  key: 0,
2988
- "current-page": l(a).page.num,
2989
- "onUpdate:currentPage": s[4] || (s[4] = (m) => l(a).page.num = m),
2990
- "page-size": l(a).page.size,
2991
- "onUpdate:pageSize": s[5] || (s[5] = (m) => l(a).page.size = m),
2981
+ "current-page": r(o).page.num,
2982
+ "onUpdate:currentPage": d[4] || (d[4] = (m) => r(o).page.num = m),
2983
+ "page-size": r(o).page.size,
2984
+ "onUpdate:pageSize": d[5] || (d[5] = (m) => r(o).page.size = m),
2992
2985
  background: "",
2993
- "page-sizes": l(a).page.sizeList,
2994
- "pager-count": l(a).page.pagerCount,
2995
- layout: l(a).page.layout,
2996
- total: l(a).page.total,
2986
+ "page-sizes": r(o).page.sizeList,
2987
+ "pager-count": r(o).page.pagerCount,
2988
+ layout: r(o).page.layout,
2989
+ total: r(o).page.total,
2997
2990
  size: e.option.size?.table,
2998
- onSizeChange: l(a).table.getList,
2999
- onCurrentChange: l(a).table.getList
2991
+ onSizeChange: r(o).table.getList,
2992
+ onCurrentChange: r(o).table.getList
3000
2993
  }, e.option.page?.pagination || {}, E(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : V("", !0),
3001
2994
  e.option.tools?.expandColumn === void 0 || e.option.tools?.expandColumn ? (g(), b(h, {
3002
2995
  key: 1,
3003
2996
  effect: "dark",
3004
- content: l(a).table.header.group.expand ? l(C).tCurd("mergeColumn") : l(C).tCurd("expandColumn"),
2997
+ content: r(o).table.header.group.expand ? r(C).tCurd("mergeColumn") : r(C).tCurd("expandColumn"),
3005
2998
  placement: "top"
3006
2999
  }, {
3007
3000
  default: p(() => [
3008
3001
  R("div", {
3009
3002
  class: J(["refresh-btn", [e.option.size?.search]]),
3010
- onClick: s[6] || (s[6] = //@ts-ignore
3011
- (...m) => l(a).table.header.group.toggleExpandAll && l(a).table.header.group.toggleExpandAll(...m))
3003
+ onClick: d[6] || (d[6] = //@ts-ignore
3004
+ (...m) => r(o).table.header.group.toggleExpandAll && r(o).table.header.group.toggleExpandAll(...m))
3012
3005
  }, [
3013
- l(a).table.header.group.expand ? (g(), b(lo, { key: 0 })) : (g(), b(uo, { key: 1 }))
3006
+ r(o).table.header.group.expand ? (g(), b(ro, { key: 0 })) : (g(), b(fo, { key: 1 }))
3014
3007
  ], 2)
3015
3008
  ]),
3016
3009
  _: 1
@@ -3018,10 +3011,10 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3018
3011
  e.option.tools?.refresh === void 0 || e.option.tools?.refresh ? (g(), v("div", {
3019
3012
  key: 2,
3020
3013
  class: J(["refresh-btn", [e.option.size?.search]]),
3021
- onClick: s[7] || (s[7] = //@ts-ignore
3022
- (...m) => l(a).table.getList && l(a).table.getList(...m))
3014
+ onClick: d[7] || (d[7] = //@ts-ignore
3015
+ (...m) => r(o).table.getList && r(o).table.getList(...m))
3023
3016
  }, [
3024
- F(go)
3017
+ F(yo)
3025
3018
  ], 2)) : V("", !0)
3026
3019
  ])
3027
3020
  ]),
@@ -3031,18 +3024,18 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3031
3024
  R("div", {
3032
3025
  class: J(["column form-box-content", [e.option.table?.fitHeight ? "absolute fit" : ""]])
3033
3026
  }, [
3034
- bt((g(), b(l(ft), x({
3027
+ wt((g(), b(r(yt), x({
3035
3028
  ref_key: "tableRef",
3036
3029
  ref: c,
3037
- data: l(a).table.data,
3030
+ data: r(o).table.data,
3038
3031
  border: e.option.table?.border === void 0 ? !0 : e.option.table?.border,
3039
- onSelectionChange: l(a).table.selection.change,
3040
- onSortChange: l(a).table.sort.change,
3041
- "expand-row-keys": l(a).table.expand.rowKeys,
3042
- onExpandChange: l(a).table.expand.change
3032
+ onSelectionChange: r(o).table.selection.change,
3033
+ onSortChange: r(o).table.sort.change,
3034
+ "expand-row-keys": r(o).table.expand.rowKeys,
3035
+ onExpandChange: r(o).table.expand.change
3043
3036
  }, e.option.table, E(e.option.table?.on || {})), {
3044
3037
  default: p(() => [
3045
- (typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.show : e.option.table?.selectable) || l(r)(e.option.tools?.delete) || e.option.tools?.export?.show && e.option.tools?.export?.select ? (g(), b(l(ye), x({
3038
+ (typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.show : e.option.table?.selectable) || r(s)(e.option.tools?.delete) || e.option.tools?.export?.show && e.option.tools?.export?.select ? (g(), b(r(ye), x({
3046
3039
  key: 0,
3047
3040
  type: "selection",
3048
3041
  width: "40",
@@ -3051,7 +3044,7 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3051
3044
  "show-overflow-tooltip": !1,
3052
3045
  className: "cc1-form-selectable-column"
3053
3046
  }, typeof e.option.table?.selectable == "object" ? e.option.table?.selectable : {}, E(typeof e.option.table?.selectable == "object" ? e.option.table?.selectable?.on || {} : {})), null, 16)) : V("", !0),
3054
- (typeof e.option.table?.index == "object" ? e.option.table?.index?.show : e.option.table?.index) ? (g(), b(l(ye), x({
3047
+ (typeof e.option.table?.index == "object" ? e.option.table?.index?.show : e.option.table?.index) ? (g(), b(r(ye), x({
3055
3048
  key: 1,
3056
3049
  type: "index",
3057
3050
  fixed: "left",
@@ -3061,19 +3054,19 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3061
3054
  "show-overflow-tooltip": !1,
3062
3055
  className: "cc1-form-index-column"
3063
3056
  }, typeof e.option.table?.index == "object" ? e.option.table?.index : {}, E(typeof e.option.table?.index == "object" ? e.option.table?.index?.on || {} : {})), null, 16)) : V("", !0),
3064
- F(Ao, {
3065
- conf: l(a),
3066
- columnList: l(a).table.column.list,
3057
+ F(To, {
3058
+ conf: r(o),
3059
+ columnList: r(o).table.column.list,
3067
3060
  option: e.option
3068
3061
  }, Y({ _: 2 }, [
3069
- G(d.$slots, (m, w) => ({
3062
+ N(u.$slots, (m, w) => ({
3070
3063
  name: w,
3071
3064
  fn: p((D) => [
3072
- S(d.$slots, w, $e(ze(D || {})))
3065
+ S(u.$slots, w, $e(ze(D || {})))
3073
3066
  ])
3074
3067
  }))
3075
3068
  ]), 1032, ["conf", "columnList", "option"]),
3076
- l(r)(e.option.table?.add) || l(r)(e.option.table?.update) || l(r)(e.option.table?.delete) || l(r)(e.option.table?.view) || d.$slots["table-op-left"] || d.$slots["table-op-right"] ? (g(), b(l(ye), x({
3069
+ r(s)(e.option.table?.add) || r(s)(e.option.table?.update) || r(s)(e.option.table?.delete) || r(s)(e.option.table?.view) || u.$slots["table-op-left"] || u.$slots["table-op-right"] ? (g(), b(r(ye), x({
3077
3070
  key: 2,
3078
3071
  align: "center",
3079
3072
  fixed: "right"
@@ -3082,85 +3075,85 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3082
3075
  "show-overflow-tooltip": !1
3083
3076
  }), {
3084
3077
  header: p(() => [
3085
- S(d.$slots, "table-header-op", {}, () => [
3086
- M(U(l(C).tCurd("operation")), 1)
3078
+ S(u.$slots, "table-header-op", {}, () => [
3079
+ M(U(r(C).tCurd("operation")), 1)
3087
3080
  ])
3088
3081
  ]),
3089
3082
  default: p(({ row: m }) => [
3090
- F(l(oe), {
3083
+ F(r(oe), {
3091
3084
  size: e.option.size?.table
3092
3085
  }, {
3093
3086
  default: p(() => [
3094
- S(d.$slots, "table-op-left", { row: m }),
3095
- l(a).update.type === l(n).Update && e.option.table?.inlineEdit && l(a).update.form[o.option.table?.rowKey] === m[o.option.table?.rowKey] ? (g(), v(B, { key: 0 }, [
3096
- F(l(N), {
3087
+ S(u.$slots, "table-op-left", { row: m }),
3088
+ r(o).update.type === r(n).Update && e.option.table?.inlineEdit && r(o).update.form[a.option.table?.rowKey] === m[a.option.table?.rowKey] ? (g(), v(B, { key: 0 }, [
3089
+ F(r(G), {
3097
3090
  link: "",
3098
3091
  type: "info",
3099
- onClick: l(a).update.close
3092
+ onClick: r(o).update.close
3100
3093
  }, {
3101
3094
  default: p(() => [
3102
- M(U(l(C).tCurd("cancel")), 1)
3095
+ M(U(r(C).tCurd("cancel")), 1)
3103
3096
  ]),
3104
3097
  _: 1
3105
3098
  }, 8, ["onClick"]),
3106
- F(l(N), {
3099
+ F(r(G), {
3107
3100
  link: "",
3108
3101
  type: "primary",
3109
- onClick: l(a).update.submit,
3110
- loading: l(a).update.loading
3102
+ onClick: r(o).update.submit,
3103
+ loading: r(o).update.loading
3111
3104
  }, {
3112
3105
  default: p(() => [
3113
- M(U(l(C).tCurd("confirm")), 1)
3106
+ M(U(r(C).tCurd("confirm")), 1)
3114
3107
  ]),
3115
3108
  _: 1
3116
3109
  }, 8, ["onClick", "loading"]),
3117
- S(d.$slots, "table-op-edit-right", { row: m })
3110
+ S(u.$slots, "table-op-edit-right", { row: m })
3118
3111
  ], 64)) : (g(), v(B, { key: 1 }, [
3119
- l(r)(e.option.table?.add, m) ? (g(), b(l(N), {
3112
+ r(s)(e.option.table?.add, m) ? (g(), b(r(G), {
3120
3113
  key: 0,
3121
3114
  link: "",
3122
3115
  type: "primary",
3123
- onClick: (w) => l(a).update.open(l(n).Add, m)
3116
+ onClick: (w) => r(o).update.open(r(n).Add, m)
3124
3117
  }, {
3125
3118
  default: p(() => [
3126
- M(U(l(C).tCurd("add")), 1)
3119
+ M(U(r(C).tCurd("add")), 1)
3127
3120
  ]),
3128
3121
  _: 1
3129
3122
  }, 8, ["onClick"])) : V("", !0),
3130
- l(r)(e.option.table?.view, m) ? (g(), b(l(N), {
3123
+ r(s)(e.option.table?.view, m) ? (g(), b(r(G), {
3131
3124
  key: 1,
3132
3125
  link: "",
3133
3126
  type: "primary",
3134
- onClick: (w) => l(a).update.open(l(n).View, m)
3127
+ onClick: (w) => r(o).update.open(r(n).View, m)
3135
3128
  }, {
3136
3129
  default: p(() => [
3137
- M(U(l(C).tCurd("view")), 1)
3130
+ M(U(r(C).tCurd("view")), 1)
3138
3131
  ]),
3139
3132
  _: 1
3140
3133
  }, 8, ["onClick"])) : V("", !0),
3141
- l(r)(e.option.table?.update, m) ? (g(), b(l(N), {
3134
+ r(s)(e.option.table?.update, m) ? (g(), b(r(G), {
3142
3135
  key: 2,
3143
3136
  link: "",
3144
3137
  type: "warning",
3145
- onClick: (w) => l(a).update.open(l(n).Update, m)
3138
+ onClick: (w) => r(o).update.open(r(n).Update, m)
3146
3139
  }, {
3147
3140
  default: p(() => [
3148
- M(U(l(C).tCurd("edit")), 1)
3141
+ M(U(r(C).tCurd("edit")), 1)
3149
3142
  ]),
3150
3143
  _: 1
3151
3144
  }, 8, ["onClick"])) : V("", !0),
3152
- l(r)(e.option.table?.delete, m) ? (g(), b(l(N), {
3145
+ r(s)(e.option.table?.delete, m) ? (g(), b(r(G), {
3153
3146
  key: 3,
3154
3147
  link: "",
3155
3148
  type: "danger",
3156
- onClick: (w) => l(a).remove.open([m])
3149
+ onClick: (w) => r(o).remove.open([m])
3157
3150
  }, {
3158
3151
  default: p(() => [
3159
- M(U(l(C).tCurd("delete")), 1)
3152
+ M(U(r(C).tCurd("delete")), 1)
3160
3153
  ]),
3161
3154
  _: 1
3162
3155
  }, 8, ["onClick"])) : V("", !0),
3163
- S(d.$slots, "table-op-right", { row: m })
3156
+ S(u.$slots, "table-op-right", { row: m })
3164
3157
  ], 64))
3165
3158
  ]),
3166
3159
  _: 2
@@ -3171,61 +3164,61 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3171
3164
  ]),
3172
3165
  _: 3
3173
3166
  }, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
3174
- [f, l(a).table.loading]
3167
+ [f, r(o).table.loading]
3175
3168
  ])
3176
3169
  ], 2)
3177
3170
  ], 2),
3178
- R("div", Ho, [
3179
- (e.option.page?.show === void 0 || e.option.page?.show) && !l(a).page.showTools ? (g(), b(l(Oe), x({
3171
+ R("div", Jo, [
3172
+ (e.option.page?.show === void 0 || e.option.page?.show) && !r(o).page.showTools ? (g(), b(r(Re), x({
3180
3173
  key: 0,
3181
- "current-page": l(a).page.num,
3182
- "onUpdate:currentPage": s[8] || (s[8] = (m) => l(a).page.num = m),
3183
- "page-size": l(a).page.size,
3184
- "onUpdate:pageSize": s[9] || (s[9] = (m) => l(a).page.size = m),
3174
+ "current-page": r(o).page.num,
3175
+ "onUpdate:currentPage": d[8] || (d[8] = (m) => r(o).page.num = m),
3176
+ "page-size": r(o).page.size,
3177
+ "onUpdate:pageSize": d[9] || (d[9] = (m) => r(o).page.size = m),
3185
3178
  background: "",
3186
- "page-sizes": l(a).page.sizeList,
3187
- "pager-count": l(a).page.pagerCount,
3188
- layout: l(a).page.layout,
3189
- total: l(a).page.total,
3179
+ "page-sizes": r(o).page.sizeList,
3180
+ "pager-count": r(o).page.pagerCount,
3181
+ layout: r(o).page.layout,
3182
+ total: r(o).page.total,
3190
3183
  size: e.option.size?.table,
3191
- onSizeChange: l(a).table.getList,
3192
- onCurrentChange: l(a).table.getList
3184
+ onSizeChange: r(o).table.getList,
3185
+ onCurrentChange: r(o).table.getList
3193
3186
  }, e.option.page?.pagination || {}, E(e.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : V("", !0)
3194
3187
  ])
3195
3188
  ], 2),
3196
- S(d.$slots, "box-right")
3189
+ S(u.$slots, "box-right")
3197
3190
  ], 2),
3198
- F(l(Ee), x({
3199
- modelValue: l(a).update.show,
3200
- "onUpdate:modelValue": s[10] || (s[10] = (m) => l(a).update.show = m),
3201
- title: l(a).update.title,
3202
- "before-close": l(a).update.close
3191
+ F(r(Ee), x({
3192
+ modelValue: r(o).update.show,
3193
+ "onUpdate:modelValue": d[10] || (d[10] = (m) => r(o).update.show = m),
3194
+ title: r(o).update.title,
3195
+ "before-close": r(o).update.close
3203
3196
  }, e.option.dialog), {
3204
3197
  footer: p(() => [
3205
- R("span", Wo, [
3206
- F(l(oe), {
3198
+ R("span", qo, [
3199
+ F(r(oe), {
3207
3200
  size: e.option.size?.form
3208
3201
  }, {
3209
3202
  default: p(() => [
3210
- S(d.$slots, "dialog-footer", {
3211
- row: l(a).update
3203
+ S(u.$slots, "dialog-footer", {
3204
+ row: r(o).update
3212
3205
  }, () => [
3213
- F(l(N), {
3214
- onClick: l(a).update.close
3206
+ F(r(G), {
3207
+ onClick: r(o).update.close
3215
3208
  }, {
3216
3209
  default: p(() => [
3217
- M(U(l(C).tCurd("close")), 1)
3210
+ M(U(r(C).tCurd("close")), 1)
3218
3211
  ]),
3219
3212
  _: 1
3220
3213
  }, 8, ["onClick"]),
3221
- l(a).update.type !== l(n).View ? (g(), b(l(N), {
3214
+ r(o).update.type !== r(n).View ? (g(), b(r(G), {
3222
3215
  key: 0,
3223
3216
  type: "primary",
3224
- onClick: l(a).update.submit,
3225
- loading: l(a).update.loading
3217
+ onClick: r(o).update.submit,
3218
+ loading: r(o).update.loading
3226
3219
  }, {
3227
3220
  default: p(() => [
3228
- M(U(l(C).tCurd("submit")), 1)
3221
+ M(U(r(C).tCurd("submit")), 1)
3229
3222
  ]),
3230
3223
  _: 1
3231
3224
  }, 8, ["onClick", "loading"])) : V("", !0)
@@ -3236,74 +3229,74 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3236
3229
  ])
3237
3230
  ]),
3238
3231
  default: p(() => [
3239
- S(d.$slots, "dialog-start", {
3240
- row: l(a).update
3232
+ S(u.$slots, "dialog-start", {
3233
+ row: r(o).update
3241
3234
  }),
3242
- F(l(oe), {
3235
+ F(r(oe), {
3243
3236
  ref_key: "ruleFormRef",
3244
- ref: u,
3245
- model: l(a).update.form,
3246
- rules: l(a).update.rules,
3237
+ ref: i,
3238
+ model: r(o).update.form,
3239
+ rules: r(o).update.rules,
3247
3240
  size: e.option.size?.form,
3248
3241
  class: "update-dialog-form"
3249
3242
  }, {
3250
3243
  default: p(() => [
3251
- l(a).update.showContent ? (g(), b(_e, {
3244
+ r(o).update.showContent ? (g(), b(at, {
3252
3245
  key: 0,
3253
- "form-grid": l(a).update.formGrid,
3254
- "max-span": l(a).update.formMaxSpan,
3255
- form: l(a).update.form,
3256
- type: l(a).update.type,
3246
+ "form-grid": r(o).update.formGrid,
3247
+ "max-span": r(o).update.formMaxSpan,
3248
+ form: r(o).update.form,
3249
+ type: r(o).update.type,
3257
3250
  stripe: e.option.form?.stripe,
3258
3251
  "label-width": e.option.form?.labelWidth,
3259
3252
  "form-option": e.option.form,
3260
- "get-bind": l(a).update.getBind,
3261
- "get-on": l(a).update.getOn,
3262
- "get-disabled": l(a).update.getDisabled
3253
+ "get-bind": r(o).update.getBind,
3254
+ "get-on": r(o).update.getOn,
3255
+ "get-disabled": r(o).update.getDisabled
3263
3256
  }, Y({ _: 2 }, [
3264
- G(d.$slots, (m, w) => ({
3257
+ N(u.$slots, (m, w) => ({
3265
3258
  name: w,
3266
3259
  fn: p((D) => [
3267
- S(d.$slots, w, $e(ze(D || {})))
3260
+ S(u.$slots, w, $e(ze(D || {})))
3268
3261
  ])
3269
3262
  }))
3270
3263
  ]), 1032, ["form-grid", "max-span", "form", "type", "stripe", "label-width", "form-option", "get-bind", "get-on", "get-disabled"])) : V("", !0)
3271
3264
  ]),
3272
3265
  _: 3
3273
3266
  }, 8, ["model", "rules", "size"]),
3274
- S(d.$slots, "dialog-end", {
3275
- row: l(a).update
3267
+ S(u.$slots, "dialog-end", {
3268
+ row: r(o).update
3276
3269
  })
3277
3270
  ]),
3278
3271
  _: 3
3279
3272
  }, 16, ["modelValue", "title", "before-close"]),
3280
- F(l(Ee), {
3281
- modelValue: l(a).remove.show,
3282
- "onUpdate:modelValue": s[11] || (s[11] = (m) => l(a).remove.show = m),
3283
- title: l(a).remove.title,
3273
+ F(r(Ee), {
3274
+ modelValue: r(o).remove.show,
3275
+ "onUpdate:modelValue": d[11] || (d[11] = (m) => r(o).remove.show = m),
3276
+ title: r(o).remove.title,
3284
3277
  "close-on-click-modal": !1
3285
3278
  }, {
3286
3279
  footer: p(() => [
3287
- R("span", Qo, [
3288
- F(l(oe), {
3280
+ R("span", Yo, [
3281
+ F(r(oe), {
3289
3282
  size: e.option.size?.form
3290
3283
  }, {
3291
3284
  default: p(() => [
3292
- F(l(N), {
3293
- onClick: l(a).remove.close
3285
+ F(r(G), {
3286
+ onClick: r(o).remove.close
3294
3287
  }, {
3295
3288
  default: p(() => [
3296
- M(U(l(C).tCurd("close")), 1)
3289
+ M(U(r(C).tCurd("close")), 1)
3297
3290
  ]),
3298
3291
  _: 1
3299
3292
  }, 8, ["onClick"]),
3300
- F(l(N), {
3293
+ F(r(G), {
3301
3294
  type: "danger",
3302
- onClick: l(a).remove.submit,
3303
- loading: l(a).remove.loading
3295
+ onClick: r(o).remove.submit,
3296
+ loading: r(o).remove.loading
3304
3297
  }, {
3305
3298
  default: p(() => [
3306
- M(U(l(C).tCurd("confirmDelete")), 1)
3299
+ M(U(r(C).tCurd("confirmDelete")), 1)
3307
3300
  ]),
3308
3301
  _: 1
3309
3302
  }, 8, ["onClick", "loading"])
@@ -3313,25 +3306,25 @@ const Eo = /* @__PURE__ */ se(xo, [["render", So]]), $o = { class: "row flex-cen
3313
3306
  ])
3314
3307
  ]),
3315
3308
  default: p(() => [
3316
- e.option.dialog?.delete?.content ? (g(), v("div", Jo, [
3317
- F(to, {
3309
+ e.option.dialog?.delete?.content ? (g(), v("div", Qo, [
3310
+ F(ao, {
3318
3311
  content: e.option.dialog?.delete?.content,
3319
- value: l(a).remove.items
3312
+ value: r(o).remove.items
3320
3313
  }, null, 8, ["content", "value"])
3321
- ])) : (g(), v("div", qo, U(l(C).tCurd("confirmDeleteMessage", l(a).remove.items.length)), 1))
3314
+ ])) : (g(), v("div", Xo, U(r(C).tCurd("confirmDeleteMessage", r(o).remove.items.length)), 1))
3322
3315
  ]),
3323
3316
  _: 1
3324
3317
  }, 8, ["modelValue", "title"]),
3325
- F(_t, {
3318
+ F(to, {
3326
3319
  ref_key: "switchConfirmRef",
3327
- ref: i,
3320
+ ref: l,
3328
3321
  size: e.option.size?.form
3329
3322
  }, null, 8, ["size"])
3330
3323
  ], 2);
3331
3324
  };
3332
3325
  }
3333
3326
  });
3334
- class oa {
3327
+ class na {
3335
3328
  /**
3336
3329
  * 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
3337
3330
  *
@@ -3339,8 +3332,8 @@ class oa {
3339
3332
  * @param name - 下载后的文件名,默认 `'download.png'`
3340
3333
  */
3341
3334
  static async download(t, n = "download.png") {
3342
- const o = document.createElement("a");
3343
- o.style.display = "none", o.href = t, o.setAttribute("download", n), typeof o.download > "u" && o.setAttribute("target", "_blank"), document.body.appendChild(o), o.click(), document.body.removeChild(o), window.URL.revokeObjectURL(t);
3335
+ const a = document.createElement("a");
3336
+ a.style.display = "none", a.href = t, a.setAttribute("download", n), typeof a.download > "u" && a.setAttribute("target", "_blank"), document.body.appendChild(a), a.click(), document.body.removeChild(a), window.URL.revokeObjectURL(t);
3344
3337
  }
3345
3338
  /**
3346
3339
  * 将json对象或者json数组导出为json文件保存
@@ -3348,54 +3341,54 @@ class oa {
3348
3341
  * @param name
3349
3342
  */
3350
3343
  static exportJSONFile = (t, n) => {
3351
- const o = new Blob([JSON.stringify(t)], { type: "application/json" }), r = URL.createObjectURL(o), a = document.createElement("a");
3352
- a.href = r, a.download = `${n || "config"}.json`, a.click();
3344
+ const a = new Blob([JSON.stringify(t)], { type: "application/json" }), s = URL.createObjectURL(a), o = document.createElement("a");
3345
+ o.href = s, o.download = `${n || "config"}.json`, o.click();
3353
3346
  };
3354
3347
  /**
3355
3348
  * 导入文件内容,默认为json
3356
3349
  * @param param
3357
3350
  * @returns
3358
3351
  */
3359
- static importFile = async (t) => new Promise((n, o) => {
3360
- const r = document.createElement("input");
3361
- r.type = "file";
3362
- const a = t?.accept || ".json";
3363
- r.accept = a, r.style.display = "none", r.onchange = (i) => {
3364
- const u = i.target.files[0];
3365
- if (!u) {
3366
- $.fail("未选择文件"), o("未选择文件");
3352
+ static importFile = async (t) => new Promise((n, a) => {
3353
+ const s = document.createElement("input");
3354
+ s.type = "file";
3355
+ const o = t?.accept || ".json";
3356
+ s.accept = o, s.style.display = "none", s.onchange = (l) => {
3357
+ const i = l.target.files[0];
3358
+ if (!i) {
3359
+ $.fail("未选择文件"), a("未选择文件");
3367
3360
  return;
3368
3361
  }
3369
3362
  const c = new FileReader();
3370
- c.onload = async (d) => {
3371
- const s = a == ".json" ? JSON.parse(d.target.result) : d.target.result;
3372
- n(s);
3363
+ c.onload = async (u) => {
3364
+ const d = o == ".json" ? JSON.parse(u.target.result) : u.target.result;
3365
+ n(d);
3373
3366
  }, c.onerror = () => {
3374
- $.fail("文件读取失败"), o("文件读取失败");
3375
- }, c.readAsText(u), document.body.removeChild(r);
3376
- }, document.body.appendChild(r), r.click();
3367
+ $.fail("文件读取失败"), a("文件读取失败");
3368
+ }, c.readAsText(i), document.body.removeChild(s);
3369
+ }, document.body.appendChild(s), s.click();
3377
3370
  });
3378
3371
  }
3379
- const Yo = (e, t) => {
3380
- if (e.component("TCurd", Xo), e.component("TFormList", Ke), e.component("TColumn", jt), t?.customComponent) {
3372
+ const _o = (e, t) => {
3373
+ if (e.component("TCurd", Zo), e.component("TFormList", Ge), e.component("TColumn", Pt), t?.customComponent) {
3381
3374
  W.customComponent = t.customComponent;
3382
3375
  for (const n in t.customComponent)
3383
3376
  e.component(n, t.customComponent[n]);
3384
3377
  }
3385
- }, aa = {
3386
- install: Yo
3378
+ }, la = {
3379
+ install: _o
3387
3380
  };
3388
3381
  export {
3389
3382
  Q as ArrUtil,
3390
- Jt as ExcelUtil,
3391
- jt as TColumn,
3392
- Xo as TCurd,
3393
- oa as TFile,
3383
+ Qt as ExcelUtil,
3384
+ Pt as TColumn,
3385
+ Zo as TCurd,
3386
+ na as TFile,
3394
3387
  W as TForm,
3395
3388
  L as TFormConfig,
3396
3389
  C as TFormI18n,
3397
- Ke as TFormList,
3390
+ Ge as TFormList,
3398
3391
  $ as TSys,
3399
- aa as default,
3400
- Yo as install
3392
+ la as default,
3393
+ _o as install
3401
3394
  };