cc1-form 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cc1-form.js CHANGED
@@ -1,7 +1,7 @@
1
- import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as Z, ElInput as X, ElSwitch as G, ElSelect as J, ElOption as H, ElRadioGroup as re, ElRadio as se, ElTreeSelect as de, ElDatePicker as ae, ElDialog as ee, ElButton as A, ElTableColumn as te, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as _, ElPagination as ie, ElTable as ye } from "element-plus";
1
+ import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as ee, ElInput as Z, ElSwitch as Y, ElSelect as q, ElOption as H, ElRadioGroup as se, ElRadio as de, ElTreeSelect as ue, ElDatePicker as le, ElDialog as oe, ElButton as T, ElTableColumn as ae, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as te, ElPagination as re, ElTable as ye } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as q, reactive as le, onMounted as ue, resolveComponent as x, createElementBlock as w, createCommentVNode as C, openBlock as f, renderSlot as v, createVNode as D, withCtx as y, createTextVNode as $, Fragment as z, renderList as F, createBlock as g, normalizeClass as I, normalizeStyle as fe, ref as N, unref as o, createElementVNode as M, mergeProps as V, toHandlers as U, resolveDynamicComponent as Y, nextTick as be, toDisplayString as E, getCurrentInstance as we, createSlots as oe, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
4
- class O {
3
+ import { defineComponent as Q, reactive as ne, onMounted as fe, resolveComponent as x, createElementBlock as b, createCommentVNode as v, openBlock as f, renderSlot as C, createVNode as U, withCtx as y, createTextVNode as $, Fragment as D, renderList as B, createBlock as g, normalizeClass as I, normalizeStyle as pe, ref as N, unref as a, createElementVNode as E, mergeProps as V, toHandlers as z, resolveDynamicComponent as _, nextTick as be, toDisplayString as O, getCurrentInstance as we, createSlots as J, resolveDirective as ke, withDirectives as ve, normalizeProps as Ce, guardReactiveProps as Ve } from "vue";
4
+ class M {
5
5
  /**
6
6
  * Vue Router 实例,需在应用初始化时赋值
7
7
  */
@@ -26,13 +26,13 @@ class O {
26
26
  * @param data 数据
27
27
  * @returns 是否显示
28
28
  */
29
- static isFun = (a, ...p) => Array.isArray(a) ? a.some((s) => typeof s == "function" ? s(...p) : s) : typeof a == "function" ? a(...p) : a;
29
+ static isFun = (o, ...p) => Array.isArray(o) ? o.some((s) => typeof s == "function" ? s(...p) : s) : typeof o == "function" ? o(...p) : o;
30
30
  /**
31
31
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
32
32
  */
33
33
  static getRouterParams = () => {
34
- const a = this.router.currentRoute.value.query || {}, p = this.router.currentRoute.value.params || {};
35
- return Object.keys(a).length ? a : Object.keys(p).length ? p : {};
34
+ const o = this.router.currentRoute.value.query || {}, p = this.router.currentRoute.value.params || {};
35
+ return Object.keys(o).length ? o : Object.keys(p).length ? p : {};
36
36
  };
37
37
  /**
38
38
  * 模块赋值
@@ -42,10 +42,10 @@ class O {
42
42
  * 加载模块
43
43
  * @param module
44
44
  */
45
- static loadModule = async (a) => {
46
- if (!O.moduleObj[a])
47
- throw new Error(`模块${a}未加载,请赋值如:TSys.moduleObj = { ${a}: ()=>import('${a}') }`);
48
- const p = await O.moduleObj[a]();
45
+ static loadModule = async (o) => {
46
+ if (!M.moduleObj[o])
47
+ throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
48
+ const p = await M.moduleObj[o]();
49
49
  return p.default ?? p;
50
50
  };
51
51
  /**
@@ -62,19 +62,19 @@ class O {
62
62
  * @param type 消息类型
63
63
  * @param options 其他选项
64
64
  */
65
- static showMessage(a, p, s = {}) {
65
+ static showMessage(o, p, s = {}) {
66
66
  const l = Date.now();
67
- if (!this.tipMessages[a] || l - this.tipMessages[a] > this.tipMessagesGap) {
68
- this.tipMessages[a] = l;
69
- const e = Object.assign(
67
+ if (!this.tipMessages[o] || l - this.tipMessages[o] > this.tipMessagesGap) {
68
+ this.tipMessages[o] = l;
69
+ const t = Object.assign(
70
70
  {
71
- message: a,
71
+ message: o,
72
72
  type: p
73
73
  },
74
74
  s
75
75
  );
76
- ce(e), setTimeout(() => {
77
- delete this.tipMessages[a];
76
+ ce(t), setTimeout(() => {
77
+ delete this.tipMessages[o];
78
78
  }, this.tipMessagesGap);
79
79
  }
80
80
  }
@@ -83,16 +83,16 @@ class O {
83
83
  * @param content
84
84
  * @param options
85
85
  */
86
- static fail = (a, p = {}) => {
87
- this.showMessage(a, "error", p);
86
+ static fail = (o, p = {}) => {
87
+ this.showMessage(o, "error", p);
88
88
  };
89
89
  /**
90
90
  * 成功提示
91
91
  * @param content
92
92
  * @param options
93
93
  */
94
- static success = (a, p = {}) => {
95
- this.showMessage(a, "success", p);
94
+ static success = (o, p = {}) => {
95
+ this.showMessage(o, "success", p);
96
96
  };
97
97
  static loadingObj = null;
98
98
  static loadingTimer = null;
@@ -101,9 +101,9 @@ class O {
101
101
  * @param show
102
102
  * @param text
103
103
  */
104
- static loading = (a = !0, p = "Loading...") => {
104
+ static loading = (o = !0, p = "Loading...") => {
105
105
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
106
- a ? this.loadingObj = me.service({
106
+ o ? this.loadingObj = me.service({
107
107
  lock: !0,
108
108
  text: p,
109
109
  background: "rgba(0, 0, 0, 0.3)"
@@ -115,46 +115,46 @@ class O {
115
115
  * @param url 地址
116
116
  * @param isCenter 是否居中
117
117
  */
118
- static openUrl = (a, p = !0) => {
118
+ static openUrl = (o, p = !0) => {
119
119
  if (p) {
120
120
  let s = screen.width / 2 - 500, l = screen.height / 2 - 800 / 2 - 30;
121
121
  window.open(
122
- a,
122
+ o,
123
123
  "_blank",
124
124
  "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + l + ", left=" + s
125
125
  );
126
126
  } else
127
- window.open(a, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
127
+ window.open(o, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
128
128
  };
129
129
  /**
130
130
  * 根据dom id截图并返回图片数据
131
131
  * @param param
132
132
  * @returns
133
133
  */
134
- static getImgPic = (a) => new Promise(async (p, s) => {
135
- let l = document.getElementById(a.id);
136
- const e = await O.loadModule("html2canvas");
134
+ static getImgPic = (o) => new Promise(async (p, s) => {
135
+ let l = document.getElementById(o.id);
136
+ const t = await M.loadModule("html2canvas");
137
137
  try {
138
- e(l, {
138
+ t(l, {
139
139
  logging: !1,
140
140
  allowTaint: !0,
141
141
  scale: window.devicePixelRatio,
142
- width: a.windowWidth,
143
- height: a.windowHeight,
144
- windowWidth: a.windowWidth,
145
- windowHeight: a.windowHeight,
142
+ width: o.windowWidth,
143
+ height: o.windowHeight,
144
+ windowWidth: o.windowWidth,
145
+ windowHeight: o.windowHeight,
146
146
  useCORS: !0,
147
147
  backgroundColor: "#ffffff00"
148
- }).then(function(t) {
149
- let i = t.toDataURL("image/png");
148
+ }).then(function(e) {
149
+ let i = e.toDataURL("image/png");
150
150
  p(i);
151
151
  });
152
- } catch (t) {
153
- s(t);
152
+ } catch (e) {
153
+ s(e);
154
154
  }
155
155
  });
156
156
  }
157
- class S {
157
+ class A {
158
158
  /**
159
159
  * 全局配置对象
160
160
  */
@@ -203,6 +203,10 @@ class S {
203
203
  },
204
204
  /** 工具栏配置 */
205
205
  tools: {
206
+ /**
207
+ * 是否显示收起展开所有列控制 默认不显示
208
+ */
209
+ expandColumn: !1,
206
210
  /**
207
211
  * 是否显示刷新-默认显示
208
212
  */
@@ -507,8 +511,8 @@ class S {
507
511
  *
508
512
  * @param config - 需要覆盖的配置项(深度 Partial)
509
513
  */
510
- static setConfig = (a) => {
511
- S.config = ObjectUtil.deepMerge(S.config, a);
514
+ static setConfig = (o) => {
515
+ A.config = ObjectUtil.deepMerge(A.config, o);
512
516
  };
513
517
  }
514
518
  class L {
@@ -529,8 +533,8 @@ class L {
529
533
  * @param field - 字段的 key 值
530
534
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
531
535
  */
532
- static findOptions = (a, p) => {
533
- const s = a.column.find((e) => e.key === p), l = (e) => e.replace(/-([a-z])/g, (t, i) => i.toUpperCase());
536
+ static findOptions = (o, p) => {
537
+ const s = o.column.find((t) => t.key === p), l = (t) => t.replace(/-([a-z])/g, (e, i) => i.toUpperCase());
534
538
  if (s)
535
539
  return s.options[l(s.type)];
536
540
  };
@@ -550,8 +554,8 @@ class L {
550
554
  }))
551
555
  )
552
556
  */
553
- static setOptionsData = (a, p, s) => {
554
- const l = L.findOptions(a, p);
557
+ static setOptionsData = (o, p, s) => {
558
+ const l = L.findOptions(o, p);
555
559
  l && (l.data = s);
556
560
  };
557
561
  static form = {
@@ -563,9 +567,9 @@ class L {
563
567
  * @param treeData 树形数据
564
568
  * @param option 组件配置
565
569
  */
566
- parentId: (a, p, s, l) => {
567
- const e = S.config.table.rowKey;
568
- a ? p.type === O.EDialog.Add ? (p.form.parentId = a[e], p.form.sort = a.children.length + 1) : p.form.parentId = a.parentId.substring(a.parentId.lastIndexOf(",") + 1) : (p.form.parentId = "0", p.form.sort = s.length + 1), L.setOptionsData(l, "parentId", [{ [e]: "0", title: "根", children: s }]);
570
+ parentId: (o, p, s, l) => {
571
+ const t = A.config.table.rowKey;
572
+ o ? p.type === M.EDialog.Add ? (p.form.parentId = o[t], p.form.sort = o.children.length + 1) : p.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (p.form.parentId = "0", p.form.sort = s.length + 1), L.setOptionsData(l, "parentId", [{ [t]: "0", title: "根", children: s }]);
569
573
  }
570
574
  }
571
575
  };
@@ -601,23 +605,25 @@ const ze = {
601
605
  switchOn: "开启",
602
606
  switchOff: "关闭",
603
607
  confirmModify: "确认修改",
604
- confirmSwitchMessage: "确认要修改吗?"
608
+ confirmSwitchMessage: "确认要修改吗?",
609
+ mergeColumn: "合并栏位",
610
+ expandColumn: "展开栏位"
605
611
  };
606
- class k {
612
+ class w {
607
613
  /** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
608
- static t(a, ...p) {
609
- if (typeof a == "function")
610
- return a(...p);
611
- a = String(a);
614
+ static t(o, ...p) {
615
+ if (typeof o == "function")
616
+ return o(...p);
617
+ o = String(o);
612
618
  let s = 0;
613
- return a.replace(/{([^}]+)}/g, (l, e) => s < p.length ? String(p[s++]) : `{${e}}`);
619
+ return o.replace(/{([^}]+)}/g, (l, t) => s < p.length ? String(p[s++]) : `{${t}}`);
614
620
  }
615
- static setI18n = (a) => {
616
- k.curd = ObjectUtil.deepMerge(k.curd, a);
621
+ static setI18n = (o) => {
622
+ w.curd = ObjectUtil.deepMerge(w.curd, o);
617
623
  };
618
624
  /** 解析curd国际化值 */
619
- static tCurd(a, ...p) {
620
- return this.t(this.curd[a], ...p);
625
+ static tCurd(o, ...p) {
626
+ return this.t(this.curd[o], ...p);
621
627
  }
622
628
  /** curd表单 */
623
629
  static curd = ze;
@@ -632,14 +638,14 @@ class K {
632
638
  * @param field 字段名
633
639
  * @param row 行数据
634
640
  */
635
- static setId = (a, p, s) => {
636
- p[a] || (p[a] = []);
637
- const l = S.config.table.rowKey;
638
- p[a].forEach((e) => {
639
- s.forEach((t) => {
640
- let i = t.default ?? "";
641
- t.type === "number" && (i = t.default ?? 0), t.type === "boolean" && (i = t.default ?? !1), t.type === "time" && (i = t.default ?? /* @__PURE__ */ new Date()), e[t.value] === void 0 && (e[t.value] = i);
642
- }), e[l] || (e[l] = K.getIdFun());
641
+ static setId = (o, p, s) => {
642
+ p[o] || (p[o] = []);
643
+ const l = A.config.table.rowKey;
644
+ p[o].forEach((t) => {
645
+ s.forEach((e) => {
646
+ let i = e.default ?? "";
647
+ e.type === "number" && (i = e.default ?? 0), e.type === "boolean" && (i = e.default ?? !1), e.type === "time" && (i = e.default ?? /* @__PURE__ */ new Date()), t[e.value] === void 0 && (t[e.value] = i);
648
+ }), t[l] || (t[l] = K.getIdFun());
643
649
  });
644
650
  };
645
651
  /**
@@ -649,17 +655,17 @@ class K {
649
655
  * @param itemFields 元素字段-如:[{label:'',value:''}]
650
656
  * @param callback 回调函数
651
657
  */
652
- static add = (a, p, s, l) => {
653
- const e = JSONUtil.cp(s);
654
- K.setId(a, p, s);
655
- const t = S.config.table.rowKey;
656
- p[a].push(
657
- e.reduce(
658
+ static add = (o, p, s, l) => {
659
+ const t = JSONUtil.cp(s);
660
+ K.setId(o, p, s);
661
+ const e = A.config.table.rowKey;
662
+ p[o].push(
663
+ t.reduce(
658
664
  (i, u) => {
659
- let h = u.default ?? "";
660
- return u.type === "number" && (h = u.default ?? 0), u.type === "boolean" && (h = u.default ?? !1), u.type === "time" && (h = u.default ?? /* @__PURE__ */ new Date()), i[u.value] = h, i;
665
+ let m = u.default ?? "";
666
+ return u.type === "number" && (m = u.default ?? 0), u.type === "boolean" && (m = u.default ?? !1), u.type === "time" && (m = u.default ?? /* @__PURE__ */ new Date()), i[u.value] = m, i;
661
667
  },
662
- { [t]: K.getIdFun() }
668
+ { [e]: K.getIdFun() }
663
669
  )
664
670
  ), l?.(p);
665
671
  };
@@ -670,9 +676,9 @@ class K {
670
676
  * @param item 元素-如:{_id:''}
671
677
  * @param callback 回调函数
672
678
  */
673
- static remove = (a, p, s, l) => {
674
- const e = S.config.table.rowKey;
675
- p[a] = p[a].filter((t) => t[e] !== s[e]), l?.(p);
679
+ static remove = (o, p, s, l) => {
680
+ const t = A.config.table.rowKey;
681
+ p[o] = p[o].filter((e) => e[t] !== s[t]), l?.(p);
676
682
  };
677
683
  /**
678
684
  * 获取没有id的数据
@@ -680,21 +686,21 @@ class K {
680
686
  * @param childernField 子级字段-如:list、children
681
687
  * @returns 没有id的数据
682
688
  */
683
- static getNoIdData = (a, p) => {
684
- const s = JSONUtil.cp(a), l = S.config.table.rowKey;
685
- return s.forEach((e) => {
686
- e[l] && delete e[l], p && e[p] && K.getNoIdData(e[p], p);
689
+ static getNoIdData = (o, p) => {
690
+ const s = JSONUtil.cp(o), l = A.config.table.rowKey;
691
+ return s.forEach((t) => {
692
+ t[l] && delete t[l], p && t[p] && K.getNoIdData(t[p], p);
687
693
  }), s;
688
694
  };
689
695
  }
690
- const De = {
696
+ const $e = {
691
697
  key: 0,
692
698
  class: "column curd-form-com-list",
693
699
  style: { width: "100%", gap: "10px" }
694
- }, Ue = { key: 0 }, $e = {
700
+ }, De = { key: 0 }, Ue = {
695
701
  class: "row items-center",
696
702
  style: { gap: "10px", width: "100%" }
697
- }, Oe = { key: 1 }, ne = /* @__PURE__ */ q({
703
+ }, Ee = { key: 1 }, ie = /* @__PURE__ */ Q({
698
704
  __name: "list",
699
705
  props: {
700
706
  row: {
@@ -732,88 +738,88 @@ const De = {
732
738
  }
733
739
  },
734
740
  emits: ["change"],
735
- setup(n, { emit: a }) {
736
- const p = n, s = le({
741
+ setup(n, { emit: o }) {
742
+ const p = n, s = ne({
737
743
  show: !1,
738
- add: (e, t, i) => {
739
- K.add(e, t, i, () => {
744
+ add: (t, e, i) => {
745
+ K.add(t, e, i, () => {
740
746
  l("change");
741
747
  });
742
748
  },
743
- remove: (e, t, i) => {
744
- K.remove(e, t, i, () => {
749
+ remove: (t, e, i) => {
750
+ K.remove(t, e, i, () => {
745
751
  l("change");
746
752
  });
747
753
  }
748
754
  });
749
- ue(() => {
755
+ fe(() => {
750
756
  K.setId(p.field, p.row, p.itemFields), s.show = !0;
751
757
  });
752
- const l = a;
753
- return (e, t) => {
758
+ const l = o;
759
+ return (t, e) => {
754
760
  const i = x("el-button"), u = x("el-input");
755
- return s.show ? (f(), w("div", De, [
756
- v(e.$slots, "list-start", { row: n.row }),
757
- n.addBottom ? C("", !0) : (f(), w("div", Ue, [
758
- D(i, {
761
+ return s.show ? (f(), b("div", $e, [
762
+ C(t.$slots, "list-start", { row: n.row }),
763
+ n.addBottom ? v("", !0) : (f(), b("div", De, [
764
+ U(i, {
759
765
  link: "",
760
766
  type: "primary",
761
- onClick: t[0] || (t[0] = (h) => s.add(n.field, n.row, n.itemFields))
767
+ onClick: e[0] || (e[0] = (m) => s.add(n.field, n.row, n.itemFields))
762
768
  }, {
763
- default: y(() => t[3] || (t[3] = [
769
+ default: y(() => e[3] || (e[3] = [
764
770
  $("添加")
765
771
  ])),
766
772
  _: 1
767
773
  })
768
774
  ])),
769
- (f(!0), w(z, null, F(n.row[n.field], (h) => (f(), w("div", $e, [
770
- v(e.$slots, "item-start", {
771
- item: h,
775
+ (f(!0), b(D, null, B(n.row[n.field], (m) => (f(), b("div", Ue, [
776
+ C(t.$slots, "item-start", {
777
+ item: m,
772
778
  row: n.row
773
779
  }),
774
- (f(!0), w(z, null, F(n.itemFields, (c) => (f(), g(u, {
775
- modelValue: h[c.value],
776
- "onUpdate:modelValue": (d) => h[c.value] = d,
777
- style: fe({ width: n.inputWidth }),
780
+ (f(!0), b(D, null, B(n.itemFields, (c) => (f(), g(u, {
781
+ modelValue: m[c.value],
782
+ "onUpdate:modelValue": (d) => m[c.value] = d,
783
+ style: pe({ width: n.inputWidth }),
778
784
  class: I(n.inputClass),
779
785
  placeholder: c[n.label] || c[n.value],
780
- onChange: t[1] || (t[1] = (d) => l("change"))
786
+ onChange: e[1] || (e[1] = (d) => l("change"))
781
787
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
782
- v(e.$slots, "item-end", {
783
- item: h,
788
+ C(t.$slots, "item-end", {
789
+ item: m,
784
790
  row: n.row
785
791
  }),
786
- D(i, {
792
+ U(i, {
787
793
  link: "",
788
794
  type: "danger",
789
- onClick: (c) => s.remove(n.field, n.row, h)
795
+ onClick: (c) => s.remove(n.field, n.row, m)
790
796
  }, {
791
- default: y(() => t[4] || (t[4] = [
797
+ default: y(() => e[4] || (e[4] = [
792
798
  $("删除")
793
799
  ])),
794
800
  _: 2
795
801
  }, 1032, ["onClick"])
796
802
  ]))), 256)),
797
- n.addBottom ? (f(), w("div", Oe, [
798
- D(i, {
803
+ n.addBottom ? (f(), b("div", Ee, [
804
+ U(i, {
799
805
  link: "",
800
806
  type: "primary",
801
- onClick: t[2] || (t[2] = (h) => s.add(n.field, n.row, n.itemFields))
807
+ onClick: e[2] || (e[2] = (m) => s.add(n.field, n.row, n.itemFields))
802
808
  }, {
803
- default: y(() => t[5] || (t[5] = [
809
+ default: y(() => e[5] || (e[5] = [
804
810
  $("添加")
805
811
  ])),
806
812
  _: 1
807
813
  })
808
- ])) : C("", !0),
809
- v(e.$slots, "list-end", { row: n.row })
810
- ])) : C("", !0);
814
+ ])) : v("", !0),
815
+ C(t.$slots, "list-end", { row: n.row })
816
+ ])) : v("", !0);
811
817
  };
812
818
  }
813
- }), Ee = {
819
+ }), Oe = {
814
820
  class: "row form-item-content",
815
821
  style: { width: "100%" }
816
- }, Se = { class: "col" }, Me = { class: "col" }, Te = ["innerHTML"], Ae = /* @__PURE__ */ q({
822
+ }, Se = { class: "col" }, Me = { class: "col" }, Ae = ["innerHTML"], Fe = /* @__PURE__ */ Q({
817
823
  __name: "column",
818
824
  props: {
819
825
  /**
@@ -829,226 +835,226 @@ const De = {
829
835
  default: ""
830
836
  }
831
837
  },
832
- setup(n, { expose: a }) {
833
- const p = O.isFun, s = O.EDialog, l = N(), e = n, t = le({
838
+ setup(n, { expose: o }) {
839
+ const p = M.isFun, s = M.EDialog, l = N(), t = n, e = ne({
834
840
  rules: {},
835
841
  show: !0,
836
842
  form: {},
837
843
  formDefault: {},
838
- type: e.type || s.Add,
844
+ type: t.type || s.Add,
839
845
  formColumn: [],
840
- getDisabled: (i) => t.type === s.View ? i.disabled?.view === void 0 ? !0 : i.disabled?.view : i.disabled?.[t.type === s.Add ? "create" : "update"],
841
- getBind: (i) => i.options?.[t.type === s.Add ? "formAdd" : "formUpdate"]?.[i.type] || i.options?.[i.type] || {},
842
- getOn: (i) => i.options?.[t.type === s.Add ? "formAdd" : "formUpdate"]?.[i.type]?.on || i.options?.[i.type]?.on || {},
846
+ getDisabled: (i) => e.type === s.View ? i.disabled?.view === void 0 ? !0 : i.disabled?.view : i.disabled?.[e.type === s.Add ? "create" : "update"],
847
+ getBind: (i) => i.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[i.type] || i.options?.[i.type] || {},
848
+ getOn: (i) => i.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[i.type]?.on || i.options?.[i.type]?.on || {},
843
849
  getColumnSpan: (i, u) => {
844
850
  if (i.item.form?.spanCol) {
845
- const h = e.option.form?.maxSpan || 12, c = e.option.form?.defaultSpan || h / 2, r = u.filter((m) => !O.isFun(m.item.show?.form, t.form, t.type)).reduce((m, b) => m + (b.item.form?.span || c), 0);
846
- return (i.item.form?.span || c) + r;
851
+ const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = u.filter((r) => !M.isFun(r.item.show?.form, e.form, e.type)).reduce((r, h) => r + (h.item.form?.span || c), 0);
852
+ return (i.item.form?.span || c) + k;
847
853
  }
848
854
  return i.item.form?.span;
849
855
  },
850
856
  initColumnForm: () => {
851
- const i = e.option;
852
- t.formColumn = [], t.rules = {}, t.formDefault = {};
853
- const u = [], h = e.option.form?.maxSpan || 12, c = e.option.form?.defaultSpan || h / 2;
857
+ const i = t.option;
858
+ e.formColumn = [], e.rules = {}, e.formDefault = {};
859
+ const u = [], m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2;
854
860
  let d = [];
855
- const r = (b) => {
856
- if (b.children) {
857
- b.children.forEach((T) => {
858
- r(T);
861
+ const k = (h) => {
862
+ if (h.children) {
863
+ h.children.forEach((S) => {
864
+ k(S);
859
865
  });
860
866
  return;
861
867
  }
862
- if (t.formDefault[b.key] = b.value, b.isForm && (typeof b.show?.form != "boolean" || b.show?.form)) {
863
- b.form = b.form || { span: c }, b.form.span = b.form.span ?? c;
864
- const T = b.form.span, B = d.reduce((R, Q) => R + Q.span, T), j = d.length;
865
- if (d.push({ item: b, span: T }), (j === 1 && d[0].span === 0 || B >= h || T === 0 && j > 1) && (u.push(d), d = []), b.rules) {
868
+ if (e.formDefault[h.key] = h.value, h.isForm && (typeof h.show?.form != "boolean" || h.show?.form)) {
869
+ h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
870
+ const S = h.form.span, j = d.reduce((R, X) => R + X.span, S), F = d.length;
871
+ if (d.push({ item: h, span: S }), (F === 1 && d[0].span === 0 || j >= m || S === 0 && F > 1) && (u.push(d), d = []), h.rules) {
866
872
  const R = {
867
- input: k.tCurd("placeholderInput"),
868
- select: k.tCurd("placeholderSelect")
869
- }, Q = (R[b.type] || R.input) + b.label;
870
- t.rules[b.key] = typeof b.rules == "boolean" ? [
873
+ input: w.tCurd("placeholderInput"),
874
+ select: w.tCurd("placeholderSelect")
875
+ }, X = (R[h.type] || R.input) + h.label;
876
+ e.rules[h.key] = typeof h.rules == "boolean" ? [
871
877
  {
872
878
  required: !0,
873
- message: Q,
879
+ message: X,
874
880
  trigger: "blur"
875
881
  }
876
- ] : b.rules;
882
+ ] : h.rules;
877
883
  }
878
884
  }
879
- }, m = (b, T) => {
880
- b.isForm = T, Array.isArray(b.children) && b.children.forEach((B) => m(B, T));
885
+ }, r = (h, S) => {
886
+ h.isForm = S, Array.isArray(h.children) && h.children.forEach((j) => r(j, S));
881
887
  };
882
- i.column.forEach((b) => {
883
- m(b, !0), r(b);
884
- }), d.length > 0 && u.push(d), t.formColumn = u, t.form = JSONUtil.cp(t.formDefault);
888
+ i.column.forEach((h) => {
889
+ r(h, !0), k(h);
890
+ }), d.length > 0 && u.push(d), e.formColumn = u, e.form = JSONUtil.cp(e.formDefault);
885
891
  }
886
892
  });
887
- return t.initColumnForm(), a({
893
+ return e.initColumnForm(), o({
888
894
  ref: l,
889
- conf: t
890
- }), (i, u) => (f(), g(o(W), {
895
+ conf: e
896
+ }), (i, u) => (f(), g(a(W), {
891
897
  ref_key: "ruleFormRef",
892
898
  ref: l,
893
- model: t.form,
894
- rules: t.rules
899
+ model: e.form,
900
+ rules: e.rules
895
901
  }, {
896
902
  default: y(() => [
897
- t.show ? (f(!0), w(z, { key: 0 }, F(t.formColumn, (h, c) => (f(), w(z, { key: c }, [
898
- o(p)(
899
- h.map((d) => d.item?.show?.form),
900
- t.form,
901
- t.type
902
- ) ? (f(), w("div", {
903
+ e.show ? (f(!0), b(D, { key: 0 }, B(e.formColumn, (m, c) => (f(), b(D, { key: c }, [
904
+ a(p)(
905
+ m.map((d) => d.item?.show?.form),
906
+ e.form,
907
+ e.type
908
+ ) ? (f(), b("div", {
903
909
  key: 0,
904
910
  class: I(["row curd-row", {
905
911
  stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
906
912
  }])
907
913
  }, [
908
- v(i.$slots, "form-start", {
909
- row: t.form
914
+ C(i.$slots, "form-start", {
915
+ row: e.form
910
916
  }),
911
- (f(!0), w(z, null, F(h, (d) => (f(), w(z, {
917
+ (f(!0), b(D, null, B(m, (d) => (f(), b(D, {
912
918
  key: d.item.key
913
919
  }, [
914
- o(p)(d.item.show?.form, t.form, t.type) ? (f(), w("div", {
920
+ a(p)(d.item.show?.form, e.form, e.type) ? (f(), b("div", {
915
921
  key: 0,
916
- class: I([d.item.form.span > 0 ? `col-${t.getColumnSpan(d, h)}` : "col", `form-item-col-${d.item.key}`])
922
+ class: I([d.item.form.span > 0 ? `col-${e.getColumnSpan(d, m)}` : "col", `form-item-col-${d.item.key}`])
917
923
  }, [
918
- D(o(Z), {
924
+ U(a(ee), {
919
925
  label: d.item.text?.form?.label ?? d.item.label,
920
926
  prop: d.item.key,
921
927
  "label-width": d.item.text?.form?.label == "" ? 0 : d.item.form?.labelWidth || n.option.form?.labelWidth || "100px"
922
928
  }, {
923
929
  default: y(() => [
924
- M("div", Ee, [
925
- v(i.$slots, "form-" + d.item.key + "-start", {
926
- row: t.form,
930
+ E("div", Oe, [
931
+ C(i.$slots, "form-" + d.item.key + "-start", {
932
+ row: e.form,
927
933
  item: d.item
928
934
  }),
929
- M("div", Se, [
930
- M("div", Me, [
931
- v(i.$slots, "form-" + d.item.key, {
932
- row: t.form,
935
+ E("div", Se, [
936
+ E("div", Me, [
937
+ C(i.$slots, "form-" + d.item.key, {
938
+ row: e.form,
933
939
  item: d.item
934
940
  }, () => [
935
- d.item.type === "input" ? (f(), g(o(X), V({
941
+ d.item.type === "input" ? (f(), g(a(Z), V({
936
942
  key: 0,
937
- modelValue: t.form[d.item.key],
938
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
943
+ modelValue: e.form[d.item.key],
944
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
939
945
  ref_for: !0
940
- }, t.getBind(d.item), U(t.getOn(d.item)), {
941
- disabled: t.getDisabled(d.item)
942
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "switch" ? (f(), g(o(G), V({
946
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
947
+ disabled: e.getDisabled(d.item)
948
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "switch" ? (f(), g(a(Y), V({
943
949
  key: 1,
944
- modelValue: t.form[d.item.key],
945
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
950
+ modelValue: e.form[d.item.key],
951
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
946
952
  ref_for: !0
947
- }, t.getBind(d.item), U(t.getOn(d.item)), {
948
- disabled: t.getDisabled(d.item)
949
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "select" ? (f(), g(o(J), V({
953
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
954
+ disabled: e.getDisabled(d.item)
955
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "select" ? (f(), g(a(q), V({
950
956
  key: 2,
951
- modelValue: t.form[d.item.key],
952
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
957
+ modelValue: e.form[d.item.key],
958
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
953
959
  ref_for: !0
954
- }, t.getBind(d.item), U(t.getOn(d.item)), {
955
- disabled: t.getDisabled(d.item),
960
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
961
+ disabled: e.getDisabled(d.item),
956
962
  style: { width: "100%" }
957
963
  }), {
958
964
  default: y(() => [
959
- (f(!0), w(z, null, F(d.item.options?.select?.data, (r) => (f(), g(o(H), {
960
- key: r.value,
961
- label: r.label,
962
- value: r.value
965
+ (f(!0), b(D, null, B(d.item.options?.select?.data, (k) => (f(), g(a(H), {
966
+ key: k.value,
967
+ label: k.label,
968
+ value: k.value
963
969
  }, null, 8, ["label", "value"]))), 128))
964
970
  ]),
965
971
  _: 2
966
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "radio" ? (f(), g(o(re), V({
972
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "radio" ? (f(), g(a(se), V({
967
973
  key: 3,
968
- modelValue: t.form[d.item.key],
969
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
974
+ modelValue: e.form[d.item.key],
975
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
970
976
  ref_for: !0
971
- }, t.getBind(d.item), U(t.getOn(d.item)), {
972
- disabled: t.getDisabled(d.item),
977
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
978
+ disabled: e.getDisabled(d.item),
973
979
  style: { width: "100%" }
974
980
  }), {
975
981
  default: y(() => [
976
- (f(!0), w(z, null, F(d.item.options?.radio?.data, (r) => (f(), g(o(se), {
977
- key: r.value,
978
- label: r.label,
979
- value: r.value
982
+ (f(!0), b(D, null, B(d.item.options?.radio?.data, (k) => (f(), g(a(de), {
983
+ key: k.value,
984
+ label: k.label,
985
+ value: k.value
980
986
  }, null, 8, ["label", "value"]))), 128))
981
987
  ]),
982
988
  _: 2
983
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "list" ? (f(), g(ne, V({
989
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "list" ? (f(), g(ie, V({
984
990
  key: 4,
985
- row: t.form,
991
+ row: e.form,
986
992
  field: d.item.key,
987
993
  ref_for: !0
988
- }, t.getBind(d.item), U(t.getOn(d.item)), {
989
- disabled: t.getDisabled(d.item),
994
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
995
+ disabled: e.getDisabled(d.item),
990
996
  style: { width: "100%" }
991
- }), null, 16, ["row", "field", "disabled"])) : d.item.type === "treeSelect" ? (f(), g(o(de), V({
997
+ }), null, 16, ["row", "field", "disabled"])) : d.item.type === "treeSelect" ? (f(), g(a(ue), V({
992
998
  key: 5,
993
- modelValue: t.form[d.item.key],
994
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
999
+ modelValue: e.form[d.item.key],
1000
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
995
1001
  ref_for: !0
996
- }, t.getBind(d.item), U(t.getOn(d.item)), {
997
- disabled: t.getDisabled(d.item),
1002
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
1003
+ disabled: e.getDisabled(d.item),
998
1004
  style: { width: "100%" }
999
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "datetime" ? (f(), g(o(ae), V({
1005
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type === "datetime" ? (f(), g(a(le), V({
1000
1006
  key: 6,
1001
- modelValue: t.form[d.item.key],
1002
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
1007
+ modelValue: e.form[d.item.key],
1008
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
1003
1009
  ref_for: !0
1004
- }, t.getBind(d.item), U(t.getOn(d.item)), {
1005
- disabled: t.getDisabled(d.item)
1006
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type && (o(L).customComponent[d.item.type] || o(L).customComponent[d.item.type]?.form) ? (f(), g(Y(o(L).customComponent[d.item.type]?.form || o(L).customComponent[d.item.type]), V({
1010
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
1011
+ disabled: e.getDisabled(d.item)
1012
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : d.item.type && (a(L).customComponent[d.item.type] || a(L).customComponent[d.item.type]?.form) ? (f(), g(_(a(L).customComponent[d.item.type]?.form || a(L).customComponent[d.item.type]), V({
1007
1013
  key: 7,
1008
- modelValue: t.form[d.item.key],
1009
- "onUpdate:modelValue": (r) => t.form[d.item.key] = r,
1014
+ modelValue: e.form[d.item.key],
1015
+ "onUpdate:modelValue": (k) => e.form[d.item.key] = k,
1010
1016
  ref_for: !0
1011
- }, t.getBind(d.item), U(t.getOn(d.item)), {
1012
- disabled: t.getDisabled(d.item)
1013
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1017
+ }, e.getBind(d.item), z(e.getOn(d.item)), {
1018
+ disabled: e.getDisabled(d.item)
1019
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
1014
1020
  ]),
1015
- v(i.$slots, "form-" + d.item.key + "-right", {
1016
- row: t.form,
1021
+ C(i.$slots, "form-" + d.item.key + "-right", {
1022
+ row: e.form,
1017
1023
  item: d.item
1018
1024
  })
1019
1025
  ]),
1020
- v(i.$slots, "form-" + d.item.key + "-tip", {
1021
- row: t.form,
1026
+ C(i.$slots, "form-" + d.item.key + "-tip", {
1027
+ row: e.form,
1022
1028
  item: d.item
1023
1029
  }, () => [
1024
- d.item.form?.tipText ? (f(), w("div", {
1030
+ d.item.form?.tipText ? (f(), b("div", {
1025
1031
  key: 0,
1026
1032
  class: "form-tip-text",
1027
- innerHTML: typeof d.item.form?.tipText == "function" ? d.item.form?.tipText(t.form, t.type) : d.item.form?.tipText
1028
- }, null, 8, Te)) : C("", !0)
1033
+ innerHTML: typeof d.item.form?.tipText == "function" ? d.item.form?.tipText(e.form, e.type) : d.item.form?.tipText
1034
+ }, null, 8, Ae)) : v("", !0)
1029
1035
  ])
1030
1036
  ]),
1031
- v(i.$slots, "form-" + d.item.key + "-end", {
1032
- row: t.form,
1037
+ C(i.$slots, "form-" + d.item.key + "-end", {
1038
+ row: e.form,
1033
1039
  item: d.item
1034
1040
  })
1035
1041
  ])
1036
1042
  ]),
1037
1043
  _: 2
1038
1044
  }, 1032, ["label", "prop", "label-width"])
1039
- ], 2)) : C("", !0)
1045
+ ], 2)) : v("", !0)
1040
1046
  ], 64))), 128)),
1041
- v(i.$slots, "form-end", {
1042
- row: t.form
1047
+ C(i.$slots, "form-end", {
1048
+ row: e.form
1043
1049
  })
1044
- ], 2)) : C("", !0)
1045
- ], 64))), 128)) : C("", !0)
1050
+ ], 2)) : v("", !0)
1051
+ ], 64))), 128)) : v("", !0)
1046
1052
  ]),
1047
1053
  _: 3
1048
1054
  }, 8, ["model", "rules"]));
1049
1055
  }
1050
1056
  });
1051
- class Fe {
1057
+ class Te {
1052
1058
  /**
1053
1059
  * 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
1054
1060
  *
@@ -1056,19 +1062,19 @@ class Fe {
1056
1062
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
1057
1063
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
1058
1064
  */
1059
- static exportToExcel = async (a, p, s) => {
1060
- if (!a || a.length === 0) return;
1061
- const l = await O.loadModule("xlsx"), e = a.map((u) => {
1062
- const h = {};
1065
+ static exportToExcel = async (o, p, s) => {
1066
+ if (!o || o.length === 0) return;
1067
+ const l = await M.loadModule("xlsx"), t = o.map((u) => {
1068
+ const m = {};
1063
1069
  return p.forEach((c) => {
1064
- h[c.label] = u[c.key];
1065
- }), h;
1066
- }), t = l.utils.json_to_sheet(e), i = l.utils.book_new();
1067
- l.utils.book_append_sheet(i, t, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(i, `${s}.xlsx`);
1070
+ m[c.label] = u[c.key];
1071
+ }), m;
1072
+ }), e = l.utils.json_to_sheet(t), i = l.utils.book_new();
1073
+ l.utils.book_append_sheet(i, e, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(i, `${s}.xlsx`);
1068
1074
  };
1069
1075
  }
1070
- const P = O.EDialog, je = (n) => {
1071
- const a = N(), p = N(), s = N(), l = le({
1076
+ const P = M.EDialog, Be = (n) => {
1077
+ const o = N(), p = N(), s = N(), l = ne({
1072
1078
  option: n.option,
1073
1079
  /** 查询区域相关配置对象 */
1074
1080
  search: {
@@ -1082,22 +1088,22 @@ const P = O.EDialog, je = (n) => {
1082
1088
  /** 搜索表单默认值 */
1083
1089
  formDefault: {},
1084
1090
  /** 获取占位符 */
1085
- getPlaceholder: (e, t = k.tCurd("placeholderInput")) => e.text?.search?.placeholder === void 0 ? `${t}${e.label}` : e.text?.search?.placeholder,
1091
+ getPlaceholder: (t, e = w.tCurd("placeholderInput")) => t.text?.search?.placeholder === void 0 ? `${e}${t.label}` : t.text?.search?.placeholder,
1086
1092
  /** 组装实际要搜索的数据对象 */
1087
1093
  getFormData: () => {
1088
- let e = {};
1094
+ let t = {};
1089
1095
  n.option.column.forEach((i) => {
1090
- (typeof i.show?.search == "function" ? i.show?.search(l.search.form) : i.show?.search) && (e[i.key] = l.search.form[i.key]);
1096
+ (typeof i.show?.search == "function" ? i.show?.search(l.search.form) : i.show?.search) && (t[i.key] = l.search.form[i.key]);
1091
1097
  });
1092
- const t = n.option.search?.before?.(e);
1093
- return t && (e = t), e;
1098
+ const e = n.option.search?.before?.(t);
1099
+ return e && (t = e), t;
1094
1100
  },
1095
1101
  /** 重置搜索表单 */
1096
1102
  reset: () => {
1097
- const e = l.search.formDefault;
1098
- Object.keys(e).forEach((t) => {
1099
- n.option.search?.resetMode === "none" ? e[t] = void 0 : e[t] = l.search.formDefault[t];
1100
- }), l.search.form = ObjectUtil.deepMerge(e, {}), l.page.num = 1, n.option.init !== !1 && l.table.getList();
1103
+ const t = l.search.formDefault;
1104
+ Object.keys(t).forEach((e) => {
1105
+ n.option.search?.resetMode === "none" ? t[e] = void 0 : t[e] = l.search.formDefault[e];
1106
+ }), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1, n.option.init !== !1 && l.table.getList();
1101
1107
  },
1102
1108
  /** 提交搜索表单 */
1103
1109
  submit: () => {
@@ -1111,19 +1117,19 @@ const P = O.EDialog, je = (n) => {
1111
1117
  /** 总条数 */
1112
1118
  total: 0,
1113
1119
  /** 分页控件的布局方式 */
1114
- layout: n.option.page?.layout || S.config.pagination.layout,
1120
+ layout: n.option.page?.layout || A.config.pagination.layout,
1115
1121
  /** 是否显示到工具栏 默认不显示 配置后show属性无效 */
1116
- showTools: n.option.page?.showTools || S.config.pagination.showTools,
1122
+ showTools: n.option.page?.showTools || A.config.pagination.showTools,
1117
1123
  /** 当前每页条数 */
1118
- size: n.option.page?.size || S.config.pagination.size,
1124
+ size: n.option.page?.size || A.config.pagination.size,
1119
1125
  /** 支持切换的每页条数选项 */
1120
- sizeList: n.option.page?.sizeList || S.config.pagination.pageSizes,
1126
+ sizeList: n.option.page?.sizeList || A.config.pagination.pageSizes,
1121
1127
  /** 分页器计数 */
1122
- pagerCount: n.option.page?.pagerCount || S.config.pagination.pagerCount,
1128
+ pagerCount: n.option.page?.pagerCount || A.config.pagination.pagerCount,
1123
1129
  /** 获取分页查询参数 */
1124
- getQuery: (e = {}) => ({
1125
- [S.config.field.page.size]: e.size || l.page.size,
1126
- [S.config.field.page.num]: e.num || l.page.num,
1130
+ getQuery: (t = {}) => ({
1131
+ [A.config.field.page.size]: t.size || l.page.size,
1132
+ [A.config.field.page.num]: t.num || l.page.num,
1127
1133
  ...l.search.getFormData()
1128
1134
  })
1129
1135
  },
@@ -1132,7 +1138,7 @@ const P = O.EDialog, je = (n) => {
1132
1138
  /** 操作列相关配置 */
1133
1139
  op: {
1134
1140
  /** 动态计算操作列宽度 */
1135
- width: (...e) => e.filter((i) => i).length * 30 + 60
1141
+ width: (...t) => t.filter((i) => i).length * 30 + 60
1136
1142
  },
1137
1143
  /** 表格加载中状态 */
1138
1144
  loading: !1,
@@ -1145,20 +1151,20 @@ const P = O.EDialog, je = (n) => {
1145
1151
  /** 已经展开的行key集合 */
1146
1152
  rowKeys: [],
1147
1153
  /** 行展开触发变更函数 */
1148
- change: (e, t) => {
1154
+ change: (t, e) => {
1149
1155
  },
1150
1156
  /** 全部展开/收起 */
1151
1157
  all: () => {
1152
1158
  if (l.table.expand.isExpand)
1153
1159
  l.table.expand.rowKeys = [];
1154
1160
  else {
1155
- const e = (t) => {
1161
+ const t = (e) => {
1156
1162
  let i = [];
1157
- return t.forEach((u) => {
1158
- i.push(u[n.option.table.rowKey]), u.children && u.children.length > 0 && (i = i.concat(e(u.children)));
1163
+ return e.forEach((u) => {
1164
+ i.push(u[n.option.table.rowKey]), u.children && u.children.length > 0 && (i = i.concat(t(u.children)));
1159
1165
  }), i;
1160
1166
  };
1161
- l.table.expand.rowKeys = e(l.table.data);
1167
+ l.table.expand.rowKeys = t(l.table.data);
1162
1168
  }
1163
1169
  l.table.expand.isExpand = !l.table.expand.isExpand;
1164
1170
  }
@@ -1175,32 +1181,46 @@ const P = O.EDialog, je = (n) => {
1175
1181
  list: []
1176
1182
  }
1177
1183
  },
1184
+ /** 表格表头相关配置 */
1185
+ header: {
1186
+ /** 主分组相关配置 */
1187
+ group: {
1188
+ expand: !1,
1189
+ /** 全部展开/收起主分组 */
1190
+ toggleExpandAll: () => {
1191
+ const t = !l.table.header.group.expand;
1192
+ l.table.header.group.expand = t, l.table.column.list.forEach((e) => {
1193
+ e.table?.header?.group !== void 0 && (e.table.header.group = !t), e.table?.header?.groupKey !== void 0 && (e.table.header.show = t);
1194
+ });
1195
+ }
1196
+ }
1197
+ },
1178
1198
  /** 获取数据列表接口实现 */
1179
1199
  getList: async () => {
1180
1200
  l.table.loading = !0;
1181
- const e = n.option.api.list;
1201
+ const t = n.option.api.list;
1182
1202
  try {
1183
1203
  await l.initApiData("init");
1184
- let t = {};
1204
+ let e = {};
1185
1205
  if (l.table.sort.prop) {
1186
- const { props: b, order: T } = S.config.table.sort;
1187
- t = {
1188
- [b.field]: l.table.sort.prop,
1189
- [T.field]: l.table.sort.order
1206
+ const { props: h, order: S } = A.config.table.sort;
1207
+ e = {
1208
+ [h.field]: l.table.sort.prop,
1209
+ [S.field]: l.table.sort.order
1190
1210
  };
1191
1211
  }
1192
- const i = await e({
1212
+ const i = await t({
1193
1213
  ...l.page.getQuery(),
1194
- ...t
1195
- }), u = S.config.field.result, h = i.data || { [u.list]: i };
1196
- let c = (Array.isArray(h[u.list]), h[u.list]);
1197
- const d = l.update.formColumn.flat(), m = ObjectUtil.deepMerge({ data: c }, {}).data.map((b) => (Object.keys(b).forEach((B) => {
1198
- const j = d.find((R) => R.item.key === B);
1199
- j && ["select", "radio"].includes(j.item.type) && (j.item.table.format || (j.item.table.format = (R) => j.item.options[j.item.type].data?.find((Q) => Q.value == R[B])?.label || R[B]));
1200
- }), b));
1201
- l.table.data = n.option.data ? await n.option.data(m, c) : m, l.page.total = h[u.total] || 0;
1202
- } catch (t) {
1203
- console.error(t);
1214
+ ...e
1215
+ }), u = A.config.field.result, m = i.data || { [u.list]: i };
1216
+ let c = (Array.isArray(m[u.list]), m[u.list]);
1217
+ const d = l.update.formColumn.flat(), r = ObjectUtil.deepMerge({ data: c }, {}).data.map((h) => (Object.keys(h).forEach((j) => {
1218
+ const F = d.find((R) => R.item.key === j);
1219
+ F && ["select", "radio"].includes(F.item.type) && (F.item.table.format || (F.item.table.format = (R) => F.item.options[F.item.type].data?.find((X) => X.value == R[j])?.label || R[j]));
1220
+ }), h));
1221
+ l.table.data = n.option.data ? await n.option.data(r, c) : r, l.page.total = m[u.total] || 0;
1222
+ } catch (e) {
1223
+ console.error(e);
1204
1224
  } finally {
1205
1225
  l.table.loading = !1;
1206
1226
  }
@@ -1210,32 +1230,39 @@ const P = O.EDialog, je = (n) => {
1210
1230
  /** 已选数据项 */
1211
1231
  list: [],
1212
1232
  /** 选中状态回调 */
1213
- change: (e) => {
1214
- l.table.selection.list = e;
1233
+ change: (t) => {
1234
+ l.table.selection.list = t;
1215
1235
  },
1216
- setList: (e) => {
1236
+ /** 设置表格多选数据 */
1237
+ setList: (t, e) => {
1217
1238
  l.table.selection.list = [];
1218
- const t = s.value;
1219
- if (t?.clearSelection(), !t || !e?.length) return;
1220
- const i = n.option.table?.rowKey, u = l.table.data, h = (c) => {
1221
- const d = (r) => {
1222
- for (const m of r) {
1223
- if (i != null && i !== "") {
1224
- if (m[i] === c[i]) return m;
1225
- } else if (m === c)
1226
- return m;
1227
- if (Array.isArray(m.children) && m.children.length) {
1228
- const b = d(m.children);
1229
- if (b !== void 0) return b;
1239
+ const i = s.value;
1240
+ if (i?.clearSelection(), !i || !t?.length) return;
1241
+ const u = n.option.table?.rowKey, m = l.table.data, c = (d) => {
1242
+ const k = (r) => {
1243
+ for (const h of r) {
1244
+ if (u != null && u !== "") {
1245
+ if (h[u] === d[u]) return h;
1246
+ } else if (h === d)
1247
+ return h;
1248
+ if (Array.isArray(h.children) && h.children.length) {
1249
+ const S = k(h.children);
1250
+ if (S !== void 0) return S;
1230
1251
  }
1231
1252
  }
1232
1253
  };
1233
- return d(u);
1254
+ return k(m);
1234
1255
  };
1235
1256
  be(() => {
1236
- e.forEach((c) => {
1237
- const d = h(c) ?? c;
1238
- t.toggleRowSelection(d, !0, !1);
1257
+ t.forEach((d) => {
1258
+ const k = c(d) ?? d;
1259
+ if (e) {
1260
+ const r = () => {
1261
+ i.toggleRowSelection(k, !0, !1);
1262
+ };
1263
+ e(d) !== !1 && r();
1264
+ } else
1265
+ i.toggleRowSelection(k, !0, !1);
1239
1266
  });
1240
1267
  });
1241
1268
  }
@@ -1247,14 +1274,14 @@ const P = O.EDialog, je = (n) => {
1247
1274
  /** 当前排序顺序值 */
1248
1275
  order: "",
1249
1276
  /** 排序变更回调 */
1250
- change: (e) => {
1251
- S.config.table.sort.resetPage && (l.page.num = 1);
1252
- const t = S.config.table.sort;
1253
- if (t.change) {
1254
- t.change(e, l);
1277
+ change: (t) => {
1278
+ A.config.table.sort.resetPage && (l.page.num = 1);
1279
+ const e = A.config.table.sort;
1280
+ if (e.change) {
1281
+ e.change(t, l);
1255
1282
  return;
1256
1283
  }
1257
- l.table.sort.prop = e.prop, e.order === null ? l.table.sort.order = "" : l.table.sort.order = e.order === "ascending" ? t.order.asc : t.order.desc, l.table.getList();
1284
+ l.table.sort.prop = t.prop, t.order === null ? l.table.sort.order = "" : l.table.sort.order = t.order === "ascending" ? e.order.asc : e.order.desc, l.table.getList();
1258
1285
  }
1259
1286
  }
1260
1287
  },
@@ -1263,16 +1290,16 @@ const P = O.EDialog, je = (n) => {
1263
1290
  /** 导出逻辑方法集合 */
1264
1291
  run: {
1265
1292
  /** 执行指定方式的导出(如select、page、all) */
1266
- start: async (e) => {
1267
- let t = await l.export.run[e](), i = n.option.column;
1293
+ start: async (t) => {
1294
+ let e = await l.export.run[t](), i = n.option.column;
1268
1295
  const u = ObjectUtil.deepMerge(
1269
1296
  {
1270
- data: t,
1297
+ data: e,
1271
1298
  columns: i
1272
1299
  },
1273
1300
  {}
1274
- ), h = n.option.tools?.export || {};
1275
- h.before && h.before(u), Fe.exportToExcel(u.data, u.columns, h.fileName);
1301
+ ), m = n.option.tools?.export || {};
1302
+ m.before && m.before(u), Te.exportToExcel(u.data, u.columns, m.fileName);
1276
1303
  },
1277
1304
  /** 获取当前选中项进行导出 */
1278
1305
  select: async () => {
@@ -1286,10 +1313,10 @@ const P = O.EDialog, je = (n) => {
1286
1313
  return;
1287
1314
  }
1288
1315
  if (l.table.selection.list.length === 0)
1289
- throw O.fail(k.tCurd("selectDataToExport")), new Error(k.tCurd("selectDataToExport"));
1316
+ throw M.fail(w.tCurd("selectDataToExport")), new Error(w.tCurd("selectDataToExport"));
1290
1317
  return l.table.selection.list;
1291
- } catch (e) {
1292
- console.error(e);
1318
+ } catch (t) {
1319
+ console.error(t);
1293
1320
  } finally {
1294
1321
  l.export.loading = !1;
1295
1322
  }
@@ -1305,10 +1332,10 @@ const P = O.EDialog, je = (n) => {
1305
1332
  return;
1306
1333
  }
1307
1334
  if (l.table.data.length === 0)
1308
- throw O.fail(k.tCurd("noData")), new Error(k.tCurd("noData"));
1335
+ throw M.fail(w.tCurd("noData")), new Error(w.tCurd("noData"));
1309
1336
  return l.table.data;
1310
- } catch (e) {
1311
- console.error(e);
1337
+ } catch (t) {
1338
+ console.error(t);
1312
1339
  } finally {
1313
1340
  l.export.loading = !1;
1314
1341
  }
@@ -1323,15 +1350,15 @@ const P = O.EDialog, je = (n) => {
1323
1350
  });
1324
1351
  return;
1325
1352
  }
1326
- const e = n.option.api.list, t = await e({
1353
+ const t = n.option.api.list, e = await t({
1327
1354
  ...l.page.getQuery({
1328
1355
  size: 999999,
1329
1356
  num: 1
1330
1357
  })
1331
1358
  });
1332
- return (t.data || { [S.config.field.result.list]: t })[S.config.field.result.list];
1333
- } catch (e) {
1334
- console.error(e);
1359
+ return (e.data || { [A.config.field.result.list]: e })[A.config.field.result.list];
1360
+ } catch (t) {
1361
+ console.error(t);
1335
1362
  } finally {
1336
1363
  l.export.loading = !1;
1337
1364
  }
@@ -1340,8 +1367,8 @@ const P = O.EDialog, je = (n) => {
1340
1367
  /** 导出时loading状态 */
1341
1368
  loading: !1,
1342
1369
  /** 执行导出操作的触发函数 */
1343
- click: (e) => {
1344
- l.export.loading || l.export.run.start(e);
1370
+ click: (t) => {
1371
+ l.export.loading || l.export.run.start(t);
1345
1372
  }
1346
1373
  },
1347
1374
  /** 表单增删改弹窗相关对象 */
@@ -1365,15 +1392,23 @@ const P = O.EDialog, je = (n) => {
1365
1392
  /** 表单所有列,二维数组结构按行分组 */
1366
1393
  formColumn: [],
1367
1394
  /** 判断是否禁用当前字段 */
1368
- getDisabled: (e) => n.option.table?.editMode ? e.disabled?.table === void 0 ? !1 : e.disabled?.table : l.update.type === P.View ? e.disabled?.view === void 0 ? !0 : e.disabled?.view : e.disabled?.[l.update.type === P.Add ? "create" : "update"],
1395
+ getDisabled: (t) => n.option.table?.editMode ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type === P.View ? t.disabled?.view === void 0 ? !0 : t.disabled?.view : t.disabled?.[l.update.type === P.Add ? "create" : "update"],
1369
1396
  /** 获取表单组件绑定属性 */
1370
- getBind: (e) => e.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[e.type] || e.options?.[e.type] || {},
1397
+ getBind: (t) => t.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[t.type] || t.options?.[t.type] || {},
1371
1398
  /** 获取表单组件事件属性 */
1372
- getOn: (e) => e.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[e.type]?.on || e.options?.[e.type]?.on || {},
1399
+ getOn: (t, e) => {
1400
+ const u = t.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[t.type]?.on || t.options?.[t.type]?.on || {}, m = {};
1401
+ return Object.keys(u).forEach((c) => {
1402
+ const d = u[c];
1403
+ typeof d == "function" ? m[c] = function(...k) {
1404
+ return d.apply(this, [...k, e || l.update.form, t]);
1405
+ } : m[c] = d;
1406
+ }), m;
1407
+ },
1373
1408
  /** 获取表单组件绑定属性和事件 */
1374
- getOptions: (e) => {
1409
+ getOptions: (t) => {
1375
1410
  try {
1376
- const i = l.update.formColumn.flat().find((u) => u.item.key === e)?.item;
1411
+ const i = l.update.formColumn.flat().find((u) => u.item.key === t)?.item;
1377
1412
  return i ? {
1378
1413
  options: i.options,
1379
1414
  // @ts-ignore
@@ -1388,60 +1423,60 @@ const P = O.EDialog, je = (n) => {
1388
1423
  /** 当前编辑的数据原始项对象 */
1389
1424
  data: {},
1390
1425
  /** 返回编辑时与原值的变更数据,用于局部更新API */
1391
- getApiData: (e) => {
1426
+ getApiData: (t) => {
1392
1427
  if (n.option.form?.editAll)
1393
- return e;
1394
- let t = {
1428
+ return t;
1429
+ let e = {
1395
1430
  [n.option.table?.rowKey]: l.update.edit.data[n.option.table?.rowKey]
1396
1431
  };
1397
1432
  return Object.keys(l.update.edit.data).forEach((i) => {
1398
- e[i] !== l.update.edit.data[i] && (t[i] = e[i]);
1399
- }), t;
1433
+ t[i] !== l.update.edit.data[i] && (e[i] = t[i]);
1434
+ }), e;
1400
1435
  }
1401
1436
  },
1402
1437
  view: {},
1403
1438
  /** 打开增改弹窗 */
1404
- open: (e, t) => {
1439
+ open: (t, e) => {
1405
1440
  l.update.showContent || FunUtil.throttle(async () => {
1406
- O.loading(!0);
1441
+ M.loading(!0);
1407
1442
  try {
1408
- l.update.type = e;
1409
- const i = e === P.Add;
1410
- l.update.edit.data = t, l.update.title = k.tCurd(i ? "add" : e === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(i ? l.update.formDefault : t, {}), await l.initApiData("update"), await n.option.form?.openBefore?.(l.update.form, l.update), (!n.option.table?.inlineEdit || i) && (l.update.show = !0, l.update.showContent = !0), n.option.form?.openAfter?.(l.update.form, l.update);
1443
+ l.update.type = t;
1444
+ const i = t === P.Add;
1445
+ l.update.edit.data = e, l.update.title = w.tCurd(i ? "add" : t === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(i ? l.update.formDefault : e, {}), await l.initApiData("update"), await n.option.form?.openBefore?.(l.update.form, l.update), (!n.option.table?.inlineEdit || i) && (l.update.show = !0, l.update.showContent = !0), n.option.form?.openAfter?.(l.update.form, l.update);
1411
1446
  } catch (i) {
1412
1447
  console.error(i);
1413
1448
  } finally {
1414
- O.loading(!1);
1449
+ M.loading(!1);
1415
1450
  }
1416
1451
  });
1417
1452
  },
1418
1453
  /** 提交增改表单操作 */
1419
1454
  submit: () => {
1420
1455
  FunUtil.throttle(async () => {
1421
- await p.value?.validate(async (u, h) => new Promise((c, d) => {
1422
- u || (O.fail(k.tCurd("checkFormData")), d(!1)), c();
1456
+ await p.value?.validate(async (u, m) => new Promise((c, d) => {
1457
+ u || (M.fail(w.tCurd("checkFormData")), d(!1)), c();
1423
1458
  })), l.update.loading = !0;
1424
- const e = l.update.type === P.Add ? n.option.api.create : n.option.api.update;
1459
+ const t = l.update.type === P.Add ? n.option.api.create : n.option.api.update;
1425
1460
  try {
1426
1461
  await n.option.form?.submitBefore?.(l.update.form, l.update);
1427
1462
  } catch {
1428
1463
  l.update.loading = !1;
1429
1464
  return;
1430
1465
  }
1431
- let t = ObjectUtil.deepMerge(l.update.form, {});
1432
- delete t.children;
1466
+ let e = ObjectUtil.deepMerge(l.update.form, {});
1467
+ delete e.children;
1433
1468
  const i = new Set(n.option.column.filter((u) => u.type === "datetime").map((u) => u.key));
1434
- Object.keys(t).forEach((u) => {
1435
- if (i.has(u) && t[u] != null) {
1436
- const h = new Date(t[u]).getTime();
1437
- isNaN(h) || (t[u] = h);
1469
+ Object.keys(e).forEach((u) => {
1470
+ if (i.has(u) && e[u] != null) {
1471
+ const m = new Date(e[u]).getTime();
1472
+ isNaN(m) || (e[u] = m);
1438
1473
  }
1439
1474
  });
1440
1475
  try {
1441
- if (!e) return;
1442
- await e({
1443
- ...t
1444
- }), l.update.close(), await l.table.getList(), n.option.form?.submitAfter?.(t, l.update);
1476
+ if (!t) return;
1477
+ await t({
1478
+ ...e
1479
+ }), l.update.close(), await l.table.getList(), n.option.form?.submitAfter?.(e, l.update);
1445
1480
  } catch (u) {
1446
1481
  console.error(u);
1447
1482
  } finally {
@@ -1459,7 +1494,7 @@ const P = O.EDialog, je = (n) => {
1459
1494
  /** 删除操作弹窗与数据对象 */
1460
1495
  remove: {
1461
1496
  /** 删除弹窗标题 */
1462
- title: k.tCurd("confirmDelete"),
1497
+ title: w.tCurd("confirmDelete"),
1463
1498
  /** 删除弹窗显示控制 */
1464
1499
  show: !1,
1465
1500
  /** 待删除数据项集合 */
@@ -1471,26 +1506,26 @@ const P = O.EDialog, je = (n) => {
1471
1506
  l.remove.show = !1;
1472
1507
  },
1473
1508
  /** 打开删除弹窗并设置待删除项 */
1474
- open: (e) => {
1475
- if (e.length === 0) {
1476
- O.fail(k.tCurd("selectDataToDelete"));
1509
+ open: (t) => {
1510
+ if (t.length === 0) {
1511
+ M.fail(w.tCurd("selectDataToDelete"));
1477
1512
  return;
1478
1513
  }
1479
- l.remove.items = e, l.remove.show = !0;
1514
+ l.remove.items = t, l.remove.show = !0;
1480
1515
  },
1481
1516
  /** 执行删除实际操作 */
1482
1517
  submit: () => {
1483
1518
  FunUtil.throttle(async () => {
1484
1519
  l.remove.loading = !0;
1485
- const e = n.option.api.delete;
1520
+ const t = n.option.api.delete;
1486
1521
  try {
1487
- if (!e) return;
1488
- await e({
1489
- [n.option.table?.rowKey]: l.remove.items.map((t) => t[n.option.table?.rowKey]),
1522
+ if (!t) return;
1523
+ await t({
1524
+ [n.option.table?.rowKey]: l.remove.items.map((e) => e[n.option.table?.rowKey]),
1490
1525
  items: l.remove.items
1491
- }), O.success(k.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
1492
- } catch (t) {
1493
- console.error(t);
1526
+ }), M.success(w.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
1527
+ } catch (e) {
1528
+ console.error(e);
1494
1529
  } finally {
1495
1530
  l.remove.loading = !1;
1496
1531
  }
@@ -1504,15 +1539,15 @@ const P = O.EDialog, je = (n) => {
1504
1539
  /** 下拉请求等数据缓存 */
1505
1540
  apiDataMap: {},
1506
1541
  /** 获取并绑定curd中所有下拉数据等远程依赖 */
1507
- initApiData: async (e) => {
1508
- const t = [], i = (u) => {
1542
+ initApiData: async (t) => {
1543
+ const e = [], i = (u) => {
1509
1544
  if (u.children && u.children.length) {
1510
- u.children.forEach((h) => i(h));
1545
+ u.children.forEach((m) => i(m));
1511
1546
  return;
1512
1547
  }
1513
- if (u.options?.[u.type]?.dataApi && u.options?.[u.type]?.dataApiConfig?.[e]) {
1548
+ if (u.options?.[u.type]?.dataApi && u.options?.[u.type]?.dataApiConfig?.[t]) {
1514
1549
  if (l.apiDataMap[u.key] && u.options?.[u.type]?.dataApiConfig?.once) return;
1515
- const h = (async () => {
1550
+ const m = (async () => {
1516
1551
  try {
1517
1552
  let c = await u.options?.[u.type]?.dataApi?.(l.update.form, l.update.type);
1518
1553
  if (c) {
@@ -1522,20 +1557,20 @@ const P = O.EDialog, je = (n) => {
1522
1557
  } catch {
1523
1558
  }
1524
1559
  })();
1525
- t.push(h);
1560
+ e.push(m);
1526
1561
  }
1527
1562
  };
1528
1563
  return n.option.column.forEach((u) => {
1529
1564
  i(u);
1530
- }), await Promise.all(t), !0;
1565
+ }), await Promise.all(e), !0;
1531
1566
  },
1532
1567
  /** 初始化curd配置(option默认值合并等) */
1533
1568
  initCurdConfig: () => {
1534
- const e = ObjectUtil.deepMerge(S.config, {});
1535
- e.table.emptyText = k.tCurd("noData"), n.option.size = n.option.size || {}, e.table.size = n.option.size.table || e.size.table, e.form.size = n.option.size.form || e.size.form, e.size.search = n.option.size.search || e.size.search;
1536
- const t = ObjectUtil.deepMerge(e, n.option || {});
1537
- Object.keys(t).forEach((i) => {
1538
- n.option[i] = t[i];
1569
+ const t = ObjectUtil.deepMerge(A.config, {});
1570
+ t.table.emptyText = w.tCurd("noData"), n.option.size = n.option.size || {}, t.table.size = n.option.size.table || t.size.table, t.form.size = n.option.size.form || t.size.form, t.size.search = n.option.size.search || t.size.search;
1571
+ const e = ObjectUtil.deepMerge(t, n.option || {});
1572
+ Object.keys(e).forEach((i) => {
1573
+ n.option[i] = e[i];
1539
1574
  });
1540
1575
  },
1541
1576
  /**
@@ -1544,48 +1579,48 @@ const P = O.EDialog, je = (n) => {
1544
1579
  * @returns
1545
1580
  */
1546
1581
  initColumnOptions: () => {
1547
- let e = JSONUtil.cp(S.config.columnConfig);
1548
- e.options = ObjectUtil.deepMerge(
1582
+ let t = JSONUtil.cp(A.config.columnConfig);
1583
+ t.options = ObjectUtil.deepMerge(
1549
1584
  {
1550
1585
  switch: {
1551
- activeText: k.tCurd("switchOn"),
1552
- inactiveText: k.tCurd("switchOff")
1586
+ activeText: w.tCurd("switchOn"),
1587
+ inactiveText: w.tCurd("switchOff")
1553
1588
  }
1554
1589
  },
1555
- e.options
1590
+ t.options
1556
1591
  );
1557
- const t = (i) => {
1558
- for (const u in e) {
1592
+ const e = (i) => {
1593
+ for (const u in t) {
1559
1594
  if (u === "table") {
1560
- if (i.table = ObjectUtil.deepMerge(e.table, i.table || {}), i.children) {
1595
+ if (i.table = ObjectUtil.deepMerge(t.table, i.table || {}), i.children) {
1561
1596
  i.children.forEach((c) => {
1562
- t(c);
1597
+ e(c);
1563
1598
  });
1564
1599
  return;
1565
1600
  }
1566
- } else u === "type" ? i.type = i.type || e.type : i[u] = ObjectUtil.deepMerge(e[u], i[u] || {});
1601
+ } else u === "type" ? i.type = i.type || t.type : i[u] = ObjectUtil.deepMerge(t[u], i[u] || {});
1567
1602
  i.options = i.options || {}, i.options[i.type] = i.options[i.type] || {}, i.options[i.type].size = n.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
1568
1603
  i.options[c] = i.options[c] || ObjectUtil.deepMerge(i.options, {}), i.options[c][i.type] = i.options[c][i.type] || {}, i.options[c][i.type].size = c === "search" ? n.option.size.search : n.option.size.form;
1569
1604
  }), i.table = ObjectUtil.deepMerge(i.table, i.options[i.type].table || {});
1570
1605
  }
1571
- i.type === "switch" && (i.options.switch.tableBeforeChange = async (u, h) => {
1606
+ i.type === "switch" && (i.options.switch.tableBeforeChange = async (u, m) => {
1572
1607
  const c = i.options?.switch;
1573
1608
  try {
1574
- c.tableConfig?.confirm && await a.value?.open({
1575
- title: k.tCurd("confirmModify"),
1576
- content: k.tCurd("confirmSwitchMessage")
1609
+ c.tableConfig?.confirm && await o.value?.open({
1610
+ title: w.tCurd("confirmModify"),
1611
+ content: w.tCurd("confirmSwitchMessage")
1577
1612
  });
1578
1613
  try {
1579
1614
  if (!n.option.api.update && !c.tableConfig?.api) return;
1580
- const d = h[n.option.table?.rowKey];
1615
+ const d = m[n.option.table?.rowKey];
1581
1616
  c.loadingMap || (c.loadingMap = {}), c.loadingMap[d] || (c.loadingMap[d] = { loading: !1 }), c.loadingMap[d].loading = !0;
1582
- const r = h[u] === c.activeValue ? c.inactiveValue : c.activeValue, m = c.tableConfig?.api ? c.tableConfig.api : n.option.api.update;
1583
- if (!m) return;
1617
+ const k = m[u] === c.activeValue ? c.inactiveValue : c.activeValue, r = c.tableConfig?.api ? c.tableConfig.api : n.option.api.update;
1618
+ if (!r) return;
1584
1619
  try {
1585
- await m(
1620
+ await r(
1586
1621
  {
1587
- ...h,
1588
- [u]: r
1622
+ ...m,
1623
+ [u]: k
1589
1624
  },
1590
1625
  "switch"
1591
1626
  );
@@ -1594,7 +1629,7 @@ const P = O.EDialog, je = (n) => {
1594
1629
  } finally {
1595
1630
  c.loadingMap[d].loading = !1;
1596
1631
  }
1597
- return O.success(k.tCurd("operationSuccess")), c.tableConfig?.loadList && (l.table.loading = !0, l.table.getList(), l.table.loading = !1), !0;
1632
+ return M.success(w.tCurd("operationSuccess")), c.tableConfig?.loadList && (l.table.loading = !0, l.table.getList(), l.table.loading = !1), !0;
1598
1633
  } catch (d) {
1599
1634
  return console.error(d), !1;
1600
1635
  } finally {
@@ -1605,105 +1640,105 @@ const P = O.EDialog, je = (n) => {
1605
1640
  }
1606
1641
  }), i.type === "treeSelect" && (i.options.treeSelect.rowKey = n.option.table?.rowKey, i.options.treeSelect.nodeKey = n.option.table?.rowKey);
1607
1642
  };
1608
- n.option.column.forEach(t), n.option.table?.column?.forEach(t);
1643
+ n.option.column.forEach(e), n.option.table?.column?.forEach(e);
1609
1644
  },
1610
- getColumnSpan: (e, t) => {
1611
- if (e.item.form?.spanCol) {
1612
- const i = S.config.form.defaultSpan, h = t.filter((c) => !O.isFun(c.item.show?.form, l.update.form, l.update.type)).reduce((c, d) => c + (d.item.form?.span || i), 0);
1613
- return (e.item?.form.span || i) + h;
1645
+ getColumnSpan: (t, e) => {
1646
+ if (t.item.form?.spanCol) {
1647
+ const i = A.config.form.defaultSpan, m = e.filter((c) => !M.isFun(c.item.show?.form, l.update.form, l.update.type)).reduce((c, d) => c + (d.item.form?.span || i), 0);
1648
+ return (t.item?.form.span || i) + m;
1614
1649
  }
1615
- return e.item.form.span;
1650
+ return t.item.form.span;
1616
1651
  },
1617
1652
  /** 初始化配置并生成表单列及默认值及规则 */
1618
1653
  initColumnForm: () => {
1619
- const e = n.option;
1654
+ const t = n.option;
1620
1655
  l.update.formColumn = [], l.table.column.show = {
1621
1656
  list: [],
1622
1657
  listSource: []
1623
1658
  };
1624
- const t = [], i = n.option.form?.maxSpan || 12, u = n.option.form?.defaultSpan || i / 2;
1625
- let h = [];
1626
- const c = (m) => {
1627
- if (m.children) {
1628
- l.table.column.show.list.push(m.key), m.children.forEach((b) => {
1629
- c(b);
1659
+ const e = [], i = n.option.form?.maxSpan || 12, u = n.option.form?.defaultSpan || i / 2;
1660
+ let m = [];
1661
+ const c = (r) => {
1662
+ if (r.children) {
1663
+ l.table.column.show.list.push(r.key), r.children.forEach((h) => {
1664
+ c(h);
1630
1665
  });
1631
1666
  return;
1632
1667
  }
1633
- if (l.update.formDefault[m.key] = m.value, m.table.table && (m.show.table && l.table.column.show.list.push(m.key), m.table.table && l.table.column.show.listSource.push(m.key)), !(m.isForm && typeof m.show?.form == "boolean") || m.show?.form) {
1634
- m.form = m.form || { span: u }, m.form.span = m.form.span ?? u;
1635
- let b = m.form.span, T = h.reduce((j, R) => j + R.span, b);
1636
- const B = h.length;
1637
- if (h.push({ item: m, span: b }), (B === 1 && h[0].span === 0 || T >= i || b === 0 && B > 1) && (t.push(h), h = []), m.rules) {
1638
- const j = {
1639
- input: k.tCurd("placeholderInput"),
1640
- select: k.tCurd("placeholderSelect")
1641
- }, R = (j[m.type] || j.input) + m.label;
1642
- l.update.rules[m.key] = typeof m.rules == "boolean" ? [
1668
+ if (l.update.formDefault[r.key] = r.value, r.table.table && (r.show.table && l.table.column.show.list.push(r.key), r.table.table && l.table.column.show.listSource.push(r.key)), !(r.isForm && typeof r.show?.form == "boolean") || r.show?.form) {
1669
+ r.form = r.form || { span: u }, r.form.span = r.form.span ?? u;
1670
+ let h = r.form.span, S = m.reduce((F, R) => F + R.span, h);
1671
+ const j = m.length;
1672
+ if (m.push({ item: r, span: h }), (j === 1 && m[0].span === 0 || S >= i || h === 0 && j > 1) && (e.push(m), m = []), r.rules) {
1673
+ const F = {
1674
+ input: w.tCurd("placeholderInput"),
1675
+ select: w.tCurd("placeholderSelect")
1676
+ }, R = (F[r.type] || F.input) + r.label;
1677
+ l.update.rules[r.key] = typeof r.rules == "boolean" ? [
1643
1678
  {
1644
1679
  required: !0,
1645
1680
  message: R,
1646
1681
  trigger: "blur"
1647
1682
  }
1648
- ] : m.rules;
1683
+ ] : r.rules;
1649
1684
  }
1650
1685
  }
1651
- }, d = (m, b) => {
1652
- m.isForm = b, Array.isArray(m.children) && m.children.forEach((T) => d(T, b));
1686
+ }, d = (r, h) => {
1687
+ r.isForm = h, Array.isArray(r.children) && r.children.forEach((S) => d(S, h));
1653
1688
  };
1654
- e.column.forEach((m) => {
1655
- m.isForm = !0, d(m, !0), c(m);
1656
- }), n.option.table?.column?.forEach((m) => {
1657
- d(m, !1), c(m);
1658
- }), l.search.column.list = e.column.concat(e.table?.column || []), l.table.column.list = l.search.column.list.filter((m) => m.table?.table), l.search.column.list.sort((m, b) => m.sort?.search - b.sort?.search), l.table.column.list.sort((m, b) => m.sort?.table - b.sort?.table), h.length > 0 && t.push(h), l.update.formColumn = t;
1659
- const r = n.option.search?.formDefault;
1660
- r && Object.keys(r).forEach((m) => {
1661
- l.search.formDefault[m] = r[m];
1662
- }), e.column.forEach((m) => {
1663
- m.show?.search || (l.search.formDefault[m.key] = void 0);
1689
+ t.column.forEach((r) => {
1690
+ r.isForm = !0, d(r, !0), c(r);
1691
+ }), n.option.table?.column?.forEach((r) => {
1692
+ d(r, !1), c(r);
1693
+ }), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((r) => r.table?.table), l.search.column.list.sort((r, h) => r.sort?.search - h.sort?.search), l.table.column.list.sort((r, h) => r.sort?.table - h.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
1694
+ const k = n.option.search?.formDefault;
1695
+ k && Object.keys(k).forEach((r) => {
1696
+ l.search.formDefault[r] = k[r];
1697
+ }), t.column.forEach((r) => {
1698
+ r.show?.search || (l.search.formDefault[r.key] = void 0);
1664
1699
  }), l.search.form = ObjectUtil.deepMerge(l.search.formDefault, {});
1665
1700
  }
1666
1701
  });
1667
- return l.init(), ue(() => {
1702
+ return l.init(), fe(() => {
1668
1703
  n.option.init !== !1 && l.table.getList();
1669
- }), { conf: l, switchConfirmRef: a, ruleFormRef: p, tableRef: s };
1670
- }, Le = { class: "dialog-footer" }, Be = /* @__PURE__ */ q({
1704
+ }), { conf: l, switchConfirmRef: o, ruleFormRef: p, tableRef: s };
1705
+ }, Le = { class: "dialog-footer" }, je = /* @__PURE__ */ Q({
1671
1706
  __name: "switchConfirm",
1672
1707
  props: {
1673
1708
  size: {}
1674
1709
  },
1675
- setup(n, { expose: a }) {
1710
+ setup(n, { expose: o }) {
1676
1711
  const p = N(!1), s = N("确认修改"), l = N("确认要修改状态吗?");
1677
- let e = null, t = null;
1678
- const i = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((d, r) => {
1679
- e = d, t = r;
1712
+ let t = null, e = null;
1713
+ const i = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((d, k) => {
1714
+ t = d, e = k;
1680
1715
  })), u = () => {
1681
- p.value = !1, e?.(!0), e = null, t = null;
1682
- }, h = () => {
1683
- p.value = !1, t?.(new Error("用户取消操作")), e = null, t = null;
1716
+ p.value = !1, t?.(!0), t = null, e = null;
1717
+ }, m = () => {
1718
+ p.value = !1, e?.(new Error("用户取消操作")), t = null, e = null;
1684
1719
  };
1685
- return a({
1720
+ return o({
1686
1721
  open: i
1687
1722
  }), (c, d) => {
1688
- const r = x("el-form");
1689
- return f(), g(o(ee), {
1723
+ const k = x("el-form");
1724
+ return f(), g(a(oe), {
1690
1725
  modelValue: p.value,
1691
- "onUpdate:modelValue": d[0] || (d[0] = (m) => p.value = m),
1726
+ "onUpdate:modelValue": d[0] || (d[0] = (r) => p.value = r),
1692
1727
  title: s.value,
1693
1728
  "close-on-click-modal": !1,
1694
1729
  width: "400px"
1695
1730
  }, {
1696
1731
  footer: y(() => [
1697
- D(r, { size: c.size }, {
1732
+ U(k, { size: c.size }, {
1698
1733
  default: y(() => [
1699
- M("span", Le, [
1700
- D(o(A), { onClick: h }, {
1734
+ E("span", Le, [
1735
+ U(a(T), { onClick: m }, {
1701
1736
  default: y(() => d[1] || (d[1] = [
1702
1737
  $("取消")
1703
1738
  ])),
1704
1739
  _: 1
1705
1740
  }),
1706
- D(o(A), {
1741
+ U(a(T), {
1707
1742
  type: "primary",
1708
1743
  onClick: u
1709
1744
  }, {
@@ -1718,43 +1753,69 @@ const P = O.EDialog, je = (n) => {
1718
1753
  }, 8, ["size"])
1719
1754
  ]),
1720
1755
  default: y(() => [
1721
- M("div", null, E(l.value), 1)
1756
+ E("div", null, O(l.value), 1)
1722
1757
  ]),
1723
1758
  _: 1
1724
1759
  }, 8, ["modelValue", "title"]);
1725
1760
  };
1726
1761
  }
1727
- }), pe = (n, a) => {
1762
+ }), G = (n, o) => {
1728
1763
  const p = n.__vccOpts || n;
1729
- for (const [s, l] of a)
1764
+ for (const [s, l] of o)
1730
1765
  p[s] = l;
1731
1766
  return p;
1732
1767
  }, Re = {}, Ie = {
1733
1768
  xmlns: "http://www.w3.org/2000/svg",
1734
1769
  viewBox: "0 0 1024 1024"
1735
1770
  };
1736
- function Pe(n, a) {
1737
- return f(), w("svg", Ie, a[0] || (a[0] = [
1738
- M("path", {
1771
+ function Pe(n, o) {
1772
+ return f(), b("svg", Ie, o[0] || (o[0] = [
1773
+ E("path", {
1739
1774
  fill: "currentColor",
1740
1775
  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"
1741
1776
  }, null, -1)
1742
1777
  ]));
1743
1778
  }
1744
- const Ke = /* @__PURE__ */ pe(Re, [["render", Pe]]), He = {}, Ne = {
1779
+ const Ke = /* @__PURE__ */ G(Re, [["render", Pe]]), He = {}, Ne = {
1745
1780
  "data-v-58697b5c": "",
1746
1781
  xmlns: "http://www.w3.org/2000/svg",
1747
1782
  viewBox: "0 0 1024 1024"
1748
1783
  };
1749
- function We(n, a) {
1750
- return f(), w("svg", Ne, a[0] || (a[0] = [
1751
- M("path", {
1784
+ function We(n, o) {
1785
+ return f(), b("svg", Ne, o[0] || (o[0] = [
1786
+ E("path", {
1752
1787
  fill: "currentColor",
1753
1788
  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"
1754
1789
  }, null, -1)
1755
1790
  ]));
1756
1791
  }
1757
- const Je = /* @__PURE__ */ pe(He, [["render", We]]), qe = { class: "row flex-center table-header-label inline" }, Qe = { class: "table-header-tooltip" }, Ge = { key: 1 }, Xe = ["onClick", "innerHTML"], Ye = /* @__PURE__ */ q({
1792
+ const Je = /* @__PURE__ */ G(He, [["render", We]]), qe = {}, Qe = {
1793
+ "data-v-58697b5c": "",
1794
+ xmlns: "http://www.w3.org/2000/svg",
1795
+ viewBox: "0 0 1024 1024"
1796
+ };
1797
+ function Ge(n, o) {
1798
+ return f(), b("svg", Qe, o[0] || (o[0] = [
1799
+ E("path", {
1800
+ fill: "currentColor",
1801
+ 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"
1802
+ }, null, -1)
1803
+ ]));
1804
+ }
1805
+ const Xe = /* @__PURE__ */ G(qe, [["render", Ge]]), Ye = {}, Ze = {
1806
+ "data-v-58697b5c": "",
1807
+ xmlns: "http://www.w3.org/2000/svg",
1808
+ viewBox: "0 0 1024 1024"
1809
+ };
1810
+ function xe(n, o) {
1811
+ return f(), b("svg", Ze, o[0] || (o[0] = [
1812
+ E("path", {
1813
+ fill: "currentColor",
1814
+ 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"
1815
+ }, null, -1)
1816
+ ]));
1817
+ }
1818
+ const _e = /* @__PURE__ */ G(Ye, [["render", xe]]), et = { class: "row flex-center table-header-label inline" }, tt = { class: "table-header-tooltip" }, ot = ["onClick"], at = { key: 1 }, lt = ["onClick", "innerHTML"], nt = /* @__PURE__ */ Q({
1758
1819
  __name: "tableColumn",
1759
1820
  props: {
1760
1821
  conf: {},
@@ -1762,287 +1823,364 @@ const Je = /* @__PURE__ */ pe(He, [["render", We]]), qe = { class: "row flex-cen
1762
1823
  option: {}
1763
1824
  },
1764
1825
  setup(n) {
1765
- const a = O.isFun, p = we().type;
1826
+ const o = M.isFun, p = we().type;
1766
1827
  return (s, l) => {
1767
- const e = x("el-tooltip");
1768
- return f(!0), w(z, null, F(s.columnList, (t) => (f(), w(z, {
1769
- key: t.key
1828
+ const t = x("el-tooltip");
1829
+ return f(!0), b(D, null, B(s.columnList, (e) => (f(), b(D, {
1830
+ key: e.key
1770
1831
  }, [
1771
- s.conf.table.column.show.list.includes(t.key) ? (f(), g(o(te), V({
1772
- key: 0,
1773
- prop: t.key,
1774
- label: t.label,
1775
- ref_for: !0
1776
- }, t.table), {
1777
- header: y(() => [
1778
- v(s.$slots, "table-header-" + t.key, { item: t }, () => [
1779
- M("div", qe, [
1780
- t.table?.tooltip ? (f(), g(e, {
1781
- key: 0,
1782
- effect: "dark",
1783
- content: t.table?.tooltip,
1784
- placement: "top"
1785
- }, {
1786
- default: y(() => [
1787
- M("span", Qe, [
1788
- D(Je)
1789
- ])
1790
- ]),
1791
- _: 2
1792
- }, 1032, ["content"])) : C("", !0),
1793
- $(" " + E(t.label), 1)
1832
+ s.conf.table.column.show.list.includes(e.key) ? (f(), b(D, { key: 0 }, [
1833
+ e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(a(ae), V({
1834
+ key: 0,
1835
+ prop: e.key,
1836
+ label: e.label,
1837
+ ref_for: !0
1838
+ }, e.table), {
1839
+ header: y(() => [
1840
+ C(s.$slots, "table-header-" + e.key, { item: e }, () => [
1841
+ E("div", et, [
1842
+ e.table?.header?.tooltip ? (f(), g(t, {
1843
+ key: 0,
1844
+ effect: "dark",
1845
+ content: e.table?.header?.tooltip,
1846
+ placement: "top"
1847
+ }, {
1848
+ default: y(() => [
1849
+ E("span", tt, [
1850
+ U(Je)
1851
+ ])
1852
+ ]),
1853
+ _: 2
1854
+ }, 1032, ["content"])) : v("", !0),
1855
+ $(" " + O(e.label) + " ", 1),
1856
+ e.table?.header?.group !== void 0 ? (f(), b("span", {
1857
+ key: 1,
1858
+ class: "table-header-plus",
1859
+ onClick: () => {
1860
+ e.table.header.group = !e.table.header.group, s.columnList.forEach((i) => {
1861
+ i.table?.header?.groupKey === e.key && (i.table.header.show = !e.table.header.group);
1862
+ });
1863
+ }
1864
+ }, [
1865
+ e.table.header.group ? (f(), g(Xe, { key: 0 })) : (f(), g(_e, { key: 1 }))
1866
+ ], 8, ot)) : v("", !0)
1867
+ ])
1794
1868
  ])
1795
- ])
1796
- ]),
1797
- default: y(({ row: i }) => [
1798
- t.children ? (f(), w(z, { key: 0 }, [
1799
- l[0] || (l[0] = $("   ")),
1800
- (f(), g(Y(o(p)), {
1801
- conf: s.conf,
1802
- columnList: t.children,
1803
- option: s.option
1804
- }, oe({ _: 2 }, [
1805
- F(s.$slots, (u, h) => ({
1806
- name: h,
1807
- fn: y((c) => [
1808
- v(s.$slots, h, V({ ref_for: !0 }, c || {}))
1809
- ])
1810
- }))
1811
- ]), 1032, ["conf", "columnList", "option"]))
1812
- ], 64)) : (f(), w(z, { key: 1 }, [
1813
- s.option.table?.editMode ? (f(), w(z, { key: 0 }, [
1814
- t.type === "input" ? (f(), g(o(X), {
1869
+ ]),
1870
+ default: y(({ row: i }) => [
1871
+ e.children ? (f(), b(D, { key: 0 }, [
1872
+ l[0] || (l[0] = $("   ")),
1873
+ (f(), g(_(a(p)), {
1874
+ conf: s.conf,
1875
+ columnList: e.children,
1876
+ option: s.option
1877
+ }, J({ _: 2 }, [
1878
+ B(s.$slots, (u, m) => ({
1879
+ name: m,
1880
+ fn: y((c) => [
1881
+ C(s.$slots, m, V({ ref_for: !0 }, c || {}))
1882
+ ])
1883
+ }))
1884
+ ]), 1032, ["conf", "columnList", "option"]))
1885
+ ], 64)) : (f(), b(D, { key: 1 }, [
1886
+ s.option.table?.editMode ? (f(), b("div", {
1815
1887
  key: 0,
1816
- modelValue: i[t.key],
1817
- "onUpdate:modelValue": (u) => i[t.key] = u,
1818
- disabled: s.conf.update.getDisabled(t),
1888
+ class: I(["row", ["table-edit-" + e.key]]),
1819
1889
  style: { width: "100%" }
1820
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "select" ? (f(), g(o(J), {
1821
- key: 1,
1822
- modelValue: i[t.key],
1823
- "onUpdate:modelValue": (u) => i[t.key] = u,
1824
- disabled: s.conf.update.getDisabled(t),
1825
- style: { width: "100%" }
1826
- }, {
1827
- default: y(() => [
1828
- (f(!0), w(z, null, F(t.options?.search?.select?.data || t.options?.select?.data, (u) => (f(), g(o(H), {
1829
- key: u.value,
1830
- label: u.label,
1831
- value: u.value
1832
- }, null, 8, ["label", "value"]))), 128))
1833
- ]),
1834
- _: 2
1835
- }, 1032, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "switch" ? (f(), g(o(G), {
1836
- key: 2,
1837
- modelValue: i[t.key],
1838
- "onUpdate:modelValue": (u) => i[t.key] = u,
1839
- disabled: s.conf.update.getDisabled(t)
1840
- }, null, 8, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1841
- ], 64)) : (f(), w(z, { key: 1 }, [
1842
- s.conf.update.type === o(O).EDialog.Update && o(a)(t.show?.form, s.conf.update.form, o(O).EDialog.Update) && s.option.table?.inlineEdit && s.conf.update.form[s.option.table?.rowKey] === i[s.option.table?.rowKey] && (t.type === "input" || t.type === "select") ? (f(), w(z, { key: 0 }, [
1843
- t.type === "input" ? (f(), g(o(X), V({
1890
+ }, [
1891
+ C(s.$slots, "table-edit-left-" + e.key, {
1892
+ row: i,
1893
+ item: e
1894
+ }),
1895
+ e.type === "input" ? (f(), g(a(Z), V({
1844
1896
  key: 0,
1845
- modelValue: s.conf.update.form[t.key],
1846
- "onUpdate:modelValue": (u) => s.conf.update.form[t.key] = u,
1847
- disabled: s.conf.update.getDisabled(t),
1897
+ modelValue: i[e.key],
1898
+ "onUpdate:modelValue": (u) => i[e.key] = u,
1899
+ disabled: s.conf.update.getDisabled(e),
1900
+ class: "col",
1848
1901
  ref_for: !0
1849
- }, s.conf.update.getBind(t), U(s.conf.update.getOn(t)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "select" ? (f(), g(o(J), V({
1902
+ }, s.conf.update.getBind(e), z(s.conf.update.getOn(e, i))), J({ _: 2 }, [
1903
+ e.options?.input?.prepend ? {
1904
+ name: "prepend",
1905
+ fn: y(() => [
1906
+ $(O(typeof e.options?.input?.prepend == "function" ? e.options?.input?.prepend(i) : e.options?.input?.prepend), 1)
1907
+ ]),
1908
+ key: "0"
1909
+ } : void 0
1910
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), g(a(q), V({
1850
1911
  key: 1,
1851
- modelValue: s.conf.update.form[t.key],
1852
- "onUpdate:modelValue": (u) => s.conf.update.form[t.key] = u,
1853
- disabled: s.conf.update.getDisabled(t),
1912
+ modelValue: i[e.key],
1913
+ "onUpdate:modelValue": (u) => i[e.key] = u,
1914
+ disabled: s.conf.update.getDisabled(e),
1915
+ class: "col",
1854
1916
  ref_for: !0
1855
- }, s.conf.update.getBind(t), U(s.conf.update.getOn(t)), { style: { width: "100%" } }), {
1917
+ }, s.conf.update.getBind(e), z(s.conf.update.getOn(e, i))), {
1856
1918
  default: y(() => [
1857
- (f(!0), w(z, null, F(t.options?.search?.select?.data || t.options?.select?.data, (u) => (f(), g(o(H), {
1919
+ (f(!0), b(D, null, B(e.options?.search?.select?.data || e.options?.select?.data, (u) => (f(), g(a(H), {
1858
1920
  key: u.value,
1859
1921
  label: u.label,
1860
1922
  value: u.value
1861
1923
  }, null, 8, ["label", "value"]))), 128))
1862
1924
  ]),
1863
1925
  _: 2
1864
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : t.type === "switch" ? (f(), g(o(G), V({
1926
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), g(a(Y), V({
1865
1927
  key: 2,
1866
- modelValue: s.conf.update.form[t.key],
1867
- "onUpdate:modelValue": (u) => s.conf.update.form[t.key] = u,
1928
+ modelValue: i[e.key],
1929
+ "onUpdate:modelValue": (u) => i[e.key] = u,
1930
+ disabled: s.conf.update.getDisabled(e),
1931
+ class: "col",
1868
1932
  ref_for: !0
1869
- }, s.conf.update.getBind(t), U(s.conf.update.getOn(t)), {
1870
- disabled: s.conf.update.getDisabled(t)
1871
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1872
- ], 64)) : v(s.$slots, "table-" + t.key, {
1873
- key: 1,
1874
- row: i,
1875
- item: t
1876
- }, () => [
1877
- o(L).customComponent[t.type ?? ""]?.table ? (f(), g(Y(o(L).customComponent[t.type ?? ""]?.table), V({
1878
- key: 0,
1879
- modelValue: i[t.key],
1880
- "onUpdate:modelValue": (u) => i[t.key] = u,
1881
- ref_for: !0
1882
- }, t.options?.[t.type ?? ""], U(t.options?.[t.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : t.type === "switch" ? (f(), w(z, { key: 1 }, [
1883
- t.options?.switch?.tableConfig?.change ? (f(), g(o(G), V({
1933
+ }, s.conf.update.getBind(e), z(s.conf.update.getOn(e, i))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0),
1934
+ C(s.$slots, "table-edit-right-" + e.key, {
1935
+ row: i,
1936
+ item: e
1937
+ })
1938
+ ], 2)) : (f(), b(D, { key: 1 }, [
1939
+ s.conf.update.type === a(M).EDialog.Update && a(o)(e.show?.form, s.conf.update.form, a(M).EDialog.Update) && s.option.table?.inlineEdit && s.conf.update.form[s.option.table?.rowKey] === i[s.option.table?.rowKey] && (e.type === "input" || e.type === "select") ? (f(), b(D, { key: 0 }, [
1940
+ e.type === "input" ? (f(), g(a(Z), V({
1884
1941
  key: 0,
1885
- modelValue: i[t.key],
1886
- "onUpdate:modelValue": (u) => i[t.key] = u,
1887
- loading: t.options?.switch?.loadingMap?.[i[s.option.table?.rowKey]]?.loading,
1888
- "before-change": () => t.options?.switch?.tableBeforeChange?.(t.key, i),
1942
+ modelValue: s.conf.update.form[e.key],
1943
+ "onUpdate:modelValue": (u) => s.conf.update.form[e.key] = u,
1944
+ disabled: s.conf.update.getDisabled(e),
1889
1945
  ref_for: !0
1890
- }, t.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (f(), w("span", Ge, E(i[t.key] === t.options?.switch?.activeValue ? t.options?.switch?.activeText : t.options?.switch?.inactiveText), 1))
1891
- ], 64)) : (f(), w("span", {
1892
- key: 2,
1893
- style: fe({
1894
- "--table-text-click-color": t.table?.click?.color
1895
- }),
1896
- class: I({ "table-text-click": t.table?.click?.callback }),
1897
- onClick: (u) => t.table?.click?.callback?.(i),
1898
- innerHTML: t.table?.format ? t.table?.format(i) : i[t.key]
1899
- }, null, 14, Xe))
1900
- ])
1946
+ }, s.conf.update.getBind(e), z(s.conf.update.getOn(e, i)), { style: { width: "100%" } }), J({ _: 2 }, [
1947
+ e.options?.input?.prepend ? {
1948
+ name: "prepend",
1949
+ fn: y(() => [
1950
+ $(O(typeof e.options?.input?.prepend == "function" ? e.options?.input?.prepend(i) : e.options?.input?.prepend), 1)
1951
+ ]),
1952
+ key: "0"
1953
+ } : void 0
1954
+ ]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), g(a(q), V({
1955
+ key: 1,
1956
+ modelValue: s.conf.update.form[e.key],
1957
+ "onUpdate:modelValue": (u) => s.conf.update.form[e.key] = u,
1958
+ disabled: s.conf.update.getDisabled(e),
1959
+ ref_for: !0
1960
+ }, s.conf.update.getBind(e), z(s.conf.update.getOn(e, i)), { style: { width: "100%" } }), {
1961
+ default: y(() => [
1962
+ (f(!0), b(D, null, B(e.options?.search?.select?.data || e.options?.select?.data, (u) => (f(), g(a(H), {
1963
+ key: u.value,
1964
+ label: u.label,
1965
+ value: u.value
1966
+ }, null, 8, ["label", "value"]))), 128))
1967
+ ]),
1968
+ _: 2
1969
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), g(a(Y), V({
1970
+ key: 2,
1971
+ modelValue: s.conf.update.form[e.key],
1972
+ "onUpdate:modelValue": (u) => s.conf.update.form[e.key] = u,
1973
+ ref_for: !0
1974
+ }, s.conf.update.getBind(e), z(s.conf.update.getOn(e, i)), {
1975
+ disabled: s.conf.update.getDisabled(e)
1976
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
1977
+ ], 64)) : C(s.$slots, "table-" + e.key, {
1978
+ key: 1,
1979
+ row: i,
1980
+ item: e
1981
+ }, () => [
1982
+ a(L).customComponent[e.type ?? ""]?.table ? (f(), g(_(a(L).customComponent[e.type ?? ""]?.table), V({
1983
+ key: 0,
1984
+ modelValue: i[e.key],
1985
+ "onUpdate:modelValue": (u) => i[e.key] = u,
1986
+ ref_for: !0
1987
+ }, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (f(), b(D, { key: 1 }, [
1988
+ e.options?.switch?.tableConfig?.change ? (f(), g(a(Y), V({
1989
+ key: 0,
1990
+ modelValue: i[e.key],
1991
+ "onUpdate:modelValue": (u) => i[e.key] = u,
1992
+ loading: e.options?.switch?.loadingMap?.[i[s.option.table?.rowKey]]?.loading,
1993
+ "before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, i),
1994
+ ref_for: !0
1995
+ }, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (f(), b("span", at, O(i[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
1996
+ ], 64)) : (f(), b("span", {
1997
+ key: 2,
1998
+ style: pe({
1999
+ "--table-text-click-color": e.table?.click?.color
2000
+ }),
2001
+ class: I({ "table-text-click": e.table?.click?.callback }),
2002
+ onClick: (u) => e.table?.click?.callback?.(i),
2003
+ innerHTML: e.table?.format ? e.table?.format(i) : i[e.key]
2004
+ }, null, 14, lt))
2005
+ ])
2006
+ ], 64))
1901
2007
  ], 64))
1902
- ], 64))
1903
- ]),
1904
- _: 2
1905
- }, 1040, ["prop", "label"])) : C("", !0)
2008
+ ]),
2009
+ _: 2
2010
+ }, 1040, ["prop", "label"])) : v("", !0)
2011
+ ], 64)) : v("", !0)
1906
2012
  ], 64))), 128);
1907
2013
  };
1908
2014
  }
1909
- }), Ze = {
2015
+ }), it = {
1910
2016
  class: "row form-item-content",
1911
2017
  style: { width: "100%" }
1912
- }, xe = { class: "col column form-item-content-item" }, _e = { class: "col" }, et = ["innerHTML"], tt = /* @__PURE__ */ q({
2018
+ }, rt = { class: "col column form-item-content-item" }, st = { class: "col" }, dt = ["innerHTML"], ut = /* @__PURE__ */ Q({
1913
2019
  __name: "formColumn",
1914
2020
  props: {
1915
2021
  conf: {},
1916
2022
  item: {}
1917
2023
  },
1918
2024
  setup(n) {
1919
- return (a, p) => (f(), g(o(Z), {
1920
- label: a.item.item.text?.form?.label ?? a.item.item.label,
1921
- prop: a.item.item.key,
1922
- "label-width": a.item.item.text?.form?.label == "" ? 0 : a.item.item.form?.labelWidth || a.conf.option.form?.labelWidth
2025
+ return (o, p) => (f(), g(a(ee), {
2026
+ label: o.item.item.text?.form?.label ?? o.item.item.label,
2027
+ prop: o.item.item.key,
2028
+ "label-width": o.item.item.text?.form?.label == "" ? 0 : o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
1923
2029
  }, {
1924
2030
  default: y(() => [
1925
- M("div", Ze, [
1926
- v(a.$slots, "form-" + a.item.item.key + "-start", {
1927
- row: a.conf.update.form,
1928
- item: a.item.item
2031
+ E("div", it, [
2032
+ C(o.$slots, "form-" + o.item.item.key + "-start", {
2033
+ row: o.conf.update.form,
2034
+ item: o.item.item
1929
2035
  }),
1930
- M("div", xe, [
1931
- M("div", _e, [
1932
- v(a.$slots, "form-" + a.item.item.key, {
1933
- row: a.conf.update.form,
1934
- item: a.item.item
2036
+ E("div", rt, [
2037
+ E("div", st, [
2038
+ C(o.$slots, "form-" + o.item.item.key, {
2039
+ row: o.conf.update.form,
2040
+ item: o.item.item
1935
2041
  }, () => [
1936
- a.item.item.type === "input" ? (f(), g(o(X), V({
2042
+ o.item.item.type === "input" ? (f(), g(a(Z), V({
1937
2043
  key: 0,
1938
- modelValue: a.conf.update.form[a.item.item.key],
1939
- "onUpdate:modelValue": p[0] || (p[0] = (s) => a.conf.update.form[a.item.item.key] = s)
1940
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1941
- disabled: a.conf.update.getDisabled(a.item.item)
1942
- }), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "switch" ? (f(), g(o(G), V({
2044
+ modelValue: o.conf.update.form[o.item.item.key],
2045
+ "onUpdate:modelValue": p[0] || (p[0] = (s) => o.conf.update.form[o.item.item.key] = s)
2046
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2047
+ disabled: o.conf.update.getDisabled(o.item.item)
2048
+ }), J({ _: 2 }, [
2049
+ o.item.item.options?.input?.prepend ? {
2050
+ name: "prepend",
2051
+ fn: y(() => [
2052
+ $(O(typeof o.item.item.options?.input?.prepend == "function" ? o.item.item.options?.input?.prepend(o.conf.update.form) : o.item.item.options?.input?.prepend), 1)
2053
+ ]),
2054
+ key: "0"
2055
+ } : void 0
2056
+ ]), 1040, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (f(), g(a(Y), V({
1943
2057
  key: 1,
1944
- modelValue: a.conf.update.form[a.item.item.key],
1945
- "onUpdate:modelValue": p[1] || (p[1] = (s) => a.conf.update.form[a.item.item.key] = s)
1946
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1947
- disabled: a.conf.update.getDisabled(a.item.item)
1948
- }), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "select" ? (f(), g(o(J), V({
2058
+ modelValue: o.conf.update.form[o.item.item.key],
2059
+ "onUpdate:modelValue": p[1] || (p[1] = (s) => o.conf.update.form[o.item.item.key] = s)
2060
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2061
+ disabled: o.conf.update.getDisabled(o.item.item)
2062
+ }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (f(), g(a(q), V({
1949
2063
  key: 2,
1950
- modelValue: a.conf.update.form[a.item.item.key],
1951
- "onUpdate:modelValue": p[2] || (p[2] = (s) => a.conf.update.form[a.item.item.key] = s)
1952
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1953
- disabled: a.conf.update.getDisabled(a.item.item),
2064
+ modelValue: o.conf.update.form[o.item.item.key],
2065
+ "onUpdate:modelValue": p[2] || (p[2] = (s) => o.conf.update.form[o.item.item.key] = s)
2066
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2067
+ disabled: o.conf.update.getDisabled(o.item.item),
1954
2068
  style: { width: "100%" }
1955
2069
  }), {
1956
2070
  default: y(() => [
1957
- (f(!0), w(z, null, F(a.conf.update.getBind(a.item.item).data, (s) => (f(), g(o(H), {
2071
+ (f(!0), b(D, null, B(o.conf.update.getBind(o.item.item).data, (s) => (f(), g(a(H), {
1958
2072
  key: s.value,
1959
2073
  label: s.label,
1960
2074
  value: s.value
1961
2075
  }, null, 8, ["label", "value"]))), 128))
1962
2076
  ]),
1963
2077
  _: 1
1964
- }, 16, ["modelValue", "disabled"])) : a.item.item.type === "radio" ? (f(), g(o(re), V({
2078
+ }, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (f(), g(a(se), V({
1965
2079
  key: 3,
1966
- modelValue: a.conf.update.form[a.item.item.key],
1967
- "onUpdate:modelValue": p[3] || (p[3] = (s) => a.conf.update.form[a.item.item.key] = s)
1968
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1969
- disabled: a.conf.update.getDisabled(a.item.item),
2080
+ modelValue: o.conf.update.form[o.item.item.key],
2081
+ "onUpdate:modelValue": p[3] || (p[3] = (s) => o.conf.update.form[o.item.item.key] = s)
2082
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2083
+ disabled: o.conf.update.getDisabled(o.item.item),
1970
2084
  style: { width: "100%" }
1971
2085
  }), {
1972
2086
  default: y(() => [
1973
- (f(!0), w(z, null, F(a.conf.update.getBind(a.item.item).data, (s) => (f(), g(o(se), {
2087
+ (f(!0), b(D, null, B(o.conf.update.getBind(o.item.item).data, (s) => (f(), g(a(de), {
1974
2088
  key: s.value,
1975
2089
  label: s.label,
1976
2090
  value: s.value
1977
2091
  }, null, 8, ["label", "value"]))), 128))
1978
2092
  ]),
1979
2093
  _: 1
1980
- }, 16, ["modelValue", "disabled"])) : a.item.item.type === "list" ? (f(), g(ne, V({
2094
+ }, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (f(), g(ie, V({
1981
2095
  key: 4,
1982
- row: a.conf.update.form,
1983
- field: a.item.item.key
1984
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1985
- disabled: a.conf.update.getDisabled(a.item.item),
2096
+ row: o.conf.update.form,
2097
+ field: o.item.item.key
2098
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2099
+ disabled: o.conf.update.getDisabled(o.item.item),
1986
2100
  style: { width: "100%" }
1987
- }), null, 16, ["row", "field", "disabled"])) : a.item.item.type === "treeSelect" ? (f(), g(o(de), V({
2101
+ }), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (f(), g(a(ue), V({
1988
2102
  key: 5,
1989
- modelValue: a.conf.update.form[a.item.item.key],
1990
- "onUpdate:modelValue": p[4] || (p[4] = (s) => a.conf.update.form[a.item.item.key] = s)
1991
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1992
- disabled: a.conf.update.getDisabled(a.item.item),
2103
+ modelValue: o.conf.update.form[o.item.item.key],
2104
+ "onUpdate:modelValue": p[4] || (p[4] = (s) => o.conf.update.form[o.item.item.key] = s)
2105
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2106
+ disabled: o.conf.update.getDisabled(o.item.item),
1993
2107
  style: { width: "100%" }
1994
- }), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "datetime" ? (f(), g(o(ae), V({
2108
+ }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (f(), g(a(le), V({
1995
2109
  key: 6,
1996
- modelValue: a.conf.update.form[a.item.item.key],
1997
- "onUpdate:modelValue": p[5] || (p[5] = (s) => a.conf.update.form[a.item.item.key] = s)
1998
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
1999
- disabled: a.conf.update.getDisabled(a.item.item)
2000
- }), null, 16, ["modelValue", "disabled"])) : a.item.item.type && (o(L).customComponent[a.item.item.type] || o(L).customComponent[a.item.item.type]?.form) ? (f(), g(Y(o(L).customComponent[a.item.item.type]?.form || o(L).customComponent[a.item.item.type]), V({
2110
+ modelValue: o.conf.update.form[o.item.item.key],
2111
+ "onUpdate:modelValue": p[5] || (p[5] = (s) => o.conf.update.form[o.item.item.key] = s)
2112
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2113
+ disabled: o.conf.update.getDisabled(o.item.item)
2114
+ }), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (a(L).customComponent[o.item.item.type] || a(L).customComponent[o.item.item.type]?.form) ? (f(), g(_(a(L).customComponent[o.item.item.type]?.form || a(L).customComponent[o.item.item.type]), V({
2001
2115
  key: 7,
2002
- modelValue: a.conf.update.form[a.item.item.key],
2003
- "onUpdate:modelValue": p[6] || (p[6] = (s) => a.conf.update.form[a.item.item.key] = s)
2004
- }, a.conf.update.getBind(a.item.item), U(a.conf.update.getOn(a.item.item)), {
2005
- disabled: a.conf.update.getDisabled(a.item.item)
2006
- }), null, 16, ["modelValue", "disabled"])) : C("", !0)
2116
+ modelValue: o.conf.update.form[o.item.item.key],
2117
+ "onUpdate:modelValue": p[6] || (p[6] = (s) => o.conf.update.form[o.item.item.key] = s)
2118
+ }, o.conf.update.getBind(o.item.item), z(o.conf.update.getOn(o.item.item)), {
2119
+ disabled: o.conf.update.getDisabled(o.item.item)
2120
+ }), null, 16, ["modelValue", "disabled"])) : v("", !0)
2007
2121
  ]),
2008
- v(a.$slots, "form-" + a.item.item.key + "-right", {
2009
- row: a.conf.update.form,
2010
- item: a.item.item
2122
+ C(o.$slots, "form-" + o.item.item.key + "-right", {
2123
+ row: o.conf.update.form,
2124
+ item: o.item.item
2011
2125
  })
2012
2126
  ]),
2013
- v(a.$slots, "form-" + a.item.item.key + "-tip", {
2014
- row: a.conf.update.form,
2015
- item: a.item.item
2127
+ C(o.$slots, "form-" + o.item.item.key + "-tip", {
2128
+ row: o.conf.update.form,
2129
+ item: o.item.item
2016
2130
  }, () => [
2017
- a.item.item.form?.tipText ? (f(), w("div", {
2131
+ o.item.item.form?.tipText ? (f(), b("div", {
2018
2132
  key: 0,
2019
2133
  class: "form-tip-text",
2020
- innerHTML: typeof a.item.item.form?.tipText == "function" ? a.item.item.form?.tipText(a.conf.update.form, a.conf.update.type) : a.item.item.form?.tipText
2021
- }, null, 8, et)) : C("", !0)
2134
+ innerHTML: typeof o.item.item.form?.tipText == "function" ? o.item.item.form?.tipText(o.conf.update.form, o.conf.update.type) : o.item.item.form?.tipText
2135
+ }, null, 8, dt)) : v("", !0)
2022
2136
  ])
2023
2137
  ]),
2024
- v(a.$slots, "form-" + a.item.item.key + "-end", {
2025
- row: a.conf.update.form,
2026
- item: a.item.item
2138
+ C(o.$slots, "form-" + o.item.item.key + "-end", {
2139
+ row: o.conf.update.form,
2140
+ item: o.item.item
2027
2141
  })
2028
2142
  ])
2029
2143
  ]),
2030
2144
  _: 3
2031
2145
  }, 8, ["label", "prop", "label-width"]));
2032
2146
  }
2033
- }), ot = {
2147
+ }), ft = {}, pt = {
2148
+ xmlns: "http://www.w3.org/2000/svg",
2149
+ viewBox: "64 64 896 896"
2150
+ };
2151
+ function ct(n, o) {
2152
+ return f(), b("svg", pt, o[0] || (o[0] = [
2153
+ E("path", {
2154
+ fill: "currentColor",
2155
+ 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"
2156
+ }, null, -1)
2157
+ ]));
2158
+ }
2159
+ const mt = /* @__PURE__ */ G(ft, [["render", ct]]), ht = {}, gt = {
2160
+ xmlns: "http://www.w3.org/2000/svg",
2161
+ viewBox: "64 64 896 896"
2162
+ };
2163
+ function yt(n, o) {
2164
+ return f(), b("svg", gt, o[0] || (o[0] = [
2165
+ E("path", {
2166
+ fill: "currentColor",
2167
+ 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"
2168
+ }, null, -1)
2169
+ ]));
2170
+ }
2171
+ const bt = /* @__PURE__ */ G(ht, [["render", yt]]), wt = {
2034
2172
  key: 0,
2035
2173
  class: "relative curd-search fit-width"
2036
- }, at = { class: "mb-10 flex justify-between items-center fit-width" }, lt = {
2174
+ }, kt = { class: "mb-10 flex justify-between items-center fit-width" }, vt = {
2037
2175
  class: "flex items-center",
2038
2176
  style: { gap: "10px" }
2039
- }, nt = { key: 0 }, it = { key: 1 }, rt = { key: 2 }, st = { class: "export-btn" }, dt = {
2177
+ }, Ct = { key: 0 }, Vt = { key: 1 }, zt = { key: 2 }, $t = { class: "export-btn" }, Dt = {
2040
2178
  key: 1,
2041
2179
  class: "export-btn"
2042
- }, ut = {
2180
+ }, Ut = {
2043
2181
  class: "flex items-center table-tools-right",
2044
2182
  style: { gap: "10px" }
2045
- }, ft = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, pt = { class: "dialog-footer" }, ct = { class: "dialog-footer" }, mt = /* @__PURE__ */ q({
2183
+ }, Et = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, Ot = { class: "dialog-footer" }, St = { class: "dialog-footer" }, Mt = /* @__PURE__ */ Q({
2046
2184
  __name: "index",
2047
2185
  props: {
2048
2186
  /**
@@ -2052,302 +2190,319 @@ const Je = /* @__PURE__ */ pe(He, [["render", We]]), qe = { class: "row flex-cen
2052
2190
  default: {}
2053
2191
  }
2054
2192
  },
2055
- setup(n, { expose: a }) {
2056
- const p = O.EDialog, s = n, l = O.isFun, { conf: e, switchConfirmRef: t, ruleFormRef: i, tableRef: u } = je(s);
2057
- return a({
2058
- conf: e
2059
- }), (h, c) => {
2060
- const d = ke("loading");
2061
- return f(), w("div", {
2193
+ setup(n, { expose: o }) {
2194
+ const p = M.EDialog, s = n, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: i, tableRef: u } = Be(s);
2195
+ return o({
2196
+ conf: t
2197
+ }), (m, c) => {
2198
+ const d = x("el-tooltip"), k = ke("loading");
2199
+ return f(), b("div", {
2062
2200
  class: I(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
2063
2201
  }, [
2064
- M("div", {
2202
+ E("div", {
2065
2203
  class: I(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
2066
2204
  style: { overflow: "hidden" }
2067
2205
  }, [
2068
- v(h.$slots, "box-left"),
2069
- M("div", {
2206
+ C(m.$slots, "box-left"),
2207
+ E("div", {
2070
2208
  class: I(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
2071
2209
  }, [
2072
- n.option.search?.show !== !1 ? (f(), w("div", ot, [
2073
- D(o(W), {
2074
- model: o(e).search.form,
2210
+ n.option.search?.show !== !1 ? (f(), b("div", wt, [
2211
+ U(a(W), {
2212
+ model: a(t).search.form,
2075
2213
  inline: "",
2076
2214
  size: n.option.size?.search
2077
2215
  }, {
2078
2216
  default: y(() => [
2079
- v(h.$slots, "search-start", {
2080
- row: o(e).search.form
2217
+ C(m.$slots, "search-start", {
2218
+ row: a(t).search.form
2081
2219
  }),
2082
- (f(!0), w(z, null, F(o(e).search.column.list, (r) => (f(), w(z, {
2220
+ (f(!0), b(D, null, B(a(t).search.column.list, (r) => (f(), b(D, {
2083
2221
  key: r.key
2084
2222
  }, [
2085
- (typeof r.show?.search == "function" ? r.show?.search(o(e).search.form) : r.show?.search) ? (f(), g(o(Z), {
2223
+ (typeof r.show?.search == "function" ? r.show?.search(a(t).search.form) : r.show?.search) ? (f(), g(a(ee), {
2086
2224
  key: 0,
2087
2225
  label: r.text?.search?.label ?? r.label
2088
2226
  }, {
2089
2227
  default: y(() => [
2090
- v(h.$slots, "search-" + r.key, {
2091
- row: o(e).search.form
2228
+ C(m.$slots, "search-" + r.key, {
2229
+ row: a(t).search.form
2092
2230
  }, () => [
2093
- r.type === "input" ? (f(), g(o(X), V({
2231
+ r.type === "input" ? (f(), g(a(Z), V({
2094
2232
  key: 0,
2095
- modelValue: o(e).search.form[r.key],
2096
- "onUpdate:modelValue": (m) => o(e).search.form[r.key] = m,
2097
- placeholder: o(e).search.getPlaceholder(r),
2233
+ modelValue: a(t).search.form[r.key],
2234
+ "onUpdate:modelValue": (h) => a(t).search.form[r.key] = h,
2235
+ placeholder: a(t).search.getPlaceholder(r),
2098
2236
  clearable: "",
2099
2237
  disabled: r.disabled?.search,
2100
2238
  ref_for: !0
2101
- }, r.options?.search?.input || r.options?.input, U(r.options?.search?.input?.on || r.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : r.type === "switch" ? (f(), g(o(J), V({
2239
+ }, r.options?.search?.input || r.options?.input, z(r.options?.search?.input?.on || r.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : r.type === "switch" ? (f(), g(a(q), V({
2102
2240
  key: 1,
2103
- modelValue: o(e).search.form[r.key],
2104
- "onUpdate:modelValue": (m) => o(e).search.form[r.key] = m,
2105
- placeholder: o(e).search.getPlaceholder(r, o(k).tCurd("placeholderSelect")),
2241
+ modelValue: a(t).search.form[r.key],
2242
+ "onUpdate:modelValue": (h) => a(t).search.form[r.key] = h,
2243
+ placeholder: a(t).search.getPlaceholder(r, a(w).tCurd("placeholderSelect")),
2106
2244
  clearable: "",
2107
2245
  disabled: r.disabled?.search,
2108
2246
  ref_for: !0
2109
- }, r.options?.search?.switch || r.options?.switch, U(r.options?.search?.switch?.on || r.options?.switch?.on || {})), {
2247
+ }, r.options?.search?.switch || r.options?.switch, z(r.options?.search?.switch?.on || r.options?.switch?.on || {})), {
2110
2248
  default: y(() => [
2111
- (f(), g(o(H), {
2249
+ (f(), g(a(H), {
2112
2250
  key: r.options?.switch?.activeValue,
2113
2251
  label: r.options?.switch?.activeText,
2114
2252
  value: r.options?.switch?.activeValue
2115
2253
  }, null, 8, ["label", "value"])),
2116
- (f(), g(o(H), {
2254
+ (f(), g(a(H), {
2117
2255
  key: r.options?.switch?.inactiveValue,
2118
2256
  label: r.options?.switch?.inactiveText,
2119
2257
  value: r.options?.switch?.inactiveValue
2120
2258
  }, null, 8, ["label", "value"]))
2121
2259
  ]),
2122
2260
  _: 2
2123
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : r.type === "select" ? (f(), g(o(J), V({
2261
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : r.type === "select" ? (f(), g(a(q), V({
2124
2262
  key: 2,
2125
- modelValue: o(e).search.form[r.key],
2126
- "onUpdate:modelValue": (m) => o(e).search.form[r.key] = m,
2127
- placeholder: o(e).search.getPlaceholder(r, o(k).tCurd("placeholderSelect")),
2263
+ modelValue: a(t).search.form[r.key],
2264
+ "onUpdate:modelValue": (h) => a(t).search.form[r.key] = h,
2265
+ placeholder: a(t).search.getPlaceholder(r, a(w).tCurd("placeholderSelect")),
2128
2266
  clearable: "",
2129
2267
  disabled: r.disabled?.search,
2130
2268
  ref_for: !0
2131
- }, r.options?.search?.select || r.options?.select, U(r.options?.search?.select?.on || r.options?.select?.on || {})), {
2269
+ }, r.options?.search?.select || r.options?.select, z(r.options?.search?.select?.on || r.options?.select?.on || {})), {
2132
2270
  default: y(() => [
2133
- (f(!0), w(z, null, F(r.options?.select?.data, (m) => (f(), g(o(H), {
2134
- key: m.value,
2135
- label: m.label,
2136
- value: m.value
2271
+ (f(!0), b(D, null, B(r.options?.select?.data, (h) => (f(), g(a(H), {
2272
+ key: h.value,
2273
+ label: h.label,
2274
+ value: h.value
2137
2275
  }, null, 8, ["label", "value"]))), 128))
2138
2276
  ]),
2139
2277
  _: 2
2140
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : r.type === "datetime" ? (f(), g(o(ae), V({
2278
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : r.type === "datetime" ? (f(), g(a(le), V({
2141
2279
  key: 3,
2142
- modelValue: o(e).search.form[r.key],
2143
- "onUpdate:modelValue": (m) => o(e).search.form[r.key] = m,
2280
+ modelValue: a(t).search.form[r.key],
2281
+ "onUpdate:modelValue": (h) => a(t).search.form[r.key] = h,
2144
2282
  disabled: r.disabled?.search,
2145
2283
  ref_for: !0
2146
- }, r.options?.search?.datetime || r.options?.datetime, U(r.options?.search?.datetime?.on || r.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r.type && o(L).customComponent[r.type] ? (f(), g(Y(o(L).customComponent[r.type]), V({
2284
+ }, r.options?.search?.datetime || r.options?.datetime, z(r.options?.search?.datetime?.on || r.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r.type && a(L).customComponent[r.type] ? (f(), g(_(a(L).customComponent[r.type]), V({
2147
2285
  key: 4,
2148
- modelValue: o(e).search.form[r.key],
2149
- "onUpdate:modelValue": (m) => o(e).search.form[r.key] = m,
2286
+ modelValue: a(t).search.form[r.key],
2287
+ "onUpdate:modelValue": (h) => a(t).search.form[r.key] = h,
2150
2288
  ref_for: !0
2151
- }, r.options?.search?.[r.type] || r.options?.[r.type], U(r.options?.search?.[r.type]?.on || r.options?.[r.type]?.on || {}), {
2289
+ }, r.options?.search?.[r.type] || r.options?.[r.type], z(r.options?.search?.[r.type]?.on || r.options?.[r.type]?.on || {}), {
2152
2290
  disabled: r.disabled?.search
2153
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
2291
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
2154
2292
  ]),
2155
- v(h.$slots, "search-" + r.key + "-right", {
2156
- row: o(e).search.form
2293
+ C(m.$slots, "search-" + r.key + "-right", {
2294
+ row: a(t).search.form
2157
2295
  })
2158
2296
  ]),
2159
2297
  _: 2
2160
- }, 1032, ["label"])) : C("", !0)
2298
+ }, 1032, ["label"])) : v("", !0)
2161
2299
  ], 64))), 128)),
2162
- v(h.$slots, "search-center", {
2163
- row: o(e).search.form
2300
+ C(m.$slots, "search-center", {
2301
+ row: a(t).search.form
2164
2302
  }),
2165
- n.option.tools?.search || n.option.tools?.reset ? (f(), g(o(Z), { key: 0 }, {
2303
+ n.option.tools?.search || n.option.tools?.reset ? (f(), g(a(ee), { key: 0 }, {
2166
2304
  default: y(() => [
2167
- n.option.tools?.search ? (f(), g(o(A), {
2305
+ n.option.tools?.search ? (f(), g(a(T), {
2168
2306
  key: 0,
2169
2307
  type: "primary",
2170
- onClick: o(e).search.submit
2308
+ onClick: a(t).search.submit
2171
2309
  }, {
2172
2310
  default: y(() => [
2173
- $(E(o(k).tCurd("search")), 1)
2311
+ $(O(a(w).tCurd("search")), 1)
2174
2312
  ]),
2175
2313
  _: 1
2176
- }, 8, ["onClick"])) : C("", !0),
2177
- n.option.tools?.reset ? (f(), g(o(A), {
2314
+ }, 8, ["onClick"])) : v("", !0),
2315
+ n.option.tools?.reset ? (f(), g(a(T), {
2178
2316
  key: 1,
2179
- onClick: o(e).search.reset
2317
+ onClick: a(t).search.reset
2180
2318
  }, {
2181
2319
  default: y(() => [
2182
- $(E(o(k).tCurd("reset")), 1)
2320
+ $(O(a(w).tCurd("reset")), 1)
2183
2321
  ]),
2184
2322
  _: 1
2185
- }, 8, ["onClick"])) : C("", !0)
2323
+ }, 8, ["onClick"])) : v("", !0)
2186
2324
  ]),
2187
2325
  _: 1
2188
- })) : C("", !0),
2189
- v(h.$slots, "search-end", {
2190
- row: o(e).search.form
2326
+ })) : v("", !0),
2327
+ C(m.$slots, "search-end", {
2328
+ row: a(t).search.form
2191
2329
  })
2192
2330
  ]),
2193
2331
  _: 3
2194
2332
  }, 8, ["model", "size"])
2195
- ])) : C("", !0),
2196
- M("div", at, [
2197
- M("div", lt, [
2198
- o(l)(n.option.tools?.add) ? (f(), w("div", nt, [
2199
- D(o(A), {
2333
+ ])) : v("", !0),
2334
+ E("div", kt, [
2335
+ E("div", vt, [
2336
+ a(l)(n.option.tools?.add) ? (f(), b("div", Ct, [
2337
+ U(a(T), {
2200
2338
  type: "primary",
2201
- onClick: c[0] || (c[0] = (r) => o(e).update.open(o(p).Add)),
2339
+ onClick: c[0] || (c[0] = (r) => a(t).update.open(a(p).Add)),
2202
2340
  size: n.option.size?.search
2203
2341
  }, {
2204
2342
  default: y(() => [
2205
- $(E(o(k).tCurd("add")), 1)
2343
+ $(O(a(w).tCurd("add")), 1)
2206
2344
  ]),
2207
2345
  _: 1
2208
2346
  }, 8, ["size"])
2209
- ])) : C("", !0),
2210
- n.option.table?.selectable && o(l)(n.option.tools?.delete) ? (f(), w("div", it, [
2211
- D(o(A), {
2347
+ ])) : v("", !0),
2348
+ n.option.table?.selectable && a(l)(n.option.tools?.delete) ? (f(), b("div", Vt, [
2349
+ U(a(T), {
2212
2350
  type: "danger",
2213
- onClick: c[1] || (c[1] = (r) => o(e).remove.open(o(e).table.selection.list)),
2351
+ onClick: c[1] || (c[1] = (r) => a(t).remove.open(a(t).table.selection.list)),
2214
2352
  size: n.option.size?.search
2215
2353
  }, {
2216
2354
  default: y(() => [
2217
- $(E(o(k).tCurd("delete")), 1)
2355
+ $(O(a(w).tCurd("delete")), 1)
2218
2356
  ]),
2219
2357
  _: 1
2220
2358
  }, 8, ["size"])
2221
- ])) : C("", !0),
2222
- n.option.tools?.expand ? (f(), w("div", rt, [
2223
- D(o(A), {
2359
+ ])) : v("", !0),
2360
+ n.option.tools?.expand ? (f(), b("div", zt, [
2361
+ U(a(T), {
2224
2362
  type: "warning",
2225
- onClick: c[2] || (c[2] = (r) => o(e).table.expand.all()),
2363
+ onClick: c[2] || (c[2] = (r) => a(t).table.expand.all()),
2226
2364
  size: n.option.size?.search
2227
2365
  }, {
2228
2366
  default: y(() => [
2229
- $(E(o(k).tCurd("expandCollapse")), 1)
2367
+ $(O(a(w).tCurd("expandCollapse")), 1)
2230
2368
  ]),
2231
2369
  _: 1
2232
2370
  }, 8, ["size"])
2233
- ])) : C("", !0),
2234
- n.option.tools?.export?.show ? (f(), w(z, { key: 3 }, [
2235
- n.option.tools?.export?.dropdown?.show ? (f(), g(o(he), {
2371
+ ])) : v("", !0),
2372
+ n.option.tools?.export?.show ? (f(), b(D, { key: 3 }, [
2373
+ n.option.tools?.export?.dropdown?.show ? (f(), g(a(he), {
2236
2374
  key: 0,
2237
- onCommand: o(e).export.click
2375
+ onCommand: a(t).export.click
2238
2376
  }, {
2239
2377
  dropdown: y(() => [
2240
- D(o(ge), {
2378
+ U(a(ge), {
2241
2379
  size: n.option.size?.search
2242
2380
  }, {
2243
2381
  default: y(() => [
2244
- n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable || o(l)(n.option.tools?.delete)) ? (f(), g(o(_), {
2382
+ n.option.tools?.export?.dropdown?.select && (n.option.table?.selectable || a(l)(n.option.tools?.delete)) ? (f(), g(a(te), {
2245
2383
  key: 0,
2246
2384
  command: "select"
2247
2385
  }, {
2248
2386
  default: y(() => [
2249
- $(E(o(k).tCurd("exportSelect")), 1)
2387
+ $(O(a(w).tCurd("exportSelect")), 1)
2250
2388
  ]),
2251
2389
  _: 1
2252
- })) : C("", !0),
2253
- n.option.tools?.export?.dropdown?.page ? (f(), g(o(_), {
2390
+ })) : v("", !0),
2391
+ n.option.tools?.export?.dropdown?.page ? (f(), g(a(te), {
2254
2392
  key: 1,
2255
2393
  command: "page"
2256
2394
  }, {
2257
2395
  default: y(() => [
2258
- $(E(o(k).tCurd("exportPage")), 1)
2396
+ $(O(a(w).tCurd("exportPage")), 1)
2259
2397
  ]),
2260
2398
  _: 1
2261
- })) : C("", !0),
2262
- n.option.tools?.export?.dropdown?.all ? (f(), g(o(_), {
2399
+ })) : v("", !0),
2400
+ n.option.tools?.export?.dropdown?.all ? (f(), g(a(te), {
2263
2401
  key: 2,
2264
2402
  command: "all"
2265
2403
  }, {
2266
2404
  default: y(() => [
2267
- $(E(o(k).tCurd("exportAll")), 1)
2405
+ $(O(a(w).tCurd("exportAll")), 1)
2268
2406
  ]),
2269
2407
  _: 1
2270
- })) : C("", !0)
2408
+ })) : v("", !0)
2271
2409
  ]),
2272
2410
  _: 1
2273
2411
  }, 8, ["size"])
2274
2412
  ]),
2275
2413
  default: y(() => [
2276
- M("div", st, [
2277
- D(o(A), {
2414
+ E("div", $t, [
2415
+ U(a(T), {
2278
2416
  type: "warning",
2279
- loading: o(e).export.loading,
2417
+ loading: a(t).export.loading,
2280
2418
  size: n.option.size?.search
2281
2419
  }, {
2282
2420
  default: y(() => [
2283
- $(E(o(k).tCurd("export")), 1)
2421
+ $(O(a(w).tCurd("export")), 1)
2284
2422
  ]),
2285
2423
  _: 1
2286
2424
  }, 8, ["loading", "size"])
2287
2425
  ])
2288
2426
  ]),
2289
2427
  _: 1
2290
- }, 8, ["onCommand"])) : (f(), w("div", dt, [
2291
- D(o(A), {
2428
+ }, 8, ["onCommand"])) : (f(), b("div", Dt, [
2429
+ U(a(T), {
2292
2430
  type: "warning",
2293
- loading: o(e).export.loading,
2431
+ loading: a(t).export.loading,
2294
2432
  size: n.option.size?.search,
2295
- onClick: c[3] || (c[3] = (r) => o(e).export.run.start("all"))
2433
+ onClick: c[3] || (c[3] = (r) => a(t).export.run.start("all"))
2296
2434
  }, {
2297
2435
  default: y(() => [
2298
- $(E(o(k).tCurd("export")), 1)
2436
+ $(O(a(w).tCurd("export")), 1)
2299
2437
  ]),
2300
2438
  _: 1
2301
2439
  }, 8, ["loading", "size"])
2302
2440
  ]))
2303
- ], 64)) : C("", !0),
2304
- v(h.$slots, "tools-left")
2441
+ ], 64)) : v("", !0),
2442
+ C(m.$slots, "tools-left")
2305
2443
  ]),
2306
- M("div", ut, [
2307
- v(h.$slots, "tools-right"),
2308
- o(e).page.showTools ? (f(), g(o(ie), V({
2444
+ E("div", Ut, [
2445
+ C(m.$slots, "tools-right"),
2446
+ a(t).page.showTools ? (f(), g(a(re), V({
2309
2447
  key: 0,
2310
- "current-page": o(e).page.num,
2311
- "onUpdate:currentPage": c[4] || (c[4] = (r) => o(e).page.num = r),
2312
- "page-size": o(e).page.size,
2313
- "onUpdate:pageSize": c[5] || (c[5] = (r) => o(e).page.size = r),
2448
+ "current-page": a(t).page.num,
2449
+ "onUpdate:currentPage": c[4] || (c[4] = (r) => a(t).page.num = r),
2450
+ "page-size": a(t).page.size,
2451
+ "onUpdate:pageSize": c[5] || (c[5] = (r) => a(t).page.size = r),
2314
2452
  background: "",
2315
- "page-sizes": o(e).page.sizeList,
2316
- "pager-count": o(e).page.pagerCount,
2317
- layout: o(e).page.layout,
2318
- total: o(e).page.total,
2453
+ "page-sizes": a(t).page.sizeList,
2454
+ "pager-count": a(t).page.pagerCount,
2455
+ layout: a(t).page.layout,
2456
+ total: a(t).page.total,
2319
2457
  size: n.option.size?.table,
2320
- onSizeChange: o(e).table.getList,
2321
- onCurrentChange: o(e).table.getList
2322
- }, n.option.page?.pagination || {}, U(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0),
2323
- n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (f(), w("div", {
2458
+ onSizeChange: a(t).table.getList,
2459
+ onCurrentChange: a(t).table.getList
2460
+ }, 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"])) : v("", !0),
2461
+ n.option.tools?.expandColumn === void 0 || n.option.tools?.expandColumn ? (f(), g(d, {
2324
2462
  key: 1,
2463
+ effect: "dark",
2464
+ content: a(t).table.header.group.expand ? a(w).tCurd("mergeColumn") : a(w).tCurd("expandColumn"),
2465
+ placement: "top"
2466
+ }, {
2467
+ default: y(() => [
2468
+ E("div", {
2469
+ class: I(["refresh-btn", [n.option.size?.search]]),
2470
+ onClick: c[6] || (c[6] = //@ts-ignore
2471
+ (...r) => a(t).table.header.group.toggleExpandAll && a(t).table.header.group.toggleExpandAll(...r))
2472
+ }, [
2473
+ a(t).table.header.group.expand ? (f(), g(mt, { key: 0 })) : (f(), g(bt, { key: 1 }))
2474
+ ], 2)
2475
+ ]),
2476
+ _: 1
2477
+ }, 8, ["content"])) : v("", !0),
2478
+ n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (f(), b("div", {
2479
+ key: 2,
2325
2480
  class: I(["refresh-btn", [n.option.size?.search]]),
2326
- onClick: c[6] || (c[6] = //@ts-ignore
2327
- (...r) => o(e).table.getList && o(e).table.getList(...r))
2481
+ onClick: c[7] || (c[7] = //@ts-ignore
2482
+ (...r) => a(t).table.getList && a(t).table.getList(...r))
2328
2483
  }, [
2329
- D(Ke)
2330
- ], 2)) : C("", !0)
2484
+ U(Ke)
2485
+ ], 2)) : v("", !0)
2331
2486
  ])
2332
2487
  ]),
2333
- M("div", {
2488
+ E("div", {
2334
2489
  class: I(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : "", n.option.table?.editMode ? "edit-mode" : ""]])
2335
2490
  }, [
2336
- M("div", {
2491
+ E("div", {
2337
2492
  class: I(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
2338
2493
  }, [
2339
- Ce((f(), g(o(ye), V({
2494
+ ve((f(), g(a(ye), V({
2340
2495
  ref_key: "tableRef",
2341
2496
  ref: u,
2342
- data: o(e).table.data,
2497
+ data: a(t).table.data,
2343
2498
  border: n.option.table?.border === void 0 ? !0 : n.option.table?.border,
2344
- onSelectionChange: o(e).table.selection.change,
2345
- onSortChange: o(e).table.sort.change,
2346
- "expand-row-keys": o(e).table.expand.rowKeys,
2347
- onExpandChange: o(e).table.expand.change
2348
- }, n.option.table, U(n.option.table?.on || {})), {
2499
+ onSelectionChange: a(t).table.selection.change,
2500
+ onSortChange: a(t).table.sort.change,
2501
+ "expand-row-keys": a(t).table.expand.rowKeys,
2502
+ onExpandChange: a(t).table.expand.change
2503
+ }, n.option.table, z(n.option.table?.on || {})), {
2349
2504
  default: y(() => [
2350
- (typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.show : n.option.table?.selectable) || o(l)(n.option.tools?.delete) || n.option.tools?.export?.show && n.option.tools?.export?.select ? (f(), g(o(te), V({
2505
+ (typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.show : n.option.table?.selectable) || a(l)(n.option.tools?.delete) || n.option.tools?.export?.show && n.option.tools?.export?.select ? (f(), g(a(ae), V({
2351
2506
  key: 0,
2352
2507
  type: "selection",
2353
2508
  width: "40",
@@ -2355,20 +2510,20 @@ const Je = /* @__PURE__ */ pe(He, [["render", We]]), qe = { class: "row flex-cen
2355
2510
  fixed: "left",
2356
2511
  "show-overflow-tooltip": !1,
2357
2512
  className: "cc1-form-selectable-column"
2358
- }, typeof n.option.table?.selectable == "object" ? n.option.table?.selectable : {}, U(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.on || {} : {})), null, 16)) : C("", !0),
2359
- D(Ye, {
2360
- conf: o(e),
2361
- columnList: o(e).table.column.list,
2513
+ }, typeof n.option.table?.selectable == "object" ? n.option.table?.selectable : {}, z(typeof n.option.table?.selectable == "object" ? n.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
2514
+ U(nt, {
2515
+ conf: a(t),
2516
+ columnList: a(t).table.column.list,
2362
2517
  option: n.option
2363
- }, oe({ _: 2 }, [
2364
- F(h.$slots, (r, m) => ({
2365
- name: m,
2366
- fn: y((b) => [
2367
- v(h.$slots, m, ve(Ve(b || {})))
2518
+ }, J({ _: 2 }, [
2519
+ B(m.$slots, (r, h) => ({
2520
+ name: h,
2521
+ fn: y((S) => [
2522
+ C(m.$slots, h, Ce(Ve(S || {})))
2368
2523
  ])
2369
2524
  }))
2370
2525
  ]), 1032, ["conf", "columnList", "option"]),
2371
- o(l)(n.option.table?.add) || o(l)(n.option.table?.update) || o(l)(n.option.table?.delete) || o(l)(n.option.table?.view) || h.$slots["table-op-left"] || h.$slots["table-op-right"] ? (f(), g(o(te), V({
2526
+ a(l)(n.option.table?.add) || a(l)(n.option.table?.update) || a(l)(n.option.table?.delete) || a(l)(n.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (f(), g(a(ae), V({
2372
2527
  key: 1,
2373
2528
  width: "auto",
2374
2529
  "max-width": "200",
@@ -2376,241 +2531,241 @@ const Je = /* @__PURE__ */ pe(He, [["render", We]]), qe = { class: "row flex-cen
2376
2531
  fixed: "right"
2377
2532
  }, n.option.table?.operate, { "show-overflow-tooltip": !1 }), {
2378
2533
  header: y(() => [
2379
- v(h.$slots, "table-header-op", {}, () => [
2380
- $(E(o(k).tCurd("operation")), 1)
2534
+ C(m.$slots, "table-header-op", {}, () => [
2535
+ $(O(a(w).tCurd("operation")), 1)
2381
2536
  ])
2382
2537
  ]),
2383
2538
  default: y(({ row: r }) => [
2384
- D(o(W), {
2539
+ U(a(W), {
2385
2540
  size: n.option.size?.table
2386
2541
  }, {
2387
2542
  default: y(() => [
2388
- v(h.$slots, "table-op-left", { row: r }),
2389
- o(e).update.type === o(p).Update && n.option.table?.inlineEdit && o(e).update.form[s.option.table?.rowKey] === r[s.option.table?.rowKey] ? (f(), w(z, { key: 0 }, [
2390
- D(o(A), {
2543
+ C(m.$slots, "table-op-left", { row: r }),
2544
+ a(t).update.type === a(p).Update && n.option.table?.inlineEdit && a(t).update.form[s.option.table?.rowKey] === r[s.option.table?.rowKey] ? (f(), b(D, { key: 0 }, [
2545
+ U(a(T), {
2391
2546
  link: "",
2392
2547
  type: "info",
2393
- onClick: o(e).update.close
2548
+ onClick: a(t).update.close
2394
2549
  }, {
2395
2550
  default: y(() => [
2396
- $(E(o(k).tCurd("cancel")), 1)
2551
+ $(O(a(w).tCurd("cancel")), 1)
2397
2552
  ]),
2398
2553
  _: 1
2399
2554
  }, 8, ["onClick"]),
2400
- D(o(A), {
2555
+ U(a(T), {
2401
2556
  link: "",
2402
2557
  type: "primary",
2403
- onClick: o(e).update.submit,
2404
- loading: o(e).update.loading
2558
+ onClick: a(t).update.submit,
2559
+ loading: a(t).update.loading
2405
2560
  }, {
2406
2561
  default: y(() => [
2407
- $(E(o(k).tCurd("confirm")), 1)
2562
+ $(O(a(w).tCurd("confirm")), 1)
2408
2563
  ]),
2409
2564
  _: 1
2410
2565
  }, 8, ["onClick", "loading"]),
2411
- v(h.$slots, "table-op-edit-right", { row: r })
2412
- ], 64)) : (f(), w(z, { key: 1 }, [
2413
- o(l)(n.option.table?.add, r) ? (f(), g(o(A), {
2566
+ C(m.$slots, "table-op-edit-right", { row: r })
2567
+ ], 64)) : (f(), b(D, { key: 1 }, [
2568
+ a(l)(n.option.table?.add, r) ? (f(), g(a(T), {
2414
2569
  key: 0,
2415
2570
  link: "",
2416
2571
  type: "primary",
2417
- onClick: (m) => o(e).update.open(o(p).Add, r)
2572
+ onClick: (h) => a(t).update.open(a(p).Add, r)
2418
2573
  }, {
2419
2574
  default: y(() => [
2420
- $(E(o(k).tCurd("add")), 1)
2575
+ $(O(a(w).tCurd("add")), 1)
2421
2576
  ]),
2422
2577
  _: 2
2423
- }, 1032, ["onClick"])) : C("", !0),
2424
- o(l)(n.option.table?.view, r) ? (f(), g(o(A), {
2578
+ }, 1032, ["onClick"])) : v("", !0),
2579
+ a(l)(n.option.table?.view, r) ? (f(), g(a(T), {
2425
2580
  key: 1,
2426
2581
  link: "",
2427
2582
  type: "primary",
2428
- onClick: (m) => o(e).update.open(o(p).View, r)
2583
+ onClick: (h) => a(t).update.open(a(p).View, r)
2429
2584
  }, {
2430
2585
  default: y(() => [
2431
- $(E(o(k).tCurd("view")), 1)
2586
+ $(O(a(w).tCurd("view")), 1)
2432
2587
  ]),
2433
2588
  _: 2
2434
- }, 1032, ["onClick"])) : C("", !0),
2435
- o(l)(n.option.table?.update, r) ? (f(), g(o(A), {
2589
+ }, 1032, ["onClick"])) : v("", !0),
2590
+ a(l)(n.option.table?.update, r) ? (f(), g(a(T), {
2436
2591
  key: 2,
2437
2592
  link: "",
2438
2593
  type: "warning",
2439
- onClick: (m) => o(e).update.open(o(p).Update, r)
2594
+ onClick: (h) => a(t).update.open(a(p).Update, r)
2440
2595
  }, {
2441
2596
  default: y(() => [
2442
- $(E(o(k).tCurd("edit")), 1)
2597
+ $(O(a(w).tCurd("edit")), 1)
2443
2598
  ]),
2444
2599
  _: 2
2445
- }, 1032, ["onClick"])) : C("", !0),
2446
- o(l)(n.option.table?.delete, r) ? (f(), g(o(A), {
2600
+ }, 1032, ["onClick"])) : v("", !0),
2601
+ a(l)(n.option.table?.delete, r) ? (f(), g(a(T), {
2447
2602
  key: 3,
2448
2603
  link: "",
2449
2604
  type: "danger",
2450
- onClick: (m) => o(e).remove.open([r])
2605
+ onClick: (h) => a(t).remove.open([r])
2451
2606
  }, {
2452
2607
  default: y(() => [
2453
- $(E(o(k).tCurd("delete")), 1)
2608
+ $(O(a(w).tCurd("delete")), 1)
2454
2609
  ]),
2455
2610
  _: 2
2456
- }, 1032, ["onClick"])) : C("", !0),
2457
- v(h.$slots, "table-op-right", { row: r })
2611
+ }, 1032, ["onClick"])) : v("", !0),
2612
+ C(m.$slots, "table-op-right", { row: r })
2458
2613
  ], 64))
2459
2614
  ]),
2460
2615
  _: 2
2461
2616
  }, 1032, ["size"])
2462
2617
  ]),
2463
2618
  _: 3
2464
- }, 16)) : C("", !0)
2619
+ }, 16)) : v("", !0)
2465
2620
  ]),
2466
2621
  _: 3
2467
2622
  }, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
2468
- [d, o(e).table.loading]
2623
+ [k, a(t).table.loading]
2469
2624
  ])
2470
2625
  ], 2)
2471
2626
  ], 2),
2472
- M("div", ft, [
2473
- (n.option.page?.show === void 0 || n.option.page?.show) && !o(e).page.showTools ? (f(), g(o(ie), V({
2627
+ E("div", Et, [
2628
+ (n.option.page?.show === void 0 || n.option.page?.show) && !a(t).page.showTools ? (f(), g(a(re), V({
2474
2629
  key: 0,
2475
- "current-page": o(e).page.num,
2476
- "onUpdate:currentPage": c[7] || (c[7] = (r) => o(e).page.num = r),
2477
- "page-size": o(e).page.size,
2478
- "onUpdate:pageSize": c[8] || (c[8] = (r) => o(e).page.size = r),
2630
+ "current-page": a(t).page.num,
2631
+ "onUpdate:currentPage": c[8] || (c[8] = (r) => a(t).page.num = r),
2632
+ "page-size": a(t).page.size,
2633
+ "onUpdate:pageSize": c[9] || (c[9] = (r) => a(t).page.size = r),
2479
2634
  background: "",
2480
- "page-sizes": o(e).page.sizeList,
2481
- "pager-count": o(e).page.pagerCount,
2482
- layout: o(e).page.layout,
2483
- total: o(e).page.total,
2635
+ "page-sizes": a(t).page.sizeList,
2636
+ "pager-count": a(t).page.pagerCount,
2637
+ layout: a(t).page.layout,
2638
+ total: a(t).page.total,
2484
2639
  size: n.option.size?.table,
2485
- onSizeChange: o(e).table.getList,
2486
- onCurrentChange: o(e).table.getList
2487
- }, n.option.page?.pagination || {}, U(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0)
2640
+ onSizeChange: a(t).table.getList,
2641
+ onCurrentChange: a(t).table.getList
2642
+ }, 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"])) : v("", !0)
2488
2643
  ])
2489
2644
  ], 2),
2490
- v(h.$slots, "box-right")
2645
+ C(m.$slots, "box-right")
2491
2646
  ], 2),
2492
- D(o(ee), V({
2493
- modelValue: o(e).update.show,
2494
- "onUpdate:modelValue": c[9] || (c[9] = (r) => o(e).update.show = r),
2495
- title: o(e).update.title,
2496
- "before-close": o(e).update.close
2647
+ U(a(oe), V({
2648
+ modelValue: a(t).update.show,
2649
+ "onUpdate:modelValue": c[10] || (c[10] = (r) => a(t).update.show = r),
2650
+ title: a(t).update.title,
2651
+ "before-close": a(t).update.close
2497
2652
  }, n.option.dialog), {
2498
2653
  footer: y(() => [
2499
- M("span", pt, [
2500
- D(o(W), {
2654
+ E("span", Ot, [
2655
+ U(a(W), {
2501
2656
  size: n.option.size?.form
2502
2657
  }, {
2503
2658
  default: y(() => [
2504
- D(o(A), {
2505
- onClick: o(e).update.close
2659
+ U(a(T), {
2660
+ onClick: a(t).update.close
2506
2661
  }, {
2507
2662
  default: y(() => [
2508
- $(E(o(k).tCurd("close")), 1)
2663
+ $(O(a(w).tCurd("close")), 1)
2509
2664
  ]),
2510
2665
  _: 1
2511
2666
  }, 8, ["onClick"]),
2512
- o(e).update.type !== o(p).View ? (f(), g(o(A), {
2667
+ a(t).update.type !== a(p).View ? (f(), g(a(T), {
2513
2668
  key: 0,
2514
2669
  type: "primary",
2515
- onClick: o(e).update.submit,
2516
- loading: o(e).update.loading
2670
+ onClick: a(t).update.submit,
2671
+ loading: a(t).update.loading
2517
2672
  }, {
2518
2673
  default: y(() => [
2519
- $(E(o(k).tCurd("submit")), 1)
2674
+ $(O(a(w).tCurd("submit")), 1)
2520
2675
  ]),
2521
2676
  _: 1
2522
- }, 8, ["onClick", "loading"])) : C("", !0)
2677
+ }, 8, ["onClick", "loading"])) : v("", !0)
2523
2678
  ]),
2524
2679
  _: 1
2525
2680
  }, 8, ["size"])
2526
2681
  ])
2527
2682
  ]),
2528
2683
  default: y(() => [
2529
- D(o(W), {
2684
+ U(a(W), {
2530
2685
  ref_key: "ruleFormRef",
2531
2686
  ref: i,
2532
- model: o(e).update.form,
2533
- rules: o(e).update.rules,
2687
+ model: a(t).update.form,
2688
+ rules: a(t).update.rules,
2534
2689
  size: n.option.size?.form,
2535
2690
  class: "update-dialog-form"
2536
2691
  }, {
2537
2692
  default: y(() => [
2538
- o(e).update.showContent ? (f(!0), w(z, { key: 0 }, F(o(e).update.formColumn, (r) => (f(), w(z, null, [
2539
- o(l)(
2693
+ a(t).update.showContent ? (f(!0), b(D, { key: 0 }, B(a(t).update.formColumn, (r) => (f(), b(D, null, [
2694
+ a(l)(
2540
2695
  (() => {
2541
- const m = [], b = (T) => {
2542
- T?.item?.children ? b(T.item.children) : m.push(...T.map((B) => B.item?.show?.form));
2696
+ const h = [], S = (j) => {
2697
+ j?.item?.children ? S(j.item.children) : h.push(...j.map((F) => F.item?.show?.form));
2543
2698
  };
2544
- return b(r), m;
2699
+ return S(r), h;
2545
2700
  })(),
2546
- o(e).update.form,
2547
- o(e).update.type
2548
- ) ? (f(), w("div", {
2701
+ a(t).update.form,
2702
+ a(t).update.type
2703
+ ) ? (f(), b("div", {
2549
2704
  key: 0,
2550
2705
  class: I(["row curd-row", {
2551
2706
  stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
2552
2707
  }])
2553
2708
  }, [
2554
- v(h.$slots, "form-start", {
2555
- row: o(e).update.form
2709
+ C(m.$slots, "form-start", {
2710
+ row: a(t).update.form
2556
2711
  }),
2557
- (f(!0), w(z, null, F(r, (m) => (f(), w(z, null, [
2558
- o(l)(m.item.show?.form, o(e).update.form, o(e).update.type) ? (f(), w("div", {
2712
+ (f(!0), b(D, null, B(r, (h) => (f(), b(D, null, [
2713
+ a(l)(h.item.show?.form, a(t).update.form, a(t).update.type) ? (f(), b("div", {
2559
2714
  key: 0,
2560
- class: I([m.item.form.span > 0 ? `col-${o(e).getColumnSpan(m, r)}` : "col", `form-item-col-${m.item.key}`])
2715
+ class: I([h.item.form.span > 0 ? `col-${a(t).getColumnSpan(h, r)}` : "col", `form-item-col-${h.item.key}`])
2561
2716
  }, [
2562
- (f(!0), w(z, null, F(m.item.children ? m.children : [m], (b) => (f(), g(tt, {
2563
- key: b.item.key,
2564
- conf: o(e),
2565
- item: b
2566
- }, oe({ _: 2 }, [
2567
- F(h.$slots, (T, B) => ({
2568
- name: B,
2569
- fn: y((j) => [
2570
- v(h.$slots, B, V({ ref_for: !0 }, j || {}))
2717
+ (f(!0), b(D, null, B(h.item.children ? h.children : [h], (S) => (f(), g(ut, {
2718
+ key: S.item.key,
2719
+ conf: a(t),
2720
+ item: S
2721
+ }, J({ _: 2 }, [
2722
+ B(m.$slots, (j, F) => ({
2723
+ name: F,
2724
+ fn: y((R) => [
2725
+ C(m.$slots, F, V({ ref_for: !0 }, R || {}))
2571
2726
  ])
2572
2727
  }))
2573
2728
  ]), 1032, ["conf", "item"]))), 128))
2574
- ], 2)) : C("", !0)
2729
+ ], 2)) : v("", !0)
2575
2730
  ], 64))), 256)),
2576
- v(h.$slots, "form-end", {
2577
- row: o(e).update.form
2731
+ C(m.$slots, "form-end", {
2732
+ row: a(t).update.form
2578
2733
  })
2579
- ], 2)) : C("", !0)
2580
- ], 64))), 256)) : C("", !0)
2734
+ ], 2)) : v("", !0)
2735
+ ], 64))), 256)) : v("", !0)
2581
2736
  ]),
2582
2737
  _: 3
2583
2738
  }, 8, ["model", "rules", "size"])
2584
2739
  ]),
2585
2740
  _: 3
2586
2741
  }, 16, ["modelValue", "title", "before-close"]),
2587
- D(o(ee), {
2588
- modelValue: o(e).remove.show,
2589
- "onUpdate:modelValue": c[10] || (c[10] = (r) => o(e).remove.show = r),
2590
- title: o(e).remove.title,
2742
+ U(a(oe), {
2743
+ modelValue: a(t).remove.show,
2744
+ "onUpdate:modelValue": c[11] || (c[11] = (r) => a(t).remove.show = r),
2745
+ title: a(t).remove.title,
2591
2746
  "close-on-click-modal": !1
2592
2747
  }, {
2593
2748
  footer: y(() => [
2594
- M("span", ct, [
2595
- D(o(W), {
2749
+ E("span", St, [
2750
+ U(a(W), {
2596
2751
  size: n.option.size?.form
2597
2752
  }, {
2598
2753
  default: y(() => [
2599
- D(o(A), {
2600
- onClick: o(e).remove.close
2754
+ U(a(T), {
2755
+ onClick: a(t).remove.close
2601
2756
  }, {
2602
2757
  default: y(() => [
2603
- $(E(o(k).tCurd("close")), 1)
2758
+ $(O(a(w).tCurd("close")), 1)
2604
2759
  ]),
2605
2760
  _: 1
2606
2761
  }, 8, ["onClick"]),
2607
- D(o(A), {
2762
+ U(a(T), {
2608
2763
  type: "danger",
2609
- onClick: o(e).remove.submit,
2610
- loading: o(e).remove.loading
2764
+ onClick: a(t).remove.submit,
2765
+ loading: a(t).remove.loading
2611
2766
  }, {
2612
2767
  default: y(() => [
2613
- $(E(o(k).tCurd("confirmDelete")), 1)
2768
+ $(O(a(w).tCurd("confirmDelete")), 1)
2614
2769
  ]),
2615
2770
  _: 1
2616
2771
  }, 8, ["onClick", "loading"])
@@ -2620,84 +2775,84 @@ const Je = /* @__PURE__ */ pe(He, [["render", We]]), qe = { class: "row flex-cen
2620
2775
  ])
2621
2776
  ]),
2622
2777
  default: y(() => [
2623
- M("div", null, E(o(k).tCurd("confirmDeleteMessage", o(e).remove.items.length)), 1)
2778
+ E("div", null, O(a(w).tCurd("confirmDeleteMessage", a(t).remove.items.length)), 1)
2624
2779
  ]),
2625
2780
  _: 1
2626
2781
  }, 8, ["modelValue", "title"]),
2627
- D(Be, {
2782
+ U(je, {
2628
2783
  ref_key: "switchConfirmRef",
2629
- ref: t,
2784
+ ref: e,
2630
2785
  size: n.option.size?.form
2631
2786
  }, null, 8, ["size"])
2632
2787
  ], 2);
2633
2788
  };
2634
2789
  }
2635
2790
  });
2636
- class wt {
2791
+ class Lt {
2637
2792
  /**
2638
2793
  * 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
2639
2794
  *
2640
2795
  * @param href - 文件的远程地址
2641
2796
  * @param name - 下载后的文件名,默认 `'download.png'`
2642
2797
  */
2643
- static async download(a, p = "download.png") {
2798
+ static async download(o, p = "download.png") {
2644
2799
  const s = document.createElement("a");
2645
- s.style.display = "none", s.href = a, s.setAttribute("download", p), typeof s.download > "u" && s.setAttribute("target", "_blank"), document.body.appendChild(s), s.click(), document.body.removeChild(s), window.URL.revokeObjectURL(a);
2800
+ s.style.display = "none", s.href = o, s.setAttribute("download", p), typeof s.download > "u" && s.setAttribute("target", "_blank"), document.body.appendChild(s), s.click(), document.body.removeChild(s), window.URL.revokeObjectURL(o);
2646
2801
  }
2647
2802
  /**
2648
2803
  * 将json对象或者json数组导出为json文件保存
2649
2804
  * @param data
2650
2805
  * @param name
2651
2806
  */
2652
- static exportJSONFile = (a, p) => {
2653
- const s = new Blob([JSON.stringify(a)], { type: "application/json" }), l = URL.createObjectURL(s), e = document.createElement("a");
2654
- e.href = l, e.download = `${p || "config"}.json`, e.click();
2807
+ static exportJSONFile = (o, p) => {
2808
+ const s = new Blob([JSON.stringify(o)], { type: "application/json" }), l = URL.createObjectURL(s), t = document.createElement("a");
2809
+ t.href = l, t.download = `${p || "config"}.json`, t.click();
2655
2810
  };
2656
2811
  /**
2657
2812
  * 导入文件内容,默认为json
2658
2813
  * @param param
2659
2814
  * @returns
2660
2815
  */
2661
- static importFile = async (a) => new Promise((p, s) => {
2816
+ static importFile = async (o) => new Promise((p, s) => {
2662
2817
  const l = document.createElement("input");
2663
2818
  l.type = "file";
2664
- const e = a?.accept || ".json";
2665
- l.accept = e, l.style.display = "none", l.onchange = (t) => {
2666
- const i = t.target.files[0];
2819
+ const t = o?.accept || ".json";
2820
+ l.accept = t, l.style.display = "none", l.onchange = (e) => {
2821
+ const i = e.target.files[0];
2667
2822
  if (!i) {
2668
- O.fail("未选择文件"), s("未选择文件");
2823
+ M.fail("未选择文件"), s("未选择文件");
2669
2824
  return;
2670
2825
  }
2671
2826
  const u = new FileReader();
2672
- u.onload = async (h) => {
2673
- const c = e == ".json" ? JSON.parse(h.target.result) : h.target.result;
2827
+ u.onload = async (m) => {
2828
+ const c = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
2674
2829
  p(c);
2675
2830
  }, u.onerror = () => {
2676
- O.fail("文件读取失败"), s("文件读取失败");
2831
+ M.fail("文件读取失败"), s("文件读取失败");
2677
2832
  }, u.readAsText(i), document.body.removeChild(l);
2678
2833
  }, document.body.appendChild(l), l.click();
2679
2834
  });
2680
2835
  }
2681
- const ht = (n, a) => {
2682
- if (n.component("TCurd", mt), n.component("TFormList", ne), n.component("TColumn", Ae), a?.customComponent) {
2683
- L.customComponent = a.customComponent;
2684
- for (const p in a.customComponent)
2685
- n.component(p, a.customComponent[p]);
2836
+ const At = (n, o) => {
2837
+ if (n.component("TCurd", Mt), n.component("TFormList", ie), n.component("TColumn", Fe), o?.customComponent) {
2838
+ L.customComponent = o.customComponent;
2839
+ for (const p in o.customComponent)
2840
+ n.component(p, o.customComponent[p]);
2686
2841
  }
2687
- }, kt = {
2688
- install: ht
2842
+ }, jt = {
2843
+ install: At
2689
2844
  };
2690
2845
  export {
2691
2846
  K as ArrUtil,
2692
- Fe as ExcelUtil,
2693
- Ae as TColumn,
2694
- mt as TCurd,
2695
- wt as TFile,
2847
+ Te as ExcelUtil,
2848
+ Fe as TColumn,
2849
+ Mt as TCurd,
2850
+ Lt as TFile,
2696
2851
  L as TForm,
2697
- S as TFormConfig,
2698
- k as TFormI18n,
2699
- ne as TFormList,
2700
- O as TSys,
2701
- kt as default,
2702
- ht as install
2852
+ A as TFormConfig,
2853
+ w as TFormI18n,
2854
+ ie as TFormList,
2855
+ M as TSys,
2856
+ jt as default,
2857
+ At as install
2703
2858
  };