cc1-form 1.1.32 → 1.1.34

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 de, ElLoading as ue, ElForm as Q, ElFormItem as H, ElInput as q, ElSwitch as ee, ElSelect as W, ElOption as N, ElTreeSelect as ae, ElDatePicker as te, ElDialog as Y, ElButton as M, ElTableColumn as Z, ElRadioGroup as ce, ElRadio as fe, ElDropdown as pe, ElDropdownMenu as me, ElDropdownItem as X, ElTable as he, ElPagination as be } from "element-plus";
1
+ import { ElMessage as de, ElLoading as ue, ElForm as Q, ElFormItem as H, ElInput as q, ElSwitch as ee, ElSelect as W, ElOption as N, ElTreeSelect as ae, ElDatePicker as te, ElDialog as Y, ElButton as I, ElTableColumn as Z, ElRadioGroup as ce, ElRadio as fe, ElDropdown as pe, ElDropdownMenu as me, ElDropdownItem as X, ElTable as he, ElPagination as be } from "element-plus";
2
2
  import "vue-router";
3
- import { defineComponent as J, reactive as oe, onMounted as ne, resolveComponent as x, createElementBlock as g, createCommentVNode as C, openBlock as c, renderSlot as k, createElementVNode as O, createVNode as D, withCtx as h, createTextVNode as E, Fragment as S, renderList as I, createBlock as b, normalizeClass as A, normalizeStyle as ie, ref as B, nextTick as ye, unref as l, mergeProps as v, toHandlers as F, resolveDynamicComponent as G, toDisplayString as U, getCurrentInstance as ge, createSlots as _, withKeys as we, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
3
+ import { defineComponent as J, reactive as oe, onMounted as ne, resolveComponent as x, createElementBlock as g, createCommentVNode as C, openBlock as c, renderSlot as k, createElementVNode as O, createVNode as D, withCtx as h, createTextVNode as E, Fragment as S, renderList as L, createBlock as b, normalizeClass as A, normalizeStyle as ie, ref as B, nextTick as ye, unref as l, mergeProps as v, toHandlers as F, resolveDynamicComponent as G, toDisplayString as U, getCurrentInstance as ge, createSlots as _, withKeys as we, resolveDirective as ke, withDirectives as Ce, normalizeProps as ve, guardReactiveProps as Ve } from "vue";
4
4
  class $ {
5
5
  /**
6
6
  * Vue Router 实例,需在应用初始化时赋值
@@ -26,13 +26,13 @@ class $ {
26
26
  * @param data 数据
27
27
  * @returns 是否显示
28
28
  */
29
- static isFun = (o, ...s) => Array.isArray(o) ? o.some((e) => typeof e == "function" ? e(...s) : e) : typeof o == "function" ? o(...s) : o;
29
+ static isFun = (o, ...r) => Array.isArray(o) ? o.some((e) => typeof e == "function" ? e(...r) : e) : typeof o == "function" ? o(...r) : o;
30
30
  /**
31
31
  * 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
32
32
  */
33
33
  static getRouterParams = () => {
34
- const o = this.router.currentRoute.value.query || {}, s = this.router.currentRoute.value.params || {};
35
- return Object.keys(o).length ? o : Object.keys(s).length ? s : {};
34
+ const o = this.router.currentRoute.value.query || {}, r = this.router.currentRoute.value.params || {};
35
+ return Object.keys(o).length ? o : Object.keys(r).length ? r : {};
36
36
  };
37
37
  /**
38
38
  * 模块赋值
@@ -45,8 +45,8 @@ class $ {
45
45
  static loadModule = async (o) => {
46
46
  if (!$.moduleObj[o])
47
47
  throw new Error(`模块${o}未加载,请赋值如:TSys.moduleObj = { ${o}: ()=>import('${o}') }`);
48
- const s = await $.moduleObj[o]();
49
- return s.default ?? s;
48
+ const r = await $.moduleObj[o]();
49
+ return r.default ?? r;
50
50
  };
51
51
  /**
52
52
  * 提示信息对象管理
@@ -62,14 +62,14 @@ class $ {
62
62
  * @param type 消息类型
63
63
  * @param options 其他选项
64
64
  */
65
- static showMessage(o, s, e = {}) {
65
+ static showMessage(o, r, e = {}) {
66
66
  const n = Date.now();
67
67
  if (!this.tipMessages[o] || n - this.tipMessages[o] > this.tipMessagesGap) {
68
68
  this.tipMessages[o] = n;
69
69
  const t = Object.assign(
70
70
  {
71
71
  message: o,
72
- type: s
72
+ type: r
73
73
  },
74
74
  e
75
75
  );
@@ -83,16 +83,16 @@ class $ {
83
83
  * @param content
84
84
  * @param options
85
85
  */
86
- static fail = (o, s = {}) => {
87
- this.showMessage(o, "error", s);
86
+ static fail = (o, r = {}) => {
87
+ this.showMessage(o, "error", r);
88
88
  };
89
89
  /**
90
90
  * 成功提示
91
91
  * @param content
92
92
  * @param options
93
93
  */
94
- static success = (o, s = {}) => {
95
- this.showMessage(o, "success", s);
94
+ static success = (o, r = {}) => {
95
+ this.showMessage(o, "success", r);
96
96
  };
97
97
  static loadingObj = null;
98
98
  static loadingTimer = null;
@@ -101,11 +101,11 @@ class $ {
101
101
  * @param show
102
102
  * @param text
103
103
  */
104
- static loading = (o = !0, s = "Loading...") => {
104
+ static loading = (o = !0, r = "Loading...") => {
105
105
  Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
106
106
  o ? this.loadingObj = ue.service({
107
107
  lock: !0,
108
- text: s,
108
+ text: r,
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 $ {
115
115
  * @param url 地址
116
116
  * @param isCenter 是否居中
117
117
  */
118
- static openUrl = (o, s = !0) => {
119
- if (s) {
118
+ static openUrl = (o, r = !0) => {
119
+ if (r) {
120
120
  let e = screen.width / 2 - 500, n = screen.height / 2 - 800 / 2 - 30;
121
121
  window.open(
122
122
  o,
@@ -131,7 +131,7 @@ class $ {
131
131
  * @param param
132
132
  * @returns
133
133
  */
134
- static getImgPic = (o) => new Promise(async (s, e) => {
134
+ static getImgPic = (o) => new Promise(async (r, e) => {
135
135
  let n = document.getElementById(o.id);
136
136
  const t = await $.loadModule("html2canvas");
137
137
  try {
@@ -147,7 +147,7 @@ class $ {
147
147
  backgroundColor: "#ffffff00"
148
148
  }).then(function(a) {
149
149
  let d = a.toDataURL("image/png");
150
- s(d);
150
+ r(d);
151
151
  });
152
152
  } catch (a) {
153
153
  e(a);
@@ -413,6 +413,12 @@ class V {
413
413
  table: 0,
414
414
  form: 0
415
415
  },
416
+ disabled: {
417
+ /**
418
+ * 是否查看禁用-默认禁止操作
419
+ */
420
+ view: !0
421
+ },
416
422
  options: {
417
423
  switch: {
418
424
  activeValue: !0,
@@ -467,7 +473,7 @@ class V {
467
473
  V.config = ObjectUtil.deepMerge(V.config, o);
468
474
  };
469
475
  }
470
- class T {
476
+ class j {
471
477
  /**
472
478
  * 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
473
479
  *
@@ -484,8 +490,8 @@ class T {
484
490
  * @param field - 字段的 key 值
485
491
  * @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
486
492
  */
487
- static findOptions = (o, s) => {
488
- const e = o.column.find((t) => t.key === s), n = (t) => t.replace(/-([a-z])/g, (a, d) => d.toUpperCase());
493
+ static findOptions = (o, r) => {
494
+ const e = o.column.find((t) => t.key === r), n = (t) => t.replace(/-([a-z])/g, (a, d) => d.toUpperCase());
489
495
  if (e)
490
496
  return e.options[n(e.type)];
491
497
  };
@@ -505,8 +511,8 @@ class T {
505
511
  }))
506
512
  )
507
513
  */
508
- static setOptionsData = (o, s, e) => {
509
- const n = T.findOptions(o, s);
514
+ static setOptionsData = (o, r, e) => {
515
+ const n = j.findOptions(o, r);
510
516
  n && (n.data = e);
511
517
  };
512
518
  static form = {
@@ -518,9 +524,9 @@ class T {
518
524
  * @param treeData 树形数据
519
525
  * @param option 组件配置
520
526
  */
521
- parentId: (o, s, e, n) => {
527
+ parentId: (o, r, e, n) => {
522
528
  const t = V.config.table.rowKey;
523
- o ? s.type === $.EDialog.Insert ? (s.form.parentId = o[t], s.form.sort = o.children.length + 1) : s.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (s.form.parentId = "0", s.form.sort = e.length + 1), T.setOptionsData(n, "parentId", [{ [t]: "0", title: "根", children: e }]);
529
+ o ? r.type === $.EDialog.Insert ? (r.form.parentId = o[t], r.form.sort = o.children.length + 1) : r.form.parentId = o.parentId.substring(o.parentId.lastIndexOf(",") + 1) : (r.form.parentId = "0", r.form.sort = e.length + 1), j.setOptionsData(n, "parentId", [{ [t]: "0", title: "根", children: e }]);
524
530
  }
525
531
  }
526
532
  };
@@ -535,10 +541,10 @@ class R {
535
541
  * @param field 字段名
536
542
  * @param row 行数据
537
543
  */
538
- static setId = (o, s, e) => {
539
- s[o] || (s[o] = []);
544
+ static setId = (o, r, e) => {
545
+ r[o] || (r[o] = []);
540
546
  const n = V.config.table.rowKey;
541
- s[o].forEach((t) => {
547
+ r[o].forEach((t) => {
542
548
  e.forEach((a) => {
543
549
  let d = a.default ?? "";
544
550
  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);
@@ -552,19 +558,19 @@ class R {
552
558
  * @param itemFields 元素字段-如:[{label:'',value:''}]
553
559
  * @param callback 回调函数
554
560
  */
555
- static add = (o, s, e, n) => {
561
+ static add = (o, r, e, n) => {
556
562
  const t = JSONUtil.cp(e);
557
- R.setId(o, s, e);
563
+ R.setId(o, r, e);
558
564
  const a = V.config.table.rowKey;
559
- s[o].push(
565
+ r[o].push(
560
566
  t.reduce(
561
- (d, p) => {
562
- let m = p.default ?? "";
563
- return p.type === "number" && (m = p.default ?? 0), p.type === "boolean" && (m = p.default ?? !1), p.type === "time" && (m = p.default ?? /* @__PURE__ */ new Date()), d[p.value] = m, d;
567
+ (d, f) => {
568
+ let m = f.default ?? "";
569
+ return f.type === "number" && (m = f.default ?? 0), f.type === "boolean" && (m = f.default ?? !1), f.type === "time" && (m = f.default ?? /* @__PURE__ */ new Date()), d[f.value] = m, d;
564
570
  },
565
571
  { [a]: R.getIdFun() }
566
572
  )
567
- ), n?.(s);
573
+ ), n?.(r);
568
574
  };
569
575
  /**
570
576
  * 删除数组元素
@@ -573,9 +579,9 @@ class R {
573
579
  * @param item 元素-如:{_id:''}
574
580
  * @param callback 回调函数
575
581
  */
576
- static remove = (o, s, e, n) => {
582
+ static remove = (o, r, e, n) => {
577
583
  const t = V.config.table.rowKey;
578
- s[o] = s[o].filter((a) => a[t] !== e[t]), n?.(s);
584
+ r[o] = r[o].filter((a) => a[t] !== e[t]), n?.(r);
579
585
  };
580
586
  /**
581
587
  * 获取没有id的数据
@@ -583,10 +589,10 @@ class R {
583
589
  * @param childernField 子级字段-如:list、children
584
590
  * @returns 没有id的数据
585
591
  */
586
- static getNoIdData = (o, s) => {
592
+ static getNoIdData = (o, r) => {
587
593
  const e = JSONUtil.cp(o), n = V.config.table.rowKey;
588
594
  return e.forEach((t) => {
589
- t[n] && delete t[n], s && t[s] && R.getNoIdData(t[s], s);
595
+ t[n] && delete t[n], r && t[r] && R.getNoIdData(t[r], r);
590
596
  }), e;
591
597
  };
592
598
  }
@@ -632,8 +638,8 @@ const Ee = {
632
638
  }
633
639
  },
634
640
  emits: ["change"],
635
- setup(r, { emit: o }) {
636
- const s = r, e = oe({
641
+ setup(s, { emit: o }) {
642
+ const r = s, e = oe({
637
643
  show: !1,
638
644
  add: (t, a, d) => {
639
645
  R.add(t, a, d, () => {
@@ -647,18 +653,18 @@ const Ee = {
647
653
  }
648
654
  });
649
655
  ne(() => {
650
- R.setId(s.field, s.row, s.itemFields), e.show = !0;
656
+ R.setId(r.field, r.row, r.itemFields), e.show = !0;
651
657
  });
652
658
  const n = o;
653
659
  return (t, a) => {
654
- const d = x("el-button"), p = x("el-input");
660
+ const d = x("el-button"), f = x("el-input");
655
661
  return e.show ? (c(), g("div", Ee, [
656
- k(t.$slots, "list-start", { row: r.row }),
662
+ k(t.$slots, "list-start", { row: s.row }),
657
663
  O("div", null, [
658
664
  D(d, {
659
665
  link: "",
660
666
  type: "primary",
661
- onClick: a[0] || (a[0] = (m) => e.add(r.field, r.row, r.itemFields))
667
+ onClick: a[0] || (a[0] = (m) => e.add(s.field, s.row, s.itemFields))
662
668
  }, {
663
669
  default: h(() => a[2] || (a[2] = [
664
670
  E("添加")
@@ -666,27 +672,27 @@ const Ee = {
666
672
  _: 1
667
673
  })
668
674
  ]),
669
- (c(!0), g(S, null, I(r.row[r.field], (m) => (c(), g("div", De, [
675
+ (c(!0), g(S, null, L(s.row[s.field], (m) => (c(), g("div", De, [
670
676
  k(t.$slots, "item-start", {
671
677
  item: m,
672
- row: r.row
678
+ row: s.row
673
679
  }),
674
- (c(!0), g(S, null, I(r.itemFields, (u) => (c(), b(p, {
680
+ (c(!0), g(S, null, L(s.itemFields, (u) => (c(), b(f, {
675
681
  modelValue: m[u.value],
676
682
  "onUpdate:modelValue": (i) => m[u.value] = i,
677
- style: ie({ width: r.inputWidth }),
678
- class: A(r.inputClass),
679
- placeholder: u[r.label] || u[r.value],
683
+ style: ie({ width: s.inputWidth }),
684
+ class: A(s.inputClass),
685
+ placeholder: u[s.label] || u[s.value],
680
686
  onChange: a[1] || (a[1] = (i) => n("change"))
681
687
  }, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
682
688
  k(t.$slots, "item-end", {
683
689
  item: m,
684
- row: r.row
690
+ row: s.row
685
691
  }),
686
692
  D(d, {
687
693
  link: "",
688
694
  type: "danger",
689
- onClick: (u) => e.remove(r.field, r.row, m)
695
+ onClick: (u) => e.remove(s.field, s.row, m)
690
696
  }, {
691
697
  default: h(() => a[3] || (a[3] = [
692
698
  E("删除")
@@ -694,7 +700,7 @@ const Ee = {
694
700
  _: 2
695
701
  }, 1032, ["onClick"])
696
702
  ]))), 256)),
697
- k(t.$slots, "list-end", { row: r.row })
703
+ k(t.$slots, "list-end", { row: s.row })
698
704
  ])) : C("", !0);
699
705
  };
700
706
  }
@@ -714,8 +720,8 @@ const Ee = {
714
720
  default: ""
715
721
  }
716
722
  },
717
- setup(r, { expose: o }) {
718
- const s = $.isFun, e = $.EDialog, n = B(), t = r, a = oe({
723
+ setup(s, { expose: o }) {
724
+ const r = $.isFun, e = $.EDialog, n = B(), t = s, a = oe({
719
725
  rules: {},
720
726
  show: !0,
721
727
  form: {},
@@ -725,19 +731,19 @@ const Ee = {
725
731
  initColumnForm: async () => {
726
732
  const d = t.option;
727
733
  a.formColumn = [];
728
- const p = [], m = t.option.form?.maxSpan || 12, u = t.option.form?.defaultSpan || m;
734
+ const f = [], m = t.option.form?.maxSpan || 12, u = t.option.form?.defaultSpan || m;
729
735
  let i = [];
730
- const f = (w) => {
736
+ const p = (w) => {
731
737
  if (a.formDefault[w.key] = w.value, w.isForm) {
732
738
  w.form = w.form || { span: u }, w.form.span = w.form.span ?? u;
733
- let L = w.form.span, j = i.reduce((P, se) => P + se.span, L);
734
- const z = i.length;
735
- i.push({ item: w, span: L }), (z === 1 && i[0].span === 0 || j >= m || L === 0 && z > 1) && (p.push(i), i = []), w.rules && (a.rules[w.key] = w.rules);
739
+ let M = w.form.span, z = i.reduce((P, re) => P + re.span, M);
740
+ const T = i.length;
741
+ i.push({ item: w, span: M }), (T === 1 && i[0].span === 0 || z >= m || M === 0 && T > 1) && (f.push(i), i = []), w.rules && (a.rules[w.key] = w.rules);
736
742
  }
737
743
  };
738
744
  d.column.forEach((w) => {
739
- w.isForm = !0, f(w);
740
- }), i.length > 0 && p.push(i), a.formColumn = p, a.form = JSONUtil.cp(a.formDefault);
745
+ w.isForm = !0, p(w);
746
+ }), i.length > 0 && f.push(i), a.formColumn = f, a.form = JSONUtil.cp(a.formDefault);
741
747
  },
742
748
  init: async () => {
743
749
  a.show = !1, await ye(), a.initColumnForm();
@@ -746,19 +752,19 @@ const Ee = {
746
752
  return a.initColumnForm(), o({
747
753
  ref: n,
748
754
  conf: a
749
- }), (d, p) => (c(), b(l(Q), {
755
+ }), (d, f) => (c(), b(l(Q), {
750
756
  ref_key: "ruleFormRef",
751
757
  ref: n,
752
758
  model: a.form,
753
759
  rules: a.rules
754
760
  }, {
755
761
  default: h(() => [
756
- a.show ? (c(!0), g(S, { key: 0 }, I(a.formColumn, (m) => (c(), g("div", $e, [
762
+ a.show ? (c(!0), g(S, { key: 0 }, L(a.formColumn, (m) => (c(), g("div", $e, [
757
763
  k(d.$slots, "form-start", {
758
764
  row: a.form
759
765
  }),
760
- (c(!0), g(S, null, I(m, (u) => (c(), g(S, null, [
761
- l(s)(u.item.show?.form, a.form) ?? !0 ? (c(), g("div", {
766
+ (c(!0), g(S, null, L(m, (u) => (c(), g(S, null, [
767
+ l(r)(u.item.show?.form, a.form) ?? !0 ? (c(), g("div", {
762
768
  key: 0,
763
769
  class: A(u.item.form.span > 0 ? `col-${u.item.form.span}` : "col")
764
770
  }, [
@@ -800,7 +806,7 @@ const Ee = {
800
806
  style: { width: "100%" }
801
807
  }), {
802
808
  default: h(() => [
803
- (c(!0), g(S, null, I(u.item.options?.select?.data, (i) => (c(), b(l(N), {
809
+ (c(!0), g(S, null, L(u.item.options?.select?.data, (i) => (c(), b(l(N), {
804
810
  key: i.value,
805
811
  label: i.label,
806
812
  value: i.value
@@ -830,7 +836,7 @@ const Ee = {
830
836
  ref_for: !0
831
837
  }, u.item.options?.datetime, F(u.item.options?.datetime?.on || {}), {
832
838
  disabled: a.getDisabled(u.item)
833
- }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && l(T).customComponent[u.item.type] ? (c(), b(G(l(T).customComponent[u.item.type]), v({
839
+ }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && l(j).customComponent[u.item.type] ? (c(), b(G(l(j).customComponent[u.item.type]), v({
834
840
  key: 6,
835
841
  modelValue: a.form[u.item.key],
836
842
  "onUpdate:modelValue": (i) => a.form[u.item.key] = i,
@@ -892,19 +898,19 @@ const Ue = {
892
898
  };
893
899
  class y {
894
900
  /** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
895
- static t(o, ...s) {
901
+ static t(o, ...r) {
896
902
  if (typeof o == "function")
897
- return o(...s);
903
+ return o(...r);
898
904
  o = String(o);
899
905
  let e = 0;
900
- return o.replace(/{([^}]+)}/g, (n, t) => e < s.length ? String(s[e++]) : `{${t}}`);
906
+ return o.replace(/{([^}]+)}/g, (n, t) => e < r.length ? String(r[e++]) : `{${t}}`);
901
907
  }
902
908
  static setI18n = (o) => {
903
909
  y.curd = ObjectUtil.deepMerge(y.curd, o);
904
910
  };
905
911
  /** 解析curd国际化值 */
906
- static tCurd(o, ...s) {
907
- return this.t(this.curd[o], ...s);
912
+ static tCurd(o, ...r) {
913
+ return this.t(this.curd[o], ...r);
908
914
  }
909
915
  /** curd表单 */
910
916
  static curd = Ue;
@@ -917,20 +923,20 @@ class Oe {
917
923
  * @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
918
924
  * @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
919
925
  */
920
- static exportToExcel = async (o, s, e) => {
926
+ static exportToExcel = async (o, r, e) => {
921
927
  if (!o || o.length === 0) return;
922
- const n = await $.loadModule("xlsx"), t = o.map((p) => {
928
+ const n = await $.loadModule("xlsx"), t = o.map((f) => {
923
929
  const m = {};
924
- return s.forEach((u) => {
925
- m[u.label] = p[u.key];
930
+ return r.forEach((u) => {
931
+ m[u.label] = f[u.key];
926
932
  }), m;
927
933
  }), a = n.utils.json_to_sheet(t), d = n.utils.book_new();
928
934
  n.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()}`, n.writeFile(d, `${e}.xlsx`);
929
935
  };
930
936
  }
931
- const K = $.EDialog, Fe = (r) => {
932
- const o = B(), s = B(), e = oe({
933
- option: r.option,
937
+ const K = $.EDialog, Fe = (s) => {
938
+ const o = B(), r = B(), e = oe({
939
+ option: s.option,
934
940
  /** 查询区域相关配置对象 */
935
941
  search: {
936
942
  /** 查询表单列集合 */
@@ -947,18 +953,18 @@ const K = $.EDialog, Fe = (r) => {
947
953
  /** 组装实际要搜索的数据对象 */
948
954
  getFormData: () => {
949
955
  let n = {};
950
- r.option.column.forEach((a) => {
956
+ s.option.column.forEach((a) => {
951
957
  (typeof a.show?.search == "function" ? a.show?.search(e.search.form) : a.show?.search) && (n[a.key] = e.search.form[a.key]);
952
958
  });
953
- const t = r.option.search?.before?.(n);
959
+ const t = s.option.search?.before?.(n);
954
960
  return t && (n = t), n;
955
961
  },
956
962
  /** 重置搜索表单 */
957
963
  reset: () => {
958
964
  const n = e.search.formDefault;
959
965
  Object.keys(n).forEach((t) => {
960
- r.option.search?.resetMode === "none" ? n[t] = void 0 : n[t] = e.search.formDefault[t];
961
- }), e.search.form = JSONUtil.cp(n), e.page.num = 1, r.option.init !== !1 && e.table.getList();
966
+ s.option.search?.resetMode === "none" ? n[t] = void 0 : n[t] = e.search.formDefault[t];
967
+ }), e.search.form = JSONUtil.cp(n), e.page.num = 1, s.option.init !== !1 && e.table.getList();
962
968
  },
963
969
  /** 提交搜索表单 */
964
970
  submit: () => {
@@ -972,13 +978,13 @@ const K = $.EDialog, Fe = (r) => {
972
978
  /** 总条数 */
973
979
  total: 0,
974
980
  /** 分页控件的布局方式 */
975
- layout: r.option.page?.layout || V.config.pagination.layout,
981
+ layout: s.option.page?.layout || V.config.pagination.layout,
976
982
  /** 当前每页条数 */
977
- size: r.option.page?.size || V.config.pagination.size,
983
+ size: s.option.page?.size || V.config.pagination.size,
978
984
  /** 支持切换的每页条数选项 */
979
- sizeList: r.option.page?.sizeList || V.config.pagination.pageSizes,
985
+ sizeList: s.option.page?.sizeList || V.config.pagination.pageSizes,
980
986
  /** 分页器计数 */
981
- pagerCount: r.option.page?.pagerCount || V.config.pagination.pagerCount
987
+ pagerCount: s.option.page?.pagerCount || V.config.pagination.pagerCount
982
988
  },
983
989
  /** 表格区域相关配置对象 */
984
990
  table: {
@@ -1008,7 +1014,7 @@ const K = $.EDialog, Fe = (r) => {
1008
1014
  const n = (t) => {
1009
1015
  let a = [];
1010
1016
  return t.forEach((d) => {
1011
- a.push(d[r.option.table.rowKey]), d.children && d.children.length > 0 && (a = a.concat(n(d.children)));
1017
+ a.push(d[s.option.table.rowKey]), d.children && d.children.length > 0 && (a = a.concat(n(d.children)));
1012
1018
  }), a;
1013
1019
  };
1014
1020
  e.table.expand.rowKeys = n(e.table.data);
@@ -1031,14 +1037,14 @@ const K = $.EDialog, Fe = (r) => {
1031
1037
  /** 获取数据列表接口实现 */
1032
1038
  getList: async () => {
1033
1039
  e.table.loading = !0;
1034
- const n = r.option.api.list;
1040
+ const n = s.option.api.list;
1035
1041
  try {
1036
1042
  await e.initApiData("init");
1037
1043
  let t = {};
1038
1044
  if (e.table.sort.prop) {
1039
- const { props: f, order: w } = V.config.table.sort;
1045
+ const { props: p, order: w } = V.config.table.sort;
1040
1046
  t = {
1041
- [f.field]: e.table.sort.prop,
1047
+ [p.field]: e.table.sort.prop,
1042
1048
  [w.field]: e.table.sort.order
1043
1049
  };
1044
1050
  }
@@ -1047,13 +1053,13 @@ const K = $.EDialog, Fe = (r) => {
1047
1053
  [V.config.page.num]: e.page.num,
1048
1054
  ...e.search.getFormData(),
1049
1055
  ...t
1050
- }), d = V.config.result, p = a.data || { [d.list]: a };
1051
- let m = (Array.isArray(p[d.list]), p[d.list]);
1052
- const u = e.update.formColumn.flat(), i = JSONUtil.cp(m).map((f) => (Object.keys(f).forEach((L) => {
1053
- const j = u.find((z) => z.item.key === L);
1054
- j && ["select", "radio"].includes(j.item.type) && (j.item.table.format || (j.item.table.format = (z) => j.item.options[j.item.type].data?.find((P) => P.value == z[L])?.label || z[L]));
1055
- }), f));
1056
- e.table.data = r.option.data ? await r.option.data(i, m) : i, e.page.total = p[d.total] || 0;
1056
+ }), d = V.config.result, f = a.data || { [d.list]: a };
1057
+ let m = (Array.isArray(f[d.list]), f[d.list]);
1058
+ const u = e.update.formColumn.flat(), i = JSONUtil.cp(m).map((p) => (Object.keys(p).forEach((M) => {
1059
+ const z = u.find((T) => T.item.key === M);
1060
+ z && ["select", "radio"].includes(z.item.type) && (z.item.table.format || (z.item.table.format = (T) => z.item.options[z.item.type].data?.find((P) => P.value == T[M])?.label || T[M]));
1061
+ }), p));
1062
+ e.table.data = s.option.data ? await s.option.data(i, m) : i, e.page.total = f[d.total] || 0;
1057
1063
  } catch (t) {
1058
1064
  console.error(t);
1059
1065
  } finally {
@@ -1093,12 +1099,12 @@ const K = $.EDialog, Fe = (r) => {
1093
1099
  run: {
1094
1100
  /** 执行指定方式的导出(如select、page、all) */
1095
1101
  start: async (n) => {
1096
- let t = await e.export.run[n](), a = r.option.column;
1102
+ let t = await e.export.run[n](), a = s.option.column;
1097
1103
  const d = JSONUtil.cp({
1098
1104
  data: t,
1099
1105
  columns: a
1100
- }), p = r.option.tools?.export || {};
1101
- p.before && p.before(d), Oe.exportToExcel(d.data, d.columns, p.fileName);
1106
+ }), f = s.option.tools?.export || {};
1107
+ f.before && f.before(d), Oe.exportToExcel(d.data, d.columns, f.fileName);
1102
1108
  },
1103
1109
  /** 获取当前选中项进行导出 */
1104
1110
  select: () => {
@@ -1116,15 +1122,15 @@ const K = $.EDialog, Fe = (r) => {
1116
1122
  all: async () => {
1117
1123
  e.export.loading = !0;
1118
1124
  try {
1119
- if (r.option.tools?.export?.all) {
1120
- await r.option.tools?.export?.all({
1125
+ if (s.option.tools?.export?.all) {
1126
+ await s.option.tools?.export?.all({
1121
1127
  [V.config.page.size]: e.page.size,
1122
1128
  [V.config.page.num]: e.page.num,
1123
1129
  ...e.search.getFormData()
1124
1130
  });
1125
1131
  return;
1126
1132
  }
1127
- const n = r.option.api.list, t = await n({
1133
+ const n = s.option.api.list, t = await n({
1128
1134
  [V.config.page.size]: 999999,
1129
1135
  [V.config.page.num]: 1
1130
1136
  });
@@ -1164,17 +1170,17 @@ const K = $.EDialog, Fe = (r) => {
1164
1170
  /** 表单所有列,二维数组结构按行分组 */
1165
1171
  formColumn: [],
1166
1172
  /** 判断是否禁用当前字段 */
1167
- getDisabled: (n) => e.update.type === K.View ? !0 : n.disabled?.[e.update.type === K.Insert ? "create" : "update"],
1173
+ getDisabled: (n) => e.update.type === K.View ? n.disabled?.view === void 0 ? !0 : n.disabled?.view : n.disabled?.[e.update.type === K.Insert ? "create" : "update"],
1168
1174
  /** 编辑相关数据与方法 */
1169
1175
  edit: {
1170
1176
  /** 当前编辑的数据原始项对象 */
1171
1177
  data: {},
1172
1178
  /** 返回编辑时与原值的变更数据,用于局部更新API */
1173
1179
  getApiData: (n) => {
1174
- if (r.option.form?.editAll)
1180
+ if (s.option.form?.editAll)
1175
1181
  return n;
1176
1182
  let t = {
1177
- [r.option.table?.rowKey]: e.update.edit.data[r.option.table?.rowKey]
1183
+ [s.option.table?.rowKey]: e.update.edit.data[s.option.table?.rowKey]
1178
1184
  };
1179
1185
  return Object.keys(e.update.edit.data).forEach((a) => {
1180
1186
  n[a] !== e.update.edit.data[a] && (t[a] = n[a]);
@@ -1189,11 +1195,11 @@ const K = $.EDialog, Fe = (r) => {
1189
1195
  try {
1190
1196
  await e.initApiData("update");
1191
1197
  const a = n === K.Insert;
1192
- if (!a && r.option.table?.inlineEdit) {
1198
+ if (!a && s.option.table?.inlineEdit) {
1193
1199
  e.inlineEdit.open(t);
1194
1200
  return;
1195
1201
  }
1196
- e.update.type = n, e.update.edit.data = t, e.update.title = y.tCurd(a ? "add" : n === K.View ? "view" : "edit"), e.update.form = JSONUtil.cp(a ? e.update.formDefault : t), await r.option.form?.openBefore?.(t, e.update), e.update.show = !0, e.update.showContent = !0, r.option.form?.openAfter?.(t, e.update);
1202
+ e.update.type = n, e.update.edit.data = t, e.update.title = y.tCurd(a ? "add" : n === K.View ? "view" : "edit"), e.update.form = JSONUtil.cp(a ? e.update.formDefault : t), await s.option.form?.openBefore?.(t, e.update), e.update.show = !0, e.update.showContent = !0, s.option.form?.openAfter?.(t, e.update);
1197
1203
  } catch (a) {
1198
1204
  console.error(a);
1199
1205
  } finally {
@@ -1204,24 +1210,24 @@ const K = $.EDialog, Fe = (r) => {
1204
1210
  /** 提交增改表单操作 */
1205
1211
  submit: () => {
1206
1212
  FunUtil.throttle(async () => {
1207
- await s.value?.validate(async (d, p) => new Promise((m, u) => {
1213
+ await r.value?.validate(async (d, f) => new Promise((m, u) => {
1208
1214
  d || ($.fail(y.tCurd("checkFormData")), u(!1)), m();
1209
1215
  })), e.update.loading = !0;
1210
- const n = e.update.type === K.Insert ? r.option.api.create : r.option.api.update;
1216
+ const n = e.update.type === K.Insert ? s.option.api.create : s.option.api.update;
1211
1217
  let t = JSONUtil.cp(e.update.form);
1212
- delete t.children, await r.option.form?.submitBefore?.(t, e.update);
1213
- const a = new Set(r.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1218
+ delete t.children, await s.option.form?.submitBefore?.(t, e.update);
1219
+ const a = new Set(s.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
1214
1220
  Object.keys(t).forEach((d) => {
1215
1221
  if (a.has(d) && t[d] != null) {
1216
- const p = new Date(t[d]).getTime();
1217
- isNaN(p) || (t[d] = p);
1222
+ const f = new Date(t[d]).getTime();
1223
+ isNaN(f) || (t[d] = f);
1218
1224
  }
1219
1225
  });
1220
1226
  try {
1221
1227
  if (!n) return;
1222
1228
  await n({
1223
1229
  ...t
1224
- }), e.update.close(), await e.table.getList(), r.option.form?.submitAfter?.(t, e.update);
1230
+ }), e.update.close(), await e.table.getList(), s.option.form?.submitAfter?.(t, e.update);
1225
1231
  } catch (d) {
1226
1232
  console.error(d);
1227
1233
  } finally {
@@ -1256,7 +1262,7 @@ const K = $.EDialog, Fe = (r) => {
1256
1262
  submit: () => {
1257
1263
  FunUtil.throttle(async () => {
1258
1264
  e.inlineEdit.loading = !0;
1259
- const n = r.option.api.update;
1265
+ const n = s.option.api.update;
1260
1266
  let t = JSONUtil.cp(e.inlineEdit.form);
1261
1267
  delete t.children;
1262
1268
  try {
@@ -1296,11 +1302,11 @@ const K = $.EDialog, Fe = (r) => {
1296
1302
  submit: () => {
1297
1303
  FunUtil.throttle(async () => {
1298
1304
  e.remove.loading = !0;
1299
- const n = r.option.api.delete;
1305
+ const n = s.option.api.delete;
1300
1306
  try {
1301
1307
  if (!n) return;
1302
1308
  await n({
1303
- [r.option.table?.rowKey]: e.remove.items.map((t) => t[r.option.table?.rowKey]),
1309
+ [s.option.table?.rowKey]: e.remove.items.map((t) => t[s.option.table?.rowKey]),
1304
1310
  items: e.remove.items
1305
1311
  }), $.success(y.tCurd("operationSuccess")), e.table.data.length <= 1 && e.page.num > 1 && (e.page.num -= 1), e.remove.close(), await e.table.getList();
1306
1312
  } catch (t) {
@@ -1321,12 +1327,12 @@ const K = $.EDialog, Fe = (r) => {
1321
1327
  initApiData: async (n) => {
1322
1328
  const t = [], a = (d) => {
1323
1329
  if (d.children && d.children.length) {
1324
- d.children.forEach((p) => a(p));
1330
+ d.children.forEach((f) => a(f));
1325
1331
  return;
1326
1332
  }
1327
1333
  if (d.type === "select" && d.options?.select?.dataApi && d.options?.select?.dataApiConfig?.[n]) {
1328
1334
  if (e.apiDataMap[d.key] && d.options?.select?.dataApiConfig?.once) return;
1329
- const p = (async () => {
1335
+ const f = (async () => {
1330
1336
  try {
1331
1337
  let m = await d.options?.select?.dataApi?.();
1332
1338
  if (m) {
@@ -1336,10 +1342,10 @@ const K = $.EDialog, Fe = (r) => {
1336
1342
  } catch {
1337
1343
  }
1338
1344
  })();
1339
- t.push(p);
1345
+ t.push(f);
1340
1346
  }
1341
1347
  };
1342
- return r.option.column.forEach((d) => {
1348
+ return s.option.column.forEach((d) => {
1343
1349
  a(d);
1344
1350
  }), await Promise.all(t), !0;
1345
1351
  },
@@ -1347,9 +1353,9 @@ const K = $.EDialog, Fe = (r) => {
1347
1353
  initCurdConfig: () => {
1348
1354
  const n = JSONUtil.cp(V.config);
1349
1355
  n.table.emptyText = y.tCurd("noData");
1350
- const t = ObjectUtil.deepMerge(n, r.option || {});
1356
+ const t = ObjectUtil.deepMerge(n, s.option || {});
1351
1357
  Object.keys(t).forEach((a) => {
1352
- r.option[a] = t[a];
1358
+ s.option[a] = t[a];
1353
1359
  });
1354
1360
  },
1355
1361
  /**
@@ -1366,13 +1372,16 @@ const K = $.EDialog, Fe = (r) => {
1366
1372
  }
1367
1373
  });
1368
1374
  const t = (a) => {
1369
- if (a.table = ObjectUtil.deepMerge(n.table, a.table || {}), a.children) {
1370
- a.children.forEach((d) => {
1371
- t(d);
1372
- });
1373
- return;
1374
- }
1375
- 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 (d, p) => {
1375
+ for (const d in n)
1376
+ if (d === "table") {
1377
+ if (a.table = ObjectUtil.deepMerge(n.table, a.table || {}), a.children) {
1378
+ a.children.forEach((f) => {
1379
+ t(f);
1380
+ });
1381
+ return;
1382
+ }
1383
+ } else d === "type" ? a.type = a.type || n.type : a[d] = ObjectUtil.deepMerge(n[d], a[d] || {});
1384
+ a.type === "switch" && (a.options.switch.tableBeforeChange = async (d, f) => {
1376
1385
  const m = a.options?.switch;
1377
1386
  try {
1378
1387
  await o.value?.open({
@@ -1380,10 +1389,10 @@ const K = $.EDialog, Fe = (r) => {
1380
1389
  content: y.tCurd("confirmSwitchMessage")
1381
1390
  }), e.table.loading = !0;
1382
1391
  try {
1383
- return r.option.api.update ? (await r.option.api.update({
1384
- [r.option.table?.rowKey]: p[r.option.table?.rowKey],
1385
- [d]: p[d] === m.activeValue ? m.inactiveValue : m.activeValue,
1386
- final(u, i, f) {
1392
+ return s.option.api.update ? (await s.option.api.update({
1393
+ [s.option.table?.rowKey]: f[s.option.table?.rowKey],
1394
+ [d]: f[d] === m.activeValue ? m.inactiveValue : m.activeValue,
1395
+ final(u, i, p) {
1387
1396
  e.table.loading = !1;
1388
1397
  }
1389
1398
  }), e.table.loading = !1, $.success(y.tCurd("operationSuccess")), e.table.getList(), !0) : void 0;
@@ -1395,102 +1404,102 @@ const K = $.EDialog, Fe = (r) => {
1395
1404
  } catch {
1396
1405
  return !1;
1397
1406
  }
1398
- }), a.type === "tree-select" && (a.options.treeSelect.rowKey = r.option.table?.rowKey, a.options.treeSelect.nodeKey = r.option.table?.rowKey);
1407
+ }), a.type === "tree-select" && (a.options.treeSelect.rowKey = s.option.table?.rowKey, a.options.treeSelect.nodeKey = s.option.table?.rowKey);
1399
1408
  };
1400
- r.option.column.forEach(t), r.option.table?.column?.forEach(t);
1409
+ s.option.column.forEach(t), s.option.table?.column?.forEach(t);
1401
1410
  },
1402
1411
  getColumnSpan: (n, t) => {
1403
1412
  if (n.item.form?.spanCol) {
1404
- const a = V.config.form.defaultSpan, p = t.filter((m) => !$.isFun(m.item.show?.form, e.update.form, e.update.type)).reduce((m, u) => m + (u.item.form?.span || a), 0);
1405
- return (n.item?.form.span || a) + p;
1413
+ const a = V.config.form.defaultSpan, f = t.filter((m) => !$.isFun(m.item.show?.form, e.update.form, e.update.type)).reduce((m, u) => m + (u.item.form?.span || a), 0);
1414
+ return (n.item?.form.span || a) + f;
1406
1415
  }
1407
1416
  return n.item.form.span;
1408
1417
  },
1409
1418
  /** 初始化配置并生成表单列及默认值及规则 */
1410
1419
  initColumnForm: () => {
1411
- const n = r.option;
1420
+ const n = s.option;
1412
1421
  e.update.formColumn = [], e.table.column.show = {
1413
1422
  list: [],
1414
1423
  listSource: []
1415
1424
  };
1416
- const t = [], a = r.option.form?.maxSpan || 12, d = r.option.form?.defaultSpan || a / 2;
1417
- let p = [];
1418
- const m = (f) => {
1419
- if (f.children) {
1420
- e.table.column.show.list.push(f.key), f.children.forEach((w) => {
1425
+ const t = [], a = s.option.form?.maxSpan || 12, d = s.option.form?.defaultSpan || a / 2;
1426
+ let f = [];
1427
+ const m = (p) => {
1428
+ if (p.children) {
1429
+ e.table.column.show.list.push(p.key), p.children.forEach((w) => {
1421
1430
  m(w);
1422
1431
  });
1423
1432
  return;
1424
1433
  }
1425
- if (e.update.formDefault[f.key] = f.value, f.table.table && (f.show.table && e.table.column.show.list.push(f.key), f.table.table && e.table.column.show.listSource.push(f.key)), !(f.isForm && typeof f.show?.form == "boolean") || f.show?.form) {
1426
- f.form = f.form || { span: d }, f.form.span = f.form.span ?? d;
1427
- let w = f.form.span, L = p.reduce((z, P) => z + P.span, w);
1428
- const j = p.length;
1429
- if (p.push({ item: f, span: w }), (j === 1 && p[0].span === 0 || L >= a || w === 0 && j > 1) && (t.push(p), p = []), f.rules) {
1430
- const z = {
1434
+ 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) {
1435
+ p.form = p.form || { span: d }, p.form.span = p.form.span ?? d;
1436
+ let w = p.form.span, M = f.reduce((T, P) => T + P.span, w);
1437
+ const z = f.length;
1438
+ if (f.push({ item: p, span: w }), (z === 1 && f[0].span === 0 || M >= a || w === 0 && z > 1) && (t.push(f), f = []), p.rules) {
1439
+ const T = {
1431
1440
  input: y.tCurd("placeholderInput"),
1432
1441
  select: y.tCurd("placeholderSelect")
1433
- }, P = (z[f.type] || z.input) + f.label;
1434
- e.update.rules[f.key] = typeof f.rules == "boolean" ? [
1442
+ }, P = (T[p.type] || T.input) + p.label;
1443
+ e.update.rules[p.key] = typeof p.rules == "boolean" ? [
1435
1444
  {
1436
1445
  required: !0,
1437
1446
  message: P,
1438
1447
  trigger: "blur"
1439
1448
  }
1440
- ] : f.rules;
1449
+ ] : p.rules;
1441
1450
  }
1442
1451
  }
1443
- }, u = (f, w) => {
1444
- f.isForm = w, Array.isArray(f.children) && f.children.forEach((L) => u(L, w));
1452
+ }, u = (p, w) => {
1453
+ p.isForm = w, Array.isArray(p.children) && p.children.forEach((M) => u(M, w));
1445
1454
  };
1446
- n.column.forEach((f) => {
1447
- f.isForm = !0, u(f, !0), m(f);
1448
- }), r.option.table?.column?.forEach((f) => {
1449
- u(f, !1), m(f);
1450
- }), e.search.column.list = n.column.concat(n.table?.column || []), e.table.column.list = e.search.column.list.filter((f) => f.table?.table), e.search.column.list.sort((f, w) => f.sort?.search - w.sort?.search), e.table.column.list.sort((f, w) => f.sort?.table - w.sort?.table), p.length > 0 && t.push(p), e.update.formColumn = t;
1451
- const i = r.option.search?.formDefault;
1452
- i && Object.keys(i).forEach((f) => {
1453
- e.search.formDefault[f] = i[f];
1454
- }), n.column.forEach((f) => {
1455
- f.show?.search || (e.search.formDefault[f.key] = void 0);
1455
+ n.column.forEach((p) => {
1456
+ p.isForm = !0, u(p, !0), m(p);
1457
+ }), s.option.table?.column?.forEach((p) => {
1458
+ u(p, !1), m(p);
1459
+ }), e.search.column.list = n.column.concat(n.table?.column || []), e.table.column.list = e.search.column.list.filter((p) => p.table?.table), e.search.column.list.sort((p, w) => p.sort?.search - w.sort?.search), e.table.column.list.sort((p, w) => p.sort?.table - w.sort?.table), f.length > 0 && t.push(f), e.update.formColumn = t;
1460
+ const i = s.option.search?.formDefault;
1461
+ i && Object.keys(i).forEach((p) => {
1462
+ e.search.formDefault[p] = i[p];
1463
+ }), n.column.forEach((p) => {
1464
+ p.show?.search || (e.search.formDefault[p.key] = void 0);
1456
1465
  }), e.search.form = JSONUtil.cp(e.search.formDefault);
1457
1466
  }
1458
1467
  });
1459
1468
  return e.init(), ne(() => {
1460
- r.option.init !== !1 && e.table.getList();
1461
- }), { conf: e, switchConfirmRef: o, ruleFormRef: s };
1462
- }, Me = { class: "dialog-footer" }, Ie = /* @__PURE__ */ J({
1469
+ s.option.init !== !1 && e.table.getList();
1470
+ }), { conf: e, switchConfirmRef: o, ruleFormRef: r };
1471
+ }, Ie = { class: "dialog-footer" }, Le = /* @__PURE__ */ J({
1463
1472
  __name: "switchConfirm",
1464
- setup(r, { expose: o }) {
1465
- const s = B(!1), e = B("确认修改"), n = B("确认要修改状态吗?");
1473
+ setup(s, { expose: o }) {
1474
+ const r = B(!1), e = B("确认修改"), n = B("确认要修改状态吗?");
1466
1475
  let t = null, a = null;
1467
- const d = (u) => (u?.title && (e.value = u.title), u?.content && (n.value = u.content), s.value = !0, new Promise((i, f) => {
1468
- t = i, a = f;
1469
- })), p = () => {
1470
- s.value = !1, t?.(!0), t = null, a = null;
1476
+ const d = (u) => (u?.title && (e.value = u.title), u?.content && (n.value = u.content), r.value = !0, new Promise((i, p) => {
1477
+ t = i, a = p;
1478
+ })), f = () => {
1479
+ r.value = !1, t?.(!0), t = null, a = null;
1471
1480
  }, m = () => {
1472
- s.value = !1, a?.(new Error("用户取消操作")), t = null, a = null;
1481
+ r.value = !1, a?.(new Error("用户取消操作")), t = null, a = null;
1473
1482
  };
1474
1483
  return o({
1475
1484
  open: d
1476
1485
  }), (u, i) => (c(), b(l(Y), {
1477
- modelValue: s.value,
1478
- "onUpdate:modelValue": i[0] || (i[0] = (f) => s.value = f),
1486
+ modelValue: r.value,
1487
+ "onUpdate:modelValue": i[0] || (i[0] = (p) => r.value = p),
1479
1488
  title: e.value,
1480
1489
  "close-on-click-modal": !1,
1481
1490
  width: "400px"
1482
1491
  }, {
1483
1492
  footer: h(() => [
1484
- O("span", Me, [
1485
- D(l(M), { onClick: m }, {
1493
+ O("span", Ie, [
1494
+ D(l(I), { onClick: m }, {
1486
1495
  default: h(() => i[1] || (i[1] = [
1487
1496
  E("取消")
1488
1497
  ])),
1489
1498
  _: 1
1490
1499
  }),
1491
- D(l(M), {
1500
+ D(l(I), {
1492
1501
  type: "primary",
1493
- onClick: p
1502
+ onClick: f
1494
1503
  }, {
1495
1504
  default: h(() => i[2] || (i[2] = [
1496
1505
  E("确认")
@@ -1505,29 +1514,29 @@ const K = $.EDialog, Fe = (r) => {
1505
1514
  _: 1
1506
1515
  }, 8, ["modelValue", "title"]));
1507
1516
  }
1508
- }), re = (r, o) => {
1509
- const s = r.__vccOpts || r;
1517
+ }), se = (s, o) => {
1518
+ const r = s.__vccOpts || s;
1510
1519
  for (const [e, n] of o)
1511
- s[e] = n;
1512
- return s;
1513
- }, Le = {}, je = {
1520
+ r[e] = n;
1521
+ return r;
1522
+ }, Me = {}, ze = {
1514
1523
  xmlns: "http://www.w3.org/2000/svg",
1515
1524
  viewBox: "0 0 1024 1024"
1516
1525
  };
1517
- function ze(r, o) {
1518
- return c(), g("svg", je, o[0] || (o[0] = [
1526
+ function Te(s, o) {
1527
+ return c(), g("svg", ze, o[0] || (o[0] = [
1519
1528
  O("path", {
1520
1529
  fill: "currentColor",
1521
1530
  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"
1522
1531
  }, null, -1)
1523
1532
  ]));
1524
1533
  }
1525
- const Te = /* @__PURE__ */ re(Le, [["render", ze]]), Re = {}, Pe = {
1534
+ const je = /* @__PURE__ */ se(Me, [["render", Te]]), Re = {}, Pe = {
1526
1535
  "data-v-58697b5c": "",
1527
1536
  xmlns: "http://www.w3.org/2000/svg",
1528
1537
  viewBox: "0 0 1024 1024"
1529
1538
  };
1530
- function Ae(r, o) {
1539
+ function Ae(s, o) {
1531
1540
  return c(), g("svg", Pe, o[0] || (o[0] = [
1532
1541
  O("path", {
1533
1542
  fill: "currentColor",
@@ -1535,18 +1544,18 @@ function Ae(r, o) {
1535
1544
  }, null, -1)
1536
1545
  ]));
1537
1546
  }
1538
- const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-center table-header-label inline" }, Be = { class: "table-header-tooltip" }, Je = ["onClick", "innerHTML"], We = /* @__PURE__ */ J({
1547
+ const Ke = /* @__PURE__ */ se(Re, [["render", Ae]]), Ne = { class: "row flex-center table-header-label inline" }, Be = { class: "table-header-tooltip" }, Je = ["onClick", "innerHTML"], We = /* @__PURE__ */ J({
1539
1548
  __name: "tableColumn",
1540
1549
  props: {
1541
1550
  conf: {},
1542
1551
  columnList: {},
1543
1552
  option: {}
1544
1553
  },
1545
- setup(r) {
1546
- const o = $.isFun, s = ge().type;
1554
+ setup(s) {
1555
+ const o = $.isFun, r = ge().type;
1547
1556
  return (e, n) => {
1548
1557
  const t = x("el-tooltip");
1549
- return c(!0), g(S, null, I(e.columnList, (a) => (c(), g(S, {
1558
+ return c(!0), g(S, null, L(e.columnList, (a) => (c(), g(S, {
1550
1559
  key: a.key
1551
1560
  }, [
1552
1561
  e.conf.table.column.show.list.includes(a.key) ? (c(), b(l(Z), v({
@@ -1578,12 +1587,12 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1578
1587
  default: h(({ row: d }) => [
1579
1588
  a.children ? (c(), g(S, { key: 0 }, [
1580
1589
  n[0] || (n[0] = E("   ")),
1581
- (c(), b(G(l(s)), {
1590
+ (c(), b(G(l(r)), {
1582
1591
  conf: e.conf,
1583
1592
  columnList: a.children,
1584
1593
  option: e.option
1585
1594
  }, _({ _: 2 }, [
1586
- I(e.$slots, (p, m) => ({
1595
+ L(e.$slots, (f, m) => ({
1587
1596
  name: m,
1588
1597
  fn: h((u) => [
1589
1598
  k(e.$slots, m, v({ ref_for: !0 }, u || {}))
@@ -1595,7 +1604,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1595
1604
  a.type === "input" ? (c(), b(l(q), v({
1596
1605
  key: 0,
1597
1606
  modelValue: e.conf.inlineEdit.form[a.key],
1598
- "onUpdate:modelValue": (p) => e.conf.inlineEdit.form[a.key] = p,
1607
+ "onUpdate:modelValue": (f) => e.conf.inlineEdit.form[a.key] = f,
1599
1608
  ref_for: !0
1600
1609
  }, a.options?.input, {
1601
1610
  size: "small",
@@ -1604,17 +1613,17 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1604
1613
  }), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : a.type === "select" ? (c(), b(l(W), v({
1605
1614
  key: 1,
1606
1615
  modelValue: e.conf.inlineEdit.form[a.key],
1607
- "onUpdate:modelValue": (p) => e.conf.inlineEdit.form[a.key] = p,
1616
+ "onUpdate:modelValue": (f) => e.conf.inlineEdit.form[a.key] = f,
1608
1617
  ref_for: !0
1609
1618
  }, a.options?.select, {
1610
1619
  size: "small",
1611
1620
  style: { width: "100%" }
1612
1621
  }), {
1613
1622
  default: h(() => [
1614
- (c(!0), g(S, null, I(a.options?.select?.data, (p) => (c(), b(l(N), {
1615
- key: p.value,
1616
- label: p.label,
1617
- value: p.value
1623
+ (c(!0), g(S, null, L(a.options?.select?.data, (f) => (c(), b(l(N), {
1624
+ key: f.value,
1625
+ label: f.label,
1626
+ value: f.value
1618
1627
  }, null, 8, ["label", "value"]))), 128))
1619
1628
  ]),
1620
1629
  _: 2
@@ -1627,7 +1636,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1627
1636
  a.type === "switch" ? (c(), b(l(ee), v({
1628
1637
  key: 0,
1629
1638
  modelValue: d[a.key],
1630
- "onUpdate:modelValue": (p) => d[a.key] = p,
1639
+ "onUpdate:modelValue": (f) => d[a.key] = f,
1631
1640
  "before-change": () => a.options?.switch?.tableBeforeChange?.(a.key, d),
1632
1641
  ref_for: !0
1633
1642
  }, a.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "before-change"])) : (c(), g("span", {
@@ -1636,7 +1645,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1636
1645
  "--table-text-click-color": a.table?.click?.color
1637
1646
  }),
1638
1647
  class: A({ "table-text-click": a.table?.click?.callback }),
1639
- onClick: (p) => a.table?.click?.callback?.(d),
1648
+ onClick: (f) => a.table?.click?.callback?.(d),
1640
1649
  innerHTML: a.table?.format ? a.table?.format(d) : d[a.key]
1641
1650
  }, null, 14, Je))
1642
1651
  ])
@@ -1656,8 +1665,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1656
1665
  conf: {},
1657
1666
  item: {}
1658
1667
  },
1659
- setup(r) {
1660
- return (o, s) => (c(), b(l(H), {
1668
+ setup(s) {
1669
+ return (o, r) => (c(), b(l(H), {
1661
1670
  class: A({
1662
1671
  "hide-label": typeof o.item.item.text?.form?.label == "boolean" ? !o.item.item.text?.form?.label : !1
1663
1672
  }),
@@ -1680,25 +1689,25 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1680
1689
  o.item.item.type === "input" ? (c(), b(l(q), v({
1681
1690
  key: 0,
1682
1691
  modelValue: o.conf.update.form[o.item.item.key],
1683
- "onUpdate:modelValue": s[0] || (s[0] = (e) => o.conf.update.form[o.item.item.key] = e)
1692
+ "onUpdate:modelValue": r[0] || (r[0] = (e) => o.conf.update.form[o.item.item.key] = e)
1684
1693
  }, o.item.item.options?.input, F(o.item.item.options?.input?.on || {}), {
1685
1694
  disabled: o.conf.update.getDisabled(o.item.item)
1686
1695
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "switch" ? (c(), b(l(ee), v({
1687
1696
  key: 1,
1688
1697
  modelValue: o.conf.update.form[o.item.item.key],
1689
- "onUpdate:modelValue": s[1] || (s[1] = (e) => o.conf.update.form[o.item.item.key] = e)
1698
+ "onUpdate:modelValue": r[1] || (r[1] = (e) => o.conf.update.form[o.item.item.key] = e)
1690
1699
  }, o.item.item.options?.switch, {
1691
1700
  disabled: o.conf.update.getDisabled(o.item.item)
1692
1701
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "select" ? (c(), b(l(W), v({
1693
1702
  key: 2,
1694
1703
  modelValue: o.conf.update.form[o.item.item.key],
1695
- "onUpdate:modelValue": s[2] || (s[2] = (e) => o.conf.update.form[o.item.item.key] = e)
1704
+ "onUpdate:modelValue": r[2] || (r[2] = (e) => o.conf.update.form[o.item.item.key] = e)
1696
1705
  }, o.item.item.options?.select, F(o.item.item.options?.select?.on || {}), {
1697
1706
  disabled: o.conf.update.getDisabled(o.item.item),
1698
1707
  style: { width: "100%" }
1699
1708
  }), {
1700
1709
  default: h(() => [
1701
- (c(!0), g(S, null, I(o.item.item.options?.select?.data, (e) => (c(), b(l(N), {
1710
+ (c(!0), g(S, null, L(o.item.item.options?.select?.data, (e) => (c(), b(l(N), {
1702
1711
  key: e.value,
1703
1712
  label: e.label,
1704
1713
  value: e.value
@@ -1708,13 +1717,13 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1708
1717
  }, 16, ["modelValue", "disabled"])) : o.item.item.type === "radio" ? (c(), b(l(ce), v({
1709
1718
  key: 3,
1710
1719
  modelValue: o.conf.update.form[o.item.item.key],
1711
- "onUpdate:modelValue": s[3] || (s[3] = (e) => o.conf.update.form[o.item.item.key] = e)
1720
+ "onUpdate:modelValue": r[3] || (r[3] = (e) => o.conf.update.form[o.item.item.key] = e)
1712
1721
  }, o.item.item.options?.radio, F(o.item.item.options?.radio?.on || {}), {
1713
1722
  disabled: o.conf.update.getDisabled(o.item.item),
1714
1723
  style: { width: "100%" }
1715
1724
  }), {
1716
1725
  default: h(() => [
1717
- (c(!0), g(S, null, I(o.item.item.options?.radio?.data, (e) => (c(), b(l(fe), {
1726
+ (c(!0), g(S, null, L(o.item.item.options?.radio?.data, (e) => (c(), b(l(fe), {
1718
1727
  key: e.value,
1719
1728
  label: e.label,
1720
1729
  value: e.value
@@ -1731,20 +1740,20 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1731
1740
  }), null, 16, ["row", "field", "disabled"])) : o.item.item.type === "tree-select" ? (c(), b(l(ae), v({
1732
1741
  key: 5,
1733
1742
  modelValue: o.conf.update.form[o.item.item.key],
1734
- "onUpdate:modelValue": s[4] || (s[4] = (e) => o.conf.update.form[o.item.item.key] = e)
1743
+ "onUpdate:modelValue": r[4] || (r[4] = (e) => o.conf.update.form[o.item.item.key] = e)
1735
1744
  }, o.item.item.options?.treeSelect, F(o.item.item.options?.treeSelect?.on || {}), {
1736
1745
  disabled: o.conf.update.getDisabled(o.item.item),
1737
1746
  style: { width: "100%" }
1738
1747
  }), null, 16, ["modelValue", "disabled"])) : o.item.item.type === "datetime" ? (c(), b(l(te), v({
1739
1748
  key: 6,
1740
1749
  modelValue: o.conf.update.form[o.item.item.key],
1741
- "onUpdate:modelValue": s[5] || (s[5] = (e) => o.conf.update.form[o.item.item.key] = e)
1750
+ "onUpdate:modelValue": r[5] || (r[5] = (e) => o.conf.update.form[o.item.item.key] = e)
1742
1751
  }, o.item.item.options?.datetime, F(o.item.item.options?.datetime?.on || {}), {
1743
1752
  disabled: o.conf.update.getDisabled(o.item.item)
1744
- }), null, 16, ["modelValue", "disabled"])) : o.item.item.type && l(T).customComponent[o.item.item.type] ? (c(), b(G(l(T).customComponent[o.item.item.type]), v({
1753
+ }), null, 16, ["modelValue", "disabled"])) : o.item.item.type && l(j).customComponent[o.item.item.type] ? (c(), b(G(l(j).customComponent[o.item.item.type]), v({
1745
1754
  key: 7,
1746
1755
  modelValue: o.conf.update.form[o.item.item.key],
1747
- "onUpdate:modelValue": s[6] || (s[6] = (e) => o.conf.update.form[o.item.item.key] = e)
1756
+ "onUpdate:modelValue": r[6] || (r[6] = (e) => o.conf.update.form[o.item.item.key] = e)
1748
1757
  }, o.item.item.options?.[o.item.item.type], F(o.item.item.options?.[o.item.item.type]?.on || {}), {
1749
1758
  disabled: o.conf.update.getDisabled(o.item.item)
1750
1759
  }), null, 16, ["modelValue", "disabled"])) : C("", !0)
@@ -1786,7 +1795,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1786
1795
  }, ot = { key: 0 }, lt = { key: 1 }, at = { key: 2 }, nt = { class: "export-btn" }, it = {
1787
1796
  class: "flex items-center",
1788
1797
  style: { gap: "10px" }
1789
- }, rt = { class: "col fit-width relative form-box" }, st = { class: "absolute column fit form-box-content" }, dt = { class: "row justify-end mt-10 mb-10" }, ut = { class: "dialog-footer" }, ct = { class: "dialog-footer" }, ft = /* @__PURE__ */ J({
1798
+ }, st = { class: "col fit-width relative form-box" }, rt = { class: "absolute column fit form-box-content" }, dt = { class: "row justify-end mt-10 mb-10" }, ut = { class: "dialog-footer" }, ct = { class: "dialog-footer" }, ft = /* @__PURE__ */ J({
1790
1799
  __name: "index",
1791
1800
  props: {
1792
1801
  /**
@@ -1796,26 +1805,26 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1796
1805
  default: {}
1797
1806
  }
1798
1807
  },
1799
- setup(r, { expose: o }) {
1800
- const s = $.EDialog, e = r, n = $.isFun, { conf: t, switchConfirmRef: a, ruleFormRef: d } = Fe(e);
1808
+ setup(s, { expose: o }) {
1809
+ const r = $.EDialog, e = s, n = $.isFun, { conf: t, switchConfirmRef: a, ruleFormRef: d } = Fe(e);
1801
1810
  return o({
1802
1811
  conf: t
1803
- }), (p, m) => {
1812
+ }), (f, m) => {
1804
1813
  const u = ke("loading");
1805
1814
  return c(), g("div", Ye, [
1806
1815
  O("div", Ze, [
1807
- k(p.$slots, "box-left"),
1816
+ k(f.$slots, "box-left"),
1808
1817
  O("div", xe, [
1809
- r.option.search?.show !== !1 ? (c(), g("div", _e, [
1818
+ s.option.search?.show !== !1 ? (c(), g("div", _e, [
1810
1819
  D(l(Q), {
1811
1820
  model: l(t).search.form,
1812
1821
  inline: ""
1813
1822
  }, {
1814
1823
  default: h(() => [
1815
- k(p.$slots, "search-start", {
1824
+ k(f.$slots, "search-start", {
1816
1825
  row: l(t).search.form
1817
1826
  }),
1818
- (c(!0), g(S, null, I(l(t).search.column.list, (i) => (c(), g(S, {
1827
+ (c(!0), g(S, null, L(l(t).search.column.list, (i) => (c(), g(S, {
1819
1828
  key: i.key
1820
1829
  }, [
1821
1830
  (typeof i.show?.search == "function" ? i.show?.search(l(t).search.form) : i.show?.search) ? (c(), b(l(H), {
@@ -1826,13 +1835,13 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1826
1835
  })
1827
1836
  }, {
1828
1837
  default: h(() => [
1829
- k(p.$slots, "search-" + i.key, {
1838
+ k(f.$slots, "search-" + i.key, {
1830
1839
  row: l(t).search.form
1831
1840
  }, () => [
1832
1841
  i.type === "input" ? (c(), b(l(q), v({
1833
1842
  key: 0,
1834
1843
  modelValue: l(t).search.form[i.key],
1835
- "onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
1844
+ "onUpdate:modelValue": (p) => l(t).search.form[i.key] = p,
1836
1845
  placeholder: l(t).search.getPlaceholder(i),
1837
1846
  clearable: "",
1838
1847
  disabled: i.disabled?.search,
@@ -1840,7 +1849,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1840
1849
  }, i.options?.search?.input || i.options?.input, F(i.options?.search?.input?.on || i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (c(), b(l(W), v({
1841
1850
  key: 1,
1842
1851
  modelValue: l(t).search.form[i.key],
1843
- "onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
1852
+ "onUpdate:modelValue": (p) => l(t).search.form[i.key] = p,
1844
1853
  placeholder: l(t).search.getPlaceholder(i, l(y).tCurd("placeholderSelect")),
1845
1854
  clearable: "",
1846
1855
  disabled: i.disabled?.search,
@@ -1862,48 +1871,48 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1862
1871
  }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (c(), b(l(W), v({
1863
1872
  key: 2,
1864
1873
  modelValue: l(t).search.form[i.key],
1865
- "onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
1874
+ "onUpdate:modelValue": (p) => l(t).search.form[i.key] = p,
1866
1875
  placeholder: l(t).search.getPlaceholder(i, l(y).tCurd("placeholderSelect")),
1867
1876
  clearable: "",
1868
1877
  disabled: i.disabled?.search,
1869
1878
  ref_for: !0
1870
1879
  }, i.options?.search?.select || i.options?.select, F(i.options?.search?.select?.on || i.options?.select?.on || {})), {
1871
1880
  default: h(() => [
1872
- (c(!0), g(S, null, I(i.options?.select?.data, (f) => (c(), b(l(N), {
1873
- key: f.value,
1874
- label: f.label,
1875
- value: f.value
1881
+ (c(!0), g(S, null, L(i.options?.select?.data, (p) => (c(), b(l(N), {
1882
+ key: p.value,
1883
+ label: p.label,
1884
+ value: p.value
1876
1885
  }, null, 8, ["label", "value"]))), 128))
1877
1886
  ]),
1878
1887
  _: 2
1879
1888
  }, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "datetime" ? (c(), b(l(te), v({
1880
1889
  key: 3,
1881
1890
  modelValue: l(t).search.form[i.key],
1882
- "onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
1891
+ "onUpdate:modelValue": (p) => l(t).search.form[i.key] = p,
1883
1892
  disabled: i.disabled?.search,
1884
1893
  ref_for: !0
1885
- }, i.options?.search?.datetime || i.options?.datetime, F(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && l(T).customComponent[i.type] ? (c(), b(G(l(T).customComponent[i.type]), v({
1894
+ }, i.options?.search?.datetime || i.options?.datetime, F(i.options?.search?.datetime?.on || i.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && l(j).customComponent[i.type] ? (c(), b(G(l(j).customComponent[i.type]), v({
1886
1895
  key: 4,
1887
1896
  modelValue: l(t).search.form[i.key],
1888
- "onUpdate:modelValue": (f) => l(t).search.form[i.key] = f,
1897
+ "onUpdate:modelValue": (p) => l(t).search.form[i.key] = p,
1889
1898
  ref_for: !0
1890
1899
  }, i.options?.search?.[i.type] || i.options?.[i.type], F(i.options?.search?.[i.type]?.on || i.options?.[i.type]?.on || {}), {
1891
1900
  disabled: i.disabled?.search
1892
1901
  }), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : C("", !0)
1893
1902
  ]),
1894
- k(p.$slots, "search-" + i.key + "-right", {
1903
+ k(f.$slots, "search-" + i.key + "-right", {
1895
1904
  row: l(t).search.form
1896
1905
  })
1897
1906
  ]),
1898
1907
  _: 2
1899
1908
  }, 1032, ["label", "class"])) : C("", !0)
1900
1909
  ], 64))), 128)),
1901
- k(p.$slots, "search-center", {
1910
+ k(f.$slots, "search-center", {
1902
1911
  row: l(t).search.form
1903
1912
  }),
1904
- r.option.tools?.search || r.option.tools?.reset ? (c(), b(l(H), { key: 0 }, {
1913
+ s.option.tools?.search || s.option.tools?.reset ? (c(), b(l(H), { key: 0 }, {
1905
1914
  default: h(() => [
1906
- r.option.tools?.search ? (c(), b(l(M), {
1915
+ s.option.tools?.search ? (c(), b(l(I), {
1907
1916
  key: 0,
1908
1917
  type: "primary",
1909
1918
  onClick: l(t).search.submit
@@ -1913,7 +1922,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1913
1922
  ]),
1914
1923
  _: 1
1915
1924
  }, 8, ["onClick"])) : C("", !0),
1916
- r.option.tools?.reset ? (c(), b(l(M), {
1925
+ s.option.tools?.reset ? (c(), b(l(I), {
1917
1926
  key: 1,
1918
1927
  onClick: l(t).search.reset
1919
1928
  }, {
@@ -1925,7 +1934,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1925
1934
  ]),
1926
1935
  _: 1
1927
1936
  })) : C("", !0),
1928
- k(p.$slots, "search-end", {
1937
+ k(f.$slots, "search-end", {
1929
1938
  row: l(t).search.form
1930
1939
  })
1931
1940
  ]),
@@ -1934,10 +1943,10 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1934
1943
  ])) : C("", !0),
1935
1944
  O("div", et, [
1936
1945
  O("div", tt, [
1937
- l(n)(r.option.tools?.add) ? (c(), g("div", ot, [
1938
- D(l(M), {
1946
+ l(n)(s.option.tools?.add) ? (c(), g("div", ot, [
1947
+ D(l(I), {
1939
1948
  type: "primary",
1940
- onClick: m[0] || (m[0] = (i) => l(t).update.open(l(s).Insert))
1949
+ onClick: m[0] || (m[0] = (i) => l(t).update.open(l(r).Insert))
1941
1950
  }, {
1942
1951
  default: h(() => [
1943
1952
  E(U(l(y).tCurd("add")), 1)
@@ -1945,8 +1954,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1945
1954
  _: 1
1946
1955
  })
1947
1956
  ])) : C("", !0),
1948
- r.option.table?.selectable && l(n)(r.option.tools?.delete) ? (c(), g("div", lt, [
1949
- D(l(M), {
1957
+ s.option.table?.selectable && l(n)(s.option.tools?.delete) ? (c(), g("div", lt, [
1958
+ D(l(I), {
1950
1959
  type: "danger",
1951
1960
  onClick: m[1] || (m[1] = (i) => l(t).remove.open(l(t).table.selection.list))
1952
1961
  }, {
@@ -1956,8 +1965,8 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1956
1965
  _: 1
1957
1966
  })
1958
1967
  ])) : C("", !0),
1959
- r.option.tools?.expand ? (c(), g("div", at, [
1960
- D(l(M), {
1968
+ s.option.tools?.expand ? (c(), g("div", at, [
1969
+ D(l(I), {
1961
1970
  type: "warning",
1962
1971
  onClick: m[2] || (m[2] = (i) => l(t).table.expand.all())
1963
1972
  }, {
@@ -1967,14 +1976,14 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
1967
1976
  _: 1
1968
1977
  })
1969
1978
  ])) : C("", !0),
1970
- r.option.tools?.export?.show ? (c(), b(l(pe), {
1979
+ s.option.tools?.export?.show ? (c(), b(l(pe), {
1971
1980
  key: 3,
1972
1981
  onCommand: l(t).export.click
1973
1982
  }, {
1974
1983
  dropdown: h(() => [
1975
1984
  D(l(me), null, {
1976
1985
  default: h(() => [
1977
- r.option.table?.selectable ? (c(), b(l(X), {
1986
+ s.option.table?.selectable ? (c(), b(l(X), {
1978
1987
  key: 0,
1979
1988
  command: "select"
1980
1989
  }, {
@@ -2001,7 +2010,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2001
2010
  ]),
2002
2011
  default: h(() => [
2003
2012
  O("div", nt, [
2004
- D(l(M), {
2013
+ D(l(I), {
2005
2014
  type: "warning",
2006
2015
  loading: l(t).export.loading
2007
2016
  }, {
@@ -2014,35 +2023,35 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2014
2023
  ]),
2015
2024
  _: 1
2016
2025
  }, 8, ["onCommand"])) : C("", !0),
2017
- k(p.$slots, "tools-left")
2026
+ k(f.$slots, "tools-left")
2018
2027
  ]),
2019
2028
  O("div", it, [
2020
- k(p.$slots, "tools-right"),
2021
- r.option.tools?.refresh === void 0 || r.option.tools?.refresh ? (c(), g("div", {
2029
+ k(f.$slots, "tools-right"),
2030
+ s.option.tools?.refresh === void 0 || s.option.tools?.refresh ? (c(), g("div", {
2022
2031
  key: 0,
2023
2032
  class: "refresh-btn",
2024
2033
  onClick: m[3] || (m[3] = //@ts-ignore
2025
2034
  (...i) => l(t).table.getList && l(t).table.getList(...i))
2026
2035
  }, [
2027
- D(Te)
2036
+ D(je)
2028
2037
  ])) : C("", !0)
2029
2038
  ])
2030
2039
  ]),
2031
- O("div", rt, [
2032
- O("div", st, [
2040
+ O("div", st, [
2041
+ O("div", rt, [
2033
2042
  Ce((c(), b(l(he), v({
2034
2043
  data: l(t).table.data,
2035
- border: r.option.table?.border === void 0 ? !0 : r.option.table?.border,
2044
+ border: s.option.table?.border === void 0 ? !0 : s.option.table?.border,
2036
2045
  onSelectionChange: l(t).table.selection.change,
2037
2046
  onSortChange: l(t).table.sort.change,
2038
2047
  "expand-row-keys": l(t).table.expand.rowKeys,
2039
2048
  onExpandChange: l(t).table.expand.change
2040
- }, r.option.table, F(r.option.table?.on || {})), {
2049
+ }, s.option.table, F(s.option.table?.on || {})), {
2041
2050
  default: h(() => [
2042
- r.option.table?.selectable || l(n)(r.option.tools?.delete) || r.option.tools?.export?.show ? (c(), b(l(Z), {
2051
+ s.option.table?.selectable || l(n)(s.option.tools?.delete) || s.option.tools?.export?.show ? (c(), b(l(Z), {
2043
2052
  key: 0,
2044
2053
  type: "selection",
2045
- selectable: typeof r.option.table?.selectable == "function" ? r.option.table?.selectable : void 0,
2054
+ selectable: typeof s.option.table?.selectable == "function" ? s.option.table?.selectable : void 0,
2046
2055
  width: "40",
2047
2056
  align: "center",
2048
2057
  fixed: "left",
@@ -2051,30 +2060,30 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2051
2060
  D(We, {
2052
2061
  conf: l(t),
2053
2062
  columnList: l(t).table.column.list,
2054
- option: r.option
2063
+ option: s.option
2055
2064
  }, _({ _: 2 }, [
2056
- I(p.$slots, (i, f) => ({
2057
- name: f,
2065
+ L(f.$slots, (i, p) => ({
2066
+ name: p,
2058
2067
  fn: h((w) => [
2059
- k(p.$slots, f, ve(Ve(w || {})))
2068
+ k(f.$slots, p, ve(Ve(w || {})))
2060
2069
  ])
2061
2070
  }))
2062
2071
  ]), 1032, ["conf", "columnList", "option"]),
2063
- l(n)(r.option.table?.add) || l(n)(r.option.table?.update) || l(n)(r.option.table?.delete) || l(n)(r.option.table?.view) || p.$slots["table-op-left"] || p.$slots["table-op-right"] ? (c(), b(l(Z), v({
2072
+ l(n)(s.option.table?.add) || l(n)(s.option.table?.update) || l(n)(s.option.table?.delete) || l(n)(s.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (c(), b(l(Z), v({
2064
2073
  key: 1,
2065
- width: l(t).table.op.width(l(n)(r.option.table?.add), l(n)(r.option.table?.update), l(n)(r.option.table?.delete), l(n)(r.option.table?.view), p.$slots["table-op-left"], p.$slots["table-op-right"]),
2074
+ width: l(t).table.op.width(l(n)(s.option.table?.add), l(n)(s.option.table?.update), l(n)(s.option.table?.delete), l(n)(s.option.table?.view), f.$slots["table-op-left"], f.$slots["table-op-right"]),
2066
2075
  align: "center",
2067
2076
  fixed: "right"
2068
- }, r.option.table?.operate), {
2077
+ }, s.option.table?.operate), {
2069
2078
  header: h(() => [
2070
- k(p.$slots, "table-header-op", {}, () => [
2079
+ k(f.$slots, "table-header-op", {}, () => [
2071
2080
  E(U(l(y).tCurd("operation")), 1)
2072
2081
  ])
2073
2082
  ]),
2074
2083
  default: h(({ row: i }) => [
2075
- k(p.$slots, "table-op-left", { row: i }),
2076
- r.option.table?.inlineEdit && l(t).inlineEdit.row === i ? (c(), g(S, { key: 0 }, [
2077
- D(l(M), {
2084
+ k(f.$slots, "table-op-left", { row: i }),
2085
+ s.option.table?.inlineEdit && l(t).inlineEdit.row === i ? (c(), g(S, { key: 0 }, [
2086
+ D(l(I), {
2078
2087
  link: "",
2079
2088
  type: "info",
2080
2089
  onClick: l(t).inlineEdit.close
@@ -2084,7 +2093,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2084
2093
  ]),
2085
2094
  _: 1
2086
2095
  }, 8, ["onClick"]),
2087
- D(l(M), {
2096
+ D(l(I), {
2088
2097
  link: "",
2089
2098
  type: "primary",
2090
2099
  onClick: l(t).inlineEdit.submit,
@@ -2095,53 +2104,53 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2095
2104
  ]),
2096
2105
  _: 1
2097
2106
  }, 8, ["onClick", "loading"]),
2098
- k(p.$slots, "table-op-edit-right", { row: i })
2107
+ k(f.$slots, "table-op-edit-right", { row: i })
2099
2108
  ], 64)) : (c(), g(S, { key: 1 }, [
2100
- l(n)(r.option.table?.add, i) ? (c(), b(l(M), {
2109
+ l(n)(s.option.table?.add, i) ? (c(), b(l(I), {
2101
2110
  key: 0,
2102
2111
  link: "",
2103
2112
  type: "primary",
2104
- onClick: (f) => l(t).update.open(l(s).Insert, i)
2113
+ onClick: (p) => l(t).update.open(l(r).Insert, i)
2105
2114
  }, {
2106
2115
  default: h(() => [
2107
2116
  E(U(l(y).tCurd("add")), 1)
2108
2117
  ]),
2109
2118
  _: 2
2110
2119
  }, 1032, ["onClick"])) : C("", !0),
2111
- l(n)(r.option.table?.view, i) ? (c(), b(l(M), {
2120
+ l(n)(s.option.table?.view, i) ? (c(), b(l(I), {
2112
2121
  key: 1,
2113
2122
  link: "",
2114
2123
  type: "primary",
2115
- onClick: (f) => l(t).update.open(l(s).View, i)
2124
+ onClick: (p) => l(t).update.open(l(r).View, i)
2116
2125
  }, {
2117
2126
  default: h(() => [
2118
2127
  E(U(l(y).tCurd("view")), 1)
2119
2128
  ]),
2120
2129
  _: 2
2121
2130
  }, 1032, ["onClick"])) : C("", !0),
2122
- l(n)(r.option.table?.update, i) ? (c(), b(l(M), {
2131
+ l(n)(s.option.table?.update, i) ? (c(), b(l(I), {
2123
2132
  key: 2,
2124
2133
  link: "",
2125
2134
  type: "warning",
2126
- onClick: (f) => l(t).update.open(l(s).Update, i)
2135
+ onClick: (p) => l(t).update.open(l(r).Update, i)
2127
2136
  }, {
2128
2137
  default: h(() => [
2129
2138
  E(U(l(y).tCurd("edit")), 1)
2130
2139
  ]),
2131
2140
  _: 2
2132
2141
  }, 1032, ["onClick"])) : C("", !0),
2133
- l(n)(r.option.table?.delete, i) ? (c(), b(l(M), {
2142
+ l(n)(s.option.table?.delete, i) ? (c(), b(l(I), {
2134
2143
  key: 3,
2135
2144
  link: "",
2136
2145
  type: "danger",
2137
- onClick: (f) => l(t).remove.open([i])
2146
+ onClick: (p) => l(t).remove.open([i])
2138
2147
  }, {
2139
2148
  default: h(() => [
2140
2149
  E(U(l(y).tCurd("delete")), 1)
2141
2150
  ]),
2142
2151
  _: 2
2143
2152
  }, 1032, ["onClick"])) : C("", !0),
2144
- k(p.$slots, "table-op-right", { row: i })
2153
+ k(f.$slots, "table-op-right", { row: i })
2145
2154
  ], 64))
2146
2155
  ]),
2147
2156
  _: 3
@@ -2154,7 +2163,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2154
2163
  ])
2155
2164
  ]),
2156
2165
  O("div", dt, [
2157
- r.option.page?.show === void 0 || r.option.page?.show ? (c(), b(l(be), v({
2166
+ s.option.page?.show === void 0 || s.option.page?.show ? (c(), b(l(be), v({
2158
2167
  key: 0,
2159
2168
  "current-page": l(t).page.num,
2160
2169
  "onUpdate:currentPage": m[4] || (m[4] = (i) => l(t).page.num = i),
@@ -2167,20 +2176,20 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2167
2176
  total: l(t).page.total,
2168
2177
  onSizeChange: l(t).table.getList,
2169
2178
  onCurrentChange: l(t).table.getList
2170
- }, r.option.page?.pagination || {}, F(r.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "onSizeChange", "onCurrentChange"])) : C("", !0)
2179
+ }, s.option.page?.pagination || {}, F(s.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "onSizeChange", "onCurrentChange"])) : C("", !0)
2171
2180
  ])
2172
2181
  ]),
2173
- k(p.$slots, "box-right")
2182
+ k(f.$slots, "box-right")
2174
2183
  ]),
2175
2184
  D(l(Y), v({
2176
2185
  modelValue: l(t).update.show,
2177
2186
  "onUpdate:modelValue": m[6] || (m[6] = (i) => l(t).update.show = i),
2178
2187
  title: l(t).update.title,
2179
2188
  "before-close": l(t).update.close
2180
- }, r.option.dialog), {
2189
+ }, s.option.dialog), {
2181
2190
  footer: h(() => [
2182
2191
  O("span", ut, [
2183
- D(l(M), {
2192
+ D(l(I), {
2184
2193
  onClick: l(t).update.close
2185
2194
  }, {
2186
2195
  default: h(() => [
@@ -2188,7 +2197,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2188
2197
  ]),
2189
2198
  _: 1
2190
2199
  }, 8, ["onClick"]),
2191
- l(t).update.type !== l(s).View ? (c(), b(l(M), {
2200
+ l(t).update.type !== l(r).View ? (c(), b(l(I), {
2192
2201
  key: 0,
2193
2202
  type: "primary",
2194
2203
  onClick: l(t).update.submit,
@@ -2209,45 +2218,45 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2209
2218
  rules: l(t).update.rules
2210
2219
  }, {
2211
2220
  default: h(() => [
2212
- l(t).update.showContent ? (c(!0), g(S, { key: 0 }, I(l(t).update.formColumn, (i) => (c(), g(S, null, [
2221
+ l(t).update.showContent ? (c(!0), g(S, { key: 0 }, L(l(t).update.formColumn, (i) => (c(), g(S, null, [
2213
2222
  l(n)(
2214
2223
  (() => {
2215
- const f = [], w = (L) => {
2216
- L?.item?.children ? w(L.item.children) : f.push(...L.map((j) => j.item?.show?.form));
2224
+ const p = [], w = (M) => {
2225
+ M?.item?.children ? w(M.item.children) : p.push(...M.map((z) => z.item?.show?.form));
2217
2226
  };
2218
- return w(i), f;
2227
+ return w(i), p;
2219
2228
  })(),
2220
2229
  l(t).update.form,
2221
2230
  l(t).update.type
2222
2231
  ) ? (c(), g("div", {
2223
2232
  key: 0,
2224
2233
  class: A(["row curd-row", {
2225
- stripe: r.option.form?.stripe === void 0 ? !0 : r.option.form?.stripe
2234
+ stripe: s.option.form?.stripe === void 0 ? !0 : s.option.form?.stripe
2226
2235
  }])
2227
2236
  }, [
2228
- k(p.$slots, "form-start", {
2237
+ k(f.$slots, "form-start", {
2229
2238
  row: l(t).update.form
2230
2239
  }),
2231
- (c(!0), g(S, null, I(i, (f) => (c(), g(S, null, [
2232
- l(n)(f.item.show?.form, l(t).update.form, l(t).update.type) ? (c(), g("div", {
2240
+ (c(!0), g(S, null, L(i, (p) => (c(), g(S, null, [
2241
+ l(n)(p.item.show?.form, l(t).update.form, l(t).update.type) ? (c(), g("div", {
2233
2242
  key: 0,
2234
- class: A([f.item.form.span > 0 ? `col-${l(t).getColumnSpan(f, i)}` : "col", `form-item-col-${f.item.key}`])
2243
+ class: A([p.item.form.span > 0 ? `col-${l(t).getColumnSpan(p, i)}` : "col", `form-item-col-${p.item.key}`])
2235
2244
  }, [
2236
- (c(!0), g(S, null, I(f.item.children ? f.children : [f], (w) => (c(), b(Qe, {
2245
+ (c(!0), g(S, null, L(p.item.children ? p.children : [p], (w) => (c(), b(Qe, {
2237
2246
  key: w.item.key,
2238
2247
  conf: l(t),
2239
2248
  item: w
2240
2249
  }, _({ _: 2 }, [
2241
- I(p.$slots, (L, j) => ({
2242
- name: j,
2243
- fn: h((z) => [
2244
- k(p.$slots, j, v({ ref_for: !0 }, z || {}))
2250
+ L(f.$slots, (M, z) => ({
2251
+ name: z,
2252
+ fn: h((T) => [
2253
+ k(f.$slots, z, v({ ref_for: !0 }, T || {}))
2245
2254
  ])
2246
2255
  }))
2247
2256
  ]), 1032, ["conf", "item"]))), 128))
2248
2257
  ], 2)) : C("", !0)
2249
2258
  ], 64))), 256)),
2250
- k(p.$slots, "form-end", {
2259
+ k(f.$slots, "form-end", {
2251
2260
  row: l(t).update.form
2252
2261
  })
2253
2262
  ], 2)) : C("", !0)
@@ -2266,7 +2275,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2266
2275
  }, {
2267
2276
  footer: h(() => [
2268
2277
  O("span", ct, [
2269
- D(l(M), {
2278
+ D(l(I), {
2270
2279
  onClick: l(t).remove.close
2271
2280
  }, {
2272
2281
  default: h(() => [
@@ -2274,7 +2283,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2274
2283
  ]),
2275
2284
  _: 1
2276
2285
  }, 8, ["onClick"]),
2277
- D(l(M), {
2286
+ D(l(I), {
2278
2287
  type: "danger",
2279
2288
  onClick: l(t).remove.submit,
2280
2289
  loading: l(t).remove.loading
@@ -2291,7 +2300,7 @@ const Ke = /* @__PURE__ */ re(Re, [["render", Ae]]), Ne = { class: "row flex-cen
2291
2300
  ]),
2292
2301
  _: 1
2293
2302
  }, 8, ["modelValue", "title"]),
2294
- D(Ie, {
2303
+ D(Le, {
2295
2304
  ref_key: "switchConfirmRef",
2296
2305
  ref: a
2297
2306
  }, null, 512)
@@ -2306,25 +2315,25 @@ class yt {
2306
2315
  * @param href - 文件的远程地址
2307
2316
  * @param name - 下载后的文件名,默认 `'download.png'`
2308
2317
  */
2309
- static async download(o, s = "download.png") {
2318
+ static async download(o, r = "download.png") {
2310
2319
  const e = document.createElement("a");
2311
- e.style.display = "none", e.href = o, e.setAttribute("download", s), typeof e.download > "u" && e.setAttribute("target", "_blank"), document.body.appendChild(e), e.click(), document.body.removeChild(e), window.URL.revokeObjectURL(o);
2320
+ e.style.display = "none", e.href = o, 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(o);
2312
2321
  }
2313
2322
  /**
2314
2323
  * 将json对象或者json数组导出为json文件保存
2315
2324
  * @param data
2316
2325
  * @param name
2317
2326
  */
2318
- static exportJSONFile = (o, s) => {
2327
+ static exportJSONFile = (o, r) => {
2319
2328
  const e = new Blob([JSON.stringify(o)], { type: "application/json" }), n = URL.createObjectURL(e), t = document.createElement("a");
2320
- t.href = n, t.download = `${s || "config"}.json`, t.click();
2329
+ t.href = n, t.download = `${r || "config"}.json`, t.click();
2321
2330
  };
2322
2331
  /**
2323
2332
  * 导入文件内容,默认为json
2324
2333
  * @param param
2325
2334
  * @returns
2326
2335
  */
2327
- static importFile = async (o) => new Promise((s, e) => {
2336
+ static importFile = async (o) => new Promise((r, e) => {
2328
2337
  const n = document.createElement("input");
2329
2338
  n.type = "file";
2330
2339
  const t = o?.accept || ".json";
@@ -2334,21 +2343,21 @@ class yt {
2334
2343
  $.fail("未选择文件"), e("未选择文件");
2335
2344
  return;
2336
2345
  }
2337
- const p = new FileReader();
2338
- p.onload = async (m) => {
2346
+ const f = new FileReader();
2347
+ f.onload = async (m) => {
2339
2348
  const u = t == ".json" ? JSON.parse(m.target.result) : m.target.result;
2340
- s(u);
2341
- }, p.onerror = () => {
2349
+ r(u);
2350
+ }, f.onerror = () => {
2342
2351
  $.fail("文件读取失败"), e("文件读取失败");
2343
- }, p.readAsText(d), document.body.removeChild(n);
2352
+ }, f.readAsText(d), document.body.removeChild(n);
2344
2353
  }, document.body.appendChild(n), n.click();
2345
2354
  });
2346
2355
  }
2347
- const pt = (r, o) => {
2348
- if (r.component("TCurd", ft), r.component("TFormList", le), r.component("TColumn", Se), o?.customComponent) {
2349
- T.customComponent = o.customComponent;
2350
- for (const s in o.customComponent)
2351
- r.component(s, o.customComponent[s]);
2356
+ const pt = (s, o) => {
2357
+ if (s.component("TCurd", ft), s.component("TFormList", le), s.component("TColumn", Se), o?.customComponent) {
2358
+ j.customComponent = o.customComponent;
2359
+ for (const r in o.customComponent)
2360
+ s.component(r, o.customComponent[r]);
2352
2361
  }
2353
2362
  }, gt = {
2354
2363
  install: pt
@@ -2359,7 +2368,7 @@ export {
2359
2368
  Se as TColumn,
2360
2369
  ft as TCurd,
2361
2370
  yt as TFile,
2362
- T as TForm,
2371
+ j as TForm,
2363
2372
  V as TFormConfig,
2364
2373
  y as TFormI18n,
2365
2374
  le as TFormList,