cc1-form 1.2.23 → 1.2.24

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