cc1-form 1.2.9 → 1.2.10
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.css +1 -1
- package/dist/cc1-form.js +709 -680
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/index.vue.d.ts +40 -26
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as ee, ElInput as
|
|
1
|
+
import { ElMessage as ce, ElLoading as me, ElForm as W, ElFormItem as ee, ElInput as x, ElSwitch as Z, ElSelect as q, ElOption as H, ElRadioGroup as le, ElRadio as ne, ElTreeSelect as ue, ElDatePicker as ie, ElDialog as oe, ElButton as B, ElTableColumn as ae, ElDropdown as he, ElDropdownMenu as ge, ElDropdownItem as te, ElPagination as de, ElTable as ye } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as
|
|
3
|
+
import { defineComponent as G, reactive as re, onMounted as fe, resolveComponent as _, createElementBlock as b, createCommentVNode as v, openBlock as f, renderSlot as C, createVNode as D, withCtx as y, createTextVNode as U, Fragment as $, renderList as F, createBlock as g, normalizeClass as I, normalizeStyle as pe, ref as N, unref as o, createElementVNode as E, mergeProps as V, toHandlers as z, resolveDynamicComponent as Q, nextTick as be, toDisplayString as O, getCurrentInstance as we, createSlots as J, withModifiers as ke, resolveDirective as ve, withDirectives as Ce, normalizeProps as Ve, guardReactiveProps as ze } from "vue";
|
|
4
4
|
class M {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
@@ -26,13 +26,13 @@ class M {
|
|
|
26
26
|
* @param data 数据
|
|
27
27
|
* @returns 是否显示
|
|
28
28
|
*/
|
|
29
|
-
static isFun = (
|
|
29
|
+
static isFun = (a, ...p) => Array.isArray(a) ? a.some((s) => typeof s == "function" ? s(...p) : s) : typeof a == "function" ? a(...p) : a;
|
|
30
30
|
/**
|
|
31
31
|
* 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
|
|
32
32
|
*/
|
|
33
33
|
static getRouterParams = () => {
|
|
34
|
-
const
|
|
35
|
-
return Object.keys(
|
|
34
|
+
const a = this.router.currentRoute.value.query || {}, p = this.router.currentRoute.value.params || {};
|
|
35
|
+
return Object.keys(a).length ? a : Object.keys(p).length ? p : {};
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* 模块赋值
|
|
@@ -42,10 +42,10 @@ class M {
|
|
|
42
42
|
* 加载模块
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
|
-
static loadModule = async (
|
|
46
|
-
if (!M.moduleObj[
|
|
47
|
-
throw new Error(`模块${
|
|
48
|
-
const p = await M.moduleObj[
|
|
45
|
+
static loadModule = async (a) => {
|
|
46
|
+
if (!M.moduleObj[a])
|
|
47
|
+
throw new Error(`模块${a}未加载,请赋值如:TSys.moduleObj = { ${a}: ()=>import('${a}') }`);
|
|
48
|
+
const p = await M.moduleObj[a]();
|
|
49
49
|
return p.default ?? p;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -62,19 +62,19 @@ class M {
|
|
|
62
62
|
* @param type 消息类型
|
|
63
63
|
* @param options 其他选项
|
|
64
64
|
*/
|
|
65
|
-
static showMessage(
|
|
65
|
+
static showMessage(a, p, s = {}) {
|
|
66
66
|
const l = Date.now();
|
|
67
|
-
if (!this.tipMessages[
|
|
68
|
-
this.tipMessages[
|
|
67
|
+
if (!this.tipMessages[a] || l - this.tipMessages[a] > this.tipMessagesGap) {
|
|
68
|
+
this.tipMessages[a] = l;
|
|
69
69
|
const t = Object.assign(
|
|
70
70
|
{
|
|
71
|
-
message:
|
|
71
|
+
message: a,
|
|
72
72
|
type: p
|
|
73
73
|
},
|
|
74
74
|
s
|
|
75
75
|
);
|
|
76
76
|
ce(t), setTimeout(() => {
|
|
77
|
-
delete this.tipMessages[
|
|
77
|
+
delete this.tipMessages[a];
|
|
78
78
|
}, this.tipMessagesGap);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
@@ -83,16 +83,16 @@ class M {
|
|
|
83
83
|
* @param content
|
|
84
84
|
* @param options
|
|
85
85
|
*/
|
|
86
|
-
static fail = (
|
|
87
|
-
this.showMessage(
|
|
86
|
+
static fail = (a, p = {}) => {
|
|
87
|
+
this.showMessage(a, "error", p);
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* 成功提示
|
|
91
91
|
* @param content
|
|
92
92
|
* @param options
|
|
93
93
|
*/
|
|
94
|
-
static success = (
|
|
95
|
-
this.showMessage(
|
|
94
|
+
static success = (a, p = {}) => {
|
|
95
|
+
this.showMessage(a, "success", p);
|
|
96
96
|
};
|
|
97
97
|
static loadingObj = null;
|
|
98
98
|
static loadingTimer = null;
|
|
@@ -101,9 +101,9 @@ class M {
|
|
|
101
101
|
* @param show
|
|
102
102
|
* @param text
|
|
103
103
|
*/
|
|
104
|
-
static loading = (
|
|
104
|
+
static loading = (a = !0, p = "Loading...") => {
|
|
105
105
|
Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
|
|
106
|
-
|
|
106
|
+
a ? this.loadingObj = me.service({
|
|
107
107
|
lock: !0,
|
|
108
108
|
text: p,
|
|
109
109
|
background: "rgba(0, 0, 0, 0.3)"
|
|
@@ -115,39 +115,39 @@ class M {
|
|
|
115
115
|
* @param url 地址
|
|
116
116
|
* @param isCenter 是否居中
|
|
117
117
|
*/
|
|
118
|
-
static openUrl = (
|
|
118
|
+
static openUrl = (a, p = !0) => {
|
|
119
119
|
if (p) {
|
|
120
120
|
let s = screen.width / 2 - 500, l = screen.height / 2 - 800 / 2 - 30;
|
|
121
121
|
window.open(
|
|
122
|
-
|
|
122
|
+
a,
|
|
123
123
|
"_blank",
|
|
124
124
|
"toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + l + ", left=" + s
|
|
125
125
|
);
|
|
126
126
|
} else
|
|
127
|
-
window.open(
|
|
127
|
+
window.open(a, "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 = (
|
|
135
|
-
let l = document.getElementById(
|
|
134
|
+
static getImgPic = (a) => new Promise(async (p, s) => {
|
|
135
|
+
let l = document.getElementById(a.id);
|
|
136
136
|
const t = await M.loadModule("html2canvas");
|
|
137
137
|
try {
|
|
138
138
|
t(l, {
|
|
139
139
|
logging: !1,
|
|
140
140
|
allowTaint: !0,
|
|
141
141
|
scale: window.devicePixelRatio,
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
144
|
-
windowWidth:
|
|
145
|
-
windowHeight:
|
|
142
|
+
width: a.windowWidth,
|
|
143
|
+
height: a.windowHeight,
|
|
144
|
+
windowWidth: a.windowWidth,
|
|
145
|
+
windowHeight: a.windowHeight,
|
|
146
146
|
useCORS: !0,
|
|
147
147
|
backgroundColor: "#ffffff00"
|
|
148
148
|
}).then(function(e) {
|
|
149
|
-
let
|
|
150
|
-
p(
|
|
149
|
+
let r = e.toDataURL("image/png");
|
|
150
|
+
p(r);
|
|
151
151
|
});
|
|
152
152
|
} catch (e) {
|
|
153
153
|
s(e);
|
|
@@ -511,8 +511,8 @@ class A {
|
|
|
511
511
|
*
|
|
512
512
|
* @param config - 需要覆盖的配置项(深度 Partial)
|
|
513
513
|
*/
|
|
514
|
-
static setConfig = (
|
|
515
|
-
A.config = ObjectUtil.deepMerge(A.config,
|
|
514
|
+
static setConfig = (a) => {
|
|
515
|
+
A.config = ObjectUtil.deepMerge(A.config, a);
|
|
516
516
|
};
|
|
517
517
|
}
|
|
518
518
|
class L {
|
|
@@ -533,8 +533,8 @@ class L {
|
|
|
533
533
|
* @param field - 字段的 key 值
|
|
534
534
|
* @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
|
|
535
535
|
*/
|
|
536
|
-
static findOptions = (
|
|
537
|
-
const s =
|
|
536
|
+
static findOptions = (a, p) => {
|
|
537
|
+
const s = a.column.find((t) => t.key === p), l = (t) => t.replace(/-([a-z])/g, (e, r) => r.toUpperCase());
|
|
538
538
|
if (s)
|
|
539
539
|
return s.options[l(s.type)];
|
|
540
540
|
};
|
|
@@ -554,8 +554,8 @@ class L {
|
|
|
554
554
|
}))
|
|
555
555
|
)
|
|
556
556
|
*/
|
|
557
|
-
static setOptionsData = (
|
|
558
|
-
const l = L.findOptions(
|
|
557
|
+
static setOptionsData = (a, p, s) => {
|
|
558
|
+
const l = L.findOptions(a, p);
|
|
559
559
|
l && (l.data = s);
|
|
560
560
|
};
|
|
561
561
|
static form = {
|
|
@@ -567,9 +567,9 @@ class L {
|
|
|
567
567
|
* @param treeData 树形数据
|
|
568
568
|
* @param option 组件配置
|
|
569
569
|
*/
|
|
570
|
-
parentId: (
|
|
570
|
+
parentId: (a, p, s, l) => {
|
|
571
571
|
const t = A.config.table.rowKey;
|
|
572
|
-
|
|
572
|
+
a ? p.type === M.EDialog.Add ? (p.form.parentId = a[t], p.form.sort = a.children.length + 1) : p.form.parentId = a.parentId.substring(a.parentId.lastIndexOf(",") + 1) : (p.form.parentId = "0", p.form.sort = s.length + 1), L.setOptionsData(l, "parentId", [{ [t]: "0", title: "根", children: s }]);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
};
|
|
@@ -611,19 +611,19 @@ const $e = {
|
|
|
611
611
|
};
|
|
612
612
|
class w {
|
|
613
613
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
614
|
-
static t(
|
|
615
|
-
if (typeof
|
|
616
|
-
return
|
|
617
|
-
|
|
614
|
+
static t(a, ...p) {
|
|
615
|
+
if (typeof a == "function")
|
|
616
|
+
return a(...p);
|
|
617
|
+
a = String(a);
|
|
618
618
|
let s = 0;
|
|
619
|
-
return
|
|
619
|
+
return a.replace(/{([^}]+)}/g, (l, t) => s < p.length ? String(p[s++]) : `{${t}}`);
|
|
620
620
|
}
|
|
621
|
-
static setI18n = (
|
|
622
|
-
w.curd = ObjectUtil.deepMerge(w.curd,
|
|
621
|
+
static setI18n = (a) => {
|
|
622
|
+
w.curd = ObjectUtil.deepMerge(w.curd, a);
|
|
623
623
|
};
|
|
624
624
|
/** 解析curd国际化值 */
|
|
625
|
-
static tCurd(
|
|
626
|
-
return this.t(this.curd[
|
|
625
|
+
static tCurd(a, ...p) {
|
|
626
|
+
return this.t(this.curd[a], ...p);
|
|
627
627
|
}
|
|
628
628
|
/** curd表单 */
|
|
629
629
|
static curd = $e;
|
|
@@ -638,13 +638,13 @@ class K {
|
|
|
638
638
|
* @param field 字段名
|
|
639
639
|
* @param row 行数据
|
|
640
640
|
*/
|
|
641
|
-
static setId = (
|
|
642
|
-
p[
|
|
641
|
+
static setId = (a, p, s) => {
|
|
642
|
+
p[a] || (p[a] = []);
|
|
643
643
|
const l = A.config.table.rowKey;
|
|
644
|
-
p[
|
|
644
|
+
p[a].forEach((t) => {
|
|
645
645
|
s.forEach((e) => {
|
|
646
|
-
let
|
|
647
|
-
e.type === "number" && (
|
|
646
|
+
let r = e.default ?? "";
|
|
647
|
+
e.type === "number" && (r = e.default ?? 0), e.type === "boolean" && (r = e.default ?? !1), e.type === "time" && (r = e.default ?? /* @__PURE__ */ new Date()), t[e.value] === void 0 && (t[e.value] = r);
|
|
648
648
|
}), t[l] || (t[l] = K.getIdFun());
|
|
649
649
|
});
|
|
650
650
|
};
|
|
@@ -655,15 +655,15 @@ class K {
|
|
|
655
655
|
* @param itemFields 元素字段-如:[{label:'',value:''}]
|
|
656
656
|
* @param callback 回调函数
|
|
657
657
|
*/
|
|
658
|
-
static add = (
|
|
658
|
+
static add = (a, p, s, l) => {
|
|
659
659
|
const t = JSONUtil.cp(s);
|
|
660
|
-
K.setId(
|
|
660
|
+
K.setId(a, p, s);
|
|
661
661
|
const e = A.config.table.rowKey;
|
|
662
|
-
p[
|
|
662
|
+
p[a].push(
|
|
663
663
|
t.reduce(
|
|
664
|
-
(
|
|
664
|
+
(r, d) => {
|
|
665
665
|
let m = d.default ?? "";
|
|
666
|
-
return d.type === "number" && (m = d.default ?? 0), d.type === "boolean" && (m = d.default ?? !1), d.type === "time" && (m = d.default ?? /* @__PURE__ */ new Date()),
|
|
666
|
+
return d.type === "number" && (m = d.default ?? 0), d.type === "boolean" && (m = d.default ?? !1), d.type === "time" && (m = d.default ?? /* @__PURE__ */ new Date()), r[d.value] = m, r;
|
|
667
667
|
},
|
|
668
668
|
{ [e]: K.getIdFun() }
|
|
669
669
|
)
|
|
@@ -676,9 +676,9 @@ class K {
|
|
|
676
676
|
* @param item 元素-如:{_id:''}
|
|
677
677
|
* @param callback 回调函数
|
|
678
678
|
*/
|
|
679
|
-
static remove = (
|
|
679
|
+
static remove = (a, p, s, l) => {
|
|
680
680
|
const t = A.config.table.rowKey;
|
|
681
|
-
p[
|
|
681
|
+
p[a] = p[a].filter((e) => e[t] !== s[t]), l?.(p);
|
|
682
682
|
};
|
|
683
683
|
/**
|
|
684
684
|
* 获取没有id的数据
|
|
@@ -686,21 +686,21 @@ class K {
|
|
|
686
686
|
* @param childernField 子级字段-如:list、children
|
|
687
687
|
* @returns 没有id的数据
|
|
688
688
|
*/
|
|
689
|
-
static getNoIdData = (
|
|
690
|
-
const s = JSONUtil.cp(
|
|
689
|
+
static getNoIdData = (a, p) => {
|
|
690
|
+
const s = JSONUtil.cp(a), l = A.config.table.rowKey;
|
|
691
691
|
return s.forEach((t) => {
|
|
692
692
|
t[l] && delete t[l], p && t[p] && K.getNoIdData(t[p], p);
|
|
693
693
|
}), s;
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
const
|
|
696
|
+
const Ue = {
|
|
697
697
|
key: 0,
|
|
698
698
|
class: "column curd-form-com-list",
|
|
699
699
|
style: { width: "100%", gap: "10px" }
|
|
700
|
-
},
|
|
700
|
+
}, De = { key: 0 }, Ee = {
|
|
701
701
|
class: "row items-center",
|
|
702
702
|
style: { gap: "10px", width: "100%" }
|
|
703
|
-
}, Oe = { key: 1 },
|
|
703
|
+
}, Oe = { key: 1 }, se = /* @__PURE__ */ G({
|
|
704
704
|
__name: "list",
|
|
705
705
|
props: {
|
|
706
706
|
row: {
|
|
@@ -738,16 +738,16 @@ const De = {
|
|
|
738
738
|
}
|
|
739
739
|
},
|
|
740
740
|
emits: ["change"],
|
|
741
|
-
setup(
|
|
742
|
-
const p =
|
|
741
|
+
setup(i, { emit: a }) {
|
|
742
|
+
const p = i, s = re({
|
|
743
743
|
show: !1,
|
|
744
|
-
add: (t, e,
|
|
745
|
-
K.add(t, e,
|
|
744
|
+
add: (t, e, r) => {
|
|
745
|
+
K.add(t, e, r, () => {
|
|
746
746
|
l("change");
|
|
747
747
|
});
|
|
748
748
|
},
|
|
749
|
-
remove: (t, e,
|
|
750
|
-
K.remove(t, e,
|
|
749
|
+
remove: (t, e, r) => {
|
|
750
|
+
K.remove(t, e, r, () => {
|
|
751
751
|
l("change");
|
|
752
752
|
});
|
|
753
753
|
}
|
|
@@ -755,71 +755,71 @@ const De = {
|
|
|
755
755
|
fe(() => {
|
|
756
756
|
K.setId(p.field, p.row, p.itemFields), s.show = !0;
|
|
757
757
|
});
|
|
758
|
-
const l =
|
|
758
|
+
const l = a;
|
|
759
759
|
return (t, e) => {
|
|
760
|
-
const
|
|
761
|
-
return s.show ? (f(), b("div",
|
|
762
|
-
C(t.$slots, "list-start", { row:
|
|
763
|
-
|
|
764
|
-
|
|
760
|
+
const r = _("el-button"), d = _("el-input");
|
|
761
|
+
return s.show ? (f(), b("div", Ue, [
|
|
762
|
+
C(t.$slots, "list-start", { row: i.row }),
|
|
763
|
+
i.addBottom ? v("", !0) : (f(), b("div", De, [
|
|
764
|
+
D(r, {
|
|
765
765
|
link: "",
|
|
766
766
|
type: "primary",
|
|
767
|
-
onClick: e[0] || (e[0] = (m) => s.add(
|
|
767
|
+
onClick: e[0] || (e[0] = (m) => s.add(i.field, i.row, i.itemFields))
|
|
768
768
|
}, {
|
|
769
769
|
default: y(() => e[3] || (e[3] = [
|
|
770
|
-
|
|
770
|
+
U("添加")
|
|
771
771
|
])),
|
|
772
772
|
_: 1
|
|
773
773
|
})
|
|
774
774
|
])),
|
|
775
|
-
(f(!0), b(
|
|
775
|
+
(f(!0), b($, null, F(i.row[i.field], (m) => (f(), b("div", Ee, [
|
|
776
776
|
C(t.$slots, "item-start", {
|
|
777
777
|
item: m,
|
|
778
|
-
row:
|
|
778
|
+
row: i.row
|
|
779
779
|
}),
|
|
780
|
-
(f(!0), b(
|
|
780
|
+
(f(!0), b($, null, F(i.itemFields, (c) => (f(), g(d, {
|
|
781
781
|
modelValue: m[c.value],
|
|
782
782
|
"onUpdate:modelValue": (u) => m[c.value] = u,
|
|
783
|
-
style: pe({ width:
|
|
784
|
-
class: I(
|
|
785
|
-
placeholder: c[
|
|
783
|
+
style: pe({ width: i.inputWidth }),
|
|
784
|
+
class: I(i.inputClass),
|
|
785
|
+
placeholder: c[i.label] || c[i.value],
|
|
786
786
|
onChange: e[1] || (e[1] = (u) => l("change"))
|
|
787
787
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "style", "class", "placeholder"]))), 256)),
|
|
788
788
|
C(t.$slots, "item-end", {
|
|
789
789
|
item: m,
|
|
790
|
-
row:
|
|
790
|
+
row: i.row
|
|
791
791
|
}),
|
|
792
|
-
|
|
792
|
+
D(r, {
|
|
793
793
|
link: "",
|
|
794
794
|
type: "danger",
|
|
795
|
-
onClick: (c) => s.remove(
|
|
795
|
+
onClick: (c) => s.remove(i.field, i.row, m)
|
|
796
796
|
}, {
|
|
797
797
|
default: y(() => e[4] || (e[4] = [
|
|
798
|
-
|
|
798
|
+
U("删除")
|
|
799
799
|
])),
|
|
800
800
|
_: 2
|
|
801
801
|
}, 1032, ["onClick"])
|
|
802
802
|
]))), 256)),
|
|
803
|
-
|
|
804
|
-
|
|
803
|
+
i.addBottom ? (f(), b("div", Oe, [
|
|
804
|
+
D(r, {
|
|
805
805
|
link: "",
|
|
806
806
|
type: "primary",
|
|
807
|
-
onClick: e[2] || (e[2] = (m) => s.add(
|
|
807
|
+
onClick: e[2] || (e[2] = (m) => s.add(i.field, i.row, i.itemFields))
|
|
808
808
|
}, {
|
|
809
809
|
default: y(() => e[5] || (e[5] = [
|
|
810
|
-
|
|
810
|
+
U("添加")
|
|
811
811
|
])),
|
|
812
812
|
_: 1
|
|
813
813
|
})
|
|
814
814
|
])) : v("", !0),
|
|
815
|
-
C(t.$slots, "list-end", { row:
|
|
815
|
+
C(t.$slots, "list-end", { row: i.row })
|
|
816
816
|
])) : v("", !0);
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
819
|
}), Se = {
|
|
820
820
|
class: "row form-item-content",
|
|
821
821
|
style: { width: "100%" }
|
|
822
|
-
}, Me = { class: "col" }, Ae = { class: "col" }, Fe = ["innerHTML"], Te = /* @__PURE__ */
|
|
822
|
+
}, Me = { class: "col" }, Ae = { class: "col" }, Fe = ["innerHTML"], Te = /* @__PURE__ */ G({
|
|
823
823
|
__name: "column",
|
|
824
824
|
props: {
|
|
825
825
|
/**
|
|
@@ -835,26 +835,26 @@ const De = {
|
|
|
835
835
|
default: ""
|
|
836
836
|
}
|
|
837
837
|
},
|
|
838
|
-
setup(
|
|
839
|
-
const p = M.isFun, s = M.EDialog, l = N(), t =
|
|
838
|
+
setup(i, { expose: a }) {
|
|
839
|
+
const p = M.isFun, s = M.EDialog, l = N(), t = i, e = re({
|
|
840
840
|
rules: {},
|
|
841
841
|
show: !0,
|
|
842
842
|
form: {},
|
|
843
843
|
formDefault: {},
|
|
844
844
|
type: t.type || s.Add,
|
|
845
845
|
formColumn: [],
|
|
846
|
-
getDisabled: (
|
|
847
|
-
getBind: (
|
|
848
|
-
getOn: (
|
|
849
|
-
getColumnSpan: (
|
|
850
|
-
if (
|
|
851
|
-
const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((
|
|
852
|
-
return (
|
|
846
|
+
getDisabled: (r) => e.type === s.View ? r.disabled?.view === void 0 ? !0 : r.disabled?.view : r.disabled?.[e.type === s.Add ? "create" : "update"],
|
|
847
|
+
getBind: (r) => r.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[r.type] || r.options?.[r.type] || {},
|
|
848
|
+
getOn: (r) => r.options?.[e.type === s.Add ? "formAdd" : "formUpdate"]?.[r.type]?.on || r.options?.[r.type]?.on || {},
|
|
849
|
+
getColumnSpan: (r, d) => {
|
|
850
|
+
if (r.item.form?.spanCol) {
|
|
851
|
+
const m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2, k = d.filter((n) => !M.isFun(n.item.show?.form, e.form, e.type)).reduce((n, h) => n + (h.item.form?.span || c), 0);
|
|
852
|
+
return (r.item.form?.span || c) + k;
|
|
853
853
|
}
|
|
854
|
-
return
|
|
854
|
+
return r.item.form?.span;
|
|
855
855
|
},
|
|
856
856
|
initColumnForm: () => {
|
|
857
|
-
const
|
|
857
|
+
const r = t.option;
|
|
858
858
|
e.formColumn = [], e.rules = {}, e.formDefault = {};
|
|
859
859
|
const d = [], m = t.option.form?.maxSpan || 12, c = t.option.form?.defaultSpan || m / 2;
|
|
860
860
|
let u = [];
|
|
@@ -867,92 +867,92 @@ const De = {
|
|
|
867
867
|
}
|
|
868
868
|
if (e.formDefault[h.key] = h.value, h.isForm && (typeof h.show?.form != "boolean" || h.show?.form)) {
|
|
869
869
|
h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
|
|
870
|
-
const S = h.form.span, j = u.reduce((R,
|
|
871
|
-
if (u.push({ item: h, span: S }), (
|
|
870
|
+
const S = h.form.span, j = u.reduce((R, Y) => R + Y.span, S), T = u.length;
|
|
871
|
+
if (u.push({ item: h, span: S }), (T === 1 && u[0].span === 0 || j >= m || S === 0 && T > 1) && (d.push(u), u = []), h.rules) {
|
|
872
872
|
const R = {
|
|
873
873
|
input: w.tCurd("placeholderInput"),
|
|
874
874
|
select: w.tCurd("placeholderSelect")
|
|
875
|
-
},
|
|
875
|
+
}, Y = (R[h.type] || R.input) + h.label;
|
|
876
876
|
e.rules[h.key] = typeof h.rules == "boolean" ? [
|
|
877
877
|
{
|
|
878
878
|
required: !0,
|
|
879
|
-
message:
|
|
879
|
+
message: Y,
|
|
880
880
|
trigger: "blur"
|
|
881
881
|
}
|
|
882
882
|
] : h.rules;
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
},
|
|
886
|
-
h.isForm = S, Array.isArray(h.children) && h.children.forEach((j) =>
|
|
885
|
+
}, n = (h, S) => {
|
|
886
|
+
h.isForm = S, Array.isArray(h.children) && h.children.forEach((j) => n(j, S));
|
|
887
887
|
};
|
|
888
|
-
|
|
889
|
-
|
|
888
|
+
r.column.forEach((h) => {
|
|
889
|
+
n(h, !0), k(h);
|
|
890
890
|
}), u.length > 0 && d.push(u), e.formColumn = d, e.form = JSONUtil.cp(e.formDefault);
|
|
891
891
|
}
|
|
892
892
|
});
|
|
893
|
-
return e.initColumnForm(),
|
|
893
|
+
return e.initColumnForm(), a({
|
|
894
894
|
ref: l,
|
|
895
895
|
conf: e
|
|
896
|
-
}), (
|
|
896
|
+
}), (r, d) => (f(), g(o(W), {
|
|
897
897
|
ref_key: "ruleFormRef",
|
|
898
898
|
ref: l,
|
|
899
899
|
model: e.form,
|
|
900
900
|
rules: e.rules
|
|
901
901
|
}, {
|
|
902
902
|
default: y(() => [
|
|
903
|
-
e.show ? (f(!0), b(
|
|
904
|
-
|
|
903
|
+
e.show ? (f(!0), b($, { key: 0 }, F(e.formColumn, (m, c) => (f(), b($, { key: c }, [
|
|
904
|
+
o(p)(
|
|
905
905
|
m.map((u) => u.item?.show?.form),
|
|
906
906
|
e.form,
|
|
907
907
|
e.type
|
|
908
908
|
) ? (f(), b("div", {
|
|
909
909
|
key: 0,
|
|
910
910
|
class: I(["row curd-row", {
|
|
911
|
-
stripe:
|
|
911
|
+
stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
|
|
912
912
|
}])
|
|
913
913
|
}, [
|
|
914
|
-
C(
|
|
914
|
+
C(r.$slots, "form-start", {
|
|
915
915
|
row: e.form
|
|
916
916
|
}),
|
|
917
|
-
(f(!0), b(
|
|
917
|
+
(f(!0), b($, null, F(m, (u) => (f(), b($, {
|
|
918
918
|
key: u.item.key
|
|
919
919
|
}, [
|
|
920
|
-
|
|
920
|
+
o(p)(u.item.show?.form, e.form, e.type) ? (f(), b("div", {
|
|
921
921
|
key: 0,
|
|
922
922
|
class: I([u.item.form.span > 0 ? `col-${e.getColumnSpan(u, m)}` : "col", `form-item-col-${u.item.key}`])
|
|
923
923
|
}, [
|
|
924
|
-
|
|
924
|
+
D(o(ee), {
|
|
925
925
|
label: u.item.text?.form?.label ?? u.item.label,
|
|
926
926
|
prop: u.item.key,
|
|
927
|
-
"label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth ||
|
|
927
|
+
"label-width": u.item.text?.form?.label == "" ? 0 : u.item.form?.labelWidth || i.option.form?.labelWidth || "100px"
|
|
928
928
|
}, {
|
|
929
929
|
default: y(() => [
|
|
930
930
|
E("div", Se, [
|
|
931
|
-
C(
|
|
931
|
+
C(r.$slots, "form-" + u.item.key + "-start", {
|
|
932
932
|
row: e.form,
|
|
933
933
|
item: u.item
|
|
934
934
|
}),
|
|
935
935
|
E("div", Me, [
|
|
936
936
|
E("div", Ae, [
|
|
937
|
-
C(
|
|
937
|
+
C(r.$slots, "form-" + u.item.key, {
|
|
938
938
|
row: e.form,
|
|
939
939
|
item: u.item
|
|
940
940
|
}, () => [
|
|
941
|
-
u.item.type === "input" ? (f(), g(
|
|
941
|
+
u.item.type === "input" ? (f(), g(o(x), V({
|
|
942
942
|
key: 0,
|
|
943
943
|
modelValue: e.form[u.item.key],
|
|
944
944
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
945
945
|
ref_for: !0
|
|
946
946
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
947
947
|
disabled: e.getDisabled(u.item)
|
|
948
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (f(), g(
|
|
948
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "switch" ? (f(), g(o(Z), V({
|
|
949
949
|
key: 1,
|
|
950
950
|
modelValue: e.form[u.item.key],
|
|
951
951
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
952
952
|
ref_for: !0
|
|
953
953
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
954
954
|
disabled: e.getDisabled(u.item)
|
|
955
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (f(), g(
|
|
955
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "select" ? (f(), g(o(q), V({
|
|
956
956
|
key: 2,
|
|
957
957
|
modelValue: e.form[u.item.key],
|
|
958
958
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -962,14 +962,14 @@ const De = {
|
|
|
962
962
|
style: { width: "100%" }
|
|
963
963
|
}), {
|
|
964
964
|
default: y(() => [
|
|
965
|
-
(f(!0), b(
|
|
965
|
+
(f(!0), b($, null, F(u.item.options?.select?.data, (k) => (f(), g(o(H), {
|
|
966
966
|
key: k.value,
|
|
967
967
|
label: k.label,
|
|
968
968
|
value: k.value
|
|
969
969
|
}, null, 8, ["label", "value"]))), 128))
|
|
970
970
|
]),
|
|
971
971
|
_: 2
|
|
972
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "radio" ? (f(), g(
|
|
972
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "radio" ? (f(), g(o(le), V({
|
|
973
973
|
key: 3,
|
|
974
974
|
modelValue: e.form[u.item.key],
|
|
975
975
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -979,14 +979,14 @@ const De = {
|
|
|
979
979
|
style: { width: "100%" }
|
|
980
980
|
}), {
|
|
981
981
|
default: y(() => [
|
|
982
|
-
(f(!0), b(
|
|
982
|
+
(f(!0), b($, null, F(u.item.options?.radio?.data, (k) => (f(), g(o(ne), {
|
|
983
983
|
key: k.value,
|
|
984
984
|
label: k.label,
|
|
985
985
|
value: k.value
|
|
986
986
|
}, null, 8, ["label", "value"]))), 128))
|
|
987
987
|
]),
|
|
988
988
|
_: 2
|
|
989
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (f(), g(
|
|
989
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "list" ? (f(), g(se, V({
|
|
990
990
|
key: 4,
|
|
991
991
|
row: e.form,
|
|
992
992
|
field: u.item.key,
|
|
@@ -994,7 +994,7 @@ const De = {
|
|
|
994
994
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
995
995
|
disabled: e.getDisabled(u.item),
|
|
996
996
|
style: { width: "100%" }
|
|
997
|
-
}), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (f(), g(
|
|
997
|
+
}), null, 16, ["row", "field", "disabled"])) : u.item.type === "treeSelect" ? (f(), g(o(ue), V({
|
|
998
998
|
key: 5,
|
|
999
999
|
modelValue: e.form[u.item.key],
|
|
1000
1000
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -1002,14 +1002,14 @@ const De = {
|
|
|
1002
1002
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1003
1003
|
disabled: e.getDisabled(u.item),
|
|
1004
1004
|
style: { width: "100%" }
|
|
1005
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (f(), g(
|
|
1005
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type === "datetime" ? (f(), g(o(ie), V({
|
|
1006
1006
|
key: 6,
|
|
1007
1007
|
modelValue: e.form[u.item.key],
|
|
1008
1008
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
1009
1009
|
ref_for: !0
|
|
1010
1010
|
}, e.getBind(u.item), z(e.getOn(u.item)), {
|
|
1011
1011
|
disabled: e.getDisabled(u.item)
|
|
1012
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (
|
|
1012
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : u.item.type && (o(L).customComponent[u.item.type] || o(L).customComponent[u.item.type]?.form) ? (f(), g(Q(o(L).customComponent[u.item.type]?.form || o(L).customComponent[u.item.type]), V({
|
|
1013
1013
|
key: 7,
|
|
1014
1014
|
modelValue: e.form[u.item.key],
|
|
1015
1015
|
"onUpdate:modelValue": (k) => e.form[u.item.key] = k,
|
|
@@ -1018,12 +1018,12 @@ const De = {
|
|
|
1018
1018
|
disabled: e.getDisabled(u.item)
|
|
1019
1019
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
1020
1020
|
]),
|
|
1021
|
-
C(
|
|
1021
|
+
C(r.$slots, "form-" + u.item.key + "-right", {
|
|
1022
1022
|
row: e.form,
|
|
1023
1023
|
item: u.item
|
|
1024
1024
|
})
|
|
1025
1025
|
]),
|
|
1026
|
-
C(
|
|
1026
|
+
C(r.$slots, "form-" + u.item.key + "-tip", {
|
|
1027
1027
|
row: e.form,
|
|
1028
1028
|
item: u.item
|
|
1029
1029
|
}, () => [
|
|
@@ -1034,7 +1034,7 @@ const De = {
|
|
|
1034
1034
|
}, null, 8, Fe)) : v("", !0)
|
|
1035
1035
|
])
|
|
1036
1036
|
]),
|
|
1037
|
-
C(
|
|
1037
|
+
C(r.$slots, "form-" + u.item.key + "-end", {
|
|
1038
1038
|
row: e.form,
|
|
1039
1039
|
item: u.item
|
|
1040
1040
|
})
|
|
@@ -1044,7 +1044,7 @@ const De = {
|
|
|
1044
1044
|
}, 1032, ["label", "prop", "label-width"])
|
|
1045
1045
|
], 2)) : v("", !0)
|
|
1046
1046
|
], 64))), 128)),
|
|
1047
|
-
C(
|
|
1047
|
+
C(r.$slots, "form-end", {
|
|
1048
1048
|
row: e.form
|
|
1049
1049
|
})
|
|
1050
1050
|
], 2)) : v("", !0)
|
|
@@ -1062,20 +1062,20 @@ class Be {
|
|
|
1062
1062
|
* @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
|
|
1063
1063
|
* @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
|
|
1064
1064
|
*/
|
|
1065
|
-
static exportToExcel = async (
|
|
1066
|
-
if (!
|
|
1067
|
-
const l = await M.loadModule("xlsx"), t =
|
|
1065
|
+
static exportToExcel = async (a, p, s) => {
|
|
1066
|
+
if (!a || a.length === 0) return;
|
|
1067
|
+
const l = await M.loadModule("xlsx"), t = a.map((d) => {
|
|
1068
1068
|
const m = {};
|
|
1069
1069
|
return p.forEach((c) => {
|
|
1070
1070
|
m[c.label] = d[c.key];
|
|
1071
1071
|
}), m;
|
|
1072
|
-
}), e = l.utils.json_to_sheet(t),
|
|
1073
|
-
l.utils.book_append_sheet(
|
|
1072
|
+
}), e = l.utils.json_to_sheet(t), r = l.utils.book_new();
|
|
1073
|
+
l.utils.book_append_sheet(r, e, "Sheet1"), s ? typeof s == "function" && (s = s()) : s = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, l.writeFile(r, `${s}.xlsx`);
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
const P = M.EDialog, Le = (
|
|
1077
|
-
const
|
|
1078
|
-
option:
|
|
1076
|
+
const P = M.EDialog, Le = (i) => {
|
|
1077
|
+
const a = N(), p = N(), s = N(), l = re({
|
|
1078
|
+
option: i.option,
|
|
1079
1079
|
/** 查询区域相关配置对象 */
|
|
1080
1080
|
search: {
|
|
1081
1081
|
/** 查询表单列集合 */
|
|
@@ -1092,18 +1092,18 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1092
1092
|
/** 组装实际要搜索的数据对象 */
|
|
1093
1093
|
getFormData: () => {
|
|
1094
1094
|
let t = {};
|
|
1095
|
-
|
|
1096
|
-
(typeof
|
|
1095
|
+
i.option.column.forEach((r) => {
|
|
1096
|
+
(typeof r.show?.search == "function" ? r.show?.search(l.search.form) : r.show?.search) && (t[r.key] = l.search.form[r.key]);
|
|
1097
1097
|
});
|
|
1098
|
-
const e =
|
|
1098
|
+
const e = i.option.search?.before?.(t);
|
|
1099
1099
|
return e && (t = e), t;
|
|
1100
1100
|
},
|
|
1101
1101
|
/** 重置搜索表单 */
|
|
1102
1102
|
reset: () => {
|
|
1103
1103
|
const t = l.search.formDefault;
|
|
1104
1104
|
Object.keys(t).forEach((e) => {
|
|
1105
|
-
|
|
1106
|
-
}), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1,
|
|
1105
|
+
i.option.search?.resetMode === "none" ? t[e] = void 0 : t[e] = l.search.formDefault[e];
|
|
1106
|
+
}), l.search.form = ObjectUtil.deepMerge(t, {}), l.page.num = 1, i.option.init !== !1 && l.table.getList();
|
|
1107
1107
|
},
|
|
1108
1108
|
/** 提交搜索表单 */
|
|
1109
1109
|
submit: () => {
|
|
@@ -1117,15 +1117,15 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1117
1117
|
/** 总条数 */
|
|
1118
1118
|
total: 0,
|
|
1119
1119
|
/** 分页控件的布局方式 */
|
|
1120
|
-
layout:
|
|
1120
|
+
layout: i.option.page?.layout || A.config.pagination.layout,
|
|
1121
1121
|
/** 是否显示到工具栏 默认不显示 配置后show属性无效 */
|
|
1122
|
-
showTools:
|
|
1122
|
+
showTools: i.option.page?.showTools || A.config.pagination.showTools,
|
|
1123
1123
|
/** 当前每页条数 */
|
|
1124
|
-
size:
|
|
1124
|
+
size: i.option.page?.size || A.config.pagination.size,
|
|
1125
1125
|
/** 支持切换的每页条数选项 */
|
|
1126
|
-
sizeList:
|
|
1126
|
+
sizeList: i.option.page?.sizeList || A.config.pagination.pageSizes,
|
|
1127
1127
|
/** 分页器计数 */
|
|
1128
|
-
pagerCount:
|
|
1128
|
+
pagerCount: i.option.page?.pagerCount || A.config.pagination.pagerCount,
|
|
1129
1129
|
/** 获取分页查询参数 */
|
|
1130
1130
|
getQuery: (t = {}) => ({
|
|
1131
1131
|
[A.config.field.page.size]: t.size || l.page.size,
|
|
@@ -1138,7 +1138,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1138
1138
|
/** 操作列相关配置 */
|
|
1139
1139
|
op: {
|
|
1140
1140
|
/** 动态计算操作列宽度 */
|
|
1141
|
-
width: (...t) => t.filter((
|
|
1141
|
+
width: (...t) => t.filter((r) => r).length * 30 + 60
|
|
1142
1142
|
},
|
|
1143
1143
|
/** 表格加载中状态 */
|
|
1144
1144
|
loading: !1,
|
|
@@ -1159,10 +1159,10 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1159
1159
|
l.table.expand.rowKeys = [];
|
|
1160
1160
|
else {
|
|
1161
1161
|
const t = (e) => {
|
|
1162
|
-
let
|
|
1162
|
+
let r = [];
|
|
1163
1163
|
return e.forEach((d) => {
|
|
1164
|
-
|
|
1165
|
-
}),
|
|
1164
|
+
r.push(d[i.option.table.rowKey]), d.children && d.children.length > 0 && (r = r.concat(t(d.children)));
|
|
1165
|
+
}), r;
|
|
1166
1166
|
};
|
|
1167
1167
|
l.table.expand.rowKeys = t(l.table.data);
|
|
1168
1168
|
}
|
|
@@ -1190,8 +1190,8 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1190
1190
|
toggleExpandAll: () => {
|
|
1191
1191
|
const t = !l.table.header.group.expand;
|
|
1192
1192
|
l.table.header.group.expand = t;
|
|
1193
|
-
const e = (
|
|
1194
|
-
|
|
1193
|
+
const e = (r) => {
|
|
1194
|
+
r.forEach((d) => {
|
|
1195
1195
|
d.table?.header?.group !== void 0 && (d.table.header.group = !t), d.table?.header?.groupKey !== void 0 && (d.table.header.show = t), Array.isArray(d.children) && d.children.length > 0 && e(d.children);
|
|
1196
1196
|
});
|
|
1197
1197
|
};
|
|
@@ -1202,7 +1202,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1202
1202
|
/** 获取数据列表接口实现 */
|
|
1203
1203
|
getList: async () => {
|
|
1204
1204
|
l.table.loading = !0;
|
|
1205
|
-
const t =
|
|
1205
|
+
const t = i.option.api.list;
|
|
1206
1206
|
try {
|
|
1207
1207
|
await l.initApiData("init");
|
|
1208
1208
|
let e = {};
|
|
@@ -1213,16 +1213,16 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1213
1213
|
[S.field]: l.table.sort.order
|
|
1214
1214
|
};
|
|
1215
1215
|
}
|
|
1216
|
-
const
|
|
1216
|
+
const r = await t({
|
|
1217
1217
|
...l.page.getQuery(),
|
|
1218
1218
|
...e
|
|
1219
|
-
}), d = A.config.field.result, m =
|
|
1219
|
+
}), d = A.config.field.result, m = r.data || { [d.list]: r };
|
|
1220
1220
|
let c = (Array.isArray(m[d.list]), m[d.list]);
|
|
1221
|
-
const u = l.update.formColumn.flat(),
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1221
|
+
const u = l.update.formColumn.flat(), n = ObjectUtil.deepMerge({ data: c }, {}).data.map((h) => (Object.keys(h).forEach((j) => {
|
|
1222
|
+
const T = u.find((R) => R.item.key === j);
|
|
1223
|
+
T && ["select", "radio"].includes(T.item.type) && (T.item.table.format || (T.item.table.format = (R) => T.item.options[T.item.type].data?.find((Y) => Y.value == R[j])?.label || R[j]));
|
|
1224
1224
|
}), h));
|
|
1225
|
-
l.table.data =
|
|
1225
|
+
l.table.data = i.option.data ? await i.option.data(n, c) : n, l.page.total = m[d.total] || 0;
|
|
1226
1226
|
} catch (e) {
|
|
1227
1227
|
console.error(e);
|
|
1228
1228
|
} finally {
|
|
@@ -1240,11 +1240,11 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1240
1240
|
/** 设置表格多选数据 */
|
|
1241
1241
|
setList: (t, e) => {
|
|
1242
1242
|
l.table.selection.list = [];
|
|
1243
|
-
const
|
|
1244
|
-
if (
|
|
1245
|
-
const d =
|
|
1246
|
-
const k = (
|
|
1247
|
-
for (const h of
|
|
1243
|
+
const r = s.value;
|
|
1244
|
+
if (r?.clearSelection(), !r || !t?.length) return;
|
|
1245
|
+
const d = i.option.table?.rowKey, m = l.table.data, c = (u) => {
|
|
1246
|
+
const k = (n) => {
|
|
1247
|
+
for (const h of n) {
|
|
1248
1248
|
if (d != null && d !== "") {
|
|
1249
1249
|
if (h[d] === u[d]) return h;
|
|
1250
1250
|
} else if (h === u)
|
|
@@ -1261,12 +1261,12 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1261
1261
|
t.forEach((u) => {
|
|
1262
1262
|
const k = c(u) ?? u;
|
|
1263
1263
|
if (e) {
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1264
|
+
const n = () => {
|
|
1265
|
+
r.toggleRowSelection(k, !0, !1);
|
|
1266
1266
|
};
|
|
1267
|
-
e(u) !== !1 &&
|
|
1267
|
+
e(u) !== !1 && n();
|
|
1268
1268
|
} else
|
|
1269
|
-
|
|
1269
|
+
r.toggleRowSelection(k, !0, !1);
|
|
1270
1270
|
});
|
|
1271
1271
|
});
|
|
1272
1272
|
}
|
|
@@ -1295,22 +1295,22 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1295
1295
|
run: {
|
|
1296
1296
|
/** 执行指定方式的导出(如select、page、all) */
|
|
1297
1297
|
start: async (t) => {
|
|
1298
|
-
let e = await l.export.run[t](),
|
|
1298
|
+
let e = await l.export.run[t](), r = i.option.column;
|
|
1299
1299
|
const d = ObjectUtil.deepMerge(
|
|
1300
1300
|
{
|
|
1301
1301
|
data: e,
|
|
1302
|
-
columns:
|
|
1302
|
+
columns: r
|
|
1303
1303
|
},
|
|
1304
1304
|
{}
|
|
1305
|
-
), m =
|
|
1305
|
+
), m = i.option.tools?.export || {};
|
|
1306
1306
|
m.before && m.before(d), Be.exportToExcel(d.data, d.columns, m.fileName);
|
|
1307
1307
|
},
|
|
1308
1308
|
/** 获取当前选中项进行导出 */
|
|
1309
1309
|
select: async () => {
|
|
1310
1310
|
l.export.loading = !0;
|
|
1311
1311
|
try {
|
|
1312
|
-
if (
|
|
1313
|
-
await
|
|
1312
|
+
if (i.option.tools?.export?.select) {
|
|
1313
|
+
await i.option.tools?.export?.select({
|
|
1314
1314
|
...l.page.getQuery(),
|
|
1315
1315
|
items: l.table.selection.list
|
|
1316
1316
|
});
|
|
@@ -1329,8 +1329,8 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1329
1329
|
page: async () => {
|
|
1330
1330
|
l.export.loading = !0;
|
|
1331
1331
|
try {
|
|
1332
|
-
if (
|
|
1333
|
-
await
|
|
1332
|
+
if (i.option.tools?.export?.page) {
|
|
1333
|
+
await i.option.tools?.export?.page({
|
|
1334
1334
|
...l.page.getQuery()
|
|
1335
1335
|
});
|
|
1336
1336
|
return;
|
|
@@ -1348,13 +1348,13 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1348
1348
|
all: async () => {
|
|
1349
1349
|
l.export.loading = !0;
|
|
1350
1350
|
try {
|
|
1351
|
-
if (
|
|
1352
|
-
await
|
|
1351
|
+
if (i.option.tools?.export?.all) {
|
|
1352
|
+
await i.option.tools?.export?.all({
|
|
1353
1353
|
...l.page.getQuery()
|
|
1354
1354
|
});
|
|
1355
1355
|
return;
|
|
1356
1356
|
}
|
|
1357
|
-
const t =
|
|
1357
|
+
const t = i.option.api.list, e = await t({
|
|
1358
1358
|
...l.page.getQuery({
|
|
1359
1359
|
size: 999999,
|
|
1360
1360
|
num: 1
|
|
@@ -1396,7 +1396,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1396
1396
|
/** 表单所有列,二维数组结构按行分组 */
|
|
1397
1397
|
formColumn: [],
|
|
1398
1398
|
/** 判断是否禁用当前字段 */
|
|
1399
|
-
getDisabled: (t, e = !1) =>
|
|
1399
|
+
getDisabled: (t, e = !1) => i.option.table?.editMode && e ? t.disabled?.table === void 0 ? !1 : t.disabled?.table : l.update.type === P.View ? t.disabled?.view === void 0 ? !0 : t.disabled?.view : t.disabled?.[l.update.type === P.Add ? "create" : "update"],
|
|
1400
1400
|
/** 获取表单组件绑定属性 */
|
|
1401
1401
|
getBind: (t) => t.options?.[l.update.type === P.Add ? "formAdd" : "formUpdate"]?.[t.type] || t.options?.[t.type] || {},
|
|
1402
1402
|
/** 获取表单组件事件属性 */
|
|
@@ -1412,11 +1412,11 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1412
1412
|
/** 获取表单组件绑定属性和事件 */
|
|
1413
1413
|
getOptions: (t) => {
|
|
1414
1414
|
try {
|
|
1415
|
-
const
|
|
1416
|
-
return
|
|
1417
|
-
options:
|
|
1415
|
+
const r = l.update.formColumn.flat().find((d) => d.item.key === t)?.item;
|
|
1416
|
+
return r ? {
|
|
1417
|
+
options: r.options,
|
|
1418
1418
|
// @ts-ignore
|
|
1419
|
-
bind: l.update.getBind(
|
|
1419
|
+
bind: l.update.getBind(r)
|
|
1420
1420
|
} : { options: {}, bind: {} };
|
|
1421
1421
|
} catch {
|
|
1422
1422
|
return { options: {}, bind: {} };
|
|
@@ -1428,13 +1428,13 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1428
1428
|
data: {},
|
|
1429
1429
|
/** 返回编辑时与原值的变更数据,用于局部更新API */
|
|
1430
1430
|
getApiData: (t) => {
|
|
1431
|
-
if (
|
|
1431
|
+
if (i.option.form?.editAll)
|
|
1432
1432
|
return t;
|
|
1433
1433
|
let e = {
|
|
1434
|
-
[
|
|
1434
|
+
[i.option.table?.rowKey]: l.update.edit.data[i.option.table?.rowKey]
|
|
1435
1435
|
};
|
|
1436
|
-
return Object.keys(l.update.edit.data).forEach((
|
|
1437
|
-
t[
|
|
1436
|
+
return Object.keys(l.update.edit.data).forEach((r) => {
|
|
1437
|
+
t[r] !== l.update.edit.data[r] && (e[r] = t[r]);
|
|
1438
1438
|
}), e;
|
|
1439
1439
|
}
|
|
1440
1440
|
},
|
|
@@ -1445,10 +1445,10 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1445
1445
|
M.loading(!0);
|
|
1446
1446
|
try {
|
|
1447
1447
|
l.update.type = t;
|
|
1448
|
-
const
|
|
1449
|
-
l.update.edit.data = e, l.update.title = w.tCurd(
|
|
1450
|
-
} catch (
|
|
1451
|
-
console.error(
|
|
1448
|
+
const r = t === P.Add;
|
|
1449
|
+
l.update.edit.data = e, l.update.title = w.tCurd(r ? "add" : t === P.View ? "view" : "edit"), l.update.form = ObjectUtil.deepMerge(r ? l.update.formDefault : e, {}), await l.initApiData("update"), await i.option.form?.openBefore?.(l.update.form, l.update), (!i.option.table?.inlineEdit || r) && (l.update.show = !0, l.update.showContent = !0), i.option.form?.openAfter?.(l.update.form, l.update);
|
|
1450
|
+
} catch (r) {
|
|
1451
|
+
console.error(r);
|
|
1452
1452
|
} finally {
|
|
1453
1453
|
M.loading(!1);
|
|
1454
1454
|
}
|
|
@@ -1460,18 +1460,18 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1460
1460
|
await p.value?.validate(async (d, m) => new Promise((c, u) => {
|
|
1461
1461
|
d || (M.fail(w.tCurd("checkFormData")), u(!1)), c();
|
|
1462
1462
|
})), l.update.loading = !0;
|
|
1463
|
-
const t = l.update.type === P.Add ?
|
|
1463
|
+
const t = l.update.type === P.Add ? i.option.api.create : i.option.api.update;
|
|
1464
1464
|
try {
|
|
1465
|
-
await
|
|
1465
|
+
await i.option.form?.submitBefore?.(l.update.form, l.update);
|
|
1466
1466
|
} catch {
|
|
1467
1467
|
l.update.loading = !1;
|
|
1468
1468
|
return;
|
|
1469
1469
|
}
|
|
1470
1470
|
let e = ObjectUtil.deepMerge(l.update.form, {});
|
|
1471
1471
|
delete e.children;
|
|
1472
|
-
const
|
|
1472
|
+
const r = new Set(i.option.column.filter((d) => d.type === "datetime").map((d) => d.key));
|
|
1473
1473
|
Object.keys(e).forEach((d) => {
|
|
1474
|
-
if (
|
|
1474
|
+
if (r.has(d) && e[d] != null) {
|
|
1475
1475
|
const m = new Date(e[d]).getTime();
|
|
1476
1476
|
isNaN(m) || (e[d] = m);
|
|
1477
1477
|
}
|
|
@@ -1480,7 +1480,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1480
1480
|
if (!t) return;
|
|
1481
1481
|
await t({
|
|
1482
1482
|
...e
|
|
1483
|
-
}), l.update.close(), await l.table.getList(),
|
|
1483
|
+
}), l.update.close(), await l.table.getList(), i.option.form?.submitAfter?.(e, l.update);
|
|
1484
1484
|
} catch (d) {
|
|
1485
1485
|
console.error(d);
|
|
1486
1486
|
} finally {
|
|
@@ -1490,7 +1490,7 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1490
1490
|
},
|
|
1491
1491
|
/** 关闭弹窗和内容 */
|
|
1492
1492
|
close: () => {
|
|
1493
|
-
l.update.show = !1,
|
|
1493
|
+
l.update.show = !1, i.option.table?.inlineEdit && (l.update.form = {}), setTimeout(() => {
|
|
1494
1494
|
l.update.showContent = !1;
|
|
1495
1495
|
}, 350);
|
|
1496
1496
|
}
|
|
@@ -1521,11 +1521,11 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1521
1521
|
submit: () => {
|
|
1522
1522
|
FunUtil.throttle(async () => {
|
|
1523
1523
|
l.remove.loading = !0;
|
|
1524
|
-
const t =
|
|
1524
|
+
const t = i.option.api.delete;
|
|
1525
1525
|
try {
|
|
1526
1526
|
if (!t) return;
|
|
1527
1527
|
await t({
|
|
1528
|
-
[
|
|
1528
|
+
[i.option.table?.rowKey]: l.remove.items.map((e) => e[i.option.table?.rowKey]),
|
|
1529
1529
|
items: l.remove.items
|
|
1530
1530
|
}), M.success(w.tCurd("operationSuccess")), l.table.data.length <= 1 && l.page.num > 1 && (l.page.num -= 1), l.remove.close(), await l.table.getList();
|
|
1531
1531
|
} catch (e) {
|
|
@@ -1544,9 +1544,9 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1544
1544
|
apiDataMap: {},
|
|
1545
1545
|
/** 获取并绑定curd中所有下拉数据等远程依赖 */
|
|
1546
1546
|
initApiData: async (t) => {
|
|
1547
|
-
const e = [],
|
|
1547
|
+
const e = [], r = (d) => {
|
|
1548
1548
|
if (d.children && d.children.length) {
|
|
1549
|
-
d.children.forEach((m) =>
|
|
1549
|
+
d.children.forEach((m) => r(m));
|
|
1550
1550
|
return;
|
|
1551
1551
|
}
|
|
1552
1552
|
if (d.options?.[d.type]?.dataApi && d.options?.[d.type]?.dataApiConfig?.[t]) {
|
|
@@ -1564,17 +1564,17 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1564
1564
|
e.push(m);
|
|
1565
1565
|
}
|
|
1566
1566
|
};
|
|
1567
|
-
return
|
|
1568
|
-
|
|
1567
|
+
return i.option.column.forEach((d) => {
|
|
1568
|
+
r(d);
|
|
1569
1569
|
}), await Promise.all(e), !0;
|
|
1570
1570
|
},
|
|
1571
1571
|
/** 初始化curd配置(option默认值合并等) */
|
|
1572
1572
|
initCurdConfig: () => {
|
|
1573
1573
|
const t = ObjectUtil.deepMerge(A.config, {});
|
|
1574
|
-
t.table.emptyText = w.tCurd("noData"),
|
|
1575
|
-
const e = ObjectUtil.deepMerge(t,
|
|
1576
|
-
Object.keys(e).forEach((
|
|
1577
|
-
|
|
1574
|
+
t.table.emptyText = w.tCurd("noData"), i.option.size = i.option.size || {}, t.table.size = i.option.size.table || t.size.table, t.form.size = i.option.size.form || t.size.form, t.size.search = i.option.size.search || t.size.search;
|
|
1575
|
+
const e = ObjectUtil.deepMerge(t, i.option || {});
|
|
1576
|
+
Object.keys(e).forEach((r) => {
|
|
1577
|
+
i.option[r] = e[r];
|
|
1578
1578
|
});
|
|
1579
1579
|
},
|
|
1580
1580
|
/**
|
|
@@ -1593,35 +1593,35 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1593
1593
|
},
|
|
1594
1594
|
t.options
|
|
1595
1595
|
);
|
|
1596
|
-
const e = (
|
|
1596
|
+
const e = (r) => {
|
|
1597
1597
|
for (const d in t) {
|
|
1598
1598
|
if (d === "table") {
|
|
1599
|
-
if (
|
|
1600
|
-
|
|
1599
|
+
if (r.table = ObjectUtil.deepMerge(t.table, r.table || {}), r.children) {
|
|
1600
|
+
r.children.forEach((c) => {
|
|
1601
1601
|
e(c);
|
|
1602
1602
|
});
|
|
1603
1603
|
return;
|
|
1604
1604
|
}
|
|
1605
|
-
} else d === "type" ?
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
}),
|
|
1605
|
+
} else d === "type" ? r.type = r.type || t.type : r[d] = ObjectUtil.deepMerge(t[d], r[d] || {});
|
|
1606
|
+
r.options = r.options || {}, r.options[r.type] = r.options[r.type] || {}, r.options[r.type].size = i.option.size.form, ["search", "formAdd", "formUpdate"].forEach((c) => {
|
|
1607
|
+
r.options[c] = r.options[c] || ObjectUtil.deepMerge(r.options, {}), r.options[c][r.type] = r.options[c][r.type] || {}, r.options[c][r.type].size = c === "search" ? i.option.size.search : i.option.size.form;
|
|
1608
|
+
}), r.table = ObjectUtil.deepMerge(r.table, r.options[r.type].table || {});
|
|
1609
1609
|
}
|
|
1610
|
-
|
|
1611
|
-
const c =
|
|
1610
|
+
r.type === "switch" && (r.options.switch.tableBeforeChange = async (d, m) => {
|
|
1611
|
+
const c = r.options?.switch;
|
|
1612
1612
|
try {
|
|
1613
|
-
c.tableConfig?.confirm && await
|
|
1613
|
+
c.tableConfig?.confirm && await a.value?.open({
|
|
1614
1614
|
title: w.tCurd("confirmModify"),
|
|
1615
1615
|
content: w.tCurd("confirmSwitchMessage")
|
|
1616
1616
|
});
|
|
1617
1617
|
try {
|
|
1618
|
-
if (!
|
|
1619
|
-
const u = m[
|
|
1618
|
+
if (!i.option.api.update && !c.tableConfig?.api) return;
|
|
1619
|
+
const u = m[i.option.table?.rowKey];
|
|
1620
1620
|
c.loadingMap || (c.loadingMap = {}), c.loadingMap[u] || (c.loadingMap[u] = { loading: !1 }), c.loadingMap[u].loading = !0;
|
|
1621
|
-
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue,
|
|
1622
|
-
if (!
|
|
1621
|
+
const k = m[d] === c.activeValue ? c.inactiveValue : c.activeValue, n = c.tableConfig?.api ? c.tableConfig.api : i.option.api.update;
|
|
1622
|
+
if (!n) return;
|
|
1623
1623
|
try {
|
|
1624
|
-
await
|
|
1624
|
+
await n(
|
|
1625
1625
|
{
|
|
1626
1626
|
...m,
|
|
1627
1627
|
[d]: k
|
|
@@ -1642,112 +1642,112 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1642
1642
|
} catch {
|
|
1643
1643
|
return !1;
|
|
1644
1644
|
}
|
|
1645
|
-
}),
|
|
1645
|
+
}), r.type === "treeSelect" && (r.options.treeSelect.rowKey = i.option.table?.rowKey, r.options.treeSelect.nodeKey = i.option.table?.rowKey);
|
|
1646
1646
|
};
|
|
1647
|
-
|
|
1647
|
+
i.option.column.forEach(e), i.option.table?.column?.forEach(e);
|
|
1648
1648
|
},
|
|
1649
1649
|
getColumnSpan: (t, e) => {
|
|
1650
1650
|
if (t.item.form?.spanCol) {
|
|
1651
|
-
const
|
|
1652
|
-
return (t.item?.form.span ||
|
|
1651
|
+
const r = A.config.form.defaultSpan, m = e.filter((c) => !M.isFun(c.item.show?.form, l.update.form, l.update.type)).reduce((c, u) => c + (u.item.form?.span || r), 0);
|
|
1652
|
+
return (t.item?.form.span || r) + m;
|
|
1653
1653
|
}
|
|
1654
1654
|
return t.item.form.span;
|
|
1655
1655
|
},
|
|
1656
1656
|
/** 初始化配置并生成表单列及默认值及规则 */
|
|
1657
1657
|
initColumnForm: () => {
|
|
1658
|
-
const t =
|
|
1658
|
+
const t = i.option;
|
|
1659
1659
|
l.update.formColumn = [], l.table.column.show = {
|
|
1660
1660
|
list: [],
|
|
1661
1661
|
listSource: []
|
|
1662
1662
|
};
|
|
1663
|
-
const e = [],
|
|
1663
|
+
const e = [], r = i.option.form?.maxSpan || 12, d = i.option.form?.defaultSpan || r / 2;
|
|
1664
1664
|
let m = [];
|
|
1665
|
-
const c = (
|
|
1666
|
-
if (
|
|
1667
|
-
l.table.column.show.list.push(
|
|
1665
|
+
const c = (n) => {
|
|
1666
|
+
if (n.children) {
|
|
1667
|
+
l.table.column.show.list.push(n.key), n.children.forEach((h) => {
|
|
1668
1668
|
c(h);
|
|
1669
1669
|
});
|
|
1670
1670
|
return;
|
|
1671
1671
|
}
|
|
1672
|
-
if (l.update.formDefault[
|
|
1673
|
-
|
|
1674
|
-
let h =
|
|
1672
|
+
if (l.update.formDefault[n.key] = n.value, n.table.table && (n.show.table && l.table.column.show.list.push(n.key), n.table.table && l.table.column.show.listSource.push(n.key)), !(n.isForm && typeof n.show?.form == "boolean") || n.show?.form) {
|
|
1673
|
+
n.form = n.form || { span: d }, n.form.span = n.form.span ?? d;
|
|
1674
|
+
let h = n.form.span, S = m.reduce((T, R) => T + R.span, h);
|
|
1675
1675
|
const j = m.length;
|
|
1676
|
-
if (m.push({ item:
|
|
1677
|
-
const
|
|
1676
|
+
if (m.push({ item: n, span: h }), (j === 1 && m[0].span === 0 || S >= r || h === 0 && j > 1) && (e.push(m), m = []), n.rules) {
|
|
1677
|
+
const T = {
|
|
1678
1678
|
input: w.tCurd("placeholderInput"),
|
|
1679
1679
|
select: w.tCurd("placeholderSelect")
|
|
1680
|
-
}, R = (
|
|
1681
|
-
l.update.rules[
|
|
1680
|
+
}, R = (T[n.type] || T.input) + n.label;
|
|
1681
|
+
l.update.rules[n.key] = typeof n.rules == "boolean" ? [
|
|
1682
1682
|
{
|
|
1683
1683
|
required: !0,
|
|
1684
1684
|
message: R,
|
|
1685
1685
|
trigger: "blur"
|
|
1686
1686
|
}
|
|
1687
|
-
] :
|
|
1687
|
+
] : n.rules;
|
|
1688
1688
|
}
|
|
1689
1689
|
}
|
|
1690
|
-
}, u = (
|
|
1691
|
-
|
|
1690
|
+
}, u = (n, h) => {
|
|
1691
|
+
n.isForm = h, Array.isArray(n.children) && n.children.forEach((S) => u(S, h));
|
|
1692
1692
|
};
|
|
1693
|
-
t.column.forEach((
|
|
1694
|
-
|
|
1695
|
-
}),
|
|
1696
|
-
u(
|
|
1697
|
-
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((
|
|
1698
|
-
const k =
|
|
1699
|
-
k && Object.keys(k).forEach((
|
|
1700
|
-
l.search.formDefault[
|
|
1701
|
-
}), t.column.forEach((
|
|
1702
|
-
|
|
1693
|
+
t.column.forEach((n) => {
|
|
1694
|
+
n.isForm = !0, u(n, !0), c(n);
|
|
1695
|
+
}), i.option.table?.column?.forEach((n) => {
|
|
1696
|
+
u(n, !1), c(n);
|
|
1697
|
+
}), l.search.column.list = t.column.concat(t.table?.column || []), l.table.column.list = l.search.column.list.filter((n) => n.table?.table), l.search.column.list.sort((n, h) => n.sort?.search - h.sort?.search), l.table.column.list.sort((n, h) => n.sort?.table - h.sort?.table), m.length > 0 && e.push(m), l.update.formColumn = e;
|
|
1698
|
+
const k = i.option.search?.formDefault;
|
|
1699
|
+
k && Object.keys(k).forEach((n) => {
|
|
1700
|
+
l.search.formDefault[n] = k[n];
|
|
1701
|
+
}), t.column.forEach((n) => {
|
|
1702
|
+
n.show?.search || (l.search.formDefault[n.key] = void 0);
|
|
1703
1703
|
}), l.search.form = ObjectUtil.deepMerge(l.search.formDefault, {});
|
|
1704
1704
|
}
|
|
1705
1705
|
});
|
|
1706
1706
|
return l.init(), fe(() => {
|
|
1707
|
-
|
|
1708
|
-
}), { conf: l, switchConfirmRef:
|
|
1709
|
-
}, je = { class: "dialog-footer" }, Re = /* @__PURE__ */
|
|
1707
|
+
i.option.init !== !1 && l.table.getList();
|
|
1708
|
+
}), { conf: l, switchConfirmRef: a, ruleFormRef: p, tableRef: s };
|
|
1709
|
+
}, je = { class: "dialog-footer" }, Re = /* @__PURE__ */ G({
|
|
1710
1710
|
__name: "switchConfirm",
|
|
1711
1711
|
props: {
|
|
1712
1712
|
size: {}
|
|
1713
1713
|
},
|
|
1714
|
-
setup(
|
|
1714
|
+
setup(i, { expose: a }) {
|
|
1715
1715
|
const p = N(!1), s = N("确认修改"), l = N("确认要修改状态吗?");
|
|
1716
1716
|
let t = null, e = null;
|
|
1717
|
-
const
|
|
1717
|
+
const r = (c) => (c?.title && (s.value = c.title), c?.content && (l.value = c.content), p.value = !0, new Promise((u, k) => {
|
|
1718
1718
|
t = u, e = k;
|
|
1719
1719
|
})), d = () => {
|
|
1720
1720
|
p.value = !1, t?.(!0), t = null, e = null;
|
|
1721
1721
|
}, m = () => {
|
|
1722
1722
|
p.value = !1, e?.(new Error("用户取消操作")), t = null, e = null;
|
|
1723
1723
|
};
|
|
1724
|
-
return
|
|
1725
|
-
open:
|
|
1724
|
+
return a({
|
|
1725
|
+
open: r
|
|
1726
1726
|
}), (c, u) => {
|
|
1727
|
-
const k =
|
|
1728
|
-
return f(), g(
|
|
1727
|
+
const k = _("el-form");
|
|
1728
|
+
return f(), g(o(oe), {
|
|
1729
1729
|
modelValue: p.value,
|
|
1730
|
-
"onUpdate:modelValue": u[0] || (u[0] = (
|
|
1730
|
+
"onUpdate:modelValue": u[0] || (u[0] = (n) => p.value = n),
|
|
1731
1731
|
title: s.value,
|
|
1732
1732
|
"close-on-click-modal": !1,
|
|
1733
1733
|
width: "400px"
|
|
1734
1734
|
}, {
|
|
1735
1735
|
footer: y(() => [
|
|
1736
|
-
|
|
1736
|
+
D(k, { size: c.size }, {
|
|
1737
1737
|
default: y(() => [
|
|
1738
1738
|
E("span", je, [
|
|
1739
|
-
|
|
1739
|
+
D(o(B), { onClick: m }, {
|
|
1740
1740
|
default: y(() => u[1] || (u[1] = [
|
|
1741
|
-
|
|
1741
|
+
U("取消")
|
|
1742
1742
|
])),
|
|
1743
1743
|
_: 1
|
|
1744
1744
|
}),
|
|
1745
|
-
|
|
1745
|
+
D(o(B), {
|
|
1746
1746
|
type: "primary",
|
|
1747
1747
|
onClick: d
|
|
1748
1748
|
}, {
|
|
1749
1749
|
default: y(() => u[2] || (u[2] = [
|
|
1750
|
-
|
|
1750
|
+
U("确认")
|
|
1751
1751
|
])),
|
|
1752
1752
|
_: 1
|
|
1753
1753
|
})
|
|
@@ -1763,78 +1763,78 @@ const P = M.EDialog, Le = (n) => {
|
|
|
1763
1763
|
}, 8, ["modelValue", "title"]);
|
|
1764
1764
|
};
|
|
1765
1765
|
}
|
|
1766
|
-
}),
|
|
1767
|
-
const p =
|
|
1768
|
-
for (const [s, l] of
|
|
1766
|
+
}), X = (i, a) => {
|
|
1767
|
+
const p = i.__vccOpts || i;
|
|
1768
|
+
for (const [s, l] of a)
|
|
1769
1769
|
p[s] = l;
|
|
1770
1770
|
return p;
|
|
1771
1771
|
}, Ie = {}, Pe = {
|
|
1772
1772
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1773
1773
|
viewBox: "0 0 1024 1024"
|
|
1774
1774
|
};
|
|
1775
|
-
function Ke(
|
|
1776
|
-
return f(), b("svg", Pe,
|
|
1775
|
+
function Ke(i, a) {
|
|
1776
|
+
return f(), b("svg", Pe, a[0] || (a[0] = [
|
|
1777
1777
|
E("path", {
|
|
1778
1778
|
fill: "currentColor",
|
|
1779
1779
|
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"
|
|
1780
1780
|
}, null, -1)
|
|
1781
1781
|
]));
|
|
1782
1782
|
}
|
|
1783
|
-
const He = /* @__PURE__ */
|
|
1783
|
+
const He = /* @__PURE__ */ X(Ie, [["render", Ke]]), Ne = {}, We = {
|
|
1784
1784
|
"data-v-58697b5c": "",
|
|
1785
1785
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1786
1786
|
viewBox: "0 0 1024 1024"
|
|
1787
1787
|
};
|
|
1788
|
-
function Je(
|
|
1789
|
-
return f(), b("svg", We,
|
|
1788
|
+
function Je(i, a) {
|
|
1789
|
+
return f(), b("svg", We, a[0] || (a[0] = [
|
|
1790
1790
|
E("path", {
|
|
1791
1791
|
fill: "currentColor",
|
|
1792
1792
|
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"
|
|
1793
1793
|
}, null, -1)
|
|
1794
1794
|
]));
|
|
1795
1795
|
}
|
|
1796
|
-
const qe = /* @__PURE__ */
|
|
1796
|
+
const qe = /* @__PURE__ */ X(Ne, [["render", Je]]), Qe = {}, Ge = {
|
|
1797
1797
|
"data-v-58697b5c": "",
|
|
1798
1798
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1799
1799
|
viewBox: "0 0 1024 1024"
|
|
1800
1800
|
};
|
|
1801
|
-
function Xe(
|
|
1802
|
-
return f(), b("svg", Ge,
|
|
1801
|
+
function Xe(i, a) {
|
|
1802
|
+
return f(), b("svg", Ge, a[0] || (a[0] = [
|
|
1803
1803
|
E("path", {
|
|
1804
1804
|
fill: "currentColor",
|
|
1805
1805
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0z"
|
|
1806
1806
|
}, null, -1)
|
|
1807
1807
|
]));
|
|
1808
1808
|
}
|
|
1809
|
-
const Ye = /* @__PURE__ */
|
|
1809
|
+
const Ye = /* @__PURE__ */ X(Qe, [["render", Xe]]), Ze = {}, xe = {
|
|
1810
1810
|
"data-v-58697b5c": "",
|
|
1811
1811
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1812
1812
|
viewBox: "0 0 1024 1024"
|
|
1813
1813
|
};
|
|
1814
|
-
function _e(
|
|
1815
|
-
return f(), b("svg", xe,
|
|
1814
|
+
function _e(i, a) {
|
|
1815
|
+
return f(), b("svg", xe, a[0] || (a[0] = [
|
|
1816
1816
|
E("path", {
|
|
1817
1817
|
fill: "currentColor",
|
|
1818
1818
|
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"
|
|
1819
1819
|
}, null, -1)
|
|
1820
1820
|
]));
|
|
1821
1821
|
}
|
|
1822
|
-
const et = /* @__PURE__ */
|
|
1822
|
+
const et = /* @__PURE__ */ X(Ze, [["render", _e]]), tt = { class: "row flex-center table-header-label inline" }, ot = { class: "table-header-tooltip" }, at = ["onClick"], lt = { key: 1 }, nt = ["onClick", "innerHTML"], it = /* @__PURE__ */ G({
|
|
1823
1823
|
__name: "tableColumn",
|
|
1824
1824
|
props: {
|
|
1825
1825
|
conf: {},
|
|
1826
1826
|
columnList: {},
|
|
1827
1827
|
option: {}
|
|
1828
1828
|
},
|
|
1829
|
-
setup(
|
|
1830
|
-
const
|
|
1829
|
+
setup(i) {
|
|
1830
|
+
const a = M.isFun, p = we().type;
|
|
1831
1831
|
return (s, l) => {
|
|
1832
|
-
const t =
|
|
1833
|
-
return f(!0), b(
|
|
1832
|
+
const t = _("el-tooltip");
|
|
1833
|
+
return f(!0), b($, null, F(s.columnList, (e) => (f(), b($, {
|
|
1834
1834
|
key: e.key
|
|
1835
1835
|
}, [
|
|
1836
|
-
s.conf.table.column.show.list.includes(e.key) ? (f(), b(
|
|
1837
|
-
e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(
|
|
1836
|
+
s.conf.table.column.show.list.includes(e.key) ? (f(), b($, { key: 0 }, [
|
|
1837
|
+
e.table?.header?.groupKey === void 0 || e.table.header.show ? (f(), g(o(ae), V({
|
|
1838
1838
|
key: 0,
|
|
1839
1839
|
prop: e.key,
|
|
1840
1840
|
label: e.label,
|
|
@@ -1851,19 +1851,19 @@ const et = /* @__PURE__ */ G(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1851
1851
|
}, {
|
|
1852
1852
|
default: y(() => [
|
|
1853
1853
|
E("span", ot, [
|
|
1854
|
-
|
|
1854
|
+
D(qe)
|
|
1855
1855
|
])
|
|
1856
1856
|
]),
|
|
1857
1857
|
_: 2
|
|
1858
1858
|
}, 1032, ["content"])) : v("", !0),
|
|
1859
|
-
|
|
1859
|
+
U(" " + O(e.label) + " ", 1),
|
|
1860
1860
|
e.table?.header?.group !== void 0 ? (f(), b("span", {
|
|
1861
1861
|
key: 1,
|
|
1862
1862
|
class: "table-header-plus",
|
|
1863
1863
|
onClick: ke(
|
|
1864
1864
|
() => {
|
|
1865
|
-
e.table.header.group = !e.table.header.group, s.columnList.forEach((
|
|
1866
|
-
|
|
1865
|
+
e.table.header.group = !e.table.header.group, s.columnList.forEach((r) => {
|
|
1866
|
+
r.table?.header?.groupKey === e.key && (r.table.header.show = !e.table.header.group);
|
|
1867
1867
|
});
|
|
1868
1868
|
},
|
|
1869
1869
|
["stop"]
|
|
@@ -1874,140 +1874,140 @@ const et = /* @__PURE__ */ G(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
1874
1874
|
])
|
|
1875
1875
|
])
|
|
1876
1876
|
]),
|
|
1877
|
-
default: y(({ row:
|
|
1878
|
-
e.children ? (f(), b(
|
|
1879
|
-
l[0] || (l[0] =
|
|
1880
|
-
(f(), g(
|
|
1877
|
+
default: y(({ row: r }) => [
|
|
1878
|
+
e.children ? (f(), b($, { key: 0 }, [
|
|
1879
|
+
l[0] || (l[0] = U(" ")),
|
|
1880
|
+
(f(), g(Q(o(p)), {
|
|
1881
1881
|
conf: s.conf,
|
|
1882
1882
|
columnList: e.children,
|
|
1883
1883
|
option: s.option
|
|
1884
1884
|
}, J({ _: 2 }, [
|
|
1885
|
-
|
|
1885
|
+
F(s.$slots, (d, m) => ({
|
|
1886
1886
|
name: m,
|
|
1887
1887
|
fn: y((c) => [
|
|
1888
1888
|
C(s.$slots, m, V({ ref_for: !0 }, c || {}))
|
|
1889
1889
|
])
|
|
1890
1890
|
}))
|
|
1891
1891
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1892
|
-
], 64)) : (f(), b(
|
|
1892
|
+
], 64)) : (f(), b($, { key: 1 }, [
|
|
1893
1893
|
s.option.table?.editMode ? (f(), b("div", {
|
|
1894
1894
|
key: 0,
|
|
1895
1895
|
class: I(["row", ["table-edit-" + e.key]]),
|
|
1896
1896
|
style: { width: "100%" }
|
|
1897
1897
|
}, [
|
|
1898
1898
|
C(s.$slots, "table-edit-left-" + e.key, {
|
|
1899
|
-
row:
|
|
1899
|
+
row: r,
|
|
1900
1900
|
item: e
|
|
1901
1901
|
}),
|
|
1902
|
-
e.type === "input" ? (f(), g(
|
|
1902
|
+
e.type === "input" ? (f(), g(o(x), V({
|
|
1903
1903
|
key: 0,
|
|
1904
|
-
modelValue:
|
|
1905
|
-
"onUpdate:modelValue": (d) =>
|
|
1904
|
+
modelValue: r[e.key],
|
|
1905
|
+
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1906
1906
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1907
1907
|
class: "col",
|
|
1908
1908
|
ref_for: !0
|
|
1909
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e,
|
|
1909
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), J({ _: 2 }, [
|
|
1910
1910
|
e.options?.input?.prepend ? {
|
|
1911
1911
|
name: "prepend",
|
|
1912
1912
|
fn: y(() => [
|
|
1913
|
-
|
|
1913
|
+
U(O(typeof e.options?.input?.prepend == "function" ? e.options?.input?.prepend(r) : e.options?.input?.prepend), 1)
|
|
1914
1914
|
]),
|
|
1915
1915
|
key: "0"
|
|
1916
1916
|
} : void 0
|
|
1917
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), g(
|
|
1917
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), g(o(q), V({
|
|
1918
1918
|
key: 1,
|
|
1919
|
-
modelValue:
|
|
1920
|
-
"onUpdate:modelValue": (d) =>
|
|
1919
|
+
modelValue: r[e.key],
|
|
1920
|
+
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1921
1921
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1922
1922
|
class: "col",
|
|
1923
1923
|
ref_for: !0
|
|
1924
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e,
|
|
1924
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), {
|
|
1925
1925
|
default: y(() => [
|
|
1926
|
-
(f(!0), b(
|
|
1926
|
+
(f(!0), b($, null, F(e.options?.search?.select?.data || e.options?.select?.data, (d) => (f(), g(o(H), {
|
|
1927
1927
|
key: d.value,
|
|
1928
1928
|
label: d.label,
|
|
1929
1929
|
value: d.value
|
|
1930
1930
|
}, null, 8, ["label", "value"]))), 128))
|
|
1931
1931
|
]),
|
|
1932
1932
|
_: 2
|
|
1933
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), g(
|
|
1933
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), g(o(Z), V({
|
|
1934
1934
|
key: 2,
|
|
1935
|
-
modelValue:
|
|
1936
|
-
"onUpdate:modelValue": (d) =>
|
|
1935
|
+
modelValue: r[e.key],
|
|
1936
|
+
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1937
1937
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1938
1938
|
class: "col",
|
|
1939
1939
|
ref_for: !0
|
|
1940
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e,
|
|
1940
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r))), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0),
|
|
1941
1941
|
C(s.$slots, "table-edit-right-" + e.key, {
|
|
1942
|
-
row:
|
|
1942
|
+
row: r,
|
|
1943
1943
|
item: e
|
|
1944
1944
|
})
|
|
1945
|
-
], 2)) : (f(), b(
|
|
1946
|
-
s.conf.update.type ===
|
|
1947
|
-
e.type === "input" ? (f(), g(
|
|
1945
|
+
], 2)) : (f(), b($, { key: 1 }, [
|
|
1946
|
+
s.conf.update.type === o(M).EDialog.Update && o(a)(e.show?.form, s.conf.update.form, o(M).EDialog.Update) && s.option.table?.inlineEdit && s.conf.update.form[s.option.table?.rowKey] === r[s.option.table?.rowKey] && (e.type === "input" || e.type === "select") ? (f(), b($, { key: 0 }, [
|
|
1947
|
+
e.type === "input" ? (f(), g(o(x), V({
|
|
1948
1948
|
key: 0,
|
|
1949
1949
|
modelValue: s.conf.update.form[e.key],
|
|
1950
1950
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
1951
1951
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1952
1952
|
ref_for: !0
|
|
1953
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e,
|
|
1953
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }), J({ _: 2 }, [
|
|
1954
1954
|
e.options?.input?.prepend ? {
|
|
1955
1955
|
name: "prepend",
|
|
1956
1956
|
fn: y(() => [
|
|
1957
|
-
|
|
1957
|
+
U(O(typeof e.options?.input?.prepend == "function" ? e.options?.input?.prepend(r) : e.options?.input?.prepend), 1)
|
|
1958
1958
|
]),
|
|
1959
1959
|
key: "0"
|
|
1960
1960
|
} : void 0
|
|
1961
|
-
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), g(
|
|
1961
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "select" ? (f(), g(o(q), V({
|
|
1962
1962
|
key: 1,
|
|
1963
1963
|
modelValue: s.conf.update.form[e.key],
|
|
1964
1964
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
1965
1965
|
disabled: s.conf.update.getDisabled(e, !0),
|
|
1966
1966
|
ref_for: !0
|
|
1967
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e,
|
|
1967
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), { style: { width: "100%" } }), {
|
|
1968
1968
|
default: y(() => [
|
|
1969
|
-
(f(!0), b(
|
|
1969
|
+
(f(!0), b($, null, F(e.options?.search?.select?.data || e.options?.select?.data, (d) => (f(), g(o(H), {
|
|
1970
1970
|
key: d.value,
|
|
1971
1971
|
label: d.label,
|
|
1972
1972
|
value: d.value
|
|
1973
1973
|
}, null, 8, ["label", "value"]))), 128))
|
|
1974
1974
|
]),
|
|
1975
1975
|
_: 2
|
|
1976
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), g(
|
|
1976
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : e.type === "switch" ? (f(), g(o(Z), V({
|
|
1977
1977
|
key: 2,
|
|
1978
1978
|
modelValue: s.conf.update.form[e.key],
|
|
1979
1979
|
"onUpdate:modelValue": (d) => s.conf.update.form[e.key] = d,
|
|
1980
1980
|
ref_for: !0
|
|
1981
|
-
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e,
|
|
1981
|
+
}, s.conf.update.getBind(e), z(s.conf.update.getOn(e, r)), {
|
|
1982
1982
|
disabled: s.conf.update.getDisabled(e, !0)
|
|
1983
1983
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
1984
1984
|
], 64)) : C(s.$slots, "table-" + e.key, {
|
|
1985
1985
|
key: 1,
|
|
1986
|
-
row:
|
|
1986
|
+
row: r,
|
|
1987
1987
|
item: e
|
|
1988
1988
|
}, () => [
|
|
1989
|
-
|
|
1989
|
+
o(L).customComponent[e.type ?? ""]?.table ? (f(), g(Q(o(L).customComponent[e.type ?? ""]?.table), V({
|
|
1990
1990
|
key: 0,
|
|
1991
|
-
modelValue:
|
|
1992
|
-
"onUpdate:modelValue": (d) =>
|
|
1991
|
+
modelValue: r[e.key],
|
|
1992
|
+
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1993
1993
|
ref_for: !0
|
|
1994
|
-
}, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (f(), b(
|
|
1995
|
-
e.options?.switch?.tableConfig?.change ? (f(), g(
|
|
1994
|
+
}, e.options?.[e.type ?? ""], z(e.options?.[e.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : e.type === "switch" ? (f(), b($, { key: 1 }, [
|
|
1995
|
+
e.options?.switch?.tableConfig?.change ? (f(), g(o(Z), V({
|
|
1996
1996
|
key: 0,
|
|
1997
|
-
modelValue:
|
|
1998
|
-
"onUpdate:modelValue": (d) =>
|
|
1999
|
-
loading: e.options?.switch?.loadingMap?.[
|
|
2000
|
-
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key,
|
|
1997
|
+
modelValue: r[e.key],
|
|
1998
|
+
"onUpdate:modelValue": (d) => r[e.key] = d,
|
|
1999
|
+
loading: e.options?.switch?.loadingMap?.[r[s.option.table?.rowKey]]?.loading,
|
|
2000
|
+
"before-change": () => e.options?.switch?.tableBeforeChange?.(e.key, r),
|
|
2001
2001
|
ref_for: !0
|
|
2002
|
-
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (f(), b("span", lt, O(
|
|
2002
|
+
}, e.options?.switch), null, 16, ["modelValue", "onUpdate:modelValue", "loading", "before-change"])) : (f(), b("span", lt, O(r[e.key] === e.options?.switch?.activeValue ? e.options?.switch?.activeText : e.options?.switch?.inactiveText), 1))
|
|
2003
2003
|
], 64)) : (f(), b("span", {
|
|
2004
2004
|
key: 2,
|
|
2005
2005
|
style: pe({
|
|
2006
2006
|
"--table-text-click-color": e.table?.click?.color
|
|
2007
2007
|
}),
|
|
2008
2008
|
class: I({ "table-text-click": e.table?.click?.callback }),
|
|
2009
|
-
onClick: (d) => e.table?.click?.callback?.(
|
|
2010
|
-
innerHTML: e.table?.format ? e.table?.format(
|
|
2009
|
+
onClick: (d) => e.table?.click?.callback?.(r),
|
|
2010
|
+
innerHTML: e.table?.format ? e.table?.format(r) : r[e.key]
|
|
2011
2011
|
}, null, 14, nt))
|
|
2012
2012
|
])
|
|
2013
2013
|
], 64))
|
|
@@ -2022,129 +2022,129 @@ const et = /* @__PURE__ */ G(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2022
2022
|
}), rt = {
|
|
2023
2023
|
class: "row form-item-content",
|
|
2024
2024
|
style: { width: "100%" }
|
|
2025
|
-
}, st = { class: "col column form-item-content-item" }, dt = { class: "col" }, ut = ["innerHTML"], ft = /* @__PURE__ */
|
|
2025
|
+
}, st = { class: "col column form-item-content-item" }, dt = { class: "col" }, ut = ["innerHTML"], ft = /* @__PURE__ */ G({
|
|
2026
2026
|
__name: "formColumn",
|
|
2027
2027
|
props: {
|
|
2028
2028
|
conf: {},
|
|
2029
2029
|
item: {}
|
|
2030
2030
|
},
|
|
2031
|
-
setup(
|
|
2032
|
-
return (
|
|
2033
|
-
label:
|
|
2034
|
-
prop:
|
|
2035
|
-
"label-width":
|
|
2031
|
+
setup(i) {
|
|
2032
|
+
return (a, p) => (f(), g(o(ee), {
|
|
2033
|
+
label: a.item.item.text?.form?.label ?? a.item.item.label,
|
|
2034
|
+
prop: a.item.item.key,
|
|
2035
|
+
"label-width": a.item.item.text?.form?.label == "" ? 0 : a.item.item.form?.labelWidth || a.conf.option.form?.labelWidth
|
|
2036
2036
|
}, {
|
|
2037
2037
|
default: y(() => [
|
|
2038
2038
|
E("div", rt, [
|
|
2039
|
-
C(
|
|
2040
|
-
row:
|
|
2041
|
-
item:
|
|
2039
|
+
C(a.$slots, "form-" + a.item.item.key + "-start", {
|
|
2040
|
+
row: a.conf.update.form,
|
|
2041
|
+
item: a.item.item
|
|
2042
2042
|
}),
|
|
2043
2043
|
E("div", st, [
|
|
2044
2044
|
E("div", dt, [
|
|
2045
|
-
C(
|
|
2046
|
-
row:
|
|
2047
|
-
item:
|
|
2045
|
+
C(a.$slots, "form-" + a.item.item.key, {
|
|
2046
|
+
row: a.conf.update.form,
|
|
2047
|
+
item: a.item.item
|
|
2048
2048
|
}, () => [
|
|
2049
|
-
|
|
2049
|
+
a.item.item.type === "input" ? (f(), g(o(x), V({
|
|
2050
2050
|
key: 0,
|
|
2051
|
-
modelValue:
|
|
2052
|
-
"onUpdate:modelValue": p[0] || (p[0] = (s) =>
|
|
2053
|
-
},
|
|
2054
|
-
disabled:
|
|
2051
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2052
|
+
"onUpdate:modelValue": p[0] || (p[0] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2053
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2054
|
+
disabled: a.conf.update.getDisabled(a.item.item)
|
|
2055
2055
|
}), J({ _: 2 }, [
|
|
2056
|
-
|
|
2056
|
+
a.item.item.options?.input?.prepend ? {
|
|
2057
2057
|
name: "prepend",
|
|
2058
2058
|
fn: y(() => [
|
|
2059
|
-
|
|
2059
|
+
U(O(typeof a.item.item.options?.input?.prepend == "function" ? a.item.item.options?.input?.prepend(a.conf.update.form) : a.item.item.options?.input?.prepend), 1)
|
|
2060
2060
|
]),
|
|
2061
2061
|
key: "0"
|
|
2062
2062
|
} : void 0
|
|
2063
|
-
]), 1040, ["modelValue", "disabled"])) :
|
|
2063
|
+
]), 1040, ["modelValue", "disabled"])) : a.item.item.type === "switch" ? (f(), g(o(Z), V({
|
|
2064
2064
|
key: 1,
|
|
2065
|
-
modelValue:
|
|
2066
|
-
"onUpdate:modelValue": p[1] || (p[1] = (s) =>
|
|
2067
|
-
},
|
|
2068
|
-
disabled:
|
|
2069
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2065
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2066
|
+
"onUpdate:modelValue": p[1] || (p[1] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2067
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2068
|
+
disabled: a.conf.update.getDisabled(a.item.item)
|
|
2069
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "select" ? (f(), g(o(q), V({
|
|
2070
2070
|
key: 2,
|
|
2071
|
-
modelValue:
|
|
2072
|
-
"onUpdate:modelValue": p[2] || (p[2] = (s) =>
|
|
2073
|
-
},
|
|
2074
|
-
disabled:
|
|
2071
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2072
|
+
"onUpdate:modelValue": p[2] || (p[2] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2073
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2074
|
+
disabled: a.conf.update.getDisabled(a.item.item),
|
|
2075
2075
|
style: { width: "100%" }
|
|
2076
2076
|
}), {
|
|
2077
2077
|
default: y(() => [
|
|
2078
|
-
(f(!0), b(
|
|
2078
|
+
(f(!0), b($, null, F(a.conf.update.getBind(a.item.item).data, (s) => (f(), g(o(H), {
|
|
2079
2079
|
key: s.value,
|
|
2080
2080
|
label: s.label,
|
|
2081
2081
|
value: s.value
|
|
2082
2082
|
}, null, 8, ["label", "value"]))), 128))
|
|
2083
2083
|
]),
|
|
2084
2084
|
_: 1
|
|
2085
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
2085
|
+
}, 16, ["modelValue", "disabled"])) : a.item.item.type === "radio" ? (f(), g(o(le), V({
|
|
2086
2086
|
key: 3,
|
|
2087
|
-
modelValue:
|
|
2088
|
-
"onUpdate:modelValue": p[3] || (p[3] = (s) =>
|
|
2089
|
-
},
|
|
2090
|
-
disabled:
|
|
2087
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2088
|
+
"onUpdate:modelValue": p[3] || (p[3] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2089
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2090
|
+
disabled: a.conf.update.getDisabled(a.item.item),
|
|
2091
2091
|
style: { width: "100%" }
|
|
2092
2092
|
}), {
|
|
2093
2093
|
default: y(() => [
|
|
2094
|
-
(f(!0), b(
|
|
2094
|
+
(f(!0), b($, null, F(a.conf.update.getBind(a.item.item).data, (s) => (f(), g(o(ne), {
|
|
2095
2095
|
key: s.value,
|
|
2096
2096
|
label: s.label,
|
|
2097
2097
|
value: s.value
|
|
2098
2098
|
}, null, 8, ["label", "value"]))), 128))
|
|
2099
2099
|
]),
|
|
2100
2100
|
_: 1
|
|
2101
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
2101
|
+
}, 16, ["modelValue", "disabled"])) : a.item.item.type === "list" ? (f(), g(se, V({
|
|
2102
2102
|
key: 4,
|
|
2103
|
-
row:
|
|
2104
|
-
field:
|
|
2105
|
-
},
|
|
2106
|
-
disabled:
|
|
2103
|
+
row: a.conf.update.form,
|
|
2104
|
+
field: a.item.item.key
|
|
2105
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2106
|
+
disabled: a.conf.update.getDisabled(a.item.item),
|
|
2107
2107
|
style: { width: "100%" }
|
|
2108
|
-
}), null, 16, ["row", "field", "disabled"])) :
|
|
2108
|
+
}), null, 16, ["row", "field", "disabled"])) : a.item.item.type === "treeSelect" ? (f(), g(o(ue), V({
|
|
2109
2109
|
key: 5,
|
|
2110
|
-
modelValue:
|
|
2111
|
-
"onUpdate:modelValue": p[4] || (p[4] = (s) =>
|
|
2112
|
-
},
|
|
2113
|
-
disabled:
|
|
2110
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2111
|
+
"onUpdate:modelValue": p[4] || (p[4] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2112
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2113
|
+
disabled: a.conf.update.getDisabled(a.item.item),
|
|
2114
2114
|
style: { width: "100%" }
|
|
2115
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2115
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "datetime" ? (f(), g(o(ie), V({
|
|
2116
2116
|
key: 6,
|
|
2117
|
-
modelValue:
|
|
2118
|
-
"onUpdate:modelValue": p[5] || (p[5] = (s) =>
|
|
2119
|
-
},
|
|
2120
|
-
disabled:
|
|
2121
|
-
}), null, 16, ["modelValue", "disabled"])) :
|
|
2117
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2118
|
+
"onUpdate:modelValue": p[5] || (p[5] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2119
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2120
|
+
disabled: a.conf.update.getDisabled(a.item.item)
|
|
2121
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type && (o(L).customComponent[a.item.item.type] || o(L).customComponent[a.item.item.type]?.form) ? (f(), g(Q(o(L).customComponent[a.item.item.type]?.form || o(L).customComponent[a.item.item.type]), V({
|
|
2122
2122
|
key: 7,
|
|
2123
|
-
modelValue:
|
|
2124
|
-
"onUpdate:modelValue": p[6] || (p[6] = (s) =>
|
|
2125
|
-
},
|
|
2126
|
-
disabled:
|
|
2123
|
+
modelValue: a.conf.update.form[a.item.item.key],
|
|
2124
|
+
"onUpdate:modelValue": p[6] || (p[6] = (s) => a.conf.update.form[a.item.item.key] = s)
|
|
2125
|
+
}, a.conf.update.getBind(a.item.item), z(a.conf.update.getOn(a.item.item)), {
|
|
2126
|
+
disabled: a.conf.update.getDisabled(a.item.item)
|
|
2127
2127
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0)
|
|
2128
2128
|
]),
|
|
2129
|
-
C(
|
|
2130
|
-
row:
|
|
2131
|
-
item:
|
|
2129
|
+
C(a.$slots, "form-" + a.item.item.key + "-right", {
|
|
2130
|
+
row: a.conf.update.form,
|
|
2131
|
+
item: a.item.item
|
|
2132
2132
|
})
|
|
2133
2133
|
]),
|
|
2134
|
-
C(
|
|
2135
|
-
row:
|
|
2136
|
-
item:
|
|
2134
|
+
C(a.$slots, "form-" + a.item.item.key + "-tip", {
|
|
2135
|
+
row: a.conf.update.form,
|
|
2136
|
+
item: a.item.item
|
|
2137
2137
|
}, () => [
|
|
2138
|
-
|
|
2138
|
+
a.item.item.form?.tipText ? (f(), b("div", {
|
|
2139
2139
|
key: 0,
|
|
2140
2140
|
class: "form-tip-text",
|
|
2141
|
-
innerHTML: typeof
|
|
2141
|
+
innerHTML: typeof a.item.item.form?.tipText == "function" ? a.item.item.form?.tipText(a.conf.update.form, a.conf.update.type) : a.item.item.form?.tipText
|
|
2142
2142
|
}, null, 8, ut)) : v("", !0)
|
|
2143
2143
|
])
|
|
2144
2144
|
]),
|
|
2145
|
-
C(
|
|
2146
|
-
row:
|
|
2147
|
-
item:
|
|
2145
|
+
C(a.$slots, "form-" + a.item.item.key + "-end", {
|
|
2146
|
+
row: a.conf.update.form,
|
|
2147
|
+
item: a.item.item
|
|
2148
2148
|
})
|
|
2149
2149
|
])
|
|
2150
2150
|
]),
|
|
@@ -2155,39 +2155,39 @@ const et = /* @__PURE__ */ G(Ze, [["render", _e]]), tt = { class: "row flex-cent
|
|
|
2155
2155
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2156
2156
|
viewBox: "64 64 896 896"
|
|
2157
2157
|
};
|
|
2158
|
-
function mt(
|
|
2159
|
-
return f(), b("svg", ct,
|
|
2158
|
+
function mt(i, a) {
|
|
2159
|
+
return f(), b("svg", ct, a[0] || (a[0] = [
|
|
2160
2160
|
E("path", {
|
|
2161
2161
|
fill: "currentColor",
|
|
2162
2162
|
d: "M482.2 508.4L331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4a4.5 4.5 0 000-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4a4.52 4.52 0 000 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"
|
|
2163
2163
|
}, null, -1)
|
|
2164
2164
|
]));
|
|
2165
2165
|
}
|
|
2166
|
-
const ht = /* @__PURE__ */
|
|
2166
|
+
const ht = /* @__PURE__ */ X(pt, [["render", mt]]), gt = {}, yt = {
|
|
2167
2167
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2168
2168
|
viewBox: "64 64 896 896"
|
|
2169
2169
|
};
|
|
2170
|
-
function bt(
|
|
2171
|
-
return f(), b("svg", yt,
|
|
2170
|
+
function bt(i, a) {
|
|
2171
|
+
return f(), b("svg", yt, a[0] || (a[0] = [
|
|
2172
2172
|
E("path", {
|
|
2173
2173
|
fill: "currentColor",
|
|
2174
2174
|
d: "M180 176h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zm724 0h-60c-4.4 0-8 3.6-8 8v656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V184c0-4.4-3.6-8-8-8zM785.3 504.3L657.7 403.6a7.23 7.23 0 00-11.7 5.7V476H378v-62.8c0-6-7-9.4-11.7-5.7L238.7 508.3a7.14 7.14 0 000 11.3l127.5 100.8c4.7 3.7 11.7.4 11.7-5.7V548h268v62.8c0 6 7 9.4 11.7 5.7l127.5-100.8c3.8-2.9 3.8-8.5.2-11.4z"
|
|
2175
2175
|
}, null, -1)
|
|
2176
2176
|
]));
|
|
2177
2177
|
}
|
|
2178
|
-
const wt = /* @__PURE__ */
|
|
2178
|
+
const wt = /* @__PURE__ */ X(gt, [["render", bt]]), kt = {
|
|
2179
2179
|
key: 0,
|
|
2180
2180
|
class: "relative curd-search fit-width"
|
|
2181
2181
|
}, vt = { class: "mb-10 flex justify-between items-center fit-width" }, Ct = {
|
|
2182
2182
|
class: "flex items-center",
|
|
2183
2183
|
style: { gap: "10px" }
|
|
2184
|
-
}, Vt = { key: 0 }, zt = { key: 1 }, $t = { key: 2 },
|
|
2184
|
+
}, Vt = { key: 0 }, zt = { key: 1 }, $t = { key: 2 }, Ut = { class: "export-btn" }, Dt = {
|
|
2185
2185
|
key: 1,
|
|
2186
2186
|
class: "export-btn"
|
|
2187
2187
|
}, Et = {
|
|
2188
2188
|
class: "flex items-center table-tools-right",
|
|
2189
2189
|
style: { gap: "10px" }
|
|
2190
|
-
}, Ot = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, St = { class: "dialog-footer" }, Mt = { class: "dialog-footer" }, At = /* @__PURE__ */
|
|
2190
|
+
}, Ot = { class: "row justify-end mt-10 mb-10 table-bottom-pagination" }, St = { class: "dialog-footer" }, Mt = { class: "dialog-footer" }, At = /* @__PURE__ */ G({
|
|
2191
2191
|
__name: "index",
|
|
2192
2192
|
props: {
|
|
2193
2193
|
/**
|
|
@@ -2197,134 +2197,163 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2197
2197
|
default: {}
|
|
2198
2198
|
}
|
|
2199
2199
|
},
|
|
2200
|
-
setup(
|
|
2201
|
-
const p = M.EDialog, s =
|
|
2202
|
-
return
|
|
2200
|
+
setup(i, { expose: a }) {
|
|
2201
|
+
const p = M.EDialog, s = i, l = M.isFun, { conf: t, switchConfirmRef: e, ruleFormRef: r, tableRef: d } = Le(s);
|
|
2202
|
+
return a({
|
|
2203
2203
|
conf: t
|
|
2204
2204
|
}), (m, c) => {
|
|
2205
|
-
const u =
|
|
2205
|
+
const u = _("el-tooltip"), k = ve("loading");
|
|
2206
2206
|
return f(), b("div", {
|
|
2207
|
-
class: I(["relative cc1-form-box", [
|
|
2207
|
+
class: I(["relative cc1-form-box", [i.option.table?.fitHeight ? "col" : "no-min-height"]])
|
|
2208
2208
|
}, [
|
|
2209
2209
|
E("div", {
|
|
2210
|
-
class: I(["row", [
|
|
2210
|
+
class: I(["row", [i.option.table?.fitHeight ? "absolute fit" : ""]]),
|
|
2211
2211
|
style: { overflow: "hidden" }
|
|
2212
2212
|
}, [
|
|
2213
2213
|
C(m.$slots, "box-left"),
|
|
2214
2214
|
E("div", {
|
|
2215
|
-
class: I(["column fit-width no-wrap", [
|
|
2215
|
+
class: I(["column fit-width no-wrap", [i.option.table?.fitHeight ? "col" : ""]])
|
|
2216
2216
|
}, [
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
model:
|
|
2217
|
+
i.option.search?.show !== !1 ? (f(), b("div", kt, [
|
|
2218
|
+
D(o(W), {
|
|
2219
|
+
model: o(t).search.form,
|
|
2220
2220
|
inline: "",
|
|
2221
|
-
size:
|
|
2221
|
+
size: i.option.size?.search
|
|
2222
2222
|
}, {
|
|
2223
2223
|
default: y(() => [
|
|
2224
2224
|
C(m.$slots, "search-start", {
|
|
2225
|
-
row:
|
|
2225
|
+
row: o(t).search.form
|
|
2226
2226
|
}),
|
|
2227
|
-
(f(!0), b(
|
|
2228
|
-
key:
|
|
2227
|
+
(f(!0), b($, null, F(o(t).search.column.list, (n) => (f(), b($, {
|
|
2228
|
+
key: n.key
|
|
2229
2229
|
}, [
|
|
2230
|
-
(
|
|
2230
|
+
C(m.$slots, "search-" + n.key + "-start", {
|
|
2231
|
+
row: o(t).search.form
|
|
2232
|
+
}),
|
|
2233
|
+
(typeof n.show?.search == "function" ? n.show?.search(o(t).search.form) : n.show?.search) ? (f(), g(o(ee), {
|
|
2231
2234
|
key: 0,
|
|
2232
|
-
label:
|
|
2235
|
+
label: n.text?.search?.label ?? n.label
|
|
2233
2236
|
}, {
|
|
2234
2237
|
default: y(() => [
|
|
2235
|
-
C(m.$slots, "search-" +
|
|
2236
|
-
row:
|
|
2238
|
+
C(m.$slots, "search-" + n.key + "-left", {
|
|
2239
|
+
row: o(t).search.form
|
|
2240
|
+
}),
|
|
2241
|
+
C(m.$slots, "search-" + n.key, {
|
|
2242
|
+
row: o(t).search.form
|
|
2237
2243
|
}, () => [
|
|
2238
|
-
|
|
2244
|
+
o(L).customComponent[n.type ?? ""]?.search ? (f(), g(Q(o(L).customComponent[n.type ?? ""]?.search), V({
|
|
2239
2245
|
key: 0,
|
|
2240
|
-
modelValue:
|
|
2241
|
-
"onUpdate:modelValue": (h) =>
|
|
2242
|
-
placeholder: a(t).search.getPlaceholder(r),
|
|
2243
|
-
clearable: "",
|
|
2244
|
-
disabled: r.disabled?.search,
|
|
2246
|
+
modelValue: o(t).search.form[n.key],
|
|
2247
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2245
2248
|
ref_for: !0
|
|
2246
|
-
},
|
|
2249
|
+
}, n.options?.search?.[n.type ?? ""], z(n.options?.search?.[n.type ?? ""]?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue"])) : n.type === "input" ? (f(), g(o(x), V({
|
|
2247
2250
|
key: 1,
|
|
2248
|
-
modelValue:
|
|
2249
|
-
"onUpdate:modelValue": (h) =>
|
|
2250
|
-
placeholder:
|
|
2251
|
+
modelValue: o(t).search.form[n.key],
|
|
2252
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2253
|
+
placeholder: o(t).search.getPlaceholder(n),
|
|
2254
|
+
clearable: "",
|
|
2255
|
+
disabled: n.disabled?.search,
|
|
2256
|
+
ref_for: !0
|
|
2257
|
+
}, n.options?.search?.input || n.options?.input, z(n.options?.search?.input?.on || n.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "switch" ? (f(), g(o(q), V({
|
|
2258
|
+
key: 2,
|
|
2259
|
+
modelValue: o(t).search.form[n.key],
|
|
2260
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2261
|
+
placeholder: o(t).search.getPlaceholder(n, o(w).tCurd("placeholderSelect")),
|
|
2251
2262
|
clearable: "",
|
|
2252
|
-
disabled:
|
|
2263
|
+
disabled: n.disabled?.search,
|
|
2253
2264
|
ref_for: !0
|
|
2254
|
-
},
|
|
2265
|
+
}, n.options?.search?.switch || n.options?.switch, z(n.options?.search?.switch?.on || n.options?.switch?.on || {})), {
|
|
2255
2266
|
default: y(() => [
|
|
2256
|
-
(f(), g(
|
|
2257
|
-
key:
|
|
2258
|
-
label:
|
|
2259
|
-
value:
|
|
2267
|
+
(f(), g(o(H), {
|
|
2268
|
+
key: n.options?.switch?.activeValue,
|
|
2269
|
+
label: n.options?.switch?.activeText,
|
|
2270
|
+
value: n.options?.switch?.activeValue
|
|
2260
2271
|
}, null, 8, ["label", "value"])),
|
|
2261
|
-
(f(), g(
|
|
2262
|
-
key:
|
|
2263
|
-
label:
|
|
2264
|
-
value:
|
|
2272
|
+
(f(), g(o(H), {
|
|
2273
|
+
key: n.options?.switch?.inactiveValue,
|
|
2274
|
+
label: n.options?.switch?.inactiveText,
|
|
2275
|
+
value: n.options?.switch?.inactiveValue
|
|
2265
2276
|
}, null, 8, ["label", "value"]))
|
|
2266
2277
|
]),
|
|
2267
2278
|
_: 2
|
|
2268
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) :
|
|
2269
|
-
key:
|
|
2270
|
-
modelValue:
|
|
2271
|
-
"onUpdate:modelValue": (h) =>
|
|
2272
|
-
placeholder:
|
|
2279
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "select" ? (f(), g(o(q), V({
|
|
2280
|
+
key: 3,
|
|
2281
|
+
modelValue: o(t).search.form[n.key],
|
|
2282
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2283
|
+
placeholder: o(t).search.getPlaceholder(n, o(w).tCurd("placeholderSelect")),
|
|
2273
2284
|
clearable: "",
|
|
2274
|
-
disabled:
|
|
2285
|
+
disabled: n.disabled?.search,
|
|
2275
2286
|
ref_for: !0
|
|
2276
|
-
},
|
|
2287
|
+
}, n.options?.search?.select || n.options?.select, z(n.options?.search?.select?.on || n.options?.select?.on || {})), {
|
|
2277
2288
|
default: y(() => [
|
|
2278
|
-
(f(!0), b(
|
|
2289
|
+
(f(!0), b($, null, F(n.options?.select?.data, (h) => (f(), g(o(H), {
|
|
2279
2290
|
key: h.value,
|
|
2280
2291
|
label: h.label,
|
|
2281
2292
|
value: h.value
|
|
2282
2293
|
}, null, 8, ["label", "value"]))), 128))
|
|
2283
2294
|
]),
|
|
2284
2295
|
_: 2
|
|
2285
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) :
|
|
2286
|
-
key: 3,
|
|
2287
|
-
modelValue: a(t).search.form[r.key],
|
|
2288
|
-
"onUpdate:modelValue": (h) => a(t).search.form[r.key] = h,
|
|
2289
|
-
disabled: r.disabled?.search,
|
|
2290
|
-
ref_for: !0
|
|
2291
|
-
}, r.options?.search?.datetime || r.options?.datetime, z(r.options?.search?.datetime?.on || r.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : r.type && a(L).customComponent[r.type] ? (f(), g(_(a(L).customComponent[r.type]), V({
|
|
2296
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : n.type === "radio" ? (f(), g(o(le), V({
|
|
2292
2297
|
key: 4,
|
|
2293
|
-
modelValue:
|
|
2294
|
-
"onUpdate:modelValue": (h) =>
|
|
2298
|
+
modelValue: o(t).search.form[n.key],
|
|
2299
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2300
|
+
disabled: n.disabled?.search,
|
|
2295
2301
|
ref_for: !0
|
|
2296
|
-
},
|
|
2297
|
-
|
|
2302
|
+
}, n.options?.search?.radio || n.options?.radio, z(n.options?.search?.radio?.on || n.options?.radio?.on || {})), {
|
|
2303
|
+
default: y(() => [
|
|
2304
|
+
(f(!0), b($, null, F(n.options?.radio?.data, (h) => (f(), g(o(ne), {
|
|
2305
|
+
key: h.value,
|
|
2306
|
+
label: h.label,
|
|
2307
|
+
value: h.value
|
|
2308
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
2309
|
+
]),
|
|
2310
|
+
_: 2
|
|
2311
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type === "datetime" ? (f(), g(o(ie), V({
|
|
2312
|
+
key: 5,
|
|
2313
|
+
modelValue: o(t).search.form[n.key],
|
|
2314
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2315
|
+
disabled: n.disabled?.search,
|
|
2316
|
+
ref_for: !0
|
|
2317
|
+
}, n.options?.search?.datetime || n.options?.datetime, z(n.options?.search?.datetime?.on || n.options?.datetime?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : n.type && o(L).customComponent[n.type] ? (f(), g(Q(o(L).customComponent[n.type]), V({
|
|
2318
|
+
key: 6,
|
|
2319
|
+
modelValue: o(t).search.form[n.key],
|
|
2320
|
+
"onUpdate:modelValue": (h) => o(t).search.form[n.key] = h,
|
|
2321
|
+
ref_for: !0
|
|
2322
|
+
}, n.options?.search?.[n.type] || n.options?.[n.type], z(n.options?.search?.[n.type]?.on || n.options?.[n.type]?.on || {}), {
|
|
2323
|
+
disabled: n.disabled?.search
|
|
2298
2324
|
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : v("", !0)
|
|
2299
2325
|
]),
|
|
2300
|
-
C(m.$slots, "search-" +
|
|
2301
|
-
row:
|
|
2326
|
+
C(m.$slots, "search-" + n.key + "-right", {
|
|
2327
|
+
row: o(t).search.form
|
|
2302
2328
|
})
|
|
2303
2329
|
]),
|
|
2304
2330
|
_: 2
|
|
2305
|
-
}, 1032, ["label"])) : v("", !0)
|
|
2331
|
+
}, 1032, ["label"])) : v("", !0),
|
|
2332
|
+
C(m.$slots, "search-" + n.key + "-end", {
|
|
2333
|
+
row: o(t).search.form
|
|
2334
|
+
})
|
|
2306
2335
|
], 64))), 128)),
|
|
2307
2336
|
C(m.$slots, "search-center", {
|
|
2308
|
-
row:
|
|
2337
|
+
row: o(t).search.form
|
|
2309
2338
|
}),
|
|
2310
|
-
|
|
2339
|
+
i.option.tools?.search || i.option.tools?.reset ? (f(), g(o(ee), { key: 0 }, {
|
|
2311
2340
|
default: y(() => [
|
|
2312
|
-
|
|
2341
|
+
i.option.tools?.search ? (f(), g(o(B), {
|
|
2313
2342
|
key: 0,
|
|
2314
2343
|
type: "primary",
|
|
2315
|
-
onClick:
|
|
2344
|
+
onClick: o(t).search.submit
|
|
2316
2345
|
}, {
|
|
2317
2346
|
default: y(() => [
|
|
2318
|
-
|
|
2347
|
+
U(O(o(w).tCurd("search")), 1)
|
|
2319
2348
|
]),
|
|
2320
2349
|
_: 1
|
|
2321
2350
|
}, 8, ["onClick"])) : v("", !0),
|
|
2322
|
-
|
|
2351
|
+
i.option.tools?.reset ? (f(), g(o(B), {
|
|
2323
2352
|
key: 1,
|
|
2324
|
-
onClick:
|
|
2353
|
+
onClick: o(t).search.reset
|
|
2325
2354
|
}, {
|
|
2326
2355
|
default: y(() => [
|
|
2327
|
-
|
|
2356
|
+
U(O(o(w).tCurd("reset")), 1)
|
|
2328
2357
|
]),
|
|
2329
2358
|
_: 1
|
|
2330
2359
|
}, 8, ["onClick"])) : v("", !0)
|
|
@@ -2332,7 +2361,7 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2332
2361
|
_: 1
|
|
2333
2362
|
})) : v("", !0),
|
|
2334
2363
|
C(m.$slots, "search-end", {
|
|
2335
|
-
row:
|
|
2364
|
+
row: o(t).search.form
|
|
2336
2365
|
})
|
|
2337
2366
|
]),
|
|
2338
2367
|
_: 3
|
|
@@ -2340,76 +2369,76 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2340
2369
|
])) : v("", !0),
|
|
2341
2370
|
E("div", vt, [
|
|
2342
2371
|
E("div", Ct, [
|
|
2343
|
-
|
|
2344
|
-
|
|
2372
|
+
o(l)(i.option.tools?.add) ? (f(), b("div", Vt, [
|
|
2373
|
+
D(o(B), {
|
|
2345
2374
|
type: "primary",
|
|
2346
|
-
onClick: c[0] || (c[0] = (
|
|
2347
|
-
size:
|
|
2375
|
+
onClick: c[0] || (c[0] = (n) => o(t).update.open(o(p).Add)),
|
|
2376
|
+
size: i.option.size?.search
|
|
2348
2377
|
}, {
|
|
2349
2378
|
default: y(() => [
|
|
2350
|
-
|
|
2379
|
+
U(O(o(w).tCurd("add")), 1)
|
|
2351
2380
|
]),
|
|
2352
2381
|
_: 1
|
|
2353
2382
|
}, 8, ["size"])
|
|
2354
2383
|
])) : v("", !0),
|
|
2355
|
-
|
|
2356
|
-
|
|
2384
|
+
i.option.table?.selectable && o(l)(i.option.tools?.delete) ? (f(), b("div", zt, [
|
|
2385
|
+
D(o(B), {
|
|
2357
2386
|
type: "danger",
|
|
2358
|
-
onClick: c[1] || (c[1] = (
|
|
2359
|
-
size:
|
|
2387
|
+
onClick: c[1] || (c[1] = (n) => o(t).remove.open(o(t).table.selection.list)),
|
|
2388
|
+
size: i.option.size?.search
|
|
2360
2389
|
}, {
|
|
2361
2390
|
default: y(() => [
|
|
2362
|
-
|
|
2391
|
+
U(O(o(w).tCurd("delete")), 1)
|
|
2363
2392
|
]),
|
|
2364
2393
|
_: 1
|
|
2365
2394
|
}, 8, ["size"])
|
|
2366
2395
|
])) : v("", !0),
|
|
2367
|
-
|
|
2368
|
-
|
|
2396
|
+
i.option.tools?.expand ? (f(), b("div", $t, [
|
|
2397
|
+
D(o(B), {
|
|
2369
2398
|
type: "warning",
|
|
2370
|
-
onClick: c[2] || (c[2] = (
|
|
2371
|
-
size:
|
|
2399
|
+
onClick: c[2] || (c[2] = (n) => o(t).table.expand.all()),
|
|
2400
|
+
size: i.option.size?.search
|
|
2372
2401
|
}, {
|
|
2373
2402
|
default: y(() => [
|
|
2374
|
-
|
|
2403
|
+
U(O(o(w).tCurd("expandCollapse")), 1)
|
|
2375
2404
|
]),
|
|
2376
2405
|
_: 1
|
|
2377
2406
|
}, 8, ["size"])
|
|
2378
2407
|
])) : v("", !0),
|
|
2379
|
-
|
|
2380
|
-
|
|
2408
|
+
i.option.tools?.export?.show ? (f(), b($, { key: 3 }, [
|
|
2409
|
+
i.option.tools?.export?.dropdown?.show ? (f(), g(o(he), {
|
|
2381
2410
|
key: 0,
|
|
2382
|
-
onCommand:
|
|
2411
|
+
onCommand: o(t).export.click
|
|
2383
2412
|
}, {
|
|
2384
2413
|
dropdown: y(() => [
|
|
2385
|
-
|
|
2386
|
-
size:
|
|
2414
|
+
D(o(ge), {
|
|
2415
|
+
size: i.option.size?.search
|
|
2387
2416
|
}, {
|
|
2388
2417
|
default: y(() => [
|
|
2389
|
-
|
|
2418
|
+
i.option.tools?.export?.dropdown?.select && (i.option.table?.selectable || o(l)(i.option.tools?.delete)) ? (f(), g(o(te), {
|
|
2390
2419
|
key: 0,
|
|
2391
2420
|
command: "select"
|
|
2392
2421
|
}, {
|
|
2393
2422
|
default: y(() => [
|
|
2394
|
-
|
|
2423
|
+
U(O(o(w).tCurd("exportSelect")), 1)
|
|
2395
2424
|
]),
|
|
2396
2425
|
_: 1
|
|
2397
2426
|
})) : v("", !0),
|
|
2398
|
-
|
|
2427
|
+
i.option.tools?.export?.dropdown?.page ? (f(), g(o(te), {
|
|
2399
2428
|
key: 1,
|
|
2400
2429
|
command: "page"
|
|
2401
2430
|
}, {
|
|
2402
2431
|
default: y(() => [
|
|
2403
|
-
|
|
2432
|
+
U(O(o(w).tCurd("exportPage")), 1)
|
|
2404
2433
|
]),
|
|
2405
2434
|
_: 1
|
|
2406
2435
|
})) : v("", !0),
|
|
2407
|
-
|
|
2436
|
+
i.option.tools?.export?.dropdown?.all ? (f(), g(o(te), {
|
|
2408
2437
|
key: 2,
|
|
2409
2438
|
command: "all"
|
|
2410
2439
|
}, {
|
|
2411
2440
|
default: y(() => [
|
|
2412
|
-
|
|
2441
|
+
U(O(o(w).tCurd("exportAll")), 1)
|
|
2413
2442
|
]),
|
|
2414
2443
|
_: 1
|
|
2415
2444
|
})) : v("", !0)
|
|
@@ -2418,29 +2447,29 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2418
2447
|
}, 8, ["size"])
|
|
2419
2448
|
]),
|
|
2420
2449
|
default: y(() => [
|
|
2421
|
-
E("div",
|
|
2422
|
-
|
|
2450
|
+
E("div", Ut, [
|
|
2451
|
+
D(o(B), {
|
|
2423
2452
|
type: "warning",
|
|
2424
|
-
loading:
|
|
2425
|
-
size:
|
|
2453
|
+
loading: o(t).export.loading,
|
|
2454
|
+
size: i.option.size?.search
|
|
2426
2455
|
}, {
|
|
2427
2456
|
default: y(() => [
|
|
2428
|
-
|
|
2457
|
+
U(O(o(w).tCurd("export")), 1)
|
|
2429
2458
|
]),
|
|
2430
2459
|
_: 1
|
|
2431
2460
|
}, 8, ["loading", "size"])
|
|
2432
2461
|
])
|
|
2433
2462
|
]),
|
|
2434
2463
|
_: 1
|
|
2435
|
-
}, 8, ["onCommand"])) : (f(), b("div",
|
|
2436
|
-
|
|
2464
|
+
}, 8, ["onCommand"])) : (f(), b("div", Dt, [
|
|
2465
|
+
D(o(B), {
|
|
2437
2466
|
type: "warning",
|
|
2438
|
-
loading:
|
|
2439
|
-
size:
|
|
2440
|
-
onClick: c[3] || (c[3] = (
|
|
2467
|
+
loading: o(t).export.loading,
|
|
2468
|
+
size: i.option.size?.search,
|
|
2469
|
+
onClick: c[3] || (c[3] = (n) => o(t).export.run.start("all"))
|
|
2441
2470
|
}, {
|
|
2442
2471
|
default: y(() => [
|
|
2443
|
-
|
|
2472
|
+
U(O(o(w).tCurd("export")), 1)
|
|
2444
2473
|
]),
|
|
2445
2474
|
_: 1
|
|
2446
2475
|
}, 8, ["loading", "size"])
|
|
@@ -2450,66 +2479,66 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2450
2479
|
]),
|
|
2451
2480
|
E("div", Et, [
|
|
2452
2481
|
C(m.$slots, "tools-right"),
|
|
2453
|
-
|
|
2482
|
+
o(t).page.showTools ? (f(), g(o(de), V({
|
|
2454
2483
|
key: 0,
|
|
2455
|
-
"current-page":
|
|
2456
|
-
"onUpdate:currentPage": c[4] || (c[4] = (
|
|
2457
|
-
"page-size":
|
|
2458
|
-
"onUpdate:pageSize": c[5] || (c[5] = (
|
|
2484
|
+
"current-page": o(t).page.num,
|
|
2485
|
+
"onUpdate:currentPage": c[4] || (c[4] = (n) => o(t).page.num = n),
|
|
2486
|
+
"page-size": o(t).page.size,
|
|
2487
|
+
"onUpdate:pageSize": c[5] || (c[5] = (n) => o(t).page.size = n),
|
|
2459
2488
|
background: "",
|
|
2460
|
-
"page-sizes":
|
|
2461
|
-
"pager-count":
|
|
2462
|
-
layout:
|
|
2463
|
-
total:
|
|
2464
|
-
size:
|
|
2465
|
-
onSizeChange:
|
|
2466
|
-
onCurrentChange:
|
|
2467
|
-
},
|
|
2468
|
-
|
|
2489
|
+
"page-sizes": o(t).page.sizeList,
|
|
2490
|
+
"pager-count": o(t).page.pagerCount,
|
|
2491
|
+
layout: o(t).page.layout,
|
|
2492
|
+
total: o(t).page.total,
|
|
2493
|
+
size: i.option.size?.table,
|
|
2494
|
+
onSizeChange: o(t).table.getList,
|
|
2495
|
+
onCurrentChange: o(t).table.getList
|
|
2496
|
+
}, i.option.page?.pagination || {}, z(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0),
|
|
2497
|
+
i.option.tools?.expandColumn === void 0 || i.option.tools?.expandColumn ? (f(), g(u, {
|
|
2469
2498
|
key: 1,
|
|
2470
2499
|
effect: "dark",
|
|
2471
|
-
content:
|
|
2500
|
+
content: o(t).table.header.group.expand ? o(w).tCurd("mergeColumn") : o(w).tCurd("expandColumn"),
|
|
2472
2501
|
placement: "top"
|
|
2473
2502
|
}, {
|
|
2474
2503
|
default: y(() => [
|
|
2475
2504
|
E("div", {
|
|
2476
|
-
class: I(["refresh-btn", [
|
|
2505
|
+
class: I(["refresh-btn", [i.option.size?.search]]),
|
|
2477
2506
|
onClick: c[6] || (c[6] = //@ts-ignore
|
|
2478
|
-
(...
|
|
2507
|
+
(...n) => o(t).table.header.group.toggleExpandAll && o(t).table.header.group.toggleExpandAll(...n))
|
|
2479
2508
|
}, [
|
|
2480
|
-
|
|
2509
|
+
o(t).table.header.group.expand ? (f(), g(ht, { key: 0 })) : (f(), g(wt, { key: 1 }))
|
|
2481
2510
|
], 2)
|
|
2482
2511
|
]),
|
|
2483
2512
|
_: 1
|
|
2484
2513
|
}, 8, ["content"])) : v("", !0),
|
|
2485
|
-
|
|
2514
|
+
i.option.tools?.refresh === void 0 || i.option.tools?.refresh ? (f(), b("div", {
|
|
2486
2515
|
key: 2,
|
|
2487
|
-
class: I(["refresh-btn", [
|
|
2516
|
+
class: I(["refresh-btn", [i.option.size?.search]]),
|
|
2488
2517
|
onClick: c[7] || (c[7] = //@ts-ignore
|
|
2489
|
-
(...
|
|
2518
|
+
(...n) => o(t).table.getList && o(t).table.getList(...n))
|
|
2490
2519
|
}, [
|
|
2491
|
-
|
|
2520
|
+
D(He)
|
|
2492
2521
|
], 2)) : v("", !0)
|
|
2493
2522
|
])
|
|
2494
2523
|
]),
|
|
2495
2524
|
E("div", {
|
|
2496
|
-
class: I(["fit-width relative form-box", [
|
|
2525
|
+
class: I(["fit-width relative form-box", [i.option.table?.fitHeight ? "col " : "", i.option.table?.editMode ? "edit-mode" : ""]])
|
|
2497
2526
|
}, [
|
|
2498
2527
|
E("div", {
|
|
2499
|
-
class: I(["column form-box-content", [
|
|
2528
|
+
class: I(["column form-box-content", [i.option.table?.fitHeight ? "absolute fit" : ""]])
|
|
2500
2529
|
}, [
|
|
2501
|
-
Ce((f(), g(
|
|
2530
|
+
Ce((f(), g(o(ye), V({
|
|
2502
2531
|
ref_key: "tableRef",
|
|
2503
2532
|
ref: d,
|
|
2504
|
-
data:
|
|
2505
|
-
border:
|
|
2506
|
-
onSelectionChange:
|
|
2507
|
-
onSortChange:
|
|
2508
|
-
"expand-row-keys":
|
|
2509
|
-
onExpandChange:
|
|
2510
|
-
},
|
|
2533
|
+
data: o(t).table.data,
|
|
2534
|
+
border: i.option.table?.border === void 0 ? !0 : i.option.table?.border,
|
|
2535
|
+
onSelectionChange: o(t).table.selection.change,
|
|
2536
|
+
onSortChange: o(t).table.sort.change,
|
|
2537
|
+
"expand-row-keys": o(t).table.expand.rowKeys,
|
|
2538
|
+
onExpandChange: o(t).table.expand.change
|
|
2539
|
+
}, i.option.table, z(i.option.table?.on || {})), {
|
|
2511
2540
|
default: y(() => [
|
|
2512
|
-
(typeof
|
|
2541
|
+
(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.show : i.option.table?.selectable) || o(l)(i.option.tools?.delete) || i.option.tools?.export?.show && i.option.tools?.export?.select ? (f(), g(o(ae), V({
|
|
2513
2542
|
key: 0,
|
|
2514
2543
|
type: "selection",
|
|
2515
2544
|
width: "40",
|
|
@@ -2517,106 +2546,106 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2517
2546
|
fixed: "left",
|
|
2518
2547
|
"show-overflow-tooltip": !1,
|
|
2519
2548
|
className: "cc1-form-selectable-column"
|
|
2520
|
-
}, typeof
|
|
2521
|
-
|
|
2522
|
-
conf:
|
|
2523
|
-
columnList:
|
|
2524
|
-
option:
|
|
2549
|
+
}, typeof i.option.table?.selectable == "object" ? i.option.table?.selectable : {}, z(typeof i.option.table?.selectable == "object" ? i.option.table?.selectable?.on || {} : {})), null, 16)) : v("", !0),
|
|
2550
|
+
D(it, {
|
|
2551
|
+
conf: o(t),
|
|
2552
|
+
columnList: o(t).table.column.list,
|
|
2553
|
+
option: i.option
|
|
2525
2554
|
}, J({ _: 2 }, [
|
|
2526
|
-
|
|
2555
|
+
F(m.$slots, (n, h) => ({
|
|
2527
2556
|
name: h,
|
|
2528
2557
|
fn: y((S) => [
|
|
2529
2558
|
C(m.$slots, h, Ve(ze(S || {})))
|
|
2530
2559
|
])
|
|
2531
2560
|
}))
|
|
2532
2561
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2533
|
-
|
|
2562
|
+
o(l)(i.option.table?.add) || o(l)(i.option.table?.update) || o(l)(i.option.table?.delete) || o(l)(i.option.table?.view) || m.$slots["table-op-left"] || m.$slots["table-op-right"] ? (f(), g(o(ae), V({
|
|
2534
2563
|
key: 1,
|
|
2535
2564
|
width: "auto",
|
|
2536
2565
|
"max-width": "200",
|
|
2537
2566
|
align: "center",
|
|
2538
2567
|
fixed: "right"
|
|
2539
|
-
},
|
|
2568
|
+
}, i.option.table?.operate, { "show-overflow-tooltip": !1 }), {
|
|
2540
2569
|
header: y(() => [
|
|
2541
2570
|
C(m.$slots, "table-header-op", {}, () => [
|
|
2542
|
-
|
|
2571
|
+
U(O(o(w).tCurd("operation")), 1)
|
|
2543
2572
|
])
|
|
2544
2573
|
]),
|
|
2545
|
-
default: y(({ row:
|
|
2546
|
-
|
|
2547
|
-
size:
|
|
2574
|
+
default: y(({ row: n }) => [
|
|
2575
|
+
D(o(W), {
|
|
2576
|
+
size: i.option.size?.table
|
|
2548
2577
|
}, {
|
|
2549
2578
|
default: y(() => [
|
|
2550
|
-
C(m.$slots, "table-op-left", { row:
|
|
2551
|
-
|
|
2552
|
-
|
|
2579
|
+
C(m.$slots, "table-op-left", { row: n }),
|
|
2580
|
+
o(t).update.type === o(p).Update && i.option.table?.inlineEdit && o(t).update.form[s.option.table?.rowKey] === n[s.option.table?.rowKey] ? (f(), b($, { key: 0 }, [
|
|
2581
|
+
D(o(B), {
|
|
2553
2582
|
link: "",
|
|
2554
2583
|
type: "info",
|
|
2555
|
-
onClick:
|
|
2584
|
+
onClick: o(t).update.close
|
|
2556
2585
|
}, {
|
|
2557
2586
|
default: y(() => [
|
|
2558
|
-
|
|
2587
|
+
U(O(o(w).tCurd("cancel")), 1)
|
|
2559
2588
|
]),
|
|
2560
2589
|
_: 1
|
|
2561
2590
|
}, 8, ["onClick"]),
|
|
2562
|
-
|
|
2591
|
+
D(o(B), {
|
|
2563
2592
|
link: "",
|
|
2564
2593
|
type: "primary",
|
|
2565
|
-
onClick:
|
|
2566
|
-
loading:
|
|
2594
|
+
onClick: o(t).update.submit,
|
|
2595
|
+
loading: o(t).update.loading
|
|
2567
2596
|
}, {
|
|
2568
2597
|
default: y(() => [
|
|
2569
|
-
|
|
2598
|
+
U(O(o(w).tCurd("confirm")), 1)
|
|
2570
2599
|
]),
|
|
2571
2600
|
_: 1
|
|
2572
2601
|
}, 8, ["onClick", "loading"]),
|
|
2573
|
-
C(m.$slots, "table-op-edit-right", { row:
|
|
2574
|
-
], 64)) : (f(), b(
|
|
2575
|
-
|
|
2602
|
+
C(m.$slots, "table-op-edit-right", { row: n })
|
|
2603
|
+
], 64)) : (f(), b($, { key: 1 }, [
|
|
2604
|
+
o(l)(i.option.table?.add, n) ? (f(), g(o(B), {
|
|
2576
2605
|
key: 0,
|
|
2577
2606
|
link: "",
|
|
2578
2607
|
type: "primary",
|
|
2579
|
-
onClick: (h) =>
|
|
2608
|
+
onClick: (h) => o(t).update.open(o(p).Add, n)
|
|
2580
2609
|
}, {
|
|
2581
2610
|
default: y(() => [
|
|
2582
|
-
|
|
2611
|
+
U(O(o(w).tCurd("add")), 1)
|
|
2583
2612
|
]),
|
|
2584
2613
|
_: 2
|
|
2585
2614
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2586
|
-
|
|
2615
|
+
o(l)(i.option.table?.view, n) ? (f(), g(o(B), {
|
|
2587
2616
|
key: 1,
|
|
2588
2617
|
link: "",
|
|
2589
2618
|
type: "primary",
|
|
2590
|
-
onClick: (h) =>
|
|
2619
|
+
onClick: (h) => o(t).update.open(o(p).View, n)
|
|
2591
2620
|
}, {
|
|
2592
2621
|
default: y(() => [
|
|
2593
|
-
|
|
2622
|
+
U(O(o(w).tCurd("view")), 1)
|
|
2594
2623
|
]),
|
|
2595
2624
|
_: 2
|
|
2596
2625
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2597
|
-
|
|
2626
|
+
o(l)(i.option.table?.update, n) ? (f(), g(o(B), {
|
|
2598
2627
|
key: 2,
|
|
2599
2628
|
link: "",
|
|
2600
2629
|
type: "warning",
|
|
2601
|
-
onClick: (h) =>
|
|
2630
|
+
onClick: (h) => o(t).update.open(o(p).Update, n)
|
|
2602
2631
|
}, {
|
|
2603
2632
|
default: y(() => [
|
|
2604
|
-
|
|
2633
|
+
U(O(o(w).tCurd("edit")), 1)
|
|
2605
2634
|
]),
|
|
2606
2635
|
_: 2
|
|
2607
2636
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2608
|
-
|
|
2637
|
+
o(l)(i.option.table?.delete, n) ? (f(), g(o(B), {
|
|
2609
2638
|
key: 3,
|
|
2610
2639
|
link: "",
|
|
2611
2640
|
type: "danger",
|
|
2612
|
-
onClick: (h) =>
|
|
2641
|
+
onClick: (h) => o(t).remove.open([n])
|
|
2613
2642
|
}, {
|
|
2614
2643
|
default: y(() => [
|
|
2615
|
-
|
|
2644
|
+
U(O(o(w).tCurd("delete")), 1)
|
|
2616
2645
|
]),
|
|
2617
2646
|
_: 2
|
|
2618
2647
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2619
|
-
C(m.$slots, "table-op-right", { row:
|
|
2648
|
+
C(m.$slots, "table-op-right", { row: n })
|
|
2620
2649
|
], 64))
|
|
2621
2650
|
]),
|
|
2622
2651
|
_: 2
|
|
@@ -2627,58 +2656,58 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2627
2656
|
]),
|
|
2628
2657
|
_: 3
|
|
2629
2658
|
}, 16, ["data", "border", "onSelectionChange", "onSortChange", "expand-row-keys", "onExpandChange"])), [
|
|
2630
|
-
[k,
|
|
2659
|
+
[k, o(t).table.loading]
|
|
2631
2660
|
])
|
|
2632
2661
|
], 2)
|
|
2633
2662
|
], 2),
|
|
2634
2663
|
E("div", Ot, [
|
|
2635
|
-
(
|
|
2664
|
+
(i.option.page?.show === void 0 || i.option.page?.show) && !o(t).page.showTools ? (f(), g(o(de), V({
|
|
2636
2665
|
key: 0,
|
|
2637
|
-
"current-page":
|
|
2638
|
-
"onUpdate:currentPage": c[8] || (c[8] = (
|
|
2639
|
-
"page-size":
|
|
2640
|
-
"onUpdate:pageSize": c[9] || (c[9] = (
|
|
2666
|
+
"current-page": o(t).page.num,
|
|
2667
|
+
"onUpdate:currentPage": c[8] || (c[8] = (n) => o(t).page.num = n),
|
|
2668
|
+
"page-size": o(t).page.size,
|
|
2669
|
+
"onUpdate:pageSize": c[9] || (c[9] = (n) => o(t).page.size = n),
|
|
2641
2670
|
background: "",
|
|
2642
|
-
"page-sizes":
|
|
2643
|
-
"pager-count":
|
|
2644
|
-
layout:
|
|
2645
|
-
total:
|
|
2646
|
-
size:
|
|
2647
|
-
onSizeChange:
|
|
2648
|
-
onCurrentChange:
|
|
2649
|
-
},
|
|
2671
|
+
"page-sizes": o(t).page.sizeList,
|
|
2672
|
+
"pager-count": o(t).page.pagerCount,
|
|
2673
|
+
layout: o(t).page.layout,
|
|
2674
|
+
total: o(t).page.total,
|
|
2675
|
+
size: i.option.size?.table,
|
|
2676
|
+
onSizeChange: o(t).table.getList,
|
|
2677
|
+
onCurrentChange: o(t).table.getList
|
|
2678
|
+
}, i.option.page?.pagination || {}, z(i.option.page?.pagination?.on || {})), null, 16, ["current-page", "page-size", "page-sizes", "pager-count", "layout", "total", "size", "onSizeChange", "onCurrentChange"])) : v("", !0)
|
|
2650
2679
|
])
|
|
2651
2680
|
], 2),
|
|
2652
2681
|
C(m.$slots, "box-right")
|
|
2653
2682
|
], 2),
|
|
2654
|
-
|
|
2655
|
-
modelValue:
|
|
2656
|
-
"onUpdate:modelValue": c[10] || (c[10] = (
|
|
2657
|
-
title:
|
|
2658
|
-
"before-close":
|
|
2659
|
-
},
|
|
2683
|
+
D(o(oe), V({
|
|
2684
|
+
modelValue: o(t).update.show,
|
|
2685
|
+
"onUpdate:modelValue": c[10] || (c[10] = (n) => o(t).update.show = n),
|
|
2686
|
+
title: o(t).update.title,
|
|
2687
|
+
"before-close": o(t).update.close
|
|
2688
|
+
}, i.option.dialog), {
|
|
2660
2689
|
footer: y(() => [
|
|
2661
2690
|
E("span", St, [
|
|
2662
|
-
|
|
2663
|
-
size:
|
|
2691
|
+
D(o(W), {
|
|
2692
|
+
size: i.option.size?.form
|
|
2664
2693
|
}, {
|
|
2665
2694
|
default: y(() => [
|
|
2666
|
-
|
|
2667
|
-
onClick:
|
|
2695
|
+
D(o(B), {
|
|
2696
|
+
onClick: o(t).update.close
|
|
2668
2697
|
}, {
|
|
2669
2698
|
default: y(() => [
|
|
2670
|
-
|
|
2699
|
+
U(O(o(w).tCurd("close")), 1)
|
|
2671
2700
|
]),
|
|
2672
2701
|
_: 1
|
|
2673
2702
|
}, 8, ["onClick"]),
|
|
2674
|
-
|
|
2703
|
+
o(t).update.type !== o(p).View ? (f(), g(o(B), {
|
|
2675
2704
|
key: 0,
|
|
2676
2705
|
type: "primary",
|
|
2677
|
-
onClick:
|
|
2678
|
-
loading:
|
|
2706
|
+
onClick: o(t).update.submit,
|
|
2707
|
+
loading: o(t).update.loading
|
|
2679
2708
|
}, {
|
|
2680
2709
|
default: y(() => [
|
|
2681
|
-
|
|
2710
|
+
U(O(o(w).tCurd("submit")), 1)
|
|
2682
2711
|
]),
|
|
2683
2712
|
_: 1
|
|
2684
2713
|
}, 8, ["onClick", "loading"])) : v("", !0)
|
|
@@ -2688,55 +2717,55 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2688
2717
|
])
|
|
2689
2718
|
]),
|
|
2690
2719
|
default: y(() => [
|
|
2691
|
-
|
|
2720
|
+
D(o(W), {
|
|
2692
2721
|
ref_key: "ruleFormRef",
|
|
2693
|
-
ref:
|
|
2694
|
-
model:
|
|
2695
|
-
rules:
|
|
2696
|
-
size:
|
|
2722
|
+
ref: r,
|
|
2723
|
+
model: o(t).update.form,
|
|
2724
|
+
rules: o(t).update.rules,
|
|
2725
|
+
size: i.option.size?.form,
|
|
2697
2726
|
class: "update-dialog-form"
|
|
2698
2727
|
}, {
|
|
2699
2728
|
default: y(() => [
|
|
2700
|
-
|
|
2701
|
-
|
|
2729
|
+
o(t).update.showContent ? (f(!0), b($, { key: 0 }, F(o(t).update.formColumn, (n) => (f(), b($, null, [
|
|
2730
|
+
o(l)(
|
|
2702
2731
|
(() => {
|
|
2703
2732
|
const h = [], S = (j) => {
|
|
2704
|
-
j?.item?.children ? S(j.item.children) : h.push(...j.map((
|
|
2733
|
+
j?.item?.children ? S(j.item.children) : h.push(...j.map((T) => T.item?.show?.form));
|
|
2705
2734
|
};
|
|
2706
|
-
return S(
|
|
2735
|
+
return S(n), h;
|
|
2707
2736
|
})(),
|
|
2708
|
-
|
|
2709
|
-
|
|
2737
|
+
o(t).update.form,
|
|
2738
|
+
o(t).update.type
|
|
2710
2739
|
) ? (f(), b("div", {
|
|
2711
2740
|
key: 0,
|
|
2712
2741
|
class: I(["row curd-row", {
|
|
2713
|
-
stripe:
|
|
2742
|
+
stripe: i.option.form?.stripe === void 0 ? !0 : i.option.form?.stripe
|
|
2714
2743
|
}])
|
|
2715
2744
|
}, [
|
|
2716
2745
|
C(m.$slots, "form-start", {
|
|
2717
|
-
row:
|
|
2746
|
+
row: o(t).update.form
|
|
2718
2747
|
}),
|
|
2719
|
-
(f(!0), b(
|
|
2720
|
-
|
|
2748
|
+
(f(!0), b($, null, F(n, (h) => (f(), b($, null, [
|
|
2749
|
+
o(l)(h.item.show?.form, o(t).update.form, o(t).update.type) ? (f(), b("div", {
|
|
2721
2750
|
key: 0,
|
|
2722
|
-
class: I([h.item.form.span > 0 ? `col-${
|
|
2751
|
+
class: I([h.item.form.span > 0 ? `col-${o(t).getColumnSpan(h, n)}` : "col", `form-item-col-${h.item.key}`])
|
|
2723
2752
|
}, [
|
|
2724
|
-
(f(!0), b(
|
|
2753
|
+
(f(!0), b($, null, F(h.item.children ? h.children : [h], (S) => (f(), g(ft, {
|
|
2725
2754
|
key: S.item.key,
|
|
2726
|
-
conf:
|
|
2755
|
+
conf: o(t),
|
|
2727
2756
|
item: S
|
|
2728
2757
|
}, J({ _: 2 }, [
|
|
2729
|
-
|
|
2730
|
-
name:
|
|
2758
|
+
F(m.$slots, (j, T) => ({
|
|
2759
|
+
name: T,
|
|
2731
2760
|
fn: y((R) => [
|
|
2732
|
-
C(m.$slots,
|
|
2761
|
+
C(m.$slots, T, V({ ref_for: !0 }, R || {}))
|
|
2733
2762
|
])
|
|
2734
2763
|
}))
|
|
2735
2764
|
]), 1032, ["conf", "item"]))), 128))
|
|
2736
2765
|
], 2)) : v("", !0)
|
|
2737
2766
|
], 64))), 256)),
|
|
2738
2767
|
C(m.$slots, "form-end", {
|
|
2739
|
-
row:
|
|
2768
|
+
row: o(t).update.form
|
|
2740
2769
|
})
|
|
2741
2770
|
], 2)) : v("", !0)
|
|
2742
2771
|
], 64))), 256)) : v("", !0)
|
|
@@ -2746,33 +2775,33 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2746
2775
|
]),
|
|
2747
2776
|
_: 3
|
|
2748
2777
|
}, 16, ["modelValue", "title", "before-close"]),
|
|
2749
|
-
|
|
2750
|
-
modelValue:
|
|
2751
|
-
"onUpdate:modelValue": c[11] || (c[11] = (
|
|
2752
|
-
title:
|
|
2778
|
+
D(o(oe), {
|
|
2779
|
+
modelValue: o(t).remove.show,
|
|
2780
|
+
"onUpdate:modelValue": c[11] || (c[11] = (n) => o(t).remove.show = n),
|
|
2781
|
+
title: o(t).remove.title,
|
|
2753
2782
|
"close-on-click-modal": !1
|
|
2754
2783
|
}, {
|
|
2755
2784
|
footer: y(() => [
|
|
2756
2785
|
E("span", Mt, [
|
|
2757
|
-
|
|
2758
|
-
size:
|
|
2786
|
+
D(o(W), {
|
|
2787
|
+
size: i.option.size?.form
|
|
2759
2788
|
}, {
|
|
2760
2789
|
default: y(() => [
|
|
2761
|
-
|
|
2762
|
-
onClick:
|
|
2790
|
+
D(o(B), {
|
|
2791
|
+
onClick: o(t).remove.close
|
|
2763
2792
|
}, {
|
|
2764
2793
|
default: y(() => [
|
|
2765
|
-
|
|
2794
|
+
U(O(o(w).tCurd("close")), 1)
|
|
2766
2795
|
]),
|
|
2767
2796
|
_: 1
|
|
2768
2797
|
}, 8, ["onClick"]),
|
|
2769
|
-
|
|
2798
|
+
D(o(B), {
|
|
2770
2799
|
type: "danger",
|
|
2771
|
-
onClick:
|
|
2772
|
-
loading:
|
|
2800
|
+
onClick: o(t).remove.submit,
|
|
2801
|
+
loading: o(t).remove.loading
|
|
2773
2802
|
}, {
|
|
2774
2803
|
default: y(() => [
|
|
2775
|
-
|
|
2804
|
+
U(O(o(w).tCurd("confirmDelete")), 1)
|
|
2776
2805
|
]),
|
|
2777
2806
|
_: 1
|
|
2778
2807
|
}, 8, ["onClick", "loading"])
|
|
@@ -2782,14 +2811,14 @@ const wt = /* @__PURE__ */ G(gt, [["render", bt]]), kt = {
|
|
|
2782
2811
|
])
|
|
2783
2812
|
]),
|
|
2784
2813
|
default: y(() => [
|
|
2785
|
-
E("div", null, O(
|
|
2814
|
+
E("div", null, O(o(w).tCurd("confirmDeleteMessage", o(t).remove.items.length)), 1)
|
|
2786
2815
|
]),
|
|
2787
2816
|
_: 1
|
|
2788
2817
|
}, 8, ["modelValue", "title"]),
|
|
2789
|
-
|
|
2818
|
+
D(Re, {
|
|
2790
2819
|
ref_key: "switchConfirmRef",
|
|
2791
2820
|
ref: e,
|
|
2792
|
-
size:
|
|
2821
|
+
size: i.option.size?.form
|
|
2793
2822
|
}, null, 8, ["size"])
|
|
2794
2823
|
], 2);
|
|
2795
2824
|
};
|
|
@@ -2802,17 +2831,17 @@ class jt {
|
|
|
2802
2831
|
* @param href - 文件的远程地址
|
|
2803
2832
|
* @param name - 下载后的文件名,默认 `'download.png'`
|
|
2804
2833
|
*/
|
|
2805
|
-
static async download(
|
|
2834
|
+
static async download(a, p = "download.png") {
|
|
2806
2835
|
const s = document.createElement("a");
|
|
2807
|
-
s.style.display = "none", s.href =
|
|
2836
|
+
s.style.display = "none", s.href = a, s.setAttribute("download", p), typeof s.download > "u" && s.setAttribute("target", "_blank"), document.body.appendChild(s), s.click(), document.body.removeChild(s), window.URL.revokeObjectURL(a);
|
|
2808
2837
|
}
|
|
2809
2838
|
/**
|
|
2810
2839
|
* 将json对象或者json数组导出为json文件保存
|
|
2811
2840
|
* @param data
|
|
2812
2841
|
* @param name
|
|
2813
2842
|
*/
|
|
2814
|
-
static exportJSONFile = (
|
|
2815
|
-
const s = new Blob([JSON.stringify(
|
|
2843
|
+
static exportJSONFile = (a, p) => {
|
|
2844
|
+
const s = new Blob([JSON.stringify(a)], { type: "application/json" }), l = URL.createObjectURL(s), t = document.createElement("a");
|
|
2816
2845
|
t.href = l, t.download = `${p || "config"}.json`, t.click();
|
|
2817
2846
|
};
|
|
2818
2847
|
/**
|
|
@@ -2820,13 +2849,13 @@ class jt {
|
|
|
2820
2849
|
* @param param
|
|
2821
2850
|
* @returns
|
|
2822
2851
|
*/
|
|
2823
|
-
static importFile = async (
|
|
2852
|
+
static importFile = async (a) => new Promise((p, s) => {
|
|
2824
2853
|
const l = document.createElement("input");
|
|
2825
2854
|
l.type = "file";
|
|
2826
|
-
const t =
|
|
2855
|
+
const t = a?.accept || ".json";
|
|
2827
2856
|
l.accept = t, l.style.display = "none", l.onchange = (e) => {
|
|
2828
|
-
const
|
|
2829
|
-
if (!
|
|
2857
|
+
const r = e.target.files[0];
|
|
2858
|
+
if (!r) {
|
|
2830
2859
|
M.fail("未选择文件"), s("未选择文件");
|
|
2831
2860
|
return;
|
|
2832
2861
|
}
|
|
@@ -2836,15 +2865,15 @@ class jt {
|
|
|
2836
2865
|
p(c);
|
|
2837
2866
|
}, d.onerror = () => {
|
|
2838
2867
|
M.fail("文件读取失败"), s("文件读取失败");
|
|
2839
|
-
}, d.readAsText(
|
|
2868
|
+
}, d.readAsText(r), document.body.removeChild(l);
|
|
2840
2869
|
}, document.body.appendChild(l), l.click();
|
|
2841
2870
|
});
|
|
2842
2871
|
}
|
|
2843
|
-
const Ft = (
|
|
2844
|
-
if (
|
|
2845
|
-
L.customComponent =
|
|
2846
|
-
for (const p in
|
|
2847
|
-
|
|
2872
|
+
const Ft = (i, a) => {
|
|
2873
|
+
if (i.component("TCurd", At), i.component("TFormList", se), i.component("TColumn", Te), a?.customComponent) {
|
|
2874
|
+
L.customComponent = a.customComponent;
|
|
2875
|
+
for (const p in a.customComponent)
|
|
2876
|
+
i.component(p, a.customComponent[p]);
|
|
2848
2877
|
}
|
|
2849
2878
|
}, Rt = {
|
|
2850
2879
|
install: Ft
|
|
@@ -2858,7 +2887,7 @@ export {
|
|
|
2858
2887
|
L as TForm,
|
|
2859
2888
|
A as TFormConfig,
|
|
2860
2889
|
w as TFormI18n,
|
|
2861
|
-
|
|
2890
|
+
se as TFormList,
|
|
2862
2891
|
M as TSys,
|
|
2863
2892
|
Rt as default,
|
|
2864
2893
|
Ft as install
|