cc1-form 1.2.5 → 1.2.6

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