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