cc1-form 1.1.26 → 1.1.27

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