vue-export-table 1.1.2 → 1.1.4
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/README.md +28 -10
- package/dist/DownloadTable.vue.d.ts +11 -5
- package/dist/index.d.ts +5 -1
- package/dist/locale/en-US.d.ts +3 -0
- package/dist/locale/index.d.ts +43 -0
- package/dist/locale/mn-MN.d.ts +3 -0
- package/dist/locale/types.d.ts +36 -0
- package/dist/locale/zh-CN.d.ts +3 -0
- package/dist/types.d.ts +5 -4
- package/dist/useAutoRefresh.d.ts +2 -4
- package/dist/useTable.d.ts +2 -3
- package/dist/vue-export-table.cjs +1 -1
- package/dist/vue-export-table.css +1 -1
- package/dist/vue-export-table.js +314 -280
- package/dist/vue-export-table.umd.js +1 -1
- package/dist/vue-export-table.vue2.cjs +1 -1
- package/dist/vue-export-table.vue2.js +310 -269
- package/dist/vue-export-table.vue2.umd.js +1 -1
- package/package.json +9 -6
package/dist/vue-export-table.js
CHANGED
|
@@ -1,265 +1,322 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { reactive as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
function
|
|
6
|
-
e.forEach((
|
|
7
|
-
|
|
1
|
+
import { defineComponent as ae, resolveComponent as m, openBlock as h, createElementBlock as b, unref as t, renderSlot as D, createVNode as y, withCtx as w, Fragment as ne, renderList as oe, createBlock as k, createCommentVNode as z, createTextVNode as x, toDisplayString as S, createElementVNode as B, mergeProps as le, isRef as K } from "vue";
|
|
2
|
+
import { reactive as Q, ref as R, computed as N, onMounted as j, onUnmounted as re } from "vue-demi";
|
|
3
|
+
function ue(e) {
|
|
4
|
+
const a = Q({});
|
|
5
|
+
function o() {
|
|
6
|
+
e.forEach((r) => {
|
|
7
|
+
r.defaultValue !== void 0 ? a[r.name] = r.defaultValue : a[r.name] = r.type === "rangePicker" ? [] : void 0;
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
return Object.keys(
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
if (Array.isArray(
|
|
17
|
-
|
|
10
|
+
o();
|
|
11
|
+
function d() {
|
|
12
|
+
const r = {};
|
|
13
|
+
return Object.keys(a).forEach((l) => {
|
|
14
|
+
const c = a[l];
|
|
15
|
+
if (c != null && c !== "") {
|
|
16
|
+
if (Array.isArray(c) && c.length === 0) return;
|
|
17
|
+
r[l] = c;
|
|
18
18
|
}
|
|
19
|
-
}),
|
|
19
|
+
}), r;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
21
|
+
function i() {
|
|
22
|
+
o();
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
24
|
+
function f(r, l) {
|
|
25
|
+
a[r] = l;
|
|
26
26
|
}
|
|
27
|
-
return { filters:
|
|
27
|
+
return { filters: a, onSearch: d, onReset: i, setFilter: f };
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
const
|
|
31
|
-
current:
|
|
32
|
-
pageSize:
|
|
29
|
+
function se(e = 10) {
|
|
30
|
+
const a = R(1), o = R(e), d = N(() => ({
|
|
31
|
+
current: a.value,
|
|
32
|
+
pageSize: o.value
|
|
33
33
|
}));
|
|
34
|
-
function
|
|
35
|
-
|
|
34
|
+
function i(r, l) {
|
|
35
|
+
a.value = r, l !== o.value && (o.value = l, a.value = 1);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
37
|
+
function f() {
|
|
38
|
+
a.value = 1;
|
|
39
39
|
}
|
|
40
|
-
return { currentPage:
|
|
40
|
+
return { currentPage: a, pageSize: o, pagination: d, onPageChange: i, resetPage: f };
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, 1e3));
|
|
49
|
-
}
|
|
50
|
-
function n() {
|
|
51
|
-
d && (clearInterval(d), d = null);
|
|
52
|
-
}
|
|
53
|
-
function c(S) {
|
|
54
|
-
l.value = S ?? !l.value, l.value ? v() : (n(), u.value = e.interval);
|
|
42
|
+
function ie(e, a) {
|
|
43
|
+
let o = null;
|
|
44
|
+
function d() {
|
|
45
|
+
i(), !(e.interval <= 0) && (o = setInterval(() => {
|
|
46
|
+
a();
|
|
47
|
+
}, e.interval * 1e3));
|
|
55
48
|
}
|
|
56
49
|
function i() {
|
|
57
|
-
|
|
50
|
+
o && (clearInterval(o), o = null);
|
|
58
51
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
52
|
+
function f() {
|
|
53
|
+
document.hidden ? i() : d();
|
|
61
54
|
}
|
|
62
|
-
return
|
|
63
|
-
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
}), {
|
|
55
|
+
return j(() => {
|
|
56
|
+
e.interval > 0 && (d(), document.addEventListener("visibilitychange", f));
|
|
57
|
+
}), re(() => {
|
|
58
|
+
i(), document.removeEventListener("visibilitychange", f);
|
|
59
|
+
}), { stopTimer: i, startTimer: d };
|
|
67
60
|
}
|
|
68
|
-
function
|
|
69
|
-
const
|
|
70
|
-
interval:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
R,
|
|
61
|
+
function ce(e) {
|
|
62
|
+
const a = R(!1), o = R([]), d = R(0), { filters: i, onSearch: f, onReset: r, setFilter: l } = ue(e.queryFields ?? []), { currentPage: c, pageSize: _, pagination: F, onPageChange: U, resetPage: C } = se(e.pageSize ?? 10), q = e.autoRefresh ?? {
|
|
63
|
+
interval: 30
|
|
64
|
+
}, { stopTimer: I, startTimer: P } = ie(
|
|
65
|
+
q,
|
|
74
66
|
() => {
|
|
75
|
-
|
|
67
|
+
v();
|
|
76
68
|
}
|
|
77
69
|
);
|
|
78
|
-
async function
|
|
79
|
-
|
|
70
|
+
async function v() {
|
|
71
|
+
a.value = !0;
|
|
80
72
|
try {
|
|
81
|
-
const
|
|
82
|
-
page:
|
|
83
|
-
pageSize:
|
|
84
|
-
filters:
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
} catch (
|
|
88
|
-
console.error("[VueExportTable] fetch error:",
|
|
73
|
+
const p = {
|
|
74
|
+
page: c.value,
|
|
75
|
+
pageSize: _.value,
|
|
76
|
+
filters: f()
|
|
77
|
+
}, g = await e.fetchData(p);
|
|
78
|
+
o.value = g.list, d.value = g.total;
|
|
79
|
+
} catch (p) {
|
|
80
|
+
console.error("[VueExportTable] fetch error:", p);
|
|
89
81
|
} finally {
|
|
90
|
-
|
|
82
|
+
a.value = !1;
|
|
91
83
|
}
|
|
92
84
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
85
|
+
function $() {
|
|
86
|
+
C(), v();
|
|
95
87
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
88
|
+
function L() {
|
|
89
|
+
r(), C(), v();
|
|
98
90
|
}
|
|
99
|
-
function
|
|
100
|
-
|
|
91
|
+
function s(p, g) {
|
|
92
|
+
U(p, g), v();
|
|
101
93
|
}
|
|
102
|
-
return
|
|
103
|
-
e.immediate !== !1 &&
|
|
94
|
+
return j(() => {
|
|
95
|
+
e.immediate !== !1 && v();
|
|
104
96
|
}), {
|
|
105
97
|
// 状态
|
|
106
|
-
loading:
|
|
107
|
-
data:
|
|
108
|
-
total:
|
|
109
|
-
filters:
|
|
110
|
-
pagination:
|
|
111
|
-
currentPage:
|
|
112
|
-
pageSize:
|
|
98
|
+
loading: a,
|
|
99
|
+
data: o,
|
|
100
|
+
total: d,
|
|
101
|
+
filters: i,
|
|
102
|
+
pagination: F,
|
|
103
|
+
currentPage: c,
|
|
104
|
+
pageSize: _,
|
|
113
105
|
// 查询
|
|
114
|
-
handleSearch:
|
|
115
|
-
handleReset:
|
|
116
|
-
setFilter:
|
|
106
|
+
handleSearch: $,
|
|
107
|
+
handleReset: L,
|
|
108
|
+
setFilter: l,
|
|
117
109
|
// 分页
|
|
118
|
-
handlePageChange:
|
|
110
|
+
handlePageChange: s,
|
|
119
111
|
// 刷新
|
|
120
|
-
refresh:
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
toggleAutoRefresh: $
|
|
112
|
+
refresh: v,
|
|
113
|
+
// 自动刷新控制
|
|
114
|
+
stopAutoRefresh: I,
|
|
115
|
+
startAutoRefresh: P
|
|
125
116
|
};
|
|
126
117
|
}
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
const de = {
|
|
119
|
+
placeholder: {
|
|
120
|
+
input: (e) => `请输入${e}`,
|
|
121
|
+
select: (e) => `请选择${e}`,
|
|
122
|
+
startDate: "开始日期",
|
|
123
|
+
endDate: "结束日期"
|
|
124
|
+
},
|
|
125
|
+
button: {
|
|
126
|
+
search: "查询",
|
|
127
|
+
reset: "重置",
|
|
128
|
+
download: "下载"
|
|
129
|
+
},
|
|
130
|
+
pagination: {
|
|
131
|
+
itemsPerPage: "条/页",
|
|
132
|
+
showTotal: (e) => `共 ${e} 条`
|
|
133
|
+
},
|
|
134
|
+
status: {
|
|
135
|
+
running: "运行中",
|
|
136
|
+
failed: "失败",
|
|
137
|
+
completed: "已完成"
|
|
138
|
+
},
|
|
139
|
+
columns: {
|
|
140
|
+
moduleName: "功能模块",
|
|
141
|
+
fileName: "文件名称",
|
|
142
|
+
operateTime: "操作时间",
|
|
143
|
+
completeTime: "完成时间",
|
|
144
|
+
status: "状态",
|
|
145
|
+
remark: "备注",
|
|
146
|
+
username: "用户名",
|
|
147
|
+
action: "操作"
|
|
148
|
+
},
|
|
149
|
+
queryFields: {
|
|
150
|
+
fileName: "文件名称",
|
|
151
|
+
fileNamePlaceholder: "请输入文件名称"
|
|
152
|
+
}
|
|
153
|
+
}, W = Q({ ...de });
|
|
154
|
+
function pe(e) {
|
|
155
|
+
Object.assign(W, e);
|
|
156
|
+
}
|
|
157
|
+
function me() {
|
|
158
|
+
return W;
|
|
159
|
+
}
|
|
160
|
+
const he = {
|
|
161
|
+
running: "blue",
|
|
162
|
+
failed: "red",
|
|
163
|
+
completed: "green"
|
|
164
|
+
};
|
|
165
|
+
function fe(e) {
|
|
166
|
+
return {
|
|
167
|
+
running: e.status.running,
|
|
168
|
+
// 运行中
|
|
169
|
+
failed: e.status.failed,
|
|
170
|
+
// 失败
|
|
171
|
+
completed: e.status.completed
|
|
172
|
+
// 已完成
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function ge(e) {
|
|
176
|
+
return [
|
|
177
|
+
{ title: e.columns.moduleName, dataIndex: "moduleName", width: 150 },
|
|
178
|
+
// 功能模块
|
|
179
|
+
{ title: e.columns.fileName, dataIndex: "fileName", width: 200 },
|
|
180
|
+
// 文件名称
|
|
181
|
+
{ title: e.columns.operateTime, dataIndex: "operateTime", width: 180 },
|
|
182
|
+
// 操作时间
|
|
183
|
+
{ title: e.columns.completeTime, dataIndex: "completeTime", width: 180 },
|
|
184
|
+
// 完成时间
|
|
185
|
+
{ title: e.columns.status, dataIndex: "status", width: 100 },
|
|
186
|
+
// 状态
|
|
187
|
+
{ title: e.columns.remark, dataIndex: "remark", width: 200 },
|
|
188
|
+
// 备注
|
|
189
|
+
{ title: e.columns.username, dataIndex: "username", width: 120 },
|
|
190
|
+
// 用户名
|
|
191
|
+
{ title: e.columns.action, dataIndex: "action", width: 100, fixed: "right" }
|
|
192
|
+
// 操作
|
|
193
|
+
];
|
|
194
|
+
}
|
|
195
|
+
function O(e) {
|
|
196
|
+
return [
|
|
197
|
+
{ name: "fileName", label: e.queryFields.fileName, type: "input", placeholder: e.queryFields.fileNamePlaceholder }
|
|
198
|
+
// 文件名称
|
|
199
|
+
];
|
|
200
|
+
}
|
|
201
|
+
const ve = { class: "vet-download-table-wrapper" }, ye = {
|
|
131
202
|
key: 0,
|
|
132
|
-
class: "
|
|
133
|
-
},
|
|
134
|
-
key: 1,
|
|
135
|
-
class: "countdown-text"
|
|
136
|
-
}, me = ["onClick"], fe = {
|
|
203
|
+
class: "vet-query-form-wrapper"
|
|
204
|
+
}, we = {
|
|
137
205
|
key: 1,
|
|
138
|
-
class: "
|
|
139
|
-
},
|
|
206
|
+
class: "vet-toolbar-wrapper"
|
|
207
|
+
}, _e = { class: "vet-toolbar-left" }, be = { class: "vet-table-title" }, ke = ["onClick"], Se = {
|
|
208
|
+
key: 2,
|
|
209
|
+
class: "vet-pagination-wrapper"
|
|
210
|
+
}, Ce = /* @__PURE__ */ ae({
|
|
140
211
|
__name: "DownloadTable",
|
|
141
212
|
props: {
|
|
142
|
-
columns: {},
|
|
143
|
-
queryFields: {},
|
|
213
|
+
columns: { default: void 0 },
|
|
214
|
+
queryFields: { default: void 0 },
|
|
144
215
|
fetchData: {},
|
|
145
216
|
download: { default: void 0 },
|
|
146
217
|
autoRefresh: {},
|
|
147
218
|
rowKey: { type: [String, Function], default: "id" },
|
|
148
219
|
title: {},
|
|
149
220
|
bordered: { type: Boolean, default: !0 },
|
|
150
|
-
pageSize: { default: 10 }
|
|
151
|
-
showIndex: { type: Boolean, default: !1 }
|
|
221
|
+
pageSize: { default: 10 }
|
|
152
222
|
},
|
|
153
223
|
setup(e) {
|
|
154
|
-
const o = e,
|
|
155
|
-
loading:
|
|
156
|
-
data:
|
|
157
|
-
total:
|
|
158
|
-
filters:
|
|
224
|
+
const a = me(), o = e, d = (s) => o.download ? o.download.canDownload ? o.download.canDownload(s) : s.status === "completed" : !1, {
|
|
225
|
+
loading: i,
|
|
226
|
+
data: f,
|
|
227
|
+
total: r,
|
|
228
|
+
filters: l,
|
|
159
229
|
currentPage: c,
|
|
160
|
-
pageSize:
|
|
161
|
-
handleSearch:
|
|
162
|
-
handleReset:
|
|
163
|
-
handlePageChange:
|
|
164
|
-
refresh:
|
|
165
|
-
|
|
166
|
-
countdown: V,
|
|
167
|
-
toggleAutoRefresh: I
|
|
168
|
-
} = ue({
|
|
230
|
+
pageSize: _,
|
|
231
|
+
handleSearch: F,
|
|
232
|
+
handleReset: U,
|
|
233
|
+
handlePageChange: C,
|
|
234
|
+
refresh: q
|
|
235
|
+
} = ce({
|
|
169
236
|
fetchData: o.fetchData,
|
|
170
|
-
queryFields: o.queryFields,
|
|
237
|
+
queryFields: o.queryFields ?? O(a),
|
|
171
238
|
pageSize: o.pageSize,
|
|
172
239
|
autoRefresh: o.autoRefresh,
|
|
173
240
|
immediate: !0
|
|
174
|
-
}),
|
|
175
|
-
const
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
dataIndex: "index",
|
|
179
|
-
key: "index",
|
|
180
|
-
width: 80,
|
|
181
|
-
align: "center",
|
|
182
|
-
customRender: ({ index: s }) => (c.value - 1) * i.value + s + 1
|
|
183
|
-
}), [...r, ...o.columns];
|
|
184
|
-
}), q = L(() => {
|
|
185
|
-
const r = $.value.reduce((s, z) => {
|
|
186
|
-
const U = typeof z.width == "number" ? z.width : 0;
|
|
187
|
-
return s + U;
|
|
241
|
+
}), I = N(() => o.columns && o.columns.length > 0 ? o.columns : ge(a)), P = N(() => o.queryFields ?? O(a)), v = N(() => {
|
|
242
|
+
const s = I.value.reduce((p, g) => {
|
|
243
|
+
const V = typeof g.width == "number" ? g.width : 0;
|
|
244
|
+
return p + V;
|
|
188
245
|
}, 0);
|
|
189
|
-
return
|
|
190
|
-
});
|
|
191
|
-
return (
|
|
192
|
-
const
|
|
193
|
-
return h(), b("div",
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
filters:
|
|
197
|
-
handleSearch:
|
|
198
|
-
handleReset:
|
|
246
|
+
return s > 0 ? { x: s } : void 0;
|
|
247
|
+
}), $ = he, L = N(() => fe(a));
|
|
248
|
+
return (s, p) => {
|
|
249
|
+
const g = m("a-input"), V = m("a-input-number"), G = m("a-select"), H = m("a-date-picker"), J = m("a-range-picker"), A = m("a-form-item"), M = m("a-button"), X = m("a-space"), Y = m("a-form"), Z = m("a-tag"), ee = m("a-table"), te = m("a-pagination");
|
|
250
|
+
return h(), b("div", ve, [
|
|
251
|
+
t(P) && t(P).length > 0 ? (h(), b("div", ye, [
|
|
252
|
+
D(s.$slots, "query-form", {
|
|
253
|
+
filters: t(l),
|
|
254
|
+
handleSearch: t(F),
|
|
255
|
+
handleReset: t(U)
|
|
199
256
|
}, () => [
|
|
200
|
-
|
|
257
|
+
y(Y, {
|
|
201
258
|
layout: "inline",
|
|
202
|
-
model:
|
|
259
|
+
model: t(l)
|
|
203
260
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
(h(!0), b(
|
|
206
|
-
key:
|
|
207
|
-
label:
|
|
261
|
+
default: w(() => [
|
|
262
|
+
(h(!0), b(ne, null, oe(t(P), (n) => (h(), k(A, {
|
|
263
|
+
key: n.name,
|
|
264
|
+
label: n.label
|
|
208
265
|
}, {
|
|
209
|
-
default:
|
|
210
|
-
|
|
266
|
+
default: w(() => [
|
|
267
|
+
n.type === "input" ? (h(), k(g, {
|
|
211
268
|
key: 0,
|
|
212
|
-
value:
|
|
213
|
-
"onUpdate:value": (
|
|
214
|
-
placeholder:
|
|
269
|
+
value: t(l)[n.name],
|
|
270
|
+
"onUpdate:value": (u) => t(l)[n.name] = u,
|
|
271
|
+
placeholder: n.placeholder || t(a).placeholder.input(n.label),
|
|
215
272
|
"allow-clear": ""
|
|
216
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder"])) :
|
|
273
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder"])) : n.type === "number" ? (h(), k(V, {
|
|
217
274
|
key: 1,
|
|
218
|
-
value:
|
|
219
|
-
"onUpdate:value": (
|
|
220
|
-
placeholder:
|
|
275
|
+
value: t(l)[n.name],
|
|
276
|
+
"onUpdate:value": (u) => t(l)[n.name] = u,
|
|
277
|
+
placeholder: n.placeholder || t(a).placeholder.input(n.label),
|
|
221
278
|
style: { width: "180px" }
|
|
222
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder"])) :
|
|
279
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder"])) : n.type === "select" ? (h(), k(G, {
|
|
223
280
|
key: 2,
|
|
224
|
-
value:
|
|
225
|
-
"onUpdate:value": (
|
|
226
|
-
placeholder:
|
|
227
|
-
options:
|
|
281
|
+
value: t(l)[n.name],
|
|
282
|
+
"onUpdate:value": (u) => t(l)[n.name] = u,
|
|
283
|
+
placeholder: n.placeholder || t(a).placeholder.select(n.label),
|
|
284
|
+
options: n.options,
|
|
228
285
|
"allow-clear": "",
|
|
229
286
|
style: { "min-width": "150px" }
|
|
230
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder", "options"])) :
|
|
287
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder", "options"])) : n.type === "datePicker" ? (h(), k(H, {
|
|
231
288
|
key: 3,
|
|
232
|
-
value:
|
|
233
|
-
"onUpdate:value": (
|
|
234
|
-
placeholder:
|
|
289
|
+
value: t(l)[n.name],
|
|
290
|
+
"onUpdate:value": (u) => t(l)[n.name] = u,
|
|
291
|
+
placeholder: n.placeholder || t(a).placeholder.select(n.label),
|
|
235
292
|
style: { width: "180px" }
|
|
236
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder"])) :
|
|
293
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder"])) : n.type === "rangePicker" ? (h(), k(J, {
|
|
237
294
|
key: 4,
|
|
238
|
-
value:
|
|
239
|
-
"onUpdate:value": (
|
|
240
|
-
placeholder: [
|
|
295
|
+
value: t(l)[n.name],
|
|
296
|
+
"onUpdate:value": (u) => t(l)[n.name] = u,
|
|
297
|
+
placeholder: [n.placeholder || t(a).placeholder.startDate, n.placeholder || t(a).placeholder.endDate],
|
|
241
298
|
style: { width: "240px" }
|
|
242
|
-
}, null, 8, ["value", "onUpdate:value", "placeholder"])) :
|
|
299
|
+
}, null, 8, ["value", "onUpdate:value", "placeholder"])) : z("", !0)
|
|
243
300
|
]),
|
|
244
301
|
_: 2
|
|
245
302
|
}, 1032, ["label"]))), 128)),
|
|
246
|
-
|
|
247
|
-
default:
|
|
248
|
-
|
|
249
|
-
default:
|
|
250
|
-
|
|
303
|
+
y(A, null, {
|
|
304
|
+
default: w(() => [
|
|
305
|
+
y(X, null, {
|
|
306
|
+
default: w(() => [
|
|
307
|
+
y(M, {
|
|
251
308
|
type: "primary",
|
|
252
|
-
onClick:
|
|
309
|
+
onClick: t(F)
|
|
253
310
|
}, {
|
|
254
|
-
default:
|
|
255
|
-
|
|
256
|
-
])
|
|
311
|
+
default: w(() => [
|
|
312
|
+
x(S(t(a).button.search), 1)
|
|
313
|
+
]),
|
|
257
314
|
_: 1
|
|
258
315
|
}, 8, ["onClick"]),
|
|
259
|
-
|
|
260
|
-
default:
|
|
261
|
-
|
|
262
|
-
])
|
|
316
|
+
y(M, { onClick: t(U) }, {
|
|
317
|
+
default: w(() => [
|
|
318
|
+
x(S(t(a).button.reset), 1)
|
|
319
|
+
]),
|
|
263
320
|
_: 1
|
|
264
321
|
}, 8, ["onClick"])
|
|
265
322
|
]),
|
|
@@ -271,115 +328,92 @@ const se = { class: "download-table-wrapper" }, ce = {
|
|
|
271
328
|
]),
|
|
272
329
|
_: 1
|
|
273
330
|
}, 8, ["model"])
|
|
274
|
-
]
|
|
275
|
-
])) :
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
loading:
|
|
279
|
-
refresh:
|
|
331
|
+
])
|
|
332
|
+
])) : z("", !0),
|
|
333
|
+
e.title ? (h(), b("div", we, [
|
|
334
|
+
D(s.$slots, "toolbar", {
|
|
335
|
+
loading: t(i),
|
|
336
|
+
refresh: t(q)
|
|
280
337
|
}, () => [
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
]),
|
|
284
|
-
D("div", he, [
|
|
285
|
-
f(O, null, {
|
|
286
|
-
default: g(() => [
|
|
287
|
-
f(B, {
|
|
288
|
-
loading: a(u),
|
|
289
|
-
onClick: a(x)
|
|
290
|
-
}, {
|
|
291
|
-
default: g(() => [...s[5] || (s[5] = [
|
|
292
|
-
D("svg", {
|
|
293
|
-
class: "icon-svg",
|
|
294
|
-
viewBox: "64 64 896 896",
|
|
295
|
-
width: "1em",
|
|
296
|
-
height: "1em",
|
|
297
|
-
fill: "currentColor"
|
|
298
|
-
}, [
|
|
299
|
-
D("path", { d: "M909.1 209.3l-56.4 44.1C775.8 155.1 653.5 96 512 96 282.7 96 96 282.7 96 512s186.7 416 416 416c165.3 0 309.1-96.4 376-236.1 8.3-17.2-4.3-37.1-23.1-37.1H745.6c-9.2 0-17.2 5.8-20.3 14.3C680.5 773.5 600.5 832 512 832c-176.7 0-320-143.3-320-320s143.3-320 320-320c88.5 0 168.5 36.1 226.4 94.3L704 356.3c-4.7-4.7-1.3-12.7 5.3-13.1l193.7-12.5c6.6-.4 12.3 4.9 12.3 11.5v193.7c0 6.6-8 10-12.7 5.3z" })
|
|
300
|
-
], -1),
|
|
301
|
-
T(" 刷新 ", -1)
|
|
302
|
-
])]),
|
|
303
|
-
_: 1
|
|
304
|
-
}, 8, ["loading", "onClick"]),
|
|
305
|
-
e.autoRefresh ? (h(), k(G, {
|
|
306
|
-
key: 0,
|
|
307
|
-
checked: a(R),
|
|
308
|
-
"onUpdate:checked": s[0] || (s[0] = (t) => K(R) ? R.value = t : null),
|
|
309
|
-
"checked-children": "自动刷新",
|
|
310
|
-
"un-checked-children": "自动刷新",
|
|
311
|
-
onChange: a(I)
|
|
312
|
-
}, null, 8, ["checked", "onChange"])) : _("", !0),
|
|
313
|
-
e.autoRefresh && a(R) ? (h(), b("span", ve, A(a(V)) + "s ", 1)) : _("", !0)
|
|
314
|
-
]),
|
|
315
|
-
_: 1
|
|
316
|
-
})
|
|
338
|
+
B("div", _e, [
|
|
339
|
+
B("span", be, S(e.title), 1)
|
|
317
340
|
])
|
|
318
|
-
]
|
|
319
|
-
]),
|
|
320
|
-
|
|
321
|
-
dataSource:
|
|
322
|
-
columns:
|
|
323
|
-
loading:
|
|
341
|
+
])
|
|
342
|
+
])) : z("", !0),
|
|
343
|
+
y(ee, le({
|
|
344
|
+
dataSource: t(f),
|
|
345
|
+
columns: t(I),
|
|
346
|
+
loading: t(i),
|
|
324
347
|
pagination: !1,
|
|
325
348
|
rowKey: e.rowKey,
|
|
326
349
|
bordered: e.bordered,
|
|
327
|
-
scroll:
|
|
328
|
-
},
|
|
329
|
-
bodyCell:
|
|
330
|
-
|
|
350
|
+
scroll: t(v)
|
|
351
|
+
}, s.$attrs), {
|
|
352
|
+
bodyCell: w(({ column: n, record: u, index: E, text: T }) => [
|
|
353
|
+
n.dataIndex === "action" ? D(s.$slots, "action", {
|
|
331
354
|
key: 0,
|
|
332
|
-
record:
|
|
333
|
-
index:
|
|
355
|
+
record: u,
|
|
356
|
+
index: E
|
|
334
357
|
}, () => [
|
|
335
|
-
e.download &&
|
|
358
|
+
e.download && d(u) ? (h(), b("a", {
|
|
336
359
|
key: 0,
|
|
337
|
-
onClick: (
|
|
338
|
-
},
|
|
339
|
-
]
|
|
360
|
+
onClick: (Pe) => e.download.handleDownload(u)
|
|
361
|
+
}, S(t(a).button.download), 9, ke)) : z("", !0)
|
|
362
|
+
]) : n.dataIndex === "status" ? D(s.$slots, "status", {
|
|
340
363
|
key: 1,
|
|
341
|
-
record:
|
|
342
|
-
index:
|
|
343
|
-
text: j
|
|
364
|
+
record: u,
|
|
365
|
+
index: E
|
|
344
366
|
}, () => [
|
|
345
|
-
|
|
346
|
-
|
|
367
|
+
y(Z, {
|
|
368
|
+
color: t($)[T] || "default"
|
|
369
|
+
}, {
|
|
370
|
+
default: w(() => [
|
|
371
|
+
x(S(t(L)[T] || T), 1)
|
|
372
|
+
]),
|
|
373
|
+
_: 2
|
|
374
|
+
}, 1032, ["color"])
|
|
375
|
+
]) : D(s.$slots, n.dataIndex, {
|
|
376
|
+
key: 2,
|
|
377
|
+
record: u,
|
|
378
|
+
index: E,
|
|
379
|
+
text: T
|
|
380
|
+
}, () => [
|
|
381
|
+
x(S(T), 1)
|
|
382
|
+
])
|
|
347
383
|
]),
|
|
348
384
|
_: 3
|
|
349
385
|
}, 16, ["dataSource", "columns", "loading", "rowKey", "bordered", "scroll"]),
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
current:
|
|
353
|
-
"onUpdate:current":
|
|
354
|
-
pageSize:
|
|
355
|
-
"onUpdate:pageSize":
|
|
356
|
-
total:
|
|
386
|
+
t(r) > 0 ? (h(), b("div", Se, [
|
|
387
|
+
y(te, {
|
|
388
|
+
current: t(c),
|
|
389
|
+
"onUpdate:current": p[0] || (p[0] = (n) => K(c) ? c.value = n : null),
|
|
390
|
+
pageSize: t(_),
|
|
391
|
+
"onUpdate:pageSize": p[1] || (p[1] = (n) => K(_) ? _.value = n : null),
|
|
392
|
+
total: t(r),
|
|
357
393
|
"show-size-changer": !0,
|
|
358
|
-
"
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
394
|
+
"page-size-options": ["10", "20", "50"],
|
|
395
|
+
locale: { items_per_page: t(a).pagination.itemsPerPage },
|
|
396
|
+
"show-total": t(a).pagination.showTotal,
|
|
397
|
+
onChange: t(C),
|
|
398
|
+
onShowSizeChange: t(C)
|
|
399
|
+
}, null, 8, ["current", "pageSize", "total", "locale", "show-total", "onChange", "onShowSizeChange"])
|
|
400
|
+
])) : z("", !0)
|
|
364
401
|
]);
|
|
365
402
|
};
|
|
366
403
|
}
|
|
367
|
-
}),
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
l[u] = d;
|
|
371
|
-
return l;
|
|
372
|
-
}, we = /* @__PURE__ */ ye(ge, [["__scopeId", "data-v-13092ac7"]]), Ce = {
|
|
373
|
-
install(e) {
|
|
374
|
-
e.component("DownloadTable", we);
|
|
404
|
+
}), ze = {
|
|
405
|
+
install(e, a) {
|
|
406
|
+
e.component("DownloadTable", Ce), a != null && a.locale && pe(a.locale);
|
|
375
407
|
}
|
|
376
408
|
};
|
|
377
409
|
export {
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
410
|
+
Ce as DownloadTable,
|
|
411
|
+
ze as VueExportTable,
|
|
412
|
+
ze as default,
|
|
413
|
+
pe as setLocale,
|
|
414
|
+
ie as useAutoRefresh,
|
|
415
|
+
me as useLocale,
|
|
416
|
+
se as usePagination,
|
|
417
|
+
ue as useQuery,
|
|
418
|
+
ce as useTable
|
|
385
419
|
};
|