cc1-form 1.2.1 → 1.2.3

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,6 +1,6 @@
1
- import { ElMessage as ce, ElLoading as me, ElForm as N, ElFormItem as G, ElInput as Z, ElSwitch as X, ElSelect as W, ElOption as K, ElRadioGroup as re, ElRadio as se, ElTreeSelect as de, ElDatePicker as ae, ElDialog as ee, ElButton as T, ElTableColumn as te, ElDropdown as he, ElDropdownMenu as ye, ElDropdownItem as _, ElPagination as ie, ElTable as be } from "element-plus";
1
+ import { ElMessage as ce, ElLoading as me, ElForm as K, ElFormItem as G, ElInput as Z, ElSwitch as X, ElSelect as W, ElOption as N, ElRadioGroup as re, ElRadio as se, ElTreeSelect as de, ElDatePicker as ae, ElDialog as ee, ElButton as M, ElTableColumn as te, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as _, ElPagination as ie, ElTable as ye } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as J, reactive as le, onMounted as ue, resolveComponent as Y, createElementBlock as b, createCommentVNode as k, openBlock as f, renderSlot as C, createVNode as z, withCtx as m, createTextVNode as $, Fragment as S, renderList as L, createBlock as h, normalizeClass as j, normalizeStyle as fe, ref as H, unref as a, createElementVNode as F, mergeProps as v, toHandlers as D, resolveDynamicComponent as q, toDisplayString as E, getCurrentInstance as ge, createSlots as oe, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
3
+ import { defineComponent as J, reactive as le, onMounted as ue, resolveComponent as Y, createElementBlock as y, createCommentVNode as k, openBlock as u, renderSlot as C, createVNode as z, withCtx as m, createTextVNode as $, Fragment as S, renderList as A, createBlock as h, normalizeClass as j, normalizeStyle as fe, ref as H, unref as o, createElementVNode as F, mergeProps as v, toHandlers as D, resolveDynamicComponent as q, toDisplayString as O, getCurrentInstance as be, createSlots as oe, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
4
4
  class U {
5
5
  /**
6
6
  * Vue Router 实例,需在应用初始化时赋值
@@ -26,13 +26,13 @@ class U {
26
26
  * @param data 数据
27
27
  * @returns 是否显示
28
28
  */
29
- static isFun = (o, ...u) => Array.isArray(o) ? o.some((t) => typeof t == "function" ? t(...u) : t) : typeof o == "function" ? o(...u) : o;
29
+ static isFun = (a, ...f) => Array.isArray(a) ? a.some((t) => typeof t == "function" ? t(...f) : t) : typeof a == "function" ? a(...f) : a;
30
30
  /**
31
31
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
32
32
  */
33
33
  static getRouterParams = () => {
34
- const o = this.router.currentRoute.value.query || {}, u = this.router.currentRoute.value.params || {};
35
- return Object.keys(o).length ? o : Object.keys(u).length ? u : {};
34
+ const a = this.router.currentRoute.value.query || {}, f = this.router.currentRoute.value.params || {};
35
+ return Object.keys(a).length ? a : Object.keys(f).length ? f : {};
36
36
  };
37
37
  /**
38
38
  * 模块赋值
@@ -42,11 +42,11 @@ class U {
42
42
  * 加载模块
43
43
  * @param module
44
44
  */
45
- static loadModule = async (o) => {
46
- if (!U.moduleObj[o])
47
- throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
48
- const u = await U.moduleObj[o]();
49
- return u.default ?? u;
45
+ static loadModule = async (a) => {
46
+ if (!U.moduleObj[a])
47
+ throw new Error(`模块${a}未加载,请赋值如:TSys.moduleObj = { ${a}: ()=>import('${a}') }`);
48
+ const f = await U.moduleObj[a]();
49
+ return f.default ?? f;
50
50
  };
51
51
  /**
52
52
  * 提示信息对象管理
@@ -62,19 +62,19 @@ class U {
62
62
  * @param type 消息类型
63
63
  * @param options 其他选项
64
64
  */
65
- static showMessage(o, u, t = {}) {
65
+ static showMessage(a, f, t = {}) {
66
66
  const r = Date.now();
67
- if (!this.tipMessages[o] || r - this.tipMessages[o] > this.tipMessagesGap) {
68
- this.tipMessages[o] = r;
67
+ if (!this.tipMessages[a] || r - this.tipMessages[a] > this.tipMessagesGap) {
68
+ this.tipMessages[a] = r;
69
69
  const l = Object.assign(
70
70
  {
71
- message: o,
72
- type: u
71
+ message: a,
72
+ type: f
73
73
  },
74
74
  t
75
75
  );
76
76
  ce(l), setTimeout(() => {
77
- delete this.tipMessages[o];
77
+ delete this.tipMessages[a];
78
78
  }, this.tipMessagesGap);
79
79
  }
80
80
  }
@@ -83,16 +83,16 @@ class U {
83
83
  * @param content
84
84
  * @param options
85
85
  */
86
- static fail = (o, u = {}) => {
87
- this.showMessage(o, "error", u);
86
+ static fail = (a, f = {}) => {
87
+ this.showMessage(a, "error", f);
88
88
  };
89
89
  /**
90
90
  * 成功提示
91
91
  * @param content
92
92
  * @param options
93
93
  */
94
- static success = (o, u = {}) => {
95
- this.showMessage(o, "success", u);
94
+ static success = (a, f = {}) => {
95
+ this.showMessage(a, "success", f);
96
96
  };
97
97
  static loadingObj = null;
98
98
  static loadingTimer = null;
@@ -101,11 +101,11 @@ class U {
101
101
  * @param show
102
102
  * @param text
103
103
  */
104
- static loading = (o = !0, u = "Loading...") => {
104
+ static loading = (a = !0, f = "Loading...") => {
105
105
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
106
- o ? this.loadingObj = me.service({
106
+ a ? this.loadingObj = me.service({
107
107
  lock: !0,
108
- text: u,
108
+ text: f,
109
109
  background: "rgba(0, 0, 0, 0.3)"
110
110
  }) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
111
111
  }, 50);
@@ -115,46 +115,46 @@ class U {
115
115
  * @param url 地址
116
116
  * @param isCenter 是否居中
117
117
  */
118
- static openUrl = (o, u = !0) => {
119
- if (u) {
118
+ static openUrl = (a, f = !0) => {
119
+ if (f) {
120
120
  let t = screen.width / 2 - 500, r = screen.height / 2 - 800 / 2 - 30;
121
121
  window.open(
122
- o,
122
+ a,
123
123
  "_blank",
124
124
  "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + r + ", left=" + t
125
125
  );
126
126
  } else
127
- window.open(o, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
127
+ window.open(a, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
128
128
  };
129
129
  /**
130
130
  * 根据dom id截图并返回图片数据
131
131
  * @param param
132
132
  * @returns
133
133
  */
134
- static getImgPic = (o) => new Promise(async (u, t) => {
135
- let r = document.getElementById(o.id);
134
+ static getImgPic = (a) => new Promise(async (f, t) => {
135
+ let r = document.getElementById(a.id);
136
136
  const l = await U.loadModule("html2canvas");
137
137
  try {
138
138
  l(r, {
139
139
  logging: !1,
140
140
  allowTaint: !0,
141
141
  scale: window.devicePixelRatio,
142
- width: o.windowWidth,
143
- height: o.windowHeight,
144
- windowWidth: o.windowWidth,
145
- windowHeight: o.windowHeight,
142
+ width: a.windowWidth,
143
+ height: a.windowHeight,
144
+ windowWidth: a.windowWidth,
145
+ windowHeight: a.windowHeight,
146
146
  useCORS: !0,
147
147
  backgroundColor: "#ffffff00"
148
148
  }).then(function(e) {
149
149
  let s = e.toDataURL("image/png");
150
- u(s);
150
+ f(s);
151
151
  });
152
152
  } catch (e) {
153
153
  t(e);
154
154
  }
155
155
  });
156
156
  }
157
- class O {
157
+ class E {
158
158
  /**
159
159
  * 全局配置对象
160
160
  */
@@ -455,9 +455,14 @@ class O {
455
455
  options: {
456
456
  switch: {
457
457
  activeValue: !0,
458
- // activeLabel: TFormI18n.tCurd('switchOn'),
459
- inactiveValue: !1
460
- // inactiveLabel: TFormI18n.tCurd('switchOff'),
458
+ // activeText: TFormI18n.tCurd('switchOn'),
459
+ inactiveValue: !1,
460
+ // inactiveText: TFormI18n.tCurd('switchOff'),
461
+ tableConfig: {
462
+ change: !0,
463
+ confirm: !0,
464
+ loadList: !0
465
+ }
461
466
  },
462
467
  treeSelect: {
463
468
  // rowKey: props.option.table?.rowKey,
@@ -502,11 +507,11 @@ class O {
502
507
  *
503
508
  * @param config - 需要覆盖的配置项(深度 Partial)
504
509
  */
505
- static setConfig = (o) => {
506
- O.config = ObjectUtil.deepMerge(O.config, o);
510
+ static setConfig = (a) => {
511
+ E.config = ObjectUtil.deepMerge(E.config, a);
507
512
  };
508
513
  }
509
- class M {
514
+ class L {
510
515
  /**
511
516
  * 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
512
517
  *
@@ -524,8 +529,8 @@ class M {
524
529
  * @param field - 字段的 key 值
525
530
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
526
531
  */
527
- static findOptions = (o, u) => {
528
- const t = o.column.find((l) => l.key === u), r = (l) => l.replace(/-([a-z])/g, (e, s) => s.toUpperCase());
532
+ static findOptions = (a, f) => {
533
+ const t = a.column.find((l) => l.key === f), r = (l) => l.replace(/-([a-z])/g, (e, s) => s.toUpperCase());
529
534
  if (t)
530
535
  return t.options[r(t.type)];
531
536
  };
@@ -545,8 +550,8 @@ class M {
545
550
  }))
546
551
  )
547
552
  */
548
- static setOptionsData = (o, u, t) => {
549
- const r = M.findOptions(o, u);
553
+ static setOptionsData = (a, f, t) => {
554
+ const r = L.findOptions(a, f);
550
555
  r && (r.data = t);
551
556
  };
552
557
  static form = {
@@ -558,9 +563,9 @@ class M {
558
563
  * @param treeData 树形数据
559
564
  * @param option 组件配置
560
565
  */
561
- parentId: (o, u, t, r) => {
562
- const l = O.config.table.rowKey;
563
- o ? u.type === U.EDialog.Add ? (u.form.parentId = o[l], u.form.sort = o.children.length + 1) : u.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (u.form.parentId = "0", u.form.sort = t.length + 1), M.setOptionsData(r, "parentId", [{ [l]: "0", title: "根", children: t }]);
566
+ parentId: (a, f, t, r) => {
567
+ const l = E.config.table.rowKey;
568
+ a ? f.type === U.EDialog.Add ? (f.form.parentId = a[l], f.form.sort = a.children.length + 1) : f.form.parentId = a.parentId.substring(a.parentId.lastIndexOf(",") + 1) : (f.form.parentId = "0", f.form.sort = t.length + 1), L.setOptionsData(r, "parentId", [{ [l]: "0", title: "根", children: t }]);
564
569
  }
565
570
  }
566
571
  };
@@ -598,21 +603,21 @@ const Ve = {
598
603
  confirmModify: "确认修改",
599
604
  confirmSwitchMessage: "确认要修改吗?"
600
605
  };
601
- class y {
606
+ class b {
602
607
  /** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
603
- static t(o, ...u) {
604
- if (typeof o == "function")
605
- return o(...u);
606
- o = String(o);
608
+ static t(a, ...f) {
609
+ if (typeof a == "function")
610
+ return a(...f);
611
+ a = String(a);
607
612
  let t = 0;
608
- return o.replace(/{([^}]+)}/g, (r, l) => t < u.length ? String(u[t++]) : `{${l}}`);
613
+ return a.replace(/{([^}]+)}/g, (r, l) => t < f.length ? String(f[t++]) : `{${l}}`);
609
614
  }
610
- static setI18n = (o) => {
611
- y.curd = ObjectUtil.deepMerge(y.curd, o);
615
+ static setI18n = (a) => {
616
+ b.curd = ObjectUtil.deepMerge(b.curd, a);
612
617
  };
613
618
  /** 解析curd国际化值 */
614
- static tCurd(o, ...u) {
615
- return this.t(this.curd[o], ...u);
619
+ static tCurd(a, ...f) {
620
+ return this.t(this.curd[a], ...f);
616
621
  }
617
622
  /** curd表单 */
618
623
  static curd = Ve;
@@ -627,10 +632,10 @@ class P {
627
632
  * @param field 字段名
628
633
  * @param row 行数据
629
634
  */
630
- static setId = (o, u, t) => {
631
- u[o] || (u[o] = []);
632
- const r = O.config.table.rowKey;
633
- u[o].forEach((l) => {
635
+ static setId = (a, f, t) => {
636
+ f[a] || (f[a] = []);
637
+ const r = E.config.table.rowKey;
638
+ f[a].forEach((l) => {
634
639
  t.forEach((e) => {
635
640
  let s = e.default ?? "";
636
641
  e.type === "number" && (s = e.default ?? 0), e.type === "boolean" && (s = e.default ?? !1), e.type === "time" && (s = e.default ?? /* @__PURE__ */ new Date()), l[e.value] === void 0 && (l[e.value] = s);
@@ -644,19 +649,19 @@ class P {
644
649
  * @param itemFields 元素字段-如:[{label:'',value:''}]
645
650
  * @param callback 回调函数
646
651
  */
647
- static add = (o, u, t, r) => {
652
+ static add = (a, f, t, r) => {
648
653
  const l = JSONUtil.cp(t);
649
- P.setId(o, u, t);
650
- const e = O.config.table.rowKey;
651
- u[o].push(
654
+ P.setId(a, f, t);
655
+ const e = E.config.table.rowKey;
656
+ f[a].push(
652
657
  l.reduce(
653
- (s, p) => {
654
- let c = p.default ?? "";
655
- return p.type === "number" && (c = p.default ?? 0), p.type === "boolean" && (c = p.default ?? !1), p.type === "time" && (c = p.default ?? /* @__PURE__ */ new Date()), s[p.value] = c, s;
658
+ (s, c) => {
659
+ let p = c.default ?? "";
660
+ return c.type === "number" && (p = c.default ?? 0), c.type === "boolean" && (p = c.default ?? !1), c.type === "time" && (p = c.default ?? /* @__PURE__ */ new Date()), s[c.value] = p, s;
656
661
  },
657
662
  { [e]: P.getIdFun() }
658
663
  )
659
- ), r?.(u);
664
+ ), r?.(f);
660
665
  };
661
666
  /**
662
667
  * 删除数组元素
@@ -665,9 +670,9 @@ class P {
665
670
  * @param item 元素-如:{_id:''}
666
671
  * @param callback 回调函数
667
672
  */
668
- static remove = (o, u, t, r) => {
669
- const l = O.config.table.rowKey;
670
- u[o] = u[o].filter((e) => e[l] !== t[l]), r?.(u);
673
+ static remove = (a, f, t, r) => {
674
+ const l = E.config.table.rowKey;
675
+ f[a] = f[a].filter((e) => e[l] !== t[l]), r?.(f);
671
676
  };
672
677
  /**
673
678
  * 获取没有id的数据
@@ -675,10 +680,10 @@ class P {
675
680
  * @param childernField 子级字段-如:list、children
676
681
  * @returns 没有id的数据
677
682
  */
678
- static getNoIdData = (o, u) => {
679
- const t = JSONUtil.cp(o), r = O.config.table.rowKey;
683
+ static getNoIdData = (a, f) => {
684
+ const t = JSONUtil.cp(a), r = E.config.table.rowKey;
680
685
  return t.forEach((l) => {
681
- l[r] && delete l[r], u && l[u] && P.getNoIdData(l[u], u);
686
+ l[r] && delete l[r], f && l[f] && P.getNoIdData(l[f], f);
682
687
  }), t;
683
688
  };
684
689
  }
@@ -727,8 +732,8 @@ const ze = {
727
732
  }
728
733
  },
729
734
  emits: ["change"],
730
- setup(i, { emit: o }) {
731
- const u = i, t = le({
735
+ setup(i, { emit: a }) {
736
+ const f = i, t = le({
732
737
  show: !1,
733
738
  add: (l, e, s) => {
734
739
  P.add(l, e, s, () => {
@@ -742,18 +747,18 @@ const ze = {
742
747
  }
743
748
  });
744
749
  ue(() => {
745
- P.setId(u.field, u.row, u.itemFields), t.show = !0;
750
+ P.setId(f.field, f.row, f.itemFields), t.show = !0;
746
751
  });
747
- const r = o;
752
+ const r = a;
748
753
  return (l, e) => {
749
- const s = Y("el-button"), p = Y("el-input");
750
- return t.show ? (f(), b("div", ze, [
754
+ const s = Y("el-button"), c = Y("el-input");
755
+ return t.show ? (u(), y("div", ze, [
751
756
  C(l.$slots, "list-start", { row: i.row }),
752
- i.addBottom ? k("", !0) : (f(), b("div", De, [
757
+ i.addBottom ? k("", !0) : (u(), y("div", De, [
753
758
  z(s, {
754
759
  link: "",
755
760
  type: "primary",
756
- onClick: e[0] || (e[0] = (c) => t.add(i.field, i.row, i.itemFields))
761
+ onClick: e[0] || (e[0] = (p) => t.add(i.field, i.row, i.itemFields))
757
762
  }, {
758
763
  default: m(() => e[3] || (e[3] = [
759
764
  $("添加")
@@ -761,27 +766,27 @@ const ze = {
761
766
  _: 1
762
767
  })
763
768
  ])),
764
- (f(!0), b(S, null, L(i.row[i.field], (c) => (f(), b("div", $e, [
769
+ (u(!0), y(S, null, A(i.row[i.field], (p) => (u(), y("div", $e, [
765
770
  C(l.$slots, "item-start", {
766
- item: c,
771
+ item: p,
767
772
  row: i.row
768
773
  }),
769
- (f(!0), b(S, null, L(i.itemFields, (g) => (f(), h(p, {
770
- modelValue: c[g.value],
771
- "onUpdate:modelValue": (n) => c[g.value] = n,
774
+ (u(!0), y(S, null, A(i.itemFields, (g) => (u(), h(c, {
775
+ modelValue: p[g.value],
776
+ "onUpdate:modelValue": (n) => p[g.value] = n,
772
777
  style: fe({ width: i.inputWidth }),
773
778
  class: j(i.inputClass),
774
779
  placeholder: g[i.label] || g[i.value],
775
780
  onChange: e[1] || (e[1] = (n) => r("change"))
776
781
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
777
782
  C(l.$slots, "item-end", {
778
- item: c,
783
+ item: p,
779
784
  row: i.row
780
785
  }),
781
786
  z(s, {
782
787
  link: "",
783
788
  type: "danger",
784
- onClick: (g) => t.remove(i.field, i.row, c)
789
+ onClick: (g) => t.remove(i.field, i.row, p)
785
790
  }, {
786
791
  default: m(() => e[4] || (e[4] = [
787
792
  $("删除")
@@ -789,11 +794,11 @@ const ze = {
789
794
  _: 2
790
795
  }, 1032, ["onClick"])
791
796
  ]))), 256)),
792
- i.addBottom ? (f(), b("div", Se, [
797
+ i.addBottom ? (u(), y("div", Se, [
793
798
  z(s, {
794
799
  link: "",
795
800
  type: "primary",
796
- onClick: e[2] || (e[2] = (c) => t.add(i.field, i.row, i.itemFields))
801
+ onClick: e[2] || (e[2] = (p) => t.add(i.field, i.row, i.itemFields))
797
802
  }, {
798
803
  default: m(() => e[5] || (e[5] = [
799
804
  $("添加")
@@ -808,7 +813,7 @@ const ze = {
808
813
  }), Ue = {
809
814
  class: "row form-item-content",
810
815
  style: { width: "100%" }
811
- }, Ee = { class: "col" }, Oe = { class: "col" }, Fe = ["innerHTML"], Ae = /* @__PURE__ */ J({
816
+ }, Oe = { class: "col" }, Ee = { class: "col" }, Fe = ["innerHTML"], Te = /* @__PURE__ */ J({
812
817
  __name: "column",
813
818
  props: {
814
819
  /**
@@ -824,8 +829,8 @@ const ze = {
824
829
  default: ""
825
830
  }
826
831
  },
827
- setup(i, { expose: o }) {
828
- const u = U.isFun, t = U.EDialog, r = H(), l = i, e = le({
832
+ setup(i, { expose: a }) {
833
+ const f = U.isFun, t = U.EDialog, r = H(), l = i, e = le({
829
834
  rules: {},
830
835
  show: !0,
831
836
  form: {},
@@ -835,9 +840,9 @@ const ze = {
835
840
  getDisabled: (s) => e.type === t.View ? s.disabled?.view === void 0 ? !0 : s.disabled?.view : s.disabled?.[e.type === t.Add ? "create" : "update"],
836
841
  getBind: (s) => s.options?.[e.type === t.Add ? "formAdd" : "formUpdate"]?.[s.type] || s.options?.[s.type] || {},
837
842
  getOn: (s) => s.options?.[e.type === t.Add ? "formAdd" : "formUpdate"]?.[s.type]?.on || s.options?.[s.type]?.on || {},
838
- getColumnSpan: (s, p) => {
843
+ getColumnSpan: (s, c) => {
839
844
  if (s.item.form?.spanCol) {
840
- const c = l.option.form?.maxSpan || 12, g = l.option.form?.defaultSpan || c / 2, d = p.filter((V) => !U.isFun(V.item.show?.form, e.form, e.type)).reduce((V, w) => V + (w.item.form?.span || g), 0);
845
+ const p = l.option.form?.maxSpan || 12, g = l.option.form?.defaultSpan || p / 2, d = c.filter((V) => !U.isFun(V.item.show?.form, e.form, e.type)).reduce((V, w) => V + (w.item.form?.span || g), 0);
841
846
  return (s.item.form?.span || g) + d;
842
847
  }
843
848
  return s.item.form?.span;
@@ -845,22 +850,22 @@ const ze = {
845
850
  initColumnForm: () => {
846
851
  const s = l.option;
847
852
  e.formColumn = [], e.rules = {}, e.formDefault = {};
848
- const p = [], c = l.option.form?.maxSpan || 12, g = l.option.form?.defaultSpan || c / 2;
853
+ const c = [], p = l.option.form?.maxSpan || 12, g = l.option.form?.defaultSpan || p / 2;
849
854
  let n = [];
850
855
  const d = (w) => {
851
856
  if (w.children) {
852
- w.children.forEach((A) => {
853
- d(A);
857
+ w.children.forEach((T) => {
858
+ d(T);
854
859
  });
855
860
  return;
856
861
  }
857
862
  if (e.formDefault[w.key] = w.value, w.isForm && (typeof w.show?.form != "boolean" || w.show?.form)) {
858
863
  w.form = w.form || { span: g }, w.form.span = w.form.span ?? g;
859
- const A = w.form.span, B = n.reduce((Q, x) => Q + x.span, A), R = n.length;
860
- if (n.push({ item: w, span: A }), (R === 1 && n[0].span === 0 || B >= c || A === 0 && R > 1) && (p.push(n), n = []), w.rules) {
864
+ const T = w.form.span, B = n.reduce((Q, x) => Q + x.span, T), I = n.length;
865
+ if (n.push({ item: w, span: T }), (I === 1 && n[0].span === 0 || B >= p || T === 0 && I > 1) && (c.push(n), n = []), w.rules) {
861
866
  const Q = {
862
- input: y.tCurd("placeholderInput"),
863
- select: y.tCurd("placeholderSelect")
867
+ input: b.tCurd("placeholderInput"),
868
+ select: b.tCurd("placeholderSelect")
864
869
  }, x = (Q[w.type] || Q.input) + w.label;
865
870
  e.rules[w.key] = typeof w.rules == "boolean" ? [
866
871
  {
@@ -871,30 +876,30 @@ const ze = {
871
876
  ] : w.rules;
872
877
  }
873
878
  }
874
- }, V = (w, A) => {
875
- w.isForm = A, Array.isArray(w.children) && w.children.forEach((B) => V(B, A));
879
+ }, V = (w, T) => {
880
+ w.isForm = T, Array.isArray(w.children) && w.children.forEach((B) => V(B, T));
876
881
  };
877
882
  s.column.forEach((w) => {
878
883
  V(w, !0), d(w);
879
- }), n.length > 0 && p.push(n), e.formColumn = p, e.form = JSONUtil.cp(e.formDefault);
884
+ }), n.length > 0 && c.push(n), e.formColumn = c, e.form = JSONUtil.cp(e.formDefault);
880
885
  }
881
886
  });
882
- return e.initColumnForm(), o({
887
+ return e.initColumnForm(), a({
883
888
  ref: r,
884
889
  conf: e
885
- }), (s, p) => (f(), h(a(N), {
890
+ }), (s, c) => (u(), h(o(K), {
886
891
  ref_key: "ruleFormRef",
887
892
  ref: r,
888
893
  model: e.form,
889
894
  rules: e.rules
890
895
  }, {
891
896
  default: m(() => [
892
- e.show ? (f(!0), b(S, { key: 0 }, L(e.formColumn, (c, g) => (f(), b(S, { key: g }, [
893
- a(u)(
894
- c.map((n) => n.item?.show?.form),
897
+ e.show ? (u(!0), y(S, { key: 0 }, A(e.formColumn, (p, g) => (u(), y(S, { key: g }, [
898
+ o(f)(
899
+ p.map((n) => n.item?.show?.form),
895
900
  e.form,
896
901
  e.type
897
- ) ? (f(), b("div", {
902
+ ) ? (u(), y("div", {
898
903
  key: 0,
899
904
  class: j(["row curd-row", {
900
905
  stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
@@ -903,14 +908,14 @@ const ze = {
903
908
  C(s.$slots, "form-start", {
904
909
  row: e.form
905
910
  }),
906
- (f(!0), b(S, null, L(c, (n) => (f(), b(S, {
911
+ (u(!0), y(S, null, A(p, (n) => (u(), y(S, {
907
912
  key: n.item.key
908
913
  }, [
909
- a(u)(n.item.show?.form, e.form, e.type) ? (f(), b("div", {
914
+ o(f)(n.item.show?.form, e.form, e.type) ? (u(), y("div", {
910
915
  key: 0,
911
- class: j([n.item.form.span > 0 ? `col-${e.getColumnSpan(n, c)}` : "col", `form-item-col-${n.item.key}`])
916
+ class: j([n.item.form.span > 0 ? `col-${e.getColumnSpan(n, p)}` : "col", `form-item-col-${n.item.key}`])
912
917
  }, [
913
- z(a(G), {
918
+ z(o(G), {
914
919
  class: j({
915
920
  "hide-label": typeof n.item.text?.form?.label == "boolean" ? !n.item.text?.form?.label : !1
916
921
  }),
@@ -924,27 +929,27 @@ const ze = {
924
929
  row: e.form,
925
930
  item: n.item
926
931
  }),
927
- F("div", Ee, [
928
- F("div", Oe, [
932
+ F("div", Oe, [
933
+ F("div", Ee, [
929
934
  C(s.$slots, "form-" + n.item.key, {
930
935
  row: e.form,
931
936
  item: n.item
932
937
  }, () => [
933
- n.item.type === "input" ? (f(), h(a(Z), v({
938
+ n.item.type === "input" ? (u(), h(o(Z), v({
934
939
  key: 0,
935
940
  modelValue: e.form[n.item.key],
936
941
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
937
942
  ref_for: !0
938
943
  }, e.getBind(n.item), D(e.getOn(n.item)), {
939
944
  disabled: e.getDisabled(n.item)
940
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "switch" ? (f(), h(a(X), v({
945
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "switch" ? (u(), h(o(X), v({
941
946
  key: 1,
942
947
  modelValue: e.form[n.item.key],
943
948
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
944
949
  ref_for: !0
945
950
  }, e.getBind(n.item), D(e.getOn(n.item)), {
946
951
  disabled: e.getDisabled(n.item)
947
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "select" ? (f(), h(a(W), v({
952
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "select" ? (u(), h(o(W), v({
948
953
  key: 2,
949
954
  modelValue: e.form[n.item.key],
950
955
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
@@ -954,14 +959,14 @@ const ze = {
954
959
  style: { width: "100%" }
955
960
  }), {
956
961
  default: m(() => [
957
- (f(!0), b(S, null, L(n.item.options?.select?.data, (d) => (f(), h(a(K), {
962
+ (u(!0), y(S, null, A(n.item.options?.select?.data, (d) => (u(), h(o(N), {
958
963
  key: d.value,
959
964
  label: d.label,
960
965
  value: d.value
961
966
  }, null, 8, ["label", "value"]))), 128))
962
967
  ]),
963
968
  _: 2
964
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "radio" ? (f(), h(a(re), v({
969
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "radio" ? (u(), h(o(re), v({
965
970
  key: 3,
966
971
  modelValue: e.form[n.item.key],
967
972
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
@@ -971,14 +976,14 @@ const ze = {
971
976
  style: { width: "100%" }
972
977
  }), {
973
978
  default: m(() => [
974
- (f(!0), b(S, null, L(n.item.options?.radio?.data, (d) => (f(), h(a(se), {
979
+ (u(!0), y(S, null, A(n.item.options?.radio?.data, (d) => (u(), h(o(se), {
975
980
  key: d.value,
976
981
  label: d.label,
977
982
  value: d.value
978
983
  }, null, 8, ["label", "value"]))), 128))
979
984
  ]),
980
985
  _: 2
981
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "list" ? (f(), h(ne, v({
986
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "list" ? (u(), h(ne, v({
982
987
  key: 4,
983
988
  row: e.form,
984
989
  field: n.item.key,
@@ -986,7 +991,7 @@ const ze = {
986
991
  }, e.getBind(n.item), D(e.getOn(n.item)), {
987
992
  disabled: e.getDisabled(n.item),
988
993
  style: { width: "100%" }
989
- }), null, 16, ["row", "field", "disabled"])) : n.item.type === "treeSelect" ? (f(), h(a(de), v({
994
+ }), null, 16, ["row", "field", "disabled"])) : n.item.type === "treeSelect" ? (u(), h(o(de), v({
990
995
  key: 5,
991
996
  modelValue: e.form[n.item.key],
992
997
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
@@ -994,14 +999,14 @@ const ze = {
994
999
  }, e.getBind(n.item), D(e.getOn(n.item)), {
995
1000
  disabled: e.getDisabled(n.item),
996
1001
  style: { width: "100%" }
997
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "datetime" ? (f(), h(a(ae), v({
1002
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type === "datetime" ? (u(), h(o(ae), v({
998
1003
  key: 6,
999
1004
  modelValue: e.form[n.item.key],
1000
1005
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
1001
1006
  ref_for: !0
1002
1007
  }, e.getBind(n.item), D(e.getOn(n.item)), {
1003
1008
  disabled: e.getDisabled(n.item)
1004
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type && (a(M).customComponent[n.item.type] || a(M).customComponent[n.item.type]?.form) ? (f(), h(q(a(M).customComponent[n.item.type]?.form || a(M).customComponent[n.item.type]), v({
1009
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.item.type && (o(L).customComponent[n.item.type] || o(L).customComponent[n.item.type]?.form) ? (u(), h(q(o(L).customComponent[n.item.type]?.form || o(L).customComponent[n.item.type]), v({
1005
1010
  key: 7,
1006
1011
  modelValue: e.form[n.item.key],
1007
1012
  "onUpdate:modelValue": (d) => e.form[n.item.key] = d,
@@ -1019,7 +1024,7 @@ const ze = {
1019
1024
  row: e.form,
1020
1025
  item: n.item
1021
1026
  }, () => [
1022
- n.item.form?.tipText ? (f(), b("div", {
1027
+ n.item.form?.tipText ? (u(), y("div", {
1023
1028
  key: 0,
1024
1029
  class: "form-tip-text",
1025
1030
  innerHTML: typeof n.item.form?.tipText == "function" ? n.item.form?.tipText(e.form, e.type) : n.item.form?.tipText
@@ -1046,7 +1051,7 @@ const ze = {
1046
1051
  }, 8, ["model", "rules"]));
1047
1052
  }
1048
1053
  });
1049
- class Te {
1054
+ class Me {
1050
1055
  /**
1051
1056
  * 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
1052
1057
  *
@@ -1054,19 +1059,19 @@ class Te {
1054
1059
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
1055
1060
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
1056
1061
  */
1057
- static exportToExcel = async (o, u, t) => {
1058
- if (!o || o.length === 0) return;
1059
- const r = await U.loadModule("xlsx"), l = o.map((p) => {
1060
- const c = {};
1061
- return u.forEach((g) => {
1062
- c[g.label] = p[g.key];
1063
- }), c;
1062
+ static exportToExcel = async (a, f, t) => {
1063
+ if (!a || a.length === 0) return;
1064
+ const r = await U.loadModule("xlsx"), l = a.map((c) => {
1065
+ const p = {};
1066
+ return f.forEach((g) => {
1067
+ p[g.label] = c[g.key];
1068
+ }), p;
1064
1069
  }), e = r.utils.json_to_sheet(l), s = r.utils.book_new();
1065
1070
  r.utils.book_append_sheet(s, e, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, r.writeFile(s, `${t}.xlsx`);
1066
1071
  };
1067
1072
  }
1068
- const I = U.EDialog, Le = (i) => {
1069
- const o = H(), u = H(), t = le({
1073
+ const R = U.EDialog, Ae = (i) => {
1074
+ const a = H(), f = H(), t = le({
1070
1075
  option: i.option,
1071
1076
  /** 查询区域相关配置对象 */
1072
1077
  search: {
@@ -1080,7 +1085,7 @@ const I = U.EDialog, Le = (i) => {
1080
1085
  /** 搜索表单默认值 */
1081
1086
  formDefault: {},
1082
1087
  /** 获取占位符 */
1083
- getPlaceholder: (r, l = y.tCurd("placeholderInput")) => r.text?.search?.placeholder === void 0 ? `${l}${r.label}` : r.text?.search?.placeholder,
1088
+ getPlaceholder: (r, l = b.tCurd("placeholderInput")) => r.text?.search?.placeholder === void 0 ? `${l}${r.label}` : r.text?.search?.placeholder,
1084
1089
  /** 组装实际要搜索的数据对象 */
1085
1090
  getFormData: () => {
1086
1091
  let r = {};
@@ -1109,19 +1114,19 @@ const I = U.EDialog, Le = (i) => {
1109
1114
  /** 总条数 */
1110
1115
  total: 0,
1111
1116
  /** 分页控件的布局方式 */
1112
- layout: i.option.page?.layout || O.config.pagination.layout,
1117
+ layout: i.option.page?.layout || E.config.pagination.layout,
1113
1118
  /** 是否显示到工具栏 默认不显示 配置后show属性无效 */
1114
- showTools: i.option.page?.showTools || O.config.pagination.showTools,
1119
+ showTools: i.option.page?.showTools || E.config.pagination.showTools,
1115
1120
  /** 当前每页条数 */
1116
- size: i.option.page?.size || O.config.pagination.size,
1121
+ size: i.option.page?.size || E.config.pagination.size,
1117
1122
  /** 支持切换的每页条数选项 */
1118
- sizeList: i.option.page?.sizeList || O.config.pagination.pageSizes,
1123
+ sizeList: i.option.page?.sizeList || E.config.pagination.pageSizes,
1119
1124
  /** 分页器计数 */
1120
- pagerCount: i.option.page?.pagerCount || O.config.pagination.pagerCount,
1125
+ pagerCount: i.option.page?.pagerCount || E.config.pagination.pagerCount,
1121
1126
  /** 获取分页查询参数 */
1122
1127
  getQuery: (r = {}) => ({
1123
- [O.config.field.page.size]: r.size || t.page.size,
1124
- [O.config.field.page.num]: r.num || t.page.num,
1128
+ [E.config.field.page.size]: r.size || t.page.size,
1129
+ [E.config.field.page.num]: r.num || t.page.num,
1125
1130
  ...t.search.getFormData()
1126
1131
  })
1127
1132
  },
@@ -1181,7 +1186,7 @@ const I = U.EDialog, Le = (i) => {
1181
1186
  await t.initApiData("init");
1182
1187
  let l = {};
1183
1188
  if (t.table.sort.prop) {
1184
- const { props: d, order: V } = O.config.table.sort;
1189
+ const { props: d, order: V } = E.config.table.sort;
1185
1190
  l = {
1186
1191
  [d.field]: t.table.sort.prop,
1187
1192
  [V.field]: t.table.sort.order
@@ -1190,13 +1195,13 @@ const I = U.EDialog, Le = (i) => {
1190
1195
  const e = await r({
1191
1196
  ...t.page.getQuery(),
1192
1197
  ...l
1193
- }), s = O.config.field.result, p = e.data || { [s.list]: e };
1194
- let c = (Array.isArray(p[s.list]), p[s.list]);
1195
- const g = t.update.formColumn.flat(), n = JSONUtil.cp(c).map((d) => (Object.keys(d).forEach((w) => {
1196
- const A = g.find((B) => B.item.key === w);
1197
- A && ["select", "radio"].includes(A.item.type) && (A.item.table.format || (A.item.table.format = (B) => A.item.options[A.item.type].data?.find((R) => R.value == B[w])?.label || B[w]));
1198
+ }), s = E.config.field.result, c = e.data || { [s.list]: e };
1199
+ let p = (Array.isArray(c[s.list]), c[s.list]);
1200
+ const g = t.update.formColumn.flat(), n = JSONUtil.cp(p).map((d) => (Object.keys(d).forEach((w) => {
1201
+ const T = g.find((B) => B.item.key === w);
1202
+ T && ["select", "radio"].includes(T.item.type) && (T.item.table.format || (T.item.table.format = (B) => T.item.options[T.item.type].data?.find((I) => I.value == B[w])?.label || B[w]));
1198
1203
  }), d));
1199
- t.table.data = i.option.data ? await i.option.data(n, c) : n, t.page.total = p[s.total] || 0;
1204
+ t.table.data = i.option.data ? await i.option.data(n, p) : n, t.page.total = c[s.total] || 0;
1200
1205
  } catch (l) {
1201
1206
  console.error(l);
1202
1207
  } finally {
@@ -1220,8 +1225,8 @@ const I = U.EDialog, Le = (i) => {
1220
1225
  order: "",
1221
1226
  /** 排序变更回调 */
1222
1227
  change: (r) => {
1223
- O.config.table.sort.resetPage && (t.page.num = 1);
1224
- const l = O.config.table.sort;
1228
+ E.config.table.sort.resetPage && (t.page.num = 1);
1229
+ const l = E.config.table.sort;
1225
1230
  if (l.change) {
1226
1231
  l.change(r, t);
1227
1232
  return;
@@ -1240,8 +1245,8 @@ const I = U.EDialog, Le = (i) => {
1240
1245
  const s = JSONUtil.cp({
1241
1246
  data: l,
1242
1247
  columns: e
1243
- }), p = i.option.tools?.export || {};
1244
- p.before && p.before(s), Te.exportToExcel(s.data, s.columns, p.fileName);
1248
+ }), c = i.option.tools?.export || {};
1249
+ c.before && c.before(s), Me.exportToExcel(s.data, s.columns, c.fileName);
1245
1250
  },
1246
1251
  /** 获取当前选中项进行导出 */
1247
1252
  select: async () => {
@@ -1255,7 +1260,7 @@ const I = U.EDialog, Le = (i) => {
1255
1260
  return;
1256
1261
  }
1257
1262
  if (t.table.selection.list.length === 0)
1258
- throw U.fail(y.tCurd("selectDataToExport")), new Error(y.tCurd("selectDataToExport"));
1263
+ throw U.fail(b.tCurd("selectDataToExport")), new Error(b.tCurd("selectDataToExport"));
1259
1264
  return t.table.selection.list;
1260
1265
  } catch (r) {
1261
1266
  console.error(r);
@@ -1274,7 +1279,7 @@ const I = U.EDialog, Le = (i) => {
1274
1279
  return;
1275
1280
  }
1276
1281
  if (t.table.data.length === 0)
1277
- throw U.fail(y.tCurd("noData")), new Error(y.tCurd("noData"));
1282
+ throw U.fail(b.tCurd("noData")), new Error(b.tCurd("noData"));
1278
1283
  return t.table.data;
1279
1284
  } catch (r) {
1280
1285
  console.error(r);
@@ -1298,7 +1303,7 @@ const I = U.EDialog, Le = (i) => {
1298
1303
  num: 1
1299
1304
  })
1300
1305
  });
1301
- return (l.data || { [O.config.field.result.list]: l })[O.config.field.result.list];
1306
+ return (l.data || { [E.config.field.result.list]: l })[E.config.field.result.list];
1302
1307
  } catch (r) {
1303
1308
  console.error(r);
1304
1309
  } finally {
@@ -1326,7 +1331,7 @@ const I = U.EDialog, Le = (i) => {
1326
1331
  /** 弹窗loading */
1327
1332
  loading: !1,
1328
1333
  /** 当前操作类型,插入或修改 */
1329
- type: I.Add,
1334
+ type: R.Add,
1330
1335
  /** 当前操作表单数据 */
1331
1336
  form: {},
1332
1337
  /** 表单默认值 */
@@ -1334,11 +1339,11 @@ const I = U.EDialog, Le = (i) => {
1334
1339
  /** 表单所有列,二维数组结构按行分组 */
1335
1340
  formColumn: [],
1336
1341
  /** 判断是否禁用当前字段 */
1337
- getDisabled: (r) => t.update.type === I.View ? r.disabled?.view === void 0 ? !0 : r.disabled?.view : r.disabled?.[t.update.type === I.Add ? "create" : "update"],
1342
+ getDisabled: (r) => t.update.type === R.View ? r.disabled?.view === void 0 ? !0 : r.disabled?.view : r.disabled?.[t.update.type === R.Add ? "create" : "update"],
1338
1343
  /** 获取表单组件绑定属性 */
1339
- getBind: (r) => r.options?.[t.update.type === I.Add ? "formAdd" : "formUpdate"]?.[r.type] || r.options?.[r.type] || {},
1344
+ getBind: (r) => r.options?.[t.update.type === R.Add ? "formAdd" : "formUpdate"]?.[r.type] || r.options?.[r.type] || {},
1340
1345
  /** 获取表单组件事件属性 */
1341
- getOn: (r) => r.options?.[t.update.type === I.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
1346
+ getOn: (r) => r.options?.[t.update.type === R.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
1342
1347
  /** 获取表单组件绑定属性和事件 */
1343
1348
  getOptions: (r) => {
1344
1349
  try {
@@ -1375,8 +1380,8 @@ const I = U.EDialog, Le = (i) => {
1375
1380
  U.loading(!0);
1376
1381
  try {
1377
1382
  t.update.type = r, await t.initApiData("update");
1378
- const e = r === I.Add;
1379
- t.update.edit.data = l, t.update.title = y.tCurd(e ? "add" : r === I.View ? "view" : "edit"), t.update.form = JSONUtil.cp(e ? t.update.formDefault : l), await i.option.form?.openBefore?.(t.update.form, t.update), !e && i.option.table?.inlineEdit ? t.inlineEdit.open(l) : (t.update.show = !0, t.update.showContent = !0), i.option.form?.openAfter?.(t.update.form, t.update);
1383
+ const e = r === R.Add;
1384
+ t.update.edit.data = l, t.update.title = b.tCurd(e ? "add" : r === R.View ? "view" : "edit"), t.update.form = JSONUtil.cp(e ? t.update.formDefault : l), await i.option.form?.openBefore?.(t.update.form, t.update), (!i.option.table?.inlineEdit || e) && (t.update.show = !0, t.update.showContent = !0), i.option.form?.openAfter?.(t.update.form, t.update);
1380
1385
  } catch (e) {
1381
1386
  console.error(e);
1382
1387
  } finally {
@@ -1387,10 +1392,10 @@ const I = U.EDialog, Le = (i) => {
1387
1392
  /** 提交增改表单操作 */
1388
1393
  submit: () => {
1389
1394
  FunUtil.throttle(async () => {
1390
- await u.value?.validate(async (s, p) => new Promise((c, g) => {
1391
- s || (U.fail(y.tCurd("checkFormData")), g(!1)), c();
1395
+ await f.value?.validate(async (s, c) => new Promise((p, g) => {
1396
+ s || (U.fail(b.tCurd("checkFormData")), g(!1)), p();
1392
1397
  })), t.update.loading = !0;
1393
- const r = t.update.type === I.Add ? i.option.api.create : i.option.api.update;
1398
+ const r = t.update.type === R.Add ? i.option.api.create : i.option.api.update;
1394
1399
  try {
1395
1400
  await i.option.form?.submitBefore?.(t.update.form, t.update);
1396
1401
  } catch {
@@ -1402,8 +1407,8 @@ const I = U.EDialog, Le = (i) => {
1402
1407
  const e = new Set(i.option.column.filter((s) => s.type === "datetime").map((s) => s.key));
1403
1408
  Object.keys(l).forEach((s) => {
1404
1409
  if (e.has(s) && l[s] != null) {
1405
- const p = new Date(l[s]).getTime();
1406
- isNaN(p) || (l[s] = p);
1410
+ const c = new Date(l[s]).getTime();
1411
+ isNaN(c) || (l[s] = c);
1407
1412
  }
1408
1413
  });
1409
1414
  try {
@@ -1420,28 +1425,15 @@ const I = U.EDialog, Le = (i) => {
1420
1425
  },
1421
1426
  /** 关闭弹窗和内容 */
1422
1427
  close: () => {
1423
- t.update.show = !1, setTimeout(() => {
1428
+ t.update.show = !1, i.option.table?.inlineEdit && (t.update.form = {}), setTimeout(() => {
1424
1429
  t.update.showContent = !1;
1425
1430
  }, 350);
1426
1431
  }
1427
1432
  },
1428
- /** 行内编辑相关对象 */
1429
- inlineEdit: {
1430
- /** 行内编辑当前行对象 */
1431
- data: null,
1432
- /** 打开行内编辑 */
1433
- open: (r) => {
1434
- t.inlineEdit.data = r, t.update.open(I.Update, r);
1435
- },
1436
- /** 关闭行内编辑 */
1437
- close: () => {
1438
- t.inlineEdit.data = null, t.update.close();
1439
- }
1440
- },
1441
1433
  /** 删除操作弹窗与数据对象 */
1442
1434
  remove: {
1443
1435
  /** 删除弹窗标题 */
1444
- title: y.tCurd("confirmDelete"),
1436
+ title: b.tCurd("confirmDelete"),
1445
1437
  /** 删除弹窗显示控制 */
1446
1438
  show: !1,
1447
1439
  /** 待删除数据项集合 */
@@ -1455,7 +1447,7 @@ const I = U.EDialog, Le = (i) => {
1455
1447
  /** 打开删除弹窗并设置待删除项 */
1456
1448
  open: (r) => {
1457
1449
  if (r.length === 0) {
1458
- U.fail(y.tCurd("selectDataToDelete"));
1450
+ U.fail(b.tCurd("selectDataToDelete"));
1459
1451
  return;
1460
1452
  }
1461
1453
  t.remove.items = r, t.remove.show = !0;
@@ -1470,7 +1462,7 @@ const I = U.EDialog, Le = (i) => {
1470
1462
  await r({
1471
1463
  [i.option.table?.rowKey]: t.remove.items.map((l) => l[i.option.table?.rowKey]),
1472
1464
  items: t.remove.items
1473
- }), U.success(y.tCurd("operationSuccess")), t.table.data.length <= 1 && t.page.num > 1 && (t.page.num -= 1), t.remove.close(), await t.table.getList();
1465
+ }), U.success(b.tCurd("operationSuccess")), t.table.data.length <= 1 && t.page.num > 1 && (t.page.num -= 1), t.remove.close(), await t.table.getList();
1474
1466
  } catch (l) {
1475
1467
  console.error(l);
1476
1468
  } finally {
@@ -1489,22 +1481,22 @@ const I = U.EDialog, Le = (i) => {
1489
1481
  initApiData: async (r) => {
1490
1482
  const l = [], e = (s) => {
1491
1483
  if (s.children && s.children.length) {
1492
- s.children.forEach((p) => e(p));
1484
+ s.children.forEach((c) => e(c));
1493
1485
  return;
1494
1486
  }
1495
1487
  if (s.options?.[s.type]?.dataApi && s.options?.[s.type]?.dataApiConfig?.[r]) {
1496
1488
  if (t.apiDataMap[s.key] && s.options?.[s.type]?.dataApiConfig?.once) return;
1497
- const p = (async () => {
1489
+ const c = (async () => {
1498
1490
  try {
1499
- let c = await s.options?.[s.type]?.dataApi?.(t.update.form, r);
1500
- if (c) {
1491
+ let p = await s.options?.[s.type]?.dataApi?.(t.update.form, r);
1492
+ if (p) {
1501
1493
  const g = s.options?.[s.type]?.dataPath;
1502
- g && (c = ObjectUtil.getPathValue(c, g)), s.options[s.type].data = c, s.options.search[s.type].data = c, s.options.formAdd[s.type].data = c, s.options.formUpdate[s.type].data = c, t.apiDataMap[s.key] = c;
1494
+ !Array.isArray(p) && g && (p = ObjectUtil.getPathValue(p, g)), s.options[s.type].data = p, s.options.search[s.type].data = p, s.options.formAdd[s.type].data = p, s.options.formUpdate[s.type].data = p, t.apiDataMap[s.key] = p;
1503
1495
  }
1504
1496
  } catch {
1505
1497
  }
1506
1498
  })();
1507
- l.push(p);
1499
+ l.push(c);
1508
1500
  }
1509
1501
  };
1510
1502
  return i.option.column.forEach((s) => {
@@ -1513,8 +1505,8 @@ const I = U.EDialog, Le = (i) => {
1513
1505
  },
1514
1506
  /** 初始化curd配置(option默认值合并等) */
1515
1507
  initCurdConfig: () => {
1516
- const r = JSONUtil.cp(O.config);
1517
- r.table.emptyText = y.tCurd("noData"), i.option.size = i.option.size || {}, r.table.size = i.option.size.table || r.size.table, r.form.size = i.option.size.form || r.size.form, r.size.search = i.option.size.search || r.size.search;
1508
+ const r = JSONUtil.cp(E.config);
1509
+ r.table.emptyText = b.tCurd("noData"), i.option.size = i.option.size || {}, r.table.size = i.option.size.table || r.size.table, r.form.size = i.option.size.form || r.size.form, r.size.search = i.option.size.search || r.size.search;
1518
1510
  const l = ObjectUtil.deepMerge(r, i.option || {});
1519
1511
  Object.keys(l).forEach((e) => {
1520
1512
  i.option[e] = l[e];
@@ -1526,42 +1518,53 @@ const I = U.EDialog, Le = (i) => {
1526
1518
  * @returns
1527
1519
  */
1528
1520
  initColumnOptions: () => {
1529
- let r = JSONUtil.cp(O.config.columnConfig);
1530
- r.options = ObjectUtil.deepMerge(r.options, {
1531
- switch: {
1532
- activeLabel: y.tCurd("switchOn"),
1533
- inactiveLabel: y.tCurd("switchOff")
1534
- }
1535
- });
1521
+ let r = JSONUtil.cp(E.config.columnConfig);
1522
+ r.options = ObjectUtil.deepMerge(
1523
+ {
1524
+ switch: {
1525
+ activeText: b.tCurd("switchOn"),
1526
+ inactiveText: b.tCurd("switchOff")
1527
+ }
1528
+ },
1529
+ r.options
1530
+ );
1536
1531
  const l = (e) => {
1537
1532
  for (const s in r) {
1538
1533
  if (s === "table") {
1539
1534
  if (e.table = ObjectUtil.deepMerge(r.table, e.table || {}), e.children) {
1540
- e.children.forEach((c) => {
1541
- l(c);
1535
+ e.children.forEach((p) => {
1536
+ l(p);
1542
1537
  });
1543
1538
  return;
1544
1539
  }
1545
1540
  } else s === "type" ? e.type = e.type || r.type : e[s] = ObjectUtil.deepMerge(r[s], e[s] || {});
1546
- e.options = e.options || {}, e.options[e.type] = e.options[e.type] || {}, e.options[e.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
1547
- e.options[c] = e.options[c] || JSONUtil.cp(e.options), e.options[c][e.type] = e.options[c][e.type] || {}, e.options[c][e.type].size = c === "search" ? i.option.size.search : i.option.size.form;
1541
+ e.options = e.options || {}, e.options[e.type] = e.options[e.type] || {}, e.options[e.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((p) => {
1542
+ e.options[p] = e.options[p] || JSONUtil.cp(e.options), e.options[p][e.type] = e.options[p][e.type] || {}, e.options[p][e.type].size = p === "search" ? i.option.size.search : i.option.size.form;
1548
1543
  }), e.table = ObjectUtil.deepMerge(e.table, e.options[e.type].table || {});
1549
1544
  }
1550
- e.type === "switch" && (e.options.switch.tableBeforeChange = async (s, p) => {
1551
- const c = e.options?.switch;
1545
+ e.type === "switch" && (e.options.switch.tableBeforeChange = async (s, c) => {
1546
+ const p = e.options?.switch;
1552
1547
  try {
1553
- await o.value?.open({
1554
- title: y.tCurd("confirmModify"),
1555
- content: y.tCurd("confirmSwitchMessage")
1556
- }), t.table.loading = !0;
1548
+ p.tableConfig?.confirm && await a.value?.open({
1549
+ title: b.tCurd("confirmModify"),
1550
+ content: b.tCurd("confirmSwitchMessage")
1551
+ });
1557
1552
  try {
1558
- return i.option.api.update ? (await i.option.api.update({
1559
- [i.option.table?.rowKey]: p[i.option.table?.rowKey],
1560
- [s]: p[s] === c.activeValue ? c.inactiveValue : c.activeValue,
1561
- final(g, n, d) {
1562
- t.table.loading = !1;
1563
- }
1564
- }), t.table.loading = !1, U.success(y.tCurd("operationSuccess")), t.table.getList(), !0) : void 0;
1553
+ if (!i.option.api.update) return;
1554
+ const g = c[i.option.table?.rowKey];
1555
+ p.loadingMap || (p.loadingMap = {}), p.loadingMap[g] || (p.loadingMap[g] = { loading: !1 }), p.loadingMap[g].loading = !0;
1556
+ const n = c[s] === p.activeValue ? p.inactiveValue : p.activeValue, d = p.tableConfig?.api ? p.tableConfig.api : i.option.api.update;
1557
+ try {
1558
+ await d({
1559
+ ...c,
1560
+ [s]: n
1561
+ });
1562
+ } catch {
1563
+ return !1;
1564
+ } finally {
1565
+ p.loadingMap[g].loading = !1;
1566
+ }
1567
+ return U.success(b.tCurd("operationSuccess")), p.tableConfig?.loadList && (t.table.loading = !0, t.table.getList(), t.table.loading = !1), !0;
1565
1568
  } catch (g) {
1566
1569
  return console.error(g), !1;
1567
1570
  } finally {
@@ -1576,8 +1579,8 @@ const I = U.EDialog, Le = (i) => {
1576
1579
  },
1577
1580
  getColumnSpan: (r, l) => {
1578
1581
  if (r.item.form?.spanCol) {
1579
- const e = O.config.form.defaultSpan, p = l.filter((c) => !U.isFun(c.item.show?.form, t.update.form, t.update.type)).reduce((c, g) => c + (g.item.form?.span || e), 0);
1580
- return (r.item?.form.span || e) + p;
1582
+ const e = E.config.form.defaultSpan, c = l.filter((p) => !U.isFun(p.item.show?.form, t.update.form, t.update.type)).reduce((p, g) => p + (g.item.form?.span || e), 0);
1583
+ return (r.item?.form.span || e) + c;
1581
1584
  }
1582
1585
  return r.item.form.span;
1583
1586
  },
@@ -1589,27 +1592,27 @@ const I = U.EDialog, Le = (i) => {
1589
1592
  listSource: []
1590
1593
  };
1591
1594
  const l = [], e = i.option.form?.maxSpan || 12, s = i.option.form?.defaultSpan || e / 2;
1592
- let p = [];
1593
- const c = (d) => {
1595
+ let c = [];
1596
+ const p = (d) => {
1594
1597
  if (d.children) {
1595
1598
  t.table.column.show.list.push(d.key), d.children.forEach((V) => {
1596
- c(V);
1599
+ p(V);
1597
1600
  });
1598
1601
  return;
1599
1602
  }
1600
1603
  if (t.update.formDefault[d.key] = d.value, d.table.table && (d.show.table && t.table.column.show.list.push(d.key), d.table.table && t.table.column.show.listSource.push(d.key)), !(d.isForm && typeof d.show?.form == "boolean") || d.show?.form) {
1601
1604
  d.form = d.form || { span: s }, d.form.span = d.form.span ?? s;
1602
- let V = d.form.span, w = p.reduce((B, R) => B + R.span, V);
1603
- const A = p.length;
1604
- if (p.push({ item: d, span: V }), (A === 1 && p[0].span === 0 || w >= e || V === 0 && A > 1) && (l.push(p), p = []), d.rules) {
1605
+ let V = d.form.span, w = c.reduce((B, I) => B + I.span, V);
1606
+ const T = c.length;
1607
+ if (c.push({ item: d, span: V }), (T === 1 && c[0].span === 0 || w >= e || V === 0 && T > 1) && (l.push(c), c = []), d.rules) {
1605
1608
  const B = {
1606
- input: y.tCurd("placeholderInput"),
1607
- select: y.tCurd("placeholderSelect")
1608
- }, R = (B[d.type] || B.input) + d.label;
1609
+ input: b.tCurd("placeholderInput"),
1610
+ select: b.tCurd("placeholderSelect")
1611
+ }, I = (B[d.type] || B.input) + d.label;
1609
1612
  t.update.rules[d.key] = typeof d.rules == "boolean" ? [
1610
1613
  {
1611
1614
  required: !0,
1612
- message: R,
1615
+ message: I,
1613
1616
  trigger: "blur"
1614
1617
  }
1615
1618
  ] : d.rules;
@@ -1619,10 +1622,10 @@ const I = U.EDialog, Le = (i) => {
1619
1622
  d.isForm = V, Array.isArray(d.children) && d.children.forEach((w) => g(w, V));
1620
1623
  };
1621
1624
  r.column.forEach((d) => {
1622
- d.isForm = !0, g(d, !0), c(d);
1625
+ d.isForm = !0, g(d, !0), p(d);
1623
1626
  }), i.option.table?.column?.forEach((d) => {
1624
- g(d, !1), c(d);
1625
- }), t.search.column.list = r.column.concat(r.table?.column || []), t.table.column.list = t.search.column.list.filter((d) => d.table?.table), t.search.column.list.sort((d, V) => d.sort?.search - V.sort?.search), t.table.column.list.sort((d, V) => d.sort?.table - V.sort?.table), p.length > 0 && l.push(p), t.update.formColumn = l;
1627
+ g(d, !1), p(d);
1628
+ }), t.search.column.list = r.column.concat(r.table?.column || []), t.table.column.list = t.search.column.list.filter((d) => d.table?.table), t.search.column.list.sort((d, V) => d.sort?.search - V.sort?.search), t.table.column.list.sort((d, V) => d.sort?.table - V.sort?.table), c.length > 0 && l.push(c), t.update.formColumn = l;
1626
1629
  const n = i.option.search?.formDefault;
1627
1630
  n && Object.keys(n).forEach((d) => {
1628
1631
  t.search.formDefault[d] = n[d];
@@ -1633,29 +1636,29 @@ const I = U.EDialog, Le = (i) => {
1633
1636
  });
1634
1637
  return t.init(), ue(() => {
1635
1638
  i.option.init !== !1 && t.table.getList();
1636
- }), { conf: t, switchConfirmRef: o, ruleFormRef: u };
1637
- }, Me = { class: "dialog-footer" }, Be = /* @__PURE__ */ J({
1639
+ }), { conf: t, switchConfirmRef: a, ruleFormRef: f };
1640
+ }, Le = { class: "dialog-footer" }, Be = /* @__PURE__ */ J({
1638
1641
  __name: "switchConfirm",
1639
1642
  props: {
1640
1643
  size: {}
1641
1644
  },
1642
- setup(i, { expose: o }) {
1643
- const u = H(!1), t = H("确认修改"), r = H("确认要修改状态吗?");
1645
+ setup(i, { expose: a }) {
1646
+ const f = H(!1), t = H("确认修改"), r = H("确认要修改状态吗?");
1644
1647
  let l = null, e = null;
1645
- const s = (g) => (g?.title && (t.value = g.title), g?.content && (r.value = g.content), u.value = !0, new Promise((n, d) => {
1648
+ const s = (g) => (g?.title && (t.value = g.title), g?.content && (r.value = g.content), f.value = !0, new Promise((n, d) => {
1646
1649
  l = n, e = d;
1647
- })), p = () => {
1648
- u.value = !1, l?.(!0), l = null, e = null;
1649
- }, c = () => {
1650
- u.value = !1, e?.(new Error("用户取消操作")), l = null, e = null;
1650
+ })), c = () => {
1651
+ f.value = !1, l?.(!0), l = null, e = null;
1652
+ }, p = () => {
1653
+ f.value = !1, e?.(new Error("用户取消操作")), l = null, e = null;
1651
1654
  };
1652
- return o({
1655
+ return a({
1653
1656
  open: s
1654
1657
  }), (g, n) => {
1655
1658
  const d = Y("el-form");
1656
- return f(), h(a(ee), {
1657
- modelValue: u.value,
1658
- "onUpdate:modelValue": n[0] || (n[0] = (V) => u.value = V),
1659
+ return u(), h(o(ee), {
1660
+ modelValue: f.value,
1661
+ "onUpdate:modelValue": n[0] || (n[0] = (V) => f.value = V),
1659
1662
  title: t.value,
1660
1663
  "close-on-click-modal": !1,
1661
1664
  width: "400px"
@@ -1663,16 +1666,16 @@ const I = U.EDialog, Le = (i) => {
1663
1666
  footer: m(() => [
1664
1667
  z(d, { size: g.size }, {
1665
1668
  default: m(() => [
1666
- F("span", Me, [
1667
- z(a(T), { onClick: c }, {
1669
+ F("span", Le, [
1670
+ z(o(M), { onClick: p }, {
1668
1671
  default: m(() => n[1] || (n[1] = [
1669
1672
  $("取消")
1670
1673
  ])),
1671
1674
  _: 1
1672
1675
  }),
1673
- z(a(T), {
1676
+ z(o(M), {
1674
1677
  type: "primary",
1675
- onClick: p
1678
+ onClick: c
1676
1679
  }, {
1677
1680
  default: m(() => n[2] || (n[2] = [
1678
1681
  $("确认")
@@ -1685,43 +1688,43 @@ const I = U.EDialog, Le = (i) => {
1685
1688
  }, 8, ["size"])
1686
1689
  ]),
1687
1690
  default: m(() => [
1688
- F("div", null, E(r.value), 1)
1691
+ F("div", null, O(r.value), 1)
1689
1692
  ]),
1690
1693
  _: 1
1691
1694
  }, 8, ["modelValue", "title"]);
1692
1695
  };
1693
1696
  }
1694
- }), pe = (i, o) => {
1695
- const u = i.__vccOpts || i;
1696
- for (const [t, r] of o)
1697
- u[t] = r;
1698
- return u;
1697
+ }), pe = (i, a) => {
1698
+ const f = i.__vccOpts || i;
1699
+ for (const [t, r] of a)
1700
+ f[t] = r;
1701
+ return f;
1699
1702
  }, je = {}, Ie = {
1700
1703
  xmlns: "http://www.w3.org/2000/svg",
1701
1704
  viewBox: "0 0 1024 1024"
1702
1705
  };
1703
- function Re(i, o) {
1704
- return f(), b("svg", Ie, o[0] || (o[0] = [
1706
+ function Re(i, a) {
1707
+ return u(), y("svg", Ie, a[0] || (a[0] = [
1705
1708
  F("path", {
1706
1709
  fill: "currentColor",
1707
1710
  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"
1708
1711
  }, null, -1)
1709
1712
  ]));
1710
1713
  }
1711
- const Pe = /* @__PURE__ */ pe(je, [["render", Re]]), Ne = {}, Ke = {
1714
+ const Pe = /* @__PURE__ */ pe(je, [["render", Re]]), Ke = {}, Ne = {
1712
1715
  "data-v-58697b5c": "",
1713
1716
  xmlns: "http://www.w3.org/2000/svg",
1714
1717
  viewBox: "0 0 1024 1024"
1715
1718
  };
1716
- function He(i, o) {
1717
- return f(), b("svg", Ke, o[0] || (o[0] = [
1719
+ function He(i, a) {
1720
+ return u(), y("svg", Ne, a[0] || (a[0] = [
1718
1721
  F("path", {
1719
1722
  fill: "currentColor",
1720
1723
  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"
1721
1724
  }, null, -1)
1722
1725
  ]));
1723
1726
  }
1724
- const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-center table-header-label inline" }, qe = { class: "table-header-tooltip" }, Qe = ["onClick", "innerHTML"], Ge = /* @__PURE__ */ J({
1727
+ const Je = /* @__PURE__ */ pe(Ke, [["render", He]]), We = { class: "row flex-center table-header-label inline" }, qe = { class: "table-header-tooltip" }, Qe = { key: 1 }, Ge = ["onClick", "innerHTML"], Xe = /* @__PURE__ */ J({
1725
1728
  __name: "tableColumn",
1726
1729
  props: {
1727
1730
  conf: {},
@@ -1729,13 +1732,13 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1729
1732
  option: {}
1730
1733
  },
1731
1734
  setup(i) {
1732
- const o = U.isFun, u = ge().type;
1735
+ const a = U.isFun, f = be().type;
1733
1736
  return (t, r) => {
1734
1737
  const l = Y("el-tooltip");
1735
- return f(!0), b(S, null, L(t.columnList, (e) => (f(), b(S, {
1738
+ return u(!0), y(S, null, A(t.columnList, (e) => (u(), y(S, {
1736
1739
  key: e.key
1737
1740
  }, [
1738
- t.conf.table.column.show.list.includes(e.key) ? (f(), h(a(te), v({
1741
+ t.conf.table.column.show.list.includes(e.key) ? (u(), h(o(te), v({
1739
1742
  key: 0,
1740
1743
  prop: e.key,
1741
1744
  label: e.label,
@@ -1744,7 +1747,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1744
1747
  header: m(() => [
1745
1748
  C(t.$slots, "table-header-" + e.key, { item: e }, () => [
1746
1749
  F("div", We, [
1747
- e.table?.tooltip ? (f(), h(l, {
1750
+ e.table?.tooltip ? (u(), h(l, {
1748
1751
  key: 0,
1749
1752
  effect: "dark",
1750
1753
  content: e.table?.tooltip,
@@ -1757,52 +1760,52 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1757
1760
  ]),
1758
1761
  _: 2
1759
1762
  }, 1032, ["content"])) : k("", !0),
1760
- $(" " + E(e.label), 1)
1763
+ $(" " + O(e.label), 1)
1761
1764
  ])
1762
1765
  ])
1763
1766
  ]),
1764
1767
  default: m(({ row: s }) => [
1765
- e.children ? (f(), b(S, { key: 0 }, [
1768
+ e.children ? (u(), y(S, { key: 0 }, [
1766
1769
  r[0] || (r[0] = $("   ")),
1767
- (f(), h(q(a(u)), {
1770
+ (u(), h(q(o(f)), {
1768
1771
  conf: t.conf,
1769
1772
  columnList: e.children,
1770
1773
  option: t.option
1771
1774
  }, oe({ _: 2 }, [
1772
- L(t.$slots, (p, c) => ({
1773
- name: c,
1775
+ A(t.$slots, (c, p) => ({
1776
+ name: p,
1774
1777
  fn: m((g) => [
1775
- C(t.$slots, c, v({ ref_for: !0 }, g || {}))
1778
+ C(t.$slots, p, v({ ref_for: !0 }, g || {}))
1776
1779
  ])
1777
1780
  }))
1778
1781
  ]), 1032, ["conf", "columnList", "option"]))
1779
- ], 64)) : (f(), b(S, { key: 1 }, [
1780
- a(o)(e.show?.form, t.conf.update.form, a(U).EDialog.Update) && t.option.table?.inlineEdit && t.conf.inlineEdit.data === s && (e.type === "input" || e.type === "select") ? (f(), b(S, { key: 0 }, [
1781
- e.type === "input" ? (f(), h(a(Z), v({
1782
+ ], 64)) : (u(), y(S, { key: 1 }, [
1783
+ t.conf.update.type === o(U).EDialog.Update && o(a)(e.show?.form, t.conf.update.form, o(U).EDialog.Update) && t.option.table?.inlineEdit && t.conf.update.form[t.option.table?.rowKey] === s[t.option.table?.rowKey] && (e.type === "input" || e.type === "select") ? (u(), y(S, { key: 0 }, [
1784
+ e.type === "input" ? (u(), h(o(Z), v({
1782
1785
  key: 0,
1783
1786
  modelValue: t.conf.update.form[e.key],
1784
- "onUpdate:modelValue": (p) => t.conf.update.form[e.key] = p,
1787
+ "onUpdate:modelValue": (c) => t.conf.update.form[e.key] = c,
1785
1788
  disabled: t.conf.update.getDisabled(e),
1786
1789
  ref_for: !0
1787
- }, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), h(a(W), v({
1790
+ }, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (u(), h(o(W), v({
1788
1791
  key: 1,
1789
1792
  modelValue: t.conf.update.form[e.key],
1790
- "onUpdate:modelValue": (p) => t.conf.update.form[e.key] = p,
1793
+ "onUpdate:modelValue": (c) => t.conf.update.form[e.key] = c,
1791
1794
  disabled: t.conf.update.getDisabled(e),
1792
1795
  ref_for: !0
1793
1796
  }, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), { style: { width: "100%" } }), {
1794
1797
  default: m(() => [
1795
- (f(!0), b(S, null, L(e.options?.search?.select?.data || e.options?.select?.data, (p) => (f(), h(a(K), {
1796
- key: p.value,
1797
- label: p.label,
1798
- value: p.value
1798
+ (u(!0), y(S, null, A(e.options?.search?.select?.data || e.options?.select?.data, (c) => (u(), h(o(N), {
1799
+ key: c.value,
1800
+ label: c.label,
1801
+ value: c.value
1799
1802
  }, null, 8, ["label", "value"]))), 128))
1800
1803
  ]),
1801
1804
  _: 2
1802
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), h(a(X), v({
1805
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (u(), h(o(X), v({
1803
1806
  key: 2,
1804
1807
  modelValue: t.conf.update.form[e.key],
1805
- "onUpdate:modelValue": (p) => t.conf.update.form[e.key] = p,
1808
+ "onUpdate:modelValue": (c) => t.conf.update.form[e.key] = c,
1806
1809
  ref_for: !0
1807
1810
  }, t.conf.update.getBind(e), D(t.conf.update.getOn(e)), {
1808
1811
  disabled: t.conf.update.getDisabled(e)
@@ -1812,26 +1815,29 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1812
1815
  row: s,
1813
1816
  item: e
1814
1817
  }, () => [
1815
- a(M).customComponent[e.type ?? ""]?.table ? (f(), h(q(a(M).customComponent[e.type ?? ""]?.table), v({
1818
+ o(L).customComponent[e.type ?? ""]?.table ? (u(), h(q(o(L).customComponent[e.type ?? ""]?.table), v({
1816
1819
  key: 0,
1817
1820
  modelValue: s[e.key],
1818
- "onUpdate:modelValue": (p) => s[e.key] = p,
1821
+ "onUpdate:modelValue": (c) => s[e.key] = c,
1819
1822
  ref_for: !0
1820
- }, e.options?.[e.type ?? ""], D(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (f(), h(a(X), v({
1821
- key: 1,
1822
- modelValue: s[e.key],
1823
- "onUpdate:modelValue": (p) => s[e.key] = p,
1824
- "before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, s),
1825
- ref_for: !0
1826
- }, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), b("span", {
1823
+ }, e.options?.[e.type ?? ""], D(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (u(), y(S, { key: 1 }, [
1824
+ e.options?.switch?.tableConfig?.change ? (u(), h(o(X), v({
1825
+ key: 0,
1826
+ modelValue: s[e.key],
1827
+ "onUpdate:modelValue": (c) => s[e.key] = c,
1828
+ loading: e.options?.switch?.loadingMap?.[s[t.option.table?.rowKey]]?.loading,
1829
+ "before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, s),
1830
+ ref_for: !0
1831
+ }, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (u(), y("span", Qe, O(s[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
1832
+ ], 64)) : (u(), y("span", {
1827
1833
  key: 2,
1828
1834
  style: fe({
1829
1835
  "--table-text-click-color": e.table?.click?.color
1830
1836
  }),
1831
1837
  class: j({ "table-text-click": e.table?.click?.callback }),
1832
- onClick: (p) => e.table?.click?.callback?.(s),
1838
+ onClick: (c) => e.table?.click?.callback?.(s),
1833
1839
  innerHTML: e.table?.format ? e.table?.format(s) : s[e.key]
1834
- }, null, 14, Qe))
1840
+ }, null, 14, Ge))
1835
1841
  ])
1836
1842
  ], 64))
1837
1843
  ]),
@@ -1840,146 +1846,146 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1840
1846
  ], 64))), 128);
1841
1847
  };
1842
1848
  }
1843
- }), Xe = {
1849
+ }), Ye = {
1844
1850
  class: "row form-item-content",
1845
1851
  style: { width: "100%" }
1846
- }, Ye = { class: "col column form-item-content-item" }, Ze = { class: "col" }, xe = ["innerHTML"], _e = /* @__PURE__ */ J({
1852
+ }, Ze = { class: "col column form-item-content-item" }, xe = { class: "col" }, _e = ["innerHTML"], et = /* @__PURE__ */ J({
1847
1853
  __name: "formColumn",
1848
1854
  props: {
1849
1855
  conf: {},
1850
1856
  item: {}
1851
1857
  },
1852
1858
  setup(i) {
1853
- return (o, u) => (f(), h(a(G), {
1859
+ return (a, f) => (u(), h(o(G), {
1854
1860
  class: j({
1855
- "hide-label": typeof o.item.item.text?.form?.label == "boolean" ? !o.item.item.text?.form?.label : !1
1861
+ "hide-label": typeof a.item.item.text?.form?.label == "boolean" ? !a.item.item.text?.form?.label : !1
1856
1862
  }),
1857
- label: typeof o.item.item.text?.form?.label == "string" ? o.item.item.text?.form?.label : o.item.item.label,
1858
- prop: o.item.item.key,
1859
- "label-width": o.item.item.form?.labelWidth || o.conf.option.form?.labelWidth
1863
+ label: typeof a.item.item.text?.form?.label == "string" ? a.item.item.text?.form?.label : a.item.item.label,
1864
+ prop: a.item.item.key,
1865
+ "label-width": a.item.item.form?.labelWidth || a.conf.option.form?.labelWidth
1860
1866
  }, {
1861
1867
  default: m(() => [
1862
- F("div", Xe, [
1863
- C(o.$slots, "form-" + o.item.item.key + "-start", {
1864
- row: o.conf.update.form,
1865
- item: o.item.item
1868
+ F("div", Ye, [
1869
+ C(a.$slots, "form-" + a.item.item.key + "-start", {
1870
+ row: a.conf.update.form,
1871
+ item: a.item.item
1866
1872
  }),
1867
- F("div", Ye, [
1868
- F("div", Ze, [
1869
- C(o.$slots, "form-" + o.item.item.key, {
1870
- row: o.conf.update.form,
1871
- item: o.item.item
1873
+ F("div", Ze, [
1874
+ F("div", xe, [
1875
+ C(a.$slots, "form-" + a.item.item.key, {
1876
+ row: a.conf.update.form,
1877
+ item: a.item.item
1872
1878
  }, () => [
1873
- o.item.item.type === "input" ? (f(), h(a(Z), v({
1879
+ a.item.item.type === "input" ? (u(), h(o(Z), v({
1874
1880
  key: 0,
1875
- modelValue: o.conf.update.form[o.item.item.key],
1876
- "onUpdate:modelValue": u[0] || (u[0] = (t) => o.conf.update.form[o.item.item.key] = t)
1877
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1878
- disabled: o.conf.update.getDisabled(o.item.item)
1879
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (f(), h(a(X), v({
1881
+ modelValue: a.conf.update.form[a.item.item.key],
1882
+ "onUpdate:modelValue": f[0] || (f[0] = (t) => a.conf.update.form[a.item.item.key] = t)
1883
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1884
+ disabled: a.conf.update.getDisabled(a.item.item)
1885
+ }), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "switch" ? (u(), h(o(X), v({
1880
1886
  key: 1,
1881
- modelValue: o.conf.update.form[o.item.item.key],
1882
- "onUpdate:modelValue": u[1] || (u[1] = (t) => o.conf.update.form[o.item.item.key] = t)
1883
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1884
- disabled: o.conf.update.getDisabled(o.item.item)
1885
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (f(), h(a(W), v({
1887
+ modelValue: a.conf.update.form[a.item.item.key],
1888
+ "onUpdate:modelValue": f[1] || (f[1] = (t) => a.conf.update.form[a.item.item.key] = t)
1889
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1890
+ disabled: a.conf.update.getDisabled(a.item.item)
1891
+ }), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "select" ? (u(), h(o(W), v({
1886
1892
  key: 2,
1887
- modelValue: o.conf.update.form[o.item.item.key],
1888
- "onUpdate:modelValue": u[2] || (u[2] = (t) => o.conf.update.form[o.item.item.key] = t)
1889
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1890
- disabled: o.conf.update.getDisabled(o.item.item),
1893
+ modelValue: a.conf.update.form[a.item.item.key],
1894
+ "onUpdate:modelValue": f[2] || (f[2] = (t) => a.conf.update.form[a.item.item.key] = t)
1895
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1896
+ disabled: a.conf.update.getDisabled(a.item.item),
1891
1897
  style: { width: "100%" }
1892
1898
  }), {
1893
1899
  default: m(() => [
1894
- (f(!0), b(S, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(K), {
1900
+ (u(!0), y(S, null, A(a.conf.update.getBind(a.item.item).data, (t) => (u(), h(o(N), {
1895
1901
  key: t.value,
1896
1902
  label: t.label,
1897
1903
  value: t.value
1898
1904
  }, null, 8, ["label", "value"]))), 128))
1899
1905
  ]),
1900
1906
  _: 1
1901
- }, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (f(), h(a(re), v({
1907
+ }, 16, ["modelValue", "disabled"])) : a.item.item.type === "radio" ? (u(), h(o(re), v({
1902
1908
  key: 3,
1903
- modelValue: o.conf.update.form[o.item.item.key],
1904
- "onUpdate:modelValue": u[3] || (u[3] = (t) => o.conf.update.form[o.item.item.key] = t)
1905
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1906
- disabled: o.conf.update.getDisabled(o.item.item),
1909
+ modelValue: a.conf.update.form[a.item.item.key],
1910
+ "onUpdate:modelValue": f[3] || (f[3] = (t) => a.conf.update.form[a.item.item.key] = t)
1911
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1912
+ disabled: a.conf.update.getDisabled(a.item.item),
1907
1913
  style: { width: "100%" }
1908
1914
  }), {
1909
1915
  default: m(() => [
1910
- (f(!0), b(S, null, L(o.conf.update.getBind(o.item.item).data, (t) => (f(), h(a(se), {
1916
+ (u(!0), y(S, null, A(a.conf.update.getBind(a.item.item).data, (t) => (u(), h(o(se), {
1911
1917
  key: t.value,
1912
1918
  label: t.label,
1913
1919
  value: t.value
1914
1920
  }, null, 8, ["label", "value"]))), 128))
1915
1921
  ]),
1916
1922
  _: 1
1917
- }, 16, ["modelValue", "disabled"])) : o.item.item.type === "list" ? (f(), h(ne, v({
1923
+ }, 16, ["modelValue", "disabled"])) : a.item.item.type === "list" ? (u(), h(ne, v({
1918
1924
  key: 4,
1919
- row: o.conf.update.form,
1920
- field: o.item.item.key
1921
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1922
- disabled: o.conf.update.getDisabled(o.item.item),
1925
+ row: a.conf.update.form,
1926
+ field: a.item.item.key
1927
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1928
+ disabled: a.conf.update.getDisabled(a.item.item),
1923
1929
  style: { width: "100%" }
1924
- }), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "treeSelect" ? (f(), h(a(de), v({
1930
+ }), null, 16, ["row", "field", "disabled"])) : a.item.item.type === "treeSelect" ? (u(), h(o(de), v({
1925
1931
  key: 5,
1926
- modelValue: o.conf.update.form[o.item.item.key],
1927
- "onUpdate:modelValue": u[4] || (u[4] = (t) => o.conf.update.form[o.item.item.key] = t)
1928
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1929
- disabled: o.conf.update.getDisabled(o.item.item),
1932
+ modelValue: a.conf.update.form[a.item.item.key],
1933
+ "onUpdate:modelValue": f[4] || (f[4] = (t) => a.conf.update.form[a.item.item.key] = t)
1934
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1935
+ disabled: a.conf.update.getDisabled(a.item.item),
1930
1936
  style: { width: "100%" }
1931
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (f(), h(a(ae), v({
1937
+ }), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "datetime" ? (u(), h(o(ae), v({
1932
1938
  key: 6,
1933
- modelValue: o.conf.update.form[o.item.item.key],
1934
- "onUpdate:modelValue": u[5] || (u[5] = (t) => o.conf.update.form[o.item.item.key] = t)
1935
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1936
- disabled: o.conf.update.getDisabled(o.item.item)
1937
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type && (a(M).customComponent[o.item.item.type] || a(M).customComponent[o.item.item.type]?.form) ? (f(), h(q(a(M).customComponent[o.item.item.type]?.form || a(M).customComponent[o.item.item.type]), v({
1939
+ modelValue: a.conf.update.form[a.item.item.key],
1940
+ "onUpdate:modelValue": f[5] || (f[5] = (t) => a.conf.update.form[a.item.item.key] = t)
1941
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1942
+ disabled: a.conf.update.getDisabled(a.item.item)
1943
+ }), null, 16, ["modelValue", "disabled"])) : a.item.item.type && (o(L).customComponent[a.item.item.type] || o(L).customComponent[a.item.item.type]?.form) ? (u(), h(q(o(L).customComponent[a.item.item.type]?.form || o(L).customComponent[a.item.item.type]), v({
1938
1944
  key: 7,
1939
- modelValue: o.conf.update.form[o.item.item.key],
1940
- "onUpdate:modelValue": u[6] || (u[6] = (t) => o.conf.update.form[o.item.item.key] = t)
1941
- }, o.conf.update.getBind(o.item.item), D(o.conf.update.getOn(o.item.item)), {
1942
- disabled: o.conf.update.getDisabled(o.item.item)
1945
+ modelValue: a.conf.update.form[a.item.item.key],
1946
+ "onUpdate:modelValue": f[6] || (f[6] = (t) => a.conf.update.form[a.item.item.key] = t)
1947
+ }, a.conf.update.getBind(a.item.item), D(a.conf.update.getOn(a.item.item)), {
1948
+ disabled: a.conf.update.getDisabled(a.item.item)
1943
1949
  }), null, 16, ["modelValue", "disabled"])) : k("", !0)
1944
1950
  ]),
1945
- C(o.$slots, "form-" + o.item.item.key + "-right", {
1946
- row: o.conf.update.form,
1947
- item: o.item.item
1951
+ C(a.$slots, "form-" + a.item.item.key + "-right", {
1952
+ row: a.conf.update.form,
1953
+ item: a.item.item
1948
1954
  })
1949
1955
  ]),
1950
- C(o.$slots, "form-" + o.item.item.key + "-tip", {
1951
- row: o.conf.update.form,
1952
- item: o.item.item
1956
+ C(a.$slots, "form-" + a.item.item.key + "-tip", {
1957
+ row: a.conf.update.form,
1958
+ item: a.item.item
1953
1959
  }, () => [
1954
- o.item.item.form?.tipText ? (f(), b("div", {
1960
+ a.item.item.form?.tipText ? (u(), y("div", {
1955
1961
  key: 0,
1956
1962
  class: "form-tip-text",
1957
- innerHTML: typeof o.item.item.form?.tipText == "function" ? o.item.item.form?.tipText(o.conf.update.form, o.conf.update.type) : o.item.item.form?.tipText
1958
- }, null, 8, xe)) : k("", !0)
1963
+ innerHTML: typeof a.item.item.form?.tipText == "function" ? a.item.item.form?.tipText(a.conf.update.form, a.conf.update.type) : a.item.item.form?.tipText
1964
+ }, null, 8, _e)) : k("", !0)
1959
1965
  ])
1960
1966
  ]),
1961
- C(o.$slots, "form-" + o.item.item.key + "-end", {
1962
- row: o.conf.update.form,
1963
- item: o.item.item
1967
+ C(a.$slots, "form-" + a.item.item.key + "-end", {
1968
+ row: a.conf.update.form,
1969
+ item: a.item.item
1964
1970
  })
1965
1971
  ])
1966
1972
  ]),
1967
1973
  _: 3
1968
1974
  }, 8, ["class", "label", "prop", "label-width"]));
1969
1975
  }
1970
- }), et = {
1976
+ }), tt = {
1971
1977
  key: 0,
1972
1978
  class: "relative curd-search fit-width"
1973
- }, tt = { class: "mb-10 flex justify-between items-center fit-width" }, ot = {
1979
+ }, ot = { class: "mb-10 flex justify-between items-center fit-width" }, at = {
1974
1980
  class: "flex items-center",
1975
1981
  style: { gap: "10px" }
1976
- }, at = { key: 0 }, lt = { key: 1 }, nt = { key: 2 }, it = { class: "export-btn" }, rt = {
1982
+ }, lt = { key: 0 }, nt = { key: 1 }, it = { key: 2 }, rt = { class: "export-btn" }, st = {
1977
1983
  key: 1,
1978
1984
  class: "export-btn"
1979
- }, st = {
1985
+ }, dt = {
1980
1986
  class: "flex items-center table-tools-right",
1981
1987
  style: { gap: "10px" }
1982
- }, dt = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, ut = { class: "dialog-footer" }, ft = { class: "dialog-footer" }, pt = /* @__PURE__ */ J({
1988
+ }, ut = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, ft = { class: "dialog-footer" }, pt = { class: "dialog-footer" }, ct = /* @__PURE__ */ J({
1983
1989
  __name: "index",
1984
1990
  props: {
1985
1991
  /**
@@ -1989,37 +1995,37 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
1989
1995
  default: {}
1990
1996
  }
1991
1997
  },
1992
- setup(i, { expose: o }) {
1993
- const u = U.EDialog, t = i, r = U.isFun, { conf: l, switchConfirmRef: e, ruleFormRef: s } = Le(t);
1994
- return o({
1998
+ setup(i, { expose: a }) {
1999
+ const f = U.EDialog, t = i, r = U.isFun, { conf: l, switchConfirmRef: e, ruleFormRef: s } = Ae(t);
2000
+ return a({
1995
2001
  conf: l
1996
- }), (p, c) => {
2002
+ }), (c, p) => {
1997
2003
  const g = we("loading");
1998
- return f(), b("div", {
2004
+ return u(), y("div", {
1999
2005
  class: j(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
2000
2006
  }, [
2001
2007
  F("div", {
2002
2008
  class: j(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
2003
2009
  style: { overflow: "hidden" }
2004
2010
  }, [
2005
- C(p.$slots, "box-left"),
2011
+ C(c.$slots, "box-left"),
2006
2012
  F("div", {
2007
2013
  class: j(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
2008
2014
  }, [
2009
- i.option.search?.show !== !1 ? (f(), b("div", et, [
2010
- z(a(N), {
2011
- model: a(l).search.form,
2015
+ i.option.search?.show !== !1 ? (u(), y("div", tt, [
2016
+ z(o(K), {
2017
+ model: o(l).search.form,
2012
2018
  inline: "",
2013
2019
  size: i.option.size?.search
2014
2020
  }, {
2015
2021
  default: m(() => [
2016
- C(p.$slots, "search-start", {
2017
- row: a(l).search.form
2022
+ C(c.$slots, "search-start", {
2023
+ row: o(l).search.form
2018
2024
  }),
2019
- (f(!0), b(S, null, L(a(l).search.column.list, (n) => (f(), b(S, {
2025
+ (u(!0), y(S, null, A(o(l).search.column.list, (n) => (u(), y(S, {
2020
2026
  key: n.key
2021
2027
  }, [
2022
- (typeof n.show?.search == "function" ? n.show?.search(a(l).search.form) : n.show?.search) ? (f(), h(a(G), {
2028
+ (typeof n.show?.search == "function" ? n.show?.search(o(l).search.form) : n.show?.search) ? (u(), h(o(G), {
2023
2029
  key: 0,
2024
2030
  label: typeof n.text?.search?.label == "string" ? n.text?.search?.label : n.label,
2025
2031
  class: j({
@@ -2027,184 +2033,184 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2027
2033
  })
2028
2034
  }, {
2029
2035
  default: m(() => [
2030
- C(p.$slots, "search-" + n.key, {
2031
- row: a(l).search.form
2036
+ C(c.$slots, "search-" + n.key, {
2037
+ row: o(l).search.form
2032
2038
  }, () => [
2033
- n.type === "input" ? (f(), h(a(Z), v({
2039
+ n.type === "input" ? (u(), h(o(Z), v({
2034
2040
  key: 0,
2035
- modelValue: a(l).search.form[n.key],
2036
- "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2037
- placeholder: a(l).search.getPlaceholder(n),
2041
+ modelValue: o(l).search.form[n.key],
2042
+ "onUpdate:modelValue": (d) => o(l).search.form[n.key] = d,
2043
+ placeholder: o(l).search.getPlaceholder(n),
2038
2044
  clearable: "",
2039
2045
  disabled: n.disabled?.search,
2040
2046
  ref_for: !0
2041
- }, n.options?.search?.input || n.options?.input, D(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (f(), h(a(W), v({
2047
+ }, n.options?.search?.input || n.options?.input, D(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (u(), h(o(W), v({
2042
2048
  key: 1,
2043
- modelValue: a(l).search.form[n.key],
2044
- "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2045
- placeholder: a(l).search.getPlaceholder(n, a(y).tCurd("placeholderSelect")),
2049
+ modelValue: o(l).search.form[n.key],
2050
+ "onUpdate:modelValue": (d) => o(l).search.form[n.key] = d,
2051
+ placeholder: o(l).search.getPlaceholder(n, o(b).tCurd("placeholderSelect")),
2046
2052
  clearable: "",
2047
2053
  disabled: n.disabled?.search,
2048
2054
  ref_for: !0
2049
2055
  }, n.options?.search?.switch || n.options?.switch, D(n.options?.search?.switch?.on || n.options?.switch?.on || {})), {
2050
2056
  default: m(() => [
2051
- (f(), h(a(K), {
2057
+ (u(), h(o(N), {
2052
2058
  key: n.options?.switch?.activeValue,
2053
2059
  label: n.options?.switch?.activeLabel,
2054
2060
  value: n.options?.switch?.activeValue
2055
2061
  }, null, 8, ["label", "value"])),
2056
- (f(), h(a(K), {
2062
+ (u(), h(o(N), {
2057
2063
  key: n.options?.switch?.inactiveValue,
2058
2064
  label: n.options?.switch?.inactiveLabel,
2059
2065
  value: n.options?.switch?.inactiveValue
2060
2066
  }, null, 8, ["label", "value"]))
2061
2067
  ]),
2062
2068
  _: 2
2063
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "select" ? (f(), h(a(W), v({
2069
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "select" ? (u(), h(o(W), v({
2064
2070
  key: 2,
2065
- modelValue: a(l).search.form[n.key],
2066
- "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2067
- placeholder: a(l).search.getPlaceholder(n, a(y).tCurd("placeholderSelect")),
2071
+ modelValue: o(l).search.form[n.key],
2072
+ "onUpdate:modelValue": (d) => o(l).search.form[n.key] = d,
2073
+ placeholder: o(l).search.getPlaceholder(n, o(b).tCurd("placeholderSelect")),
2068
2074
  clearable: "",
2069
2075
  disabled: n.disabled?.search,
2070
2076
  ref_for: !0
2071
2077
  }, n.options?.search?.select || n.options?.select, D(n.options?.search?.select?.on || n.options?.select?.on || {})), {
2072
2078
  default: m(() => [
2073
- (f(!0), b(S, null, L(n.options?.select?.data, (d) => (f(), h(a(K), {
2079
+ (u(!0), y(S, null, A(n.options?.select?.data, (d) => (u(), h(o(N), {
2074
2080
  key: d.value,
2075
2081
  label: d.label,
2076
2082
  value: d.value
2077
2083
  }, null, 8, ["label", "value"]))), 128))
2078
2084
  ]),
2079
2085
  _: 2
2080
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "datetime" ? (f(), h(a(ae), v({
2086
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "datetime" ? (u(), h(o(ae), v({
2081
2087
  key: 3,
2082
- modelValue: a(l).search.form[n.key],
2083
- "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2088
+ modelValue: o(l).search.form[n.key],
2089
+ "onUpdate:modelValue": (d) => o(l).search.form[n.key] = d,
2084
2090
  disabled: n.disabled?.search,
2085
2091
  ref_for: !0
2086
- }, n.options?.search?.datetime || n.options?.datetime, D(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && a(M).customComponent[n.type] ? (f(), h(q(a(M).customComponent[n.type]), v({
2092
+ }, n.options?.search?.datetime || n.options?.datetime, D(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && o(L).customComponent[n.type] ? (u(), h(q(o(L).customComponent[n.type]), v({
2087
2093
  key: 4,
2088
- modelValue: a(l).search.form[n.key],
2089
- "onUpdate:modelValue": (d) => a(l).search.form[n.key] = d,
2094
+ modelValue: o(l).search.form[n.key],
2095
+ "onUpdate:modelValue": (d) => o(l).search.form[n.key] = d,
2090
2096
  ref_for: !0
2091
2097
  }, n.options?.search?.[n.type] || n.options?.[n.type], D(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
2092
2098
  disabled: n.disabled?.search
2093
2099
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : k("", !0)
2094
2100
  ]),
2095
- C(p.$slots, "search-" + n.key + "-right", {
2096
- row: a(l).search.form
2101
+ C(c.$slots, "search-" + n.key + "-right", {
2102
+ row: o(l).search.form
2097
2103
  })
2098
2104
  ]),
2099
2105
  _: 2
2100
2106
  }, 1032, ["label", "class"])) : k("", !0)
2101
2107
  ], 64))), 128)),
2102
- C(p.$slots, "search-center", {
2103
- row: a(l).search.form
2108
+ C(c.$slots, "search-center", {
2109
+ row: o(l).search.form
2104
2110
  }),
2105
- i.option.tools?.search || i.option.tools?.reset ? (f(), h(a(G), { key: 0 }, {
2111
+ i.option.tools?.search || i.option.tools?.reset ? (u(), h(o(G), { key: 0 }, {
2106
2112
  default: m(() => [
2107
- i.option.tools?.search ? (f(), h(a(T), {
2113
+ i.option.tools?.search ? (u(), h(o(M), {
2108
2114
  key: 0,
2109
2115
  type: "primary",
2110
- onClick: a(l).search.submit
2116
+ onClick: o(l).search.submit
2111
2117
  }, {
2112
2118
  default: m(() => [
2113
- $(E(a(y).tCurd("search")), 1)
2119
+ $(O(o(b).tCurd("search")), 1)
2114
2120
  ]),
2115
2121
  _: 1
2116
2122
  }, 8, ["onClick"])) : k("", !0),
2117
- i.option.tools?.reset ? (f(), h(a(T), {
2123
+ i.option.tools?.reset ? (u(), h(o(M), {
2118
2124
  key: 1,
2119
- onClick: a(l).search.reset
2125
+ onClick: o(l).search.reset
2120
2126
  }, {
2121
2127
  default: m(() => [
2122
- $(E(a(y).tCurd("reset")), 1)
2128
+ $(O(o(b).tCurd("reset")), 1)
2123
2129
  ]),
2124
2130
  _: 1
2125
2131
  }, 8, ["onClick"])) : k("", !0)
2126
2132
  ]),
2127
2133
  _: 1
2128
2134
  })) : k("", !0),
2129
- C(p.$slots, "search-end", {
2130
- row: a(l).search.form
2135
+ C(c.$slots, "search-end", {
2136
+ row: o(l).search.form
2131
2137
  })
2132
2138
  ]),
2133
2139
  _: 3
2134
2140
  }, 8, ["model", "size"])
2135
2141
  ])) : k("", !0),
2136
- F("div", tt, [
2137
- F("div", ot, [
2138
- a(r)(i.option.tools?.add) ? (f(), b("div", at, [
2139
- z(a(T), {
2142
+ F("div", ot, [
2143
+ F("div", at, [
2144
+ o(r)(i.option.tools?.add) ? (u(), y("div", lt, [
2145
+ z(o(M), {
2140
2146
  type: "primary",
2141
- onClick: c[0] || (c[0] = (n) => a(l).update.open(a(u).Add)),
2147
+ onClick: p[0] || (p[0] = (n) => o(l).update.open(o(f).Add)),
2142
2148
  size: i.option.size?.search
2143
2149
  }, {
2144
2150
  default: m(() => [
2145
- $(E(a(y).tCurd("add")), 1)
2151
+ $(O(o(b).tCurd("add")), 1)
2146
2152
  ]),
2147
2153
  _: 1
2148
2154
  }, 8, ["size"])
2149
2155
  ])) : k("", !0),
2150
- i.option.table?.selectable && a(r)(i.option.tools?.delete) ? (f(), b("div", lt, [
2151
- z(a(T), {
2156
+ i.option.table?.selectable && o(r)(i.option.tools?.delete) ? (u(), y("div", nt, [
2157
+ z(o(M), {
2152
2158
  type: "danger",
2153
- onClick: c[1] || (c[1] = (n) => a(l).remove.open(a(l).table.selection.list)),
2159
+ onClick: p[1] || (p[1] = (n) => o(l).remove.open(o(l).table.selection.list)),
2154
2160
  size: i.option.size?.search
2155
2161
  }, {
2156
2162
  default: m(() => [
2157
- $(E(a(y).tCurd("delete")), 1)
2163
+ $(O(o(b).tCurd("delete")), 1)
2158
2164
  ]),
2159
2165
  _: 1
2160
2166
  }, 8, ["size"])
2161
2167
  ])) : k("", !0),
2162
- i.option.tools?.expand ? (f(), b("div", nt, [
2163
- z(a(T), {
2168
+ i.option.tools?.expand ? (u(), y("div", it, [
2169
+ z(o(M), {
2164
2170
  type: "warning",
2165
- onClick: c[2] || (c[2] = (n) => a(l).table.expand.all()),
2171
+ onClick: p[2] || (p[2] = (n) => o(l).table.expand.all()),
2166
2172
  size: i.option.size?.search
2167
2173
  }, {
2168
2174
  default: m(() => [
2169
- $(E(a(y).tCurd("expandCollapse")), 1)
2175
+ $(O(o(b).tCurd("expandCollapse")), 1)
2170
2176
  ]),
2171
2177
  _: 1
2172
2178
  }, 8, ["size"])
2173
2179
  ])) : k("", !0),
2174
- i.option.tools?.export?.show ? (f(), b(S, { key: 3 }, [
2175
- i.option.tools?.export?.dropdown?.show ? (f(), h(a(he), {
2180
+ i.option.tools?.export?.show ? (u(), y(S, { key: 3 }, [
2181
+ i.option.tools?.export?.dropdown?.show ? (u(), h(o(he), {
2176
2182
  key: 0,
2177
- onCommand: a(l).export.click
2183
+ onCommand: o(l).export.click
2178
2184
  }, {
2179
2185
  dropdown: m(() => [
2180
- z(a(ye), {
2186
+ z(o(ge), {
2181
2187
  size: i.option.size?.search
2182
2188
  }, {
2183
2189
  default: m(() => [
2184
- i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || a(r)(i.option.tools?.delete)) ? (f(), h(a(_), {
2190
+ i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || o(r)(i.option.tools?.delete)) ? (u(), h(o(_), {
2185
2191
  key: 0,
2186
2192
  command: "select"
2187
2193
  }, {
2188
2194
  default: m(() => [
2189
- $(E(a(y).tCurd("exportSelect")), 1)
2195
+ $(O(o(b).tCurd("exportSelect")), 1)
2190
2196
  ]),
2191
2197
  _: 1
2192
2198
  })) : k("", !0),
2193
- i.option.tools?.export?.dropdown?.page ? (f(), h(a(_), {
2199
+ i.option.tools?.export?.dropdown?.page ? (u(), h(o(_), {
2194
2200
  key: 1,
2195
2201
  command: "page"
2196
2202
  }, {
2197
2203
  default: m(() => [
2198
- $(E(a(y).tCurd("exportPage")), 1)
2204
+ $(O(o(b).tCurd("exportPage")), 1)
2199
2205
  ]),
2200
2206
  _: 1
2201
2207
  })) : k("", !0),
2202
- i.option.tools?.export?.dropdown?.all ? (f(), h(a(_), {
2208
+ i.option.tools?.export?.dropdown?.all ? (u(), h(o(_), {
2203
2209
  key: 2,
2204
2210
  command: "all"
2205
2211
  }, {
2206
2212
  default: m(() => [
2207
- $(E(a(y).tCurd("exportAll")), 1)
2213
+ $(O(o(b).tCurd("exportAll")), 1)
2208
2214
  ]),
2209
2215
  _: 1
2210
2216
  })) : k("", !0)
@@ -2213,58 +2219,58 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2213
2219
  }, 8, ["size"])
2214
2220
  ]),
2215
2221
  default: m(() => [
2216
- F("div", it, [
2217
- z(a(T), {
2222
+ F("div", rt, [
2223
+ z(o(M), {
2218
2224
  type: "warning",
2219
- loading: a(l).export.loading,
2225
+ loading: o(l).export.loading,
2220
2226
  size: i.option.size?.search
2221
2227
  }, {
2222
2228
  default: m(() => [
2223
- $(E(a(y).tCurd("export")), 1)
2229
+ $(O(o(b).tCurd("export")), 1)
2224
2230
  ]),
2225
2231
  _: 1
2226
2232
  }, 8, ["loading", "size"])
2227
2233
  ])
2228
2234
  ]),
2229
2235
  _: 1
2230
- }, 8, ["onCommand"])) : (f(), b("div", rt, [
2231
- z(a(T), {
2236
+ }, 8, ["onCommand"])) : (u(), y("div", st, [
2237
+ z(o(M), {
2232
2238
  type: "warning",
2233
- loading: a(l).export.loading,
2239
+ loading: o(l).export.loading,
2234
2240
  size: i.option.size?.search,
2235
- onClick: c[3] || (c[3] = (n) => a(l).export.run.start("all"))
2241
+ onClick: p[3] || (p[3] = (n) => o(l).export.run.start("all"))
2236
2242
  }, {
2237
2243
  default: m(() => [
2238
- $(E(a(y).tCurd("export")), 1)
2244
+ $(O(o(b).tCurd("export")), 1)
2239
2245
  ]),
2240
2246
  _: 1
2241
2247
  }, 8, ["loading", "size"])
2242
2248
  ]))
2243
2249
  ], 64)) : k("", !0),
2244
- C(p.$slots, "tools-left")
2250
+ C(c.$slots, "tools-left")
2245
2251
  ]),
2246
- F("div", st, [
2247
- C(p.$slots, "tools-right"),
2248
- a(l).page.showTools ? (f(), h(a(ie), v({
2252
+ F("div", dt, [
2253
+ C(c.$slots, "tools-right"),
2254
+ o(l).page.showTools ? (u(), h(o(ie), v({
2249
2255
  key: 0,
2250
- "current-page": a(l).page.num,
2251
- "onUpdate:currentPage": c[4] || (c[4] = (n) => a(l).page.num = n),
2252
- "page-size": a(l).page.size,
2253
- "onUpdate:pageSize": c[5] || (c[5] = (n) => a(l).page.size = n),
2256
+ "current-page": o(l).page.num,
2257
+ "onUpdate:currentPage": p[4] || (p[4] = (n) => o(l).page.num = n),
2258
+ "page-size": o(l).page.size,
2259
+ "onUpdate:pageSize": p[5] || (p[5] = (n) => o(l).page.size = n),
2254
2260
  background: "",
2255
- "page-sizes": a(l).page.sizeList,
2256
- "pager-count": a(l).page.pagerCount,
2257
- layout: a(l).page.layout,
2258
- total: a(l).page.total,
2261
+ "page-sizes": o(l).page.sizeList,
2262
+ "pager-count": o(l).page.pagerCount,
2263
+ layout: o(l).page.layout,
2264
+ total: o(l).page.total,
2259
2265
  size: i.option.size?.table,
2260
- onSizeChange: a(l).table.getList,
2261
- onCurrentChange: a(l).table.getList
2266
+ onSizeChange: o(l).table.getList,
2267
+ onCurrentChange: o(l).table.getList
2262
2268
  }, i.option.page?.pagination || {}, D(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0),
2263
- i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (f(), b("div", {
2269
+ i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (u(), y("div", {
2264
2270
  key: 1,
2265
2271
  class: j(["refresh-btn", [i.option.size?.search]]),
2266
- onClick: c[6] || (c[6] = //@ts-ignore
2267
- (...n) => a(l).table.getList && a(l).table.getList(...n))
2272
+ onClick: p[6] || (p[6] = //@ts-ignore
2273
+ (...n) => o(l).table.getList && o(l).table.getList(...n))
2268
2274
  }, [
2269
2275
  z(Pe)
2270
2276
  ], 2)) : k("", !0)
@@ -2276,16 +2282,16 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2276
2282
  F("div", {
2277
2283
  class: j(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
2278
2284
  }, [
2279
- ke((f(), h(a(be), v({
2280
- data: a(l).table.data,
2285
+ ke((u(), h(o(ye), v({
2286
+ data: o(l).table.data,
2281
2287
  border: i.option.table?.border === void 0 ? !0 : i.option.table?.border,
2282
- onSelectionChange: a(l).table.selection.change,
2283
- onSortChange: a(l).table.sort.change,
2284
- "expand-row-keys": a(l).table.expand.rowKeys,
2285
- onExpandChange: a(l).table.expand.change
2288
+ onSelectionChange: o(l).table.selection.change,
2289
+ onSortChange: o(l).table.sort.change,
2290
+ "expand-row-keys": o(l).table.expand.rowKeys,
2291
+ onExpandChange: o(l).table.expand.change
2286
2292
  }, i.option.table, D(i.option.table?.on || {})), {
2287
2293
  default: m(() => [
2288
- (typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || a(r)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (f(), h(a(te), v({
2294
+ (typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || o(r)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (u(), h(o(te), v({
2289
2295
  key: 0,
2290
2296
  type: "selection",
2291
2297
  width: "40",
@@ -2294,104 +2300,104 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2294
2300
  "show-overflow-tooltip": !1,
2295
2301
  className: "cc1-form-selectable-column"
2296
2302
  }, typeof i.option.table?.selectable == "object" ? i.option.table?.selectable : {}, D(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.on || {} : {})), null, 16)) : k("", !0),
2297
- z(Ge, {
2298
- conf: a(l),
2299
- columnList: a(l).table.column.list,
2303
+ z(Xe, {
2304
+ conf: o(l),
2305
+ columnList: o(l).table.column.list,
2300
2306
  option: i.option
2301
2307
  }, oe({ _: 2 }, [
2302
- L(p.$slots, (n, d) => ({
2308
+ A(c.$slots, (n, d) => ({
2303
2309
  name: d,
2304
2310
  fn: m((V) => [
2305
- C(p.$slots, d, Ce(ve(V || {})))
2311
+ C(c.$slots, d, Ce(ve(V || {})))
2306
2312
  ])
2307
2313
  }))
2308
2314
  ]), 1032, ["conf", "columnList", "option"]),
2309
- a(r)(i.option.table?.add) || a(r)(i.option.table?.update) || a(r)(i.option.table?.delete) || a(r)(i.option.table?.view) || p.$slots["table-op-left"] || p.$slots["table-op-right"] ? (f(), h(a(te), v({
2315
+ o(r)(i.option.table?.add) || o(r)(i.option.table?.update) || o(r)(i.option.table?.delete) || o(r)(i.option.table?.view) || c.$slots["table-op-left"] || c.$slots["table-op-right"] ? (u(), h(o(te), v({
2310
2316
  key: 1,
2311
- width: a(l).table.op.width(a(r)(i.option.table?.add), a(r)(i.option.table?.update), a(r)(i.option.table?.delete), a(r)(i.option.table?.view), p.$slots["table-op-left"], p.$slots["table-op-right"]),
2317
+ width: o(l).table.op.width(o(r)(i.option.table?.add), o(r)(i.option.table?.update), o(r)(i.option.table?.delete), o(r)(i.option.table?.view), c.$slots["table-op-left"], c.$slots["table-op-right"]),
2312
2318
  align: "center",
2313
2319
  fixed: "right"
2314
2320
  }, i.option.table?.operate), {
2315
2321
  header: m(() => [
2316
- C(p.$slots, "table-header-op", {}, () => [
2317
- $(E(a(y).tCurd("operation")), 1)
2322
+ C(c.$slots, "table-header-op", {}, () => [
2323
+ $(O(o(b).tCurd("operation")), 1)
2318
2324
  ])
2319
2325
  ]),
2320
2326
  default: m(({ row: n }) => [
2321
- z(a(N), {
2327
+ z(o(K), {
2322
2328
  size: i.option.size?.table
2323
2329
  }, {
2324
2330
  default: m(() => [
2325
- C(p.$slots, "table-op-left", { row: n }),
2326
- i.option.table?.inlineEdit && a(l).inlineEdit.data === n ? (f(), b(S, { key: 0 }, [
2327
- z(a(T), {
2331
+ C(c.$slots, "table-op-left", { row: n }),
2332
+ o(l).update.type === o(f).Update && i.option.table?.inlineEdit && o(l).update.form[t.option.table?.rowKey] === n[t.option.table?.rowKey] ? (u(), y(S, { key: 0 }, [
2333
+ z(o(M), {
2328
2334
  link: "",
2329
2335
  type: "info",
2330
- onClick: a(l).inlineEdit.close
2336
+ onClick: o(l).update.close
2331
2337
  }, {
2332
2338
  default: m(() => [
2333
- $(E(a(y).tCurd("cancel")), 1)
2339
+ $(O(o(b).tCurd("cancel")), 1)
2334
2340
  ]),
2335
2341
  _: 1
2336
2342
  }, 8, ["onClick"]),
2337
- z(a(T), {
2343
+ z(o(M), {
2338
2344
  link: "",
2339
2345
  type: "primary",
2340
- onClick: a(l).update.submit,
2341
- loading: a(l).update.loading
2346
+ onClick: o(l).update.submit,
2347
+ loading: o(l).update.loading
2342
2348
  }, {
2343
2349
  default: m(() => [
2344
- $(E(a(y).tCurd("confirm")), 1)
2350
+ $(O(o(b).tCurd("confirm")), 1)
2345
2351
  ]),
2346
2352
  _: 1
2347
2353
  }, 8, ["onClick", "loading"]),
2348
- C(p.$slots, "table-op-edit-right", { row: n })
2349
- ], 64)) : (f(), b(S, { key: 1 }, [
2350
- a(r)(i.option.table?.add, n) ? (f(), h(a(T), {
2354
+ C(c.$slots, "table-op-edit-right", { row: n })
2355
+ ], 64)) : (u(), y(S, { key: 1 }, [
2356
+ o(r)(i.option.table?.add, n) ? (u(), h(o(M), {
2351
2357
  key: 0,
2352
2358
  link: "",
2353
2359
  type: "primary",
2354
- onClick: (d) => a(l).update.open(a(u).Add, n)
2360
+ onClick: (d) => o(l).update.open(o(f).Add, n)
2355
2361
  }, {
2356
2362
  default: m(() => [
2357
- $(E(a(y).tCurd("add")), 1)
2363
+ $(O(o(b).tCurd("add")), 1)
2358
2364
  ]),
2359
2365
  _: 2
2360
2366
  }, 1032, ["onClick"])) : k("", !0),
2361
- a(r)(i.option.table?.view, n) ? (f(), h(a(T), {
2367
+ o(r)(i.option.table?.view, n) ? (u(), h(o(M), {
2362
2368
  key: 1,
2363
2369
  link: "",
2364
2370
  type: "primary",
2365
- onClick: (d) => a(l).update.open(a(u).View, n)
2371
+ onClick: (d) => o(l).update.open(o(f).View, n)
2366
2372
  }, {
2367
2373
  default: m(() => [
2368
- $(E(a(y).tCurd("view")), 1)
2374
+ $(O(o(b).tCurd("view")), 1)
2369
2375
  ]),
2370
2376
  _: 2
2371
2377
  }, 1032, ["onClick"])) : k("", !0),
2372
- a(r)(i.option.table?.update, n) ? (f(), h(a(T), {
2378
+ o(r)(i.option.table?.update, n) ? (u(), h(o(M), {
2373
2379
  key: 2,
2374
2380
  link: "",
2375
2381
  type: "warning",
2376
- onClick: (d) => a(l).update.open(a(u).Update, n)
2382
+ onClick: (d) => o(l).update.open(o(f).Update, n)
2377
2383
  }, {
2378
2384
  default: m(() => [
2379
- $(E(a(y).tCurd("edit")), 1)
2385
+ $(O(o(b).tCurd("edit")), 1)
2380
2386
  ]),
2381
2387
  _: 2
2382
2388
  }, 1032, ["onClick"])) : k("", !0),
2383
- a(r)(i.option.table?.delete, n) ? (f(), h(a(T), {
2389
+ o(r)(i.option.table?.delete, n) ? (u(), h(o(M), {
2384
2390
  key: 3,
2385
2391
  link: "",
2386
2392
  type: "danger",
2387
- onClick: (d) => a(l).remove.open([n])
2393
+ onClick: (d) => o(l).remove.open([n])
2388
2394
  }, {
2389
2395
  default: m(() => [
2390
- $(E(a(y).tCurd("delete")), 1)
2396
+ $(O(o(b).tCurd("delete")), 1)
2391
2397
  ]),
2392
2398
  _: 2
2393
2399
  }, 1032, ["onClick"])) : k("", !0),
2394
- C(p.$slots, "table-op-right", { row: n })
2400
+ C(c.$slots, "table-op-right", { row: n })
2395
2401
  ], 64))
2396
2402
  ]),
2397
2403
  _: 2
@@ -2402,58 +2408,58 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2402
2408
  ]),
2403
2409
  _: 3
2404
2410
  }, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
2405
- [g, a(l).table.loading]
2411
+ [g, o(l).table.loading]
2406
2412
  ])
2407
2413
  ], 2)
2408
2414
  ], 2),
2409
- F("div", dt, [
2410
- (i.option.page?.show === void 0 || i.option.page?.show) && !a(l).page.showTools ? (f(), h(a(ie), v({
2415
+ F("div", ut, [
2416
+ (i.option.page?.show === void 0 || i.option.page?.show) && !o(l).page.showTools ? (u(), h(o(ie), v({
2411
2417
  key: 0,
2412
- "current-page": a(l).page.num,
2413
- "onUpdate:currentPage": c[7] || (c[7] = (n) => a(l).page.num = n),
2414
- "page-size": a(l).page.size,
2415
- "onUpdate:pageSize": c[8] || (c[8] = (n) => a(l).page.size = n),
2418
+ "current-page": o(l).page.num,
2419
+ "onUpdate:currentPage": p[7] || (p[7] = (n) => o(l).page.num = n),
2420
+ "page-size": o(l).page.size,
2421
+ "onUpdate:pageSize": p[8] || (p[8] = (n) => o(l).page.size = n),
2416
2422
  background: "",
2417
- "page-sizes": a(l).page.sizeList,
2418
- "pager-count": a(l).page.pagerCount,
2419
- layout: a(l).page.layout,
2420
- total: a(l).page.total,
2423
+ "page-sizes": o(l).page.sizeList,
2424
+ "pager-count": o(l).page.pagerCount,
2425
+ layout: o(l).page.layout,
2426
+ total: o(l).page.total,
2421
2427
  size: i.option.size?.table,
2422
- onSizeChange: a(l).table.getList,
2423
- onCurrentChange: a(l).table.getList
2428
+ onSizeChange: o(l).table.getList,
2429
+ onCurrentChange: o(l).table.getList
2424
2430
  }, i.option.page?.pagination || {}, D(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : k("", !0)
2425
2431
  ])
2426
2432
  ], 2),
2427
- C(p.$slots, "box-right")
2433
+ C(c.$slots, "box-right")
2428
2434
  ], 2),
2429
- z(a(ee), v({
2430
- modelValue: a(l).update.show,
2431
- "onUpdate:modelValue": c[9] || (c[9] = (n) => a(l).update.show = n),
2432
- title: a(l).update.title,
2433
- "before-close": a(l).update.close
2435
+ z(o(ee), v({
2436
+ modelValue: o(l).update.show,
2437
+ "onUpdate:modelValue": p[9] || (p[9] = (n) => o(l).update.show = n),
2438
+ title: o(l).update.title,
2439
+ "before-close": o(l).update.close
2434
2440
  }, i.option.dialog), {
2435
2441
  footer: m(() => [
2436
- F("span", ut, [
2437
- z(a(N), {
2442
+ F("span", ft, [
2443
+ z(o(K), {
2438
2444
  size: i.option.size?.form
2439
2445
  }, {
2440
2446
  default: m(() => [
2441
- z(a(T), {
2442
- onClick: a(l).update.close
2447
+ z(o(M), {
2448
+ onClick: o(l).update.close
2443
2449
  }, {
2444
2450
  default: m(() => [
2445
- $(E(a(y).tCurd("close")), 1)
2451
+ $(O(o(b).tCurd("close")), 1)
2446
2452
  ]),
2447
2453
  _: 1
2448
2454
  }, 8, ["onClick"]),
2449
- a(l).update.type !== a(u).View ? (f(), h(a(T), {
2455
+ o(l).update.type !== o(f).View ? (u(), h(o(M), {
2450
2456
  key: 0,
2451
2457
  type: "primary",
2452
- onClick: a(l).update.submit,
2453
- loading: a(l).update.loading
2458
+ onClick: o(l).update.submit,
2459
+ loading: o(l).update.loading
2454
2460
  }, {
2455
2461
  default: m(() => [
2456
- $(E(a(y).tCurd("submit")), 1)
2462
+ $(O(o(b).tCurd("submit")), 1)
2457
2463
  ]),
2458
2464
  _: 1
2459
2465
  }, 8, ["onClick", "loading"])) : k("", !0)
@@ -2463,54 +2469,54 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2463
2469
  ])
2464
2470
  ]),
2465
2471
  default: m(() => [
2466
- z(a(N), {
2472
+ z(o(K), {
2467
2473
  ref_key: "ruleFormRef",
2468
2474
  ref: s,
2469
- model: a(l).update.form,
2470
- rules: a(l).update.rules,
2475
+ model: o(l).update.form,
2476
+ rules: o(l).update.rules,
2471
2477
  size: i.option.size?.form
2472
2478
  }, {
2473
2479
  default: m(() => [
2474
- a(l).update.showContent ? (f(!0), b(S, { key: 0 }, L(a(l).update.formColumn, (n) => (f(), b(S, null, [
2475
- a(r)(
2480
+ o(l).update.showContent ? (u(!0), y(S, { key: 0 }, A(o(l).update.formColumn, (n) => (u(), y(S, null, [
2481
+ o(r)(
2476
2482
  (() => {
2477
2483
  const d = [], V = (w) => {
2478
- w?.item?.children ? V(w.item.children) : d.push(...w.map((A) => A.item?.show?.form));
2484
+ w?.item?.children ? V(w.item.children) : d.push(...w.map((T) => T.item?.show?.form));
2479
2485
  };
2480
2486
  return V(n), d;
2481
2487
  })(),
2482
- a(l).update.form,
2483
- a(l).update.type
2484
- ) ? (f(), b("div", {
2488
+ o(l).update.form,
2489
+ o(l).update.type
2490
+ ) ? (u(), y("div", {
2485
2491
  key: 0,
2486
2492
  class: j(["row curd-row", {
2487
2493
  stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
2488
2494
  }])
2489
2495
  }, [
2490
- C(p.$slots, "form-start", {
2491
- row: a(l).update.form
2496
+ C(c.$slots, "form-start", {
2497
+ row: o(l).update.form
2492
2498
  }),
2493
- (f(!0), b(S, null, L(n, (d) => (f(), b(S, null, [
2494
- a(r)(d.item.show?.form, a(l).update.form, a(l).update.type) ? (f(), b("div", {
2499
+ (u(!0), y(S, null, A(n, (d) => (u(), y(S, null, [
2500
+ o(r)(d.item.show?.form, o(l).update.form, o(l).update.type) ? (u(), y("div", {
2495
2501
  key: 0,
2496
- class: j([d.item.form.span > 0 ? `col-${a(l).getColumnSpan(d, n)}` : "col", `form-item-col-${d.item.key}`])
2502
+ class: j([d.item.form.span > 0 ? `col-${o(l).getColumnSpan(d, n)}` : "col", `form-item-col-${d.item.key}`])
2497
2503
  }, [
2498
- (f(!0), b(S, null, L(d.item.children ? d.children : [d], (V) => (f(), h(_e, {
2504
+ (u(!0), y(S, null, A(d.item.children ? d.children : [d], (V) => (u(), h(et, {
2499
2505
  key: V.item.key,
2500
- conf: a(l),
2506
+ conf: o(l),
2501
2507
  item: V
2502
2508
  }, oe({ _: 2 }, [
2503
- L(p.$slots, (w, A) => ({
2504
- name: A,
2509
+ A(c.$slots, (w, T) => ({
2510
+ name: T,
2505
2511
  fn: m((B) => [
2506
- C(p.$slots, A, v({ ref_for: !0 }, B || {}))
2512
+ C(c.$slots, T, v({ ref_for: !0 }, B || {}))
2507
2513
  ])
2508
2514
  }))
2509
2515
  ]), 1032, ["conf", "item"]))), 128))
2510
2516
  ], 2)) : k("", !0)
2511
2517
  ], 64))), 256)),
2512
- C(p.$slots, "form-end", {
2513
- row: a(l).update.form
2518
+ C(c.$slots, "form-end", {
2519
+ row: o(l).update.form
2514
2520
  })
2515
2521
  ], 2)) : k("", !0)
2516
2522
  ], 64))), 256)) : k("", !0)
@@ -2520,33 +2526,33 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2520
2526
  ]),
2521
2527
  _: 3
2522
2528
  }, 16, ["modelValue", "title", "before-close"]),
2523
- z(a(ee), {
2524
- modelValue: a(l).remove.show,
2525
- "onUpdate:modelValue": c[10] || (c[10] = (n) => a(l).remove.show = n),
2526
- title: a(l).remove.title,
2529
+ z(o(ee), {
2530
+ modelValue: o(l).remove.show,
2531
+ "onUpdate:modelValue": p[10] || (p[10] = (n) => o(l).remove.show = n),
2532
+ title: o(l).remove.title,
2527
2533
  "close-on-click-modal": !1
2528
2534
  }, {
2529
2535
  footer: m(() => [
2530
- F("span", ft, [
2531
- z(a(N), {
2536
+ F("span", pt, [
2537
+ z(o(K), {
2532
2538
  size: i.option.size?.form
2533
2539
  }, {
2534
2540
  default: m(() => [
2535
- z(a(T), {
2536
- onClick: a(l).remove.close
2541
+ z(o(M), {
2542
+ onClick: o(l).remove.close
2537
2543
  }, {
2538
2544
  default: m(() => [
2539
- $(E(a(y).tCurd("close")), 1)
2545
+ $(O(o(b).tCurd("close")), 1)
2540
2546
  ]),
2541
2547
  _: 1
2542
2548
  }, 8, ["onClick"]),
2543
- z(a(T), {
2549
+ z(o(M), {
2544
2550
  type: "danger",
2545
- onClick: a(l).remove.submit,
2546
- loading: a(l).remove.loading
2551
+ onClick: o(l).remove.submit,
2552
+ loading: o(l).remove.loading
2547
2553
  }, {
2548
2554
  default: m(() => [
2549
- $(E(a(y).tCurd("confirmDelete")), 1)
2555
+ $(O(o(b).tCurd("confirmDelete")), 1)
2550
2556
  ]),
2551
2557
  _: 1
2552
2558
  }, 8, ["onClick", "loading"])
@@ -2556,7 +2562,7 @@ const Je = /* @__PURE__ */ pe(Ne, [["render", He]]), We = { class: "row flex-cen
2556
2562
  ])
2557
2563
  ]),
2558
2564
  default: m(() => [
2559
- F("div", null, E(a(y).tCurd("confirmDeleteMessage", a(l).remove.items.length)), 1)
2565
+ F("div", null, O(o(b).tCurd("confirmDeleteMessage", o(l).remove.items.length)), 1)
2560
2566
  ]),
2561
2567
  _: 1
2562
2568
  }, 8, ["modelValue", "title"]),
@@ -2576,64 +2582,64 @@ class bt {
2576
2582
  * @param href - 文件的远程地址
2577
2583
  * @param name - 下载后的文件名,默认 `'download.png'`
2578
2584
  */
2579
- static async download(o, u = "download.png") {
2585
+ static async download(a, f = "download.png") {
2580
2586
  const t = document.createElement("a");
2581
- t.style.display = "none", t.href = o, t.setAttribute("download", u), typeof t.download > "u" && t.setAttribute("target", "_blank"), document.body.appendChild(t), t.click(), document.body.removeChild(t), window.URL.revokeObjectURL(o);
2587
+ t.style.display = "none", t.href = a, t.setAttribute("download", f), typeof t.download > "u" && t.setAttribute("target", "_blank"), document.body.appendChild(t), t.click(), document.body.removeChild(t), window.URL.revokeObjectURL(a);
2582
2588
  }
2583
2589
  /**
2584
2590
  * 将json对象或者json数组导出为json文件保存
2585
2591
  * @param data
2586
2592
  * @param name
2587
2593
  */
2588
- static exportJSONFile = (o, u) => {
2589
- const t = new Blob([JSON.stringify(o)], { type: "application/json" }), r = URL.createObjectURL(t), l = document.createElement("a");
2590
- l.href = r, l.download = `${u || "config"}.json`, l.click();
2594
+ static exportJSONFile = (a, f) => {
2595
+ const t = new Blob([JSON.stringify(a)], { type: "application/json" }), r = URL.createObjectURL(t), l = document.createElement("a");
2596
+ l.href = r, l.download = `${f || "config"}.json`, l.click();
2591
2597
  };
2592
2598
  /**
2593
2599
  * 导入文件内容,默认为json
2594
2600
  * @param param
2595
2601
  * @returns
2596
2602
  */
2597
- static importFile = async (o) => new Promise((u, t) => {
2603
+ static importFile = async (a) => new Promise((f, t) => {
2598
2604
  const r = document.createElement("input");
2599
2605
  r.type = "file";
2600
- const l = o?.accept || ".json";
2606
+ const l = a?.accept || ".json";
2601
2607
  r.accept = l, r.style.display = "none", r.onchange = (e) => {
2602
2608
  const s = e.target.files[0];
2603
2609
  if (!s) {
2604
2610
  U.fail("未选择文件"), t("未选择文件");
2605
2611
  return;
2606
2612
  }
2607
- const p = new FileReader();
2608
- p.onload = async (c) => {
2609
- const g = l == ".json" ? JSON.parse(c.target.result) : c.target.result;
2610
- u(g);
2611
- }, p.onerror = () => {
2613
+ const c = new FileReader();
2614
+ c.onload = async (p) => {
2615
+ const g = l == ".json" ? JSON.parse(p.target.result) : p.target.result;
2616
+ f(g);
2617
+ }, c.onerror = () => {
2612
2618
  U.fail("文件读取失败"), t("文件读取失败");
2613
- }, p.readAsText(s), document.body.removeChild(r);
2619
+ }, c.readAsText(s), document.body.removeChild(r);
2614
2620
  }, document.body.appendChild(r), r.click();
2615
2621
  });
2616
2622
  }
2617
- const ct = (i, o) => {
2618
- if (i.component("TCurd", pt), i.component("TFormList", ne), i.component("TColumn", Ae), o?.customComponent) {
2619
- M.customComponent = o.customComponent;
2620
- for (const u in o.customComponent)
2621
- i.component(u, o.customComponent[u]);
2623
+ const mt = (i, a) => {
2624
+ if (i.component("TCurd", ct), i.component("TFormList", ne), i.component("TColumn", Te), a?.customComponent) {
2625
+ L.customComponent = a.customComponent;
2626
+ for (const f in a.customComponent)
2627
+ i.component(f, a.customComponent[f]);
2622
2628
  }
2623
- }, gt = {
2624
- install: ct
2629
+ }, wt = {
2630
+ install: mt
2625
2631
  };
2626
2632
  export {
2627
2633
  P as ArrUtil,
2628
- Te as ExcelUtil,
2629
- Ae as TColumn,
2630
- pt as TCurd,
2634
+ Me as ExcelUtil,
2635
+ Te as TColumn,
2636
+ ct as TCurd,
2631
2637
  bt as TFile,
2632
- M as TForm,
2633
- O as TFormConfig,
2634
- y as TFormI18n,
2638
+ L as TForm,
2639
+ E as TFormConfig,
2640
+ b as TFormI18n,
2635
2641
  ne as TFormList,
2636
2642
  U as TSys,
2637
- gt as default,
2638
- ct as install
2643
+ wt as default,
2644
+ mt as install
2639
2645
  };