@done-coding/admin-core 0.1.1-alpha.4 → 0.1.1-alpha.5
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 "./TableToolbar.vue2.mjs";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-ccf5435d"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ElDropdown as V, ElButton as $, ElIcon as F, ElDropdownMenu as
|
|
1
|
+
import { ElDropdown as V, ElButton as $, ElIcon as F, ElDropdownMenu as L, ElDropdownItem as S } from "element-plus/es";
|
|
2
2
|
import "element-plus/es/components/base/style/css";
|
|
3
3
|
import "element-plus/es/components/dropdown/style/css";
|
|
4
4
|
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
|
|
8
|
+
import { defineComponent as z, useModel as P, computed as v, ref as y, watch as N, withDirectives as U, openBlock as c, createElementBlock as X, createElementVNode as R, createBlock as p, withCtx as n, createVNode as r, createTextVNode as h, unref as A, createCommentVNode as g, 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
14
|
import { EXPORT_MAX_LIMIT as f, exportCSV as Y } from "../../utils/export.mjs";
|
|
15
|
-
const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee = { class: "table-toolbar-right" }, pe = /* @__PURE__ */
|
|
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({
|
|
18
18
|
showRefresh: { type: Boolean, default: !0 },
|
|
@@ -33,10 +33,10 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
33
33
|
isAutoRefreshModifiers: {}
|
|
34
34
|
}),
|
|
35
35
|
emits: ["update:isAutoRefresh"],
|
|
36
|
-
setup(
|
|
37
|
-
const t =
|
|
38
|
-
var
|
|
39
|
-
return !!((
|
|
36
|
+
setup(o) {
|
|
37
|
+
const t = o, w = P(o, "isAutoRefresh"), B = v(() => {
|
|
38
|
+
var l;
|
|
39
|
+
return !!((l = t.exportColumns) != null && l.length);
|
|
40
40
|
}), C = v(() => ({
|
|
41
41
|
tableExpose: t.tableExpose,
|
|
42
42
|
loading: t.loading,
|
|
@@ -49,27 +49,27 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
49
49
|
}
|
|
50
50
|
})), D = v(
|
|
51
51
|
() => {
|
|
52
|
-
var
|
|
52
|
+
var l, e;
|
|
53
53
|
return [
|
|
54
54
|
B.value,
|
|
55
55
|
t.showAutoRefresh,
|
|
56
56
|
t.showRefresh,
|
|
57
|
-
(
|
|
57
|
+
(l = t.leftExtraButtons) == null ? void 0 : l.length,
|
|
58
58
|
(e = t.rightExtraButtons) == null ? void 0 : e.length
|
|
59
59
|
].filter(Boolean).length;
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), b = y(30);
|
|
62
62
|
N(
|
|
63
63
|
() => t.refreshInterval,
|
|
64
|
-
(
|
|
65
|
-
|
|
64
|
+
(l) => {
|
|
65
|
+
b.value = l;
|
|
66
66
|
},
|
|
67
67
|
{ immediate: !0 }
|
|
68
68
|
);
|
|
69
|
-
const x = y(!1), I = async (
|
|
70
|
-
const { selectedList: e, currentPageList: s, api: d, query: i } = t.exportContext,
|
|
69
|
+
const x = y(!1), I = async (l) => {
|
|
70
|
+
const { selectedList: e, currentPageList: s, api: d, query: i } = t.exportContext, E = t.exportColumns;
|
|
71
71
|
let u;
|
|
72
|
-
switch (
|
|
72
|
+
switch (l) {
|
|
73
73
|
case "selected":
|
|
74
74
|
u = e;
|
|
75
75
|
break;
|
|
@@ -103,38 +103,39 @@ 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:
|
|
107
|
-
}, T = (
|
|
106
|
+
Y({ columns: E, list: u, filename: m });
|
|
107
|
+
}, T = (l) => {
|
|
108
108
|
var s;
|
|
109
109
|
if (x.value) return;
|
|
110
110
|
x.value = !0;
|
|
111
|
-
const e = t.exportByFe ? I(
|
|
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
|
x.value = !1;
|
|
115
115
|
});
|
|
116
116
|
};
|
|
117
|
-
return (
|
|
118
|
-
const s = F, d = $, i =
|
|
117
|
+
return (l, e) => {
|
|
118
|
+
const s = F, d = $, i = S, E = L, u = V;
|
|
119
119
|
return U((c(), X("div", Z, [
|
|
120
120
|
R("div", _, [
|
|
121
121
|
B.value ? (c(), p(u, {
|
|
122
122
|
key: 0,
|
|
123
|
-
disabled: !
|
|
123
|
+
disabled: !o.exportContext.total,
|
|
124
124
|
onCommand: T
|
|
125
125
|
}, {
|
|
126
126
|
dropdown: n(() => [
|
|
127
|
-
r(
|
|
127
|
+
r(E, null, {
|
|
128
128
|
default: n(() => [
|
|
129
|
-
|
|
129
|
+
o.exportContext.hasSelection ? (c(), p(i, {
|
|
130
130
|
key: 0,
|
|
131
|
+
disabled: !o.exportContext.selectedList.length,
|
|
131
132
|
command: "selected"
|
|
132
133
|
}, {
|
|
133
134
|
default: n(() => [...e[4] || (e[4] = [
|
|
134
135
|
h(" 导出选择 ", -1)
|
|
135
136
|
])]),
|
|
136
137
|
_: 1
|
|
137
|
-
})) : g("", !0),
|
|
138
|
+
}, 8, ["disabled"])) : g("", !0),
|
|
138
139
|
r(i, { command: "current" }, {
|
|
139
140
|
default: n(() => [...e[5] || (e[5] = [
|
|
140
141
|
h("导出本页", -1)
|
|
@@ -172,33 +173,33 @@ const Z = { class: "table-toolbar" }, _ = { class: "table-toolbar-left" }, ee =
|
|
|
172
173
|
_: 1
|
|
173
174
|
}, 8, ["disabled"])) : g("", !0),
|
|
174
175
|
r(k, {
|
|
175
|
-
buttons:
|
|
176
|
+
buttons: o.leftExtraButtons,
|
|
176
177
|
ctx: C.value
|
|
177
178
|
}, null, 8, ["buttons", "ctx"])
|
|
178
179
|
]),
|
|
179
180
|
R("div", ee, [
|
|
180
181
|
r(k, {
|
|
181
|
-
buttons:
|
|
182
|
+
buttons: o.rightExtraButtons,
|
|
182
183
|
ctx: C.value
|
|
183
184
|
}, null, 8, ["buttons", "ctx"]),
|
|
184
|
-
|
|
185
|
+
o.showAutoRefresh ? (c(), p(Q, {
|
|
185
186
|
key: 0,
|
|
186
187
|
modelValue: w.value,
|
|
187
188
|
"onUpdate:modelValue": e[0] || (e[0] = (m) => w.value = m),
|
|
188
|
-
interval:
|
|
189
|
-
"onUpdate:interval": e[1] || (e[1] = (m) =>
|
|
190
|
-
refreshFn:
|
|
191
|
-
enabled: !
|
|
189
|
+
interval: b.value,
|
|
190
|
+
"onUpdate:interval": e[1] || (e[1] = (m) => b.value = m),
|
|
191
|
+
refreshFn: o.tableExpose.refresh,
|
|
192
|
+
enabled: !o.loading
|
|
192
193
|
}, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) : g("", !0),
|
|
193
|
-
|
|
194
|
+
o.showRefresh ? (c(), p(d, {
|
|
194
195
|
key: 1,
|
|
195
196
|
size: "small",
|
|
196
197
|
circle: "",
|
|
197
|
-
onClick: e[2] || (e[2] = (m) =>
|
|
198
|
+
onClick: e[2] || (e[2] = (m) => o.tableExpose.refresh())
|
|
198
199
|
}, {
|
|
199
200
|
default: n(() => [
|
|
200
201
|
r(s, {
|
|
201
|
-
class: q({ "table-toolbar-icon--rotating":
|
|
202
|
+
class: q({ "table-toolbar-icon--rotating": o.loading })
|
|
202
203
|
}, {
|
|
203
204
|
default: n(() => [
|
|
204
205
|
r(A(K))
|
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-ccf5435d]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-ccf5435d],.table-toolbar-right[data-v-ccf5435d]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-ccf5435d]{animation:table-toolbar-rotating-ccf5435d 1s linear infinite}@keyframes table-toolbar-rotating-ccf5435d{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.table-main-table[data-v-3d9833b8]{--el-table-header-bg-color: var(--v131e457a)}.table-main-pagination[data-v-3d9833b8]{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.5",
|
|
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": "b7bfd3786b4d39be001b5ffc51285ff22dce36f4"
|
|
81
81
|
}
|