cc1-form 1.2.5 → 1.2.7

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