cc1-form 1.1.38 → 1.1.40

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