cc1-form 1.2.23 → 1.2.25

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