cc1-form 1.2.4 → 1.2.5

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