cc1-form 1.2.27 → 1.2.29

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