cc1-form 1.1.36 → 1.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cc1-form.js CHANGED
@@ -1,6 +1,6 @@
1
- import { ElMessage as ue, ElLoading as fe, ElForm as N, ElFormItem as q, ElInput as X, ElSwitch as ee, ElSelect as W, ElOption as B, ElTreeSelect as ie, ElDatePicker as te, ElDialog as Z, ElButton as F, ElTableColumn as x, ElRadioGroup as ce, ElRadio as pe, ElDropdown as me, ElDropdownMenu as he, ElDropdownItem as Y, ElPagination as ae, ElTable as be } from "element-plus";
1
+ import { ElMessage as ue, ElLoading as fe, ElForm as N, ElFormItem as G, ElInput as Q, ElSwitch as ee, ElSelect as W, ElOption as B, ElTreeSelect as ie, ElDatePicker as te, ElDialog as Z, ElButton as F, ElTableColumn as x, ElRadioGroup as ce, ElRadio as pe, ElDropdown as me, ElDropdownMenu as he, ElDropdownItem as Y, ElPagination as ae, ElTable as be } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as H, reactive as oe, onMounted as ne, resolveComponent as G, createElementBlock as w, createCommentVNode as C, openBlock as f, renderSlot as k, createElementVNode as U, createVNode as V, withCtx as h, createTextVNode as E, Fragment as S, renderList as L, createBlock as b, normalizeClass as j, normalizeStyle as se, ref as J, nextTick as ge, unref as o, mergeProps as v, toHandlers as O, resolveDynamicComponent as Q, toDisplayString as $, getCurrentInstance as ye, createSlots as _, withKeys as we, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
3
+ import { defineComponent as H, reactive as oe, onMounted as ne, resolveComponent as X, createElementBlock as w, createCommentVNode as C, openBlock as f, renderSlot as k, createElementVNode as O, createVNode as V, withCtx as h, createTextVNode as E, Fragment as S, renderList as L, createBlock as b, normalizeClass as R, normalizeStyle as se, ref as J, nextTick as ge, unref as o, mergeProps as v, toHandlers as $, resolveDynamicComponent as q, toDisplayString as U, getCurrentInstance as ye, createSlots as _, withKeys as we, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
4
4
  class D {
5
5
  /**
6
6
  * Vue Router 实例,需在应用初始化时赋值
@@ -26,13 +26,13 @@ class D {
26
26
  * @param data 数据
27
27
  * @returns 是否显示
28
28
  */
29
- static isFun = (l, ...r) => Array.isArray(l) ? l.some((e) => typeof e == "function" ? e(...r) : e) : typeof l == "function" ? l(...r) : l;
29
+ static isFun = (l, ...d) => Array.isArray(l) ? l.some((e) => typeof e == "function" ? e(...d) : e) : typeof l == "function" ? l(...d) : l;
30
30
  /**
31
31
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
32
32
  */
33
33
  static getRouterParams = () => {
34
- const l = this.router.currentRoute.value.query || {}, r = this.router.currentRoute.value.params || {};
35
- return Object.keys(l).length ? l : Object.keys(r).length ? r : {};
34
+ const l = this.router.currentRoute.value.query || {}, d = this.router.currentRoute.value.params || {};
35
+ return Object.keys(l).length ? l : Object.keys(d).length ? d : {};
36
36
  };
37
37
  /**
38
38
  * 模块赋值
@@ -45,8 +45,8 @@ class D {
45
45
  static loadModule = async (l) => {
46
46
  if (!D.moduleObj[l])
47
47
  throw new Error(`模块${l}未加载,请赋值如:TSys.moduleObj = { ${l}: ()=>import('${l}') }`);
48
- const r = await D.moduleObj[l]();
49
- return r.default ?? r;
48
+ const d = await D.moduleObj[l]();
49
+ return d.default ?? d;
50
50
  };
51
51
  /**
52
52
  * 提示信息对象管理
@@ -62,14 +62,14 @@ class D {
62
62
  * @param type 消息类型
63
63
  * @param options 其他选项
64
64
  */
65
- static showMessage(l, r, e = {}) {
65
+ static showMessage(l, d, e = {}) {
66
66
  const i = Date.now();
67
67
  if (!this.tipMessages[l] || i - this.tipMessages[l] > this.tipMessagesGap) {
68
68
  this.tipMessages[l] = i;
69
69
  const t = Object.assign(
70
70
  {
71
71
  message: l,
72
- type: r
72
+ type: d
73
73
  },
74
74
  e
75
75
  );
@@ -83,16 +83,16 @@ class D {
83
83
  * @param content
84
84
  * @param options
85
85
  */
86
- static fail = (l, r = {}) => {
87
- this.showMessage(l, "error", r);
86
+ static fail = (l, d = {}) => {
87
+ this.showMessage(l, "error", d);
88
88
  };
89
89
  /**
90
90
  * 成功提示
91
91
  * @param content
92
92
  * @param options
93
93
  */
94
- static success = (l, r = {}) => {
95
- this.showMessage(l, "success", r);
94
+ static success = (l, d = {}) => {
95
+ this.showMessage(l, "success", d);
96
96
  };
97
97
  static loadingObj = null;
98
98
  static loadingTimer = null;
@@ -101,11 +101,11 @@ class D {
101
101
  * @param show
102
102
  * @param text
103
103
  */
104
- static loading = (l = !0, r = "Loading...") => {
104
+ static loading = (l = !0, d = "Loading...") => {
105
105
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
106
106
  l ? this.loadingObj = fe.service({
107
107
  lock: !0,
108
- text: r,
108
+ text: d,
109
109
  background: "rgba(0, 0, 0, 0.3)"
110
110
  }) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
111
111
  }, 50);
@@ -115,8 +115,8 @@ class D {
115
115
  * @param url 地址
116
116
  * @param isCenter 是否居中
117
117
  */
118
- static openUrl = (l, r = !0) => {
119
- if (r) {
118
+ static openUrl = (l, d = !0) => {
119
+ if (d) {
120
120
  let e = screen.width / 2 - 500, i = screen.height / 2 - 800 / 2 - 30;
121
121
  window.open(
122
122
  l,
@@ -131,7 +131,7 @@ class D {
131
131
  * @param param
132
132
  * @returns
133
133
  */
134
- static getImgPic = (l) => new Promise(async (r, e) => {
134
+ static getImgPic = (l) => new Promise(async (d, e) => {
135
135
  let i = document.getElementById(l.id);
136
136
  const t = await D.loadModule("html2canvas");
137
137
  try {
@@ -146,8 +146,8 @@ class D {
146
146
  useCORS: !0,
147
147
  backgroundColor: "#ffffff00"
148
148
  }).then(function(a) {
149
- let d = a.toDataURL("image/png");
150
- r(d);
149
+ let r = a.toDataURL("image/png");
150
+ d(r);
151
151
  });
152
152
  } catch (a) {
153
153
  e(a);
@@ -438,6 +438,7 @@ class z {
438
438
  */
439
439
  view: !0
440
440
  },
441
+ /** 表单组件配置,如果需要配置单个table配置,需要在组件名中加入比如:customCom:{clearable:false,table:{showOverflowTooltip:false}} */
441
442
  options: {
442
443
  switch: {
443
444
  activeValue: !0,
@@ -492,13 +493,14 @@ class z {
492
493
  z.config = ObjectUtil.deepMerge(z.config, l);
493
494
  };
494
495
  }
495
- class R {
496
+ class j {
496
497
  /**
497
498
  * 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
498
499
  *
499
500
  * 通常由插件安装时自动设置,也可手动注册:
500
501
  * ```ts
501
502
  * TForm.customComponent['my-editor'] = MyEditorComponent
503
+ * TForm.customComponent['my-editor'] = { form: MyEditorComponent, table: MyEditorComponent }
502
504
  * ```
503
505
  */
504
506
  static customComponent = {};
@@ -509,8 +511,8 @@ class R {
509
511
  * @param field - 字段的 key 值
510
512
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
511
513
  */
512
- static findOptions = (l, r) => {
513
- const e = l.column.find((t) => t.key === r), i = (t) => t.replace(/-([a-z])/g, (a, d) => d.toUpperCase());
514
+ static findOptions = (l, d) => {
515
+ const e = l.column.find((t) => t.key === d), i = (t) => t.replace(/-([a-z])/g, (a, r) => r.toUpperCase());
514
516
  if (e)
515
517
  return e.options[i(e.type)];
516
518
  };
@@ -530,8 +532,8 @@ class R {
530
532
  }))
531
533
  )
532
534
  */
533
- static setOptionsData = (l, r, e) => {
534
- const i = R.findOptions(l, r);
535
+ static setOptionsData = (l, d, e) => {
536
+ const i = j.findOptions(l, d);
535
537
  i && (i.data = e);
536
538
  };
537
539
  static form = {
@@ -543,9 +545,9 @@ class R {
543
545
  * @param treeData 树形数据
544
546
  * @param option 组件配置
545
547
  */
546
- parentId: (l, r, e, i) => {
548
+ parentId: (l, d, e, i) => {
547
549
  const t = z.config.table.rowKey;
548
- l ? r.type === D.EDialog.Insert ? (r.form.parentId = l[t], r.form.sort = l.children.length + 1) : r.form.parentId = l.parentId.substring(l.parentId.lastIndexOf(",") + 1) : (r.form.parentId = "0", r.form.sort = e.length + 1), R.setOptionsData(i, "parentId", [{ [t]: "0", title: "根", children: e }]);
550
+ l ? d.type === D.EDialog.Insert ? (d.form.parentId = l[t], d.form.sort = l.children.length + 1) : d.form.parentId = l.parentId.substring(l.parentId.lastIndexOf(",") + 1) : (d.form.parentId = "0", d.form.sort = e.length + 1), j.setOptionsData(i, "parentId", [{ [t]: "0", title: "根", children: e }]);
549
551
  }
550
552
  }
551
553
  };
@@ -560,13 +562,13 @@ class P {
560
562
  * @param field 字段名
561
563
  * @param row 行数据
562
564
  */
563
- static setId = (l, r, e) => {
564
- r[l] || (r[l] = []);
565
+ static setId = (l, d, e) => {
566
+ d[l] || (d[l] = []);
565
567
  const i = z.config.table.rowKey;
566
- r[l].forEach((t) => {
568
+ d[l].forEach((t) => {
567
569
  e.forEach((a) => {
568
- let d = a.default ?? "";
569
- a.type === "number" && (d = a.default ?? 0), a.type === "boolean" && (d = a.default ?? !1), a.type === "time" && (d = a.default ?? /* @__PURE__ */ new Date()), t[a.value] === void 0 && (t[a.value] = d);
570
+ let r = a.default ?? "";
571
+ a.type === "number" && (r = a.default ?? 0), a.type === "boolean" && (r = a.default ?? !1), a.type === "time" && (r = a.default ?? /* @__PURE__ */ new Date()), t[a.value] === void 0 && (t[a.value] = r);
570
572
  }), t[i] || (t[i] = P.getIdFun());
571
573
  });
572
574
  };
@@ -577,19 +579,19 @@ class P {
577
579
  * @param itemFields 元素字段-如:[{label:'',value:''}]
578
580
  * @param callback 回调函数
579
581
  */
580
- static add = (l, r, e, i) => {
582
+ static add = (l, d, e, i) => {
581
583
  const t = JSONUtil.cp(e);
582
- P.setId(l, r, e);
584
+ P.setId(l, d, e);
583
585
  const a = z.config.table.rowKey;
584
- r[l].push(
586
+ d[l].push(
585
587
  t.reduce(
586
- (d, c) => {
588
+ (r, c) => {
587
589
  let m = c.default ?? "";
588
- return c.type === "number" && (m = c.default ?? 0), c.type === "boolean" && (m = c.default ?? !1), c.type === "time" && (m = c.default ?? /* @__PURE__ */ new Date()), d[c.value] = m, d;
590
+ return c.type === "number" && (m = c.default ?? 0), c.type === "boolean" && (m = c.default ?? !1), c.type === "time" && (m = c.default ?? /* @__PURE__ */ new Date()), r[c.value] = m, r;
589
591
  },
590
592
  { [a]: P.getIdFun() }
591
593
  )
592
- ), i?.(r);
594
+ ), i?.(d);
593
595
  };
594
596
  /**
595
597
  * 删除数组元素
@@ -598,9 +600,9 @@ class P {
598
600
  * @param item 元素-如:{_id:''}
599
601
  * @param callback 回调函数
600
602
  */
601
- static remove = (l, r, e, i) => {
603
+ static remove = (l, d, e, i) => {
602
604
  const t = z.config.table.rowKey;
603
- r[l] = r[l].filter((a) => a[t] !== e[t]), i?.(r);
605
+ d[l] = d[l].filter((a) => a[t] !== e[t]), i?.(d);
604
606
  };
605
607
  /**
606
608
  * 获取没有id的数据
@@ -608,10 +610,10 @@ class P {
608
610
  * @param childernField 子级字段-如:list、children
609
611
  * @returns 没有id的数据
610
612
  */
611
- static getNoIdData = (l, r) => {
613
+ static getNoIdData = (l, d) => {
612
614
  const e = JSONUtil.cp(l), i = z.config.table.rowKey;
613
615
  return e.forEach((t) => {
614
- t[i] && delete t[i], r && t[r] && P.getNoIdData(t[r], r);
616
+ t[i] && delete t[i], d && t[d] && P.getNoIdData(t[d], d);
615
617
  }), e;
616
618
  };
617
619
  }
@@ -658,29 +660,29 @@ const ze = {
658
660
  },
659
661
  emits: ["change"],
660
662
  setup(n, { emit: l }) {
661
- const r = n, e = oe({
663
+ const d = n, e = oe({
662
664
  show: !1,
663
- add: (t, a, d) => {
664
- P.add(t, a, d, () => {
665
+ add: (t, a, r) => {
666
+ P.add(t, a, r, () => {
665
667
  i("change");
666
668
  });
667
669
  },
668
- remove: (t, a, d) => {
669
- P.remove(t, a, d, () => {
670
+ remove: (t, a, r) => {
671
+ P.remove(t, a, r, () => {
670
672
  i("change");
671
673
  });
672
674
  }
673
675
  });
674
676
  ne(() => {
675
- P.setId(r.field, r.row, r.itemFields), e.show = !0;
677
+ P.setId(d.field, d.row, d.itemFields), e.show = !0;
676
678
  });
677
679
  const i = l;
678
680
  return (t, a) => {
679
- const d = G("el-button"), c = G("el-input");
681
+ const r = X("el-button"), c = X("el-input");
680
682
  return e.show ? (f(), w("div", ze, [
681
683
  k(t.$slots, "list-start", { row: n.row }),
682
- U("div", null, [
683
- V(d, {
684
+ O("div", null, [
685
+ V(r, {
684
686
  link: "",
685
687
  type: "primary",
686
688
  onClick: a[0] || (a[0] = (m) => e.add(n.field, n.row, n.itemFields))
@@ -700,7 +702,7 @@ const ze = {
700
702
  modelValue: m[u.value],
701
703
  "onUpdate:modelValue": (s) => m[u.value] = s,
702
704
  style: se({ width: n.inputWidth }),
703
- class: j(n.inputClass),
705
+ class: R(n.inputClass),
704
706
  placeholder: u[n.label] || u[n.value],
705
707
  onChange: a[1] || (a[1] = (s) => i("change"))
706
708
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
@@ -708,7 +710,7 @@ const ze = {
708
710
  item: m,
709
711
  row: n.row
710
712
  }),
711
- V(d, {
713
+ V(r, {
712
714
  link: "",
713
715
  type: "danger",
714
716
  onClick: (u) => e.remove(n.field, n.row, m)
@@ -740,15 +742,15 @@ const ze = {
740
742
  }
741
743
  },
742
744
  setup(n, { expose: l }) {
743
- const r = D.isFun, e = D.EDialog, i = J(), t = n, a = oe({
745
+ const d = D.isFun, e = D.EDialog, i = J(), t = n, a = oe({
744
746
  rules: {},
745
747
  show: !0,
746
748
  form: {},
747
749
  formDefault: {},
748
750
  formColumn: [],
749
- getDisabled: (d) => d.disabled?.[(t.type || e.Insert) === e.Insert ? "create" : "update"],
751
+ getDisabled: (r) => r.disabled?.[(t.type || e.Insert) === e.Insert ? "create" : "update"],
750
752
  initColumnForm: async () => {
751
- const d = t.option;
753
+ const r = t.option;
752
754
  a.formColumn = [];
753
755
  const c = [], m = t.option.form?.maxSpan || 12, u = t.option.form?.defaultSpan || m;
754
756
  let s = [];
@@ -760,7 +762,7 @@ const ze = {
760
762
  s.push({ item: y, span: I }), (T === 1 && s[0].span === 0 || M >= m || I === 0 && T > 1) && (c.push(s), s = []), y.rules && (a.rules[y.key] = y.rules);
761
763
  }
762
764
  };
763
- d.column.forEach((y) => {
765
+ r.column.forEach((y) => {
764
766
  y.isForm = !0, p(y);
765
767
  }), s.length > 0 && c.push(s), a.formColumn = c, a.form = JSONUtil.cp(a.formDefault);
766
768
  },
@@ -771,7 +773,7 @@ const ze = {
771
773
  return a.initColumnForm(), l({
772
774
  ref: i,
773
775
  conf: a
774
- }), (d, c) => (f(), b(o(N), {
776
+ }), (r, c) => (f(), b(o(N), {
775
777
  ref_key: "ruleFormRef",
776
778
  ref: i,
777
779
  model: a.form,
@@ -779,48 +781,48 @@ const ze = {
779
781
  }, {
780
782
  default: h(() => [
781
783
  a.show ? (f(!0), w(S, { key: 0 }, L(a.formColumn, (m) => (f(), w("div", De, [
782
- k(d.$slots, "form-start", {
784
+ k(r.$slots, "form-start", {
783
785
  row: a.form
784
786
  }),
785
787
  (f(!0), w(S, null, L(m, (u) => (f(), w(S, null, [
786
- o(r)(u.item.show?.form, a.form) ?? !0 ? (f(), w("div", {
788
+ o(d)(u.item.show?.form, a.form) ?? !0 ? (f(), w("div", {
787
789
  key: 0,
788
- class: j(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
790
+ class: R(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
789
791
  }, [
790
- V(o(q), {
792
+ V(o(G), {
791
793
  label: u.item.label,
792
794
  prop: u.item.key,
793
795
  "label-width": u.item.form?.labelWidth || "100px"
794
796
  }, {
795
797
  default: h(() => [
796
- k(d.$slots, "form-" + u.item.key + "-start", {
798
+ k(r.$slots, "form-" + u.item.key + "-start", {
797
799
  row: a.form,
798
800
  item: u.item
799
801
  }),
800
- k(d.$slots, "form-" + u.item.key, {
802
+ k(r.$slots, "form-" + u.item.key, {
801
803
  row: a.form,
802
804
  item: u.item
803
805
  }, () => [
804
- u.item.type === "input" ? (f(), b(o(X), v({
806
+ u.item.type === "input" ? (f(), b(o(Q), v({
805
807
  key: 0,
806
808
  modelValue: a.form[u.item.key],
807
809
  "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
808
810
  ref_for: !0
809
- }, u.item.options?.input, O(u.item.options?.input?.on || {}), {
811
+ }, u.item.options?.input, $(u.item.options?.input?.on || {}), {
810
812
  disabled: a.getDisabled(u.item)
811
813
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (f(), b(o(ee), v({
812
814
  key: 1,
813
815
  modelValue: a.form[u.item.key],
814
816
  "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
815
817
  ref_for: !0
816
- }, u.item.options?.switch, O(u.item.options?.switch?.on || {}), {
818
+ }, u.item.options?.switch, $(u.item.options?.switch?.on || {}), {
817
819
  disabled: a.getDisabled(u.item)
818
820
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (f(), b(o(W), v({
819
821
  key: 2,
820
822
  modelValue: a.form[u.item.key],
821
823
  "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
822
824
  ref_for: !0
823
- }, u.item.options?.select, O(u.item.options?.select?.on || {}), {
825
+ }, u.item.options?.select, $(u.item.options?.select?.on || {}), {
824
826
  disabled: a.getDisabled(u.item),
825
827
  style: { width: "100%" }
826
828
  }), {
@@ -837,15 +839,15 @@ const ze = {
837
839
  row: a.form,
838
840
  field: u.item.key,
839
841
  ref_for: !0
840
- }, u.item.options?.list, O(u.item.options?.list?.on || {}), {
842
+ }, u.item.options?.list, $(u.item.options?.list?.on || {}), {
841
843
  disabled: a.getDisabled(u.item),
842
844
  style: { width: "100%" }
843
- }), null, 16, ["row", "field", "disabled"])) : u.item.type === "tree-select" ? (f(), b(o(ie), v({
845
+ }), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (f(), b(o(ie), v({
844
846
  key: 4,
845
847
  modelValue: a.form[u.item.key],
846
848
  "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
847
849
  ref_for: !0
848
- }, u.item.options?.treeSelect, O(u.item.options?.treeSelect?.on || {}), {
850
+ }, u.item.options?.treeSelect, $(u.item.options?.treeSelect?.on || {}), {
849
851
  disabled: a.getDisabled(u.item),
850
852
  style: { width: "100%" }
851
853
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (f(), b(o(te), v({
@@ -853,18 +855,18 @@ const ze = {
853
855
  modelValue: a.form[u.item.key],
854
856
  "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
855
857
  ref_for: !0
856
- }, u.item.options?.datetime, O(u.item.options?.datetime?.on || {}), {
858
+ }, u.item.options?.datetime, $(u.item.options?.datetime?.on || {}), {
857
859
  disabled: a.getDisabled(u.item)
858
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && o(R).customComponent[u.item.type] ? (f(), b(Q(o(R).customComponent[u.item.type]), v({
860
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && o(j).customComponent[u.item.type] ? (f(), b(q(o(j).customComponent[u.item.type]), v({
859
861
  key: 6,
860
862
  modelValue: a.form[u.item.key],
861
863
  "onUpdate:modelValue": (s) => a.form[u.item.key] = s,
862
864
  ref_for: !0
863
- }, u.item.options?.[u.item.type], O(u.item.options?.[u.item.type]?.on || {}), {
865
+ }, u.item.options?.[u.item.type], $(u.item.options?.[u.item.type]?.on || {}), {
864
866
  disabled: a.getDisabled(u.item)
865
867
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
866
868
  ]),
867
- k(d.$slots, "form-" + u.item.key + "-end", {
869
+ k(r.$slots, "form-" + u.item.key + "-end", {
868
870
  row: a.form,
869
871
  item: u.item
870
872
  })
@@ -873,7 +875,7 @@ const ze = {
873
875
  }, 1032, ["label", "prop", "label-width"])
874
876
  ], 2)) : C("", !0)
875
877
  ], 64))), 256)),
876
- k(d.$slots, "form-end", {
878
+ k(r.$slots, "form-end", {
877
879
  row: a.form
878
880
  })
879
881
  ]))), 256)) : C("", !0)
@@ -882,7 +884,7 @@ const ze = {
882
884
  }, 8, ["model", "rules"]));
883
885
  }
884
886
  });
885
- const $e = {
887
+ const Ue = {
886
888
  search: "搜索",
887
889
  add: "新增",
888
890
  edit: "编辑",
@@ -917,24 +919,24 @@ const $e = {
917
919
  };
918
920
  class g {
919
921
  /** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
920
- static t(l, ...r) {
922
+ static t(l, ...d) {
921
923
  if (typeof l == "function")
922
- return l(...r);
924
+ return l(...d);
923
925
  l = String(l);
924
926
  let e = 0;
925
- return l.replace(/{([^}]+)}/g, (i, t) => e < r.length ? String(r[e++]) : `{${t}}`);
927
+ return l.replace(/{([^}]+)}/g, (i, t) => e < d.length ? String(d[e++]) : `{${t}}`);
926
928
  }
927
929
  static setI18n = (l) => {
928
930
  g.curd = ObjectUtil.deepMerge(g.curd, l);
929
931
  };
930
932
  /** 解析curd国际化值 */
931
- static tCurd(l, ...r) {
932
- return this.t(this.curd[l], ...r);
933
+ static tCurd(l, ...d) {
934
+ return this.t(this.curd[l], ...d);
933
935
  }
934
936
  /** curd表单 */
935
- static curd = $e;
937
+ static curd = Ue;
936
938
  }
937
- class Ue {
939
+ class $e {
938
940
  /**
939
941
  * 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
940
942
  *
@@ -942,19 +944,19 @@ class Ue {
942
944
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
943
945
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
944
946
  */
945
- static exportToExcel = async (l, r, e) => {
947
+ static exportToExcel = async (l, d, e) => {
946
948
  if (!l || l.length === 0) return;
947
949
  const i = await D.loadModule("xlsx"), t = l.map((c) => {
948
950
  const m = {};
949
- return r.forEach((u) => {
951
+ return d.forEach((u) => {
950
952
  m[u.label] = c[u.key];
951
953
  }), m;
952
- }), a = i.utils.json_to_sheet(t), d = i.utils.book_new();
953
- i.utils.book_append_sheet(d, a, "Sheet1"), e ? typeof e == "function" && (e = e()) : e = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(d, `${e}.xlsx`);
954
+ }), a = i.utils.json_to_sheet(t), r = i.utils.book_new();
955
+ i.utils.book_append_sheet(r, a, "Sheet1"), e ? typeof e == "function" && (e = e()) : e = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, i.writeFile(r, `${e}.xlsx`);
954
956
  };
955
957
  }
956
958
  const K = D.EDialog, Oe = (n) => {
957
- const l = J(), r = J(), e = oe({
959
+ const l = J(), d = J(), e = oe({
958
960
  option: n.option,
959
961
  /** 查询区域相关配置对象 */
960
962
  search: {
@@ -1034,8 +1036,8 @@ const K = D.EDialog, Oe = (n) => {
1034
1036
  else {
1035
1037
  const i = (t) => {
1036
1038
  let a = [];
1037
- return t.forEach((d) => {
1038
- a.push(d[n.option.table.rowKey]), d.children && d.children.length > 0 && (a = a.concat(i(d.children)));
1039
+ return t.forEach((r) => {
1040
+ a.push(r[n.option.table.rowKey]), r.children && r.children.length > 0 && (a = a.concat(i(r.children)));
1039
1041
  }), a;
1040
1042
  };
1041
1043
  e.table.expand.rowKeys = i(e.table.data);
@@ -1074,13 +1076,13 @@ const K = D.EDialog, Oe = (n) => {
1074
1076
  [z.config.page.num]: e.page.num,
1075
1077
  ...e.search.getFormData(),
1076
1078
  ...t
1077
- }), d = z.config.result, c = a.data || { [d.list]: a };
1078
- let m = (Array.isArray(c[d.list]), c[d.list]);
1079
+ }), r = z.config.result, c = a.data || { [r.list]: a };
1080
+ let m = (Array.isArray(c[r.list]), c[r.list]);
1079
1081
  const u = e.update.formColumn.flat(), s = JSONUtil.cp(m).map((p) => (Object.keys(p).forEach((I) => {
1080
1082
  const M = u.find((T) => T.item.key === I);
1081
1083
  M && ["select", "radio"].includes(M.item.type) && (M.item.table.format || (M.item.table.format = (T) => M.item.options[M.item.type].data?.find((A) => A.value == T[I])?.label || T[I]));
1082
1084
  }), p));
1083
- e.table.data = n.option.data ? await n.option.data(s, m) : s, e.page.total = c[d.total] || 0;
1085
+ e.table.data = n.option.data ? await n.option.data(s, m) : s, e.page.total = c[r.total] || 0;
1084
1086
  } catch (t) {
1085
1087
  console.error(t);
1086
1088
  } finally {
@@ -1121,11 +1123,11 @@ const K = D.EDialog, Oe = (n) => {
1121
1123
  /** 执行指定方式的导出(如select、page、all) */
1122
1124
  start: async (i) => {
1123
1125
  let t = await e.export.run[i](), a = n.option.column;
1124
- const d = JSONUtil.cp({
1126
+ const r = JSONUtil.cp({
1125
1127
  data: t,
1126
1128
  columns: a
1127
1129
  }), c = n.option.tools?.export || {};
1128
- c.before && c.before(d), Ue.exportToExcel(d.data, d.columns, c.fileName);
1130
+ c.before && c.before(r), $e.exportToExcel(r.data, r.columns, c.fileName);
1129
1131
  },
1130
1132
  /** 获取当前选中项进行导出 */
1131
1133
  select: () => {
@@ -1231,17 +1233,23 @@ const K = D.EDialog, Oe = (n) => {
1231
1233
  /** 提交增改表单操作 */
1232
1234
  submit: () => {
1233
1235
  FunUtil.throttle(async () => {
1234
- await r.value?.validate(async (d, c) => new Promise((m, u) => {
1235
- d || (D.fail(g.tCurd("checkFormData")), u(!1)), m();
1236
+ await d.value?.validate(async (r, c) => new Promise((m, u) => {
1237
+ r || (D.fail(g.tCurd("checkFormData")), u(!1)), m();
1236
1238
  })), e.update.loading = !0;
1237
1239
  const i = e.update.type === K.Insert ? n.option.api.create : n.option.api.update;
1240
+ try {
1241
+ await n.option.form?.submitBefore?.(e.update.form, e.update);
1242
+ } catch {
1243
+ e.update.loading = !1;
1244
+ return;
1245
+ }
1238
1246
  let t = JSONUtil.cp(e.update.form);
1239
- delete t.children, await n.option.form?.submitBefore?.(t, e.update);
1240
- const a = new Set(n.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1241
- Object.keys(t).forEach((d) => {
1242
- if (a.has(d) && t[d] != null) {
1243
- const c = new Date(t[d]).getTime();
1244
- isNaN(c) || (t[d] = c);
1247
+ delete t.children;
1248
+ const a = new Set(n.option.column.filter((r) => r.type === "datetime").map((r) => r.key));
1249
+ Object.keys(t).forEach((r) => {
1250
+ if (a.has(r) && t[r] != null) {
1251
+ const c = new Date(t[r]).getTime();
1252
+ isNaN(c) || (t[r] = c);
1245
1253
  }
1246
1254
  });
1247
1255
  try {
@@ -1249,8 +1257,8 @@ const K = D.EDialog, Oe = (n) => {
1249
1257
  await i({
1250
1258
  ...t
1251
1259
  }), e.update.close(), await e.table.getList(), n.option.form?.submitAfter?.(t, e.update);
1252
- } catch (d) {
1253
- console.error(d);
1260
+ } catch (r) {
1261
+ console.error(r);
1254
1262
  } finally {
1255
1263
  e.update.loading = !1;
1256
1264
  }
@@ -1346,19 +1354,19 @@ const K = D.EDialog, Oe = (n) => {
1346
1354
  apiDataMap: {},
1347
1355
  /** 获取并绑定curd中所有下拉数据等远程依赖 */
1348
1356
  initApiData: async (i) => {
1349
- const t = [], a = (d) => {
1350
- if (d.children && d.children.length) {
1351
- d.children.forEach((c) => a(c));
1357
+ const t = [], a = (r) => {
1358
+ if (r.children && r.children.length) {
1359
+ r.children.forEach((c) => a(c));
1352
1360
  return;
1353
1361
  }
1354
- if (d.type === "select" && d.options?.select?.dataApi && d.options?.select?.dataApiConfig?.[i]) {
1355
- if (e.apiDataMap[d.key] && d.options?.select?.dataApiConfig?.once) return;
1362
+ if (r.type === "select" && r.options?.select?.dataApi && r.options?.select?.dataApiConfig?.[i]) {
1363
+ if (e.apiDataMap[r.key] && r.options?.select?.dataApiConfig?.once) return;
1356
1364
  const c = (async () => {
1357
1365
  try {
1358
- let m = await d.options?.select?.dataApi?.();
1366
+ let m = await r.options?.select?.dataApi?.();
1359
1367
  if (m) {
1360
- const u = d.options?.select?.dataPath;
1361
- u && (m = ObjectUtil.getPathValue(m, u)), d.options.select.data = m, e.apiDataMap[d.key] = m;
1368
+ const u = r.options?.select?.dataPath;
1369
+ u && (m = ObjectUtil.getPathValue(m, u)), r.options.select.data = m, e.apiDataMap[r.key] = m;
1362
1370
  }
1363
1371
  } catch {
1364
1372
  }
@@ -1366,8 +1374,8 @@ const K = D.EDialog, Oe = (n) => {
1366
1374
  t.push(c);
1367
1375
  }
1368
1376
  };
1369
- return n.option.column.forEach((d) => {
1370
- a(d);
1377
+ return n.option.column.forEach((r) => {
1378
+ a(r);
1371
1379
  }), await Promise.all(t), !0;
1372
1380
  },
1373
1381
  /** 初始化curd配置(option默认值合并等) */
@@ -1393,18 +1401,18 @@ const K = D.EDialog, Oe = (n) => {
1393
1401
  }
1394
1402
  });
1395
1403
  const t = (a) => {
1396
- for (const d in i) {
1397
- if (d === "table") {
1404
+ for (const r in i) {
1405
+ if (r === "table") {
1398
1406
  if (a.table = ObjectUtil.deepMerge(i.table, a.table || {}), a.children) {
1399
1407
  a.children.forEach((c) => {
1400
1408
  t(c);
1401
1409
  });
1402
1410
  return;
1403
1411
  }
1404
- } else d === "type" ? a.type = a.type || i.type : a[d] = ObjectUtil.deepMerge(i[d], a[d] || {});
1405
- a.options = a.options || {}, a.options[a.type] = a.options[a.type] || {}, a.options[a.type].size = n.option.size.form, a.options.search = a.options.search || JSONUtil.cp(a.options), a.options.search[a.type] = a.options.search[a.type] || {}, a.options.search[a.type].size = n.option.size.search;
1412
+ } else r === "type" ? a.type = a.type || i.type : a[r] = ObjectUtil.deepMerge(i[r], a[r] || {});
1413
+ a.options = a.options || {}, a.options[a.type] = a.options[a.type] || {}, a.options[a.type].size = n.option.size.form, a.options.search = a.options.search || JSONUtil.cp(a.options), a.options.search[a.type] = a.options.search[a.type] || {}, a.options.search[a.type].size = n.option.size.search, a.table = ObjectUtil.deepMerge(a.table, a.options[a.type].table || {});
1406
1414
  }
1407
- a.type === "switch" && (a.options.switch.tableBeforeChange = async (d, c) => {
1415
+ a.type === "switch" && (a.options.switch.tableBeforeChange = async (r, c) => {
1408
1416
  const m = a.options?.switch;
1409
1417
  try {
1410
1418
  await l.value?.open({
@@ -1414,7 +1422,7 @@ const K = D.EDialog, Oe = (n) => {
1414
1422
  try {
1415
1423
  return n.option.api.update ? (await n.option.api.update({
1416
1424
  [n.option.table?.rowKey]: c[n.option.table?.rowKey],
1417
- [d]: c[d] === m.activeValue ? m.inactiveValue : m.activeValue,
1425
+ [r]: c[r] === m.activeValue ? m.inactiveValue : m.activeValue,
1418
1426
  final(u, s, p) {
1419
1427
  e.table.loading = !1;
1420
1428
  }
@@ -1427,7 +1435,7 @@ const K = D.EDialog, Oe = (n) => {
1427
1435
  } catch {
1428
1436
  return !1;
1429
1437
  }
1430
- }), a.type === "tree-select" && (a.options.treeSelect.rowKey = n.option.table?.rowKey, a.options.treeSelect.nodeKey = n.option.table?.rowKey);
1438
+ }), a.type === "treeSelect" && (a.options.treeSelect.rowKey = n.option.table?.rowKey, a.options.treeSelect.nodeKey = n.option.table?.rowKey);
1431
1439
  };
1432
1440
  n.option.column.forEach(t), n.option.table?.column?.forEach(t);
1433
1441
  },
@@ -1445,7 +1453,7 @@ const K = D.EDialog, Oe = (n) => {
1445
1453
  list: [],
1446
1454
  listSource: []
1447
1455
  };
1448
- const t = [], a = n.option.form?.maxSpan || 12, d = n.option.form?.defaultSpan || a / 2;
1456
+ const t = [], a = n.option.form?.maxSpan || 12, r = n.option.form?.defaultSpan || a / 2;
1449
1457
  let c = [];
1450
1458
  const m = (p) => {
1451
1459
  if (p.children) {
@@ -1455,7 +1463,7 @@ const K = D.EDialog, Oe = (n) => {
1455
1463
  return;
1456
1464
  }
1457
1465
  if (e.update.formDefault[p.key] = p.value, p.table.table && (p.show.table && e.table.column.show.list.push(p.key), p.table.table && e.table.column.show.listSource.push(p.key)), !(p.isForm && typeof p.show?.form == "boolean") || p.show?.form) {
1458
- p.form = p.form || { span: d }, p.form.span = p.form.span ?? d;
1466
+ p.form = p.form || { span: r }, p.form.span = p.form.span ?? r;
1459
1467
  let y = p.form.span, I = c.reduce((T, A) => T + A.span, y);
1460
1468
  const M = c.length;
1461
1469
  if (c.push({ item: p, span: y }), (M === 1 && c[0].span === 0 || I >= a || y === 0 && M > 1) && (t.push(c), c = []), p.rules) {
@@ -1490,29 +1498,29 @@ const K = D.EDialog, Oe = (n) => {
1490
1498
  });
1491
1499
  return e.init(), ne(() => {
1492
1500
  n.option.init !== !1 && e.table.getList();
1493
- }), { conf: e, switchConfirmRef: l, ruleFormRef: r };
1501
+ }), { conf: e, switchConfirmRef: l, ruleFormRef: d };
1494
1502
  }, Fe = { class: "dialog-footer" }, Le = /* @__PURE__ */ H({
1495
1503
  __name: "switchConfirm",
1496
1504
  props: {
1497
1505
  size: {}
1498
1506
  },
1499
1507
  setup(n, { expose: l }) {
1500
- const r = J(!1), e = J("确认修改"), i = J("确认要修改状态吗?");
1508
+ const d = J(!1), e = J("确认修改"), i = J("确认要修改状态吗?");
1501
1509
  let t = null, a = null;
1502
- const d = (u) => (u?.title && (e.value = u.title), u?.content && (i.value = u.content), r.value = !0, new Promise((s, p) => {
1510
+ const r = (u) => (u?.title && (e.value = u.title), u?.content && (i.value = u.content), d.value = !0, new Promise((s, p) => {
1503
1511
  t = s, a = p;
1504
1512
  })), c = () => {
1505
- r.value = !1, t?.(!0), t = null, a = null;
1513
+ d.value = !1, t?.(!0), t = null, a = null;
1506
1514
  }, m = () => {
1507
- r.value = !1, a?.(new Error("用户取消操作")), t = null, a = null;
1515
+ d.value = !1, a?.(new Error("用户取消操作")), t = null, a = null;
1508
1516
  };
1509
1517
  return l({
1510
- open: d
1518
+ open: r
1511
1519
  }), (u, s) => {
1512
- const p = G("el-form");
1520
+ const p = X("el-form");
1513
1521
  return f(), b(o(Z), {
1514
- modelValue: r.value,
1515
- "onUpdate:modelValue": s[0] || (s[0] = (y) => r.value = y),
1522
+ modelValue: d.value,
1523
+ "onUpdate:modelValue": s[0] || (s[0] = (y) => d.value = y),
1516
1524
  title: e.value,
1517
1525
  "close-on-click-modal": !1,
1518
1526
  width: "400px"
@@ -1520,7 +1528,7 @@ const K = D.EDialog, Oe = (n) => {
1520
1528
  footer: h(() => [
1521
1529
  V(p, { size: u.size }, {
1522
1530
  default: h(() => [
1523
- U("span", Fe, [
1531
+ O("span", Fe, [
1524
1532
  V(o(F), { onClick: m }, {
1525
1533
  default: h(() => s[1] || (s[1] = [
1526
1534
  E("取消")
@@ -1542,24 +1550,24 @@ const K = D.EDialog, Oe = (n) => {
1542
1550
  }, 8, ["size"])
1543
1551
  ]),
1544
1552
  default: h(() => [
1545
- U("div", null, $(i.value), 1)
1553
+ O("div", null, U(i.value), 1)
1546
1554
  ]),
1547
1555
  _: 1
1548
1556
  }, 8, ["modelValue", "title"]);
1549
1557
  };
1550
1558
  }
1551
1559
  }), re = (n, l) => {
1552
- const r = n.__vccOpts || n;
1560
+ const d = n.__vccOpts || n;
1553
1561
  for (const [e, i] of l)
1554
- r[e] = i;
1555
- return r;
1562
+ d[e] = i;
1563
+ return d;
1556
1564
  }, Ie = {}, Me = {
1557
1565
  xmlns: "http://www.w3.org/2000/svg",
1558
1566
  viewBox: "0 0 1024 1024"
1559
1567
  };
1560
1568
  function Te(n, l) {
1561
1569
  return f(), w("svg", Me, l[0] || (l[0] = [
1562
- U("path", {
1570
+ O("path", {
1563
1571
  fill: "currentColor",
1564
1572
  d: "M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"
1565
1573
  }, null, -1)
@@ -1572,7 +1580,7 @@ const je = /* @__PURE__ */ re(Ie, [["render", Te]]), Re = {}, Pe = {
1572
1580
  };
1573
1581
  function Ae(n, l) {
1574
1582
  return f(), w("svg", Pe, l[0] || (l[0] = [
1575
- U("path", {
1583
+ O("path", {
1576
1584
  fill: "currentColor",
1577
1585
  d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"
1578
1586
  }, null, -1)
@@ -1586,9 +1594,9 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1586
1594
  option: {}
1587
1595
  },
1588
1596
  setup(n) {
1589
- const l = D.isFun, r = ye().type;
1597
+ const l = D.isFun, d = ye().type;
1590
1598
  return (e, i) => {
1591
- const t = G("el-tooltip");
1599
+ const t = X("el-tooltip");
1592
1600
  return f(!0), w(S, null, L(e.columnList, (a) => (f(), w(S, {
1593
1601
  key: a.key
1594
1602
  }, [
@@ -1600,7 +1608,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1600
1608
  }, a.table), {
1601
1609
  header: h(() => [
1602
1610
  k(e.$slots, "table-header-" + a.key, { item: a }, () => [
1603
- U("div", Ne, [
1611
+ O("div", Ne, [
1604
1612
  a.table?.tooltip ? (f(), b(t, {
1605
1613
  key: 0,
1606
1614
  effect: "dark",
@@ -1608,20 +1616,20 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1608
1616
  placement: "top"
1609
1617
  }, {
1610
1618
  default: h(() => [
1611
- U("span", Be, [
1619
+ O("span", Be, [
1612
1620
  V(Ke)
1613
1621
  ])
1614
1622
  ]),
1615
1623
  _: 2
1616
1624
  }, 1032, ["content"])) : C("", !0),
1617
- E(" " + $(a.label), 1)
1625
+ E(" " + U(a.label), 1)
1618
1626
  ])
1619
1627
  ])
1620
1628
  ]),
1621
- default: h(({ row: d }) => [
1629
+ default: h(({ row: r }) => [
1622
1630
  a.children ? (f(), w(S, { key: 0 }, [
1623
1631
  i[0] || (i[0] = E("   ")),
1624
- (f(), b(Q(o(r)), {
1632
+ (f(), b(q(o(d)), {
1625
1633
  conf: e.conf,
1626
1634
  columnList: a.children,
1627
1635
  option: e.option
@@ -1634,8 +1642,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1634
1642
  }))
1635
1643
  ]), 1032, ["conf", "columnList", "option"]))
1636
1644
  ], 64)) : (f(), w(S, { key: 1 }, [
1637
- o(l)(a.show?.form, e.conf.inlineEdit.form, o(D).EDialog.Update) && e.option.table?.inlineEdit && e.conf.inlineEdit.row === d && (a.type === "input" || a.type === "select") ? (f(), w(S, { key: 0 }, [
1638
- a.type === "input" ? (f(), b(o(X), v({
1645
+ o(l)(a.show?.form, e.conf.inlineEdit.form, o(D).EDialog.Update) && e.option.table?.inlineEdit && e.conf.inlineEdit.row === r && (a.type === "input" || a.type === "select") ? (f(), w(S, { key: 0 }, [
1646
+ a.type === "input" ? (f(), b(o(Q), v({
1639
1647
  key: 0,
1640
1648
  modelValue: e.conf.inlineEdit.form[a.key],
1641
1649
  "onUpdate:modelValue": (c) => e.conf.inlineEdit.form[a.key] = c,
@@ -1664,23 +1672,28 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1664
1672
  }, 1040, ["modelValue", "onUpdate:modelValue"])) : C("", !0)
1665
1673
  ], 64)) : k(e.$slots, "table-" + a.key, {
1666
1674
  key: 1,
1667
- row: d,
1675
+ row: r,
1668
1676
  item: a
1669
1677
  }, () => [
1670
- a.type === "switch" ? (f(), b(o(ee), v({
1678
+ o(j).customComponent[a.type ?? ""]?.table ? (f(), b(q(o(j).customComponent[a.type ?? ""]?.table), v({
1671
1679
  key: 0,
1672
- modelValue: d[a.key],
1673
- "onUpdate:modelValue": (c) => d[a.key] = c,
1674
- "before-change": () => a.options?.switch?.tableBeforeChange?.(a.key, d),
1680
+ modelValue: r[a.key],
1681
+ "onUpdate:modelValue": (c) => r[a.key] = c,
1675
1682
  ref_for: !0
1676
- }, a.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w("span", {
1683
+ }, a.options?.[a.type ?? ""], $(a.options?.[a.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : a.type === "switch" ? (f(), b(o(ee), v({
1677
1684
  key: 1,
1685
+ modelValue: r[a.key],
1686
+ "onUpdate:modelValue": (c) => r[a.key] = c,
1687
+ "before-change": () => a.options?.switch?.tableBeforeChange?.(a.key, r),
1688
+ ref_for: !0
1689
+ }, a.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (f(), w("span", {
1690
+ key: 2,
1678
1691
  style: se({
1679
1692
  "--table-text-click-color": a.table?.click?.color
1680
1693
  }),
1681
- class: j({ "table-text-click": a.table?.click?.callback }),
1682
- onClick: (c) => a.table?.click?.callback?.(d),
1683
- innerHTML: a.table?.format ? a.table?.format(d) : d[a.key]
1694
+ class: R({ "table-text-click": a.table?.click?.callback }),
1695
+ onClick: (c) => a.table?.click?.callback?.(r),
1696
+ innerHTML: a.table?.format ? a.table?.format(r) : r[a.key]
1684
1697
  }, null, 14, Je))
1685
1698
  ])
1686
1699
  ], 64))
@@ -1700,8 +1713,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1700
1713
  item: {}
1701
1714
  },
1702
1715
  setup(n) {
1703
- return (l, r) => (f(), b(o(q), {
1704
- class: j({
1716
+ return (l, d) => (f(), b(o(G), {
1717
+ class: R({
1705
1718
  "hide-label": typeof l.item.item.text?.form?.label == "boolean" ? !l.item.item.text?.form?.label : !1
1706
1719
  }),
1707
1720
  label: typeof l.item.item.text?.form?.label == "string" ? l.item.item.text?.form?.label : l.item.item.label,
@@ -1709,34 +1722,34 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1709
1722
  "label-width": l.item.item.form?.labelWidth || l.conf.option.form?.labelWidth
1710
1723
  }, {
1711
1724
  default: h(() => [
1712
- U("div", We, [
1725
+ O("div", We, [
1713
1726
  k(l.$slots, "form-" + l.item.item.key + "-start", {
1714
1727
  row: l.conf.update.form,
1715
1728
  item: l.item.item
1716
1729
  }),
1717
- U("div", qe, [
1718
- U("div", Ge, [
1730
+ O("div", qe, [
1731
+ O("div", Ge, [
1719
1732
  k(l.$slots, "form-" + l.item.item.key, {
1720
1733
  row: l.conf.update.form,
1721
1734
  item: l.item.item
1722
1735
  }, () => [
1723
- l.item.item.type === "input" ? (f(), b(o(X), v({
1736
+ l.item.item.type === "input" ? (f(), b(o(Q), v({
1724
1737
  key: 0,
1725
1738
  modelValue: l.conf.update.form[l.item.item.key],
1726
- "onUpdate:modelValue": r[0] || (r[0] = (e) => l.conf.update.form[l.item.item.key] = e)
1727
- }, l.item.item.options?.input, O(l.item.item.options?.input?.on || {}), {
1739
+ "onUpdate:modelValue": d[0] || (d[0] = (e) => l.conf.update.form[l.item.item.key] = e)
1740
+ }, l.item.item.options?.input, $(l.item.item.options?.input?.on || {}), {
1728
1741
  disabled: l.conf.update.getDisabled(l.item.item)
1729
1742
  }), null, 16, ["modelValue", "disabled"])) : l.item.item.type === "switch" ? (f(), b(o(ee), v({
1730
1743
  key: 1,
1731
1744
  modelValue: l.conf.update.form[l.item.item.key],
1732
- "onUpdate:modelValue": r[1] || (r[1] = (e) => l.conf.update.form[l.item.item.key] = e)
1745
+ "onUpdate:modelValue": d[1] || (d[1] = (e) => l.conf.update.form[l.item.item.key] = e)
1733
1746
  }, l.item.item.options?.switch, {
1734
1747
  disabled: l.conf.update.getDisabled(l.item.item)
1735
1748
  }), null, 16, ["modelValue", "disabled"])) : l.item.item.type === "select" ? (f(), b(o(W), v({
1736
1749
  key: 2,
1737
1750
  modelValue: l.conf.update.form[l.item.item.key],
1738
- "onUpdate:modelValue": r[2] || (r[2] = (e) => l.conf.update.form[l.item.item.key] = e)
1739
- }, l.item.item.options?.select, O(l.item.item.options?.select?.on || {}), {
1751
+ "onUpdate:modelValue": d[2] || (d[2] = (e) => l.conf.update.form[l.item.item.key] = e)
1752
+ }, l.item.item.options?.select, $(l.item.item.options?.select?.on || {}), {
1740
1753
  disabled: l.conf.update.getDisabled(l.item.item),
1741
1754
  style: { width: "100%" }
1742
1755
  }), {
@@ -1751,8 +1764,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1751
1764
  }, 16, ["modelValue", "disabled"])) : l.item.item.type === "radio" ? (f(), b(o(ce), v({
1752
1765
  key: 3,
1753
1766
  modelValue: l.conf.update.form[l.item.item.key],
1754
- "onUpdate:modelValue": r[3] || (r[3] = (e) => l.conf.update.form[l.item.item.key] = e)
1755
- }, l.item.item.options?.radio, O(l.item.item.options?.radio?.on || {}), {
1767
+ "onUpdate:modelValue": d[3] || (d[3] = (e) => l.conf.update.form[l.item.item.key] = e)
1768
+ }, l.item.item.options?.radio, $(l.item.item.options?.radio?.on || {}), {
1756
1769
  disabled: l.conf.update.getDisabled(l.item.item),
1757
1770
  style: { width: "100%" }
1758
1771
  }), {
@@ -1768,27 +1781,27 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1768
1781
  key: 4,
1769
1782
  row: l.conf.update.form,
1770
1783
  field: l.item.item.key
1771
- }, l.item.item.options?.list, O(l.item.item.options?.list?.on || {}), {
1784
+ }, l.item.item.options?.list, $(l.item.item.options?.list?.on || {}), {
1772
1785
  disabled: l.conf.update.getDisabled(l.item.item),
1773
1786
  style: { width: "100%" }
1774
- }), null, 16, ["row", "field", "disabled"])) : l.item.item.type === "tree-select" ? (f(), b(o(ie), v({
1787
+ }), null, 16, ["row", "field", "disabled"])) : l.item.item.type === "treeSelect" ? (f(), b(o(ie), v({
1775
1788
  key: 5,
1776
1789
  modelValue: l.conf.update.form[l.item.item.key],
1777
- "onUpdate:modelValue": r[4] || (r[4] = (e) => l.conf.update.form[l.item.item.key] = e)
1778
- }, l.item.item.options?.treeSelect, O(l.item.item.options?.treeSelect?.on || {}), {
1790
+ "onUpdate:modelValue": d[4] || (d[4] = (e) => l.conf.update.form[l.item.item.key] = e)
1791
+ }, l.item.item.options?.treeSelect, $(l.item.item.options?.treeSelect?.on || {}), {
1779
1792
  disabled: l.conf.update.getDisabled(l.item.item),
1780
1793
  style: { width: "100%" }
1781
1794
  }), null, 16, ["modelValue", "disabled"])) : l.item.item.type === "datetime" ? (f(), b(o(te), v({
1782
1795
  key: 6,
1783
1796
  modelValue: l.conf.update.form[l.item.item.key],
1784
- "onUpdate:modelValue": r[5] || (r[5] = (e) => l.conf.update.form[l.item.item.key] = e)
1785
- }, l.item.item.options?.datetime, O(l.item.item.options?.datetime?.on || {}), {
1797
+ "onUpdate:modelValue": d[5] || (d[5] = (e) => l.conf.update.form[l.item.item.key] = e)
1798
+ }, l.item.item.options?.datetime, $(l.item.item.options?.datetime?.on || {}), {
1786
1799
  disabled: l.conf.update.getDisabled(l.item.item)
1787
- }), null, 16, ["modelValue", "disabled"])) : l.item.item.type && o(R).customComponent[l.item.item.type] ? (f(), b(Q(o(R).customComponent[l.item.item.type]), v({
1800
+ }), null, 16, ["modelValue", "disabled"])) : l.item.item.type && (o(j).customComponent[l.item.item.type] || o(j).customComponent[l.item.item.type]?.form) ? (f(), b(q(o(j).customComponent[l.item.item.type]?.form || o(j).customComponent[l.item.item.type]), v({
1788
1801
  key: 7,
1789
1802
  modelValue: l.conf.update.form[l.item.item.key],
1790
- "onUpdate:modelValue": r[6] || (r[6] = (e) => l.conf.update.form[l.item.item.key] = e)
1791
- }, l.item.item.options?.[l.item.item.type], O(l.item.item.options?.[l.item.item.type]?.on || {}), {
1803
+ "onUpdate:modelValue": d[6] || (d[6] = (e) => l.conf.update.form[l.item.item.key] = e)
1804
+ }, l.item.item.options?.[l.item.item.type], $(l.item.item.options?.[l.item.item.type]?.on || {}), {
1792
1805
  disabled: l.conf.update.getDisabled(l.item.item)
1793
1806
  }), null, 16, ["modelValue", "disabled"])) : C("", !0)
1794
1807
  ]),
@@ -1837,21 +1850,21 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1837
1850
  }
1838
1851
  },
1839
1852
  setup(n, { expose: l }) {
1840
- const r = D.EDialog, e = n, i = D.isFun, { conf: t, switchConfirmRef: a, ruleFormRef: d } = Oe(e);
1853
+ const d = D.EDialog, e = n, i = D.isFun, { conf: t, switchConfirmRef: a, ruleFormRef: r } = Oe(e);
1841
1854
  return l({
1842
1855
  conf: t
1843
1856
  }), (c, m) => {
1844
1857
  const u = ke("loading");
1845
1858
  return f(), w("div", {
1846
- class: j(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
1859
+ class: R(["relative cc1-form-box", [n.option.table?.fitHeight ? "col" : "no-min-height"]])
1847
1860
  }, [
1848
- U("div", {
1849
- class: j(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
1861
+ O("div", {
1862
+ class: R(["row", [n.option.table?.fitHeight ? "absolute fit" : ""]]),
1850
1863
  style: { overflow: "hidden" }
1851
1864
  }, [
1852
1865
  k(c.$slots, "box-left"),
1853
- U("div", {
1854
- class: j(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
1866
+ O("div", {
1867
+ class: R(["column fit-width no-wrap", [n.option.table?.fitHeight ? "col" : ""]])
1855
1868
  }, [
1856
1869
  n.option.search?.show !== !1 ? (f(), w("div", Ye, [
1857
1870
  V(o(N), {
@@ -1866,10 +1879,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1866
1879
  (f(!0), w(S, null, L(o(t).search.column.list, (s) => (f(), w(S, {
1867
1880
  key: s.key
1868
1881
  }, [
1869
- (typeof s.show?.search == "function" ? s.show?.search(o(t).search.form) : s.show?.search) ? (f(), b(o(q), {
1882
+ (typeof s.show?.search == "function" ? s.show?.search(o(t).search.form) : s.show?.search) ? (f(), b(o(G), {
1870
1883
  key: 0,
1871
1884
  label: typeof s.text?.search?.label == "string" ? s.text?.search?.label : s.label,
1872
- class: j({
1885
+ class: R({
1873
1886
  "hide-label": typeof s.text?.search?.label == "boolean" ? !s.text?.search?.label : !1
1874
1887
  })
1875
1888
  }, {
@@ -1877,7 +1890,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1877
1890
  k(c.$slots, "search-" + s.key, {
1878
1891
  row: o(t).search.form
1879
1892
  }, () => [
1880
- s.type === "input" ? (f(), b(o(X), v({
1893
+ s.type === "input" ? (f(), b(o(Q), v({
1881
1894
  key: 0,
1882
1895
  modelValue: o(t).search.form[s.key],
1883
1896
  "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
@@ -1885,7 +1898,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1885
1898
  clearable: "",
1886
1899
  disabled: s.disabled?.search,
1887
1900
  ref_for: !0
1888
- }, s.options?.search?.input || s.options?.input, O(s.options?.search?.input?.on || s.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "switch" ? (f(), b(o(W), v({
1901
+ }, s.options?.search?.input || s.options?.input, $(s.options?.search?.input?.on || s.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : s.type === "switch" ? (f(), b(o(W), v({
1889
1902
  key: 1,
1890
1903
  modelValue: o(t).search.form[s.key],
1891
1904
  "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
@@ -1893,7 +1906,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1893
1906
  clearable: "",
1894
1907
  disabled: s.disabled?.search,
1895
1908
  ref_for: !0
1896
- }, s.options?.search?.switch || s.options?.switch, O(s.options?.search?.switch?.on || s.options?.switch?.on || {})), {
1909
+ }, s.options?.search?.switch || s.options?.switch, $(s.options?.search?.switch?.on || s.options?.switch?.on || {})), {
1897
1910
  default: h(() => [
1898
1911
  (f(), b(o(B), {
1899
1912
  key: s.options?.switch?.activeValue,
@@ -1915,7 +1928,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1915
1928
  clearable: "",
1916
1929
  disabled: s.disabled?.search,
1917
1930
  ref_for: !0
1918
- }, s.options?.search?.select || s.options?.select, O(s.options?.search?.select?.on || s.options?.select?.on || {})), {
1931
+ }, s.options?.search?.select || s.options?.select, $(s.options?.search?.select?.on || s.options?.select?.on || {})), {
1919
1932
  default: h(() => [
1920
1933
  (f(!0), w(S, null, L(s.options?.select?.data, (p) => (f(), b(o(B), {
1921
1934
  key: p.value,
@@ -1930,12 +1943,12 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1930
1943
  "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1931
1944
  disabled: s.disabled?.search,
1932
1945
  ref_for: !0
1933
- }, s.options?.search?.datetime || s.options?.datetime, O(s.options?.search?.datetime?.on || s.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type && o(R).customComponent[s.type] ? (f(), b(Q(o(R).customComponent[s.type]), v({
1946
+ }, s.options?.search?.datetime || s.options?.datetime, $(s.options?.search?.datetime?.on || s.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : s.type && o(j).customComponent[s.type] ? (f(), b(q(o(j).customComponent[s.type]), v({
1934
1947
  key: 4,
1935
1948
  modelValue: o(t).search.form[s.key],
1936
1949
  "onUpdate:modelValue": (p) => o(t).search.form[s.key] = p,
1937
1950
  ref_for: !0
1938
- }, s.options?.search?.[s.type] || s.options?.[s.type], O(s.options?.search?.[s.type]?.on || s.options?.[s.type]?.on || {}), {
1951
+ }, s.options?.search?.[s.type] || s.options?.[s.type], $(s.options?.search?.[s.type]?.on || s.options?.[s.type]?.on || {}), {
1939
1952
  disabled: s.disabled?.search
1940
1953
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1941
1954
  ]),
@@ -1949,7 +1962,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1949
1962
  k(c.$slots, "search-center", {
1950
1963
  row: o(t).search.form
1951
1964
  }),
1952
- n.option.tools?.search || n.option.tools?.reset ? (f(), b(o(q), { key: 0 }, {
1965
+ n.option.tools?.search || n.option.tools?.reset ? (f(), b(o(G), { key: 0 }, {
1953
1966
  default: h(() => [
1954
1967
  n.option.tools?.search ? (f(), b(o(F), {
1955
1968
  key: 0,
@@ -1957,7 +1970,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1957
1970
  onClick: o(t).search.submit
1958
1971
  }, {
1959
1972
  default: h(() => [
1960
- E($(o(g).tCurd("search")), 1)
1973
+ E(U(o(g).tCurd("search")), 1)
1961
1974
  ]),
1962
1975
  _: 1
1963
1976
  }, 8, ["onClick"])) : C("", !0),
@@ -1966,7 +1979,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1966
1979
  onClick: o(t).search.reset
1967
1980
  }, {
1968
1981
  default: h(() => [
1969
- E($(o(g).tCurd("reset")), 1)
1982
+ E(U(o(g).tCurd("reset")), 1)
1970
1983
  ]),
1971
1984
  _: 1
1972
1985
  }, 8, ["onClick"])) : C("", !0)
@@ -1980,16 +1993,16 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1980
1993
  _: 3
1981
1994
  }, 8, ["model", "size"])
1982
1995
  ])) : C("", !0),
1983
- U("div", Ze, [
1984
- U("div", xe, [
1996
+ O("div", Ze, [
1997
+ O("div", xe, [
1985
1998
  o(i)(n.option.tools?.add) ? (f(), w("div", _e, [
1986
1999
  V(o(F), {
1987
2000
  type: "primary",
1988
- onClick: m[0] || (m[0] = (s) => o(t).update.open(o(r).Insert)),
2001
+ onClick: m[0] || (m[0] = (s) => o(t).update.open(o(d).Insert)),
1989
2002
  size: n.option.size?.search
1990
2003
  }, {
1991
2004
  default: h(() => [
1992
- E($(o(g).tCurd("add")), 1)
2005
+ E(U(o(g).tCurd("add")), 1)
1993
2006
  ]),
1994
2007
  _: 1
1995
2008
  }, 8, ["size"])
@@ -2001,7 +2014,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2001
2014
  size: n.option.size?.search
2002
2015
  }, {
2003
2016
  default: h(() => [
2004
- E($(o(g).tCurd("delete")), 1)
2017
+ E(U(o(g).tCurd("delete")), 1)
2005
2018
  ]),
2006
2019
  _: 1
2007
2020
  }, 8, ["size"])
@@ -2013,7 +2026,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2013
2026
  size: n.option.size?.search
2014
2027
  }, {
2015
2028
  default: h(() => [
2016
- E($(o(g).tCurd("expandCollapse")), 1)
2029
+ E(U(o(g).tCurd("expandCollapse")), 1)
2017
2030
  ]),
2018
2031
  _: 1
2019
2032
  }, 8, ["size"])
@@ -2032,19 +2045,19 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2032
2045
  command: "select"
2033
2046
  }, {
2034
2047
  default: h(() => [
2035
- E($(o(g).tCurd("exportSelect")), 1)
2048
+ E(U(o(g).tCurd("exportSelect")), 1)
2036
2049
  ]),
2037
2050
  _: 1
2038
2051
  })) : C("", !0),
2039
2052
  V(o(Y), { command: "page" }, {
2040
2053
  default: h(() => [
2041
- E($(o(g).tCurd("exportPage")), 1)
2054
+ E(U(o(g).tCurd("exportPage")), 1)
2042
2055
  ]),
2043
2056
  _: 1
2044
2057
  }),
2045
2058
  V(o(Y), { command: "all" }, {
2046
2059
  default: h(() => [
2047
- E($(o(g).tCurd("exportAll")), 1)
2060
+ E(U(o(g).tCurd("exportAll")), 1)
2048
2061
  ]),
2049
2062
  _: 1
2050
2063
  })
@@ -2053,14 +2066,14 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2053
2066
  }, 8, ["size"])
2054
2067
  ]),
2055
2068
  default: h(() => [
2056
- U("div", ot, [
2069
+ O("div", ot, [
2057
2070
  V(o(F), {
2058
2071
  type: "warning",
2059
2072
  loading: o(t).export.loading,
2060
2073
  size: n.option.size?.search
2061
2074
  }, {
2062
2075
  default: h(() => [
2063
- E($(o(g).tCurd("export")), 1)
2076
+ E(U(o(g).tCurd("export")), 1)
2064
2077
  ]),
2065
2078
  _: 1
2066
2079
  }, 8, ["loading", "size"])
@@ -2070,7 +2083,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2070
2083
  }, 8, ["onCommand"])) : C("", !0),
2071
2084
  k(c.$slots, "tools-left")
2072
2085
  ]),
2073
- U("div", lt, [
2086
+ O("div", lt, [
2074
2087
  k(c.$slots, "tools-right"),
2075
2088
  o(t).page.showTools ? (f(), b(o(ae), v({
2076
2089
  key: 0,
@@ -2086,10 +2099,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2086
2099
  size: n.option.size?.table,
2087
2100
  onSizeChange: o(t).table.getList,
2088
2101
  onCurrentChange: o(t).table.getList
2089
- }, n.option.page?.pagination || {}, O(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0),
2102
+ }, n.option.page?.pagination || {}, $(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0),
2090
2103
  n.option.tools?.refresh === void 0 || n.option.tools?.refresh ? (f(), w("div", {
2091
2104
  key: 1,
2092
- class: j(["refresh-btn", [n.option.size?.search]]),
2105
+ class: R(["refresh-btn", [n.option.size?.search]]),
2093
2106
  onClick: m[5] || (m[5] = //@ts-ignore
2094
2107
  (...s) => o(t).table.getList && o(t).table.getList(...s))
2095
2108
  }, [
@@ -2097,11 +2110,11 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2097
2110
  ], 2)) : C("", !0)
2098
2111
  ])
2099
2112
  ]),
2100
- U("div", {
2101
- class: j(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : ""]])
2113
+ O("div", {
2114
+ class: R(["fit-width relative form-box", [n.option.table?.fitHeight ? "col " : ""]])
2102
2115
  }, [
2103
- U("div", {
2104
- class: j(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
2116
+ O("div", {
2117
+ class: R(["column form-box-content", [n.option.table?.fitHeight ? "absolute fit" : ""]])
2105
2118
  }, [
2106
2119
  Ce((f(), b(o(be), v({
2107
2120
  data: o(t).table.data,
@@ -2110,7 +2123,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2110
2123
  onSortChange: o(t).table.sort.change,
2111
2124
  "expand-row-keys": o(t).table.expand.rowKeys,
2112
2125
  onExpandChange: o(t).table.expand.change
2113
- }, n.option.table, O(n.option.table?.on || {})), {
2126
+ }, n.option.table, $(n.option.table?.on || {})), {
2114
2127
  default: h(() => [
2115
2128
  n.option.table?.selectable || o(i)(n.option.tools?.delete) || n.option.tools?.export?.show ? (f(), b(o(x), {
2116
2129
  key: 0,
@@ -2141,7 +2154,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2141
2154
  }, n.option.table?.operate), {
2142
2155
  header: h(() => [
2143
2156
  k(c.$slots, "table-header-op", {}, () => [
2144
- E($(o(g).tCurd("operation")), 1)
2157
+ E(U(o(g).tCurd("operation")), 1)
2145
2158
  ])
2146
2159
  ]),
2147
2160
  default: h(({ row: s }) => [
@@ -2157,7 +2170,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2157
2170
  onClick: o(t).inlineEdit.close
2158
2171
  }, {
2159
2172
  default: h(() => [
2160
- E($(o(g).tCurd("cancel")), 1)
2173
+ E(U(o(g).tCurd("cancel")), 1)
2161
2174
  ]),
2162
2175
  _: 1
2163
2176
  }, 8, ["onClick"]),
@@ -2168,7 +2181,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2168
2181
  loading: o(t).inlineEdit.loading
2169
2182
  }, {
2170
2183
  default: h(() => [
2171
- E($(o(g).tCurd("confirm")), 1)
2184
+ E(U(o(g).tCurd("confirm")), 1)
2172
2185
  ]),
2173
2186
  _: 1
2174
2187
  }, 8, ["onClick", "loading"]),
@@ -2178,10 +2191,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2178
2191
  key: 0,
2179
2192
  link: "",
2180
2193
  type: "primary",
2181
- onClick: (p) => o(t).update.open(o(r).Insert, s)
2194
+ onClick: (p) => o(t).update.open(o(d).Insert, s)
2182
2195
  }, {
2183
2196
  default: h(() => [
2184
- E($(o(g).tCurd("add")), 1)
2197
+ E(U(o(g).tCurd("add")), 1)
2185
2198
  ]),
2186
2199
  _: 2
2187
2200
  }, 1032, ["onClick"])) : C("", !0),
@@ -2189,10 +2202,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2189
2202
  key: 1,
2190
2203
  link: "",
2191
2204
  type: "primary",
2192
- onClick: (p) => o(t).update.open(o(r).View, s)
2205
+ onClick: (p) => o(t).update.open(o(d).View, s)
2193
2206
  }, {
2194
2207
  default: h(() => [
2195
- E($(o(g).tCurd("view")), 1)
2208
+ E(U(o(g).tCurd("view")), 1)
2196
2209
  ]),
2197
2210
  _: 2
2198
2211
  }, 1032, ["onClick"])) : C("", !0),
@@ -2200,10 +2213,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2200
2213
  key: 2,
2201
2214
  link: "",
2202
2215
  type: "warning",
2203
- onClick: (p) => o(t).update.open(o(r).Update, s)
2216
+ onClick: (p) => o(t).update.open(o(d).Update, s)
2204
2217
  }, {
2205
2218
  default: h(() => [
2206
- E($(o(g).tCurd("edit")), 1)
2219
+ E(U(o(g).tCurd("edit")), 1)
2207
2220
  ]),
2208
2221
  _: 2
2209
2222
  }, 1032, ["onClick"])) : C("", !0),
@@ -2214,7 +2227,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2214
2227
  onClick: (p) => o(t).remove.open([s])
2215
2228
  }, {
2216
2229
  default: h(() => [
2217
- E($(o(g).tCurd("delete")), 1)
2230
+ E(U(o(g).tCurd("delete")), 1)
2218
2231
  ]),
2219
2232
  _: 2
2220
2233
  }, 1032, ["onClick"])) : C("", !0),
@@ -2233,7 +2246,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2233
2246
  ])
2234
2247
  ], 2)
2235
2248
  ], 2),
2236
- U("div", at, [
2249
+ O("div", at, [
2237
2250
  (n.option.page?.show === void 0 || n.option.page?.show) && !o(t).page.showTools ? (f(), b(o(ae), v({
2238
2251
  key: 0,
2239
2252
  "current-page": o(t).page.num,
@@ -2248,7 +2261,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2248
2261
  size: n.option.size?.table,
2249
2262
  onSizeChange: o(t).table.getList,
2250
2263
  onCurrentChange: o(t).table.getList
2251
- }, n.option.page?.pagination || {}, O(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0)
2264
+ }, n.option.page?.pagination || {}, $(n.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : C("", !0)
2252
2265
  ])
2253
2266
  ], 2),
2254
2267
  k(c.$slots, "box-right")
@@ -2260,7 +2273,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2260
2273
  "before-close": o(t).update.close
2261
2274
  }, n.option.dialog), {
2262
2275
  footer: h(() => [
2263
- U("span", it, [
2276
+ O("span", it, [
2264
2277
  V(o(N), {
2265
2278
  size: n.option.size?.form
2266
2279
  }, {
@@ -2269,18 +2282,18 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2269
2282
  onClick: o(t).update.close
2270
2283
  }, {
2271
2284
  default: h(() => [
2272
- E($(o(g).tCurd("close")), 1)
2285
+ E(U(o(g).tCurd("close")), 1)
2273
2286
  ]),
2274
2287
  _: 1
2275
2288
  }, 8, ["onClick"]),
2276
- o(t).update.type !== o(r).View ? (f(), b(o(F), {
2289
+ o(t).update.type !== o(d).View ? (f(), b(o(F), {
2277
2290
  key: 0,
2278
2291
  type: "primary",
2279
2292
  onClick: o(t).update.submit,
2280
2293
  loading: o(t).update.loading
2281
2294
  }, {
2282
2295
  default: h(() => [
2283
- E($(o(g).tCurd("submit")), 1)
2296
+ E(U(o(g).tCurd("submit")), 1)
2284
2297
  ]),
2285
2298
  _: 1
2286
2299
  }, 8, ["onClick", "loading"])) : C("", !0)
@@ -2292,7 +2305,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2292
2305
  default: h(() => [
2293
2306
  V(o(N), {
2294
2307
  ref_key: "ruleFormRef",
2295
- ref: d,
2308
+ ref: r,
2296
2309
  model: o(t).update.form,
2297
2310
  rules: o(t).update.rules,
2298
2311
  size: n.option.size?.form
@@ -2310,7 +2323,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2310
2323
  o(t).update.type
2311
2324
  ) ? (f(), w("div", {
2312
2325
  key: 0,
2313
- class: j(["row curd-row", {
2326
+ class: R(["row curd-row", {
2314
2327
  stripe: n.option.form?.stripe === void 0 ? !0 : n.option.form?.stripe
2315
2328
  }])
2316
2329
  }, [
@@ -2320,7 +2333,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2320
2333
  (f(!0), w(S, null, L(s, (p) => (f(), w(S, null, [
2321
2334
  o(i)(p.item.show?.form, o(t).update.form, o(t).update.type) ? (f(), w("div", {
2322
2335
  key: 0,
2323
- class: j([p.item.form.span > 0 ? `col-${o(t).getColumnSpan(p, s)}` : "col", `form-item-col-${p.item.key}`])
2336
+ class: R([p.item.form.span > 0 ? `col-${o(t).getColumnSpan(p, s)}` : "col", `form-item-col-${p.item.key}`])
2324
2337
  }, [
2325
2338
  (f(!0), w(S, null, L(p.item.children ? p.children : [p], (y) => (f(), b(Qe, {
2326
2339
  key: y.item.key,
@@ -2354,7 +2367,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2354
2367
  "close-on-click-modal": !1
2355
2368
  }, {
2356
2369
  footer: h(() => [
2357
- U("span", nt, [
2370
+ O("span", nt, [
2358
2371
  V(o(N), {
2359
2372
  size: n.option.size?.form
2360
2373
  }, {
@@ -2363,7 +2376,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2363
2376
  onClick: o(t).remove.close
2364
2377
  }, {
2365
2378
  default: h(() => [
2366
- E($(o(g).tCurd("close")), 1)
2379
+ E(U(o(g).tCurd("close")), 1)
2367
2380
  ]),
2368
2381
  _: 1
2369
2382
  }, 8, ["onClick"]),
@@ -2373,7 +2386,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2373
2386
  loading: o(t).remove.loading
2374
2387
  }, {
2375
2388
  default: h(() => [
2376
- E($(o(g).tCurd("confirmDelete")), 1)
2389
+ E(U(o(g).tCurd("confirmDelete")), 1)
2377
2390
  ]),
2378
2391
  _: 1
2379
2392
  }, 8, ["onClick", "loading"])
@@ -2383,7 +2396,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2383
2396
  ])
2384
2397
  ]),
2385
2398
  default: h(() => [
2386
- U("div", null, $(o(g).tCurd("confirmDeleteMessage", o(t).remove.items.length)), 1)
2399
+ O("div", null, U(o(g).tCurd("confirmDeleteMessage", o(t).remove.items.length)), 1)
2387
2400
  ]),
2388
2401
  _: 1
2389
2402
  }, 8, ["modelValue", "title"]),
@@ -2403,60 +2416,60 @@ class ct {
2403
2416
  * @param href - 文件的远程地址
2404
2417
  * @param name - 下载后的文件名,默认 `'download.png'`
2405
2418
  */
2406
- static async download(l, r = "download.png") {
2419
+ static async download(l, d = "download.png") {
2407
2420
  const e = document.createElement("a");
2408
- e.style.display = "none", e.href = l, e.setAttribute("download", r), typeof e.download > "u" && e.setAttribute("target", "_blank"), document.body.appendChild(e), e.click(), document.body.removeChild(e), window.URL.revokeObjectURL(l);
2421
+ e.style.display = "none", e.href = l, e.setAttribute("download", d), typeof e.download > "u" && e.setAttribute("target", "_blank"), document.body.appendChild(e), e.click(), document.body.removeChild(e), window.URL.revokeObjectURL(l);
2409
2422
  }
2410
2423
  /**
2411
2424
  * 将json对象或者json数组导出为json文件保存
2412
2425
  * @param data
2413
2426
  * @param name
2414
2427
  */
2415
- static exportJSONFile = (l, r) => {
2428
+ static exportJSONFile = (l, d) => {
2416
2429
  const e = new Blob([JSON.stringify(l)], { type: "application/json" }), i = URL.createObjectURL(e), t = document.createElement("a");
2417
- t.href = i, t.download = `${r || "config"}.json`, t.click();
2430
+ t.href = i, t.download = `${d || "config"}.json`, t.click();
2418
2431
  };
2419
2432
  /**
2420
2433
  * 导入文件内容,默认为json
2421
2434
  * @param param
2422
2435
  * @returns
2423
2436
  */
2424
- static importFile = async (l) => new Promise((r, e) => {
2437
+ static importFile = async (l) => new Promise((d, e) => {
2425
2438
  const i = document.createElement("input");
2426
2439
  i.type = "file";
2427
2440
  const t = l?.accept || ".json";
2428
2441
  i.accept = t, i.style.display = "none", i.onchange = (a) => {
2429
- const d = a.target.files[0];
2430
- if (!d) {
2442
+ const r = a.target.files[0];
2443
+ if (!r) {
2431
2444
  D.fail("未选择文件"), e("未选择文件");
2432
2445
  return;
2433
2446
  }
2434
2447
  const c = new FileReader();
2435
2448
  c.onload = async (m) => {
2436
2449
  const u = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
2437
- r(u);
2450
+ d(u);
2438
2451
  }, c.onerror = () => {
2439
2452
  D.fail("文件读取失败"), e("文件读取失败");
2440
- }, c.readAsText(d), document.body.removeChild(i);
2453
+ }, c.readAsText(r), document.body.removeChild(i);
2441
2454
  }, document.body.appendChild(i), i.click();
2442
2455
  });
2443
2456
  }
2444
2457
  const rt = (n, l) => {
2445
2458
  if (n.component("TCurd", st), n.component("TFormList", le), n.component("TColumn", Se), l?.customComponent) {
2446
- R.customComponent = l.customComponent;
2447
- for (const r in l.customComponent)
2448
- n.component(r, l.customComponent[r]);
2459
+ j.customComponent = l.customComponent;
2460
+ for (const d in l.customComponent)
2461
+ n.component(d, l.customComponent[d]);
2449
2462
  }
2450
2463
  }, pt = {
2451
2464
  install: rt
2452
2465
  };
2453
2466
  export {
2454
2467
  P as ArrUtil,
2455
- Ue as ExcelUtil,
2468
+ $e as ExcelUtil,
2456
2469
  Se as TColumn,
2457
2470
  st as TCurd,
2458
2471
  ct as TFile,
2459
- R as TForm,
2472
+ j as TForm,
2460
2473
  z as TFormConfig,
2461
2474
  g as TFormI18n,
2462
2475
  le as TFormList,