cc1-form 1.2.22 → 1.2.23

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