@done-coding/admin-core 0.1.1-alpha.3 → 0.1.1-alpha.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/es/components/form/FormDatePicker.vue.mjs +7 -0
- package/es/components/form/FormDatePicker.vue2.mjs +50 -0
- package/es/components/form/index.mjs +19 -19
- package/es/components/form/utils.mjs +82 -61
- package/es/components/misc/ActionButton.vue.mjs +52 -0
- package/es/components/misc/ActionButton.vue2.mjs +4 -0
- package/es/components/misc/ActionButtonDanger.vue.mjs +32 -0
- package/es/components/misc/ActionButtonDanger.vue2.mjs +4 -0
- package/es/components/misc/ActionButtonWarn.vue.mjs +32 -0
- package/es/components/misc/ActionButtonWarn.vue2.mjs +4 -0
- package/es/components/misc/index.mjs +21 -9
- package/es/components/table/TableMain.vue.mjs +2 -2
- package/es/components/table/TableMain.vue2.mjs +146 -149
- package/es/components/table/TableToolbar.vue.mjs +2 -2
- package/es/components/table/TableToolbar.vue2.mjs +119 -86
- package/es/components/table/ToolbarButtons.vue.mjs +49 -0
- package/es/components/table/ToolbarButtons.vue2.mjs +4 -0
- package/es/index.mjs +104 -97
- package/es/style.css +1 -1
- package/es/utils/export.mjs +7 -7
- package/package.json +2 -2
- package/types/components/form/{FormDateTimeRange.vue.d.ts → FormDatePicker.vue.d.ts} +2 -2
- package/types/components/form/index.d.ts +2 -2
- package/types/components/form/utils.d.ts +3 -1
- package/types/components/misc/ActionButton.vue.d.ts +24 -0
- package/types/components/misc/ActionButtonDanger.vue.d.ts +19 -0
- package/types/components/misc/ActionButtonWarn.vue.d.ts +19 -0
- package/types/components/misc/index.d.ts +4 -1
- package/types/components/table/TableToolbar.vue.d.ts +49 -15
- package/types/components/table/ToolbarButtons.vue.d.ts +19 -0
- package/types/components/table/types.d.ts +40 -16
- package/types/utils/export.d.ts +8 -1
- package/es/components/form/FormDateTimeRange.vue.mjs +0 -46
- package/es/components/form/FormDateTimeRange.vue2.mjs +0 -4
|
@@ -1,65 +1,88 @@
|
|
|
1
|
-
import { ElDropdown as
|
|
1
|
+
import { ElDropdown as V, ElButton as $, ElIcon as F, ElDropdownMenu as S, ElDropdownItem as z } 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 L, useModel as
|
|
9
|
-
import { ElMessageBox as
|
|
10
|
-
import { ArrowDown as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
|
|
8
|
+
import { defineComponent as L, 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
|
+
import { ElMessageBox as G, ElMessage as H } from "element-plus";
|
|
10
|
+
import { ArrowDown as J, Refresh as K } from "@element-plus/icons-vue";
|
|
11
|
+
import Q from "../misc/AutoRefresh.vue.mjs";
|
|
12
|
+
import k from "./ToolbarButtons.vue.mjs";
|
|
13
|
+
import { countAll as W, fetchListAll as M } from "../../helpers/list-helper.mjs";
|
|
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__ */ L({
|
|
15
16
|
__name: "TableToolbar",
|
|
16
|
-
props: /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
props: /* @__PURE__ */ j({
|
|
18
|
+
showRefresh: { type: Boolean, default: !0 },
|
|
19
|
+
showAutoRefresh: { type: Boolean, default: !0 },
|
|
19
20
|
refreshInterval: { default: 30 },
|
|
20
21
|
exportByFe: { type: Boolean, default: !0 },
|
|
21
22
|
exportFn: {},
|
|
23
|
+
exportColumns: {},
|
|
24
|
+
leftExtraButtons: {},
|
|
25
|
+
rightExtraButtons: {},
|
|
22
26
|
tableExpose: {},
|
|
23
27
|
loading: { type: Boolean },
|
|
24
|
-
exportContext: {}
|
|
28
|
+
exportContext: {},
|
|
29
|
+
currentPage: {},
|
|
30
|
+
pageSize: {}
|
|
25
31
|
}, {
|
|
26
32
|
isAutoRefresh: { type: Boolean },
|
|
27
33
|
isAutoRefreshModifiers: {}
|
|
28
34
|
}),
|
|
29
35
|
emits: ["update:isAutoRefresh"],
|
|
30
|
-
setup(
|
|
31
|
-
const t =
|
|
36
|
+
setup(l) {
|
|
37
|
+
const t = l, w = P(l, "isAutoRefresh"), B = v(() => {
|
|
32
38
|
var o;
|
|
33
|
-
return (o = t.
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
return !!((o = t.exportColumns) != null && o.length);
|
|
40
|
+
}), C = v(() => ({
|
|
41
|
+
tableExpose: t.tableExpose,
|
|
42
|
+
loading: t.loading,
|
|
43
|
+
exportContext: t.exportContext,
|
|
44
|
+
selectedList: t.exportContext.selectedList,
|
|
45
|
+
pagination: {
|
|
46
|
+
currentPage: t.currentPage,
|
|
47
|
+
pageSize: t.pageSize,
|
|
48
|
+
total: t.exportContext.total
|
|
49
|
+
}
|
|
50
|
+
})), D = v(
|
|
51
|
+
() => {
|
|
52
|
+
var o, e;
|
|
53
|
+
return [
|
|
54
|
+
B.value,
|
|
55
|
+
t.showAutoRefresh,
|
|
56
|
+
t.showRefresh,
|
|
57
|
+
(o = t.leftExtraButtons) == null ? void 0 : o.length,
|
|
58
|
+
(e = t.rightExtraButtons) == null ? void 0 : e.length
|
|
59
|
+
].filter(Boolean).length;
|
|
60
|
+
}
|
|
38
61
|
), E = y(30);
|
|
39
|
-
|
|
62
|
+
N(
|
|
40
63
|
() => t.refreshInterval,
|
|
41
64
|
(o) => {
|
|
42
65
|
E.value = o;
|
|
43
66
|
},
|
|
44
67
|
{ immediate: !0 }
|
|
45
68
|
);
|
|
46
|
-
const
|
|
47
|
-
const {
|
|
48
|
-
let
|
|
69
|
+
const x = y(!1), I = async (o) => {
|
|
70
|
+
const { selectedList: e, currentPageList: s, api: d, query: i } = t.exportContext, b = t.exportColumns;
|
|
71
|
+
let u;
|
|
49
72
|
switch (o) {
|
|
50
73
|
case "selected":
|
|
51
|
-
|
|
74
|
+
u = e;
|
|
52
75
|
break;
|
|
53
76
|
case "current":
|
|
54
|
-
|
|
77
|
+
u = s;
|
|
55
78
|
break;
|
|
56
79
|
case "all":
|
|
57
80
|
try {
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
81
|
+
const a = await W(d, i);
|
|
82
|
+
if (a > f) {
|
|
60
83
|
try {
|
|
61
|
-
await
|
|
62
|
-
`数据量超过 ${
|
|
84
|
+
await G.confirm(
|
|
85
|
+
`数据量超过 ${f} 条(共 ${a} 条),是否只导出前 ${f} 条?`,
|
|
63
86
|
"提示",
|
|
64
87
|
{
|
|
65
88
|
confirmButtonText: "导出",
|
|
@@ -70,57 +93,57 @@ const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = {
|
|
|
70
93
|
} catch {
|
|
71
94
|
return;
|
|
72
95
|
}
|
|
73
|
-
|
|
96
|
+
u = await M(d, i, { limit: f });
|
|
74
97
|
} else
|
|
75
|
-
|
|
76
|
-
} catch (
|
|
77
|
-
|
|
98
|
+
u = await M(d, i, { limit: f });
|
|
99
|
+
} catch (a) {
|
|
100
|
+
H.error(`导出失败:${(a == null ? void 0 : a.message) || (a == null ? void 0 : a.toString())}`);
|
|
78
101
|
return;
|
|
79
102
|
}
|
|
80
103
|
break;
|
|
81
104
|
}
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
var
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
const e = t.exportByFe ?
|
|
105
|
+
const m = `${document.title}-${Date.now()}`;
|
|
106
|
+
Y({ columns: b, list: u, filename: m });
|
|
107
|
+
}, T = (o) => {
|
|
108
|
+
var s;
|
|
109
|
+
if (x.value) return;
|
|
110
|
+
x.value = !0;
|
|
111
|
+
const e = t.exportByFe ? I(o) : (s = t.exportFn) == null ? void 0 : s.call(t, o);
|
|
89
112
|
Promise.resolve(e).catch(() => {
|
|
90
113
|
}).finally(() => {
|
|
91
|
-
|
|
114
|
+
x.value = !1;
|
|
92
115
|
});
|
|
93
116
|
};
|
|
94
117
|
return (o, e) => {
|
|
95
|
-
const
|
|
96
|
-
return
|
|
97
|
-
|
|
98
|
-
|
|
118
|
+
const s = F, d = $, i = z, b = S, u = V;
|
|
119
|
+
return U((c(), X("div", Z, [
|
|
120
|
+
R("div", _, [
|
|
121
|
+
B.value ? (c(), p(u, {
|
|
99
122
|
key: 0,
|
|
100
|
-
disabled: !
|
|
101
|
-
onCommand:
|
|
123
|
+
disabled: !l.exportContext.total,
|
|
124
|
+
onCommand: T
|
|
102
125
|
}, {
|
|
103
|
-
dropdown:
|
|
104
|
-
|
|
105
|
-
default:
|
|
106
|
-
|
|
126
|
+
dropdown: n(() => [
|
|
127
|
+
r(b, null, {
|
|
128
|
+
default: n(() => [
|
|
129
|
+
l.exportContext.hasSelection ? (c(), p(i, {
|
|
107
130
|
key: 0,
|
|
108
131
|
command: "selected"
|
|
109
132
|
}, {
|
|
110
|
-
default:
|
|
111
|
-
|
|
133
|
+
default: n(() => [...e[4] || (e[4] = [
|
|
134
|
+
h(" 导出选择 ", -1)
|
|
112
135
|
])]),
|
|
113
136
|
_: 1
|
|
114
|
-
})) :
|
|
115
|
-
|
|
116
|
-
default:
|
|
117
|
-
|
|
137
|
+
})) : g("", !0),
|
|
138
|
+
r(i, { command: "current" }, {
|
|
139
|
+
default: n(() => [...e[5] || (e[5] = [
|
|
140
|
+
h("导出本页", -1)
|
|
118
141
|
])]),
|
|
119
142
|
_: 1
|
|
120
143
|
}),
|
|
121
|
-
|
|
122
|
-
default:
|
|
123
|
-
|
|
144
|
+
r(i, { command: "all" }, {
|
|
145
|
+
default: n(() => [...e[6] || (e[6] = [
|
|
146
|
+
h("导出全部", -1)
|
|
124
147
|
])]),
|
|
125
148
|
_: 1
|
|
126
149
|
})
|
|
@@ -128,17 +151,17 @@ const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = {
|
|
|
128
151
|
_: 1
|
|
129
152
|
})
|
|
130
153
|
]),
|
|
131
|
-
default:
|
|
132
|
-
|
|
154
|
+
default: n(() => [
|
|
155
|
+
r(d, {
|
|
133
156
|
size: "small",
|
|
134
157
|
type: "primary",
|
|
135
|
-
loading:
|
|
158
|
+
loading: x.value
|
|
136
159
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
e[3] || (e[3] =
|
|
139
|
-
|
|
140
|
-
default:
|
|
141
|
-
|
|
160
|
+
default: n(() => [
|
|
161
|
+
e[3] || (e[3] = h(" 导出 ", -1)),
|
|
162
|
+
r(s, null, {
|
|
163
|
+
default: n(() => [
|
|
164
|
+
r(A(J))
|
|
142
165
|
]),
|
|
143
166
|
_: 1
|
|
144
167
|
})
|
|
@@ -147,41 +170,51 @@ const K = { class: "table-toolbar" }, Q = { class: "table-toolbar-left" }, W = {
|
|
|
147
170
|
}, 8, ["loading"])
|
|
148
171
|
]),
|
|
149
172
|
_: 1
|
|
150
|
-
}, 8, ["disabled"])) :
|
|
173
|
+
}, 8, ["disabled"])) : g("", !0),
|
|
174
|
+
r(k, {
|
|
175
|
+
buttons: l.leftExtraButtons,
|
|
176
|
+
ctx: C.value
|
|
177
|
+
}, null, 8, ["buttons", "ctx"])
|
|
151
178
|
]),
|
|
152
|
-
|
|
153
|
-
|
|
179
|
+
R("div", ee, [
|
|
180
|
+
r(k, {
|
|
181
|
+
buttons: l.rightExtraButtons,
|
|
182
|
+
ctx: C.value
|
|
183
|
+
}, null, 8, ["buttons", "ctx"]),
|
|
184
|
+
l.showAutoRefresh ? (c(), p(Q, {
|
|
154
185
|
key: 0,
|
|
155
|
-
modelValue:
|
|
156
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
186
|
+
modelValue: w.value,
|
|
187
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => w.value = m),
|
|
157
188
|
interval: E.value,
|
|
158
|
-
"onUpdate:interval": e[1] || (e[1] = (
|
|
159
|
-
refreshFn:
|
|
160
|
-
enabled: !
|
|
161
|
-
}, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) :
|
|
162
|
-
|
|
189
|
+
"onUpdate:interval": e[1] || (e[1] = (m) => E.value = m),
|
|
190
|
+
refreshFn: l.tableExpose.refresh,
|
|
191
|
+
enabled: !l.loading
|
|
192
|
+
}, null, 8, ["modelValue", "interval", "refreshFn", "enabled"])) : g("", !0),
|
|
193
|
+
l.showRefresh ? (c(), p(d, {
|
|
163
194
|
key: 1,
|
|
164
195
|
size: "small",
|
|
165
196
|
circle: "",
|
|
166
|
-
onClick: e[2] || (e[2] = (
|
|
197
|
+
onClick: e[2] || (e[2] = (m) => l.tableExpose.refresh())
|
|
167
198
|
}, {
|
|
168
|
-
default:
|
|
169
|
-
|
|
170
|
-
class:
|
|
199
|
+
default: n(() => [
|
|
200
|
+
r(s, {
|
|
201
|
+
class: q({ "table-toolbar-icon--rotating": l.loading })
|
|
171
202
|
}, {
|
|
172
|
-
default:
|
|
173
|
-
|
|
203
|
+
default: n(() => [
|
|
204
|
+
r(A(K))
|
|
174
205
|
]),
|
|
175
206
|
_: 1
|
|
176
207
|
}, 8, ["class"])
|
|
177
208
|
]),
|
|
178
209
|
_: 1
|
|
179
|
-
})) :
|
|
210
|
+
})) : g("", !0)
|
|
180
211
|
])
|
|
212
|
+
], 512)), [
|
|
213
|
+
[O, D.value]
|
|
181
214
|
]);
|
|
182
215
|
};
|
|
183
216
|
}
|
|
184
217
|
});
|
|
185
218
|
export {
|
|
186
|
-
|
|
219
|
+
pe as default
|
|
187
220
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ElButton as p } from "element-plus/es";
|
|
2
|
+
import "element-plus/es/components/base/style/css";
|
|
3
|
+
import "element-plus/es/components/button/style/css";
|
|
4
|
+
import { defineComponent as y, openBlock as t, createElementBlock as r, Fragment as n, renderList as d, createBlock as c, resolveDynamicComponent as u, unref as x, mergeProps as l, withCtx as m, createTextVNode as i, toDisplayString as f } from "vue";
|
|
5
|
+
import B from "../misc/ActionButton.vue.mjs";
|
|
6
|
+
const A = /* @__PURE__ */ y({
|
|
7
|
+
__name: "ToolbarButtons",
|
|
8
|
+
props: {
|
|
9
|
+
buttons: {},
|
|
10
|
+
ctx: {}
|
|
11
|
+
},
|
|
12
|
+
setup(o) {
|
|
13
|
+
const s = B;
|
|
14
|
+
return (_, R) => {
|
|
15
|
+
const k = p;
|
|
16
|
+
return t(!0), r(n, null, d(o.buttons, (e) => {
|
|
17
|
+
var a;
|
|
18
|
+
return t(), r(n, {
|
|
19
|
+
key: e.key
|
|
20
|
+
}, [
|
|
21
|
+
e.actionButtonProps ? (t(), c(u(x(s)), l({
|
|
22
|
+
key: 0,
|
|
23
|
+
ref_for: !0
|
|
24
|
+
}, e.actionButtonProps(o.ctx)), {
|
|
25
|
+
default: m(() => [
|
|
26
|
+
e.btnRender ? (t(), c(u(() => e.btnRender(o.ctx)), { key: 0 })) : (t(), r(n, { key: 1 }, [
|
|
27
|
+
i(f(e.label), 1)
|
|
28
|
+
], 64))
|
|
29
|
+
]),
|
|
30
|
+
_: 2
|
|
31
|
+
}, 1040)) : (t(), c(k, l({
|
|
32
|
+
key: 1,
|
|
33
|
+
ref_for: !0
|
|
34
|
+
}, (a = e.props) == null ? void 0 : a.call(e, o.ctx)), {
|
|
35
|
+
default: m(() => [
|
|
36
|
+
e.btnRender ? (t(), c(u(() => e.btnRender(o.ctx)), { key: 0 })) : (t(), r(n, { key: 1 }, [
|
|
37
|
+
i(f(e.label), 1)
|
|
38
|
+
], 64))
|
|
39
|
+
]),
|
|
40
|
+
_: 2
|
|
41
|
+
}, 1040))
|
|
42
|
+
], 64);
|
|
43
|
+
}), 128);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
A as default
|
|
49
|
+
};
|
package/es/index.mjs
CHANGED
|
@@ -5,113 +5,120 @@ import { miscInstall as a } from "./components/misc/index.mjs";
|
|
|
5
5
|
import { modalInstall as m } from "./components/modal/index.mjs";
|
|
6
6
|
import { tableInstall as f } from "./components/table/index.mjs";
|
|
7
7
|
import { listPageInstall as s } from "./components/list-page/index.mjs";
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as D } from "./components/form/
|
|
15
|
-
import { default as h } from "./components/form/
|
|
16
|
-
import { default as N } from "./components/
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as v } from "./components/
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import {
|
|
22
|
-
import { default as
|
|
23
|
-
import {
|
|
24
|
-
import { default as q } from "./components/
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import { default as
|
|
31
|
-
import {
|
|
32
|
-
import { default as De } from "./components/
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
|
|
8
|
+
import { default as E } from "./components/misc/ActionButton.vue.mjs";
|
|
9
|
+
import { default as M } from "./components/misc/ActionButtonDanger.vue.mjs";
|
|
10
|
+
import { default as A } from "./components/misc/ActionButtonWarn.vue.mjs";
|
|
11
|
+
import { default as R } from "./components/modal/DetailModal.vue.mjs";
|
|
12
|
+
import { default as O } from "./components/form/FormMain.vue.mjs";
|
|
13
|
+
import { default as L } from "./components/form/FormRadio.vue.mjs";
|
|
14
|
+
import { default as D } from "./components/form/FormRadioGroup.vue.mjs";
|
|
15
|
+
import { default as h } from "./components/form/FormSelect.vue.mjs";
|
|
16
|
+
import { default as N } from "./components/form/FormTree.vue.mjs";
|
|
17
|
+
import { default as G } from "./components/form/FormVerifyCode.vue.mjs";
|
|
18
|
+
import { default as v } from "./components/menu/MenuItemSub.vue.mjs";
|
|
19
|
+
import { default as U } from "./components/menu/MenuTree.vue.mjs";
|
|
20
|
+
import { default as k } from "./components/display/TabsMain.vue.mjs";
|
|
21
|
+
import { default as K } from "./components/misc/TriggerAutoImport.vue.mjs";
|
|
22
|
+
import { default as X } from "./components/display/WatchSize.vue.mjs";
|
|
23
|
+
import { APP_API_LIST_MODEL_KEY_CONFIG as Q } from "./config/list-model.mjs";
|
|
24
|
+
import { default as q } from "./components/misc/AutoRefresh.vue.mjs";
|
|
25
|
+
import { BODY_CONTENT_VIEWPORT_HEIGHT as Z } from "./inject/key.mjs";
|
|
26
|
+
import { default as ee } from "./components/modal/ConfirmModal.vue.mjs";
|
|
27
|
+
import { EXPORT_MAX_LIMIT as oe, OPERATE_COLUMN_PROP as re, exportCSV as ae, pickExportColumns as me } from "./utils/export.mjs";
|
|
28
|
+
import { FORM_CONFIG_SELECT_ALL_VALUE as se, getConfirmPasswordRule as le, passwordRule as ue, setFormComponentType as ie } from "./helpers/form.mjs";
|
|
29
|
+
import { FORM_ITEM_CHANGE_LOADING as ne, generateFormData as xe, getBlurSubmit as de, getChangeSubmit as ce, getDatePickerSwiftOptions as Ie, getEnterSubmit as ge, getPlaceholder as Ee, getVModelSugar as _e, parseFormData as Me, setInputComponent as Te, setSelectComponent as Ae, stringifyFormData as Fe, swiftFormItemConfig as Re } from "./components/form/utils.mjs";
|
|
30
|
+
import { default as Oe } from "./components/form/FormDatePicker.vue.mjs";
|
|
31
|
+
import { default as Le } from "./components/form/FormSearch.vue.mjs";
|
|
32
|
+
import { default as De } from "./components/form/FormVerifyImage.vue.mjs";
|
|
33
|
+
import { default as he } from "./components/list-page/ListPage.vue.mjs";
|
|
34
|
+
import { ROUTE_MODULE_LEVEL as Ne, TabsMainReplaceQueryKey as we } from "./config/route.mjs";
|
|
35
|
+
import { default as Ve } from "./components/table/TableMain.vue.mjs";
|
|
36
|
+
import { countAll as Be, createListApi as Ue, fetchListAll as We } from "./helpers/list-helper.mjs";
|
|
37
|
+
import { createGenerateRouteMetaRawTree as He } from "./helpers/route.mjs";
|
|
38
|
+
import { createStorageWithNamespace as ze } from "./helpers/storage.mjs";
|
|
39
|
+
import { createUseState as Ye } from "./helpers/state.mjs";
|
|
40
|
+
import { flatRouteMetaResolveRaw as je, getRoutePermissionKey as qe } from "./utils/router.mjs";
|
|
41
|
+
import { getId as Ze } from "./utils/id.mjs";
|
|
42
|
+
import { timeCountDown as et } from "./utils/time.mjs";
|
|
43
|
+
import { useActivated as ot, useActivatedEvent as rt, useActivatedExec as at } from "./hooks/activated.mjs";
|
|
44
|
+
import { useFeelSize as ft } from "./hooks/feel-size.mjs";
|
|
45
|
+
import { useMenusDataDispatch as lt } from "./hooks/menus-dispatch.mjs";
|
|
46
|
+
import { useTimeout as it } from "./hooks/timeout.mjs";
|
|
47
|
+
const c = {
|
|
45
48
|
install(e) {
|
|
46
49
|
e.use(t), e.use(o), e.use(r), e.use(a), e.use(m), e.use(f), e.use(s);
|
|
47
50
|
}
|
|
48
51
|
};
|
|
49
52
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
Z as
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
D as
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
He as
|
|
53
|
+
Q as APP_API_LIST_MODEL_KEY_CONFIG,
|
|
54
|
+
E as ActionButton,
|
|
55
|
+
M as ActionButtonDanger,
|
|
56
|
+
A as ActionButtonWarn,
|
|
57
|
+
q as AutoRefresh,
|
|
58
|
+
Z as BODY_CONTENT_VIEWPORT_HEIGHT,
|
|
59
|
+
ee as ConfirmModal,
|
|
60
|
+
R as DetailModal,
|
|
61
|
+
oe as EXPORT_MAX_LIMIT,
|
|
62
|
+
se as FORM_CONFIG_SELECT_ALL_VALUE,
|
|
63
|
+
ne as FORM_ITEM_CHANGE_LOADING,
|
|
64
|
+
Oe as FormDatePicker,
|
|
65
|
+
O as FormMain,
|
|
66
|
+
L as FormRadio,
|
|
67
|
+
D as FormRadioGroup,
|
|
68
|
+
Le as FormSearch,
|
|
69
|
+
h as FormSelect,
|
|
70
|
+
N as FormTree,
|
|
71
|
+
G as FormVerifyCode,
|
|
72
|
+
De as FormVerifyImage,
|
|
73
|
+
he as ListPage,
|
|
74
|
+
v as MenuItemSub,
|
|
75
|
+
U as MenuTree,
|
|
76
|
+
re as OPERATE_COLUMN_PROP,
|
|
77
|
+
Ne as ROUTE_MODULE_LEVEL,
|
|
78
|
+
Ve as TableMain,
|
|
79
|
+
k as TabsMain,
|
|
80
|
+
we as TabsMainReplaceQueryKey,
|
|
81
|
+
K as TriggerAutoImport,
|
|
82
|
+
X as WatchSize,
|
|
83
|
+
Be as countAll,
|
|
84
|
+
He as createGenerateRouteMetaRawTree,
|
|
85
|
+
Ue as createListApi,
|
|
86
|
+
ze as createStorageWithNamespace,
|
|
87
|
+
Ye as createUseState,
|
|
82
88
|
r as displayInstall,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
89
|
+
ae as exportCSV,
|
|
90
|
+
We as fetchListAll,
|
|
91
|
+
je as flatRouteMetaResolveRaw,
|
|
86
92
|
t as formInstall,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
xe as generateFormData,
|
|
94
|
+
de as getBlurSubmit,
|
|
95
|
+
ce as getChangeSubmit,
|
|
96
|
+
le as getConfirmPasswordRule,
|
|
97
|
+
Ie as getDatePickerSwiftOptions,
|
|
98
|
+
ge as getEnterSubmit,
|
|
99
|
+
Ze as getId,
|
|
100
|
+
Ee as getPlaceholder,
|
|
101
|
+
qe as getRoutePermissionKey,
|
|
102
|
+
_e as getVModelSugar,
|
|
103
|
+
c as installComponents,
|
|
97
104
|
s as listPageInstall,
|
|
98
105
|
o as menuInstall,
|
|
99
106
|
a as miscInstall,
|
|
100
107
|
m as modalInstall,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
Me as parseFormData,
|
|
109
|
+
ue as passwordRule,
|
|
110
|
+
me as pickExportColumns,
|
|
111
|
+
ie as setFormComponentType,
|
|
112
|
+
Te as setInputComponent,
|
|
113
|
+
Ae as setSelectComponent,
|
|
114
|
+
Fe as stringifyFormData,
|
|
115
|
+
Re as swiftFormItemConfig,
|
|
109
116
|
f as tableInstall,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
+
et as timeCountDown,
|
|
118
|
+
ot as useActivated,
|
|
119
|
+
rt as useActivatedEvent,
|
|
120
|
+
at as useActivatedExec,
|
|
121
|
+
ft as useFeelSize,
|
|
122
|
+
lt as useMenusDataDispatch,
|
|
123
|
+
it as useTimeout
|
|
117
124
|
};
|
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}.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-66ef498f]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;gap:20px}.table-toolbar-left[data-v-66ef498f],.table-toolbar-right[data-v-66ef498f]{display:flex;align-items:center;gap:10px}.table-toolbar-icon--rotating[data-v-66ef498f]{animation:table-toolbar-rotating-66ef498f 1s linear infinite}@keyframes table-toolbar-rotating-66ef498f{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/es/utils/export.mjs
CHANGED
|
@@ -4,16 +4,16 @@ const f = "OPERATE", E = 1e4, O = (t) => t.filter((e) => !(!e.prop || e.prop ===
|
|
|
4
4
|
})), b = "\uFEFF", R = ({
|
|
5
5
|
columns: t,
|
|
6
6
|
list: e,
|
|
7
|
-
filename:
|
|
7
|
+
filename: a = "导出数据"
|
|
8
8
|
}) => {
|
|
9
|
-
const
|
|
10
|
-
(
|
|
11
|
-
const i =
|
|
9
|
+
const s = t.map((r) => r.label).join(","), c = e.map(
|
|
10
|
+
(r) => t.map((o) => {
|
|
11
|
+
const i = o.valueMap ? o.valueMap(r) : r[o.prop] ?? "";
|
|
12
12
|
return `"${String(i).replace(/"/g, '""')}"`;
|
|
13
13
|
}).join(",")
|
|
14
|
-
),
|
|
15
|
-
`),
|
|
16
|
-
|
|
14
|
+
), l = b + [s, ...c].join(`
|
|
15
|
+
`), u = new Blob([l], { type: "text/csv;charset=utf-8;" }), p = URL.createObjectURL(u), n = document.createElement("a");
|
|
16
|
+
n.href = p, n.download = `${a}.csv`, n.click(), URL.revokeObjectURL(p);
|
|
17
17
|
};
|
|
18
18
|
export {
|
|
19
19
|
E as EXPORT_MAX_LIMIT,
|
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.4",
|
|
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": "794ee8e01014a83fba07f0dc7a6b53258420dd64"
|
|
81
81
|
}
|