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