@done-coding/admin-core 0.1.1-alpha.5 → 0.1.1-alpha.6
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableMain.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-135cf353"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -4,19 +4,19 @@ import "element-plus/es/components/pagination/style/css";
|
|
|
4
4
|
import "element-plus/es/components/table/style/css";
|
|
5
5
|
import "element-plus/es/components/empty/style/css";
|
|
6
6
|
import "element-plus/es/components/table-column/style/css";
|
|
7
|
-
import { defineComponent as de, useCssVars as me, useModel as he, useAttrs as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
7
|
+
import { defineComponent as de, useCssVars as me, useModel as he, useAttrs as ve, ref as f, computed as c, shallowRef as ye, inject as be, onMounted as Ce, onActivated as Se, watch as d, openBlock as i, createElementBlock as y, createBlock as b, unref as a, withCtx as C, createVNode as R, mergeProps as p, createCommentVNode as Ee, Fragment as T, renderList as xe, createSlots as _e, renderSlot as $, resolveDynamicComponent as V, createTextVNode as z, toDisplayString as Y, withDirectives as Te, createElementVNode as we, isRef as q, vShow as Pe, mergeModels as G } from "vue";
|
|
8
|
+
import U from "lodash/cloneDeep";
|
|
9
|
+
import D from "lodash/omit";
|
|
10
|
+
import F from "lodash/set";
|
|
11
|
+
import W from "lodash/get";
|
|
12
12
|
import Ie from "./TableToolbar.vue.mjs";
|
|
13
13
|
import Re from "../display/WatchSize.vue.mjs";
|
|
14
14
|
import { pickExportColumns as ze } from "../../utils/export.mjs";
|
|
15
15
|
import { BODY_CONTENT_VIEWPORT_HEIGHT as ke } from "../../inject/key.mjs";
|
|
16
|
-
import { APP_API_LIST_MODEL_KEY_CONFIG as
|
|
16
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as w } from "../../config/list-model.mjs";
|
|
17
17
|
const He = { class: "table-main" }, Ne = { class: "table-main-pagination" }, We = /* @__PURE__ */ de({
|
|
18
18
|
__name: "TableMain",
|
|
19
|
-
props: /* @__PURE__ */
|
|
19
|
+
props: /* @__PURE__ */ G({
|
|
20
20
|
showPager: { type: Boolean, default: !0 },
|
|
21
21
|
showToolbar: { type: Boolean, default: !0 },
|
|
22
22
|
toolbar: {},
|
|
@@ -37,107 +37,108 @@ const He = { class: "table-main" }, Ne = { class: "table-main-pagination" }, We
|
|
|
37
37
|
isAutoRefresh: { type: Boolean },
|
|
38
38
|
isAutoRefreshModifiers: {}
|
|
39
39
|
}),
|
|
40
|
-
emits: /* @__PURE__ */
|
|
41
|
-
setup(u, { expose:
|
|
40
|
+
emits: /* @__PURE__ */ G(["pageChange", "pageSizeChange", "dataChange", "loadingChange", "pageInfoChange"], ["update:isAutoRefresh"]),
|
|
41
|
+
setup(u, { expose: Z, emit: Q }) {
|
|
42
42
|
me((e) => ({
|
|
43
|
-
|
|
43
|
+
v4bebd1e5: e.headerColor
|
|
44
44
|
}));
|
|
45
|
-
const r = u, m =
|
|
45
|
+
const r = u, m = Q, k = he(u, "isAutoRefresh"), X = ve(), S = f([]), E = f(0), l = f(0), n = f(1), h = f(!1), P = f(!1), H = f([]), ee = c(() => ({
|
|
46
46
|
columns: ze(r.columns),
|
|
47
|
-
selectedList:
|
|
47
|
+
selectedList: H.value,
|
|
48
48
|
currentPageList: S.value,
|
|
49
49
|
api: r.api,
|
|
50
50
|
query: r.query || {},
|
|
51
51
|
total: E.value,
|
|
52
52
|
hasSelection: r.columns.some((e) => e.type === "selection")
|
|
53
|
-
})),
|
|
54
|
-
|
|
55
|
-
},
|
|
53
|
+
})), N = f(0), te = (e) => {
|
|
54
|
+
N.value = e;
|
|
55
|
+
}, I = ye(), oe = be(
|
|
56
56
|
ke,
|
|
57
57
|
500
|
|
58
|
-
),
|
|
59
|
-
() => r.showToolbar ?
|
|
60
|
-
),
|
|
58
|
+
), O = c(() => r.showPager ? 35 : 0), A = c(
|
|
59
|
+
() => r.showToolbar ? N.value : 0
|
|
60
|
+
), re = c(() => {
|
|
61
61
|
const { maxHeight: e, refine: t } = r;
|
|
62
62
|
return e ? Math.max(
|
|
63
|
-
e -
|
|
63
|
+
e - O.value - A.value,
|
|
64
64
|
200
|
|
65
65
|
) : t ? Math.max(
|
|
66
|
-
|
|
66
|
+
oe.value - O.value - A.value - r.refineReduceHeight,
|
|
67
67
|
200
|
|
68
68
|
) : void 0;
|
|
69
69
|
}), x = c(() => {
|
|
70
|
-
const e =
|
|
71
|
-
return
|
|
70
|
+
const e = U(r.query || {});
|
|
71
|
+
return F(e, w.PAGE_SIZE_KEY, l.value), F(
|
|
72
72
|
e,
|
|
73
|
-
|
|
73
|
+
w.CURRENT_PAGE_KEY,
|
|
74
74
|
n.value
|
|
75
75
|
), e;
|
|
76
|
-
}),
|
|
76
|
+
}), ae = c(() => {
|
|
77
77
|
var t;
|
|
78
78
|
const e = (t = r.tableProps) == null ? void 0 : t.onSelectionChange;
|
|
79
79
|
return {
|
|
80
80
|
...r.tableProps,
|
|
81
|
-
...
|
|
81
|
+
...X,
|
|
82
82
|
/** 合并内部选中存储与外部 onSelectionChange */
|
|
83
83
|
onSelectionChange: (s) => {
|
|
84
|
-
|
|
84
|
+
H.value = s, e == null || e(s);
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
}),
|
|
87
|
+
}), L = (e, t = !0) => {
|
|
88
88
|
const s = JSON.stringify(e) === JSON.stringify(x.value);
|
|
89
89
|
return !s && t && console.warn(
|
|
90
90
|
`同一地方 并发请求 参数冰花 当前不是最新的参数 丢弃结果 ${JSON.stringify(
|
|
91
91
|
e
|
|
92
92
|
)} => ${JSON.stringify(x.value)}`
|
|
93
93
|
), s;
|
|
94
|
-
},
|
|
94
|
+
}, K = (e = !1) => {
|
|
95
|
+
var s;
|
|
95
96
|
if (!l.value) return;
|
|
96
|
-
h.value ? console.warn("请求并发") : h.value = !0, e || (
|
|
97
|
-
const t =
|
|
98
|
-
return r.api(t).then((
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
), E.value =
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
h.value ? console.warn("请求并发") : h.value = !0, e || (P.value = !0), (s = I.value) == null || s.clearSelection();
|
|
98
|
+
const t = U(x.value);
|
|
99
|
+
return r.api(t).then((_) => {
|
|
100
|
+
L(t, !1) && (S.value = W(
|
|
101
|
+
_,
|
|
102
|
+
w.LIST_KEY
|
|
103
|
+
), E.value = W(
|
|
104
|
+
_,
|
|
105
|
+
w.TOTAL_KEY
|
|
105
106
|
), m("pageInfoChange", {
|
|
106
107
|
pageSize: l.value,
|
|
107
108
|
currentPage: n.value,
|
|
108
109
|
total: E.value
|
|
109
110
|
}));
|
|
110
111
|
}).finally(() => {
|
|
111
|
-
|
|
112
|
+
L(t) && (h.value = !1, P.value = !1);
|
|
112
113
|
});
|
|
113
|
-
},
|
|
114
|
+
}, j = async (e = !1) => {
|
|
114
115
|
var t;
|
|
115
|
-
return (t =
|
|
116
|
+
return (t = K(e)) == null ? void 0 : t.catch(() => {
|
|
116
117
|
});
|
|
117
|
-
},
|
|
118
|
+
}, ne = async (e = !1) => {
|
|
118
119
|
if (n.value === 1)
|
|
119
|
-
return
|
|
120
|
+
return j(e);
|
|
120
121
|
n.value = 1;
|
|
121
|
-
},
|
|
122
|
-
refresh:
|
|
123
|
-
reload:
|
|
124
|
-
getTableInstance: () =>
|
|
125
|
-
},
|
|
126
|
-
...
|
|
122
|
+
}, le = (e) => e, v = {
|
|
123
|
+
refresh: j,
|
|
124
|
+
reload: ne,
|
|
125
|
+
getTableInstance: () => I.value
|
|
126
|
+
}, B = (e, t = []) => ({
|
|
127
|
+
...D(e, ["render", "headerRender"].concat(t)),
|
|
127
128
|
injectInfo: r.injectInfo || {},
|
|
128
|
-
exposeInfo:
|
|
129
|
-
}),
|
|
130
|
-
...
|
|
129
|
+
exposeInfo: v
|
|
130
|
+
}), M = (e) => ({
|
|
131
|
+
...D(e, ["render", "headerRender"]),
|
|
131
132
|
injectInfo: r.injectInfo || {},
|
|
132
|
-
exposeInfo:
|
|
133
|
+
exposeInfo: v
|
|
133
134
|
});
|
|
134
|
-
|
|
135
|
-
const
|
|
135
|
+
Z(v);
|
|
136
|
+
const se = (e) => {
|
|
136
137
|
l.value = e, n.value = 1;
|
|
137
|
-
},
|
|
138
|
+
}, J = (e) => !e || e === "expand";
|
|
138
139
|
return Ce(() => {
|
|
139
140
|
l.value = r.pageSizeInit, Se(() => {
|
|
140
|
-
|
|
141
|
+
v.refresh();
|
|
141
142
|
});
|
|
142
143
|
}), d(S, (e) => {
|
|
143
144
|
m("dataChange", e);
|
|
@@ -149,83 +150,83 @@ const He = { class: "table-main" }, Ne = { class: "table-main-pagination" }, We
|
|
|
149
150
|
), d(
|
|
150
151
|
x,
|
|
151
152
|
(e, t) => {
|
|
152
|
-
JSON.stringify(e) !== JSON.stringify(t) &&
|
|
153
|
+
JSON.stringify(e) !== JSON.stringify(t) && K();
|
|
153
154
|
},
|
|
154
155
|
{
|
|
155
156
|
immediate: !0
|
|
156
157
|
}
|
|
157
|
-
), d(
|
|
158
|
+
), d(P, (e) => {
|
|
158
159
|
m("loadingChange", e);
|
|
159
160
|
}), d(l, (e) => {
|
|
160
161
|
m("pageSizeChange", e);
|
|
161
162
|
}), d(n, (e) => {
|
|
162
163
|
m("pageChange", e);
|
|
163
164
|
}), (e, t) => {
|
|
164
|
-
const s = ge,
|
|
165
|
-
return i(),
|
|
165
|
+
const s = ge, _ = pe, ie = fe, ue = ce;
|
|
166
|
+
return i(), y("div", He, [
|
|
166
167
|
u.showToolbar ? (i(), b(a(Re), {
|
|
167
168
|
key: 0,
|
|
168
|
-
onHeightChange:
|
|
169
|
+
onHeightChange: te
|
|
169
170
|
}, {
|
|
170
171
|
default: C(() => [
|
|
171
|
-
|
|
172
|
-
"is-auto-refresh":
|
|
173
|
-
"onUpdate:isAutoRefresh": t[0] || (t[0] = (o) =>
|
|
174
|
-
tableExpose:
|
|
172
|
+
R(Ie, p({
|
|
173
|
+
"is-auto-refresh": k.value,
|
|
174
|
+
"onUpdate:isAutoRefresh": t[0] || (t[0] = (o) => k.value = o),
|
|
175
|
+
tableExpose: v,
|
|
175
176
|
loading: a(h),
|
|
176
|
-
exportContext: a(
|
|
177
|
+
exportContext: a(ee),
|
|
177
178
|
currentPage: a(n),
|
|
178
179
|
pageSize: a(l)
|
|
179
180
|
}, u.toolbar), null, 16, ["is-auto-refresh", "loading", "exportContext", "currentPage", "pageSize"])
|
|
180
181
|
]),
|
|
181
182
|
_: 1
|
|
182
183
|
})) : Ee("", !0),
|
|
183
|
-
|
|
184
|
+
R(ie, p({
|
|
184
185
|
ref_key: "elTable",
|
|
185
|
-
ref:
|
|
186
|
+
ref: I,
|
|
186
187
|
class: "table-main-table",
|
|
187
188
|
stripe: "",
|
|
188
189
|
border: "",
|
|
189
190
|
highlightCurrentRow: ""
|
|
190
|
-
}, a(
|
|
191
|
-
maxHeight: a(
|
|
191
|
+
}, a(ae), {
|
|
192
|
+
maxHeight: a(re),
|
|
192
193
|
data: a(S),
|
|
193
|
-
rowKey:
|
|
194
|
+
rowKey: le(u.rowKey)
|
|
194
195
|
}), {
|
|
195
196
|
empty: C(() => [
|
|
196
|
-
a(h) ? (i(),
|
|
197
|
-
|
|
198
|
-
], 64)) : (i(), b(
|
|
197
|
+
a(h) ? (i(), y(T, { key: 0 }, [
|
|
198
|
+
z("加载中...")
|
|
199
|
+
], 64)) : (i(), b(_, { key: 1 }))
|
|
199
200
|
]),
|
|
200
201
|
default: C(() => [
|
|
201
|
-
(i(!0),
|
|
202
|
+
(i(!0), y(T, null, xe(u.columns, (o) => (i(), b(s, p({
|
|
202
203
|
key: o.columnKey || o.prop
|
|
203
204
|
}, { ref_for: !0 }, o), _e({ _: 2 }, [
|
|
204
|
-
|
|
205
|
+
J(o.type) ? {
|
|
205
206
|
name: "default",
|
|
206
207
|
fn: C((g) => [
|
|
207
|
-
|
|
208
|
-
o.render ? (i(), b(
|
|
208
|
+
$(e.$slots, o.prop, p({ ref_for: !0 }, B(g)), () => [
|
|
209
|
+
o.render ? (i(), b(V(o.render), p({
|
|
209
210
|
key: 0,
|
|
210
211
|
ref_for: !0
|
|
211
|
-
},
|
|
212
|
+
}, B(g, ["$index"]), {
|
|
212
213
|
_index: g.$index
|
|
213
|
-
}), null, 16, ["_index"])) : (i(),
|
|
214
|
-
|
|
214
|
+
}), null, 16, ["_index"])) : (i(), y(T, { key: 1 }, [
|
|
215
|
+
z(Y(g.row[o.prop]), 1)
|
|
215
216
|
], 64))
|
|
216
217
|
], !0)
|
|
217
218
|
]),
|
|
218
219
|
key: "0"
|
|
219
220
|
} : void 0,
|
|
220
|
-
|
|
221
|
+
J(o.type) ? {
|
|
221
222
|
name: "header",
|
|
222
223
|
fn: C((g) => [
|
|
223
|
-
|
|
224
|
-
o.headerRender ? (i(), b(
|
|
224
|
+
$(e.$slots, `header-${o.prop}`, p({ ref_for: !0 }, M(g)), () => [
|
|
225
|
+
o.headerRender ? (i(), b(V(o.headerRender), p({
|
|
225
226
|
key: 0,
|
|
226
227
|
ref_for: !0
|
|
227
|
-
},
|
|
228
|
-
|
|
228
|
+
}, M(g)), null, 16)) : (i(), y(T, { key: 1 }, [
|
|
229
|
+
z(Y(o.label), 1)
|
|
229
230
|
], 64))
|
|
230
231
|
], !0)
|
|
231
232
|
]),
|
|
@@ -236,17 +237,17 @@ const He = { class: "table-main" }, Ne = { class: "table-main-pagination" }, We
|
|
|
236
237
|
_: 3
|
|
237
238
|
}, 16, ["maxHeight", "data", "rowKey"]),
|
|
238
239
|
Te(we("div", Ne, [
|
|
239
|
-
|
|
240
|
+
R(ue, {
|
|
240
241
|
"current-page": a(n),
|
|
241
|
-
"onUpdate:currentPage": t[1] || (t[1] = (o) =>
|
|
242
|
+
"onUpdate:currentPage": t[1] || (t[1] = (o) => q(n) ? n.value = o : null),
|
|
242
243
|
"page-size": a(l),
|
|
243
|
-
"onUpdate:pageSize": t[2] || (t[2] = (o) =>
|
|
244
|
+
"onUpdate:pageSize": t[2] || (t[2] = (o) => q(l) ? l.value = o : null),
|
|
244
245
|
"page-sizes": u.pageSizeOptions,
|
|
245
246
|
size: "small",
|
|
246
247
|
background: "",
|
|
247
248
|
layout: u.pageLayout,
|
|
248
249
|
total: a(E),
|
|
249
|
-
onSizeChange:
|
|
250
|
+
onSizeChange: se
|
|
250
251
|
}, null, 8, ["current-page", "page-size", "page-sizes", "layout", "total"])
|
|
251
252
|
], 512), [
|
|
252
253
|
[Pe, u.showPager]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableToolbar.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-90cd7b54"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -5,13 +5,13 @@ import "element-plus/es/components/dropdown-menu/style/css";
|
|
|
5
5
|
import "element-plus/es/components/dropdown-item/style/css";
|
|
6
6
|
import "element-plus/es/components/button/style/css";
|
|
7
7
|
import "element-plus/es/components/icon/style/css";
|
|
8
|
-
import { defineComponent as z, useModel as P, computed as
|
|
8
|
+
import { defineComponent as z, useModel as P, computed as b, ref as y, watch as N, withDirectives as U, openBlock as x, createElementBlock as X, createElementVNode as R, createBlock as E, withCtx as r, createVNode as n, createTextVNode as p, unref as A, createCommentVNode as v, normalizeClass as q, vShow as O, mergeModels as j } from "vue";
|
|
9
9
|
import { ElMessageBox as G, ElMessage as H } from "element-plus";
|
|
10
10
|
import { ArrowDown as J, Refresh as K } from "@element-plus/icons-vue";
|
|
11
11
|
import Q from "../misc/AutoRefresh.vue.mjs";
|
|
12
12
|
import k from "./ToolbarButtons.vue.mjs";
|
|
13
13
|
import { countAll as W, fetchListAll as M } from "../../helpers/list-helper.mjs";
|
|
14
|
-
import { EXPORT_MAX_LIMIT as
|
|
14
|
+
import { EXPORT_MAX_LIMIT as c, exportCSV as Y } from "../../utils/export.mjs";
|
|
15
15
|
const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee = { class: "table-toolbar-right" }, pe = /* @__PURE__ */ z({
|
|
16
16
|
__name: "TableToolbar",
|
|
17
17
|
props: /* @__PURE__ */ j({
|
|
@@ -34,10 +34,10 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
34
34
|
}),
|
|
35
35
|
emits: ["update:isAutoRefresh"],
|
|
36
36
|
setup(o) {
|
|
37
|
-
const t = o, w = P(o, "isAutoRefresh"), B =
|
|
37
|
+
const t = o, w = P(o, "isAutoRefresh"), B = b(() => {
|
|
38
38
|
var l;
|
|
39
39
|
return !!((l = t.exportColumns) != null && l.length);
|
|
40
|
-
}), C =
|
|
40
|
+
}), C = b(() => ({
|
|
41
41
|
tableExpose: t.tableExpose,
|
|
42
42
|
loading: t.loading,
|
|
43
43
|
exportContext: t.exportContext,
|
|
@@ -47,7 +47,7 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
47
47
|
pageSize: t.pageSize,
|
|
48
48
|
total: t.exportContext.total
|
|
49
49
|
}
|
|
50
|
-
})), D =
|
|
50
|
+
})), D = b(
|
|
51
51
|
() => {
|
|
52
52
|
var l, e;
|
|
53
53
|
return [
|
|
@@ -58,16 +58,16 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
58
58
|
(e = t.rightExtraButtons) == null ? void 0 : e.length
|
|
59
59
|
].filter(Boolean).length;
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), h = y(30);
|
|
62
62
|
N(
|
|
63
63
|
() => t.refreshInterval,
|
|
64
64
|
(l) => {
|
|
65
|
-
|
|
65
|
+
h.value = l;
|
|
66
66
|
},
|
|
67
67
|
{ immediate: !0 }
|
|
68
68
|
);
|
|
69
|
-
const
|
|
70
|
-
const { selectedList: e, currentPageList: s, api: d, query: i } = t.exportContext,
|
|
69
|
+
const f = y(!1), I = async (l) => {
|
|
70
|
+
const { selectedList: e, currentPageList: s, api: d, query: i } = t.exportContext, g = t.exportColumns;
|
|
71
71
|
let u;
|
|
72
72
|
switch (l) {
|
|
73
73
|
case "selected":
|
|
@@ -79,10 +79,10 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
79
79
|
case "all":
|
|
80
80
|
try {
|
|
81
81
|
const a = await W(d, i);
|
|
82
|
-
if (a >
|
|
82
|
+
if (a > c) {
|
|
83
83
|
try {
|
|
84
84
|
await G.confirm(
|
|
85
|
-
`数据量超过 ${
|
|
85
|
+
`数据量超过 ${c} 条(共 ${a} 条),是否只导出前 ${c} 条?`,
|
|
86
86
|
"提示",
|
|
87
87
|
{
|
|
88
88
|
confirmButtonText: "导出",
|
|
@@ -93,9 +93,9 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
93
93
|
} catch {
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
u = await M(d, i, { limit:
|
|
96
|
+
u = await M(d, i, { limit: c });
|
|
97
97
|
} else
|
|
98
|
-
u = await M(d, i, { limit:
|
|
98
|
+
u = await M(d, i, { limit: c });
|
|
99
99
|
} catch (a) {
|
|
100
100
|
H.error(`导出失败:${(a == null ? void 0 : a.message) || (a == null ? void 0 : a.toString())}`);
|
|
101
101
|
return;
|
|
@@ -103,48 +103,47 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
103
103
|
break;
|
|
104
104
|
}
|
|
105
105
|
const m = `${document.title}-${Date.now()}`;
|
|
106
|
-
Y({ columns:
|
|
106
|
+
Y({ columns: g, list: u, filename: m });
|
|
107
107
|
}, T = (l) => {
|
|
108
108
|
var s;
|
|
109
|
-
if (
|
|
110
|
-
|
|
109
|
+
if (f.value) return;
|
|
110
|
+
f.value = !0;
|
|
111
111
|
const e = t.exportByFe ? I(l) : (s = t.exportFn) == null ? void 0 : s.call(t, l);
|
|
112
112
|
Promise.resolve(e).catch(() => {
|
|
113
113
|
}).finally(() => {
|
|
114
|
-
|
|
114
|
+
f.value = !1;
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
117
|
return (l, e) => {
|
|
118
|
-
const s = F, d = $, i = S,
|
|
119
|
-
return U((
|
|
118
|
+
const s = F, d = $, i = S, g = L, u = V;
|
|
119
|
+
return U((x(), X("div", Z, [
|
|
120
120
|
R("div", _, [
|
|
121
|
-
B.value ? (
|
|
121
|
+
B.value ? (x(), E(u, {
|
|
122
122
|
key: 0,
|
|
123
123
|
disabled: !o.exportContext.total,
|
|
124
124
|
onCommand: T
|
|
125
125
|
}, {
|
|
126
|
-
dropdown:
|
|
127
|
-
|
|
128
|
-
default:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
disabled: !o.exportContext.selectedList.length,
|
|
126
|
+
dropdown: r(() => [
|
|
127
|
+
n(g, null, {
|
|
128
|
+
default: r(() => [
|
|
129
|
+
n(i, {
|
|
130
|
+
disabled: o.exportContext.hasSelection && !o.exportContext.selectedList.length,
|
|
132
131
|
command: "selected"
|
|
133
132
|
}, {
|
|
134
|
-
default:
|
|
135
|
-
|
|
133
|
+
default: r(() => [...e[4] || (e[4] = [
|
|
134
|
+
p(" 导出选择 ", -1)
|
|
136
135
|
])]),
|
|
137
136
|
_: 1
|
|
138
|
-
}, 8, ["disabled"])
|
|
139
|
-
|
|
140
|
-
default:
|
|
141
|
-
|
|
137
|
+
}, 8, ["disabled"]),
|
|
138
|
+
n(i, { command: "current" }, {
|
|
139
|
+
default: r(() => [...e[5] || (e[5] = [
|
|
140
|
+
p("导出本页", -1)
|
|
142
141
|
])]),
|
|
143
142
|
_: 1
|
|
144
143
|
}),
|
|
145
|
-
|
|
146
|
-
default:
|
|
147
|
-
|
|
144
|
+
n(i, { command: "all" }, {
|
|
145
|
+
default: r(() => [...e[6] || (e[6] = [
|
|
146
|
+
p("导出全部", -1)
|
|
148
147
|
])]),
|
|
149
148
|
_: 1
|
|
150
149
|
})
|
|
@@ -152,17 +151,17 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
152
151
|
_: 1
|
|
153
152
|
})
|
|
154
153
|
]),
|
|
155
|
-
default:
|
|
156
|
-
|
|
154
|
+
default: r(() => [
|
|
155
|
+
n(d, {
|
|
157
156
|
size: "small",
|
|
158
157
|
type: "primary",
|
|
159
|
-
loading:
|
|
158
|
+
loading: f.value
|
|
160
159
|
}, {
|
|
161
|
-
default:
|
|
162
|
-
e[3] || (e[3] =
|
|
163
|
-
|
|
164
|
-
default:
|
|
165
|
-
|
|
160
|
+
default: r(() => [
|
|
161
|
+
e[3] || (e[3] = p(" 导出 ", -1)),
|
|
162
|
+
n(s, null, {
|
|
163
|
+
default: r(() => [
|
|
164
|
+
n(A(J))
|
|
166
165
|
]),
|
|
167
166
|
_: 1
|
|
168
167
|
})
|
|
@@ -171,44 +170,44 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
171
170
|
}, 8, ["loading"])
|
|
172
171
|
]),
|
|
173
172
|
_: 1
|
|
174
|
-
}, 8, ["disabled"])) :
|
|
175
|
-
|
|
173
|
+
}, 8, ["disabled"])) : v("", !0),
|
|
174
|
+
n(k, {
|
|
176
175
|
buttons: o.leftExtraButtons,
|
|
177
176
|
ctx: C.value
|
|
178
177
|
}, null, 8, ["buttons", "ctx"])
|
|
179
178
|
]),
|
|
180
179
|
R("div", ee, [
|
|
181
|
-
|
|
180
|
+
n(k, {
|
|
182
181
|
buttons: o.rightExtraButtons,
|
|
183
182
|
ctx: C.value
|
|
184
183
|
}, null, 8, ["buttons", "ctx"]),
|
|
185
|
-
o.showAutoRefresh ? (
|
|
184
|
+
o.showAutoRefresh ? (x(), E(Q, {
|
|
186
185
|
key: 0,
|
|
187
186
|
modelValue: w.value,
|
|
188
187
|
"onUpdate:modelValue": e[0] || (e[0] = (m) => w.value = m),
|
|
189
|
-
interval:
|
|
190
|
-
"onUpdate:interval": e[1] || (e[1] = (m) =>
|
|
188
|
+
interval: h.value,
|
|
189
|
+
"onUpdate:interval": e[1] || (e[1] = (m) => h.value = m),
|
|
191
190
|
refreshFn: o.tableExpose.refresh,
|
|
192
191
|
enabled: !o.loading
|
|
193
|
-
}, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) :
|
|
194
|
-
o.showRefresh ? (
|
|
192
|
+
}, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) : v("", !0),
|
|
193
|
+
o.showRefresh ? (x(), E(d, {
|
|
195
194
|
key: 1,
|
|
196
195
|
size: "small",
|
|
197
196
|
circle: "",
|
|
198
197
|
onClick: e[2] || (e[2] = (m) => o.tableExpose.refresh())
|
|
199
198
|
}, {
|
|
200
|
-
default:
|
|
201
|
-
|
|
199
|
+
default: r(() => [
|
|
200
|
+
n(s, {
|
|
202
201
|
class: q({ "table-toolbar-icon--rotating": o.loading })
|
|
203
202
|
}, {
|
|
204
|
-
default:
|
|
205
|
-
|
|
203
|
+
default: r(() => [
|
|
204
|
+
n(A(K))
|
|
206
205
|
]),
|
|
207
206
|
_: 1
|
|
208
207
|
}, 8, ["class"])
|
|
209
208
|
]),
|
|
210
209
|
_: 1
|
|
211
|
-
})) :
|
|
210
|
+
})) : v("", !0)
|
|
212
211
|
])
|
|
213
212
|
], 512)), [
|
|
214
213
|
[O, D.value]
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.form-item-tip[data-v-e889a0ed]{text-align:left;line-height:1.5;font-size:12px}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.form-date-picker[data-v-cefb4529]{display:flex;align-items:center}.form-date-picker-input[data-v-cefb4529]{width:50%}.form-date-picker-swift[data-v-cefb4529]{width:50%;padding-left:12px;display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.auto-refresh[data-v-9d78ca06]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-9d78ca06]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-9d78ca06]{width:80px}.confirm-dialog .content[data-v-2f0c870e]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-2f0c870e]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-2f0c870e]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-2f0c870e]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-2f0c870e]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-2f0c870e]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-2f0c870e]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-2f0c870e]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-2f0c870e]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-2f0c870e]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-2f0c870e]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.table-toolbar[data-v-
|
|
1
|
+
.form-item-tip[data-v-e889a0ed]{text-align:left;line-height:1.5;font-size:12px}.form-search_show[data-v-8896356d]{margin-bottom:10px}.form-search .btn-box[data-v-8896356d]{padding-left:20px}.form-search[data-v-8896356d] .el-col{padding-left:14px}.form-verify-image[data-v-a4baf877] .el-input__suffix-inner *{margin:0}.form-verify-image-suffix[data-v-a4baf877]{position:absolute;height:100%;border-radius:var(--el-input-border-radius, var(--el-border-radius-base));top:50%;transform:translateY(-50%);overflow:hidden;cursor:pointer}.form-verify-image-suffix-main[data-v-a4baf877]{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f4f4f4}.form-date-picker[data-v-cefb4529]{display:flex;align-items:center}.form-date-picker-input[data-v-cefb4529]{width:50%}.form-date-picker-swift[data-v-cefb4529]{width:50%;padding-left:12px;display:flex;align-items:center;gap:8px;flex-wrap:nowrap}.auto-refresh[data-v-9d78ca06]{display:flex;align-items:center;gap:8px}.auto-refresh-label[data-v-9d78ca06]{font-size:13px;color:var(--el-text-color-regular)}.auto-refresh-interval[data-v-9d78ca06]{width:80px}.confirm-dialog .content[data-v-2f0c870e]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 200px)}.confirm-dialog .btn[data-v-2f0c870e]{width:150px;height:40px;border-radius:4px}.confirm-dialog .main[data-v-2f0c870e]{position:relative;text-align:center}.confirm-dialog .main .close-box[data-v-2f0c870e]{position:absolute;top:0;right:0;cursor:pointer;z-index:2}.confirm-dialog .main .shim[data-v-2f0c870e]{position:relative;z-index:1}.confirm-dialog .main .shim .title[data-v-2f0c870e]{font-size:18px;font-weight:500}.confirm-dialog .main .shim .content[data-v-2f0c870e]{font-size:16px;margin-top:15px}.confirm-dialog .main .shim .footer[data-v-2f0c870e]{display:flex;justify-content:center;align-items:center;padding-top:5px}.confirm-dialog .main .shim .footer>.btn[data-v-2f0c870e]:not(:last-child){margin-right:30px}.confirm-dialog .main .shim .footer[reverse=true][data-v-2f0c870e]{flex-direction:row-reverse}.confirm-dialog .main .shim .footer[reverse=true]>.btn[data-v-2f0c870e]:not(:last-child){margin-right:0;margin-left:30px}.confirm-dialog .el-dialog__header,.confirm-dialog .el-dialog__body{padding:0;background-color:transparent}.table-toolbar[data-v-90cd7b54]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-90cd7b54],.table-toolbar-right[data-v-90cd7b54]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-90cd7b54]{animation:table-toolbar-rotating-90cd7b54 1s linear infinite}@keyframes table-toolbar-rotating-90cd7b54{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-135cf353]{--el-table-header-bg-color: var(--v4bebd1e5)}.table-main-pagination[data-v-135cf353]{margin-top:10px;display:flex;justify-content:flex-end}.list-page[data-v-182577bf]{min-height:var(--ad28a056)}.list-page-header[data-v-182577bf],.list-page-operation[data-v-182577bf]{margin-bottom:10px}.list-page[data-v-182577bf] .el-loading-mask{left:-10px;top:-10px;right:-10px;bottom:-10px}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@done-coding/admin-core",
|
|
3
|
-
"version": "0.1.1-alpha.
|
|
3
|
+
"version": "0.1.1-alpha.6",
|
|
4
4
|
"description": "后台管理核心",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"node": ">=18.0.0",
|
|
78
78
|
"pnpm": ">=9.0.0"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "18502340f8479a353bb1e776e9973c592d7de3da"
|
|
81
81
|
}
|