cc1-form 1.1.27 → 1.1.28
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 +409 -386
- package/dist/cc1-form.umd.cjs +1 -1
- package/dist/components/TCurd/com/form/column.vue.d.ts +10 -0
- package/dist/components/TCurd/index.d.ts +17 -4
- package/dist/components/TCurd/index.vue.d.ts +30 -0
- package/dist/components/TCurd/indexType.d.ts +10 -4
- package/dist/utils/TFormConfig.d.ts +4 -0
- package/package.json +1 -1
package/dist/cc1-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElMessage as ue, ElLoading as ce, ElForm as Q, ElFormItem as
|
|
1
|
+
import { ElMessage as ue, ElLoading as ce, ElForm as Q, ElFormItem as x, ElInput as q, ElSwitch as _, ElSelect as W, ElOption as N, ElTreeSelect as ae, ElDatePicker as ee, ElDialog as Y, ElButton as I, ElTableColumn as Z, ElDropdown as fe, ElDropdownMenu as pe, ElDropdownItem as X, ElTable as me, ElPagination as he } from "element-plus";
|
|
2
2
|
import "vue-router";
|
|
3
|
-
import { defineComponent as J, reactive as te, onMounted as ne, resolveComponent as H, createElementBlock as w, createCommentVNode as v, openBlock as p, renderSlot as k, createElementVNode as S, createVNode as V, withCtx as
|
|
4
|
-
class
|
|
3
|
+
import { defineComponent as J, reactive as te, onMounted as ne, resolveComponent as H, createElementBlock as w, createCommentVNode as v, openBlock as p, renderSlot as k, createElementVNode as S, createVNode as V, withCtx as b, createTextVNode as D, Fragment as $, renderList as M, createBlock as y, normalizeClass as P, normalizeStyle as ie, ref as B, nextTick as be, unref as o, mergeProps as C, toHandlers as F, resolveDynamicComponent as G, toDisplayString as E, getCurrentInstance as ye, createSlots as re, withKeys as ge, resolveDirective as we, withDirectives as ke, normalizeProps as ve, guardReactiveProps as Ce } from "vue";
|
|
4
|
+
class U {
|
|
5
5
|
/**
|
|
6
6
|
* Vue Router 实例,需在应用初始化时赋值
|
|
7
7
|
*/
|
|
@@ -26,13 +26,13 @@ class $ {
|
|
|
26
26
|
* @param data 数据
|
|
27
27
|
* @returns 是否显示
|
|
28
28
|
*/
|
|
29
|
-
static isFun = (a, ...
|
|
29
|
+
static isFun = (a, ...d) => Array.isArray(a) ? a.some((t) => typeof t == "function" ? t(...d) : t) : typeof a == "function" ? a(...d) : a;
|
|
30
30
|
/**
|
|
31
31
|
* 获取路由参数,自动获取query、params中的参数, 哪个有就返回哪个
|
|
32
32
|
*/
|
|
33
33
|
static getRouterParams = () => {
|
|
34
|
-
const a = this.router.currentRoute.value.query || {},
|
|
35
|
-
return Object.keys(a).length ? a : Object.keys(
|
|
34
|
+
const a = this.router.currentRoute.value.query || {}, d = this.router.currentRoute.value.params || {};
|
|
35
|
+
return Object.keys(a).length ? a : Object.keys(d).length ? d : {};
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* 模块赋值
|
|
@@ -43,10 +43,10 @@ class $ {
|
|
|
43
43
|
* @param module
|
|
44
44
|
*/
|
|
45
45
|
static loadModule = async (a) => {
|
|
46
|
-
if (
|
|
46
|
+
if (!U.moduleObj[a])
|
|
47
47
|
throw new Error(`模块${a}未加载,请赋值如:TSys.moduleObj = { ${a}: ()=>import('${a}') }`);
|
|
48
|
-
const
|
|
49
|
-
return
|
|
48
|
+
const d = await U.moduleObj[a]();
|
|
49
|
+
return d.default ?? d;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
52
|
* 提示信息对象管理
|
|
@@ -62,14 +62,14 @@ class $ {
|
|
|
62
62
|
* @param type 消息类型
|
|
63
63
|
* @param options 其他选项
|
|
64
64
|
*/
|
|
65
|
-
static showMessage(a,
|
|
65
|
+
static showMessage(a, d, t = {}) {
|
|
66
66
|
const n = Date.now();
|
|
67
67
|
if (!this.tipMessages[a] || n - this.tipMessages[a] > this.tipMessagesGap) {
|
|
68
68
|
this.tipMessages[a] = n;
|
|
69
69
|
const e = Object.assign(
|
|
70
70
|
{
|
|
71
71
|
message: a,
|
|
72
|
-
type:
|
|
72
|
+
type: d
|
|
73
73
|
},
|
|
74
74
|
t
|
|
75
75
|
);
|
|
@@ -83,16 +83,16 @@ class $ {
|
|
|
83
83
|
* @param content
|
|
84
84
|
* @param options
|
|
85
85
|
*/
|
|
86
|
-
static fail = (a,
|
|
87
|
-
this.showMessage(a, "error",
|
|
86
|
+
static fail = (a, d = {}) => {
|
|
87
|
+
this.showMessage(a, "error", d);
|
|
88
88
|
};
|
|
89
89
|
/**
|
|
90
90
|
* 成功提示
|
|
91
91
|
* @param content
|
|
92
92
|
* @param options
|
|
93
93
|
*/
|
|
94
|
-
static success = (a,
|
|
95
|
-
this.showMessage(a, "success",
|
|
94
|
+
static success = (a, d = {}) => {
|
|
95
|
+
this.showMessage(a, "success", d);
|
|
96
96
|
};
|
|
97
97
|
static loadingObj = null;
|
|
98
98
|
static loadingTimer = null;
|
|
@@ -101,11 +101,11 @@ class $ {
|
|
|
101
101
|
* @param show
|
|
102
102
|
* @param text
|
|
103
103
|
*/
|
|
104
|
-
static loading = (a = !0,
|
|
104
|
+
static loading = (a = !0, d = "Loading...") => {
|
|
105
105
|
Timer.un(this.loadingTimer), this.loadingTimer = Timer.once(() => {
|
|
106
106
|
a ? this.loadingObj = ce.service({
|
|
107
107
|
lock: !0,
|
|
108
|
-
text:
|
|
108
|
+
text: d,
|
|
109
109
|
background: "rgba(0, 0, 0, 0.3)"
|
|
110
110
|
}) : this.loadingObj && (this.loadingObj.close(), this.loadingObj = null);
|
|
111
111
|
}, 50);
|
|
@@ -115,8 +115,8 @@ class $ {
|
|
|
115
115
|
* @param url 地址
|
|
116
116
|
* @param isCenter 是否居中
|
|
117
117
|
*/
|
|
118
|
-
static openUrl = (a,
|
|
119
|
-
if (
|
|
118
|
+
static openUrl = (a, d = !0) => {
|
|
119
|
+
if (d) {
|
|
120
120
|
let t = screen.width / 2 - 500, n = screen.height / 2 - 800 / 2 - 30;
|
|
121
121
|
window.open(
|
|
122
122
|
a,
|
|
@@ -124,20 +124,16 @@ class $ {
|
|
|
124
124
|
"toolbar=no, location=yes, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=no, copyhistory=no, width=1000, height=800, top=" + n + ", left=" + t
|
|
125
125
|
);
|
|
126
126
|
} else
|
|
127
|
-
window.open(
|
|
128
|
-
a,
|
|
129
|
-
"DescriptiveWindowName" + StrUtil.getId(),
|
|
130
|
-
"resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0"
|
|
131
|
-
);
|
|
127
|
+
window.open(a, "DescriptiveWindowName" + StrUtil.getId(), "resizable,scrollbars=yes,status=1,width=1024, height=600, top=0, left=0");
|
|
132
128
|
};
|
|
133
129
|
/**
|
|
134
130
|
* 根据dom id截图并返回图片数据
|
|
135
131
|
* @param param
|
|
136
132
|
* @returns
|
|
137
133
|
*/
|
|
138
|
-
static getImgPic = (a) => new Promise(async (
|
|
134
|
+
static getImgPic = (a) => new Promise(async (d, t) => {
|
|
139
135
|
let n = document.getElementById(a.id);
|
|
140
|
-
const e = await
|
|
136
|
+
const e = await U.loadModule("html2canvas");
|
|
141
137
|
try {
|
|
142
138
|
e(n, {
|
|
143
139
|
logging: !1,
|
|
@@ -151,7 +147,7 @@ class $ {
|
|
|
151
147
|
backgroundColor: "#ffffff00"
|
|
152
148
|
}).then(function(l) {
|
|
153
149
|
let u = l.toDataURL("image/png");
|
|
154
|
-
|
|
150
|
+
d(u);
|
|
155
151
|
});
|
|
156
152
|
} catch (l) {
|
|
157
153
|
t(l);
|
|
@@ -353,7 +349,11 @@ class O {
|
|
|
353
349
|
/**
|
|
354
350
|
* 宽度
|
|
355
351
|
*/
|
|
356
|
-
width: "100%"
|
|
352
|
+
width: "100%",
|
|
353
|
+
/**
|
|
354
|
+
* 是否补充其他列空间 默认为false
|
|
355
|
+
*/
|
|
356
|
+
spanCol: !1
|
|
357
357
|
},
|
|
358
358
|
table: {
|
|
359
359
|
/**
|
|
@@ -465,7 +465,7 @@ class O {
|
|
|
465
465
|
O.config = ObjectUtil.deepMerge(O.config, a);
|
|
466
466
|
};
|
|
467
467
|
}
|
|
468
|
-
class
|
|
468
|
+
class z {
|
|
469
469
|
/**
|
|
470
470
|
* 自定义组件映射表,key 为组件名(同时作为 column.type 值),value 为 Vue 组件定义
|
|
471
471
|
*
|
|
@@ -482,8 +482,8 @@ class T {
|
|
|
482
482
|
* @param field - 字段的 key 值
|
|
483
483
|
* @returns 该字段对应类型的 options 配置,如 select 类型返回 `options.select`
|
|
484
484
|
*/
|
|
485
|
-
static findOptions = (a,
|
|
486
|
-
const t = a.column.find((e) => e.key ===
|
|
485
|
+
static findOptions = (a, d) => {
|
|
486
|
+
const t = a.column.find((e) => e.key === d), n = (e) => e.replace(/-([a-z])/g, (l, u) => u.toUpperCase());
|
|
487
487
|
if (t)
|
|
488
488
|
return t.options[n(t.type)];
|
|
489
489
|
};
|
|
@@ -503,8 +503,8 @@ class T {
|
|
|
503
503
|
}))
|
|
504
504
|
)
|
|
505
505
|
*/
|
|
506
|
-
static setOptionsData = (a,
|
|
507
|
-
const n =
|
|
506
|
+
static setOptionsData = (a, d, t) => {
|
|
507
|
+
const n = z.findOptions(a, d);
|
|
508
508
|
n && (n.data = t);
|
|
509
509
|
};
|
|
510
510
|
static form = {
|
|
@@ -516,9 +516,9 @@ class T {
|
|
|
516
516
|
* @param treeData 树形数据
|
|
517
517
|
* @param option 组件配置
|
|
518
518
|
*/
|
|
519
|
-
parentId: (a,
|
|
519
|
+
parentId: (a, d, t, n) => {
|
|
520
520
|
const e = O.config.table.rowKey;
|
|
521
|
-
a ?
|
|
521
|
+
a ? d.type === U.EDialog.Insert ? (d.form.parentId = a[e], d.form.sort = a.children.length + 1) : d.form.parentId = a.parentId.substring(a.parentId.lastIndexOf(",") + 1) : (d.form.parentId = "0", d.form.sort = t.length + 1), z.setOptionsData(n, "parentId", [{ [e]: "0", title: "根", children: t }]);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
};
|
|
@@ -533,10 +533,10 @@ class R {
|
|
|
533
533
|
* @param field 字段名
|
|
534
534
|
* @param row 行数据
|
|
535
535
|
*/
|
|
536
|
-
static setId = (a,
|
|
537
|
-
|
|
536
|
+
static setId = (a, d, t) => {
|
|
537
|
+
d[a] || (d[a] = []);
|
|
538
538
|
const n = O.config.table.rowKey;
|
|
539
|
-
|
|
539
|
+
d[a].forEach((e) => {
|
|
540
540
|
t.forEach((l) => {
|
|
541
541
|
let u = l.default ?? "";
|
|
542
542
|
l.type === "number" && (u = l.default ?? 0), l.type === "boolean" && (u = l.default ?? !1), l.type === "time" && (u = l.default ?? /* @__PURE__ */ new Date()), e[l.value] === void 0 && (e[l.value] = u);
|
|
@@ -550,11 +550,11 @@ class R {
|
|
|
550
550
|
* @param itemFields 元素字段-如:[{label:'',value:''}]
|
|
551
551
|
* @param callback 回调函数
|
|
552
552
|
*/
|
|
553
|
-
static add = (a,
|
|
553
|
+
static add = (a, d, t, n) => {
|
|
554
554
|
const e = JSONUtil.cp(t);
|
|
555
|
-
R.setId(a,
|
|
555
|
+
R.setId(a, d, t);
|
|
556
556
|
const l = O.config.table.rowKey;
|
|
557
|
-
|
|
557
|
+
d[a].push(
|
|
558
558
|
e.reduce(
|
|
559
559
|
(u, f) => {
|
|
560
560
|
let m = f.default ?? "";
|
|
@@ -562,7 +562,7 @@ class R {
|
|
|
562
562
|
},
|
|
563
563
|
{ [l]: R.getIdFun() }
|
|
564
564
|
)
|
|
565
|
-
), n?.(
|
|
565
|
+
), n?.(d);
|
|
566
566
|
};
|
|
567
567
|
/**
|
|
568
568
|
* 删除数组元素
|
|
@@ -571,9 +571,9 @@ class R {
|
|
|
571
571
|
* @param item 元素-如:{_id:''}
|
|
572
572
|
* @param callback 回调函数
|
|
573
573
|
*/
|
|
574
|
-
static remove = (a,
|
|
574
|
+
static remove = (a, d, t, n) => {
|
|
575
575
|
const e = O.config.table.rowKey;
|
|
576
|
-
|
|
576
|
+
d[a] = d[a].filter((l) => l[e] !== t[e]), n?.(d);
|
|
577
577
|
};
|
|
578
578
|
/**
|
|
579
579
|
* 获取没有id的数据
|
|
@@ -581,10 +581,10 @@ class R {
|
|
|
581
581
|
* @param childernField 子级字段-如:list、children
|
|
582
582
|
* @returns 没有id的数据
|
|
583
583
|
*/
|
|
584
|
-
static getNoIdData = (a,
|
|
584
|
+
static getNoIdData = (a, d) => {
|
|
585
585
|
const t = JSONUtil.cp(a), n = O.config.table.rowKey;
|
|
586
586
|
return t.forEach((e) => {
|
|
587
|
-
e[n] && delete e[n],
|
|
587
|
+
e[n] && delete e[n], d && e[d] && R.getNoIdData(e[d], d);
|
|
588
588
|
}), t;
|
|
589
589
|
};
|
|
590
590
|
}
|
|
@@ -631,7 +631,7 @@ const Ve = {
|
|
|
631
631
|
},
|
|
632
632
|
emits: ["change"],
|
|
633
633
|
setup(r, { emit: a }) {
|
|
634
|
-
const
|
|
634
|
+
const d = r, t = te({
|
|
635
635
|
show: !1,
|
|
636
636
|
add: (e, l, u) => {
|
|
637
637
|
R.add(e, l, u, () => {
|
|
@@ -645,7 +645,7 @@ const Ve = {
|
|
|
645
645
|
}
|
|
646
646
|
});
|
|
647
647
|
ne(() => {
|
|
648
|
-
R.setId(
|
|
648
|
+
R.setId(d.field, d.row, d.itemFields), t.show = !0;
|
|
649
649
|
});
|
|
650
650
|
const n = a;
|
|
651
651
|
return (e, l) => {
|
|
@@ -658,18 +658,18 @@ const Ve = {
|
|
|
658
658
|
type: "primary",
|
|
659
659
|
onClick: l[0] || (l[0] = (m) => t.add(r.field, r.row, r.itemFields))
|
|
660
660
|
}, {
|
|
661
|
-
default:
|
|
662
|
-
|
|
661
|
+
default: b(() => l[2] || (l[2] = [
|
|
662
|
+
D("添加")
|
|
663
663
|
])),
|
|
664
664
|
_: 1
|
|
665
665
|
})
|
|
666
666
|
]),
|
|
667
|
-
(p(!0), w(
|
|
667
|
+
(p(!0), w($, null, M(r.row[r.field], (m) => (p(), w("div", Ee, [
|
|
668
668
|
k(e.$slots, "item-start", {
|
|
669
669
|
item: m,
|
|
670
670
|
row: r.row
|
|
671
671
|
}),
|
|
672
|
-
(p(!0), w(
|
|
672
|
+
(p(!0), w($, null, M(r.itemFields, (c) => (p(), y(f, {
|
|
673
673
|
modelValue: m[c.value],
|
|
674
674
|
"onUpdate:modelValue": (i) => m[c.value] = i,
|
|
675
675
|
style: ie({ width: r.inputWidth }),
|
|
@@ -686,8 +686,8 @@ const Ve = {
|
|
|
686
686
|
type: "danger",
|
|
687
687
|
onClick: (c) => t.remove(r.field, r.row, m)
|
|
688
688
|
}, {
|
|
689
|
-
default:
|
|
690
|
-
|
|
689
|
+
default: b(() => l[3] || (l[3] = [
|
|
690
|
+
D("删除")
|
|
691
691
|
])),
|
|
692
692
|
_: 2
|
|
693
693
|
}, 1032, ["onClick"])
|
|
@@ -696,7 +696,7 @@ const Ve = {
|
|
|
696
696
|
])) : v("", !0);
|
|
697
697
|
};
|
|
698
698
|
}
|
|
699
|
-
}), De = { class: "row curd-row" },
|
|
699
|
+
}), De = { class: "row curd-row" }, Se = /* @__PURE__ */ J({
|
|
700
700
|
__name: "column",
|
|
701
701
|
props: {
|
|
702
702
|
/**
|
|
@@ -713,7 +713,7 @@ const Ve = {
|
|
|
713
713
|
}
|
|
714
714
|
},
|
|
715
715
|
setup(r, { expose: a }) {
|
|
716
|
-
const
|
|
716
|
+
const d = U.isFun, t = U.EDialog, n = B(), e = r, l = te({
|
|
717
717
|
rules: {},
|
|
718
718
|
show: !0,
|
|
719
719
|
form: {},
|
|
@@ -725,16 +725,16 @@ const Ve = {
|
|
|
725
725
|
l.formColumn = [];
|
|
726
726
|
const f = [], m = e.option.form?.maxSpan || 12, c = e.option.form?.defaultSpan || m;
|
|
727
727
|
let i = [];
|
|
728
|
-
const
|
|
729
|
-
if (l.formDefault[
|
|
730
|
-
|
|
731
|
-
let j =
|
|
732
|
-
const
|
|
733
|
-
i.push({ item:
|
|
728
|
+
const s = (h) => {
|
|
729
|
+
if (l.formDefault[h.key] = h.value, h.isForm) {
|
|
730
|
+
h.form = h.form || { span: c }, h.form.span = h.form.span ?? c;
|
|
731
|
+
let j = h.form.span, L = i.reduce((A, de) => A + de.span, j);
|
|
732
|
+
const T = i.length;
|
|
733
|
+
i.push({ item: h, span: j }), (T === 1 && i[0].span === 0 || L >= m || j === 0 && T > 1) && (f.push(i), i = []), h.rules && (l.rules[h.key] = h.rules);
|
|
734
734
|
}
|
|
735
735
|
};
|
|
736
|
-
u.column.forEach((
|
|
737
|
-
|
|
736
|
+
u.column.forEach((h) => {
|
|
737
|
+
h.isForm = !0, s(h);
|
|
738
738
|
}), i.length > 0 && f.push(i), l.formColumn = f, l.form = JSONUtil.cp(l.formDefault);
|
|
739
739
|
},
|
|
740
740
|
init: async () => {
|
|
@@ -744,28 +744,28 @@ const Ve = {
|
|
|
744
744
|
return l.initColumnForm(), a({
|
|
745
745
|
ref: n,
|
|
746
746
|
conf: l
|
|
747
|
-
}), (u, f) => (p(),
|
|
747
|
+
}), (u, f) => (p(), y(o(Q), {
|
|
748
748
|
ref_key: "ruleFormRef",
|
|
749
749
|
ref: n,
|
|
750
750
|
model: l.form,
|
|
751
751
|
rules: l.rules
|
|
752
752
|
}, {
|
|
753
|
-
default:
|
|
754
|
-
l.show ? (p(!0), w(
|
|
753
|
+
default: b(() => [
|
|
754
|
+
l.show ? (p(!0), w($, { key: 0 }, M(l.formColumn, (m) => (p(), w("div", De, [
|
|
755
755
|
k(u.$slots, "form-start", {
|
|
756
756
|
row: l.form
|
|
757
757
|
}),
|
|
758
|
-
(p(!0), w(
|
|
759
|
-
o(
|
|
758
|
+
(p(!0), w($, null, M(m, (c) => (p(), w($, null, [
|
|
759
|
+
o(d)(c.item.show?.form, l.form) ?? !0 ? (p(), w("div", {
|
|
760
760
|
key: 0,
|
|
761
761
|
class: P(c.item.form.span > 0 ? `col-${c.item.form.span}` : "col")
|
|
762
762
|
}, [
|
|
763
|
-
V(o(
|
|
763
|
+
V(o(x), {
|
|
764
764
|
label: c.item.label,
|
|
765
765
|
prop: c.item.key,
|
|
766
766
|
"label-width": c.item.form?.labelWidth || "100px"
|
|
767
767
|
}, {
|
|
768
|
-
default:
|
|
768
|
+
default: b(() => [
|
|
769
769
|
k(u.$slots, "form-" + c.item.key + "-start", {
|
|
770
770
|
row: l.form,
|
|
771
771
|
item: c.item
|
|
@@ -774,21 +774,21 @@ const Ve = {
|
|
|
774
774
|
row: l.form,
|
|
775
775
|
item: c.item
|
|
776
776
|
}, () => [
|
|
777
|
-
c.item.type === "input" ? (p(),
|
|
777
|
+
c.item.type === "input" ? (p(), y(o(q), C({
|
|
778
778
|
key: 0,
|
|
779
779
|
modelValue: l.form[c.item.key],
|
|
780
780
|
"onUpdate:modelValue": (i) => l.form[c.item.key] = i,
|
|
781
781
|
ref_for: !0
|
|
782
782
|
}, c.item.options?.input, F(c.item.options?.input?.on || {}), {
|
|
783
783
|
disabled: l.getDisabled(c.item)
|
|
784
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "switch" ? (p(),
|
|
784
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "switch" ? (p(), y(o(_), C({
|
|
785
785
|
key: 1,
|
|
786
786
|
modelValue: l.form[c.item.key],
|
|
787
787
|
"onUpdate:modelValue": (i) => l.form[c.item.key] = i,
|
|
788
788
|
ref_for: !0
|
|
789
789
|
}, c.item.options?.switch, F(c.item.options?.switch?.on || {}), {
|
|
790
790
|
disabled: l.getDisabled(c.item)
|
|
791
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "select" ? (p(),
|
|
791
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "select" ? (p(), y(o(W), C({
|
|
792
792
|
key: 2,
|
|
793
793
|
modelValue: l.form[c.item.key],
|
|
794
794
|
"onUpdate:modelValue": (i) => l.form[c.item.key] = i,
|
|
@@ -797,15 +797,15 @@ const Ve = {
|
|
|
797
797
|
disabled: l.getDisabled(c.item),
|
|
798
798
|
style: { width: "100%" }
|
|
799
799
|
}), {
|
|
800
|
-
default:
|
|
801
|
-
(p(!0), w(
|
|
800
|
+
default: b(() => [
|
|
801
|
+
(p(!0), w($, null, M(c.item.options?.select?.data, (i) => (p(), y(o(N), {
|
|
802
802
|
key: i.value,
|
|
803
803
|
label: i.label,
|
|
804
804
|
value: i.value
|
|
805
805
|
}, null, 8, ["label", "value"]))), 128))
|
|
806
806
|
]),
|
|
807
807
|
_: 2
|
|
808
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "list" ? (p(),
|
|
808
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "list" ? (p(), y(oe, C({
|
|
809
809
|
key: 3,
|
|
810
810
|
row: l.form,
|
|
811
811
|
field: c.item.key,
|
|
@@ -813,7 +813,7 @@ const Ve = {
|
|
|
813
813
|
}, c.item.options?.list, F(c.item.options?.list?.on || {}), {
|
|
814
814
|
disabled: l.getDisabled(c.item),
|
|
815
815
|
style: { width: "100%" }
|
|
816
|
-
}), null, 16, ["row", "field", "disabled"])) : c.item.type === "tree-select" ? (p(),
|
|
816
|
+
}), null, 16, ["row", "field", "disabled"])) : c.item.type === "tree-select" ? (p(), y(o(ae), C({
|
|
817
817
|
key: 4,
|
|
818
818
|
modelValue: l.form[c.item.key],
|
|
819
819
|
"onUpdate:modelValue": (i) => l.form[c.item.key] = i,
|
|
@@ -821,14 +821,14 @@ const Ve = {
|
|
|
821
821
|
}, c.item.options?.treeSelect, F(c.item.options?.treeSelect?.on || {}), {
|
|
822
822
|
disabled: l.getDisabled(c.item),
|
|
823
823
|
style: { width: "100%" }
|
|
824
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "datetime" ? (p(),
|
|
824
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type === "datetime" ? (p(), y(o(ee), C({
|
|
825
825
|
key: 5,
|
|
826
826
|
modelValue: l.form[c.item.key],
|
|
827
827
|
"onUpdate:modelValue": (i) => l.form[c.item.key] = i,
|
|
828
828
|
ref_for: !0
|
|
829
829
|
}, c.item.options?.datetime, F(c.item.options?.datetime?.on || {}), {
|
|
830
830
|
disabled: l.getDisabled(c.item)
|
|
831
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type && o(
|
|
831
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : c.item.type && o(z).customComponent[c.item.type] ? (p(), y(G(o(z).customComponent[c.item.type]), C({
|
|
832
832
|
key: 6,
|
|
833
833
|
modelValue: l.form[c.item.key],
|
|
834
834
|
"onUpdate:modelValue": (i) => l.form[c.item.key] = i,
|
|
@@ -855,7 +855,7 @@ const Ve = {
|
|
|
855
855
|
}, 8, ["model", "rules"]));
|
|
856
856
|
}
|
|
857
857
|
});
|
|
858
|
-
const
|
|
858
|
+
const Ue = {
|
|
859
859
|
search: "搜索",
|
|
860
860
|
add: "新增",
|
|
861
861
|
edit: "编辑",
|
|
@@ -890,24 +890,24 @@ const $e = {
|
|
|
890
890
|
};
|
|
891
891
|
class g {
|
|
892
892
|
/** 解析国际化值:函数则执行并返回字符串,字符串则替换 `{key}` 占位符 */
|
|
893
|
-
static t(a, ...
|
|
893
|
+
static t(a, ...d) {
|
|
894
894
|
if (typeof a == "function")
|
|
895
|
-
return a(...
|
|
895
|
+
return a(...d);
|
|
896
896
|
a = String(a);
|
|
897
897
|
let t = 0;
|
|
898
|
-
return a.replace(/{([^}]+)}/g, (n, e) => t <
|
|
898
|
+
return a.replace(/{([^}]+)}/g, (n, e) => t < d.length ? String(d[t++]) : `{${e}}`);
|
|
899
899
|
}
|
|
900
900
|
static setI18n = (a) => {
|
|
901
901
|
g.curd = ObjectUtil.deepMerge(g.curd, a);
|
|
902
902
|
};
|
|
903
903
|
/** 解析curd国际化值 */
|
|
904
|
-
static tCurd(a, ...
|
|
905
|
-
return this.t(this.curd[a], ...
|
|
904
|
+
static tCurd(a, ...d) {
|
|
905
|
+
return this.t(this.curd[a], ...d);
|
|
906
906
|
}
|
|
907
907
|
/** curd表单 */
|
|
908
|
-
static curd =
|
|
908
|
+
static curd = Ue;
|
|
909
909
|
}
|
|
910
|
-
class
|
|
910
|
+
class $e {
|
|
911
911
|
/**
|
|
912
912
|
* 导出数据为 Excel 文件(.xlsx),自动触发浏览器下载
|
|
913
913
|
*
|
|
@@ -915,19 +915,19 @@ class Se {
|
|
|
915
915
|
* @param columns - 列配置数组,需包含 `key`(数据字段)和 `label`(Excel 表头)
|
|
916
916
|
* @param fileName - 文件名(不含扩展名),支持字符串或返回字符串的函数;默认生成「导出数据_日期_时间戳」
|
|
917
917
|
*/
|
|
918
|
-
static exportToExcel = async (a,
|
|
918
|
+
static exportToExcel = async (a, d, t) => {
|
|
919
919
|
if (!a || a.length === 0) return;
|
|
920
|
-
const n = await
|
|
920
|
+
const n = await U.loadModule("xlsx"), e = a.map((f) => {
|
|
921
921
|
const m = {};
|
|
922
|
-
return
|
|
922
|
+
return d.forEach((c) => {
|
|
923
923
|
m[c.label] = f[c.key];
|
|
924
924
|
}), m;
|
|
925
925
|
}), l = n.utils.json_to_sheet(e), u = n.utils.book_new();
|
|
926
926
|
n.utils.book_append_sheet(u, l, "Sheet1"), t ? typeof t == "function" && (t = t()) : t = `导出数据_${(/* @__PURE__ */ new Date()).Format("yyyy-MM-dd")}_${(/* @__PURE__ */ new Date()).getTime()}`, n.writeFile(u, `${t}.xlsx`);
|
|
927
927
|
};
|
|
928
928
|
}
|
|
929
|
-
const K =
|
|
930
|
-
const a = B(),
|
|
929
|
+
const K = U.EDialog, Oe = (r) => {
|
|
930
|
+
const a = B(), d = B(), t = te({
|
|
931
931
|
/** 查询区域相关配置对象 */
|
|
932
932
|
search: {
|
|
933
933
|
/** 查询表单列集合 */
|
|
@@ -1031,10 +1031,10 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1031
1031
|
await t.initApiData("init");
|
|
1032
1032
|
let e = {};
|
|
1033
1033
|
if (t.table.sort.prop) {
|
|
1034
|
-
const { props:
|
|
1034
|
+
const { props: s, order: h } = O.config.table.sort;
|
|
1035
1035
|
e = {
|
|
1036
|
-
[
|
|
1037
|
-
[
|
|
1036
|
+
[s.field]: t.table.sort.prop,
|
|
1037
|
+
[h.field]: t.table.sort.order
|
|
1038
1038
|
};
|
|
1039
1039
|
}
|
|
1040
1040
|
const l = await n({
|
|
@@ -1044,10 +1044,10 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1044
1044
|
...e
|
|
1045
1045
|
}), u = O.config.result, f = l.data || { [u.list]: l };
|
|
1046
1046
|
let m = (Array.isArray(f[u.list]), f[u.list]);
|
|
1047
|
-
const c = t.update.formColumn.flat(), i = JSONUtil.cp(m).map((
|
|
1048
|
-
const L = c.find((
|
|
1049
|
-
L && ["select", "radio"].includes(L.item.type) && (L.item.table.format || (L.item.table.format = (
|
|
1050
|
-
}),
|
|
1047
|
+
const c = t.update.formColumn.flat(), i = JSONUtil.cp(m).map((s) => (Object.keys(s).forEach((j) => {
|
|
1048
|
+
const L = c.find((T) => T.item.key === j);
|
|
1049
|
+
L && ["select", "radio"].includes(L.item.type) && (L.item.table.format || (L.item.table.format = (T) => L.item.options[L.item.type].data?.find((A) => A.value == T[j])?.label || T[j]));
|
|
1050
|
+
}), s));
|
|
1051
1051
|
t.table.data = r.option.data ? await r.option.data(i, m) : i, t.page.total = f[u.total] || 0;
|
|
1052
1052
|
} catch (e) {
|
|
1053
1053
|
console.error(e);
|
|
@@ -1093,18 +1093,18 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1093
1093
|
data: e,
|
|
1094
1094
|
columns: l
|
|
1095
1095
|
}), f = r.option.tools?.export || {};
|
|
1096
|
-
f.before && f.before(u),
|
|
1096
|
+
f.before && f.before(u), $e.exportToExcel(u.data, u.columns, f.fileName);
|
|
1097
1097
|
},
|
|
1098
1098
|
/** 获取当前选中项进行导出 */
|
|
1099
1099
|
select: () => {
|
|
1100
1100
|
if (t.table.selection.list.length === 0)
|
|
1101
|
-
throw
|
|
1101
|
+
throw U.fail(g.tCurd("selectDataToExport")), new Error(g.tCurd("selectDataToExport"));
|
|
1102
1102
|
return t.table.selection.list;
|
|
1103
1103
|
},
|
|
1104
1104
|
/** 导出当前页的数据 */
|
|
1105
1105
|
page: () => {
|
|
1106
1106
|
if (t.table.data.length === 0)
|
|
1107
|
-
throw
|
|
1107
|
+
throw U.fail(g.tCurd("noData")), new Error(g.tCurd("noData"));
|
|
1108
1108
|
return t.table.data;
|
|
1109
1109
|
},
|
|
1110
1110
|
/** 导出所有数据 */
|
|
@@ -1180,7 +1180,7 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1180
1180
|
/** 打开增改弹窗 */
|
|
1181
1181
|
open: (n, e) => {
|
|
1182
1182
|
t.update.showContent || FunUtil.throttle(async () => {
|
|
1183
|
-
|
|
1183
|
+
U.loading(!0);
|
|
1184
1184
|
try {
|
|
1185
1185
|
await t.initApiData("update");
|
|
1186
1186
|
const l = n === K.Insert;
|
|
@@ -1192,15 +1192,15 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1192
1192
|
} catch (l) {
|
|
1193
1193
|
console.error(l);
|
|
1194
1194
|
} finally {
|
|
1195
|
-
|
|
1195
|
+
U.loading(!1);
|
|
1196
1196
|
}
|
|
1197
1197
|
});
|
|
1198
1198
|
},
|
|
1199
1199
|
/** 提交增改表单操作 */
|
|
1200
1200
|
submit: () => {
|
|
1201
1201
|
FunUtil.throttle(async () => {
|
|
1202
|
-
await
|
|
1203
|
-
u || (
|
|
1202
|
+
await d.value?.validate(async (u, f) => new Promise((m, c) => {
|
|
1203
|
+
u || (U.fail(g.tCurd("checkFormData")), c(!1)), m();
|
|
1204
1204
|
})), t.update.loading = !0;
|
|
1205
1205
|
const n = t.update.type === K.Insert ? r.option.api.create : r.option.api.update;
|
|
1206
1206
|
let e = JSONUtil.cp(t.update.form);
|
|
@@ -1256,7 +1256,7 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1256
1256
|
delete e.children;
|
|
1257
1257
|
try {
|
|
1258
1258
|
if (!n) return;
|
|
1259
|
-
await n({ ...e }), t.inlineEdit.close(), await t.table.getList(),
|
|
1259
|
+
await n({ ...e }), t.inlineEdit.close(), await t.table.getList(), U.success(g.tCurd("operationSuccess"));
|
|
1260
1260
|
} catch (l) {
|
|
1261
1261
|
console.error(l);
|
|
1262
1262
|
} finally {
|
|
@@ -1282,7 +1282,7 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1282
1282
|
/** 打开删除弹窗并设置待删除项 */
|
|
1283
1283
|
open: (n) => {
|
|
1284
1284
|
if (n.length === 0) {
|
|
1285
|
-
|
|
1285
|
+
U.fail(g.tCurd("selectDataToDelete"));
|
|
1286
1286
|
return;
|
|
1287
1287
|
}
|
|
1288
1288
|
t.remove.items = n, t.remove.show = !0;
|
|
@@ -1297,7 +1297,7 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1297
1297
|
await n({
|
|
1298
1298
|
[r.option.table?.rowKey]: t.remove.items.map((e) => e[r.option.table?.rowKey]),
|
|
1299
1299
|
items: t.remove.items
|
|
1300
|
-
}),
|
|
1300
|
+
}), U.success(g.tCurd("operationSuccess")), t.table.data.length <= 1 && t.page.num > 1 && (t.page.num -= 1), t.remove.close(), await t.table.getList();
|
|
1301
1301
|
} catch (e) {
|
|
1302
1302
|
console.error(e);
|
|
1303
1303
|
} finally {
|
|
@@ -1378,10 +1378,10 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1378
1378
|
return r.option.api.update ? (await r.option.api.update({
|
|
1379
1379
|
[r.option.table?.rowKey]: f[r.option.table?.rowKey],
|
|
1380
1380
|
[u]: f[u] === m.activeValue ? m.inactiveValue : m.activeValue,
|
|
1381
|
-
final(c, i,
|
|
1381
|
+
final(c, i, s) {
|
|
1382
1382
|
t.table.loading = !1;
|
|
1383
1383
|
}
|
|
1384
|
-
}), t.table.loading = !1,
|
|
1384
|
+
}), t.table.loading = !1, U.success(g.tCurd("operationSuccess")), t.table.getList(), !0) : void 0;
|
|
1385
1385
|
} catch (c) {
|
|
1386
1386
|
return console.error(c), !1;
|
|
1387
1387
|
} finally {
|
|
@@ -1394,6 +1394,13 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1394
1394
|
};
|
|
1395
1395
|
r.option.column.forEach(e), r.option.table?.column?.forEach(e);
|
|
1396
1396
|
},
|
|
1397
|
+
getColumnSpan: (n, e) => {
|
|
1398
|
+
if (n.item.form?.spanCol) {
|
|
1399
|
+
const l = O.config.form.defaultSpan, f = e.filter((m) => !U.isFun(m.item.show?.form, t.update.form, t.update.type)).reduce((m, c) => m + (c.item.form?.span || l), 0);
|
|
1400
|
+
return (n.item?.form.span || l) + f;
|
|
1401
|
+
}
|
|
1402
|
+
return n.item.form.span;
|
|
1403
|
+
},
|
|
1397
1404
|
/** 初始化配置并生成表单列及默认值及规则 */
|
|
1398
1405
|
initColumnForm: () => {
|
|
1399
1406
|
const n = r.option;
|
|
@@ -1403,76 +1410,76 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1403
1410
|
};
|
|
1404
1411
|
const e = [], l = r.option.form?.maxSpan || 12, u = r.option.form?.defaultSpan || l / 2;
|
|
1405
1412
|
let f = [];
|
|
1406
|
-
const m = (
|
|
1407
|
-
if (
|
|
1408
|
-
t.table.column.show.list.push(
|
|
1409
|
-
m(
|
|
1413
|
+
const m = (s) => {
|
|
1414
|
+
if (s.children) {
|
|
1415
|
+
t.table.column.show.list.push(s.key), s.children.forEach((h) => {
|
|
1416
|
+
m(h);
|
|
1410
1417
|
});
|
|
1411
1418
|
return;
|
|
1412
1419
|
}
|
|
1413
|
-
if (t.update.formDefault[
|
|
1414
|
-
|
|
1415
|
-
let
|
|
1420
|
+
if (t.update.formDefault[s.key] = s.value, s.table.table && (s.show.table && t.table.column.show.list.push(s.key), s.table.table && t.table.column.show.listSource.push(s.key)), !(s.isForm && typeof s.show?.form == "boolean") || s.show?.form) {
|
|
1421
|
+
s.form = s.form || { span: u }, s.form.span = s.form.span ?? u;
|
|
1422
|
+
let h = s.form.span, j = f.reduce((T, A) => T + A.span, h);
|
|
1416
1423
|
const L = f.length;
|
|
1417
|
-
if (f.push({ item:
|
|
1418
|
-
const
|
|
1424
|
+
if (f.push({ item: s, span: h }), (L === 1 && f[0].span === 0 || j >= l || h === 0 && L > 1) && (e.push(f), f = []), s.rules) {
|
|
1425
|
+
const T = {
|
|
1419
1426
|
input: g.tCurd("placeholderInput"),
|
|
1420
1427
|
select: g.tCurd("placeholderSelect")
|
|
1421
|
-
}, A = (
|
|
1422
|
-
t.update.rules[
|
|
1428
|
+
}, A = (T[s.type] || T.input) + s.label;
|
|
1429
|
+
t.update.rules[s.key] = typeof s.rules == "boolean" ? [
|
|
1423
1430
|
{
|
|
1424
1431
|
required: !0,
|
|
1425
1432
|
message: A,
|
|
1426
1433
|
trigger: "blur"
|
|
1427
1434
|
}
|
|
1428
|
-
] :
|
|
1435
|
+
] : s.rules;
|
|
1429
1436
|
}
|
|
1430
1437
|
}
|
|
1431
|
-
}, c = (
|
|
1432
|
-
|
|
1438
|
+
}, c = (s, h) => {
|
|
1439
|
+
s.isForm = h, Array.isArray(s.children) && s.children.forEach((j) => c(j, h));
|
|
1433
1440
|
};
|
|
1434
|
-
n.column.forEach((
|
|
1435
|
-
|
|
1436
|
-
}), r.option.table?.column?.forEach((
|
|
1437
|
-
c(
|
|
1438
|
-
}), t.search.column.list = n.column.concat(n.table?.column || []), t.table.column.list = t.search.column.list.filter((
|
|
1441
|
+
n.column.forEach((s) => {
|
|
1442
|
+
s.isForm = !0, c(s, !0), m(s);
|
|
1443
|
+
}), r.option.table?.column?.forEach((s) => {
|
|
1444
|
+
c(s, !1), m(s);
|
|
1445
|
+
}), t.search.column.list = n.column.concat(n.table?.column || []), t.table.column.list = t.search.column.list.filter((s) => s.table?.table), t.search.column.list.sort((s, h) => s.sort?.search - h.sort?.search), t.table.column.list.sort((s, h) => s.sort?.table - h.sort?.table), f.length > 0 && e.push(f), t.update.formColumn = e;
|
|
1439
1446
|
const i = r.option.search?.formDefault;
|
|
1440
|
-
i && Object.keys(i).forEach((
|
|
1441
|
-
t.search.formDefault[
|
|
1442
|
-
}), n.column.forEach((
|
|
1443
|
-
|
|
1447
|
+
i && Object.keys(i).forEach((s) => {
|
|
1448
|
+
t.search.formDefault[s] = i[s];
|
|
1449
|
+
}), n.column.forEach((s) => {
|
|
1450
|
+
s.show?.search || (t.search.formDefault[s.key] = void 0);
|
|
1444
1451
|
}), t.search.form = JSONUtil.cp(t.search.formDefault);
|
|
1445
1452
|
}
|
|
1446
1453
|
});
|
|
1447
1454
|
return t.init(), ne(() => {
|
|
1448
1455
|
r.option.init !== !1 && t.table.getList();
|
|
1449
|
-
}), { conf: t, switchConfirmRef: a, ruleFormRef:
|
|
1456
|
+
}), { conf: t, switchConfirmRef: a, ruleFormRef: d };
|
|
1450
1457
|
}, Fe = { class: "dialog-footer" }, Ie = /* @__PURE__ */ J({
|
|
1451
1458
|
__name: "switchConfirm",
|
|
1452
1459
|
setup(r, { expose: a }) {
|
|
1453
|
-
const
|
|
1460
|
+
const d = B(!1), t = B("确认修改"), n = B("确认要修改状态吗?");
|
|
1454
1461
|
let e = null, l = null;
|
|
1455
|
-
const u = (c) => (c?.title && (t.value = c.title), c?.content && (n.value = c.content),
|
|
1456
|
-
e = i, l =
|
|
1462
|
+
const u = (c) => (c?.title && (t.value = c.title), c?.content && (n.value = c.content), d.value = !0, new Promise((i, s) => {
|
|
1463
|
+
e = i, l = s;
|
|
1457
1464
|
})), f = () => {
|
|
1458
|
-
|
|
1465
|
+
d.value = !1, e?.(!0), e = null, l = null;
|
|
1459
1466
|
}, m = () => {
|
|
1460
|
-
|
|
1467
|
+
d.value = !1, l?.(new Error("用户取消操作")), e = null, l = null;
|
|
1461
1468
|
};
|
|
1462
1469
|
return a({
|
|
1463
1470
|
open: u
|
|
1464
|
-
}), (c, i) => (p(),
|
|
1465
|
-
modelValue:
|
|
1466
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1471
|
+
}), (c, i) => (p(), y(o(Y), {
|
|
1472
|
+
modelValue: d.value,
|
|
1473
|
+
"onUpdate:modelValue": i[0] || (i[0] = (s) => d.value = s),
|
|
1467
1474
|
title: t.value,
|
|
1468
1475
|
"close-on-click-modal": !1,
|
|
1469
1476
|
width: "400px"
|
|
1470
1477
|
}, {
|
|
1471
|
-
footer:
|
|
1478
|
+
footer: b(() => [
|
|
1472
1479
|
S("span", Fe, [
|
|
1473
1480
|
V(o(I), { onClick: m }, {
|
|
1474
|
-
default:
|
|
1475
|
-
|
|
1481
|
+
default: b(() => i[1] || (i[1] = [
|
|
1482
|
+
D("取消")
|
|
1476
1483
|
])),
|
|
1477
1484
|
_: 1
|
|
1478
1485
|
}),
|
|
@@ -1480,24 +1487,24 @@ const K = $.EDialog, Oe = (r) => {
|
|
|
1480
1487
|
type: "primary",
|
|
1481
1488
|
onClick: f
|
|
1482
1489
|
}, {
|
|
1483
|
-
default:
|
|
1484
|
-
|
|
1490
|
+
default: b(() => i[2] || (i[2] = [
|
|
1491
|
+
D("确认")
|
|
1485
1492
|
])),
|
|
1486
1493
|
_: 1
|
|
1487
1494
|
})
|
|
1488
1495
|
])
|
|
1489
1496
|
]),
|
|
1490
|
-
default:
|
|
1491
|
-
S("div", null,
|
|
1497
|
+
default: b(() => [
|
|
1498
|
+
S("div", null, E(n.value), 1)
|
|
1492
1499
|
]),
|
|
1493
1500
|
_: 1
|
|
1494
1501
|
}, 8, ["modelValue", "title"]));
|
|
1495
1502
|
}
|
|
1496
1503
|
}), se = (r, a) => {
|
|
1497
|
-
const
|
|
1504
|
+
const d = r.__vccOpts || r;
|
|
1498
1505
|
for (const [t, n] of a)
|
|
1499
|
-
|
|
1500
|
-
return
|
|
1506
|
+
d[t] = n;
|
|
1507
|
+
return d;
|
|
1501
1508
|
}, Me = {}, je = {
|
|
1502
1509
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1503
1510
|
viewBox: "0 0 1024 1024"
|
|
@@ -1510,7 +1517,7 @@ function Le(r, a) {
|
|
|
1510
1517
|
}, null, -1)
|
|
1511
1518
|
]));
|
|
1512
1519
|
}
|
|
1513
|
-
const
|
|
1520
|
+
const Te = /* @__PURE__ */ se(Me, [["render", Le]]), ze = {}, Pe = {
|
|
1514
1521
|
"data-v-58697b5c": "",
|
|
1515
1522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1516
1523
|
viewBox: "0 0 1024 1024"
|
|
@@ -1523,7 +1530,7 @@ function Re(r, a) {
|
|
|
1523
1530
|
}, null, -1)
|
|
1524
1531
|
]));
|
|
1525
1532
|
}
|
|
1526
|
-
const Ae = /* @__PURE__ */ se(
|
|
1533
|
+
const Ae = /* @__PURE__ */ se(ze, [["render", Re]]), Ke = { class: "row flex-center table-header-label inline" }, Ne = { class: "table-header-tooltip" }, Be = ["onClick"], Je = /* @__PURE__ */ J({
|
|
1527
1534
|
__name: "tableColumn",
|
|
1528
1535
|
props: {
|
|
1529
1536
|
conf: {},
|
|
@@ -1531,56 +1538,56 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1531
1538
|
option: {}
|
|
1532
1539
|
},
|
|
1533
1540
|
setup(r) {
|
|
1534
|
-
const a =
|
|
1541
|
+
const a = U.isFun, d = ye().type;
|
|
1535
1542
|
return (t, n) => {
|
|
1536
1543
|
const e = H("el-tooltip");
|
|
1537
|
-
return p(!0), w(
|
|
1544
|
+
return p(!0), w($, null, M(t.columnList, (l) => (p(), w($, {
|
|
1538
1545
|
key: l.key
|
|
1539
1546
|
}, [
|
|
1540
|
-
t.conf.table.column.show.list.includes(l.key) ? (p(),
|
|
1547
|
+
t.conf.table.column.show.list.includes(l.key) ? (p(), y(o(Z), C({
|
|
1541
1548
|
key: 0,
|
|
1542
1549
|
prop: l.key,
|
|
1543
1550
|
label: l.label,
|
|
1544
1551
|
ref_for: !0
|
|
1545
1552
|
}, l.table), {
|
|
1546
|
-
header:
|
|
1553
|
+
header: b(() => [
|
|
1547
1554
|
k(t.$slots, "table-header-" + l.key, { item: l }, () => [
|
|
1548
1555
|
S("div", Ke, [
|
|
1549
|
-
l.table?.tooltip ? (p(),
|
|
1556
|
+
l.table?.tooltip ? (p(), y(e, {
|
|
1550
1557
|
key: 0,
|
|
1551
1558
|
effect: "dark",
|
|
1552
1559
|
content: l.table?.tooltip,
|
|
1553
1560
|
placement: "top"
|
|
1554
1561
|
}, {
|
|
1555
|
-
default:
|
|
1562
|
+
default: b(() => [
|
|
1556
1563
|
S("span", Ne, [
|
|
1557
1564
|
V(Ae)
|
|
1558
1565
|
])
|
|
1559
1566
|
]),
|
|
1560
1567
|
_: 2
|
|
1561
1568
|
}, 1032, ["content"])) : v("", !0),
|
|
1562
|
-
|
|
1569
|
+
D(" " + E(l.label), 1)
|
|
1563
1570
|
])
|
|
1564
1571
|
])
|
|
1565
1572
|
]),
|
|
1566
|
-
default:
|
|
1567
|
-
l.children ? (p(), w(
|
|
1568
|
-
n[0] || (n[0] =
|
|
1569
|
-
(p(),
|
|
1573
|
+
default: b(({ row: u }) => [
|
|
1574
|
+
l.children ? (p(), w($, { key: 0 }, [
|
|
1575
|
+
n[0] || (n[0] = D(" ")),
|
|
1576
|
+
(p(), y(G(o(d)), {
|
|
1570
1577
|
conf: t.conf,
|
|
1571
1578
|
columnList: l.children,
|
|
1572
1579
|
option: t.option
|
|
1573
1580
|
}, re({ _: 2 }, [
|
|
1574
1581
|
M(t.$slots, (f, m) => ({
|
|
1575
1582
|
name: m,
|
|
1576
|
-
fn:
|
|
1583
|
+
fn: b((c) => [
|
|
1577
1584
|
k(t.$slots, m, C({ ref_for: !0 }, c || {}))
|
|
1578
1585
|
])
|
|
1579
1586
|
}))
|
|
1580
1587
|
]), 1032, ["conf", "columnList", "option"]))
|
|
1581
|
-
], 64)) : (p(), w(
|
|
1582
|
-
o(a)(l.show?.form, t.conf.inlineEdit.form, o(
|
|
1583
|
-
l.type === "input" ? (p(),
|
|
1588
|
+
], 64)) : (p(), w($, { key: 1 }, [
|
|
1589
|
+
o(a)(l.show?.form, t.conf.inlineEdit.form, o(U).EDialog.Update) && t.option.table?.inlineEdit && t.conf.inlineEdit.row === u && (l.type === "input" || l.type === "select") ? (p(), w($, { key: 0 }, [
|
|
1590
|
+
l.type === "input" ? (p(), y(o(q), C({
|
|
1584
1591
|
key: 0,
|
|
1585
1592
|
modelValue: t.conf.inlineEdit.form[l.key],
|
|
1586
1593
|
"onUpdate:modelValue": (f) => t.conf.inlineEdit.form[l.key] = f,
|
|
@@ -1589,7 +1596,7 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1589
1596
|
size: "small",
|
|
1590
1597
|
style: { width: "100%" },
|
|
1591
1598
|
onKeyup: ge(t.conf.inlineEdit.submit, ["enter"])
|
|
1592
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : l.type === "select" ? (p(),
|
|
1599
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "onKeyup"])) : l.type === "select" ? (p(), y(o(W), C({
|
|
1593
1600
|
key: 1,
|
|
1594
1601
|
modelValue: t.conf.inlineEdit.form[l.key],
|
|
1595
1602
|
"onUpdate:modelValue": (f) => t.conf.inlineEdit.form[l.key] = f,
|
|
@@ -1598,8 +1605,8 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1598
1605
|
size: "small",
|
|
1599
1606
|
style: { width: "100%" }
|
|
1600
1607
|
}), {
|
|
1601
|
-
default:
|
|
1602
|
-
(p(!0), w(
|
|
1608
|
+
default: b(() => [
|
|
1609
|
+
(p(!0), w($, null, M(l.options?.select?.data, (f) => (p(), y(o(N), {
|
|
1603
1610
|
key: f.value,
|
|
1604
1611
|
label: f.label,
|
|
1605
1612
|
value: f.value
|
|
@@ -1612,7 +1619,7 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1612
1619
|
row: u,
|
|
1613
1620
|
item: l
|
|
1614
1621
|
}, () => [
|
|
1615
|
-
l.type === "switch" ? (p(),
|
|
1622
|
+
l.type === "switch" ? (p(), y(o(_), C({
|
|
1616
1623
|
key: 0,
|
|
1617
1624
|
modelValue: u[l.key],
|
|
1618
1625
|
"onUpdate:modelValue": (f) => u[l.key] = f,
|
|
@@ -1625,7 +1632,7 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1625
1632
|
}),
|
|
1626
1633
|
class: P({ "table-text-click": l.table?.click?.callback }),
|
|
1627
1634
|
onClick: (f) => l.table?.click?.callback?.(u)
|
|
1628
|
-
},
|
|
1635
|
+
}, E(l.table?.format ? l.table?.format(u) : u[l.key]), 15, Be))
|
|
1629
1636
|
])
|
|
1630
1637
|
], 64))
|
|
1631
1638
|
]),
|
|
@@ -1641,82 +1648,82 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1641
1648
|
item: {}
|
|
1642
1649
|
},
|
|
1643
1650
|
setup(r) {
|
|
1644
|
-
return (a,
|
|
1651
|
+
return (a, d) => {
|
|
1645
1652
|
const t = H("el-radio"), n = H("el-radio-group");
|
|
1646
|
-
return a.item.item.type === "input" ? (p(),
|
|
1653
|
+
return a.item.item.type === "input" ? (p(), y(o(q), C({
|
|
1647
1654
|
key: 0,
|
|
1648
1655
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1649
|
-
"onUpdate:modelValue":
|
|
1656
|
+
"onUpdate:modelValue": d[0] || (d[0] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1650
1657
|
}, a.item.item.options?.input, F(a.item.item.options?.input?.on || {}), {
|
|
1651
1658
|
disabled: a.conf.update.getDisabled(a.item.item)
|
|
1652
|
-
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "switch" ? (p(),
|
|
1659
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "switch" ? (p(), y(o(_), C({
|
|
1653
1660
|
key: 1,
|
|
1654
1661
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1655
|
-
"onUpdate:modelValue":
|
|
1662
|
+
"onUpdate:modelValue": d[1] || (d[1] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1656
1663
|
}, a.item.item.options?.switch, {
|
|
1657
1664
|
disabled: a.conf.update.getDisabled(a.item.item)
|
|
1658
|
-
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "select" ? (p(),
|
|
1665
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "select" ? (p(), y(o(W), C({
|
|
1659
1666
|
key: 2,
|
|
1660
1667
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1661
|
-
"onUpdate:modelValue":
|
|
1668
|
+
"onUpdate:modelValue": d[2] || (d[2] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1662
1669
|
}, a.item.item.options?.select, F(a.item.item.options?.select?.on || {}), {
|
|
1663
1670
|
disabled: a.conf.update.getDisabled(a.item.item),
|
|
1664
1671
|
style: { width: "100%" }
|
|
1665
1672
|
}), {
|
|
1666
|
-
default:
|
|
1667
|
-
(p(!0), w(
|
|
1673
|
+
default: b(() => [
|
|
1674
|
+
(p(!0), w($, null, M(a.item.item.options?.select?.data, (e) => (p(), y(o(N), {
|
|
1668
1675
|
key: e.value,
|
|
1669
1676
|
label: e.label,
|
|
1670
1677
|
value: e.value
|
|
1671
1678
|
}, null, 8, ["label", "value"]))), 128))
|
|
1672
1679
|
]),
|
|
1673
1680
|
_: 1
|
|
1674
|
-
}, 16, ["modelValue", "disabled"])) : a.item.item.type === "radio" ? (p(),
|
|
1681
|
+
}, 16, ["modelValue", "disabled"])) : a.item.item.type === "radio" ? (p(), y(n, C({
|
|
1675
1682
|
key: 3,
|
|
1676
1683
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1677
|
-
"onUpdate:modelValue":
|
|
1684
|
+
"onUpdate:modelValue": d[3] || (d[3] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1678
1685
|
}, a.item.item.options?.radio, F(a.item.item.options?.radio?.on || {}), {
|
|
1679
1686
|
disabled: a.conf.update.getDisabled(a.item.item),
|
|
1680
1687
|
style: { width: "100%" }
|
|
1681
1688
|
}), {
|
|
1682
|
-
default:
|
|
1683
|
-
(p(!0), w(
|
|
1689
|
+
default: b(() => [
|
|
1690
|
+
(p(!0), w($, null, M(a.item.item.options?.radio?.data, (e) => (p(), y(t, {
|
|
1684
1691
|
key: e.value,
|
|
1685
1692
|
label: e.label,
|
|
1686
1693
|
value: e.value
|
|
1687
1694
|
}, null, 8, ["label", "value"]))), 128))
|
|
1688
1695
|
]),
|
|
1689
1696
|
_: 1
|
|
1690
|
-
}, 16, ["modelValue", "disabled"])) : a.item.item.type === "list" ? (p(),
|
|
1697
|
+
}, 16, ["modelValue", "disabled"])) : a.item.item.type === "list" ? (p(), y(oe, C({
|
|
1691
1698
|
key: 4,
|
|
1692
1699
|
row: a.conf.update.form,
|
|
1693
1700
|
field: a.item.item.key
|
|
1694
1701
|
}, a.item.item.options?.list, F(a.item.item.options?.list?.on || {}), {
|
|
1695
1702
|
disabled: a.conf.update.getDisabled(a.item.item),
|
|
1696
1703
|
style: { width: "100%" }
|
|
1697
|
-
}), null, 16, ["row", "field", "disabled"])) : a.item.item.type === "tree-select" ? (p(),
|
|
1704
|
+
}), null, 16, ["row", "field", "disabled"])) : a.item.item.type === "tree-select" ? (p(), y(o(ae), C({
|
|
1698
1705
|
key: 5,
|
|
1699
1706
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1700
|
-
"onUpdate:modelValue":
|
|
1707
|
+
"onUpdate:modelValue": d[4] || (d[4] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1701
1708
|
}, a.item.item.options?.treeSelect, F(a.item.item.options?.treeSelect?.on || {}), {
|
|
1702
1709
|
disabled: a.conf.update.getDisabled(a.item.item),
|
|
1703
1710
|
style: { width: "100%" }
|
|
1704
|
-
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "datetime" ? (p(),
|
|
1711
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type === "datetime" ? (p(), y(o(ee), C({
|
|
1705
1712
|
key: 6,
|
|
1706
1713
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1707
|
-
"onUpdate:modelValue":
|
|
1714
|
+
"onUpdate:modelValue": d[5] || (d[5] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1708
1715
|
}, a.item.item.options?.datetime, F(a.item.item.options?.datetime?.on || {}), {
|
|
1709
1716
|
disabled: a.conf.update.getDisabled(a.item.item)
|
|
1710
|
-
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type && o(
|
|
1717
|
+
}), null, 16, ["modelValue", "disabled"])) : a.item.item.type && o(z).customComponent[a.item.item.type] ? (p(), y(G(o(z).customComponent[a.item.item.type]), C({
|
|
1711
1718
|
key: 7,
|
|
1712
1719
|
modelValue: a.conf.update.form[a.item.item.key],
|
|
1713
|
-
"onUpdate:modelValue":
|
|
1720
|
+
"onUpdate:modelValue": d[6] || (d[6] = (e) => a.conf.update.form[a.item.item.key] = e)
|
|
1714
1721
|
}, a.item.item.options?.[a.item.item.type], F(a.item.item.options?.[a.item.item.type]?.on || {}), {
|
|
1715
1722
|
disabled: a.conf.update.getDisabled(a.item.item)
|
|
1716
1723
|
}), null, 16, ["modelValue", "disabled"])) : v("", !0);
|
|
1717
1724
|
};
|
|
1718
1725
|
}
|
|
1719
|
-
}),
|
|
1726
|
+
}), xe = { class: "col relative cc1-form-box" }, We = {
|
|
1720
1727
|
class: "absolute row fit",
|
|
1721
1728
|
style: { overflow: "hidden" }
|
|
1722
1729
|
}, He = { class: "col column fit-width no-wrap" }, qe = {
|
|
@@ -1732,9 +1739,15 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1732
1739
|
class: "row form-item-content",
|
|
1733
1740
|
style: { width: "100%" }
|
|
1734
1741
|
}, nt = { class: "col" }, it = {
|
|
1742
|
+
key: 0,
|
|
1743
|
+
class: "form-tip-text"
|
|
1744
|
+
}, rt = {
|
|
1735
1745
|
class: "row form-item-content",
|
|
1736
1746
|
style: { width: "100%" }
|
|
1737
|
-
},
|
|
1747
|
+
}, st = { class: "col" }, dt = { class: "col" }, ut = {
|
|
1748
|
+
key: 0,
|
|
1749
|
+
class: "form-tip-text"
|
|
1750
|
+
}, ct = { class: "dialog-footer" }, ft = { class: "dialog-footer" }, pt = /* @__PURE__ */ J({
|
|
1738
1751
|
__name: "index",
|
|
1739
1752
|
props: {
|
|
1740
1753
|
/**
|
|
@@ -1745,13 +1758,13 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1745
1758
|
}
|
|
1746
1759
|
},
|
|
1747
1760
|
setup(r, { expose: a }) {
|
|
1748
|
-
const
|
|
1761
|
+
const d = U.EDialog, t = r, n = U.isFun, { conf: e, switchConfirmRef: l, ruleFormRef: u } = Oe(t);
|
|
1749
1762
|
return a({
|
|
1750
1763
|
conf: e
|
|
1751
1764
|
}), (f, m) => {
|
|
1752
1765
|
const c = we("loading");
|
|
1753
|
-
return p(), w("div",
|
|
1754
|
-
S("div",
|
|
1766
|
+
return p(), w("div", xe, [
|
|
1767
|
+
S("div", We, [
|
|
1755
1768
|
k(f.$slots, "box-left"),
|
|
1756
1769
|
S("div", He, [
|
|
1757
1770
|
r.option.search?.show !== !1 ? (p(), w("div", qe, [
|
|
@@ -1759,82 +1772,82 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1759
1772
|
model: o(e).search.form,
|
|
1760
1773
|
inline: ""
|
|
1761
1774
|
}, {
|
|
1762
|
-
default:
|
|
1775
|
+
default: b(() => [
|
|
1763
1776
|
k(f.$slots, "search-start", {
|
|
1764
1777
|
row: o(e).search.form
|
|
1765
1778
|
}),
|
|
1766
|
-
(p(!0), w(
|
|
1779
|
+
(p(!0), w($, null, M(o(e).search.column.list, (i) => (p(), w($, {
|
|
1767
1780
|
key: i.key
|
|
1768
1781
|
}, [
|
|
1769
|
-
(typeof i.show?.search == "function" ? i.show?.search(o(e).search.form) : i.show?.search) ? (p(),
|
|
1782
|
+
(typeof i.show?.search == "function" ? i.show?.search(o(e).search.form) : i.show?.search) ? (p(), y(o(x), {
|
|
1770
1783
|
key: 0,
|
|
1771
1784
|
label: typeof i.text?.search?.label == "string" ? i.text?.search?.label : i.label,
|
|
1772
1785
|
class: P({
|
|
1773
1786
|
"hide-label": typeof i.text?.search?.label == "boolean" ? !i.text?.search?.label : !1
|
|
1774
1787
|
})
|
|
1775
1788
|
}, {
|
|
1776
|
-
default:
|
|
1789
|
+
default: b(() => [
|
|
1777
1790
|
k(f.$slots, "search-" + i.key, {
|
|
1778
1791
|
row: o(e).search.form
|
|
1779
1792
|
}, () => [
|
|
1780
|
-
i.type === "input" ? (p(),
|
|
1793
|
+
i.type === "input" ? (p(), y(o(q), C({
|
|
1781
1794
|
key: 0,
|
|
1782
1795
|
modelValue: o(e).search.form[i.key],
|
|
1783
|
-
"onUpdate:modelValue": (
|
|
1796
|
+
"onUpdate:modelValue": (s) => o(e).search.form[i.key] = s,
|
|
1784
1797
|
placeholder: o(e).search.getPlaceholder(i),
|
|
1785
1798
|
clearable: "",
|
|
1786
1799
|
disabled: i.disabled?.search,
|
|
1787
1800
|
ref_for: !0
|
|
1788
|
-
}, i.options?.input, F(i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (p(),
|
|
1801
|
+
}, i.options?.input, F(i.options?.input?.on || {})), null, 16, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "switch" ? (p(), y(o(W), C({
|
|
1789
1802
|
key: 1,
|
|
1790
1803
|
modelValue: o(e).search.form[i.key],
|
|
1791
|
-
"onUpdate:modelValue": (
|
|
1804
|
+
"onUpdate:modelValue": (s) => o(e).search.form[i.key] = s,
|
|
1792
1805
|
placeholder: o(e).search.getPlaceholder(i, o(g).tCurd("placeholderSelect")),
|
|
1793
1806
|
clearable: "",
|
|
1794
1807
|
disabled: i.disabled?.search,
|
|
1795
1808
|
ref_for: !0
|
|
1796
1809
|
}, i.options?.switch, F(i.options?.switch?.on || {})), {
|
|
1797
|
-
default:
|
|
1798
|
-
(p(),
|
|
1810
|
+
default: b(() => [
|
|
1811
|
+
(p(), y(o(N), {
|
|
1799
1812
|
key: i.options?.switch?.activeValue,
|
|
1800
1813
|
label: i.options?.switch?.activeLabel,
|
|
1801
1814
|
value: i.options?.switch?.activeValue
|
|
1802
1815
|
}, null, 8, ["label", "value"])),
|
|
1803
|
-
(p(),
|
|
1816
|
+
(p(), y(o(N), {
|
|
1804
1817
|
key: i.options?.switch?.inactiveValue,
|
|
1805
1818
|
label: i.options?.switch?.inactiveLabel,
|
|
1806
1819
|
value: i.options?.switch?.inactiveValue
|
|
1807
1820
|
}, null, 8, ["label", "value"]))
|
|
1808
1821
|
]),
|
|
1809
1822
|
_: 2
|
|
1810
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (p(),
|
|
1823
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "select" ? (p(), y(o(W), C({
|
|
1811
1824
|
key: 2,
|
|
1812
1825
|
modelValue: o(e).search.form[i.key],
|
|
1813
|
-
"onUpdate:modelValue": (
|
|
1826
|
+
"onUpdate:modelValue": (s) => o(e).search.form[i.key] = s,
|
|
1814
1827
|
placeholder: o(e).search.getPlaceholder(i, o(g).tCurd("placeholderSelect")),
|
|
1815
1828
|
clearable: "",
|
|
1816
1829
|
disabled: i.disabled?.search,
|
|
1817
1830
|
ref_for: !0
|
|
1818
1831
|
}, i.options?.select, F(i.options?.select?.on || {})), {
|
|
1819
|
-
default:
|
|
1820
|
-
(p(!0), w(
|
|
1821
|
-
key:
|
|
1822
|
-
label:
|
|
1823
|
-
value:
|
|
1832
|
+
default: b(() => [
|
|
1833
|
+
(p(!0), w($, null, M(i.options?.select?.data, (s) => (p(), y(o(N), {
|
|
1834
|
+
key: s.value,
|
|
1835
|
+
label: s.label,
|
|
1836
|
+
value: s.value
|
|
1824
1837
|
}, null, 8, ["label", "value"]))), 128))
|
|
1825
1838
|
]),
|
|
1826
1839
|
_: 2
|
|
1827
|
-
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "datetime" ? (p(),
|
|
1840
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "placeholder", "disabled"])) : i.type === "datetime" ? (p(), y(o(ee), C({
|
|
1828
1841
|
key: 3,
|
|
1829
1842
|
modelValue: o(e).search.form[i.key],
|
|
1830
|
-
"onUpdate:modelValue": (
|
|
1843
|
+
"onUpdate:modelValue": (s) => o(e).search.form[i.key] = s,
|
|
1831
1844
|
ref_for: !0
|
|
1832
1845
|
}, i.options?.datetime, F(i.options?.datetime?.on || {}), {
|
|
1833
1846
|
disabled: i.disabled?.search
|
|
1834
|
-
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && o(
|
|
1847
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue", "disabled"])) : i.type && o(z).customComponent[i.type] ? (p(), y(G(o(z).customComponent[i.type]), C({
|
|
1835
1848
|
key: 4,
|
|
1836
1849
|
modelValue: o(e).search.form[i.key],
|
|
1837
|
-
"onUpdate:modelValue": (
|
|
1850
|
+
"onUpdate:modelValue": (s) => o(e).search.form[i.key] = s,
|
|
1838
1851
|
ref_for: !0
|
|
1839
1852
|
}, i.options?.[i.type], F(i.options?.[i.type]?.on || {}), {
|
|
1840
1853
|
disabled: i.disabled?.search
|
|
@@ -1850,24 +1863,24 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1850
1863
|
k(f.$slots, "search-center", {
|
|
1851
1864
|
row: o(e).search.form
|
|
1852
1865
|
}),
|
|
1853
|
-
r.option.tools?.search || r.option.tools?.reset ? (p(),
|
|
1854
|
-
default:
|
|
1855
|
-
r.option.tools?.search ? (p(),
|
|
1866
|
+
r.option.tools?.search || r.option.tools?.reset ? (p(), y(o(x), { key: 0 }, {
|
|
1867
|
+
default: b(() => [
|
|
1868
|
+
r.option.tools?.search ? (p(), y(o(I), {
|
|
1856
1869
|
key: 0,
|
|
1857
1870
|
type: "primary",
|
|
1858
1871
|
onClick: o(e).search.submit
|
|
1859
1872
|
}, {
|
|
1860
|
-
default:
|
|
1861
|
-
E(
|
|
1873
|
+
default: b(() => [
|
|
1874
|
+
D(E(o(g).tCurd("search")), 1)
|
|
1862
1875
|
]),
|
|
1863
1876
|
_: 1
|
|
1864
1877
|
}, 8, ["onClick"])) : v("", !0),
|
|
1865
|
-
r.option.tools?.reset ? (p(),
|
|
1878
|
+
r.option.tools?.reset ? (p(), y(o(I), {
|
|
1866
1879
|
key: 1,
|
|
1867
1880
|
onClick: o(e).search.reset
|
|
1868
1881
|
}, {
|
|
1869
|
-
default:
|
|
1870
|
-
E(
|
|
1882
|
+
default: b(() => [
|
|
1883
|
+
D(E(o(g).tCurd("reset")), 1)
|
|
1871
1884
|
]),
|
|
1872
1885
|
_: 1
|
|
1873
1886
|
}, 8, ["onClick"])) : v("", !0)
|
|
@@ -1886,10 +1899,10 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1886
1899
|
o(n)(r.option.tools?.add) ? (p(), w("div", Qe, [
|
|
1887
1900
|
V(o(I), {
|
|
1888
1901
|
type: "primary",
|
|
1889
|
-
onClick: m[0] || (m[0] = (i) => o(e).update.open(o(
|
|
1902
|
+
onClick: m[0] || (m[0] = (i) => o(e).update.open(o(d).Insert))
|
|
1890
1903
|
}, {
|
|
1891
|
-
default:
|
|
1892
|
-
E(
|
|
1904
|
+
default: b(() => [
|
|
1905
|
+
D(E(o(g).tCurd("add")), 1)
|
|
1893
1906
|
]),
|
|
1894
1907
|
_: 1
|
|
1895
1908
|
})
|
|
@@ -1899,8 +1912,8 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1899
1912
|
type: "danger",
|
|
1900
1913
|
onClick: m[1] || (m[1] = (i) => o(e).remove.open(o(e).table.selection.list))
|
|
1901
1914
|
}, {
|
|
1902
|
-
default:
|
|
1903
|
-
E(
|
|
1915
|
+
default: b(() => [
|
|
1916
|
+
D(E(o(g).tCurd("delete")), 1)
|
|
1904
1917
|
]),
|
|
1905
1918
|
_: 1
|
|
1906
1919
|
})
|
|
@@ -1910,37 +1923,37 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1910
1923
|
type: "warning",
|
|
1911
1924
|
onClick: m[2] || (m[2] = (i) => o(e).table.expand.all())
|
|
1912
1925
|
}, {
|
|
1913
|
-
default:
|
|
1914
|
-
E(
|
|
1926
|
+
default: b(() => [
|
|
1927
|
+
D(E(o(g).tCurd("expandCollapse")), 1)
|
|
1915
1928
|
]),
|
|
1916
1929
|
_: 1
|
|
1917
1930
|
})
|
|
1918
1931
|
])) : v("", !0),
|
|
1919
|
-
r.option.tools?.export?.show ? (p(),
|
|
1932
|
+
r.option.tools?.export?.show ? (p(), y(o(fe), {
|
|
1920
1933
|
key: 3,
|
|
1921
1934
|
onCommand: o(e).export.click
|
|
1922
1935
|
}, {
|
|
1923
|
-
dropdown:
|
|
1936
|
+
dropdown: b(() => [
|
|
1924
1937
|
V(o(pe), null, {
|
|
1925
|
-
default:
|
|
1926
|
-
r.option.table?.selectable ? (p(),
|
|
1938
|
+
default: b(() => [
|
|
1939
|
+
r.option.table?.selectable ? (p(), y(o(X), {
|
|
1927
1940
|
key: 0,
|
|
1928
1941
|
command: "select"
|
|
1929
1942
|
}, {
|
|
1930
|
-
default:
|
|
1931
|
-
E(
|
|
1943
|
+
default: b(() => [
|
|
1944
|
+
D(E(o(g).tCurd("exportSelect")), 1)
|
|
1932
1945
|
]),
|
|
1933
1946
|
_: 1
|
|
1934
1947
|
})) : v("", !0),
|
|
1935
1948
|
V(o(X), { command: "page" }, {
|
|
1936
|
-
default:
|
|
1937
|
-
E(
|
|
1949
|
+
default: b(() => [
|
|
1950
|
+
D(E(o(g).tCurd("exportPage")), 1)
|
|
1938
1951
|
]),
|
|
1939
1952
|
_: 1
|
|
1940
1953
|
}),
|
|
1941
1954
|
V(o(X), { command: "all" }, {
|
|
1942
|
-
default:
|
|
1943
|
-
E(
|
|
1955
|
+
default: b(() => [
|
|
1956
|
+
D(E(o(g).tCurd("exportAll")), 1)
|
|
1944
1957
|
]),
|
|
1945
1958
|
_: 1
|
|
1946
1959
|
})
|
|
@@ -1948,14 +1961,14 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1948
1961
|
_: 1
|
|
1949
1962
|
})
|
|
1950
1963
|
]),
|
|
1951
|
-
default:
|
|
1964
|
+
default: b(() => [
|
|
1952
1965
|
S("div", _e, [
|
|
1953
1966
|
V(o(I), {
|
|
1954
1967
|
type: "warning",
|
|
1955
1968
|
loading: o(e).export.loading
|
|
1956
1969
|
}, {
|
|
1957
|
-
default:
|
|
1958
|
-
E(
|
|
1970
|
+
default: b(() => [
|
|
1971
|
+
D(E(o(g).tCurd("export")), 1)
|
|
1959
1972
|
]),
|
|
1960
1973
|
_: 1
|
|
1961
1974
|
}, 8, ["loading"])
|
|
@@ -1973,13 +1986,13 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1973
1986
|
onClick: m[3] || (m[3] = //@ts-ignore
|
|
1974
1987
|
(...i) => o(e).table.getList && o(e).table.getList(...i))
|
|
1975
1988
|
}, [
|
|
1976
|
-
V(
|
|
1989
|
+
V(Te)
|
|
1977
1990
|
])) : v("", !0)
|
|
1978
1991
|
])
|
|
1979
1992
|
]),
|
|
1980
1993
|
S("div", tt, [
|
|
1981
1994
|
S("div", ot, [
|
|
1982
|
-
ke((p(),
|
|
1995
|
+
ke((p(), y(o(me), C({
|
|
1983
1996
|
data: o(e).table.data,
|
|
1984
1997
|
border: r.option.table?.border === void 0 ? !0 : r.option.table?.border,
|
|
1985
1998
|
onSelectionChange: o(e).table.selection.change,
|
|
@@ -1987,46 +2000,48 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
1987
2000
|
"expand-row-keys": o(e).table.expand.rowKeys,
|
|
1988
2001
|
onExpandChange: o(e).table.expand.change
|
|
1989
2002
|
}, r.option.table, F(r.option.table?.on || {})), {
|
|
1990
|
-
default:
|
|
1991
|
-
r.option.table?.selectable || o(n)(r.option.tools?.delete) || r.option.tools?.export?.show ? (p(),
|
|
2003
|
+
default: b(() => [
|
|
2004
|
+
r.option.table?.selectable || o(n)(r.option.tools?.delete) || r.option.tools?.export?.show ? (p(), y(o(Z), {
|
|
1992
2005
|
key: 0,
|
|
1993
2006
|
type: "selection",
|
|
1994
2007
|
selectable: typeof r.option.table?.selectable == "function" ? r.option.table?.selectable : void 0,
|
|
1995
|
-
width: "
|
|
2008
|
+
width: "40",
|
|
2009
|
+
align: "center",
|
|
2010
|
+
"show-overflow-tooltip": !1
|
|
1996
2011
|
}, null, 8, ["selectable"])) : v("", !0),
|
|
1997
2012
|
V(Je, {
|
|
1998
2013
|
conf: o(e),
|
|
1999
2014
|
columnList: o(e).table.column.list,
|
|
2000
2015
|
option: r.option
|
|
2001
2016
|
}, re({ _: 2 }, [
|
|
2002
|
-
M(f.$slots, (i,
|
|
2003
|
-
name:
|
|
2004
|
-
fn:
|
|
2005
|
-
k(f.$slots,
|
|
2017
|
+
M(f.$slots, (i, s) => ({
|
|
2018
|
+
name: s,
|
|
2019
|
+
fn: b((h) => [
|
|
2020
|
+
k(f.$slots, s, ve(Ce(h || {})))
|
|
2006
2021
|
])
|
|
2007
2022
|
}))
|
|
2008
2023
|
]), 1032, ["conf", "columnList", "option"]),
|
|
2009
|
-
o(n)(r.option.table?.add) || o(n)(r.option.table?.update) || o(n)(r.option.table?.delete) || o(n)(r.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (p(),
|
|
2024
|
+
o(n)(r.option.table?.add) || o(n)(r.option.table?.update) || o(n)(r.option.table?.delete) || o(n)(r.option.table?.view) || f.$slots["table-op-left"] || f.$slots["table-op-right"] ? (p(), y(o(Z), C({
|
|
2010
2025
|
key: 1,
|
|
2011
2026
|
width: o(e).table.op.width(o(n)(r.option.table?.add), o(n)(r.option.table?.update), o(n)(r.option.table?.delete), o(n)(r.option.table?.view), f.$slots["table-op-left"], f.$slots["table-op-right"]),
|
|
2012
2027
|
align: "center",
|
|
2013
2028
|
fixed: "right"
|
|
2014
2029
|
}, r.option.table?.operate), {
|
|
2015
|
-
header:
|
|
2030
|
+
header: b(() => [
|
|
2016
2031
|
k(f.$slots, "table-header-op", {}, () => [
|
|
2017
|
-
E(
|
|
2032
|
+
D(E(o(g).tCurd("operation")), 1)
|
|
2018
2033
|
])
|
|
2019
2034
|
]),
|
|
2020
|
-
default:
|
|
2035
|
+
default: b(({ row: i }) => [
|
|
2021
2036
|
k(f.$slots, "table-op-left", { row: i }),
|
|
2022
|
-
r.option.table?.inlineEdit && o(e).inlineEdit.row === i ? (p(), w(
|
|
2037
|
+
r.option.table?.inlineEdit && o(e).inlineEdit.row === i ? (p(), w($, { key: 0 }, [
|
|
2023
2038
|
V(o(I), {
|
|
2024
2039
|
link: "",
|
|
2025
2040
|
type: "info",
|
|
2026
2041
|
onClick: o(e).inlineEdit.close
|
|
2027
2042
|
}, {
|
|
2028
|
-
default:
|
|
2029
|
-
E(
|
|
2043
|
+
default: b(() => [
|
|
2044
|
+
D(E(o(g).tCurd("cancel")), 1)
|
|
2030
2045
|
]),
|
|
2031
2046
|
_: 1
|
|
2032
2047
|
}, 8, ["onClick"]),
|
|
@@ -2036,54 +2051,54 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2036
2051
|
onClick: o(e).inlineEdit.submit,
|
|
2037
2052
|
loading: o(e).inlineEdit.loading
|
|
2038
2053
|
}, {
|
|
2039
|
-
default:
|
|
2040
|
-
E(
|
|
2054
|
+
default: b(() => [
|
|
2055
|
+
D(E(o(g).tCurd("confirm")), 1)
|
|
2041
2056
|
]),
|
|
2042
2057
|
_: 1
|
|
2043
2058
|
}, 8, ["onClick", "loading"]),
|
|
2044
2059
|
k(f.$slots, "table-op-edit-right", { row: i })
|
|
2045
|
-
], 64)) : (p(), w(
|
|
2046
|
-
o(n)(r.option.table?.add, i) ? (p(),
|
|
2060
|
+
], 64)) : (p(), w($, { key: 1 }, [
|
|
2061
|
+
o(n)(r.option.table?.add, i) ? (p(), y(o(I), {
|
|
2047
2062
|
key: 0,
|
|
2048
2063
|
link: "",
|
|
2049
2064
|
type: "primary",
|
|
2050
|
-
onClick: (
|
|
2065
|
+
onClick: (s) => o(e).update.open(o(d).Insert, i)
|
|
2051
2066
|
}, {
|
|
2052
|
-
default:
|
|
2053
|
-
E(
|
|
2067
|
+
default: b(() => [
|
|
2068
|
+
D(E(o(g).tCurd("add")), 1)
|
|
2054
2069
|
]),
|
|
2055
2070
|
_: 2
|
|
2056
2071
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2057
|
-
o(n)(r.option.table?.view, i) ? (p(),
|
|
2072
|
+
o(n)(r.option.table?.view, i) ? (p(), y(o(I), {
|
|
2058
2073
|
key: 1,
|
|
2059
2074
|
link: "",
|
|
2060
2075
|
type: "primary",
|
|
2061
|
-
onClick: (
|
|
2076
|
+
onClick: (s) => o(e).update.open(o(d).View, i)
|
|
2062
2077
|
}, {
|
|
2063
|
-
default:
|
|
2064
|
-
E(
|
|
2078
|
+
default: b(() => [
|
|
2079
|
+
D(E(o(g).tCurd("view")), 1)
|
|
2065
2080
|
]),
|
|
2066
2081
|
_: 2
|
|
2067
2082
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2068
|
-
o(n)(r.option.table?.update, i) ? (p(),
|
|
2083
|
+
o(n)(r.option.table?.update, i) ? (p(), y(o(I), {
|
|
2069
2084
|
key: 2,
|
|
2070
2085
|
link: "",
|
|
2071
2086
|
type: "warning",
|
|
2072
|
-
onClick: (
|
|
2087
|
+
onClick: (s) => o(e).update.open(o(d).Update, i)
|
|
2073
2088
|
}, {
|
|
2074
|
-
default:
|
|
2075
|
-
E(
|
|
2089
|
+
default: b(() => [
|
|
2090
|
+
D(E(o(g).tCurd("edit")), 1)
|
|
2076
2091
|
]),
|
|
2077
2092
|
_: 2
|
|
2078
2093
|
}, 1032, ["onClick"])) : v("", !0),
|
|
2079
|
-
o(n)(r.option.table?.delete, i) ? (p(),
|
|
2094
|
+
o(n)(r.option.table?.delete, i) ? (p(), y(o(I), {
|
|
2080
2095
|
key: 3,
|
|
2081
2096
|
link: "",
|
|
2082
2097
|
type: "danger",
|
|
2083
|
-
onClick: (
|
|
2098
|
+
onClick: (s) => o(e).remove.open([i])
|
|
2084
2099
|
}, {
|
|
2085
|
-
default:
|
|
2086
|
-
E(
|
|
2100
|
+
default: b(() => [
|
|
2101
|
+
D(E(o(g).tCurd("delete")), 1)
|
|
2087
2102
|
]),
|
|
2088
2103
|
_: 2
|
|
2089
2104
|
}, 1032, ["onClick"])) : v("", !0),
|
|
@@ -2100,7 +2115,7 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2100
2115
|
])
|
|
2101
2116
|
]),
|
|
2102
2117
|
S("div", lt, [
|
|
2103
|
-
r.option.page?.show === void 0 || r.option.page?.show ? (p(),
|
|
2118
|
+
r.option.page?.show === void 0 || r.option.page?.show ? (p(), y(o(he), {
|
|
2104
2119
|
key: 0,
|
|
2105
2120
|
"current-page": o(e).page.num,
|
|
2106
2121
|
"onUpdate:currentPage": m[4] || (m[4] = (i) => o(e).page.num = i),
|
|
@@ -2124,46 +2139,48 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2124
2139
|
title: o(e).update.title,
|
|
2125
2140
|
"before-close": o(e).update.close
|
|
2126
2141
|
}, r.option.dialog), {
|
|
2127
|
-
footer:
|
|
2128
|
-
S("span",
|
|
2142
|
+
footer: b(() => [
|
|
2143
|
+
S("span", ct, [
|
|
2129
2144
|
V(o(I), {
|
|
2130
2145
|
onClick: o(e).update.close
|
|
2131
2146
|
}, {
|
|
2132
|
-
default:
|
|
2133
|
-
E(
|
|
2147
|
+
default: b(() => [
|
|
2148
|
+
D(E(o(g).tCurd("close")), 1)
|
|
2134
2149
|
]),
|
|
2135
2150
|
_: 1
|
|
2136
2151
|
}, 8, ["onClick"]),
|
|
2137
|
-
o(e).update.type !== o(
|
|
2152
|
+
o(e).update.type !== o(d).View ? (p(), y(o(I), {
|
|
2138
2153
|
key: 0,
|
|
2139
2154
|
type: "primary",
|
|
2140
2155
|
onClick: o(e).update.submit,
|
|
2141
2156
|
loading: o(e).update.loading
|
|
2142
2157
|
}, {
|
|
2143
|
-
default:
|
|
2144
|
-
E(
|
|
2158
|
+
default: b(() => [
|
|
2159
|
+
D(E(o(g).tCurd("submit")), 1)
|
|
2145
2160
|
]),
|
|
2146
2161
|
_: 1
|
|
2147
2162
|
}, 8, ["onClick", "loading"])) : v("", !0)
|
|
2148
2163
|
])
|
|
2149
2164
|
]),
|
|
2150
|
-
default:
|
|
2165
|
+
default: b(() => [
|
|
2151
2166
|
V(o(Q), {
|
|
2152
2167
|
ref_key: "ruleFormRef",
|
|
2153
2168
|
ref: u,
|
|
2154
2169
|
model: o(e).update.form,
|
|
2155
2170
|
rules: o(e).update.rules
|
|
2156
2171
|
}, {
|
|
2157
|
-
default:
|
|
2158
|
-
o(e).update.showContent ? (p(!0), w(
|
|
2159
|
-
o(n)(
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2172
|
+
default: b(() => [
|
|
2173
|
+
o(e).update.showContent ? (p(!0), w($, { key: 0 }, M(o(e).update.formColumn, (i) => (p(), w($, null, [
|
|
2174
|
+
o(n)(
|
|
2175
|
+
(() => {
|
|
2176
|
+
const s = [], h = (j) => {
|
|
2177
|
+
j?.item?.children ? h(j.item.children) : s.push(...j.map((L) => L.item?.show?.form));
|
|
2178
|
+
};
|
|
2179
|
+
return h(i), s;
|
|
2180
|
+
})(),
|
|
2181
|
+
o(e).update.form,
|
|
2182
|
+
o(e).update.type
|
|
2183
|
+
) ? (p(), w("div", {
|
|
2167
2184
|
key: 0,
|
|
2168
2185
|
class: P(["row curd-row", {
|
|
2169
2186
|
stripe: r.option.form?.stripe === void 0 ? !0 : r.option.form?.stripe
|
|
@@ -2172,80 +2189,86 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2172
2189
|
k(f.$slots, "form-start", {
|
|
2173
2190
|
row: o(e).update.form
|
|
2174
2191
|
}),
|
|
2175
|
-
(p(!0), w(
|
|
2176
|
-
o(n)(
|
|
2192
|
+
(p(!0), w($, null, M(i, (s) => (p(), w($, null, [
|
|
2193
|
+
o(n)(s.item.show?.form, o(e).update.form, o(e).update.type) ? (p(), w("div", {
|
|
2177
2194
|
key: 0,
|
|
2178
|
-
class: P(
|
|
2195
|
+
class: P([s.item.form.span > 0 ? `col-${o(e).getColumnSpan(s, i)}` : "col", `form-item-col-${s.item.key}`])
|
|
2179
2196
|
}, [
|
|
2180
|
-
|
|
2197
|
+
s.item.children ? (p(!0), w($, { key: 0 }, M(s.children, (h) => (p(), y(o(x), {
|
|
2181
2198
|
class: P({
|
|
2182
|
-
"hide-label": typeof
|
|
2199
|
+
"hide-label": typeof h.item.text?.form?.label == "boolean" ? !h.item.text?.form?.label : !1
|
|
2183
2200
|
}),
|
|
2184
|
-
label: typeof
|
|
2185
|
-
prop:
|
|
2186
|
-
"label-width":
|
|
2201
|
+
label: typeof h.item.text?.form?.label == "string" ? h.item.text?.form?.label : h.item.label,
|
|
2202
|
+
prop: h.item.key,
|
|
2203
|
+
"label-width": h.item.form?.labelWidth || "100px"
|
|
2187
2204
|
}, {
|
|
2188
|
-
default:
|
|
2205
|
+
default: b(() => [
|
|
2189
2206
|
S("div", at, [
|
|
2190
|
-
k(f.$slots, "form-" +
|
|
2207
|
+
k(f.$slots, "form-" + h.item.key + "-start", {
|
|
2191
2208
|
row: o(e).update.form,
|
|
2192
|
-
item:
|
|
2209
|
+
item: h.item
|
|
2193
2210
|
}),
|
|
2194
2211
|
S("div", nt, [
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2212
|
+
S("div", null, [
|
|
2213
|
+
k(f.$slots, "form-" + h.item.key, {
|
|
2214
|
+
row: o(e).update.form,
|
|
2215
|
+
item: h.item
|
|
2216
|
+
}, () => [
|
|
2217
|
+
V(le, {
|
|
2218
|
+
conf: o(e),
|
|
2219
|
+
item: s
|
|
2220
|
+
}, null, 8, ["conf", "item"])
|
|
2221
|
+
]),
|
|
2222
|
+
k(f.$slots, "form-" + h.item.key + "-right", {
|
|
2223
|
+
row: o(e).update.form,
|
|
2224
|
+
item: h.item
|
|
2225
|
+
})
|
|
2203
2226
|
]),
|
|
2204
|
-
|
|
2205
|
-
row: o(e).update.form,
|
|
2206
|
-
item: y.item
|
|
2207
|
-
})
|
|
2227
|
+
h.item.form?.tipText ? (p(), w("div", it, E(h.item.form?.tipText), 1)) : v("", !0)
|
|
2208
2228
|
]),
|
|
2209
|
-
k(f.$slots, "form-" +
|
|
2229
|
+
k(f.$slots, "form-" + h.item.key + "-end", {
|
|
2210
2230
|
row: o(e).update.form,
|
|
2211
|
-
item:
|
|
2231
|
+
item: h.item
|
|
2212
2232
|
})
|
|
2213
2233
|
])
|
|
2214
2234
|
]),
|
|
2215
2235
|
_: 2
|
|
2216
|
-
}, 1032, ["class", "label", "prop", "label-width"]))), 256)) : (p(),
|
|
2236
|
+
}, 1032, ["class", "label", "prop", "label-width"]))), 256)) : (p(), y(o(x), {
|
|
2217
2237
|
key: 1,
|
|
2218
2238
|
class: P({
|
|
2219
|
-
"hide-label": typeof
|
|
2239
|
+
"hide-label": typeof s.item.text?.form?.label == "boolean" ? !s.item.text?.form?.label : !1
|
|
2220
2240
|
}),
|
|
2221
|
-
label: typeof
|
|
2222
|
-
prop:
|
|
2223
|
-
"label-width":
|
|
2241
|
+
label: typeof s.item.text?.form?.label == "string" ? s.item.text?.form?.label : s.item.label,
|
|
2242
|
+
prop: s.item.key,
|
|
2243
|
+
"label-width": s.item.form?.labelWidth || "100px"
|
|
2224
2244
|
}, {
|
|
2225
|
-
default:
|
|
2226
|
-
S("div",
|
|
2227
|
-
k(f.$slots, "form-" +
|
|
2245
|
+
default: b(() => [
|
|
2246
|
+
S("div", rt, [
|
|
2247
|
+
k(f.$slots, "form-" + s.item.key + "-start", {
|
|
2228
2248
|
row: o(e).update.form,
|
|
2229
|
-
item:
|
|
2249
|
+
item: s.item
|
|
2230
2250
|
}),
|
|
2231
|
-
S("div",
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2251
|
+
S("div", st, [
|
|
2252
|
+
S("div", dt, [
|
|
2253
|
+
k(f.$slots, "form-" + s.item.key, {
|
|
2254
|
+
row: o(e).update.form,
|
|
2255
|
+
item: s.item
|
|
2256
|
+
}, () => [
|
|
2257
|
+
V(le, {
|
|
2258
|
+
conf: o(e),
|
|
2259
|
+
item: s
|
|
2260
|
+
}, null, 8, ["conf", "item"])
|
|
2261
|
+
]),
|
|
2262
|
+
k(f.$slots, "form-" + s.item.key + "-right", {
|
|
2263
|
+
row: o(e).update.form,
|
|
2264
|
+
item: s.item
|
|
2265
|
+
})
|
|
2240
2266
|
]),
|
|
2241
|
-
|
|
2242
|
-
row: o(e).update.form,
|
|
2243
|
-
item: d.item
|
|
2244
|
-
})
|
|
2267
|
+
s.item.form?.tipText ? (p(), w("div", ut, E(s.item.form?.tipText), 1)) : v("", !0)
|
|
2245
2268
|
]),
|
|
2246
|
-
k(f.$slots, "form-" +
|
|
2269
|
+
k(f.$slots, "form-" + s.item.key + "-end", {
|
|
2247
2270
|
row: o(e).update.form,
|
|
2248
|
-
item:
|
|
2271
|
+
item: s.item
|
|
2249
2272
|
})
|
|
2250
2273
|
])
|
|
2251
2274
|
]),
|
|
@@ -2270,13 +2293,13 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2270
2293
|
title: o(e).remove.title,
|
|
2271
2294
|
"close-on-click-modal": !1
|
|
2272
2295
|
}, {
|
|
2273
|
-
footer:
|
|
2274
|
-
S("span",
|
|
2296
|
+
footer: b(() => [
|
|
2297
|
+
S("span", ft, [
|
|
2275
2298
|
V(o(I), {
|
|
2276
2299
|
onClick: o(e).remove.close
|
|
2277
2300
|
}, {
|
|
2278
|
-
default:
|
|
2279
|
-
E(
|
|
2301
|
+
default: b(() => [
|
|
2302
|
+
D(E(o(g).tCurd("close")), 1)
|
|
2280
2303
|
]),
|
|
2281
2304
|
_: 1
|
|
2282
2305
|
}, 8, ["onClick"]),
|
|
@@ -2285,15 +2308,15 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2285
2308
|
onClick: o(e).remove.submit,
|
|
2286
2309
|
loading: o(e).remove.loading
|
|
2287
2310
|
}, {
|
|
2288
|
-
default:
|
|
2289
|
-
E(
|
|
2311
|
+
default: b(() => [
|
|
2312
|
+
D(E(o(g).tCurd("confirmDelete")), 1)
|
|
2290
2313
|
]),
|
|
2291
2314
|
_: 1
|
|
2292
2315
|
}, 8, ["onClick", "loading"])
|
|
2293
2316
|
])
|
|
2294
2317
|
]),
|
|
2295
|
-
default:
|
|
2296
|
-
S("div", null,
|
|
2318
|
+
default: b(() => [
|
|
2319
|
+
S("div", null, E(o(g).tCurd("confirmDeleteMessage", o(e).remove.items.length)), 1)
|
|
2297
2320
|
]),
|
|
2298
2321
|
_: 1
|
|
2299
2322
|
}, 8, ["modelValue", "title"]),
|
|
@@ -2305,71 +2328,71 @@ const Ae = /* @__PURE__ */ se(Te, [["render", Re]]), Ke = { class: "row flex-cen
|
|
|
2305
2328
|
};
|
|
2306
2329
|
}
|
|
2307
2330
|
});
|
|
2308
|
-
class
|
|
2331
|
+
class gt {
|
|
2309
2332
|
/**
|
|
2310
2333
|
* 通过远程 URL 下载文件,自动创建临时 `<a>` 标签触发浏览器下载
|
|
2311
2334
|
*
|
|
2312
2335
|
* @param href - 文件的远程地址
|
|
2313
2336
|
* @param name - 下载后的文件名,默认 `'download.png'`
|
|
2314
2337
|
*/
|
|
2315
|
-
static async download(a,
|
|
2338
|
+
static async download(a, d = "download.png") {
|
|
2316
2339
|
const t = document.createElement("a");
|
|
2317
|
-
t.style.display = "none", t.href = a, t.setAttribute("download",
|
|
2340
|
+
t.style.display = "none", t.href = a, t.setAttribute("download", d), typeof t.download > "u" && t.setAttribute("target", "_blank"), document.body.appendChild(t), t.click(), document.body.removeChild(t), window.URL.revokeObjectURL(a);
|
|
2318
2341
|
}
|
|
2319
2342
|
/**
|
|
2320
2343
|
* 将json对象或者json数组导出为json文件保存
|
|
2321
2344
|
* @param data
|
|
2322
2345
|
* @param name
|
|
2323
2346
|
*/
|
|
2324
|
-
static exportJSONFile = (a,
|
|
2347
|
+
static exportJSONFile = (a, d) => {
|
|
2325
2348
|
const t = new Blob([JSON.stringify(a)], { type: "application/json" }), n = URL.createObjectURL(t), e = document.createElement("a");
|
|
2326
|
-
e.href = n, e.download = `${
|
|
2349
|
+
e.href = n, e.download = `${d || "config"}.json`, e.click();
|
|
2327
2350
|
};
|
|
2328
2351
|
/**
|
|
2329
2352
|
* 导入文件内容,默认为json
|
|
2330
2353
|
* @param param
|
|
2331
2354
|
* @returns
|
|
2332
2355
|
*/
|
|
2333
|
-
static importFile = async (a) => new Promise((
|
|
2356
|
+
static importFile = async (a) => new Promise((d, t) => {
|
|
2334
2357
|
const n = document.createElement("input");
|
|
2335
2358
|
n.type = "file";
|
|
2336
2359
|
const e = a?.accept || ".json";
|
|
2337
2360
|
n.accept = e, n.style.display = "none", n.onchange = (l) => {
|
|
2338
2361
|
const u = l.target.files[0];
|
|
2339
2362
|
if (!u) {
|
|
2340
|
-
|
|
2363
|
+
U.fail("未选择文件"), t("未选择文件");
|
|
2341
2364
|
return;
|
|
2342
2365
|
}
|
|
2343
2366
|
const f = new FileReader();
|
|
2344
2367
|
f.onload = async (m) => {
|
|
2345
2368
|
const c = e == ".json" ? JSON.parse(m.target.result) : m.target.result;
|
|
2346
|
-
|
|
2369
|
+
d(c);
|
|
2347
2370
|
}, f.onerror = () => {
|
|
2348
|
-
|
|
2371
|
+
U.fail("文件读取失败"), t("文件读取失败");
|
|
2349
2372
|
}, f.readAsText(u), document.body.removeChild(n);
|
|
2350
2373
|
}, document.body.appendChild(n), n.click();
|
|
2351
2374
|
});
|
|
2352
2375
|
}
|
|
2353
|
-
const
|
|
2354
|
-
if (r.component("TCurd",
|
|
2355
|
-
|
|
2356
|
-
for (const
|
|
2357
|
-
r.component(
|
|
2376
|
+
const mt = (r, a) => {
|
|
2377
|
+
if (r.component("TCurd", pt), r.component("TFormList", oe), r.component("TColumn", Se), a?.customComponent) {
|
|
2378
|
+
z.customComponent = a.customComponent;
|
|
2379
|
+
for (const d in a.customComponent)
|
|
2380
|
+
r.component(d, a.customComponent[d]);
|
|
2358
2381
|
}
|
|
2359
|
-
},
|
|
2360
|
-
install:
|
|
2382
|
+
}, wt = {
|
|
2383
|
+
install: mt
|
|
2361
2384
|
};
|
|
2362
2385
|
export {
|
|
2363
2386
|
R as ArrUtil,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2387
|
+
$e as ExcelUtil,
|
|
2388
|
+
Se as TColumn,
|
|
2389
|
+
pt as TCurd,
|
|
2390
|
+
gt as TFile,
|
|
2391
|
+
z as TForm,
|
|
2369
2392
|
O as TFormConfig,
|
|
2370
2393
|
g as TFormI18n,
|
|
2371
2394
|
oe as TFormList,
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2395
|
+
U as TSys,
|
|
2396
|
+
wt as default,
|
|
2397
|
+
mt as install
|
|
2375
2398
|
};
|