cc1-form 1.1.37 → 1.1.38

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 ue, ElLoading as fe, ElForm as N, ElFormItem as G, ElInput as Q, ElSwitch as ee, ElSelect as W, ElOption as B, ElTreeSelect as ie, ElDatePicker as te, ElDialog as Z, ElButton as F, ElTableColumn as x, ElRadioGroup as ce, ElRadio as pe, ElDropdown as me, ElDropdownMenu as he, ElDropdownItem as Y, ElPagination as ae, ElTable as be } from "element-plus";
1
+ import { ElMessage as ue, ElLoading as fe, ElForm as N, ElFormItem as G, ElInput as Q, ElSwitch as ee, ElSelect as W, ElOption as K, ElTreeSelect as ne, ElDatePicker as te, ElDialog as Z, ElButton as F, ElTableColumn as x, ElRadioGroup as ce, ElRadio as pe, ElDropdown as me, ElDropdownMenu as he, ElDropdownItem as Y, ElPagination as le, ElTable as ge } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as H, reactive as oe, onMounted as ne, resolveComponent as X, createElementBlock as w, createCommentVNode as C, openBlock as f, renderSlot as k, createElementVNode as O, createVNode as V, withCtx as h, createTextVNode as E, Fragment as S, renderList as L, createBlock as b, normalizeClass as R, normalizeStyle as se, ref as J, nextTick as ge, unref as o, mergeProps as v, toHandlers as $, resolveDynamicComponent as q, toDisplayString as U, getCurrentInstance as ye, createSlots as _, withKeys as we, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
4
- class D {
3
+ import { defineComponent as J, reactive as oe, onMounted as ie, resolveComponent as X, createElementBlock as w, createCommentVNode as C, openBlock as f, renderSlot as k, createElementVNode as O, createVNode as V, withCtx as h, createTextVNode as D, Fragment as S, renderList as L, createBlock as g, normalizeClass as I, normalizeStyle as se, ref as H, nextTick as be, unref as a, mergeProps as v, toHandlers as E, resolveDynamicComponent as q, toDisplayString as $, getCurrentInstance as ye, createSlots as _, resolveDirective as we, withDirectives as ke, normalizeProps as Ce, guardReactiveProps as ve } from "vue";
4
+ class U {
5
5
  /**
6
6
  * Vue Router 实例,需在应用初始化时赋值
7
7
  */
@@ -15,7 +15,7 @@ class D {
15
15
  */
16
16
  static getRouterPath = () => this.router.currentRoute.value.path;
17
17
  static EDialog = {
18
- Insert: "Insert",
18
+ Add: "Add",
19
19
  Update: "Update",
20
20
  View: "View",
21
21
  Remove: "Remove"
@@ -26,13 +26,13 @@ class D {
26
26
  * @param data 数据
27
27
  * @returns 是否显示
28
28
  */
29
- static isFun = (l, ...d) => Array.isArray(l) ? l.some((e) => typeof e == "function" ? e(...d) : e) : typeof l == "function" ? l(...d) : l;
29
+ static isFun = (t, ...d) => Array.isArray(t) ? t.some((e) => typeof e == "function" ? e(...d) : e) : typeof t == "function" ? t(...d) : t;
30
30
  /**
31
31
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
32
32
  */
33
33
  static getRouterParams = () => {
34
- const l = this.router.currentRoute.value.query || {}, d = this.router.currentRoute.value.params || {};
35
- return Object.keys(l).length ? l : Object.keys(d).length ? d : {};
34
+ const t = this.router.currentRoute.value.query || {}, d = this.router.currentRoute.value.params || {};
35
+ return Object.keys(t).length ? t : Object.keys(d).length ? d : {};
36
36
  };
37
37
  /**
38
38
  * 模块赋值
@@ -42,10 +42,10 @@ class D {
42
42
  * 加载模块
43
43
  * @param module
44
44
  */
45
- static loadModule = async (l) => {
46
- if (!D.moduleObj[l])
47
- throw new Error(`模块${l}未加载,请赋值如:TSys.moduleObj = { ${l}: ()=>import('${l}') }`);
48
- const d = await D.moduleObj[l]();
45
+ static loadModule = async (t) => {
46
+ if (!U.moduleObj[t])
47
+ throw new Error(`模块${t}未加载,请赋值如:TSys.moduleObj = { ${t}: ()=>import('${t}') }`);
48
+ const d = await U.moduleObj[t]();
49
49
  return d.default ?? d;
50
50
  };
51
51
  /**
@@ -62,19 +62,19 @@ class D {
62
62
  * @param type 消息类型
63
63
  * @param options 其他选项
64
64
  */
65
- static showMessage(l, d, e = {}) {
66
- const i = Date.now();
67
- if (!this.tipMessages[l] || i - this.tipMessages[l] > this.tipMessagesGap) {
68
- this.tipMessages[l] = i;
69
- const t = Object.assign(
65
+ static showMessage(t, d, e = {}) {
66
+ const n = Date.now();
67
+ if (!this.tipMessages[t] || n - this.tipMessages[t] > this.tipMessagesGap) {
68
+ this.tipMessages[t] = n;
69
+ const o = Object.assign(
70
70
  {
71
- message: l,
71
+ message: t,
72
72
  type: d
73
73
  },
74
74
  e
75
75
  );
76
- ue(t), setTimeout(() => {
77
- delete this.tipMessages[l];
76
+ ue(o), setTimeout(() => {
77
+ delete this.tipMessages[t];
78
78
  }, this.tipMessagesGap);
79
79
  }
80
80
  }
@@ -83,16 +83,16 @@ class D {
83
83
  * @param content
84
84
  * @param options
85
85
  */
86
- static fail = (l, d = {}) => {
87
- this.showMessage(l, "error", d);
86
+ static fail = (t, d = {}) => {
87
+ this.showMessage(t, "error", d);
88
88
  };
89
89
  /**
90
90
  * 成功提示
91
91
  * @param content
92
92
  * @param options
93
93
  */
94
- static success = (l, d = {}) => {
95
- this.showMessage(l, "success", d);
94
+ static success = (t, d = {}) => {
95
+ this.showMessage(t, "success", d);
96
96
  };
97
97
  static loadingObj = null;
98
98
  static loadingTimer = null;
@@ -101,9 +101,9 @@ class D {
101
101
  * @param show
102
102
  * @param text
103
103
  */
104
- static loading = (l = !0, d = "Loading...") => {
104
+ static loading = (t = !0, d = "Loading...") => {
105
105
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
106
- l ? this.loadingObj = fe.service({
106
+ t ? this.loadingObj = fe.service({
107
107
  lock: !0,
108
108
  text: d,
109
109
  background: "rgba(0, 0, 0, 0.3)"
@@ -115,42 +115,42 @@ class D {
115
115
  * @param url 地址
116
116
  * @param isCenter 是否居中
117
117
  */
118
- static openUrl = (l, d = !0) => {
118
+ static openUrl = (t, d = !0) => {
119
119
  if (d) {
120
- let e = screen.width / 2 - 500, i = screen.height / 2 - 800 / 2 - 30;
120
+ let e = screen.width / 2 - 500, n = screen.height / 2 - 800 / 2 - 30;
121
121
  window.open(
122
- l,
122
+ t,
123
123
  "_blank",
124
- "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + i + ", left=" + e
124
+ "toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + n + ", left=" + e
125
125
  );
126
126
  } else
127
- window.open(l, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
127
+ window.open(t, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
128
128
  };
129
129
  /**
130
130
  * 根据dom id截图并返回图片数据
131
131
  * @param param
132
132
  * @returns
133
133
  */
134
- static getImgPic = (l) => new Promise(async (d, e) => {
135
- let i = document.getElementById(l.id);
136
- const t = await D.loadModule("html2canvas");
134
+ static getImgPic = (t) => new Promise(async (d, e) => {
135
+ let n = document.getElementById(t.id);
136
+ const o = await U.loadModule("html2canvas");
137
137
  try {
138
- t(i, {
138
+ o(n, {
139
139
  logging: !1,
140
140
  allowTaint: !0,
141
141
  scale: window.devicePixelRatio,
142
- width: l.windowWidth,
143
- height: l.windowHeight,
144
- windowWidth: l.windowWidth,
145
- windowHeight: l.windowHeight,
142
+ width: t.windowWidth,
143
+ height: t.windowHeight,
144
+ windowWidth: t.windowWidth,
145
+ windowHeight: t.windowHeight,
146
146
  useCORS: !0,
147
147
  backgroundColor: "#ffffff00"
148
- }).then(function(a) {
149
- let r = a.toDataURL("image/png");
148
+ }).then(function(l) {
149
+ let r = l.toDataURL("image/png");
150
150
  d(r);
151
151
  });
152
- } catch (a) {
153
- e(a);
152
+ } catch (l) {
153
+ e(l);
154
154
  }
155
155
  });
156
156
  }
@@ -489,8 +489,8 @@ class z {
489
489
  *
490
490
  * @param config - 需要覆盖的配置项(深度 Partial)
491
491
  */
492
- static setConfig = (l) => {
493
- z.config = ObjectUtil.deepMerge(z.config, l);
492
+ static setConfig = (t) => {
493
+ z.config = ObjectUtil.deepMerge(z.config, t);
494
494
  };
495
495
  }
496
496
  class j {
@@ -511,10 +511,10 @@ class j {
511
511
  * @param field - 字段的 key 值
512
512
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
513
513
  */
514
- static findOptions = (l, d) => {
515
- const e = l.column.find((t) => t.key === d), i = (t) => t.replace(/-([a-z])/g, (a, r) => r.toUpperCase());
514
+ static findOptions = (t, d) => {
515
+ const e = t.column.find((o) => o.key === d), n = (o) => o.replace(/-([a-z])/g, (l, r) => r.toUpperCase());
516
516
  if (e)
517
- return e.options[i(e.type)];
517
+ return e.options[n(e.type)];
518
518
  };
519
519
  /**
520
520
  * 更新组件数据
@@ -532,9 +532,9 @@ class j {
532
532
  }))
533
533
  )
534
534
  */
535
- static setOptionsData = (l, d, e) => {
536
- const i = j.findOptions(l, d);
537
- i && (i.data = e);
535
+ static setOptionsData = (t, d, e) => {
536
+ const n = j.findOptions(t, d);
537
+ n && (n.data = e);
538
538
  };
539
539
  static form = {
540
540
  openBefore: {
@@ -545,9 +545,9 @@ class j {
545
545
  * @param treeData 树形数据
546
546
  * @param option 组件配置
547
547
  */
548
- parentId: (l, d, e, i) => {
549
- const t = z.config.table.rowKey;
550
- l ? d.type === D.EDialog.Insert ? (d.form.parentId = l[t], d.form.sort = l.children.length + 1) : d.form.parentId = l.parentId.substring(l.parentId.lastIndexOf(",") + 1) : (d.form.parentId = "0", d.form.sort = e.length + 1), j.setOptionsData(i, "parentId", [{ [t]: "0", title: "根", children: e }]);
548
+ parentId: (t, d, e, n) => {
549
+ const o = z.config.table.rowKey;
550
+ t ? d.type === U.EDialog.Add ? (d.form.parentId = t[o], d.form.sort = t.children.length + 1) : d.form.parentId = t.parentId.substring(t.parentId.lastIndexOf(",") + 1) : (d.form.parentId = "0", d.form.sort = e.length + 1), j.setOptionsData(n, "parentId", [{ [o]: "0", title: "根", children: e }]);
551
551
  }
552
552
  }
553
553
  };
@@ -562,14 +562,14 @@ class P {
562
562
  * @param field 字段名
563
563
  * @param row 行数据
564
564
  */
565
- static setId = (l, d, e) => {
566
- d[l] || (d[l] = []);
567
- const i = z.config.table.rowKey;
568
- d[l].forEach((t) => {
569
- e.forEach((a) => {
570
- let r = a.default ?? "";
571
- a.type === "number" && (r = a.default ?? 0), a.type === "boolean" && (r = a.default ?? !1), a.type === "time" && (r = a.default ?? /* @__PURE__ */ new Date()), t[a.value] === void 0 && (t[a.value] = r);
572
- }), t[i] || (t[i] = P.getIdFun());
565
+ static setId = (t, d, e) => {
566
+ d[t] || (d[t] = []);
567
+ const n = z.config.table.rowKey;
568
+ d[t].forEach((o) => {
569
+ e.forEach((l) => {
570
+ let r = l.default ?? "";
571
+ l.type === "number" && (r = l.default ?? 0), l.type === "boolean" && (r = l.default ?? !1), l.type === "time" && (r = l.default ?? /* @__PURE__ */ new Date()), o[l.value] === void 0 && (o[l.value] = r);
572
+ }), o[n] || (o[n] = P.getIdFun());
573
573
  });
574
574
  };
575
575
  /**
@@ -579,19 +579,19 @@ class P {
579
579
  * @param itemFields 元素字段-如:[{label:'',value:''}]
580
580
  * @param callback 回调函数
581
581
  */
582
- static add = (l, d, e, i) => {
583
- const t = JSONUtil.cp(e);
584
- P.setId(l, d, e);
585
- const a = z.config.table.rowKey;
586
- d[l].push(
587
- t.reduce(
582
+ static add = (t, d, e, n) => {
583
+ const o = JSONUtil.cp(e);
584
+ P.setId(t, d, e);
585
+ const l = z.config.table.rowKey;
586
+ d[t].push(
587
+ o.reduce(
588
588
  (r, c) => {
589
589
  let m = c.default ?? "";
590
590
  return c.type === "number" && (m = c.default ?? 0), c.type === "boolean" && (m = c.default ?? !1), c.type === "time" && (m = c.default ?? /* @__PURE__ */ new Date()), r[c.value] = m, r;
591
591
  },
592
- { [a]: P.getIdFun() }
592
+ { [l]: P.getIdFun() }
593
593
  )
594
- ), i?.(d);
594
+ ), n?.(d);
595
595
  };
596
596
  /**
597
597
  * 删除数组元素
@@ -600,9 +600,9 @@ class P {
600
600
  * @param item 元素-如:{_id:''}
601
601
  * @param callback 回调函数
602
602
  */
603
- static remove = (l, d, e, i) => {
604
- const t = z.config.table.rowKey;
605
- d[l] = d[l].filter((a) => a[t] !== e[t]), i?.(d);
603
+ static remove = (t, d, e, n) => {
604
+ const o = z.config.table.rowKey;
605
+ d[t] = d[t].filter((l) => l[o] !== e[o]), n?.(d);
606
606
  };
607
607
  /**
608
608
  * 获取没有id的数据
@@ -610,21 +610,21 @@ class P {
610
610
  * @param childernField 子级字段-如:list、children
611
611
  * @returns 没有id的数据
612
612
  */
613
- static getNoIdData = (l, d) => {
614
- const e = JSONUtil.cp(l), i = z.config.table.rowKey;
615
- return e.forEach((t) => {
616
- t[i] && delete t[i], d && t[d] && P.getNoIdData(t[d], d);
613
+ static getNoIdData = (t, d) => {
614
+ const e = JSONUtil.cp(t), n = z.config.table.rowKey;
615
+ return e.forEach((o) => {
616
+ o[n] && delete o[n], d && o[d] && P.getNoIdData(o[d], d);
617
617
  }), e;
618
618
  };
619
619
  }
620
- const ze = {
620
+ const Ve = {
621
621
  key: 0,
622
622
  class: "column",
623
623
  style: { width: "100%", gap: "10px" }
624
- }, Ee = {
624
+ }, ze = {
625
625
  class: "row items-center",
626
626
  style: { gap: "10px", width: "100%" }
627
- }, le = /* @__PURE__ */ H({
627
+ }, ae = /* @__PURE__ */ J({
628
628
  __name: "list",
629
629
  props: {
630
630
  row: {
@@ -659,73 +659,73 @@ const ze = {
659
659
  }
660
660
  },
661
661
  emits: ["change"],
662
- setup(n, { emit: l }) {
663
- const d = n, e = oe({
662
+ setup(i, { emit: t }) {
663
+ const d = i, e = oe({
664
664
  show: !1,
665
- add: (t, a, r) => {
666
- P.add(t, a, r, () => {
667
- i("change");
665
+ add: (o, l, r) => {
666
+ P.add(o, l, r, () => {
667
+ n("change");
668
668
  });
669
669
  },
670
- remove: (t, a, r) => {
671
- P.remove(t, a, r, () => {
672
- i("change");
670
+ remove: (o, l, r) => {
671
+ P.remove(o, l, r, () => {
672
+ n("change");
673
673
  });
674
674
  }
675
675
  });
676
- ne(() => {
676
+ ie(() => {
677
677
  P.setId(d.field, d.row, d.itemFields), e.show = !0;
678
678
  });
679
- const i = l;
680
- return (t, a) => {
679
+ const n = t;
680
+ return (o, l) => {
681
681
  const r = X("el-button"), c = X("el-input");
682
- return e.show ? (f(), w("div", ze, [
683
- k(t.$slots, "list-start", { row: n.row }),
682
+ return e.show ? (f(), w("div", Ve, [
683
+ k(o.$slots, "list-start", { row: i.row }),
684
684
  O("div", null, [
685
685
  V(r, {
686
686
  link: "",
687
687
  type: "primary",
688
- onClick: a[0] || (a[0] = (m) => e.add(n.field, n.row, n.itemFields))
688
+ onClick: l[0] || (l[0] = (m) => e.add(i.field, i.row, i.itemFields))
689
689
  }, {
690
- default: h(() => a[2] || (a[2] = [
691
- E("添加")
690
+ default: h(() => l[2] || (l[2] = [
691
+ D("添加")
692
692
  ])),
693
693
  _: 1
694
694
  })
695
695
  ]),
696
- (f(!0), w(S, null, L(n.row[n.field], (m) => (f(), w("div", Ee, [
697
- k(t.$slots, "item-start", {
696
+ (f(!0), w(S, null, L(i.row[i.field], (m) => (f(), w("div", ze, [
697
+ k(o.$slots, "item-start", {
698
698
  item: m,
699
- row: n.row
699
+ row: i.row
700
700
  }),
701
- (f(!0), w(S, null, L(n.itemFields, (u) => (f(), b(c, {
701
+ (f(!0), w(S, null, L(i.itemFields, (u) => (f(), g(c, {
702
702
  modelValue: m[u.value],
703
703
  "onUpdate:modelValue": (s) => m[u.value] = s,
704
- style: se({ width: n.inputWidth }),
705
- class: R(n.inputClass),
706
- placeholder: u[n.label] || u[n.value],
707
- onChange: a[1] || (a[1] = (s) => i("change"))
704
+ style: se({ width: i.inputWidth }),
705
+ class: I(i.inputClass),
706
+ placeholder: u[i.label] || u[i.value],
707
+ onChange: l[1] || (l[1] = (s) => n("change"))
708
708
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
709
- k(t.$slots, "item-end", {
709
+ k(o.$slots, "item-end", {
710
710
  item: m,
711
- row: n.row
711
+ row: i.row
712
712
  }),
713
713
  V(r, {
714
714
  link: "",
715
715
  type: "danger",
716
- onClick: (u) => e.remove(n.field, n.row, m)
716
+ onClick: (u) => e.remove(i.field, i.row, m)
717
717
  }, {
718
- default: h(() => a[3] || (a[3] = [
719
- E("删除")
718
+ default: h(() => l[3] || (l[3] = [
719
+ D("删除")
720
720
  ])),
721
721
  _: 2
722
722
  }, 1032, ["onClick"])
723
723
  ]))), 256)),
724
- k(t.$slots, "list-end", { row: n.row })
724
+ k(o.$slots, "list-end", { row: i.row })
725
725
  ])) : C("", !0);
726
726
  };
727
727
  }
728
- }), De = { class: "row curd-row" }, Se = /* @__PURE__ */ H({
728
+ }), De = { class: "row curd-row" }, Ee = /* @__PURE__ */ J({
729
729
  __name: "column",
730
730
  props: {
731
731
  /**
@@ -741,133 +741,133 @@ const ze = {
741
741
  default: ""
742
742
  }
743
743
  },
744
- setup(n, { expose: l }) {
745
- const d = D.isFun, e = D.EDialog, i = J(), t = n, a = oe({
744
+ setup(i, { expose: t }) {
745
+ const d = U.isFun, e = U.EDialog, n = H(), o = i, l = oe({
746
746
  rules: {},
747
747
  show: !0,
748
748
  form: {},
749
749
  formDefault: {},
750
750
  formColumn: [],
751
- getDisabled: (r) => r.disabled?.[(t.type || e.Insert) === e.Insert ? "create" : "update"],
751
+ getDisabled: (r) => r.disabled?.[(o.type || e.Add) === e.Add ? "create" : "update"],
752
752
  initColumnForm: async () => {
753
- const r = t.option;
754
- a.formColumn = [];
755
- const c = [], m = t.option.form?.maxSpan || 12, u = t.option.form?.defaultSpan || m;
753
+ const r = o.option;
754
+ l.formColumn = [];
755
+ const c = [], m = o.option.form?.maxSpan || 12, u = o.option.form?.defaultSpan || m;
756
756
  let s = [];
757
757
  const p = (y) => {
758
- if (a.formDefault[y.key] = y.value, y.isForm) {
758
+ if (l.formDefault[y.key] = y.value, y.isForm) {
759
759
  y.form = y.form || { span: u }, y.form.span = y.form.span ?? u;
760
- let I = y.form.span, M = s.reduce((A, de) => A + de.span, I);
761
- const T = s.length;
762
- s.push({ item: y, span: I }), (T === 1 && s[0].span === 0 || M >= m || I === 0 && T > 1) && (c.push(s), s = []), y.rules && (a.rules[y.key] = y.rules);
760
+ let T = y.form.span, A = s.reduce((B, de) => B + de.span, T);
761
+ const M = s.length;
762
+ s.push({ item: y, span: T }), (M === 1 && s[0].span === 0 || A >= m || T === 0 && M > 1) && (c.push(s), s = []), y.rules && (l.rules[y.key] = y.rules);
763
763
  }
764
764
  };
765
765
  r.column.forEach((y) => {
766
766
  y.isForm = !0, p(y);
767
- }), s.length > 0 && c.push(s), a.formColumn = c, a.form = JSONUtil.cp(a.formDefault);
767
+ }), s.length > 0 && c.push(s), l.formColumn = c, l.form = JSONUtil.cp(l.formDefault);
768
768
  },
769
769
  init: async () => {
770
- a.show = !1, await ge(), a.initColumnForm();
770
+ l.show = !1, await be(), l.initColumnForm();
771
771
  }
772
772
  });
773
- return a.initColumnForm(), l({
774
- ref: i,
775
- conf: a
776
- }), (r, c) => (f(), b(o(N), {
773
+ return l.initColumnForm(), t({
774
+ ref: n,
775
+ conf: l
776
+ }), (r, c) => (f(), g(a(N), {
777
777
  ref_key: "ruleFormRef",
778
- ref: i,
779
- model: a.form,
780
- rules: a.rules
778
+ ref: n,
779
+ model: l.form,
780
+ rules: l.rules
781
781
  }, {
782
782
  default: h(() => [
783
- a.show ? (f(!0), w(S, { key: 0 }, L(a.formColumn, (m) => (f(), w("div", De, [
783
+ l.show ? (f(!0), w(S, { key: 0 }, L(l.formColumn, (m) => (f(), w("div", De, [
784
784
  k(r.$slots, "form-start", {
785
- row: a.form
785
+ row: l.form
786
786
  }),
787
787
  (f(!0), w(S, null, L(m, (u) => (f(), w(S, null, [
788
- o(d)(u.item.show?.form, a.form) ?? !0 ? (f(), w("div", {
788
+ a(d)(u.item.show?.form, l.form) ?? !0 ? (f(), w("div", {
789
789
  key: 0,
790
- class: R(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
790
+ class: I(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
791
791
  }, [
792
- V(o(G), {
792
+ V(a(G), {
793
793
  label: u.item.label,
794
794
  prop: u.item.key,
795
795
  "label-width": u.item.form?.labelWidth || "100px"
796
796
  }, {
797
797
  default: h(() => [
798
798
  k(r.$slots, "form-" + u.item.key + "-start", {
799
- row: a.form,
799
+ row: l.form,
800
800
  item: u.item
801
801
  }),
802
802
  k(r.$slots, "form-" + u.item.key, {
803
- row: a.form,
803
+ row: l.form,
804
804
  item: u.item
805
805
  }, () => [
806
- u.item.type === "input" ? (f(), b(o(Q), v({
806
+ u.item.type === "input" ? (f(), g(a(Q), v({
807
807
  key: 0,
808
- modelValue: a.form[u.item.key],
809
- "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
808
+ modelValue: l.form[u.item.key],
809
+ "onUpdate:modelValue": (s) => l.form[u.item.key] = s,
810
810
  ref_for: !0
811
- }, u.item.options?.input, $(u.item.options?.input?.on || {}), {
812
- disabled: a.getDisabled(u.item)
813
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (f(), b(o(ee), v({
811
+ }, u.item.options?.input, E(u.item.options?.input?.on || {}), {
812
+ disabled: l.getDisabled(u.item)
813
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (f(), g(a(ee), v({
814
814
  key: 1,
815
- modelValue: a.form[u.item.key],
816
- "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
815
+ modelValue: l.form[u.item.key],
816
+ "onUpdate:modelValue": (s) => l.form[u.item.key] = s,
817
817
  ref_for: !0
818
- }, u.item.options?.switch, $(u.item.options?.switch?.on || {}), {
819
- disabled: a.getDisabled(u.item)
820
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (f(), b(o(W), v({
818
+ }, u.item.options?.switch, E(u.item.options?.switch?.on || {}), {
819
+ disabled: l.getDisabled(u.item)
820
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (f(), g(a(W), v({
821
821
  key: 2,
822
- modelValue: a.form[u.item.key],
823
- "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
822
+ modelValue: l.form[u.item.key],
823
+ "onUpdate:modelValue": (s) => l.form[u.item.key] = s,
824
824
  ref_for: !0
825
- }, u.item.options?.select, $(u.item.options?.select?.on || {}), {
826
- disabled: a.getDisabled(u.item),
825
+ }, u.item.options?.select, E(u.item.options?.select?.on || {}), {
826
+ disabled: l.getDisabled(u.item),
827
827
  style: { width: "100%" }
828
828
  }), {
829
829
  default: h(() => [
830
- (f(!0), w(S, null, L(u.item.options?.select?.data, (s) => (f(), b(o(B), {
830
+ (f(!0), w(S, null, L(u.item.options?.select?.data, (s) => (f(), g(a(K), {
831
831
  key: s.value,
832
832
  label: s.label,
833
833
  value: s.value
834
834
  }, null, 8, ["label", "value"]))), 128))
835
835
  ]),
836
836
  _: 2
837
- }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (f(), b(le, v({
837
+ }, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (f(), g(ae, v({
838
838
  key: 3,
839
- row: a.form,
839
+ row: l.form,
840
840
  field: u.item.key,
841
841
  ref_for: !0
842
- }, u.item.options?.list, $(u.item.options?.list?.on || {}), {
843
- disabled: a.getDisabled(u.item),
842
+ }, u.item.options?.list, E(u.item.options?.list?.on || {}), {
843
+ disabled: l.getDisabled(u.item),
844
844
  style: { width: "100%" }
845
- }), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (f(), b(o(ie), v({
845
+ }), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (f(), g(a(ne), v({
846
846
  key: 4,
847
- modelValue: a.form[u.item.key],
848
- "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
847
+ modelValue: l.form[u.item.key],
848
+ "onUpdate:modelValue": (s) => l.form[u.item.key] = s,
849
849
  ref_for: !0
850
- }, u.item.options?.treeSelect, $(u.item.options?.treeSelect?.on || {}), {
851
- disabled: a.getDisabled(u.item),
850
+ }, u.item.options?.treeSelect, E(u.item.options?.treeSelect?.on || {}), {
851
+ disabled: l.getDisabled(u.item),
852
852
  style: { width: "100%" }
853
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (f(), b(o(te), v({
853
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (f(), g(a(te), v({
854
854
  key: 5,
855
- modelValue: a.form[u.item.key],
856
- "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
855
+ modelValue: l.form[u.item.key],
856
+ "onUpdate:modelValue": (s) => l.form[u.item.key] = s,
857
857
  ref_for: !0
858
- }, u.item.options?.datetime, $(u.item.options?.datetime?.on || {}), {
859
- disabled: a.getDisabled(u.item)
860
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && o(j).customComponent[u.item.type] ? (f(), b(q(o(j).customComponent[u.item.type]), v({
858
+ }, u.item.options?.datetime, E(u.item.options?.datetime?.on || {}), {
859
+ disabled: l.getDisabled(u.item)
860
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && a(j).customComponent[u.item.type] ? (f(), g(q(a(j).customComponent[u.item.type]), v({
861
861
  key: 6,
862
- modelValue: a.form[u.item.key],
863
- "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
862
+ modelValue: l.form[u.item.key],
863
+ "onUpdate:modelValue": (s) => l.form[u.item.key] = s,
864
864
  ref_for: !0
865
- }, u.item.options?.[u.item.type], $(u.item.options?.[u.item.type]?.on || {}), {
866
- disabled: a.getDisabled(u.item)
865
+ }, u.item.options?.[u.item.type], E(u.item.options?.[u.item.type]?.on || {}), {
866
+ disabled: l.getDisabled(u.item)
867
867
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
868
868
  ]),
869
869
  k(r.$slots, "form-" + u.item.key + "-end", {
870
- row: a.form,
870
+ row: l.form,
871
871
  item: u.item
872
872
  })
873
873
  ]),
@@ -876,7 +876,7 @@ const ze = {
876
876
  ], 2)) : C("", !0)
877
877
  ], 64))), 256)),
878
878
  k(r.$slots, "form-end", {
879
- row: a.form
879
+ row: l.form
880
880
  })
881
881
  ]))), 256)) : C("", !0)
882
882
  ]),
@@ -884,7 +884,7 @@ const ze = {
884
884
  }, 8, ["model", "rules"]));
885
885
  }
886
886
  });
887
- const Ue = {
887
+ const Se = {
888
888
  search: "搜索",
889
889
  add: "新增",
890
890
  edit: "编辑",
@@ -917,26 +917,26 @@ const Ue = {
917
917
  confirmModify: "确认修改",
918
918
  confirmSwitchMessage: "确认要修改吗?"
919
919
  };
920
- class g {
920
+ class b {
921
921
  /** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
922
- static t(l, ...d) {
923
- if (typeof l == "function")
924
- return l(...d);
925
- l = String(l);
922
+ static t(t, ...d) {
923
+ if (typeof t == "function")
924
+ return t(...d);
925
+ t = String(t);
926
926
  let e = 0;
927
- return l.replace(/{([^}]+)}/g, (i, t) => e < d.length ? String(d[e++]) : `{${t}}`);
927
+ return t.replace(/{([^}]+)}/g, (n, o) => e < d.length ? String(d[e++]) : `{${o}}`);
928
928
  }
929
- static setI18n = (l) => {
930
- g.curd = ObjectUtil.deepMerge(g.curd, l);
929
+ static setI18n = (t) => {
930
+ b.curd = ObjectUtil.deepMerge(b.curd, t);
931
931
  };
932
932
  /** 解析curd国际化值 */
933
- static tCurd(l, ...d) {
934
- return this.t(this.curd[l], ...d);
933
+ static tCurd(t, ...d) {
934
+ return this.t(this.curd[t], ...d);
935
935
  }
936
936
  /** curd表单 */
937
- static curd = Ue;
937
+ static curd = Se;
938
938
  }
939
- class $e {
939
+ class Ue {
940
940
  /**
941
941
  * 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
942
942
  *
@@ -944,20 +944,20 @@ class $e {
944
944
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
945
945
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
946
946
  */
947
- static exportToExcel = async (l, d, e) => {
948
- if (!l || l.length === 0) return;
949
- const i = await D.loadModule("xlsx"), t = l.map((c) => {
947
+ static exportToExcel = async (t, d, e) => {
948
+ if (!t || t.length === 0) return;
949
+ const n = await U.loadModule("xlsx"), o = t.map((c) => {
950
950
  const m = {};
951
951
  return d.forEach((u) => {
952
952
  m[u.label] = c[u.key];
953
953
  }), m;
954
- }), a = i.utils.json_to_sheet(t), r = i.utils.book_new();
955
- i.utils.book_append_sheet(r, a, "Sheet1"), e ? typeof e == "function" && (e = e()) : e = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(r, `${e}.xlsx`);
954
+ }), l = n.utils.json_to_sheet(o), r = n.utils.book_new();
955
+ n.utils.book_append_sheet(r, l, "Sheet1"), e ? typeof e == "function" && (e = e()) : e = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, n.writeFile(r, `${e}.xlsx`);
956
956
  };
957
957
  }
958
- const K = D.EDialog, Oe = (n) => {
959
- const l = J(), d = J(), e = oe({
960
- option: n.option,
958
+ const R = U.EDialog, $e = (i) => {
959
+ const t = H(), d = H(), e = oe({
960
+ option: i.option,
961
961
  /** 查询区域相关配置对象 */
962
962
  search: {
963
963
  /** 查询表单列集合 */
@@ -970,22 +970,22 @@ const K = D.EDialog, Oe = (n) => {
970
970
  /** 搜索表单默认值 */
971
971
  formDefault: {},
972
972
  /** 获取占位符 */
973
- getPlaceholder: (i, t = g.tCurd("placeholderInput")) => i.text?.search?.placeholder === void 0 ? `${t}${i.label}` : i.text?.search?.placeholder,
973
+ getPlaceholder: (n, o = b.tCurd("placeholderInput")) => n.text?.search?.placeholder === void 0 ? `${o}${n.label}` : n.text?.search?.placeholder,
974
974
  /** 组装实际要搜索的数据对象 */
975
975
  getFormData: () => {
976
- let i = {};
977
- n.option.column.forEach((a) => {
978
- (typeof a.show?.search == "function" ? a.show?.search(e.search.form) : a.show?.search) && (i[a.key] = e.search.form[a.key]);
976
+ let n = {};
977
+ i.option.column.forEach((l) => {
978
+ (typeof l.show?.search == "function" ? l.show?.search(e.search.form) : l.show?.search) && (n[l.key] = e.search.form[l.key]);
979
979
  });
980
- const t = n.option.search?.before?.(i);
981
- return t && (i = t), i;
980
+ const o = i.option.search?.before?.(n);
981
+ return o && (n = o), n;
982
982
  },
983
983
  /** 重置搜索表单 */
984
984
  reset: () => {
985
- const i = e.search.formDefault;
986
- Object.keys(i).forEach((t) => {
987
- n.option.search?.resetMode === "none" ? i[t] = void 0 : i[t] = e.search.formDefault[t];
988
- }), e.search.form = JSONUtil.cp(i), e.page.num = 1, n.option.init !== !1 && e.table.getList();
985
+ const n = e.search.formDefault;
986
+ Object.keys(n).forEach((o) => {
987
+ i.option.search?.resetMode === "none" ? n[o] = void 0 : n[o] = e.search.formDefault[o];
988
+ }), e.search.form = JSONUtil.cp(n), e.page.num = 1, i.option.init !== !1 && e.table.getList();
989
989
  },
990
990
  /** 提交搜索表单 */
991
991
  submit: () => {
@@ -999,22 +999,22 @@ const K = D.EDialog, Oe = (n) => {
999
999
  /** 总条数 */
1000
1000
  total: 0,
1001
1001
  /** 分页控件的布局方式 */
1002
- layout: n.option.page?.layout || z.config.pagination.layout,
1002
+ layout: i.option.page?.layout || z.config.pagination.layout,
1003
1003
  /** 是否显示到工具栏 默认不显示 配置后show属性无效 */
1004
- showTools: n.option.page?.showTools || z.config.pagination.showTools,
1004
+ showTools: i.option.page?.showTools || z.config.pagination.showTools,
1005
1005
  /** 当前每页条数 */
1006
- size: n.option.page?.size || z.config.pagination.size,
1006
+ size: i.option.page?.size || z.config.pagination.size,
1007
1007
  /** 支持切换的每页条数选项 */
1008
- sizeList: n.option.page?.sizeList || z.config.pagination.pageSizes,
1008
+ sizeList: i.option.page?.sizeList || z.config.pagination.pageSizes,
1009
1009
  /** 分页器计数 */
1010
- pagerCount: n.option.page?.pagerCount || z.config.pagination.pagerCount
1010
+ pagerCount: i.option.page?.pagerCount || z.config.pagination.pagerCount
1011
1011
  },
1012
1012
  /** 表格区域相关配置对象 */
1013
1013
  table: {
1014
1014
  /** 操作列相关配置 */
1015
1015
  op: {
1016
1016
  /** 动态计算操作列宽度 */
1017
- width: (...i) => i.filter((a) => a).length * 30 + 60
1017
+ width: (...n) => n.filter((l) => l).length * 30 + 60
1018
1018
  },
1019
1019
  /** 表格加载中状态 */
1020
1020
  loading: !1,
@@ -1027,20 +1027,20 @@ const K = D.EDialog, Oe = (n) => {
1027
1027
  /** 已经展开的行key集合 */
1028
1028
  rowKeys: [],
1029
1029
  /** 行展开触发变更函数 */
1030
- change: (i, t) => {
1030
+ change: (n, o) => {
1031
1031
  },
1032
1032
  /** 全部展开/收起 */
1033
1033
  all: () => {
1034
1034
  if (e.table.expand.isExpand)
1035
1035
  e.table.expand.rowKeys = [];
1036
1036
  else {
1037
- const i = (t) => {
1038
- let a = [];
1039
- return t.forEach((r) => {
1040
- a.push(r[n.option.table.rowKey]), r.children && r.children.length > 0 && (a = a.concat(i(r.children)));
1041
- }), a;
1037
+ const n = (o) => {
1038
+ let l = [];
1039
+ return o.forEach((r) => {
1040
+ l.push(r[i.option.table.rowKey]), r.children && r.children.length > 0 && (l = l.concat(n(r.children)));
1041
+ }), l;
1042
1042
  };
1043
- e.table.expand.rowKeys = i(e.table.data);
1043
+ e.table.expand.rowKeys = n(e.table.data);
1044
1044
  }
1045
1045
  e.table.expand.isExpand = !e.table.expand.isExpand;
1046
1046
  }
@@ -1060,31 +1060,31 @@ const K = D.EDialog, Oe = (n) => {
1060
1060
  /** 获取数据列表接口实现 */
1061
1061
  getList: async () => {
1062
1062
  e.table.loading = !0;
1063
- const i = n.option.api.list;
1063
+ const n = i.option.api.list;
1064
1064
  try {
1065
1065
  await e.initApiData("init");
1066
- let t = {};
1066
+ let o = {};
1067
1067
  if (e.table.sort.prop) {
1068
1068
  const { props: p, order: y } = z.config.table.sort;
1069
- t = {
1069
+ o = {
1070
1070
  [p.field]: e.table.sort.prop,
1071
1071
  [y.field]: e.table.sort.order
1072
1072
  };
1073
1073
  }
1074
- const a = await i({
1074
+ const l = await n({
1075
1075
  [z.config.page.size]: e.page.size,
1076
1076
  [z.config.page.num]: e.page.num,
1077
1077
  ...e.search.getFormData(),
1078
- ...t
1079
- }), r = z.config.result, c = a.data || { [r.list]: a };
1078
+ ...o
1079
+ }), r = z.config.result, c = l.data || { [r.list]: l };
1080
1080
  let m = (Array.isArray(c[r.list]), c[r.list]);
1081
- const u = e.update.formColumn.flat(), s = JSONUtil.cp(m).map((p) => (Object.keys(p).forEach((I) => {
1082
- const M = u.find((T) => T.item.key === I);
1083
- M && ["select", "radio"].includes(M.item.type) && (M.item.table.format || (M.item.table.format = (T) => M.item.options[M.item.type].data?.find((A) => A.value == T[I])?.label || T[I]));
1081
+ const u = e.update.formColumn.flat(), s = JSONUtil.cp(m).map((p) => (Object.keys(p).forEach((T) => {
1082
+ const A = u.find((M) => M.item.key === T);
1083
+ A && ["select", "radio"].includes(A.item.type) && (A.item.table.format || (A.item.table.format = (M) => A.item.options[A.item.type].data?.find((B) => B.value == M[T])?.label || M[T]));
1084
1084
  }), p));
1085
- e.table.data = n.option.data ? await n.option.data(s, m) : s, e.page.total = c[r.total] || 0;
1086
- } catch (t) {
1087
- console.error(t);
1085
+ e.table.data = i.option.data ? await i.option.data(s, m) : s, e.page.total = c[r.total] || 0;
1086
+ } catch (o) {
1087
+ console.error(o);
1088
1088
  } finally {
1089
1089
  e.table.loading = !1;
1090
1090
  }
@@ -1094,8 +1094,8 @@ const K = D.EDialog, Oe = (n) => {
1094
1094
  /** 已选数据项 */
1095
1095
  list: [],
1096
1096
  /** 选中状态回调 */
1097
- change: (i) => {
1098
- e.table.selection.list = i;
1097
+ change: (n) => {
1098
+ e.table.selection.list = n;
1099
1099
  }
1100
1100
  },
1101
1101
  /** 表格排序相关配置 */
@@ -1105,14 +1105,14 @@ const K = D.EDialog, Oe = (n) => {
1105
1105
  /** 当前排序顺序值 */
1106
1106
  order: "",
1107
1107
  /** 排序变更回调 */
1108
- change: (i) => {
1108
+ change: (n) => {
1109
1109
  z.config.table.sort.resetPage && (e.page.num = 1);
1110
- const t = z.config.table.sort;
1111
- if (t.change) {
1112
- t.change(i, e);
1110
+ const o = z.config.table.sort;
1111
+ if (o.change) {
1112
+ o.change(n, e);
1113
1113
  return;
1114
1114
  }
1115
- e.table.sort.prop = i.prop, i.order === null ? e.table.sort.order = "" : e.table.sort.order = i.order === "ascending" ? t.order.asc : t.order.desc, e.table.getList();
1115
+ e.table.sort.prop = n.prop, n.order === null ? e.table.sort.order = "" : e.table.sort.order = n.order === "ascending" ? o.order.asc : o.order.desc, e.table.getList();
1116
1116
  }
1117
1117
  }
1118
1118
  },
@@ -1121,45 +1121,45 @@ const K = D.EDialog, Oe = (n) => {
1121
1121
  /** 导出逻辑方法集合 */
1122
1122
  run: {
1123
1123
  /** 执行指定方式的导出(如select、page、all) */
1124
- start: async (i) => {
1125
- let t = await e.export.run[i](), a = n.option.column;
1124
+ start: async (n) => {
1125
+ let o = await e.export.run[n](), l = i.option.column;
1126
1126
  const r = JSONUtil.cp({
1127
- data: t,
1128
- columns: a
1129
- }), c = n.option.tools?.export || {};
1130
- c.before && c.before(r), $e.exportToExcel(r.data, r.columns, c.fileName);
1127
+ data: o,
1128
+ columns: l
1129
+ }), c = i.option.tools?.export || {};
1130
+ c.before && c.before(r), Ue.exportToExcel(r.data, r.columns, c.fileName);
1131
1131
  },
1132
1132
  /** 获取当前选中项进行导出 */
1133
1133
  select: () => {
1134
1134
  if (e.table.selection.list.length === 0)
1135
- throw D.fail(g.tCurd("selectDataToExport")), new Error(g.tCurd("selectDataToExport"));
1135
+ throw U.fail(b.tCurd("selectDataToExport")), new Error(b.tCurd("selectDataToExport"));
1136
1136
  return e.table.selection.list;
1137
1137
  },
1138
1138
  /** 导出当前页的数据 */
1139
1139
  page: () => {
1140
1140
  if (e.table.data.length === 0)
1141
- throw D.fail(g.tCurd("noData")), new Error(g.tCurd("noData"));
1141
+ throw U.fail(b.tCurd("noData")), new Error(b.tCurd("noData"));
1142
1142
  return e.table.data;
1143
1143
  },
1144
1144
  /** 导出所有数据 */
1145
1145
  all: async () => {
1146
1146
  e.export.loading = !0;
1147
1147
  try {
1148
- if (n.option.tools?.export?.all) {
1149
- await n.option.tools?.export?.all({
1148
+ if (i.option.tools?.export?.all) {
1149
+ await i.option.tools?.export?.all({
1150
1150
  [z.config.page.size]: e.page.size,
1151
1151
  [z.config.page.num]: e.page.num,
1152
1152
  ...e.search.getFormData()
1153
1153
  });
1154
1154
  return;
1155
1155
  }
1156
- const i = n.option.api.list, t = await i({
1156
+ const n = i.option.api.list, o = await n({
1157
1157
  [z.config.page.size]: 999999,
1158
1158
  [z.config.page.num]: 1
1159
1159
  });
1160
- return (t.data || { [z.config.result.list]: t })[z.config.result.list];
1161
- } catch (i) {
1162
- console.error(i);
1160
+ return (o.data || { [z.config.result.list]: o })[z.config.result.list];
1161
+ } catch (n) {
1162
+ console.error(n);
1163
1163
  } finally {
1164
1164
  e.export.loading = !1;
1165
1165
  }
@@ -1168,8 +1168,8 @@ const K = D.EDialog, Oe = (n) => {
1168
1168
  /** 导出时loading状态 */
1169
1169
  loading: !1,
1170
1170
  /** 执行导出操作的触发函数 */
1171
- click: (i) => {
1172
- e.export.loading || e.export.run.start(i);
1171
+ click: (n) => {
1172
+ e.export.loading || e.export.run.start(n);
1173
1173
  }
1174
1174
  },
1175
1175
  /** 表单增删改弹窗相关对象 */
@@ -1185,7 +1185,7 @@ const K = D.EDialog, Oe = (n) => {
1185
1185
  /** 弹窗loading */
1186
1186
  loading: !1,
1187
1187
  /** 当前操作类型,插入或修改 */
1188
- type: K.Insert,
1188
+ type: R.Add,
1189
1189
  /** 当前操作表单数据 */
1190
1190
  form: {},
1191
1191
  /** 表单默认值 */
@@ -1193,40 +1193,44 @@ const K = D.EDialog, Oe = (n) => {
1193
1193
  /** 表单所有列,二维数组结构按行分组 */
1194
1194
  formColumn: [],
1195
1195
  /** 判断是否禁用当前字段 */
1196
- getDisabled: (i) => e.update.type === K.View ? i.disabled?.view === void 0 ? !0 : i.disabled?.view : i.disabled?.[e.update.type === K.Insert ? "create" : "update"],
1196
+ getDisabled: (n) => e.update.type === R.View ? n.disabled?.view === void 0 ? !0 : n.disabled?.view : n.disabled?.[e.update.type === R.Add ? "create" : "update"],
1197
+ /** 获取表单组件绑定属性 */
1198
+ getBind: (n) => n.options?.[e.update.type === R.Add ? "formAdd" : "formUpdate"]?.[n.type] || n.options?.[n.type] || {},
1199
+ /** 获取表单组件事件属性 */
1200
+ getOn: (n) => n.options?.[e.update.type === R.Add ? "formAdd" : "formUpdate"]?.[n.type]?.on || n.options?.[n.type]?.on || {},
1197
1201
  /** 编辑相关数据与方法 */
1198
1202
  edit: {
1199
1203
  /** 当前编辑的数据原始项对象 */
1200
1204
  data: {},
1201
1205
  /** 返回编辑时与原值的变更数据,用于局部更新API */
1202
- getApiData: (i) => {
1203
- if (n.option.form?.editAll)
1204
- return i;
1205
- let t = {
1206
- [n.option.table?.rowKey]: e.update.edit.data[n.option.table?.rowKey]
1206
+ getApiData: (n) => {
1207
+ if (i.option.form?.editAll)
1208
+ return n;
1209
+ let o = {
1210
+ [i.option.table?.rowKey]: e.update.edit.data[i.option.table?.rowKey]
1207
1211
  };
1208
- return Object.keys(e.update.edit.data).forEach((a) => {
1209
- i[a] !== e.update.edit.data[a] && (t[a] = i[a]);
1210
- }), t;
1212
+ return Object.keys(e.update.edit.data).forEach((l) => {
1213
+ n[l] !== e.update.edit.data[l] && (o[l] = n[l]);
1214
+ }), o;
1211
1215
  }
1212
1216
  },
1213
1217
  view: {},
1214
1218
  /** 打开增改弹窗 */
1215
- open: (i, t) => {
1219
+ open: (n, o) => {
1216
1220
  e.update.showContent || FunUtil.throttle(async () => {
1217
- D.loading(!0);
1221
+ U.loading(!0);
1218
1222
  try {
1219
1223
  await e.initApiData("update");
1220
- const a = i === K.Insert;
1221
- if (!a && n.option.table?.inlineEdit) {
1222
- e.inlineEdit.open(t);
1224
+ const l = n === R.Add;
1225
+ if (!l && i.option.table?.inlineEdit) {
1226
+ e.inlineEdit.open(o);
1223
1227
  return;
1224
1228
  }
1225
- e.update.type = i, e.update.edit.data = t, e.update.title = g.tCurd(a ? "add" : i === K.View ? "view" : "edit"), e.update.form = JSONUtil.cp(a ? e.update.formDefault : t), await n.option.form?.openBefore?.(t, e.update), e.update.show = !0, e.update.showContent = !0, n.option.form?.openAfter?.(t, e.update);
1226
- } catch (a) {
1227
- console.error(a);
1229
+ e.update.type = n, e.update.edit.data = o, e.update.title = b.tCurd(l ? "add" : n === R.View ? "view" : "edit"), e.update.form = JSONUtil.cp(l ? e.update.formDefault : o), await i.option.form?.openBefore?.(o, e.update), e.inlineEdit.data || (e.update.show = !0), e.update.showContent = !0, i.option.form?.openAfter?.(o, e.update);
1230
+ } catch (l) {
1231
+ console.error(l);
1228
1232
  } finally {
1229
- D.loading(!1);
1233
+ U.loading(!1);
1230
1234
  }
1231
1235
  });
1232
1236
  },
@@ -1234,29 +1238,29 @@ const K = D.EDialog, Oe = (n) => {
1234
1238
  submit: () => {
1235
1239
  FunUtil.throttle(async () => {
1236
1240
  await d.value?.validate(async (r, c) => new Promise((m, u) => {
1237
- r || (D.fail(g.tCurd("checkFormData")), u(!1)), m();
1241
+ r || (U.fail(b.tCurd("checkFormData")), u(!1)), m();
1238
1242
  })), e.update.loading = !0;
1239
- const i = e.update.type === K.Insert ? n.option.api.create : n.option.api.update;
1243
+ const n = e.update.type === R.Add ? i.option.api.create : i.option.api.update;
1240
1244
  try {
1241
- await n.option.form?.submitBefore?.(e.update.form, e.update);
1245
+ await i.option.form?.submitBefore?.(e.update.form, e.update);
1242
1246
  } catch {
1243
1247
  e.update.loading = !1;
1244
1248
  return;
1245
1249
  }
1246
- let t = JSONUtil.cp(e.update.form);
1247
- delete t.children;
1248
- const a = new Set(n.option.column.filter((r) => r.type === "datetime").map((r) => r.key));
1249
- Object.keys(t).forEach((r) => {
1250
- if (a.has(r) && t[r] != null) {
1251
- const c = new Date(t[r]).getTime();
1252
- isNaN(c) || (t[r] = c);
1250
+ let o = JSONUtil.cp(e.update.form);
1251
+ delete o.children;
1252
+ const l = new Set(i.option.column.filter((r) => r.type === "datetime").map((r) => r.key));
1253
+ Object.keys(o).forEach((r) => {
1254
+ if (l.has(r) && o[r] != null) {
1255
+ const c = new Date(o[r]).getTime();
1256
+ isNaN(c) || (o[r] = c);
1253
1257
  }
1254
1258
  });
1255
1259
  try {
1256
- if (!i) return;
1257
- await i({
1258
- ...t
1259
- }), e.update.close(), await e.table.getList(), n.option.form?.submitAfter?.(t, e.update);
1260
+ if (!n) return;
1261
+ await n({
1262
+ ...o
1263
+ }), e.update.close(), await e.table.getList(), i.option.form?.submitAfter?.(o, e.update);
1260
1264
  } catch (r) {
1261
1265
  console.error(r);
1262
1266
  } finally {
@@ -1274,41 +1278,20 @@ const K = D.EDialog, Oe = (n) => {
1274
1278
  /** 行内编辑相关对象 */
1275
1279
  inlineEdit: {
1276
1280
  /** 行内编辑当前行对象 */
1277
- row: null,
1278
- /** 行内编辑表单数据副本 */
1279
- form: {},
1280
- /** 行内编辑loading */
1281
- loading: !1,
1281
+ data: null,
1282
1282
  /** 打开行内编辑 */
1283
- open: (i) => {
1284
- e.inlineEdit.row = i, e.inlineEdit.form = JSONUtil.cp(i);
1283
+ open: (n) => {
1284
+ e.inlineEdit.data = n, e.update.open(R.Update, n);
1285
1285
  },
1286
1286
  /** 关闭行内编辑 */
1287
1287
  close: () => {
1288
- e.inlineEdit.row = null, e.inlineEdit.form = {};
1289
- },
1290
- /** 行内保存提交 */
1291
- submit: () => {
1292
- FunUtil.throttle(async () => {
1293
- e.inlineEdit.loading = !0;
1294
- const i = n.option.api.update;
1295
- let t = JSONUtil.cp(e.inlineEdit.form);
1296
- delete t.children;
1297
- try {
1298
- if (!i) return;
1299
- await i({ ...t }), e.inlineEdit.close(), await e.table.getList(), D.success(g.tCurd("operationSuccess"));
1300
- } catch (a) {
1301
- console.error(a);
1302
- } finally {
1303
- e.inlineEdit.loading = !1;
1304
- }
1305
- });
1288
+ e.inlineEdit.data = null, e.update.close();
1306
1289
  }
1307
1290
  },
1308
1291
  /** 删除操作弹窗与数据对象 */
1309
1292
  remove: {
1310
1293
  /** 删除弹窗标题 */
1311
- title: g.tCurd("confirmDelete"),
1294
+ title: b.tCurd("confirmDelete"),
1312
1295
  /** 删除弹窗显示控制 */
1313
1296
  show: !1,
1314
1297
  /** 待删除数据项集合 */
@@ -1320,26 +1303,26 @@ const K = D.EDialog, Oe = (n) => {
1320
1303
  e.remove.show = !1;
1321
1304
  },
1322
1305
  /** 打开删除弹窗并设置待删除项 */
1323
- open: (i) => {
1324
- if (i.length === 0) {
1325
- D.fail(g.tCurd("selectDataToDelete"));
1306
+ open: (n) => {
1307
+ if (n.length === 0) {
1308
+ U.fail(b.tCurd("selectDataToDelete"));
1326
1309
  return;
1327
1310
  }
1328
- e.remove.items = i, e.remove.show = !0;
1311
+ e.remove.items = n, e.remove.show = !0;
1329
1312
  },
1330
1313
  /** 执行删除实际操作 */
1331
1314
  submit: () => {
1332
1315
  FunUtil.throttle(async () => {
1333
1316
  e.remove.loading = !0;
1334
- const i = n.option.api.delete;
1317
+ const n = i.option.api.delete;
1335
1318
  try {
1336
- if (!i) return;
1337
- await i({
1338
- [n.option.table?.rowKey]: e.remove.items.map((t) => t[n.option.table?.rowKey]),
1319
+ if (!n) return;
1320
+ await n({
1321
+ [i.option.table?.rowKey]: e.remove.items.map((o) => o[i.option.table?.rowKey]),
1339
1322
  items: e.remove.items
1340
- }), D.success(g.tCurd("operationSuccess")), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
1341
- } catch (t) {
1342
- console.error(t);
1323
+ }), U.success(b.tCurd("operationSuccess")), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
1324
+ } catch (o) {
1325
+ console.error(o);
1343
1326
  } finally {
1344
1327
  e.remove.loading = !1;
1345
1328
  }
@@ -1353,13 +1336,13 @@ const K = D.EDialog, Oe = (n) => {
1353
1336
  /** 下拉请求等数据缓存 */
1354
1337
  apiDataMap: {},
1355
1338
  /** 获取并绑定curd中所有下拉数据等远程依赖 */
1356
- initApiData: async (i) => {
1357
- const t = [], a = (r) => {
1339
+ initApiData: async (n) => {
1340
+ const o = [], l = (r) => {
1358
1341
  if (r.children && r.children.length) {
1359
- r.children.forEach((c) => a(c));
1342
+ r.children.forEach((c) => l(c));
1360
1343
  return;
1361
1344
  }
1362
- if (r.type === "select" && r.options?.select?.dataApi && r.options?.select?.dataApiConfig?.[i]) {
1345
+ if (r.type === "select" && r.options?.select?.dataApi && r.options?.select?.dataApiConfig?.[n]) {
1363
1346
  if (e.apiDataMap[r.key] && r.options?.select?.dataApiConfig?.once) return;
1364
1347
  const c = (async () => {
1365
1348
  try {
@@ -1371,20 +1354,20 @@ const K = D.EDialog, Oe = (n) => {
1371
1354
  } catch {
1372
1355
  }
1373
1356
  })();
1374
- t.push(c);
1357
+ o.push(c);
1375
1358
  }
1376
1359
  };
1377
- return n.option.column.forEach((r) => {
1378
- a(r);
1379
- }), await Promise.all(t), !0;
1360
+ return i.option.column.forEach((r) => {
1361
+ l(r);
1362
+ }), await Promise.all(o), !0;
1380
1363
  },
1381
1364
  /** 初始化curd配置(option默认值合并等) */
1382
1365
  initCurdConfig: () => {
1383
- const i = JSONUtil.cp(z.config);
1384
- i.table.emptyText = g.tCurd("noData"), n.option.size = n.option.size || {}, i.table.size = n.option.size.table || i.size.table, i.form.size = n.option.size.form || i.size.form, i.size.search = n.option.size.search || i.size.search;
1385
- const t = ObjectUtil.deepMerge(i, n.option || {});
1386
- Object.keys(t).forEach((a) => {
1387
- n.option[a] = t[a];
1366
+ const n = JSONUtil.cp(z.config);
1367
+ n.table.emptyText = b.tCurd("noData"), i.option.size = i.option.size || {}, n.table.size = i.option.size.table || n.size.table, n.form.size = i.option.size.form || n.size.form, n.size.search = i.option.size.search || n.size.search;
1368
+ const o = ObjectUtil.deepMerge(n, i.option || {});
1369
+ Object.keys(o).forEach((l) => {
1370
+ i.option[l] = o[l];
1388
1371
  });
1389
1372
  },
1390
1373
  /**
@@ -1393,40 +1376,42 @@ const K = D.EDialog, Oe = (n) => {
1393
1376
  * @returns
1394
1377
  */
1395
1378
  initColumnOptions: () => {
1396
- let i = JSONUtil.cp(z.config.columnConfig);
1397
- i.options = ObjectUtil.deepMerge(i.options, {
1379
+ let n = JSONUtil.cp(z.config.columnConfig);
1380
+ n.options = ObjectUtil.deepMerge(n.options, {
1398
1381
  switch: {
1399
- activeLabel: g.tCurd("switchOn"),
1400
- inactiveLabel: g.tCurd("switchOff")
1382
+ activeLabel: b.tCurd("switchOn"),
1383
+ inactiveLabel: b.tCurd("switchOff")
1401
1384
  }
1402
1385
  });
1403
- const t = (a) => {
1404
- for (const r in i) {
1386
+ const o = (l) => {
1387
+ for (const r in n) {
1405
1388
  if (r === "table") {
1406
- if (a.table = ObjectUtil.deepMerge(i.table, a.table || {}), a.children) {
1407
- a.children.forEach((c) => {
1408
- t(c);
1389
+ if (l.table = ObjectUtil.deepMerge(n.table, l.table || {}), l.children) {
1390
+ l.children.forEach((m) => {
1391
+ o(m);
1409
1392
  });
1410
1393
  return;
1411
1394
  }
1412
- } else r === "type" ? a.type = a.type || i.type : a[r] = ObjectUtil.deepMerge(i[r], a[r] || {});
1413
- a.options = a.options || {}, a.options[a.type] = a.options[a.type] || {}, a.options[a.type].size = n.option.size.form, a.options.search = a.options.search || JSONUtil.cp(a.options), a.options.search[a.type] = a.options.search[a.type] || {}, a.options.search[a.type].size = n.option.size.search, a.table = ObjectUtil.deepMerge(a.table, a.options[a.type].table || {});
1395
+ } else r === "type" ? l.type = l.type || n.type : l[r] = ObjectUtil.deepMerge(n[r], l[r] || {});
1396
+ l.options = l.options || {}, l.options[l.type] = l.options[l.type] || {}, l.options[l.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((m) => {
1397
+ l.options[m] = l.options[m] || JSONUtil.cp(l.options), l.options[m][l.type] = l.options[m][l.type] || {}, l.options[m][l.type].size = m === "search" ? i.option.size.search : i.option.size.form;
1398
+ }), l.table = ObjectUtil.deepMerge(l.table, l.options[l.type].table || {});
1414
1399
  }
1415
- a.type === "switch" && (a.options.switch.tableBeforeChange = async (r, c) => {
1416
- const m = a.options?.switch;
1400
+ l.type === "switch" && (l.options.switch.tableBeforeChange = async (r, c) => {
1401
+ const m = l.options?.switch;
1417
1402
  try {
1418
- await l.value?.open({
1419
- title: g.tCurd("confirmModify"),
1420
- content: g.tCurd("confirmSwitchMessage")
1403
+ await t.value?.open({
1404
+ title: b.tCurd("confirmModify"),
1405
+ content: b.tCurd("confirmSwitchMessage")
1421
1406
  }), e.table.loading = !0;
1422
1407
  try {
1423
- return n.option.api.update ? (await n.option.api.update({
1424
- [n.option.table?.rowKey]: c[n.option.table?.rowKey],
1408
+ return i.option.api.update ? (await i.option.api.update({
1409
+ [i.option.table?.rowKey]: c[i.option.table?.rowKey],
1425
1410
  [r]: c[r] === m.activeValue ? m.inactiveValue : m.activeValue,
1426
1411
  final(u, s, p) {
1427
1412
  e.table.loading = !1;
1428
1413
  }
1429
- }), e.table.loading = !1, D.success(g.tCurd("operationSuccess")), e.table.getList(), !0) : void 0;
1414
+ }), e.table.loading = !1, U.success(b.tCurd("operationSuccess")), e.table.getList(), !0) : void 0;
1430
1415
  } catch (u) {
1431
1416
  return console.error(u), !1;
1432
1417
  } finally {
@@ -1435,25 +1420,25 @@ const K = D.EDialog, Oe = (n) => {
1435
1420
  } catch {
1436
1421
  return !1;
1437
1422
  }
1438
- }), a.type === "treeSelect" && (a.options.treeSelect.rowKey = n.option.table?.rowKey, a.options.treeSelect.nodeKey = n.option.table?.rowKey);
1423
+ }), l.type === "treeSelect" && (l.options.treeSelect.rowKey = i.option.table?.rowKey, l.options.treeSelect.nodeKey = i.option.table?.rowKey);
1439
1424
  };
1440
- n.option.column.forEach(t), n.option.table?.column?.forEach(t);
1425
+ i.option.column.forEach(o), i.option.table?.column?.forEach(o);
1441
1426
  },
1442
- getColumnSpan: (i, t) => {
1443
- if (i.item.form?.spanCol) {
1444
- const a = z.config.form.defaultSpan, c = t.filter((m) => !D.isFun(m.item.show?.form, e.update.form, e.update.type)).reduce((m, u) => m + (u.item.form?.span || a), 0);
1445
- return (i.item?.form.span || a) + c;
1427
+ getColumnSpan: (n, o) => {
1428
+ if (n.item.form?.spanCol) {
1429
+ const l = z.config.form.defaultSpan, c = o.filter((m) => !U.isFun(m.item.show?.form, e.update.form, e.update.type)).reduce((m, u) => m + (u.item.form?.span || l), 0);
1430
+ return (n.item?.form.span || l) + c;
1446
1431
  }
1447
- return i.item.form.span;
1432
+ return n.item.form.span;
1448
1433
  },
1449
1434
  /** 初始化配置并生成表单列及默认值及规则 */
1450
1435
  initColumnForm: () => {
1451
- const i = n.option;
1436
+ const n = i.option;
1452
1437
  e.update.formColumn = [], e.table.column.show = {
1453
1438
  list: [],
1454
1439
  listSource: []
1455
1440
  };
1456
- const t = [], a = n.option.form?.maxSpan || 12, r = n.option.form?.defaultSpan || a / 2;
1441
+ const o = [], l = i.option.form?.maxSpan || 12, r = i.option.form?.defaultSpan || l / 2;
1457
1442
  let c = [];
1458
1443
  const m = (p) => {
1459
1444
  if (p.children) {
@@ -1464,61 +1449,61 @@ const K = D.EDialog, Oe = (n) => {
1464
1449
  }
1465
1450
  if (e.update.formDefault[p.key] = p.value, p.table.table && (p.show.table && e.table.column.show.list.push(p.key), p.table.table && e.table.column.show.listSource.push(p.key)), !(p.isForm && typeof p.show?.form == "boolean") || p.show?.form) {
1466
1451
  p.form = p.form || { span: r }, p.form.span = p.form.span ?? r;
1467
- let y = p.form.span, I = c.reduce((T, A) => T + A.span, y);
1468
- const M = c.length;
1469
- if (c.push({ item: p, span: y }), (M === 1 && c[0].span === 0 || I >= a || y === 0 && M > 1) && (t.push(c), c = []), p.rules) {
1470
- const T = {
1471
- input: g.tCurd("placeholderInput"),
1472
- select: g.tCurd("placeholderSelect")
1473
- }, A = (T[p.type] || T.input) + p.label;
1452
+ let y = p.form.span, T = c.reduce((M, B) => M + B.span, y);
1453
+ const A = c.length;
1454
+ if (c.push({ item: p, span: y }), (A === 1 && c[0].span === 0 || T >= l || y === 0 && A > 1) && (o.push(c), c = []), p.rules) {
1455
+ const M = {
1456
+ input: b.tCurd("placeholderInput"),
1457
+ select: b.tCurd("placeholderSelect")
1458
+ }, B = (M[p.type] || M.input) + p.label;
1474
1459
  e.update.rules[p.key] = typeof p.rules == "boolean" ? [
1475
1460
  {
1476
1461
  required: !0,
1477
- message: A,
1462
+ message: B,
1478
1463
  trigger: "blur"
1479
1464
  }
1480
1465
  ] : p.rules;
1481
1466
  }
1482
1467
  }
1483
1468
  }, u = (p, y) => {
1484
- p.isForm = y, Array.isArray(p.children) && p.children.forEach((I) => u(I, y));
1469
+ p.isForm = y, Array.isArray(p.children) && p.children.forEach((T) => u(T, y));
1485
1470
  };
1486
- i.column.forEach((p) => {
1471
+ n.column.forEach((p) => {
1487
1472
  p.isForm = !0, u(p, !0), m(p);
1488
- }), n.option.table?.column?.forEach((p) => {
1473
+ }), i.option.table?.column?.forEach((p) => {
1489
1474
  u(p, !1), m(p);
1490
- }), e.search.column.list = i.column.concat(i.table?.column || []), e.table.column.list = e.search.column.list.filter((p) => p.table?.table), e.search.column.list.sort((p, y) => p.sort?.search - y.sort?.search), e.table.column.list.sort((p, y) => p.sort?.table - y.sort?.table), c.length > 0 && t.push(c), e.update.formColumn = t;
1491
- const s = n.option.search?.formDefault;
1475
+ }), e.search.column.list = n.column.concat(n.table?.column || []), e.table.column.list = e.search.column.list.filter((p) => p.table?.table), e.search.column.list.sort((p, y) => p.sort?.search - y.sort?.search), e.table.column.list.sort((p, y) => p.sort?.table - y.sort?.table), c.length > 0 && o.push(c), e.update.formColumn = o;
1476
+ const s = i.option.search?.formDefault;
1492
1477
  s && Object.keys(s).forEach((p) => {
1493
1478
  e.search.formDefault[p] = s[p];
1494
- }), i.column.forEach((p) => {
1479
+ }), n.column.forEach((p) => {
1495
1480
  p.show?.search || (e.search.formDefault[p.key] = void 0);
1496
1481
  }), e.search.form = JSONUtil.cp(e.search.formDefault);
1497
1482
  }
1498
1483
  });
1499
- return e.init(), ne(() => {
1500
- n.option.init !== !1 && e.table.getList();
1501
- }), { conf: e, switchConfirmRef: l, ruleFormRef: d };
1502
- }, Fe = { class: "dialog-footer" }, Le = /* @__PURE__ */ H({
1484
+ return e.init(), ie(() => {
1485
+ i.option.init !== !1 && e.table.getList();
1486
+ }), { conf: e, switchConfirmRef: t, ruleFormRef: d };
1487
+ }, Oe = { class: "dialog-footer" }, Fe = /* @__PURE__ */ J({
1503
1488
  __name: "switchConfirm",
1504
1489
  props: {
1505
1490
  size: {}
1506
1491
  },
1507
- setup(n, { expose: l }) {
1508
- const d = J(!1), e = J("确认修改"), i = J("确认要修改状态吗?");
1509
- let t = null, a = null;
1510
- const r = (u) => (u?.title && (e.value = u.title), u?.content && (i.value = u.content), d.value = !0, new Promise((s, p) => {
1511
- t = s, a = p;
1492
+ setup(i, { expose: t }) {
1493
+ const d = H(!1), e = H("确认修改"), n = H("确认要修改状态吗?");
1494
+ let o = null, l = null;
1495
+ const r = (u) => (u?.title && (e.value = u.title), u?.content && (n.value = u.content), d.value = !0, new Promise((s, p) => {
1496
+ o = s, l = p;
1512
1497
  })), c = () => {
1513
- d.value = !1, t?.(!0), t = null, a = null;
1498
+ d.value = !1, o?.(!0), o = null, l = null;
1514
1499
  }, m = () => {
1515
- d.value = !1, a?.(new Error("用户取消操作")), t = null, a = null;
1500
+ d.value = !1, l?.(new Error("用户取消操作")), o = null, l = null;
1516
1501
  };
1517
- return l({
1502
+ return t({
1518
1503
  open: r
1519
1504
  }), (u, s) => {
1520
1505
  const p = X("el-form");
1521
- return f(), b(o(Z), {
1506
+ return f(), g(a(Z), {
1522
1507
  modelValue: d.value,
1523
1508
  "onUpdate:modelValue": s[0] || (s[0] = (y) => d.value = y),
1524
1509
  title: e.value,
@@ -1528,19 +1513,19 @@ const K = D.EDialog, Oe = (n) => {
1528
1513
  footer: h(() => [
1529
1514
  V(p, { size: u.size }, {
1530
1515
  default: h(() => [
1531
- O("span", Fe, [
1532
- V(o(F), { onClick: m }, {
1516
+ O("span", Oe, [
1517
+ V(a(F), { onClick: m }, {
1533
1518
  default: h(() => s[1] || (s[1] = [
1534
- E("取消")
1519
+ D("取消")
1535
1520
  ])),
1536
1521
  _: 1
1537
1522
  }),
1538
- V(o(F), {
1523
+ V(a(F), {
1539
1524
  type: "primary",
1540
1525
  onClick: c
1541
1526
  }, {
1542
1527
  default: h(() => s[2] || (s[2] = [
1543
- E("确认")
1528
+ D("确认")
1544
1529
  ])),
1545
1530
  _: 1
1546
1531
  })
@@ -1550,88 +1535,88 @@ const K = D.EDialog, Oe = (n) => {
1550
1535
  }, 8, ["size"])
1551
1536
  ]),
1552
1537
  default: h(() => [
1553
- O("div", null, U(i.value), 1)
1538
+ O("div", null, $(n.value), 1)
1554
1539
  ]),
1555
1540
  _: 1
1556
1541
  }, 8, ["modelValue", "title"]);
1557
1542
  };
1558
1543
  }
1559
- }), re = (n, l) => {
1560
- const d = n.__vccOpts || n;
1561
- for (const [e, i] of l)
1562
- d[e] = i;
1544
+ }), re = (i, t) => {
1545
+ const d = i.__vccOpts || i;
1546
+ for (const [e, n] of t)
1547
+ d[e] = n;
1563
1548
  return d;
1564
- }, Ie = {}, Me = {
1549
+ }, Le = {}, Te = {
1565
1550
  xmlns: "http://www.w3.org/2000/svg",
1566
1551
  viewBox: "0 0 1024 1024"
1567
1552
  };
1568
- function Te(n, l) {
1569
- return f(), w("svg", Me, l[0] || (l[0] = [
1553
+ function Ae(i, t) {
1554
+ return f(), w("svg", Te, t[0] || (t[0] = [
1570
1555
  O("path", {
1571
1556
  fill: "currentColor",
1572
1557
  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"
1573
1558
  }, null, -1)
1574
1559
  ]));
1575
1560
  }
1576
- const je = /* @__PURE__ */ re(Ie, [["render", Te]]), Re = {}, Pe = {
1561
+ const Me = /* @__PURE__ */ re(Le, [["render", Ae]]), je = {}, Ie = {
1577
1562
  "data-v-58697b5c": "",
1578
1563
  xmlns: "http://www.w3.org/2000/svg",
1579
1564
  viewBox: "0 0 1024 1024"
1580
1565
  };
1581
- function Ae(n, l) {
1582
- return f(), w("svg", Pe, l[0] || (l[0] = [
1566
+ function Re(i, t) {
1567
+ return f(), w("svg", Ie, t[0] || (t[0] = [
1583
1568
  O("path", {
1584
1569
  fill: "currentColor",
1585
1570
  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"
1586
1571
  }, null, -1)
1587
1572
  ]));
1588
1573
  }
1589
- const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-center table-header-label inline" }, Be = { class: "table-header-tooltip" }, Je = ["onClick", "innerHTML"], He = /* @__PURE__ */ H({
1574
+ const Pe = /* @__PURE__ */ re(je, [["render", Re]]), Be = { class: "row flex-center table-header-label inline" }, Ne = { class: "table-header-tooltip" }, Ke = ["onClick", "innerHTML"], He = /* @__PURE__ */ J({
1590
1575
  __name: "tableColumn",
1591
1576
  props: {
1592
1577
  conf: {},
1593
1578
  columnList: {},
1594
1579
  option: {}
1595
1580
  },
1596
- setup(n) {
1597
- const l = D.isFun, d = ye().type;
1598
- return (e, i) => {
1599
- const t = X("el-tooltip");
1600
- return f(!0), w(S, null, L(e.columnList, (a) => (f(), w(S, {
1601
- key: a.key
1581
+ setup(i) {
1582
+ const t = U.isFun, d = ye().type;
1583
+ return (e, n) => {
1584
+ const o = X("el-tooltip");
1585
+ return f(!0), w(S, null, L(e.columnList, (l) => (f(), w(S, {
1586
+ key: l.key
1602
1587
  }, [
1603
- e.conf.table.column.show.list.includes(a.key) ? (f(), b(o(x), v({
1588
+ e.conf.table.column.show.list.includes(l.key) ? (f(), g(a(x), v({
1604
1589
  key: 0,
1605
- prop: a.key,
1606
- label: a.label,
1590
+ prop: l.key,
1591
+ label: l.label,
1607
1592
  ref_for: !0
1608
- }, a.table), {
1593
+ }, l.table), {
1609
1594
  header: h(() => [
1610
- k(e.$slots, "table-header-" + a.key, { item: a }, () => [
1611
- O("div", Ne, [
1612
- a.table?.tooltip ? (f(), b(t, {
1595
+ k(e.$slots, "table-header-" + l.key, { item: l }, () => [
1596
+ O("div", Be, [
1597
+ l.table?.tooltip ? (f(), g(o, {
1613
1598
  key: 0,
1614
1599
  effect: "dark",
1615
- content: a.table?.tooltip,
1600
+ content: l.table?.tooltip,
1616
1601
  placement: "top"
1617
1602
  }, {
1618
1603
  default: h(() => [
1619
- O("span", Be, [
1620
- V(Ke)
1604
+ O("span", Ne, [
1605
+ V(Pe)
1621
1606
  ])
1622
1607
  ]),
1623
1608
  _: 2
1624
1609
  }, 1032, ["content"])) : C("", !0),
1625
- E(" " + U(a.label), 1)
1610
+ D(" " + $(l.label), 1)
1626
1611
  ])
1627
1612
  ])
1628
1613
  ]),
1629
1614
  default: h(({ row: r }) => [
1630
- a.children ? (f(), w(S, { key: 0 }, [
1631
- i[0] || (i[0] = E("   ")),
1632
- (f(), b(q(o(d)), {
1615
+ l.children ? (f(), w(S, { key: 0 }, [
1616
+ n[0] || (n[0] = D("   ")),
1617
+ (f(), g(q(a(d)), {
1633
1618
  conf: e.conf,
1634
- columnList: a.children,
1619
+ columnList: l.children,
1635
1620
  option: e.option
1636
1621
  }, _({ _: 2 }, [
1637
1622
  L(e.$slots, (c, m) => ({
@@ -1642,27 +1627,20 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1642
1627
  }))
1643
1628
  ]), 1032, ["conf", "columnList", "option"]))
1644
1629
  ], 64)) : (f(), w(S, { key: 1 }, [
1645
- o(l)(a.show?.form, e.conf.inlineEdit.form, o(D).EDialog.Update) && e.option.table?.inlineEdit && e.conf.inlineEdit.row === r && (a.type === "input" || a.type === "select") ? (f(), w(S, { key: 0 }, [
1646
- a.type === "input" ? (f(), b(o(Q), v({
1630
+ a(t)(l.show?.form, e.conf.update.form, a(U).EDialog.Update) && e.option.table?.inlineEdit && e.conf.inlineEdit.data === r && (l.type === "input" || l.type === "select") ? (f(), w(S, { key: 0 }, [
1631
+ l.type === "input" ? (f(), g(a(Q), v({
1647
1632
  key: 0,
1648
- modelValue: e.conf.inlineEdit.form[a.key],
1649
- "onUpdate:modelValue": (c) => e.conf.inlineEdit.form[a.key] = c,
1633
+ modelValue: e.conf.update.form[l.key],
1634
+ "onUpdate:modelValue": (c) => e.conf.update.form[l.key] = c,
1650
1635
  ref_for: !0
1651
- }, a.options?.input, {
1652
- size: "small",
1653
- style: { width: "100%" },
1654
- onKeyup: we(e.conf.inlineEdit.submit, ["enter"])
1655
- }), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : a.type === "select" ? (f(), b(o(W), v({
1636
+ }, e.conf.update.getBind(l), E(e.conf.update.getOn(l)), { style: { width: "100%" } }), null, 16, ["modelValue", "onUpdate:modelValue"])) : l.type === "select" ? (f(), g(a(W), v({
1656
1637
  key: 1,
1657
- modelValue: e.conf.inlineEdit.form[a.key],
1658
- "onUpdate:modelValue": (c) => e.conf.inlineEdit.form[a.key] = c,
1638
+ modelValue: e.conf.update.form[l.key],
1639
+ "onUpdate:modelValue": (c) => e.conf.update.form[l.key] = c,
1659
1640
  ref_for: !0
1660
- }, a.options?.select, {
1661
- size: "small",
1662
- style: { width: "100%" }
1663
- }), {
1641
+ }, e.conf.update.getBind(l), E(e.conf.update.getOn(l)), { style: { width: "100%" } }), {
1664
1642
  default: h(() => [
1665
- (f(!0), w(S, null, L(a.options?.select?.data, (c) => (f(), b(o(B), {
1643
+ (f(!0), w(S, null, L(l.options?.select?.data, (c) => (f(), g(a(K), {
1666
1644
  key: c.value,
1667
1645
  label: c.label,
1668
1646
  value: c.value
@@ -1670,31 +1648,31 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1670
1648
  ]),
1671
1649
  _: 2
1672
1650
  }, 1040, ["modelValue", "onUpdate:modelValue"])) : C("", !0)
1673
- ], 64)) : k(e.$slots, "table-" + a.key, {
1651
+ ], 64)) : k(e.$slots, "table-" + l.key, {
1674
1652
  key: 1,
1675
1653
  row: r,
1676
- item: a
1654
+ item: l
1677
1655
  }, () => [
1678
- o(j).customComponent[a.type ?? ""]?.table ? (f(), b(q(o(j).customComponent[a.type ?? ""]?.table), v({
1656
+ a(j).customComponent[l.type ?? ""]?.table ? (f(), g(q(a(j).customComponent[l.type ?? ""]?.table), v({
1679
1657
  key: 0,
1680
- modelValue: r[a.key],
1681
- "onUpdate:modelValue": (c) => r[a.key] = c,
1658
+ modelValue: r[l.key],
1659
+ "onUpdate:modelValue": (c) => r[l.key] = c,
1682
1660
  ref_for: !0
1683
- }, a.options?.[a.type ?? ""], $(a.options?.[a.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : a.type === "switch" ? (f(), b(o(ee), v({
1661
+ }, l.options?.[l.type ?? ""], E(l.options?.[l.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : l.type === "switch" ? (f(), g(a(ee), v({
1684
1662
  key: 1,
1685
- modelValue: r[a.key],
1686
- "onUpdate:modelValue": (c) => r[a.key] = c,
1687
- "before-change": () => a.options?.switch?.tableBeforeChange?.(a.key, r),
1663
+ modelValue: r[l.key],
1664
+ "onUpdate:modelValue": (c) => r[l.key] = c,
1665
+ "before-change": () => l.options?.switch?.tableBeforeChange?.(l.key, r),
1688
1666
  ref_for: !0
1689
- }, a.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w("span", {
1667
+ }, l.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w("span", {
1690
1668
  key: 2,
1691
1669
  style: se({
1692
- "--table-text-click-color": a.table?.click?.color
1670
+ "--table-text-click-color": l.table?.click?.color
1693
1671
  }),
1694
- class: R({ "table-text-click": a.table?.click?.callback }),
1695
- onClick: (c) => a.table?.click?.callback?.(r),
1696
- innerHTML: a.table?.format ? a.table?.format(r) : r[a.key]
1697
- }, null, 14, Je))
1672
+ class: I({ "table-text-click": l.table?.click?.callback }),
1673
+ onClick: (c) => l.table?.click?.callback?.(r),
1674
+ innerHTML: l.table?.format ? l.table?.format(r) : r[l.key]
1675
+ }, null, 14, Ke))
1698
1676
  ])
1699
1677
  ], 64))
1700
1678
  ]),
@@ -1703,143 +1681,143 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1703
1681
  ], 64))), 128);
1704
1682
  };
1705
1683
  }
1706
- }), We = {
1684
+ }), Je = {
1707
1685
  class: "row form-item-content",
1708
1686
  style: { width: "100%" }
1709
- }, qe = { class: "col" }, Ge = { class: "col" }, Xe = ["innerHTML"], Qe = /* @__PURE__ */ H({
1687
+ }, We = { class: "col" }, qe = { class: "col" }, Ge = ["innerHTML"], Xe = /* @__PURE__ */ J({
1710
1688
  __name: "formColumn",
1711
1689
  props: {
1712
1690
  conf: {},
1713
1691
  item: {}
1714
1692
  },
1715
- setup(n) {
1716
- return (l, d) => (f(), b(o(G), {
1717
- class: R({
1718
- "hide-label": typeof l.item.item.text?.form?.label == "boolean" ? !l.item.item.text?.form?.label : !1
1693
+ setup(i) {
1694
+ return (t, d) => (f(), g(a(G), {
1695
+ class: I({
1696
+ "hide-label": typeof t.item.item.text?.form?.label == "boolean" ? !t.item.item.text?.form?.label : !1
1719
1697
  }),
1720
- label: typeof l.item.item.text?.form?.label == "string" ? l.item.item.text?.form?.label : l.item.item.label,
1721
- prop: l.item.item.key,
1722
- "label-width": l.item.item.form?.labelWidth || l.conf.option.form?.labelWidth
1698
+ label: typeof t.item.item.text?.form?.label == "string" ? t.item.item.text?.form?.label : t.item.item.label,
1699
+ prop: t.item.item.key,
1700
+ "label-width": t.item.item.form?.labelWidth || t.conf.option.form?.labelWidth
1723
1701
  }, {
1724
1702
  default: h(() => [
1725
- O("div", We, [
1726
- k(l.$slots, "form-" + l.item.item.key + "-start", {
1727
- row: l.conf.update.form,
1728
- item: l.item.item
1703
+ O("div", Je, [
1704
+ k(t.$slots, "form-" + t.item.item.key + "-start", {
1705
+ row: t.conf.update.form,
1706
+ item: t.item.item
1729
1707
  }),
1730
- O("div", qe, [
1731
- O("div", Ge, [
1732
- k(l.$slots, "form-" + l.item.item.key, {
1733
- row: l.conf.update.form,
1734
- item: l.item.item
1708
+ O("div", We, [
1709
+ O("div", qe, [
1710
+ k(t.$slots, "form-" + t.item.item.key, {
1711
+ row: t.conf.update.form,
1712
+ item: t.item.item
1735
1713
  }, () => [
1736
- l.item.item.type === "input" ? (f(), b(o(Q), v({
1714
+ t.item.item.type === "input" ? (f(), g(a(Q), v({
1737
1715
  key: 0,
1738
- modelValue: l.conf.update.form[l.item.item.key],
1739
- "onUpdate:modelValue": d[0] || (d[0] = (e) => l.conf.update.form[l.item.item.key] = e)
1740
- }, l.item.item.options?.input, $(l.item.item.options?.input?.on || {}), {
1741
- disabled: l.conf.update.getDisabled(l.item.item)
1742
- }), null, 16, ["modelValue", "disabled"])) : l.item.item.type === "switch" ? (f(), b(o(ee), v({
1716
+ modelValue: t.conf.update.form[t.item.item.key],
1717
+ "onUpdate:modelValue": d[0] || (d[0] = (e) => t.conf.update.form[t.item.item.key] = e)
1718
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1719
+ disabled: t.conf.update.getDisabled(t.item.item)
1720
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type === "switch" ? (f(), g(a(ee), v({
1743
1721
  key: 1,
1744
- modelValue: l.conf.update.form[l.item.item.key],
1745
- "onUpdate:modelValue": d[1] || (d[1] = (e) => l.conf.update.form[l.item.item.key] = e)
1746
- }, l.item.item.options?.switch, {
1747
- disabled: l.conf.update.getDisabled(l.item.item)
1748
- }), null, 16, ["modelValue", "disabled"])) : l.item.item.type === "select" ? (f(), b(o(W), v({
1722
+ modelValue: t.conf.update.form[t.item.item.key],
1723
+ "onUpdate:modelValue": d[1] || (d[1] = (e) => t.conf.update.form[t.item.item.key] = e)
1724
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1725
+ disabled: t.conf.update.getDisabled(t.item.item)
1726
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type === "select" ? (f(), g(a(W), v({
1749
1727
  key: 2,
1750
- modelValue: l.conf.update.form[l.item.item.key],
1751
- "onUpdate:modelValue": d[2] || (d[2] = (e) => l.conf.update.form[l.item.item.key] = e)
1752
- }, l.item.item.options?.select, $(l.item.item.options?.select?.on || {}), {
1753
- disabled: l.conf.update.getDisabled(l.item.item),
1728
+ modelValue: t.conf.update.form[t.item.item.key],
1729
+ "onUpdate:modelValue": d[2] || (d[2] = (e) => t.conf.update.form[t.item.item.key] = e)
1730
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1731
+ disabled: t.conf.update.getDisabled(t.item.item),
1754
1732
  style: { width: "100%" }
1755
1733
  }), {
1756
1734
  default: h(() => [
1757
- (f(!0), w(S, null, L(l.item.item.options?.select?.data, (e) => (f(), b(o(B), {
1735
+ (f(!0), w(S, null, L(t.item.item.options?.select?.data, (e) => (f(), g(a(K), {
1758
1736
  key: e.value,
1759
1737
  label: e.label,
1760
1738
  value: e.value
1761
1739
  }, null, 8, ["label", "value"]))), 128))
1762
1740
  ]),
1763
1741
  _: 1
1764
- }, 16, ["modelValue", "disabled"])) : l.item.item.type === "radio" ? (f(), b(o(ce), v({
1742
+ }, 16, ["modelValue", "disabled"])) : t.item.item.type === "radio" ? (f(), g(a(ce), v({
1765
1743
  key: 3,
1766
- modelValue: l.conf.update.form[l.item.item.key],
1767
- "onUpdate:modelValue": d[3] || (d[3] = (e) => l.conf.update.form[l.item.item.key] = e)
1768
- }, l.item.item.options?.radio, $(l.item.item.options?.radio?.on || {}), {
1769
- disabled: l.conf.update.getDisabled(l.item.item),
1744
+ modelValue: t.conf.update.form[t.item.item.key],
1745
+ "onUpdate:modelValue": d[3] || (d[3] = (e) => t.conf.update.form[t.item.item.key] = e)
1746
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1747
+ disabled: t.conf.update.getDisabled(t.item.item),
1770
1748
  style: { width: "100%" }
1771
1749
  }), {
1772
1750
  default: h(() => [
1773
- (f(!0), w(S, null, L(l.item.item.options?.radio?.data, (e) => (f(), b(o(pe), {
1751
+ (f(!0), w(S, null, L(t.item.item.options?.radio?.data, (e) => (f(), g(a(pe), {
1774
1752
  key: e.value,
1775
1753
  label: e.label,
1776
1754
  value: e.value
1777
1755
  }, null, 8, ["label", "value"]))), 128))
1778
1756
  ]),
1779
1757
  _: 1
1780
- }, 16, ["modelValue", "disabled"])) : l.item.item.type === "list" ? (f(), b(le, v({
1758
+ }, 16, ["modelValue", "disabled"])) : t.item.item.type === "list" ? (f(), g(ae, v({
1781
1759
  key: 4,
1782
- row: l.conf.update.form,
1783
- field: l.item.item.key
1784
- }, l.item.item.options?.list, $(l.item.item.options?.list?.on || {}), {
1785
- disabled: l.conf.update.getDisabled(l.item.item),
1760
+ row: t.conf.update.form,
1761
+ field: t.item.item.key
1762
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1763
+ disabled: t.conf.update.getDisabled(t.item.item),
1786
1764
  style: { width: "100%" }
1787
- }), null, 16, ["row", "field", "disabled"])) : l.item.item.type === "treeSelect" ? (f(), b(o(ie), v({
1765
+ }), null, 16, ["row", "field", "disabled"])) : t.item.item.type === "treeSelect" ? (f(), g(a(ne), v({
1788
1766
  key: 5,
1789
- modelValue: l.conf.update.form[l.item.item.key],
1790
- "onUpdate:modelValue": d[4] || (d[4] = (e) => l.conf.update.form[l.item.item.key] = e)
1791
- }, l.item.item.options?.treeSelect, $(l.item.item.options?.treeSelect?.on || {}), {
1792
- disabled: l.conf.update.getDisabled(l.item.item),
1767
+ modelValue: t.conf.update.form[t.item.item.key],
1768
+ "onUpdate:modelValue": d[4] || (d[4] = (e) => t.conf.update.form[t.item.item.key] = e)
1769
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1770
+ disabled: t.conf.update.getDisabled(t.item.item),
1793
1771
  style: { width: "100%" }
1794
- }), null, 16, ["modelValue", "disabled"])) : l.item.item.type === "datetime" ? (f(), b(o(te), v({
1772
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type === "datetime" ? (f(), g(a(te), v({
1795
1773
  key: 6,
1796
- modelValue: l.conf.update.form[l.item.item.key],
1797
- "onUpdate:modelValue": d[5] || (d[5] = (e) => l.conf.update.form[l.item.item.key] = e)
1798
- }, l.item.item.options?.datetime, $(l.item.item.options?.datetime?.on || {}), {
1799
- disabled: l.conf.update.getDisabled(l.item.item)
1800
- }), null, 16, ["modelValue", "disabled"])) : l.item.item.type && (o(j).customComponent[l.item.item.type] || o(j).customComponent[l.item.item.type]?.form) ? (f(), b(q(o(j).customComponent[l.item.item.type]?.form || o(j).customComponent[l.item.item.type]), v({
1774
+ modelValue: t.conf.update.form[t.item.item.key],
1775
+ "onUpdate:modelValue": d[5] || (d[5] = (e) => t.conf.update.form[t.item.item.key] = e)
1776
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1777
+ disabled: t.conf.update.getDisabled(t.item.item)
1778
+ }), null, 16, ["modelValue", "disabled"])) : t.item.item.type && (a(j).customComponent[t.item.item.type] || a(j).customComponent[t.item.item.type]?.form) ? (f(), g(q(a(j).customComponent[t.item.item.type]?.form || a(j).customComponent[t.item.item.type]), v({
1801
1779
  key: 7,
1802
- modelValue: l.conf.update.form[l.item.item.key],
1803
- "onUpdate:modelValue": d[6] || (d[6] = (e) => l.conf.update.form[l.item.item.key] = e)
1804
- }, l.item.item.options?.[l.item.item.type], $(l.item.item.options?.[l.item.item.type]?.on || {}), {
1805
- disabled: l.conf.update.getDisabled(l.item.item)
1780
+ modelValue: t.conf.update.form[t.item.item.key],
1781
+ "onUpdate:modelValue": d[6] || (d[6] = (e) => t.conf.update.form[t.item.item.key] = e)
1782
+ }, t.conf.update.getBind(t.item.item), E(t.conf.update.getOn(t.item.item)), {
1783
+ disabled: t.conf.update.getDisabled(t.item.item)
1806
1784
  }), null, 16, ["modelValue", "disabled"])) : C("", !0)
1807
1785
  ]),
1808
- k(l.$slots, "form-" + l.item.item.key + "-right", {
1809
- row: l.conf.update.form,
1810
- item: l.item.item
1786
+ k(t.$slots, "form-" + t.item.item.key + "-right", {
1787
+ row: t.conf.update.form,
1788
+ item: t.item.item
1811
1789
  })
1812
1790
  ]),
1813
- k(l.$slots, "form-" + l.item.item.key + "-tip", {
1814
- row: l.conf.update.form,
1815
- item: l.item.item
1791
+ k(t.$slots, "form-" + t.item.item.key + "-tip", {
1792
+ row: t.conf.update.form,
1793
+ item: t.item.item
1816
1794
  }, () => [
1817
- l.item.item.form?.tipText ? (f(), w("div", {
1795
+ t.item.item.form?.tipText ? (f(), w("div", {
1818
1796
  key: 0,
1819
1797
  class: "form-tip-text",
1820
- innerHTML: l.item.item.form?.tipText
1821
- }, null, 8, Xe)) : C("", !0)
1798
+ innerHTML: typeof t.item.item.form?.tipText == "function" ? t.item.item.form?.tipText(t.conf.update.form, t.conf.update.type) : t.item.item.form?.tipText
1799
+ }, null, 8, Ge)) : C("", !0)
1822
1800
  ])
1823
1801
  ]),
1824
- k(l.$slots, "form-" + l.item.item.key + "-end", {
1825
- row: l.conf.update.form,
1826
- item: l.item.item
1802
+ k(t.$slots, "form-" + t.item.item.key + "-end", {
1803
+ row: t.conf.update.form,
1804
+ item: t.item.item
1827
1805
  })
1828
1806
  ])
1829
1807
  ]),
1830
1808
  _: 3
1831
1809
  }, 8, ["class", "label", "prop", "label-width"]));
1832
1810
  }
1833
- }), Ye = {
1811
+ }), Qe = {
1834
1812
  key: 0,
1835
1813
  class: "relative curd-search fit-width"
1836
- }, Ze = { class: "mb-10 flex justify-between items-center fit-width" }, xe = {
1814
+ }, Ye = { class: "mb-10 flex justify-between items-center fit-width" }, Ze = {
1837
1815
  class: "flex items-center",
1838
1816
  style: { gap: "10px" }
1839
- }, _e = { key: 0 }, et = { key: 1 }, tt = { key: 2 }, ot = { class: "export-btn" }, lt = {
1817
+ }, xe = { key: 0 }, _e = { key: 1 }, et = { key: 2 }, tt = { class: "export-btn" }, ot = {
1840
1818
  class: "flex items-center table-tools-right",
1841
1819
  style: { gap: "10px" }
1842
- }, at = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, it = { class: "dialog-footer" }, nt = { class: "dialog-footer" }, st = /* @__PURE__ */ H({
1820
+ }, at = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, lt = { class: "dialog-footer" }, nt = { class: "dialog-footer" }, it = /* @__PURE__ */ J({
1843
1821
  __name: "index",
1844
1822
  props: {
1845
1823
  /**
@@ -1849,137 +1827,137 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1849
1827
  default: {}
1850
1828
  }
1851
1829
  },
1852
- setup(n, { expose: l }) {
1853
- const d = D.EDialog, e = n, i = D.isFun, { conf: t, switchConfirmRef: a, ruleFormRef: r } = Oe(e);
1854
- return l({
1855
- conf: t
1830
+ setup(i, { expose: t }) {
1831
+ const d = U.EDialog, e = i, n = U.isFun, { conf: o, switchConfirmRef: l, ruleFormRef: r } = $e(e);
1832
+ return t({
1833
+ conf: o
1856
1834
  }), (c, m) => {
1857
- const u = ke("loading");
1835
+ const u = we("loading");
1858
1836
  return f(), w("div", {
1859
- class: R(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
1837
+ class: I(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
1860
1838
  }, [
1861
1839
  O("div", {
1862
- class: R(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
1840
+ class: I(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
1863
1841
  style: { overflow: "hidden" }
1864
1842
  }, [
1865
1843
  k(c.$slots, "box-left"),
1866
1844
  O("div", {
1867
- class: R(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
1845
+ class: I(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
1868
1846
  }, [
1869
- n.option.search?.show !== !1 ? (f(), w("div", Ye, [
1870
- V(o(N), {
1871
- model: o(t).search.form,
1847
+ i.option.search?.show !== !1 ? (f(), w("div", Qe, [
1848
+ V(a(N), {
1849
+ model: a(o).search.form,
1872
1850
  inline: "",
1873
- size: n.option.size?.search
1851
+ size: i.option.size?.search
1874
1852
  }, {
1875
1853
  default: h(() => [
1876
1854
  k(c.$slots, "search-start", {
1877
- row: o(t).search.form
1855
+ row: a(o).search.form
1878
1856
  }),
1879
- (f(!0), w(S, null, L(o(t).search.column.list, (s) => (f(), w(S, {
1857
+ (f(!0), w(S, null, L(a(o).search.column.list, (s) => (f(), w(S, {
1880
1858
  key: s.key
1881
1859
  }, [
1882
- (typeof s.show?.search == "function" ? s.show?.search(o(t).search.form) : s.show?.search) ? (f(), b(o(G), {
1860
+ (typeof s.show?.search == "function" ? s.show?.search(a(o).search.form) : s.show?.search) ? (f(), g(a(G), {
1883
1861
  key: 0,
1884
1862
  label: typeof s.text?.search?.label == "string" ? s.text?.search?.label : s.label,
1885
- class: R({
1863
+ class: I({
1886
1864
  "hide-label": typeof s.text?.search?.label == "boolean" ? !s.text?.search?.label : !1
1887
1865
  })
1888
1866
  }, {
1889
1867
  default: h(() => [
1890
1868
  k(c.$slots, "search-" + s.key, {
1891
- row: o(t).search.form
1869
+ row: a(o).search.form
1892
1870
  }, () => [
1893
- s.type === "input" ? (f(), b(o(Q), v({
1871
+ s.type === "input" ? (f(), g(a(Q), v({
1894
1872
  key: 0,
1895
- modelValue: o(t).search.form[s.key],
1896
- "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1897
- placeholder: o(t).search.getPlaceholder(s),
1873
+ modelValue: a(o).search.form[s.key],
1874
+ "onUpdate:modelValue": (p) => a(o).search.form[s.key] = p,
1875
+ placeholder: a(o).search.getPlaceholder(s),
1898
1876
  clearable: "",
1899
1877
  disabled: s.disabled?.search,
1900
1878
  ref_for: !0
1901
- }, s.options?.search?.input || s.options?.input, $(s.options?.search?.input?.on || s.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "switch" ? (f(), b(o(W), v({
1879
+ }, s.options?.search?.input || s.options?.input, E(s.options?.search?.input?.on || s.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "switch" ? (f(), g(a(W), v({
1902
1880
  key: 1,
1903
- modelValue: o(t).search.form[s.key],
1904
- "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1905
- placeholder: o(t).search.getPlaceholder(s, o(g).tCurd("placeholderSelect")),
1881
+ modelValue: a(o).search.form[s.key],
1882
+ "onUpdate:modelValue": (p) => a(o).search.form[s.key] = p,
1883
+ placeholder: a(o).search.getPlaceholder(s, a(b).tCurd("placeholderSelect")),
1906
1884
  clearable: "",
1907
1885
  disabled: s.disabled?.search,
1908
1886
  ref_for: !0
1909
- }, s.options?.search?.switch || s.options?.switch, $(s.options?.search?.switch?.on || s.options?.switch?.on || {})), {
1887
+ }, s.options?.search?.switch || s.options?.switch, E(s.options?.search?.switch?.on || s.options?.switch?.on || {})), {
1910
1888
  default: h(() => [
1911
- (f(), b(o(B), {
1889
+ (f(), g(a(K), {
1912
1890
  key: s.options?.switch?.activeValue,
1913
1891
  label: s.options?.switch?.activeLabel,
1914
1892
  value: s.options?.switch?.activeValue
1915
1893
  }, null, 8, ["label", "value"])),
1916
- (f(), b(o(B), {
1894
+ (f(), g(a(K), {
1917
1895
  key: s.options?.switch?.inactiveValue,
1918
1896
  label: s.options?.switch?.inactiveLabel,
1919
1897
  value: s.options?.switch?.inactiveValue
1920
1898
  }, null, 8, ["label", "value"]))
1921
1899
  ]),
1922
1900
  _: 2
1923
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "select" ? (f(), b(o(W), v({
1901
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "select" ? (f(), g(a(W), v({
1924
1902
  key: 2,
1925
- modelValue: o(t).search.form[s.key],
1926
- "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1927
- placeholder: o(t).search.getPlaceholder(s, o(g).tCurd("placeholderSelect")),
1903
+ modelValue: a(o).search.form[s.key],
1904
+ "onUpdate:modelValue": (p) => a(o).search.form[s.key] = p,
1905
+ placeholder: a(o).search.getPlaceholder(s, a(b).tCurd("placeholderSelect")),
1928
1906
  clearable: "",
1929
1907
  disabled: s.disabled?.search,
1930
1908
  ref_for: !0
1931
- }, s.options?.search?.select || s.options?.select, $(s.options?.search?.select?.on || s.options?.select?.on || {})), {
1909
+ }, s.options?.search?.select || s.options?.select, E(s.options?.search?.select?.on || s.options?.select?.on || {})), {
1932
1910
  default: h(() => [
1933
- (f(!0), w(S, null, L(s.options?.select?.data, (p) => (f(), b(o(B), {
1911
+ (f(!0), w(S, null, L(s.options?.select?.data, (p) => (f(), g(a(K), {
1934
1912
  key: p.value,
1935
1913
  label: p.label,
1936
1914
  value: p.value
1937
1915
  }, null, 8, ["label", "value"]))), 128))
1938
1916
  ]),
1939
1917
  _: 2
1940
- }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "datetime" ? (f(), b(o(te), v({
1918
+ }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "datetime" ? (f(), g(a(te), v({
1941
1919
  key: 3,
1942
- modelValue: o(t).search.form[s.key],
1943
- "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1920
+ modelValue: a(o).search.form[s.key],
1921
+ "onUpdate:modelValue": (p) => a(o).search.form[s.key] = p,
1944
1922
  disabled: s.disabled?.search,
1945
1923
  ref_for: !0
1946
- }, s.options?.search?.datetime || s.options?.datetime, $(s.options?.search?.datetime?.on || s.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type && o(j).customComponent[s.type] ? (f(), b(q(o(j).customComponent[s.type]), v({
1924
+ }, s.options?.search?.datetime || s.options?.datetime, E(s.options?.search?.datetime?.on || s.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type && a(j).customComponent[s.type] ? (f(), g(q(a(j).customComponent[s.type]), v({
1947
1925
  key: 4,
1948
- modelValue: o(t).search.form[s.key],
1949
- "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1926
+ modelValue: a(o).search.form[s.key],
1927
+ "onUpdate:modelValue": (p) => a(o).search.form[s.key] = p,
1950
1928
  ref_for: !0
1951
- }, s.options?.search?.[s.type] || s.options?.[s.type], $(s.options?.search?.[s.type]?.on || s.options?.[s.type]?.on || {}), {
1929
+ }, s.options?.search?.[s.type] || s.options?.[s.type], E(s.options?.search?.[s.type]?.on || s.options?.[s.type]?.on || {}), {
1952
1930
  disabled: s.disabled?.search
1953
1931
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1954
1932
  ]),
1955
1933
  k(c.$slots, "search-" + s.key + "-right", {
1956
- row: o(t).search.form
1934
+ row: a(o).search.form
1957
1935
  })
1958
1936
  ]),
1959
1937
  _: 2
1960
1938
  }, 1032, ["label", "class"])) : C("", !0)
1961
1939
  ], 64))), 128)),
1962
1940
  k(c.$slots, "search-center", {
1963
- row: o(t).search.form
1941
+ row: a(o).search.form
1964
1942
  }),
1965
- n.option.tools?.search || n.option.tools?.reset ? (f(), b(o(G), { key: 0 }, {
1943
+ i.option.tools?.search || i.option.tools?.reset ? (f(), g(a(G), { key: 0 }, {
1966
1944
  default: h(() => [
1967
- n.option.tools?.search ? (f(), b(o(F), {
1945
+ i.option.tools?.search ? (f(), g(a(F), {
1968
1946
  key: 0,
1969
1947
  type: "primary",
1970
- onClick: o(t).search.submit
1948
+ onClick: a(o).search.submit
1971
1949
  }, {
1972
1950
  default: h(() => [
1973
- E(U(o(g).tCurd("search")), 1)
1951
+ D($(a(b).tCurd("search")), 1)
1974
1952
  ]),
1975
1953
  _: 1
1976
1954
  }, 8, ["onClick"])) : C("", !0),
1977
- n.option.tools?.reset ? (f(), b(o(F), {
1955
+ i.option.tools?.reset ? (f(), g(a(F), {
1978
1956
  key: 1,
1979
- onClick: o(t).search.reset
1957
+ onClick: a(o).search.reset
1980
1958
  }, {
1981
1959
  default: h(() => [
1982
- E(U(o(g).tCurd("reset")), 1)
1960
+ D($(a(b).tCurd("reset")), 1)
1983
1961
  ]),
1984
1962
  _: 1
1985
1963
  }, 8, ["onClick"])) : C("", !0)
@@ -1987,77 +1965,77 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1987
1965
  _: 1
1988
1966
  })) : C("", !0),
1989
1967
  k(c.$slots, "search-end", {
1990
- row: o(t).search.form
1968
+ row: a(o).search.form
1991
1969
  })
1992
1970
  ]),
1993
1971
  _: 3
1994
1972
  }, 8, ["model", "size"])
1995
1973
  ])) : C("", !0),
1996
- O("div", Ze, [
1997
- O("div", xe, [
1998
- o(i)(n.option.tools?.add) ? (f(), w("div", _e, [
1999
- V(o(F), {
1974
+ O("div", Ye, [
1975
+ O("div", Ze, [
1976
+ a(n)(i.option.tools?.add) ? (f(), w("div", xe, [
1977
+ V(a(F), {
2000
1978
  type: "primary",
2001
- onClick: m[0] || (m[0] = (s) => o(t).update.open(o(d).Insert)),
2002
- size: n.option.size?.search
1979
+ onClick: m[0] || (m[0] = (s) => a(o).update.open(a(d).Add)),
1980
+ size: i.option.size?.search
2003
1981
  }, {
2004
1982
  default: h(() => [
2005
- E(U(o(g).tCurd("add")), 1)
1983
+ D($(a(b).tCurd("add")), 1)
2006
1984
  ]),
2007
1985
  _: 1
2008
1986
  }, 8, ["size"])
2009
1987
  ])) : C("", !0),
2010
- n.option.table?.selectable && o(i)(n.option.tools?.delete) ? (f(), w("div", et, [
2011
- V(o(F), {
1988
+ i.option.table?.selectable && a(n)(i.option.tools?.delete) ? (f(), w("div", _e, [
1989
+ V(a(F), {
2012
1990
  type: "danger",
2013
- onClick: m[1] || (m[1] = (s) => o(t).remove.open(o(t).table.selection.list)),
2014
- size: n.option.size?.search
1991
+ onClick: m[1] || (m[1] = (s) => a(o).remove.open(a(o).table.selection.list)),
1992
+ size: i.option.size?.search
2015
1993
  }, {
2016
1994
  default: h(() => [
2017
- E(U(o(g).tCurd("delete")), 1)
1995
+ D($(a(b).tCurd("delete")), 1)
2018
1996
  ]),
2019
1997
  _: 1
2020
1998
  }, 8, ["size"])
2021
1999
  ])) : C("", !0),
2022
- n.option.tools?.expand ? (f(), w("div", tt, [
2023
- V(o(F), {
2000
+ i.option.tools?.expand ? (f(), w("div", et, [
2001
+ V(a(F), {
2024
2002
  type: "warning",
2025
- onClick: m[2] || (m[2] = (s) => o(t).table.expand.all()),
2026
- size: n.option.size?.search
2003
+ onClick: m[2] || (m[2] = (s) => a(o).table.expand.all()),
2004
+ size: i.option.size?.search
2027
2005
  }, {
2028
2006
  default: h(() => [
2029
- E(U(o(g).tCurd("expandCollapse")), 1)
2007
+ D($(a(b).tCurd("expandCollapse")), 1)
2030
2008
  ]),
2031
2009
  _: 1
2032
2010
  }, 8, ["size"])
2033
2011
  ])) : C("", !0),
2034
- n.option.tools?.export?.show ? (f(), b(o(me), {
2012
+ i.option.tools?.export?.show ? (f(), g(a(me), {
2035
2013
  key: 3,
2036
- onCommand: o(t).export.click
2014
+ onCommand: a(o).export.click
2037
2015
  }, {
2038
2016
  dropdown: h(() => [
2039
- V(o(he), {
2040
- size: n.option.size?.search
2017
+ V(a(he), {
2018
+ size: i.option.size?.search
2041
2019
  }, {
2042
2020
  default: h(() => [
2043
- n.option.table?.selectable ? (f(), b(o(Y), {
2021
+ i.option.table?.selectable ? (f(), g(a(Y), {
2044
2022
  key: 0,
2045
2023
  command: "select"
2046
2024
  }, {
2047
2025
  default: h(() => [
2048
- E(U(o(g).tCurd("exportSelect")), 1)
2026
+ D($(a(b).tCurd("exportSelect")), 1)
2049
2027
  ]),
2050
2028
  _: 1
2051
2029
  })) : C("", !0),
2052
- V(o(Y), { command: "page" }, {
2030
+ V(a(Y), { command: "page" }, {
2053
2031
  default: h(() => [
2054
- E(U(o(g).tCurd("exportPage")), 1)
2032
+ D($(a(b).tCurd("exportPage")), 1)
2055
2033
  ]),
2056
2034
  _: 1
2057
2035
  }),
2058
- V(o(Y), { command: "all" }, {
2036
+ V(a(Y), { command: "all" }, {
2059
2037
  default: h(() => [
2060
- E(U(o(g).tCurd("exportAll")), 1)
2038
+ D($(a(b).tCurd("exportAll")), 1)
2061
2039
  ]),
2062
2040
  _: 1
2063
2041
  })
@@ -2066,14 +2044,14 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2066
2044
  }, 8, ["size"])
2067
2045
  ]),
2068
2046
  default: h(() => [
2069
- O("div", ot, [
2070
- V(o(F), {
2047
+ O("div", tt, [
2048
+ V(a(F), {
2071
2049
  type: "warning",
2072
- loading: o(t).export.loading,
2073
- size: n.option.size?.search
2050
+ loading: a(o).export.loading,
2051
+ size: i.option.size?.search
2074
2052
  }, {
2075
2053
  default: h(() => [
2076
- E(U(o(g).tCurd("export")), 1)
2054
+ D($(a(b).tCurd("export")), 1)
2077
2055
  ]),
2078
2056
  _: 1
2079
2057
  }, 8, ["loading", "size"])
@@ -2083,151 +2061,151 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2083
2061
  }, 8, ["onCommand"])) : C("", !0),
2084
2062
  k(c.$slots, "tools-left")
2085
2063
  ]),
2086
- O("div", lt, [
2064
+ O("div", ot, [
2087
2065
  k(c.$slots, "tools-right"),
2088
- o(t).page.showTools ? (f(), b(o(ae), v({
2066
+ a(o).page.showTools ? (f(), g(a(le), v({
2089
2067
  key: 0,
2090
- "current-page": o(t).page.num,
2091
- "onUpdate:currentPage": m[3] || (m[3] = (s) => o(t).page.num = s),
2092
- "page-size": o(t).page.size,
2093
- "onUpdate:pageSize": m[4] || (m[4] = (s) => o(t).page.size = s),
2068
+ "current-page": a(o).page.num,
2069
+ "onUpdate:currentPage": m[3] || (m[3] = (s) => a(o).page.num = s),
2070
+ "page-size": a(o).page.size,
2071
+ "onUpdate:pageSize": m[4] || (m[4] = (s) => a(o).page.size = s),
2094
2072
  background: "",
2095
- "page-sizes": o(t).page.sizeList,
2096
- "pager-count": o(t).page.pagerCount,
2097
- layout: o(t).page.layout,
2098
- total: o(t).page.total,
2099
- size: n.option.size?.table,
2100
- onSizeChange: o(t).table.getList,
2101
- onCurrentChange: o(t).table.getList
2102
- }, n.option.page?.pagination || {}, $(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0),
2103
- n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (f(), w("div", {
2073
+ "page-sizes": a(o).page.sizeList,
2074
+ "pager-count": a(o).page.pagerCount,
2075
+ layout: a(o).page.layout,
2076
+ total: a(o).page.total,
2077
+ size: i.option.size?.table,
2078
+ onSizeChange: a(o).table.getList,
2079
+ onCurrentChange: a(o).table.getList
2080
+ }, i.option.page?.pagination || {}, E(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0),
2081
+ i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (f(), w("div", {
2104
2082
  key: 1,
2105
- class: R(["refresh-btn", [n.option.size?.search]]),
2083
+ class: I(["refresh-btn", [i.option.size?.search]]),
2106
2084
  onClick: m[5] || (m[5] = //@ts-ignore
2107
- (...s) => o(t).table.getList && o(t).table.getList(...s))
2085
+ (...s) => a(o).table.getList && a(o).table.getList(...s))
2108
2086
  }, [
2109
- V(je)
2087
+ V(Me)
2110
2088
  ], 2)) : C("", !0)
2111
2089
  ])
2112
2090
  ]),
2113
2091
  O("div", {
2114
- class: R(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : ""]])
2092
+ class: I(["fit-width relative form-box", [i.option.table?.fitHeight ? "col " : ""]])
2115
2093
  }, [
2116
2094
  O("div", {
2117
- class: R(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
2095
+ class: I(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
2118
2096
  }, [
2119
- Ce((f(), b(o(be), v({
2120
- data: o(t).table.data,
2121
- border: n.option.table?.border === void 0 ? !0 : n.option.table?.border,
2122
- onSelectionChange: o(t).table.selection.change,
2123
- onSortChange: o(t).table.sort.change,
2124
- "expand-row-keys": o(t).table.expand.rowKeys,
2125
- onExpandChange: o(t).table.expand.change
2126
- }, n.option.table, $(n.option.table?.on || {})), {
2097
+ ke((f(), g(a(ge), v({
2098
+ data: a(o).table.data,
2099
+ border: i.option.table?.border === void 0 ? !0 : i.option.table?.border,
2100
+ onSelectionChange: a(o).table.selection.change,
2101
+ onSortChange: a(o).table.sort.change,
2102
+ "expand-row-keys": a(o).table.expand.rowKeys,
2103
+ onExpandChange: a(o).table.expand.change
2104
+ }, i.option.table, E(i.option.table?.on || {})), {
2127
2105
  default: h(() => [
2128
- n.option.table?.selectable || o(i)(n.option.tools?.delete) || n.option.tools?.export?.show ? (f(), b(o(x), {
2106
+ i.option.table?.selectable || a(n)(i.option.tools?.delete) || i.option.tools?.export?.show ? (f(), g(a(x), {
2129
2107
  key: 0,
2130
2108
  type: "selection",
2131
- selectable: typeof n.option.table?.selectable == "function" ? n.option.table?.selectable : void 0,
2109
+ selectable: typeof i.option.table?.selectable == "function" ? i.option.table?.selectable : void 0,
2132
2110
  width: "40",
2133
2111
  align: "center",
2134
2112
  fixed: "left",
2135
2113
  "show-overflow-tooltip": !1
2136
2114
  }, null, 8, ["selectable"])) : C("", !0),
2137
2115
  V(He, {
2138
- conf: o(t),
2139
- columnList: o(t).table.column.list,
2140
- option: n.option
2116
+ conf: a(o),
2117
+ columnList: a(o).table.column.list,
2118
+ option: i.option
2141
2119
  }, _({ _: 2 }, [
2142
2120
  L(c.$slots, (s, p) => ({
2143
2121
  name: p,
2144
2122
  fn: h((y) => [
2145
- k(c.$slots, p, ve(Ve(y || {})))
2123
+ k(c.$slots, p, Ce(ve(y || {})))
2146
2124
  ])
2147
2125
  }))
2148
2126
  ]), 1032, ["conf", "columnList", "option"]),
2149
- o(i)(n.option.table?.add) || o(i)(n.option.table?.update) || o(i)(n.option.table?.delete) || o(i)(n.option.table?.view) || c.$slots["table-op-left"] || c.$slots["table-op-right"] ? (f(), b(o(x), v({
2127
+ a(n)(i.option.table?.add) || a(n)(i.option.table?.update) || a(n)(i.option.table?.delete) || a(n)(i.option.table?.view) || c.$slots["table-op-left"] || c.$slots["table-op-right"] ? (f(), g(a(x), v({
2150
2128
  key: 1,
2151
- width: o(t).table.op.width(o(i)(n.option.table?.add), o(i)(n.option.table?.update), o(i)(n.option.table?.delete), o(i)(n.option.table?.view), c.$slots["table-op-left"], c.$slots["table-op-right"]),
2129
+ width: a(o).table.op.width(a(n)(i.option.table?.add), a(n)(i.option.table?.update), a(n)(i.option.table?.delete), a(n)(i.option.table?.view), c.$slots["table-op-left"], c.$slots["table-op-right"]),
2152
2130
  align: "center",
2153
2131
  fixed: "right"
2154
- }, n.option.table?.operate), {
2132
+ }, i.option.table?.operate), {
2155
2133
  header: h(() => [
2156
2134
  k(c.$slots, "table-header-op", {}, () => [
2157
- E(U(o(g).tCurd("operation")), 1)
2135
+ D($(a(b).tCurd("operation")), 1)
2158
2136
  ])
2159
2137
  ]),
2160
2138
  default: h(({ row: s }) => [
2161
- V(o(N), {
2162
- size: n.option.size?.table
2139
+ V(a(N), {
2140
+ size: i.option.size?.table
2163
2141
  }, {
2164
2142
  default: h(() => [
2165
2143
  k(c.$slots, "table-op-left", { row: s }),
2166
- n.option.table?.inlineEdit && o(t).inlineEdit.row === s ? (f(), w(S, { key: 0 }, [
2167
- V(o(F), {
2144
+ i.option.table?.inlineEdit && a(o).inlineEdit.data === s ? (f(), w(S, { key: 0 }, [
2145
+ V(a(F), {
2168
2146
  link: "",
2169
2147
  type: "info",
2170
- onClick: o(t).inlineEdit.close
2148
+ onClick: a(o).inlineEdit.close
2171
2149
  }, {
2172
2150
  default: h(() => [
2173
- E(U(o(g).tCurd("cancel")), 1)
2151
+ D($(a(b).tCurd("cancel")), 1)
2174
2152
  ]),
2175
2153
  _: 1
2176
2154
  }, 8, ["onClick"]),
2177
- V(o(F), {
2155
+ V(a(F), {
2178
2156
  link: "",
2179
2157
  type: "primary",
2180
- onClick: o(t).inlineEdit.submit,
2181
- loading: o(t).inlineEdit.loading
2158
+ onClick: a(o).update.submit,
2159
+ loading: a(o).update.loading
2182
2160
  }, {
2183
2161
  default: h(() => [
2184
- E(U(o(g).tCurd("confirm")), 1)
2162
+ D($(a(b).tCurd("confirm")), 1)
2185
2163
  ]),
2186
2164
  _: 1
2187
2165
  }, 8, ["onClick", "loading"]),
2188
2166
  k(c.$slots, "table-op-edit-right", { row: s })
2189
2167
  ], 64)) : (f(), w(S, { key: 1 }, [
2190
- o(i)(n.option.table?.add, s) ? (f(), b(o(F), {
2168
+ a(n)(i.option.table?.add, s) ? (f(), g(a(F), {
2191
2169
  key: 0,
2192
2170
  link: "",
2193
2171
  type: "primary",
2194
- onClick: (p) => o(t).update.open(o(d).Insert, s)
2172
+ onClick: (p) => a(o).update.open(a(d).Add, s)
2195
2173
  }, {
2196
2174
  default: h(() => [
2197
- E(U(o(g).tCurd("add")), 1)
2175
+ D($(a(b).tCurd("add")), 1)
2198
2176
  ]),
2199
2177
  _: 2
2200
2178
  }, 1032, ["onClick"])) : C("", !0),
2201
- o(i)(n.option.table?.view, s) ? (f(), b(o(F), {
2179
+ a(n)(i.option.table?.view, s) ? (f(), g(a(F), {
2202
2180
  key: 1,
2203
2181
  link: "",
2204
2182
  type: "primary",
2205
- onClick: (p) => o(t).update.open(o(d).View, s)
2183
+ onClick: (p) => a(o).update.open(a(d).View, s)
2206
2184
  }, {
2207
2185
  default: h(() => [
2208
- E(U(o(g).tCurd("view")), 1)
2186
+ D($(a(b).tCurd("view")), 1)
2209
2187
  ]),
2210
2188
  _: 2
2211
2189
  }, 1032, ["onClick"])) : C("", !0),
2212
- o(i)(n.option.table?.update, s) ? (f(), b(o(F), {
2190
+ a(n)(i.option.table?.update, s) ? (f(), g(a(F), {
2213
2191
  key: 2,
2214
2192
  link: "",
2215
2193
  type: "warning",
2216
- onClick: (p) => o(t).update.open(o(d).Update, s)
2194
+ onClick: (p) => a(o).update.open(a(d).Update, s)
2217
2195
  }, {
2218
2196
  default: h(() => [
2219
- E(U(o(g).tCurd("edit")), 1)
2197
+ D($(a(b).tCurd("edit")), 1)
2220
2198
  ]),
2221
2199
  _: 2
2222
2200
  }, 1032, ["onClick"])) : C("", !0),
2223
- o(i)(n.option.table?.delete, s) ? (f(), b(o(F), {
2201
+ a(n)(i.option.table?.delete, s) ? (f(), g(a(F), {
2224
2202
  key: 3,
2225
2203
  link: "",
2226
2204
  type: "danger",
2227
- onClick: (p) => o(t).remove.open([s])
2205
+ onClick: (p) => a(o).remove.open([s])
2228
2206
  }, {
2229
2207
  default: h(() => [
2230
- E(U(o(g).tCurd("delete")), 1)
2208
+ D($(a(b).tCurd("delete")), 1)
2231
2209
  ]),
2232
2210
  _: 2
2233
2211
  }, 1032, ["onClick"])) : C("", !0),
@@ -2242,58 +2220,58 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2242
2220
  ]),
2243
2221
  _: 3
2244
2222
  }, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
2245
- [u, o(t).table.loading]
2223
+ [u, a(o).table.loading]
2246
2224
  ])
2247
2225
  ], 2)
2248
2226
  ], 2),
2249
2227
  O("div", at, [
2250
- (n.option.page?.show === void 0 || n.option.page?.show) && !o(t).page.showTools ? (f(), b(o(ae), v({
2228
+ (i.option.page?.show === void 0 || i.option.page?.show) && !a(o).page.showTools ? (f(), g(a(le), v({
2251
2229
  key: 0,
2252
- "current-page": o(t).page.num,
2253
- "onUpdate:currentPage": m[6] || (m[6] = (s) => o(t).page.num = s),
2254
- "page-size": o(t).page.size,
2255
- "onUpdate:pageSize": m[7] || (m[7] = (s) => o(t).page.size = s),
2230
+ "current-page": a(o).page.num,
2231
+ "onUpdate:currentPage": m[6] || (m[6] = (s) => a(o).page.num = s),
2232
+ "page-size": a(o).page.size,
2233
+ "onUpdate:pageSize": m[7] || (m[7] = (s) => a(o).page.size = s),
2256
2234
  background: "",
2257
- "page-sizes": o(t).page.sizeList,
2258
- "pager-count": o(t).page.pagerCount,
2259
- layout: o(t).page.layout,
2260
- total: o(t).page.total,
2261
- size: n.option.size?.table,
2262
- onSizeChange: o(t).table.getList,
2263
- onCurrentChange: o(t).table.getList
2264
- }, n.option.page?.pagination || {}, $(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0)
2235
+ "page-sizes": a(o).page.sizeList,
2236
+ "pager-count": a(o).page.pagerCount,
2237
+ layout: a(o).page.layout,
2238
+ total: a(o).page.total,
2239
+ size: i.option.size?.table,
2240
+ onSizeChange: a(o).table.getList,
2241
+ onCurrentChange: a(o).table.getList
2242
+ }, i.option.page?.pagination || {}, E(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0)
2265
2243
  ])
2266
2244
  ], 2),
2267
2245
  k(c.$slots, "box-right")
2268
2246
  ], 2),
2269
- V(o(Z), v({
2270
- modelValue: o(t).update.show,
2271
- "onUpdate:modelValue": m[8] || (m[8] = (s) => o(t).update.show = s),
2272
- title: o(t).update.title,
2273
- "before-close": o(t).update.close
2274
- }, n.option.dialog), {
2247
+ V(a(Z), v({
2248
+ modelValue: a(o).update.show,
2249
+ "onUpdate:modelValue": m[8] || (m[8] = (s) => a(o).update.show = s),
2250
+ title: a(o).update.title,
2251
+ "before-close": a(o).update.close
2252
+ }, i.option.dialog), {
2275
2253
  footer: h(() => [
2276
- O("span", it, [
2277
- V(o(N), {
2278
- size: n.option.size?.form
2254
+ O("span", lt, [
2255
+ V(a(N), {
2256
+ size: i.option.size?.form
2279
2257
  }, {
2280
2258
  default: h(() => [
2281
- V(o(F), {
2282
- onClick: o(t).update.close
2259
+ V(a(F), {
2260
+ onClick: a(o).update.close
2283
2261
  }, {
2284
2262
  default: h(() => [
2285
- E(U(o(g).tCurd("close")), 1)
2263
+ D($(a(b).tCurd("close")), 1)
2286
2264
  ]),
2287
2265
  _: 1
2288
2266
  }, 8, ["onClick"]),
2289
- o(t).update.type !== o(d).View ? (f(), b(o(F), {
2267
+ a(o).update.type !== a(d).View ? (f(), g(a(F), {
2290
2268
  key: 0,
2291
2269
  type: "primary",
2292
- onClick: o(t).update.submit,
2293
- loading: o(t).update.loading
2270
+ onClick: a(o).update.submit,
2271
+ loading: a(o).update.loading
2294
2272
  }, {
2295
2273
  default: h(() => [
2296
- E(U(o(g).tCurd("submit")), 1)
2274
+ D($(a(b).tCurd("submit")), 1)
2297
2275
  ]),
2298
2276
  _: 1
2299
2277
  }, 8, ["onClick", "loading"])) : C("", !0)
@@ -2303,54 +2281,54 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2303
2281
  ])
2304
2282
  ]),
2305
2283
  default: h(() => [
2306
- V(o(N), {
2284
+ V(a(N), {
2307
2285
  ref_key: "ruleFormRef",
2308
2286
  ref: r,
2309
- model: o(t).update.form,
2310
- rules: o(t).update.rules,
2311
- size: n.option.size?.form
2287
+ model: a(o).update.form,
2288
+ rules: a(o).update.rules,
2289
+ size: i.option.size?.form
2312
2290
  }, {
2313
2291
  default: h(() => [
2314
- o(t).update.showContent ? (f(!0), w(S, { key: 0 }, L(o(t).update.formColumn, (s) => (f(), w(S, null, [
2315
- o(i)(
2292
+ a(o).update.showContent ? (f(!0), w(S, { key: 0 }, L(a(o).update.formColumn, (s) => (f(), w(S, null, [
2293
+ a(n)(
2316
2294
  (() => {
2317
- const p = [], y = (I) => {
2318
- I?.item?.children ? y(I.item.children) : p.push(...I.map((M) => M.item?.show?.form));
2295
+ const p = [], y = (T) => {
2296
+ T?.item?.children ? y(T.item.children) : p.push(...T.map((A) => A.item?.show?.form));
2319
2297
  };
2320
2298
  return y(s), p;
2321
2299
  })(),
2322
- o(t).update.form,
2323
- o(t).update.type
2300
+ a(o).update.form,
2301
+ a(o).update.type
2324
2302
  ) ? (f(), w("div", {
2325
2303
  key: 0,
2326
- class: R(["row curd-row", {
2327
- stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
2304
+ class: I(["row curd-row", {
2305
+ stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
2328
2306
  }])
2329
2307
  }, [
2330
2308
  k(c.$slots, "form-start", {
2331
- row: o(t).update.form
2309
+ row: a(o).update.form
2332
2310
  }),
2333
2311
  (f(!0), w(S, null, L(s, (p) => (f(), w(S, null, [
2334
- o(i)(p.item.show?.form, o(t).update.form, o(t).update.type) ? (f(), w("div", {
2312
+ a(n)(p.item.show?.form, a(o).update.form, a(o).update.type) ? (f(), w("div", {
2335
2313
  key: 0,
2336
- class: R([p.item.form.span > 0 ? `col-${o(t).getColumnSpan(p, s)}` : "col", `form-item-col-${p.item.key}`])
2314
+ class: I([p.item.form.span > 0 ? `col-${a(o).getColumnSpan(p, s)}` : "col", `form-item-col-${p.item.key}`])
2337
2315
  }, [
2338
- (f(!0), w(S, null, L(p.item.children ? p.children : [p], (y) => (f(), b(Qe, {
2316
+ (f(!0), w(S, null, L(p.item.children ? p.children : [p], (y) => (f(), g(Xe, {
2339
2317
  key: y.item.key,
2340
- conf: o(t),
2318
+ conf: a(o),
2341
2319
  item: y
2342
2320
  }, _({ _: 2 }, [
2343
- L(c.$slots, (I, M) => ({
2344
- name: M,
2345
- fn: h((T) => [
2346
- k(c.$slots, M, v({ ref_for: !0 }, T || {}))
2321
+ L(c.$slots, (T, A) => ({
2322
+ name: A,
2323
+ fn: h((M) => [
2324
+ k(c.$slots, A, v({ ref_for: !0 }, M || {}))
2347
2325
  ])
2348
2326
  }))
2349
2327
  ]), 1032, ["conf", "item"]))), 128))
2350
2328
  ], 2)) : C("", !0)
2351
2329
  ], 64))), 256)),
2352
2330
  k(c.$slots, "form-end", {
2353
- row: o(t).update.form
2331
+ row: a(o).update.form
2354
2332
  })
2355
2333
  ], 2)) : C("", !0)
2356
2334
  ], 64))), 256)) : C("", !0)
@@ -2360,33 +2338,33 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2360
2338
  ]),
2361
2339
  _: 3
2362
2340
  }, 16, ["modelValue", "title", "before-close"]),
2363
- V(o(Z), {
2364
- modelValue: o(t).remove.show,
2365
- "onUpdate:modelValue": m[9] || (m[9] = (s) => o(t).remove.show = s),
2366
- title: o(t).remove.title,
2341
+ V(a(Z), {
2342
+ modelValue: a(o).remove.show,
2343
+ "onUpdate:modelValue": m[9] || (m[9] = (s) => a(o).remove.show = s),
2344
+ title: a(o).remove.title,
2367
2345
  "close-on-click-modal": !1
2368
2346
  }, {
2369
2347
  footer: h(() => [
2370
2348
  O("span", nt, [
2371
- V(o(N), {
2372
- size: n.option.size?.form
2349
+ V(a(N), {
2350
+ size: i.option.size?.form
2373
2351
  }, {
2374
2352
  default: h(() => [
2375
- V(o(F), {
2376
- onClick: o(t).remove.close
2353
+ V(a(F), {
2354
+ onClick: a(o).remove.close
2377
2355
  }, {
2378
2356
  default: h(() => [
2379
- E(U(o(g).tCurd("close")), 1)
2357
+ D($(a(b).tCurd("close")), 1)
2380
2358
  ]),
2381
2359
  _: 1
2382
2360
  }, 8, ["onClick"]),
2383
- V(o(F), {
2361
+ V(a(F), {
2384
2362
  type: "danger",
2385
- onClick: o(t).remove.submit,
2386
- loading: o(t).remove.loading
2363
+ onClick: a(o).remove.submit,
2364
+ loading: a(o).remove.loading
2387
2365
  }, {
2388
2366
  default: h(() => [
2389
- E(U(o(g).tCurd("confirmDelete")), 1)
2367
+ D($(a(b).tCurd("confirmDelete")), 1)
2390
2368
  ]),
2391
2369
  _: 1
2392
2370
  }, 8, ["onClick", "loading"])
@@ -2396,84 +2374,84 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2396
2374
  ])
2397
2375
  ]),
2398
2376
  default: h(() => [
2399
- O("div", null, U(o(g).tCurd("confirmDeleteMessage", o(t).remove.items.length)), 1)
2377
+ O("div", null, $(a(b).tCurd("confirmDeleteMessage", a(o).remove.items.length)), 1)
2400
2378
  ]),
2401
2379
  _: 1
2402
2380
  }, 8, ["modelValue", "title"]),
2403
- V(Le, {
2381
+ V(Fe, {
2404
2382
  ref_key: "switchConfirmRef",
2405
- ref: a,
2406
- size: n.option.size?.form
2383
+ ref: l,
2384
+ size: i.option.size?.form
2407
2385
  }, null, 8, ["size"])
2408
2386
  ], 2);
2409
2387
  };
2410
2388
  }
2411
2389
  });
2412
- class ct {
2390
+ class ft {
2413
2391
  /**
2414
2392
  * 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
2415
2393
  *
2416
2394
  * @param href - 文件的远程地址
2417
2395
  * @param name - 下载后的文件名,默认 `'download.png'`
2418
2396
  */
2419
- static async download(l, d = "download.png") {
2397
+ static async download(t, d = "download.png") {
2420
2398
  const e = document.createElement("a");
2421
- e.style.display = "none", e.href = l, e.setAttribute("download", d), typeof e.download > "u" && e.setAttribute("target", "_blank"), document.body.appendChild(e), e.click(), document.body.removeChild(e), window.URL.revokeObjectURL(l);
2399
+ e.style.display = "none", e.href = t, e.setAttribute("download", d), typeof e.download > "u" && e.setAttribute("target", "_blank"), document.body.appendChild(e), e.click(), document.body.removeChild(e), window.URL.revokeObjectURL(t);
2422
2400
  }
2423
2401
  /**
2424
2402
  * 将json对象或者json数组导出为json文件保存
2425
2403
  * @param data
2426
2404
  * @param name
2427
2405
  */
2428
- static exportJSONFile = (l, d) => {
2429
- const e = new Blob([JSON.stringify(l)], { type: "application/json" }), i = URL.createObjectURL(e), t = document.createElement("a");
2430
- t.href = i, t.download = `${d || "config"}.json`, t.click();
2406
+ static exportJSONFile = (t, d) => {
2407
+ const e = new Blob([JSON.stringify(t)], { type: "application/json" }), n = URL.createObjectURL(e), o = document.createElement("a");
2408
+ o.href = n, o.download = `${d || "config"}.json`, o.click();
2431
2409
  };
2432
2410
  /**
2433
2411
  * 导入文件内容,默认为json
2434
2412
  * @param param
2435
2413
  * @returns
2436
2414
  */
2437
- static importFile = async (l) => new Promise((d, e) => {
2438
- const i = document.createElement("input");
2439
- i.type = "file";
2440
- const t = l?.accept || ".json";
2441
- i.accept = t, i.style.display = "none", i.onchange = (a) => {
2442
- const r = a.target.files[0];
2415
+ static importFile = async (t) => new Promise((d, e) => {
2416
+ const n = document.createElement("input");
2417
+ n.type = "file";
2418
+ const o = t?.accept || ".json";
2419
+ n.accept = o, n.style.display = "none", n.onchange = (l) => {
2420
+ const r = l.target.files[0];
2443
2421
  if (!r) {
2444
- D.fail("未选择文件"), e("未选择文件");
2422
+ U.fail("未选择文件"), e("未选择文件");
2445
2423
  return;
2446
2424
  }
2447
2425
  const c = new FileReader();
2448
2426
  c.onload = async (m) => {
2449
- const u = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
2427
+ const u = o == ".json" ? JSON.parse(m.target.result) : m.target.result;
2450
2428
  d(u);
2451
2429
  }, c.onerror = () => {
2452
- D.fail("文件读取失败"), e("文件读取失败");
2453
- }, c.readAsText(r), document.body.removeChild(i);
2454
- }, document.body.appendChild(i), i.click();
2430
+ U.fail("文件读取失败"), e("文件读取失败");
2431
+ }, c.readAsText(r), document.body.removeChild(n);
2432
+ }, document.body.appendChild(n), n.click();
2455
2433
  });
2456
2434
  }
2457
- const rt = (n, l) => {
2458
- if (n.component("TCurd", st), n.component("TFormList", le), n.component("TColumn", Se), l?.customComponent) {
2459
- j.customComponent = l.customComponent;
2460
- for (const d in l.customComponent)
2461
- n.component(d, l.customComponent[d]);
2435
+ const st = (i, t) => {
2436
+ if (i.component("TCurd", it), i.component("TFormList", ae), i.component("TColumn", Ee), t?.customComponent) {
2437
+ j.customComponent = t.customComponent;
2438
+ for (const d in t.customComponent)
2439
+ i.component(d, t.customComponent[d]);
2462
2440
  }
2463
- }, pt = {
2464
- install: rt
2441
+ }, ct = {
2442
+ install: st
2465
2443
  };
2466
2444
  export {
2467
2445
  P as ArrUtil,
2468
- $e as ExcelUtil,
2469
- Se as TColumn,
2470
- st as TCurd,
2471
- ct as TFile,
2446
+ Ue as ExcelUtil,
2447
+ Ee as TColumn,
2448
+ it as TCurd,
2449
+ ft as TFile,
2472
2450
  j as TForm,
2473
2451
  z as TFormConfig,
2474
- g as TFormI18n,
2475
- le as TFormList,
2476
- D as TSys,
2477
- pt as default,
2478
- rt as install
2452
+ b as TFormI18n,
2453
+ ae as TFormList,
2454
+ U as TSys,
2455
+ ct as default,
2456
+ st as install
2479
2457
  };