ling-yun-custom-components 0.0.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/es/BatchImport.mjs +208 -0
- package/es/BuildComponents.mjs +190 -0
- package/es/CustomDialog.mjs +7 -0
- package/es/CustomDropdown.mjs +145 -0
- package/es/CustomPagination.mjs +7 -0
- package/es/CustomSelect.mjs +7 -0
- package/es/CustomTab.mjs +33 -0
- package/es/CustomTitle.mjs +7 -0
- package/es/FileList.mjs +7 -0
- package/es/GradientButton.mjs +120 -0
- package/es/IconEmpty.mjs +7 -0
- package/es/IconRenderer.mjs +42 -0
- package/es/IconSelect.mjs +120 -0
- package/es/PaginationTable.mjs +407 -0
- package/es/SearchBar.mjs +7 -0
- package/es/TreeSelect.mjs +406 -0
- package/es/TreeShowSelect.mjs +82 -0
- package/es/UpdatePasswordDialog.mjs +119 -0
- package/es/UploadFile.mjs +7 -0
- package/es/assets/BuildComponents.css +1 -0
- package/es/assets/CustomDropdown.css +1 -0
- package/es/assets/CustomTab.css +1 -0
- package/es/assets/GradientButton.css +1 -0
- package/es/assets/IconSelect.css +1 -0
- package/es/assets/PaginationTable.css +1 -0
- package/es/assets/TreeSelect.css +1 -0
- package/es/assets/TreeShowSelect.css +1 -0
- package/es/assets/UpdatePasswordDialog.css +1 -0
- package/es/assets/layout.css +0 -0
- package/es/assets/layout2.css +1 -0
- package/es/assets/layout3.css +1 -0
- package/es/assets/layout4.css +1 -0
- package/es/assets/layout5.css +1 -0
- package/es/assets/layout6.css +1 -0
- package/es/chunks/_plugin-vue_export-helper.CHgC5LLL.js +9 -0
- package/es/chunks/global.DVwnOczb.js +7828 -0
- package/es/chunks/index.D4Kbv-m1.js +8991 -0
- package/es/chunks/index.DfOANPhX.js +1729 -0
- package/es/chunks/index.DlooXR0t.js +9576 -0
- package/es/chunks/index.bCzIhWFw.js +7 -0
- package/es/chunks/layout.1y3OJ-ea.js +230 -0
- package/es/chunks/layout.2Mabaug0.js +121 -0
- package/es/chunks/layout.6MxjcpGc.js +584 -0
- package/es/chunks/layout.BJE8rMzK.js +230 -0
- package/es/chunks/layout.BKJPyxR8.js +39 -0
- package/es/chunks/layout.C0UEMbnF.js +98 -0
- package/es/chunks/layout.CTQtuC78.js +584 -0
- package/es/chunks/layout.CUOtHOHG.js +66 -0
- package/es/chunks/layout.CiNI5oQK.js +149 -0
- package/es/chunks/layout.CnANFnM1.js +584 -0
- package/es/chunks/layout.CtWHo87D.js +121 -0
- package/es/chunks/layout.Day1LJyl.js +234 -0
- package/es/chunks/layout.DeAFov0o.js +234 -0
- package/es/chunks/layout.Dvw3u-s5.js +234 -0
- package/es/chunks/layout.LCKaV7EX.js +230 -0
- package/es/chunks/layout.ZxPdKhRp.js +149 -0
- package/es/chunks/layout._A_rHZM7.js +149 -0
- package/es/chunks/layout.f58eO4Hr.js +98 -0
- package/es/chunks/layout.t3qD0LTW.js +121 -0
- package/es/chunks/layout.ypvwQzq5.js +98 -0
- package/es/index.mjs +81 -0
- package/lib/BatchImport.js +1 -0
- package/lib/BuildComponents.js +1 -0
- package/lib/CustomDialog.js +1 -0
- package/lib/CustomDropdown.js +1 -0
- package/lib/CustomPagination.js +1 -0
- package/lib/CustomSelect.js +1 -0
- package/lib/CustomTab.js +1 -0
- package/lib/CustomTitle.js +1 -0
- package/lib/FileList.js +1 -0
- package/lib/GradientButton.js +1 -0
- package/lib/IconEmpty.js +1 -0
- package/lib/IconRenderer.js +1 -0
- package/lib/IconSelect.js +1 -0
- package/lib/PaginationTable.js +1 -0
- package/lib/SearchBar.js +1 -0
- package/lib/TreeSelect.js +1 -0
- package/lib/TreeShowSelect.js +1 -0
- package/lib/UpdatePasswordDialog.js +1 -0
- package/lib/UploadFile.js +1 -0
- package/lib/assets/BuildComponents.css +1 -0
- package/lib/assets/CustomDropdown.css +1 -0
- package/lib/assets/CustomTab.css +1 -0
- package/lib/assets/GradientButton.css +1 -0
- package/lib/assets/IconSelect.css +1 -0
- package/lib/assets/PaginationTable.css +1 -0
- package/lib/assets/TreeSelect.css +1 -0
- package/lib/assets/TreeShowSelect.css +1 -0
- package/lib/assets/UpdatePasswordDialog.css +1 -0
- package/lib/assets/layout.css +0 -0
- package/lib/assets/layout2.css +1 -0
- package/lib/assets/layout3.css +1 -0
- package/lib/assets/layout4.css +1 -0
- package/lib/assets/layout5.css +1 -0
- package/lib/assets/layout6.css +1 -0
- package/lib/chunks/_plugin-vue_export-helper.BHFhmbuH.js +1 -0
- package/lib/chunks/global.Cv8u--Cy.js +1 -0
- package/lib/chunks/index.Bixsw9fA.js +23 -0
- package/lib/chunks/index.CkihWzK6.js +1 -0
- package/lib/chunks/index.CrvqvcN9.js +23 -0
- package/lib/chunks/index.DJKAT9lI.js +1 -0
- package/lib/chunks/layout.-yZzrp74.js +1 -0
- package/lib/chunks/layout.2PAIPzYY.js +1 -0
- package/lib/chunks/layout.5iOiFlVu.js +1 -0
- package/lib/chunks/layout.B-T_NE6r.js +1 -0
- package/lib/chunks/layout.BBNd1hLQ.js +1 -0
- package/lib/chunks/layout.BNJsxQ2g.js +1 -0
- package/lib/chunks/layout.BSF3ruxz.js +1 -0
- package/lib/chunks/layout.BXdjRFbn.js +1 -0
- package/lib/chunks/layout.BhL14Rqh.js +1 -0
- package/lib/chunks/layout.BmQYiD_b.js +1 -0
- package/lib/chunks/layout.CDg3sCTi.js +1 -0
- package/lib/chunks/layout.CeVldGUL.js +1 -0
- package/lib/chunks/layout.CjJiAY0w.js +1 -0
- package/lib/chunks/layout.CoSBrO12.js +1 -0
- package/lib/chunks/layout.CwA4IJ1g.js +1 -0
- package/lib/chunks/layout.DDTIwGYp.js +1 -0
- package/lib/chunks/layout.DOS2ezSW.js +1 -0
- package/lib/chunks/layout.D_TxPvRy.js +1 -0
- package/lib/chunks/layout.DfiLurg1.js +1 -0
- package/lib/chunks/layout.gqpUcAHO.js +1 -0
- package/lib/index.js +1 -0
- package/package.json +205 -0
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
import { w as ye } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { useSlots as Se, computed as C, ref as v, watch as ee, onMounted as be, nextTick as Ce, createElementBlock as w, openBlock as g, createElementVNode as m, createCommentVNode as B, unref as r, renderSlot as A, Fragment as xe, createBlock as te, withCtx as E, createTextVNode as le, toDisplayString as Te, createVNode as K, createSlots as we, renderList as Be, normalizeProps as Re, guardReactiveProps as ze, h as W } from "vue";
|
|
3
|
+
import { ElButton as ae, ElAutoResizer as ke, ElTableV2 as Ne, ElCheckbox as Pe } from "element-plus";
|
|
4
|
+
import { b as ne, c as Ae, a as Ee } from "./chunks/index.D4Kbv-m1.js";
|
|
5
|
+
import { _ as Ie } from "./chunks/layout.ypvwQzq5.js";
|
|
6
|
+
import { _ as _e } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
7
|
+
import './assets/PaginationTable.css';const De = { class: "flex h-full flex-col" }, je = {
|
|
8
|
+
class: "w-full flex justify-between overflow-hidden",
|
|
9
|
+
style: { height: "auto" }
|
|
10
|
+
}, Oe = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "flex-1 overflow-hidden"
|
|
13
|
+
}, qe = {
|
|
14
|
+
class: "flex",
|
|
15
|
+
style: { width: "auto", gap: "10px" }
|
|
16
|
+
}, Ke = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "flex items-center mg-b-18"
|
|
19
|
+
}, We = { class: "fz-12 text-74798c" }, Fe = { class: "btn-group mg-l-12" }, Me = { class: "w-full flex-1 overflow-hidden flex flex-col" }, $e = { class: "flex-1 overflow-hidden TABLE-AREA" }, Le = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "flex justify-end mg-t-20",
|
|
22
|
+
style: { height: "auto" }
|
|
23
|
+
}, Ve = /* @__PURE__ */ Object.assign({
|
|
24
|
+
name: "PaginationTable"
|
|
25
|
+
}, {
|
|
26
|
+
__name: "layout",
|
|
27
|
+
props: {
|
|
28
|
+
// 是否有分页
|
|
29
|
+
isPagination: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
},
|
|
33
|
+
// 总数
|
|
34
|
+
total: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 0
|
|
37
|
+
},
|
|
38
|
+
// 表格数据
|
|
39
|
+
tableData: {
|
|
40
|
+
type: Array,
|
|
41
|
+
default: () => []
|
|
42
|
+
},
|
|
43
|
+
// 分页配置
|
|
44
|
+
pagination: {
|
|
45
|
+
type: Object,
|
|
46
|
+
default: () => Ae
|
|
47
|
+
},
|
|
48
|
+
// 查询参数
|
|
49
|
+
params: {
|
|
50
|
+
type: Object,
|
|
51
|
+
default: () => {
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
// 请求的接口
|
|
55
|
+
requestFn: {
|
|
56
|
+
type: Function
|
|
57
|
+
},
|
|
58
|
+
// 表格的列
|
|
59
|
+
columns: {
|
|
60
|
+
type: Array,
|
|
61
|
+
default: () => []
|
|
62
|
+
},
|
|
63
|
+
// 是否有批量选择
|
|
64
|
+
hasBatchSelect: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
// 标记哪个行可以被展开
|
|
69
|
+
expandColumnKey: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: ""
|
|
72
|
+
},
|
|
73
|
+
// 表格列宽度的比例(索引从0开始)
|
|
74
|
+
// 0: 0.3,
|
|
75
|
+
// 1: 0.27,
|
|
76
|
+
// 2: 0.2,
|
|
77
|
+
// 3: 0.15,
|
|
78
|
+
// 4: 0.08,
|
|
79
|
+
columnWidthMap: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default: () => {
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
tableDataKey: {
|
|
85
|
+
type: String,
|
|
86
|
+
default: "list"
|
|
87
|
+
},
|
|
88
|
+
// 表格总宽度
|
|
89
|
+
tableDomWidth: {
|
|
90
|
+
type: Number,
|
|
91
|
+
default: 0
|
|
92
|
+
},
|
|
93
|
+
// 页码和分页大小映射
|
|
94
|
+
pageMapping: {
|
|
95
|
+
type: Object,
|
|
96
|
+
default: () => ({
|
|
97
|
+
pageSize: "pageSize",
|
|
98
|
+
pageNum: "pageNum"
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
emits: [
|
|
103
|
+
ne.paginationChange,
|
|
104
|
+
"updateTableData",
|
|
105
|
+
"handleTableSelect",
|
|
106
|
+
"handleBatchDelete"
|
|
107
|
+
],
|
|
108
|
+
setup(h, { expose: se, emit: ue }) {
|
|
109
|
+
const R = ue, u = h, I = Se(), z = C(() => typeof u.requestFn == "function"), c = C({
|
|
110
|
+
get: () => z.value ? y.value : u.tableData,
|
|
111
|
+
set: (e) => {
|
|
112
|
+
z.value ? y.value = e : R("updateTableData", e);
|
|
113
|
+
}
|
|
114
|
+
}), _ = v(0), F = C(() => z.value ? _.value : u.total), y = v([]), d = C(() => u.pageMapping.pageNum), k = C(() => u.pageMapping.pageSize), D = {
|
|
115
|
+
[d.value]: 1,
|
|
116
|
+
[k.value]: 20
|
|
117
|
+
}, i = v({
|
|
118
|
+
...D
|
|
119
|
+
}), f = v([]), n = v([]), M = v([]), S = v({}), $ = C(() => ie(S.value));
|
|
120
|
+
function ie(e) {
|
|
121
|
+
const t = /* @__PURE__ */ new Set();
|
|
122
|
+
for (const l in e)
|
|
123
|
+
e.hasOwnProperty(l) && e[l].forEach((a) => {
|
|
124
|
+
t.add(a.id);
|
|
125
|
+
});
|
|
126
|
+
return t;
|
|
127
|
+
}
|
|
128
|
+
const L = ({ value: e, intermediate: t = !1, onChange: l }) => W(Pe, {
|
|
129
|
+
onChange: l,
|
|
130
|
+
modelValue: e,
|
|
131
|
+
indeterminate: t
|
|
132
|
+
}), oe = (e, t) => {
|
|
133
|
+
if (e.selected = t, t ? n.value.some((l) => l.id === e.id) || n.value.push(e) : n.value = n.value.filter(({ id: l }) => l !== e.id), e.children && e.children.length > 0) {
|
|
134
|
+
const l = (a) => {
|
|
135
|
+
a.forEach((s) => {
|
|
136
|
+
s.selected = t, t ? n.value.some((o) => o.id === s.id) || n.value.push(s) : n.value = n.value.filter(({ id: o }) => o !== s.id), s.children && s.children.length > 0 && l(s.children);
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
l(e.children);
|
|
140
|
+
}
|
|
141
|
+
e.parentId && V(e.parentId), H(), x();
|
|
142
|
+
}, V = (e) => {
|
|
143
|
+
const t = U(c.value, e);
|
|
144
|
+
if (!t) return;
|
|
145
|
+
const l = t.children.every((a) => a.selected);
|
|
146
|
+
l && !t.selected ? (t.selected = !0, n.value.some((a) => a.id === t.id) || n.value.push(t)) : !l && t.selected && (t.selected = !1, n.value = n.value.filter(({ id: a }) => a !== t.id)), t.parentId && V(t.parentId);
|
|
147
|
+
}, U = (e, t) => {
|
|
148
|
+
for (const l of e) {
|
|
149
|
+
if (l.id === t) return l;
|
|
150
|
+
if (l.children) {
|
|
151
|
+
const a = U(l.children, t);
|
|
152
|
+
if (a) return a;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
};
|
|
157
|
+
function H() {
|
|
158
|
+
S.value[i.value[d.value]] = G(
|
|
159
|
+
c.value
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
function G(e) {
|
|
163
|
+
let t = [];
|
|
164
|
+
return e.forEach((l) => {
|
|
165
|
+
l.selected && t.push(l), l.children && l.children.length > 0 && (t = t.concat(G(l.children)));
|
|
166
|
+
}), t;
|
|
167
|
+
}
|
|
168
|
+
function j(e, t) {
|
|
169
|
+
e.selected = t, e.children && e.children.length > 0 && e.children.forEach((l) => j(l, t));
|
|
170
|
+
}
|
|
171
|
+
const re = (e) => {
|
|
172
|
+
const t = c.value.map((l) => (j(l, e), l));
|
|
173
|
+
return c.value = [...t], H(), n.value = e ? [...Object.values(S.value).flat()] : [], x(), [...n.value];
|
|
174
|
+
}, ce = () => {
|
|
175
|
+
f.value.unshift({
|
|
176
|
+
key: "selection",
|
|
177
|
+
width: 50,
|
|
178
|
+
cellRenderer: (e) => {
|
|
179
|
+
const { rowData: t } = e, a = t.children && t.children.length > 0 ? de(t) : !1;
|
|
180
|
+
return W(L, {
|
|
181
|
+
value: t.selected,
|
|
182
|
+
intermediate: a,
|
|
183
|
+
onChange: (s) => oe(t, s)
|
|
184
|
+
});
|
|
185
|
+
},
|
|
186
|
+
headerCellRenderer: () => {
|
|
187
|
+
const e = r(c), t = e.every((a) => {
|
|
188
|
+
const s = a.selected, o = J(a);
|
|
189
|
+
return s && o;
|
|
190
|
+
}), l = e.some((a) => a.selected || Q(a));
|
|
191
|
+
return W(L, {
|
|
192
|
+
value: t,
|
|
193
|
+
intermediate: l && !t,
|
|
194
|
+
// 目前是当前页全选就是全选状态,也就是每页的全选状态单独的
|
|
195
|
+
onChange: re
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
}, de = (e) => {
|
|
200
|
+
if (!e.children || e.children.length === 0)
|
|
201
|
+
return !1;
|
|
202
|
+
const t = e.children.filter((l) => l.selected).length;
|
|
203
|
+
return t > 0 && t < e.children.length;
|
|
204
|
+
};
|
|
205
|
+
function J(e) {
|
|
206
|
+
return e.children?.length ? !!e.selected && e.children.every(J) : !!e.selected;
|
|
207
|
+
}
|
|
208
|
+
function Q(e) {
|
|
209
|
+
return e.selected ? !0 : e.children?.some(Q) || !1;
|
|
210
|
+
}
|
|
211
|
+
function X(e) {
|
|
212
|
+
return e.map((t) => {
|
|
213
|
+
const l = { ...t, selected: !1 };
|
|
214
|
+
return l.children && (l.children = X(l.children)), l;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
const p = v(!1), fe = () => {
|
|
218
|
+
p.value = !0, ce();
|
|
219
|
+
}, O = () => {
|
|
220
|
+
p.value = !1, n.value = [], c.value = c.value.map((e) => (j(e, !1), e)), S.value = {}, y.value = X(y.value), f.value.shift(), x();
|
|
221
|
+
}, ve = () => {
|
|
222
|
+
R("handleBatchDelete", {
|
|
223
|
+
selectedRows: Object.values(S.value).flat(),
|
|
224
|
+
// getAllSelectedNodes(finalTableData.value)
|
|
225
|
+
cb: () => {
|
|
226
|
+
O(), x();
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}, he = () => {
|
|
230
|
+
n.value = [], x();
|
|
231
|
+
};
|
|
232
|
+
function x() {
|
|
233
|
+
const e = Object.values(S.value).flat();
|
|
234
|
+
R("handleTableSelect", {
|
|
235
|
+
originNodeData: n.value,
|
|
236
|
+
allSelectedNodes: e,
|
|
237
|
+
// 所有选中的节点包含父节点
|
|
238
|
+
selectedSubNodes: e.filter((t) => !t.children)
|
|
239
|
+
// 所有选中的子节点
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
const T = () => {
|
|
243
|
+
z.value ? u.requestFn({
|
|
244
|
+
...u.params,
|
|
245
|
+
...i.value
|
|
246
|
+
}).then((e) => {
|
|
247
|
+
y.value = q(
|
|
248
|
+
e?.data[u.tableDataKey],
|
|
249
|
+
i.value[d.value],
|
|
250
|
+
$.value
|
|
251
|
+
) || [], _.value = e?.data?.total;
|
|
252
|
+
}) : (y.value = q(
|
|
253
|
+
u.tableData,
|
|
254
|
+
i.value[d.value],
|
|
255
|
+
$.value
|
|
256
|
+
), _.value = u.total);
|
|
257
|
+
};
|
|
258
|
+
function q(e, t, l, a = !1) {
|
|
259
|
+
return e.map((s) => {
|
|
260
|
+
const o = l.has(s.id) || a, b = {
|
|
261
|
+
...s,
|
|
262
|
+
selected: o
|
|
263
|
+
};
|
|
264
|
+
return b.children && (b.children = q(
|
|
265
|
+
b.children,
|
|
266
|
+
t,
|
|
267
|
+
l,
|
|
268
|
+
o
|
|
269
|
+
// 将当前选中状态传递给子节点
|
|
270
|
+
)), b;
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
const pe = () => {
|
|
274
|
+
i.value[d.value] = D[d.value], T();
|
|
275
|
+
}, ge = () => {
|
|
276
|
+
i.value = { ...D }, T();
|
|
277
|
+
}, Y = (e) => {
|
|
278
|
+
e === "size" && (i.value[d.value] = 1), T(), R(ne.paginationChange, i.value);
|
|
279
|
+
}, N = v(0), P = () => {
|
|
280
|
+
let e = N.value;
|
|
281
|
+
e = p.value ? e - 50 : e;
|
|
282
|
+
let t = r(f);
|
|
283
|
+
p.value && (t = r(f).slice(1));
|
|
284
|
+
const l = 1 / Ee();
|
|
285
|
+
t = t.map((a, s) => (u.columnWidthMap ? a.width = e * u.columnWidthMap[s] * l : (a.width = e * (100 / t.length / 100) * l, a.width < 100 && (a.width = 100 * l)), a)), p.value ? f.value = [r(f)[0], ...t] : f.value = [...t];
|
|
286
|
+
};
|
|
287
|
+
ee(
|
|
288
|
+
() => p.value,
|
|
289
|
+
() => {
|
|
290
|
+
P();
|
|
291
|
+
}
|
|
292
|
+
), ee(
|
|
293
|
+
() => u.tableDomWidth,
|
|
294
|
+
(e) => {
|
|
295
|
+
e && (N.value = e, P());
|
|
296
|
+
}
|
|
297
|
+
);
|
|
298
|
+
function me(e, t = 200) {
|
|
299
|
+
let l;
|
|
300
|
+
return function() {
|
|
301
|
+
clearTimeout(l), l = setTimeout(() => {
|
|
302
|
+
e.apply(this, arguments);
|
|
303
|
+
}, t);
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
const Z = me(() => {
|
|
307
|
+
N.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width, P();
|
|
308
|
+
}, 200);
|
|
309
|
+
return be(() => {
|
|
310
|
+
T(), f.value = u.columns, N.value = document.querySelector(".TABLE-AREA").getBoundingClientRect().width, Ce(() => {
|
|
311
|
+
P();
|
|
312
|
+
}), window.addEventListener("resize", Z);
|
|
313
|
+
}), se({
|
|
314
|
+
getTableList: T,
|
|
315
|
+
search: pe,
|
|
316
|
+
reset: ge,
|
|
317
|
+
initBatchSelect: he,
|
|
318
|
+
handleCancelSelect: O,
|
|
319
|
+
handleResize: Z
|
|
320
|
+
}), (e, t) => (g(), w("div", De, [
|
|
321
|
+
m("div", je, [
|
|
322
|
+
r(I)["filter-left"] ? (g(), w("div", Oe, [
|
|
323
|
+
A(e.$slots, "filter-left", {}, void 0, !0)
|
|
324
|
+
])) : B("", !0),
|
|
325
|
+
m("div", qe, [
|
|
326
|
+
h.hasBatchSelect && c.value.length ? (g(), w(xe, { key: 0 }, [
|
|
327
|
+
p.value ? (g(), w("div", Ke, [
|
|
328
|
+
m("div", We, "已选" + Te(n.value.length) + "条数据", 1),
|
|
329
|
+
m("div", {
|
|
330
|
+
class: "fz-12 text-3b64ff mg-l-4 pointer",
|
|
331
|
+
onClick: O
|
|
332
|
+
}, "取消选择"),
|
|
333
|
+
A(e.$slots, "btn-group", {}, () => [
|
|
334
|
+
m("div", Fe, [
|
|
335
|
+
K(r(ae), {
|
|
336
|
+
type: "danger",
|
|
337
|
+
onClick: ve,
|
|
338
|
+
disabled: !n.value.length
|
|
339
|
+
}, {
|
|
340
|
+
default: E(() => [...t[6] || (t[6] = [
|
|
341
|
+
le("删除", -1)
|
|
342
|
+
])]),
|
|
343
|
+
_: 1
|
|
344
|
+
}, 8, ["disabled"])
|
|
345
|
+
])
|
|
346
|
+
], !0)
|
|
347
|
+
])) : (g(), te(r(ae), {
|
|
348
|
+
key: 0,
|
|
349
|
+
type: "default",
|
|
350
|
+
onClick: fe
|
|
351
|
+
}, {
|
|
352
|
+
default: E(() => [...t[5] || (t[5] = [
|
|
353
|
+
le(" 批量选择 ", -1)
|
|
354
|
+
])]),
|
|
355
|
+
_: 1
|
|
356
|
+
}))
|
|
357
|
+
], 64)) : B("", !0),
|
|
358
|
+
r(I)["filter-right"] ? A(e.$slots, "filter-right", { key: 1 }, void 0, !0) : B("", !0)
|
|
359
|
+
])
|
|
360
|
+
]),
|
|
361
|
+
m("div", Me, [
|
|
362
|
+
m("div", $e, [
|
|
363
|
+
K(r(ke), null, {
|
|
364
|
+
default: E(({ width: l, height: a }) => [
|
|
365
|
+
K(r(Ne), {
|
|
366
|
+
"expanded-row-keys": M.value,
|
|
367
|
+
"onUpdate:expandedRowKeys": t[0] || (t[0] = (s) => M.value = s),
|
|
368
|
+
"expand-column-key": h.expandColumnKey,
|
|
369
|
+
columns: f.value,
|
|
370
|
+
data: c.value,
|
|
371
|
+
width: l,
|
|
372
|
+
height: a,
|
|
373
|
+
fixed: ""
|
|
374
|
+
}, we({ _: 2 }, [
|
|
375
|
+
Be(r(I), (s, o) => ({
|
|
376
|
+
name: o,
|
|
377
|
+
fn: E((b) => [
|
|
378
|
+
A(e.$slots, o, Re(ze(b)), void 0, !0)
|
|
379
|
+
])
|
|
380
|
+
}))
|
|
381
|
+
]), 1032, ["expanded-row-keys", "expand-column-key", "columns", "data", "width", "height"])
|
|
382
|
+
]),
|
|
383
|
+
_: 3
|
|
384
|
+
})
|
|
385
|
+
]),
|
|
386
|
+
h.isPagination && F.value > i.value[k.value] ? (g(), w("div", Le, [
|
|
387
|
+
h.isPagination ? (g(), te(Ie, {
|
|
388
|
+
key: 0,
|
|
389
|
+
"current-page": i.value[d.value],
|
|
390
|
+
"onUpdate:currentPage": t[1] || (t[1] = (l) => i.value[d.value] = l),
|
|
391
|
+
"page-size": i.value[k.value],
|
|
392
|
+
"onUpdate:pageSize": t[2] || (t[2] = (l) => i.value[k.value] = l),
|
|
393
|
+
"page-sizes": h.pagination.pageSizes,
|
|
394
|
+
layout: h.pagination.layout,
|
|
395
|
+
total: F.value,
|
|
396
|
+
onSizeChange: t[3] || (t[3] = (l) => Y("size")),
|
|
397
|
+
onCurrentChange: t[4] || (t[4] = (l) => Y("page"))
|
|
398
|
+
}, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])) : B("", !0)
|
|
399
|
+
])) : B("", !0)
|
|
400
|
+
])
|
|
401
|
+
]));
|
|
402
|
+
}
|
|
403
|
+
}), Ue = /* @__PURE__ */ _e(Ve, [["__scopeId", "data-v-0c8c6750"]]), Ze = ye(Ue);
|
|
404
|
+
export {
|
|
405
|
+
Ze as PaginationTable,
|
|
406
|
+
Ze as default
|
|
407
|
+
};
|