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