cc1-form 1.4.4 → 1.4.6

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