cc1-form 1.3.1 → 1.3.2

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