xto-fronted 0.4.60 → 0.4.62
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/dist/index-B3_VQZ-d.js +372 -0
- package/dist/index-BHQIqN1E.js +372 -0
- package/dist/index-BHvnTk5Z.js +475 -0
- package/dist/index-BZKw7U60.js +475 -0
- package/dist/index-Cn_4o3fi.js +345 -0
- package/dist/index-D7i5bck2.js +3132 -0
- package/dist/index-DdkVT39s.js +345 -0
- package/dist/index-Djdb936p.js +142 -0
- package/dist/index-DwJILh-Q.js +3149 -0
- package/dist/index-dz6CwD6A.js +142 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.es.js +61 -60
- package/dist/index.umd.js +1 -1
- package/package.json +86 -86
- package/src/index.ts +36 -0
- package/src/router/dynamicRoutes.ts +172 -172
- package/src/router/guards.ts +4 -6
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent as g, ref as r, resolveComponent as x, openBlock as o, createElementBlock as c, createElementVNode as s, Fragment as d, renderList as m, createBlock as u, unref as l, withCtx as i, normalizeStyle as p, toDisplayString as a, createVNode as n, createTextVNode as q } from "vue";
|
|
2
|
+
import { Card as _, Tag as C, Progress as y } from "@xto/data";
|
|
3
|
+
import { _ as V } from "./index-D7i5bck2.js";
|
|
4
|
+
const B = { class: "dashboard" }, L = { class: "dashboard__stats" }, N = { class: "stat-card__content" }, S = { class: "stat-card__info" }, w = { class: "stat-card__title" }, z = { class: "dashboard__main" }, E = { class: "quick-links" }, I = { class: "quick-link__icon" }, T = { class: "quick-link__title" }, D = { class: "activity-list" }, F = { class: "activity-item__action" }, P = { class: "activity-item__time" }, U = { class: "system-info" }, j = { class: "system-info__item" }, A = { class: "system-info__item" }, G = /* @__PURE__ */ g({
|
|
5
|
+
__name: "index",
|
|
6
|
+
setup(H) {
|
|
7
|
+
const f = r([
|
|
8
|
+
{ title: "用户总数", value: 1234, icon: "👥", color: "#409eff" },
|
|
9
|
+
{ title: "今日访问", value: 567, icon: "👀", color: "#67c23a" },
|
|
10
|
+
{ title: "订单数量", value: 890, icon: "📦", color: "#e6a23c" },
|
|
11
|
+
{ title: "销售金额", value: 123456, icon: "💰", color: "#f56c6c" }
|
|
12
|
+
]), v = r([
|
|
13
|
+
{ user: "张三", action: "登录系统", time: "2分钟前", type: "success" },
|
|
14
|
+
{ user: "李四", action: "修改了用户信息", time: "5分钟前", type: "warning" },
|
|
15
|
+
{ user: "王五", action: "创建了新订单", time: "10分钟前", type: "info" },
|
|
16
|
+
{ user: "赵六", action: "删除了测试数据", time: "30分钟前", type: "danger" },
|
|
17
|
+
{ user: "钱七", action: "更新了系统配置", time: "1小时前", type: "primary" }
|
|
18
|
+
]), k = r([
|
|
19
|
+
{ title: "用户管理", path: "/system/user", icon: "👤" },
|
|
20
|
+
{ title: "角色管理", path: "/system/role", icon: "👥" },
|
|
21
|
+
{ title: "菜单管理", path: "/system/menu", icon: "📋" },
|
|
22
|
+
{ title: "系统设置", path: "/system", icon: "⚙️" }
|
|
23
|
+
]);
|
|
24
|
+
return (J, t) => {
|
|
25
|
+
const b = x("router-link");
|
|
26
|
+
return o(), c("div", B, [
|
|
27
|
+
s("div", L, [
|
|
28
|
+
(o(!0), c(d, null, m(f.value, (e) => (o(), u(l(_), {
|
|
29
|
+
key: e.title,
|
|
30
|
+
class: "stat-card"
|
|
31
|
+
}, {
|
|
32
|
+
default: i(() => [
|
|
33
|
+
s("div", N, [
|
|
34
|
+
s("div", {
|
|
35
|
+
class: "stat-card__icon",
|
|
36
|
+
style: p({ backgroundColor: e.color + "20" })
|
|
37
|
+
}, a(e.icon), 5),
|
|
38
|
+
s("div", S, [
|
|
39
|
+
s("div", w, a(e.title), 1),
|
|
40
|
+
s("div", {
|
|
41
|
+
class: "stat-card__value",
|
|
42
|
+
style: p({ color: e.color })
|
|
43
|
+
}, a(e.value.toLocaleString()), 5)
|
|
44
|
+
])
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
_: 2
|
|
48
|
+
}, 1024))), 128))
|
|
49
|
+
]),
|
|
50
|
+
s("div", z, [
|
|
51
|
+
n(l(_), { class: "dashboard__quick" }, {
|
|
52
|
+
header: i(() => [...t[0] || (t[0] = [
|
|
53
|
+
s("span", { class: "card-title" }, "快捷入口", -1)
|
|
54
|
+
])]),
|
|
55
|
+
default: i(() => [
|
|
56
|
+
s("div", E, [
|
|
57
|
+
(o(!0), c(d, null, m(k.value, (e) => (o(), u(b, {
|
|
58
|
+
key: e.path,
|
|
59
|
+
to: e.path,
|
|
60
|
+
class: "quick-link"
|
|
61
|
+
}, {
|
|
62
|
+
default: i(() => [
|
|
63
|
+
s("span", I, a(e.icon), 1),
|
|
64
|
+
s("span", T, a(e.title), 1)
|
|
65
|
+
]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1032, ["to"]))), 128))
|
|
68
|
+
])
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}),
|
|
72
|
+
n(l(_), { class: "dashboard__activity" }, {
|
|
73
|
+
header: i(() => [...t[1] || (t[1] = [
|
|
74
|
+
s("span", { class: "card-title" }, "最近活动", -1)
|
|
75
|
+
])]),
|
|
76
|
+
default: i(() => [
|
|
77
|
+
s("div", D, [
|
|
78
|
+
(o(!0), c(d, null, m(v.value, (e, h) => (o(), c("div", {
|
|
79
|
+
key: h,
|
|
80
|
+
class: "activity-item"
|
|
81
|
+
}, [
|
|
82
|
+
n(l(C), {
|
|
83
|
+
type: e.type,
|
|
84
|
+
size: "small"
|
|
85
|
+
}, {
|
|
86
|
+
default: i(() => [
|
|
87
|
+
q(a(e.user), 1)
|
|
88
|
+
]),
|
|
89
|
+
_: 2
|
|
90
|
+
}, 1032, ["type"]),
|
|
91
|
+
s("span", F, a(e.action), 1),
|
|
92
|
+
s("span", P, a(e.time), 1)
|
|
93
|
+
]))), 128))
|
|
94
|
+
])
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
})
|
|
98
|
+
]),
|
|
99
|
+
n(l(_), { class: "dashboard__system" }, {
|
|
100
|
+
header: i(() => [...t[2] || (t[2] = [
|
|
101
|
+
s("span", { class: "card-title" }, "系统信息", -1)
|
|
102
|
+
])]),
|
|
103
|
+
default: i(() => [
|
|
104
|
+
s("div", U, [
|
|
105
|
+
t[5] || (t[5] = s("div", { class: "system-info__item" }, [
|
|
106
|
+
s("span", { class: "system-info__label" }, "系统版本"),
|
|
107
|
+
s("span", { class: "system-info__value" }, "v1.0.0")
|
|
108
|
+
], -1)),
|
|
109
|
+
t[6] || (t[6] = s("div", { class: "system-info__item" }, [
|
|
110
|
+
s("span", { class: "system-info__label" }, "Vue 版本"),
|
|
111
|
+
s("span", { class: "system-info__value" }, "3.4.21")
|
|
112
|
+
], -1)),
|
|
113
|
+
t[7] || (t[7] = s("div", { class: "system-info__item" }, [
|
|
114
|
+
s("span", { class: "system-info__label" }, "构建工具"),
|
|
115
|
+
s("span", { class: "system-info__value" }, "Vite 5")
|
|
116
|
+
], -1)),
|
|
117
|
+
t[8] || (t[8] = s("div", { class: "system-info__item" }, [
|
|
118
|
+
s("span", { class: "system-info__label" }, "UI 组件库"),
|
|
119
|
+
s("span", { class: "system-info__value" }, "xto")
|
|
120
|
+
], -1)),
|
|
121
|
+
s("div", j, [
|
|
122
|
+
t[3] || (t[3] = s("span", { class: "system-info__label" }, "服务器状态", -1)),
|
|
123
|
+
n(l(y), {
|
|
124
|
+
percentage: 75,
|
|
125
|
+
status: "success"
|
|
126
|
+
})
|
|
127
|
+
]),
|
|
128
|
+
s("div", A, [
|
|
129
|
+
t[4] || (t[4] = s("span", { class: "system-info__label" }, "内存使用", -1)),
|
|
130
|
+
n(l(y), { percentage: 45 })
|
|
131
|
+
])
|
|
132
|
+
])
|
|
133
|
+
]),
|
|
134
|
+
_: 1
|
|
135
|
+
})
|
|
136
|
+
]);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}), Q = /* @__PURE__ */ V(G, [["__scopeId", "data-v-44648cb1"]]);
|
|
140
|
+
export {
|
|
141
|
+
Q as default
|
|
142
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
export interface XtoConfig {
|
|
2
|
+
appName?: string;
|
|
3
|
+
appId?: string;
|
|
4
|
+
clientId?: string;
|
|
5
|
+
apiBaseUrl?: string;
|
|
6
|
+
indexPath?: string;
|
|
7
|
+
loginPath?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 初始化 XTO 应用
|
|
11
|
+
* 在项目入口文件中调用此函数设置应用配置
|
|
12
|
+
* @param config 应用配置
|
|
13
|
+
*/
|
|
14
|
+
export declare function createXtoApp(config: Partial<XtoConfig>): {
|
|
15
|
+
config: {
|
|
16
|
+
appName: string;
|
|
17
|
+
appId: string;
|
|
18
|
+
clientId: string;
|
|
19
|
+
apiBaseUrl: string;
|
|
20
|
+
indexPath: string;
|
|
21
|
+
loginPath: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
1
24
|
export { default as Layout } from './components/Layout/index.vue';
|
|
2
25
|
export { default as Header } from './components/Layout/Header.vue';
|
|
3
26
|
export { default as Sidebar } from './components/Layout/Sidebar.vue';
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as s, c as t, G as o, d as r, e as u, H as n, L as i, i as p, M as l, b as d, f as T, g, h as R, S as
|
|
1
|
+
import { F as s, c as t, G as o, d as r, e as u, H as n, L as i, i as p, M as l, b as d, f as T, g, h as R, S as c, a as k, j as h, T as f, k as S, l as U, m, n as y, o as M, p as A, q as x, r as b, s as D, t as L, u as C, v as F, w as G, x as I, y as E, z as O, A as v, B as w, C as P, D as j, E as q, I as B, J as H, K as N, N as X, O as z, P as J, Q as K, R as Q, U as V, V as W, W as Y, X as Z, Y as $, Z as _, $ as ee, a0 as ae, a1 as se, a2 as te, a3 as oe, a4 as re, a5 as ue, a6 as ne, a7 as ie, a8 as pe, a9 as le, aa as de, ab as Te, ac as ge, ad as Re, ae as ce, af as ke, ag as he, ah as fe, ai as Se, aj as Ue, ak as me, al as ye, am as Me, an as Ae, ao as xe, ap as be, aq as De, ar as Le, as as Ce, at as Fe, au as Ge, av as Ie, aw as Ee, ax as Oe, ay as ve } from "./index-DwJILh-Q.js";
|
|
2
2
|
export {
|
|
3
3
|
s as Footer,
|
|
4
4
|
t as Forbidden,
|
|
@@ -13,78 +13,79 @@ export {
|
|
|
13
13
|
T as MenuTypeText,
|
|
14
14
|
g as NotFound,
|
|
15
15
|
R as Sidebar,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
c as Status,
|
|
17
|
+
k as StatusOptions,
|
|
18
18
|
h as StatusText,
|
|
19
19
|
f as Tabs,
|
|
20
20
|
S as appConfig,
|
|
21
21
|
U as batchDeleteUsers,
|
|
22
22
|
m as clearToken,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
y as createLayoutRoute,
|
|
24
|
+
M as createMenu,
|
|
25
|
+
A as createRole,
|
|
26
|
+
x as createRouter,
|
|
27
27
|
b as createUser,
|
|
28
|
-
D as
|
|
29
|
-
L as
|
|
30
|
-
C as
|
|
31
|
-
F as
|
|
32
|
-
G as
|
|
33
|
-
I as
|
|
34
|
-
E as
|
|
35
|
-
O as
|
|
36
|
-
v as
|
|
37
|
-
w as
|
|
38
|
-
P as
|
|
39
|
-
j as
|
|
40
|
-
q as
|
|
41
|
-
B as
|
|
42
|
-
H as
|
|
43
|
-
N as
|
|
28
|
+
D as createXtoApp,
|
|
29
|
+
L as defaultDynamicRoutes,
|
|
30
|
+
C as deleteMenu,
|
|
31
|
+
F as deleteRole,
|
|
32
|
+
G as deleteUser,
|
|
33
|
+
I as getApiBaseUrl,
|
|
34
|
+
E as getAppId,
|
|
35
|
+
O as getClientId,
|
|
36
|
+
v as getCode,
|
|
37
|
+
w as getMenuList,
|
|
38
|
+
P as getMenuTree,
|
|
39
|
+
j as getRefreshTime,
|
|
40
|
+
q as getRefreshToken,
|
|
41
|
+
B as getRoleDetail,
|
|
42
|
+
H as getRoleList,
|
|
43
|
+
N as getToken,
|
|
44
|
+
X as getTokenExpire,
|
|
44
45
|
z as getTokenType,
|
|
45
46
|
J as getUserDetail,
|
|
46
47
|
K as getUserInfo,
|
|
47
48
|
Q as getUserList,
|
|
48
49
|
V as hasPermission,
|
|
49
50
|
W as hasRole,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
51
|
+
Y as hasToken,
|
|
52
|
+
Z as http,
|
|
53
|
+
$ as initAppConfig,
|
|
54
|
+
_ as isAdmin,
|
|
55
|
+
ee as isTokenExpired,
|
|
56
|
+
ae as layoutRoute,
|
|
57
|
+
se as local,
|
|
58
|
+
te as localStorageUtil,
|
|
59
|
+
oe as login,
|
|
60
|
+
re as logout,
|
|
61
|
+
ue as mockMenuData,
|
|
62
|
+
ne as permissionDirective,
|
|
63
|
+
ie as refreshToken,
|
|
64
|
+
pe as resetPassword,
|
|
65
|
+
le as resetRouter,
|
|
66
|
+
de as router,
|
|
67
|
+
Te as session,
|
|
68
|
+
ge as sessionStorageUtil,
|
|
69
|
+
Re as setCode,
|
|
70
|
+
ce as setRefreshTime,
|
|
70
71
|
ke as setRefreshToken,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
he as setToken,
|
|
73
|
+
fe as setTokenExpire,
|
|
74
|
+
Se as setTokenInfo,
|
|
75
|
+
Ue as setTokenType,
|
|
76
|
+
me as setupRouterGuards,
|
|
77
|
+
ye as staticRoutes,
|
|
77
78
|
Me as updateMenu,
|
|
78
|
-
|
|
79
|
+
Ae as updateRole,
|
|
79
80
|
xe as updateRoleStatus,
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
81
|
+
be as updateUser,
|
|
82
|
+
De as updateUserStatus,
|
|
83
|
+
Le as useApp,
|
|
84
|
+
Ce as useAppStore,
|
|
85
|
+
Fe as useAuth,
|
|
86
|
+
Ge as useAuthStore,
|
|
87
|
+
Ie as useForm,
|
|
88
|
+
Ee as useMenuStore,
|
|
89
|
+
Oe as useTable,
|
|
90
|
+
ve as useUserStore
|
|
90
91
|
};
|