cc1-form 1.2.4 → 1.2.6

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