xto-fronted 0.4.7 → 0.4.8
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/.env.development +7 -7
- package/.env.production +7 -7
- package/dist/assets/403-AFBQifUI.js +1 -0
- package/dist/assets/403-BHEXXbt2.css +1 -0
- package/dist/assets/404-Ct_A1n7S.css +1 -0
- package/dist/assets/404-WFvpcD2_.js +1 -0
- package/dist/assets/_plugin-vue_export-helper-DlAUqK2U.js +1 -0
- package/dist/assets/index-1juADvYN.js +2 -0
- package/dist/assets/index-B-sX4Ru0.js +1 -0
- package/dist/assets/index-BMcziU5a.css +1 -0
- package/dist/assets/index-BRR97dc6.js +1 -0
- package/dist/assets/index-BZA0ksjx.css +1 -0
- package/dist/assets/index-BpV_8nl0.js +1 -0
- package/dist/assets/index-BvzhR4zp.js +1 -0
- package/dist/assets/index-CUh_s55Z.css +1 -0
- package/dist/assets/index-CVjdnIgR.css +1 -0
- package/dist/assets/index-CYq57-zj.js +1 -0
- package/dist/assets/index-CkL3sVAQ.js +2 -0
- package/dist/assets/index-CtrKVYJb.css +1 -0
- package/dist/assets/index-Cz2P_bsS.js +1 -0
- package/dist/assets/index-D9wlAuR_.js +1 -0
- package/dist/assets/index-DawJb02s.css +1 -0
- package/dist/assets/index-DfFR6NLf.js +1 -0
- package/dist/assets/index-DwVgMO8e.js +1 -0
- package/dist/assets/index-GDP-IkXE.css +1 -0
- package/dist/assets/index-Iaz1ZzPC.js +2 -0
- package/dist/assets/index-PfV8pzQz.css +1 -0
- package/dist/assets/index-Swfu6yvD.css +1 -0
- package/dist/assets/index-Te8_PRgJ.js +1 -0
- package/dist/assets/index-WyZ91RLx.css +1 -0
- package/dist/assets/index-tFYRoFdE.js +1 -0
- package/dist/assets/vendor-42ANG6Sg.js +6 -0
- package/dist/assets/vite-Dw-pgLOX.js +1 -0
- package/dist/assets/vue-vendor-Br-l7wbK.js +29 -0
- package/dist/assets/xto-base-C-IBqjVs.js +1 -0
- package/dist/assets/xto-base-C6eqMPdO.css +1 -0
- package/dist/assets/xto-business--V1F5Gwb.css +1 -0
- package/dist/assets/xto-core-DZK7Cyg0.js +1 -0
- package/dist/assets/xto-data-BFpiDgJi.js +1 -0
- package/dist/assets/xto-data-CnAQAQH2.css +1 -0
- package/dist/assets/xto-feedback-B7ipsTfz.js +1 -0
- package/dist/assets/xto-feedback-DBwJzoTj.css +1 -0
- package/dist/assets/xto-form-CrsyAjyr.css +1 -0
- package/dist/assets/xto-form-NRjKKNcY.js +1 -0
- package/dist/assets/xto-layout-BqU8RuWL.css +1 -0
- package/dist/assets/xto-navigation-BiSaXPfr.js +1 -0
- package/dist/assets/xto-navigation-C1cnSL2E.css +1 -0
- package/dist/assets/xto-navigation-CBPg4dCc.css +1 -0
- package/dist/assets/xto-navigation-CKabFu9d.js +1 -0
- package/dist/index.html +28 -0
- package/package.json +85 -85
- package/src/api/auth.ts +25 -25
- package/src/api/system.ts +66 -66
- package/src/assets/styles/_dark.scss +406 -406
- package/src/components/Layout/Header.vue +973 -973
- package/src/components/Layout/Sidebar.vue +273 -273
- package/src/components/Layout/index.vue +443 -63
- package/src/composables/useApp.ts +61 -61
- package/src/composables/useAuth.ts +16 -16
- package/src/directives/permission.ts +27 -27
- package/src/env.d.ts +18 -18
- package/src/index.ts +47 -47
- package/src/router/dynamicRoutes.ts +162 -162
- package/src/router/guards.ts +128 -128
- package/src/router/index.ts +79 -79
- package/src/stores/auth.ts +65 -65
- package/src/stores/menu.ts +48 -48
- package/src/stores/user.ts +50 -50
- package/src/types/api.d.ts +80 -80
- package/src/utils/auth.ts +99 -99
- package/src/utils/config.ts +80 -80
- package/src/utils/permission.ts +32 -32
- package/src/utils/request.ts +124 -124
- package/src/views/login/index.vue +194 -194
- package/vite.config.ts +135 -135
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 权限指令
|
|
3
|
-
* v-permission="['user:edit']" 或 v-permission="'user:edit'"
|
|
4
|
-
* 注意:tineco-ui 不支持 permissions 字段,此指令暂时只检查登录状态
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { Directive, DirectiveBinding } from 'vue'
|
|
8
|
-
import { useUserStore } from '@/stores/user'
|
|
9
|
-
|
|
10
|
-
const permission: Directive = {
|
|
11
|
-
mounted(el: HTMLElement, _binding: DirectiveBinding<string | string[]>) {
|
|
12
|
-
const userStore = useUserStore()
|
|
13
|
-
|
|
14
|
-
// 如果没有登录,移除元素
|
|
15
|
-
if (!userStore.isLoggedIn) {
|
|
16
|
-
el.parentNode?.removeChild(el)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 注意:tineco-ui 不支持 permissions 字段,此指令暂时不做权限判断
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default permission
|
|
24
|
-
|
|
25
|
-
// 注册指令
|
|
26
|
-
export function setupPermissionDirective(app: any) {
|
|
27
|
-
app.directive('permission', permission)
|
|
1
|
+
/**
|
|
2
|
+
* 权限指令
|
|
3
|
+
* v-permission="['user:edit']" 或 v-permission="'user:edit'"
|
|
4
|
+
* 注意:tineco-ui 不支持 permissions 字段,此指令暂时只检查登录状态
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Directive, DirectiveBinding } from 'vue'
|
|
8
|
+
import { useUserStore } from '@/stores/user'
|
|
9
|
+
|
|
10
|
+
const permission: Directive = {
|
|
11
|
+
mounted(el: HTMLElement, _binding: DirectiveBinding<string | string[]>) {
|
|
12
|
+
const userStore = useUserStore()
|
|
13
|
+
|
|
14
|
+
// 如果没有登录,移除元素
|
|
15
|
+
if (!userStore.isLoggedIn) {
|
|
16
|
+
el.parentNode?.removeChild(el)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 注意:tineco-ui 不支持 permissions 字段,此指令暂时不做权限判断
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default permission
|
|
24
|
+
|
|
25
|
+
// 注册指令
|
|
26
|
+
export function setupPermissionDirective(app: any) {
|
|
27
|
+
app.directive('permission', permission)
|
|
28
28
|
}
|
package/src/env.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
declare module '*.vue' {
|
|
4
|
-
import type { DefineComponent } from 'vue'
|
|
5
|
-
const component: DefineComponent<{}, {}, any>
|
|
6
|
-
export default component
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ImportMetaEnv {
|
|
10
|
-
readonly VITE_APP_TITLE: string
|
|
11
|
-
readonly VITE_API_BASE_URL: string
|
|
12
|
-
readonly VITE_USE_MOCK: string
|
|
13
|
-
readonly VITE_APP_ID: string
|
|
14
|
-
readonly VITE_APP_CLIENT_ID: string
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface ImportMeta {
|
|
18
|
-
readonly env: ImportMetaEnv
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module '*.vue' {
|
|
4
|
+
import type { DefineComponent } from 'vue'
|
|
5
|
+
const component: DefineComponent<{}, {}, any>
|
|
6
|
+
export default component
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface ImportMetaEnv {
|
|
10
|
+
readonly VITE_APP_TITLE: string
|
|
11
|
+
readonly VITE_API_BASE_URL: string
|
|
12
|
+
readonly VITE_USE_MOCK: string
|
|
13
|
+
readonly VITE_APP_ID: string
|
|
14
|
+
readonly VITE_APP_CLIENT_ID: string
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ImportMeta {
|
|
18
|
+
readonly env: ImportMetaEnv
|
|
19
19
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
// 组件
|
|
2
|
-
export { default as Layout } from './components/Layout/index.vue'
|
|
3
|
-
export { default as Header } from './components/Layout/Header.vue'
|
|
4
|
-
export { default as Sidebar } from './components/Layout/Sidebar.vue'
|
|
5
|
-
export { default as Tabs } from './components/Layout/Tabs.vue'
|
|
6
|
-
export { default as Footer } from './components/Layout/Footer.vue'
|
|
7
|
-
|
|
8
|
-
// 错误页面组件
|
|
9
|
-
export { default as Login } from './views/login/index.vue'
|
|
10
|
-
export { default as NotFound } from './views/error/404.vue'
|
|
11
|
-
export { default as Forbidden } from './views/error/403.vue'
|
|
12
|
-
|
|
13
|
-
// 组合式函数
|
|
14
|
-
export * from './composables/useApp'
|
|
15
|
-
export * from './composables/useAuth'
|
|
16
|
-
export * from './composables/useForm'
|
|
17
|
-
export * from './composables/useTable'
|
|
18
|
-
|
|
19
|
-
// 工具函数
|
|
20
|
-
export * from './utils/auth'
|
|
21
|
-
export * from './utils/permission'
|
|
22
|
-
export * from './utils/request'
|
|
23
|
-
export * from './utils/storage'
|
|
24
|
-
export * from './utils/config'
|
|
25
|
-
|
|
26
|
-
// Store
|
|
27
|
-
export * from './stores/app'
|
|
28
|
-
export * from './stores/auth'
|
|
29
|
-
export * from './stores/menu'
|
|
30
|
-
export * from './stores/user'
|
|
31
|
-
|
|
32
|
-
// 路由
|
|
33
|
-
export { default as router, resetRouter } from './router'
|
|
34
|
-
export * from './router/staticRoutes'
|
|
35
|
-
export * from './router/dynamicRoutes'
|
|
36
|
-
export { createLayoutRoute, createRouter } from './router/layoutRoute'
|
|
37
|
-
export { setupRouterGuards } from './router/guards'
|
|
38
|
-
|
|
39
|
-
// API
|
|
40
|
-
export * from './api/auth'
|
|
41
|
-
export * from './api/system'
|
|
42
|
-
export * from './api/user'
|
|
43
|
-
|
|
44
|
-
// 枚举
|
|
45
|
-
export * from './enums'
|
|
46
|
-
|
|
47
|
-
// 指令
|
|
1
|
+
// 组件
|
|
2
|
+
export { default as Layout } from './components/Layout/index.vue'
|
|
3
|
+
export { default as Header } from './components/Layout/Header.vue'
|
|
4
|
+
export { default as Sidebar } from './components/Layout/Sidebar.vue'
|
|
5
|
+
export { default as Tabs } from './components/Layout/Tabs.vue'
|
|
6
|
+
export { default as Footer } from './components/Layout/Footer.vue'
|
|
7
|
+
|
|
8
|
+
// 错误页面组件
|
|
9
|
+
export { default as Login } from './views/login/index.vue'
|
|
10
|
+
export { default as NotFound } from './views/error/404.vue'
|
|
11
|
+
export { default as Forbidden } from './views/error/403.vue'
|
|
12
|
+
|
|
13
|
+
// 组合式函数
|
|
14
|
+
export * from './composables/useApp'
|
|
15
|
+
export * from './composables/useAuth'
|
|
16
|
+
export * from './composables/useForm'
|
|
17
|
+
export * from './composables/useTable'
|
|
18
|
+
|
|
19
|
+
// 工具函数
|
|
20
|
+
export * from './utils/auth'
|
|
21
|
+
export * from './utils/permission'
|
|
22
|
+
export * from './utils/request'
|
|
23
|
+
export * from './utils/storage'
|
|
24
|
+
export * from './utils/config'
|
|
25
|
+
|
|
26
|
+
// Store
|
|
27
|
+
export * from './stores/app'
|
|
28
|
+
export * from './stores/auth'
|
|
29
|
+
export * from './stores/menu'
|
|
30
|
+
export * from './stores/user'
|
|
31
|
+
|
|
32
|
+
// 路由
|
|
33
|
+
export { default as router, resetRouter } from './router'
|
|
34
|
+
export * from './router/staticRoutes'
|
|
35
|
+
export * from './router/dynamicRoutes'
|
|
36
|
+
export { createLayoutRoute, createRouter } from './router/layoutRoute'
|
|
37
|
+
export { setupRouterGuards } from './router/guards'
|
|
38
|
+
|
|
39
|
+
// API
|
|
40
|
+
export * from './api/auth'
|
|
41
|
+
export * from './api/system'
|
|
42
|
+
export * from './api/user'
|
|
43
|
+
|
|
44
|
+
// 枚举
|
|
45
|
+
export * from './enums'
|
|
46
|
+
|
|
47
|
+
// 指令
|
|
48
48
|
export { default as permissionDirective } from './directives/permission'
|
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 动态路由模板
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import type { RouteRecordRaw } from 'vue-router'
|
|
6
|
-
|
|
7
|
-
// 布局路由(包含默认子路由)
|
|
8
|
-
export const layoutRoute: RouteRecordRaw = {
|
|
9
|
-
path: '/',
|
|
10
|
-
name: 'Layout',
|
|
11
|
-
component: () => import('@/components/Layout/index.vue'),
|
|
12
|
-
redirect: '/dashboard',
|
|
13
|
-
children: [
|
|
14
|
-
{
|
|
15
|
-
path: '/dashboard',
|
|
16
|
-
name: 'Dashboard',
|
|
17
|
-
component: () => import('@/views/dashboard/index.vue'),
|
|
18
|
-
meta: {
|
|
19
|
-
title: '仪表盘',
|
|
20
|
-
icon: 'dashboard',
|
|
21
|
-
keepAlive: true,
|
|
22
|
-
affix: true
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
path: '/system/user',
|
|
27
|
-
name: 'SystemUser',
|
|
28
|
-
component: () => import('@/views/system/user/index.vue'),
|
|
29
|
-
meta: {
|
|
30
|
-
title: '用户管理',
|
|
31
|
-
icon: 'user',
|
|
32
|
-
keepAlive: true
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
path: '/system/role',
|
|
37
|
-
name: 'SystemRole',
|
|
38
|
-
component: () => import('@/views/system/role/index.vue'),
|
|
39
|
-
meta: {
|
|
40
|
-
title: '角色管理',
|
|
41
|
-
icon: 'role',
|
|
42
|
-
keepAlive: true
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
path: '/system/menu',
|
|
47
|
-
name: 'SystemMenu',
|
|
48
|
-
component: () => import('@/views/system/menu/index.vue'),
|
|
49
|
-
meta: {
|
|
50
|
-
title: '菜单管理',
|
|
51
|
-
icon: 'menu',
|
|
52
|
-
keepAlive: true
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// 默认路由(用于开发,后续由后端返回)
|
|
59
|
-
export const defaultDynamicRoutes: RouteRecordRaw[] = [
|
|
60
|
-
{
|
|
61
|
-
path: '/dashboard',
|
|
62
|
-
name: 'Dashboard',
|
|
63
|
-
component: () => import('@/views/dashboard/index.vue'),
|
|
64
|
-
meta: {
|
|
65
|
-
title: '仪表盘',
|
|
66
|
-
icon: 'dashboard',
|
|
67
|
-
keepAlive: true,
|
|
68
|
-
affix: true
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
path: '/system',
|
|
73
|
-
name: 'System',
|
|
74
|
-
redirect: '/system/user',
|
|
75
|
-
meta: {
|
|
76
|
-
title: '系统管理',
|
|
77
|
-
icon: 'setting'
|
|
78
|
-
},
|
|
79
|
-
children: [
|
|
80
|
-
{
|
|
81
|
-
path: 'user',
|
|
82
|
-
name: 'SystemUser',
|
|
83
|
-
component: () => import('@/views/system/user/index.vue'),
|
|
84
|
-
meta: {
|
|
85
|
-
title: '用户管理',
|
|
86
|
-
icon: 'user',
|
|
87
|
-
keepAlive: true
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
path: 'role',
|
|
92
|
-
name: 'SystemRole',
|
|
93
|
-
component: () => import('@/views/system/role/index.vue'),
|
|
94
|
-
meta: {
|
|
95
|
-
title: '角色管理',
|
|
96
|
-
icon: 'role',
|
|
97
|
-
keepAlive: true
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
path: 'menu',
|
|
102
|
-
name: 'SystemMenu',
|
|
103
|
-
component: () => import('@/views/system/menu/index.vue'),
|
|
104
|
-
meta: {
|
|
105
|
-
title: '菜单管理',
|
|
106
|
-
icon: 'menu',
|
|
107
|
-
keepAlive: true
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
}
|
|
112
|
-
]
|
|
113
|
-
|
|
114
|
-
// Mock 菜单数据(参考 tineco-ui 格式)
|
|
115
|
-
export const mockMenuData = [
|
|
116
|
-
{
|
|
117
|
-
menuCode: 'dashboard',
|
|
118
|
-
menuName: '仪表盘',
|
|
119
|
-
menuUrl: '/dashboard',
|
|
120
|
-
icon: 'dashboard',
|
|
121
|
-
closable: true,
|
|
122
|
-
isDefault: true,
|
|
123
|
-
isOut: false
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
menuCode: 'system',
|
|
127
|
-
menuName: '系统管理',
|
|
128
|
-
menuUrl: '/system',
|
|
129
|
-
icon: 'setting',
|
|
130
|
-
closable: false,
|
|
131
|
-
isDefault: false,
|
|
132
|
-
isOut: false,
|
|
133
|
-
children: [
|
|
134
|
-
{
|
|
135
|
-
menuCode: 'system_user',
|
|
136
|
-
menuName: '用户管理',
|
|
137
|
-
menuUrl: '/system/user',
|
|
138
|
-
icon: 'user',
|
|
139
|
-
closable: true,
|
|
140
|
-
isDefault: false,
|
|
141
|
-
isOut: false
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
menuCode: 'system_role',
|
|
145
|
-
menuName: '角色管理',
|
|
146
|
-
menuUrl: '/system/role',
|
|
147
|
-
icon: 'role',
|
|
148
|
-
closable: true,
|
|
149
|
-
isDefault: false,
|
|
150
|
-
isOut: false
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
menuCode: 'system_menu',
|
|
154
|
-
menuName: '菜单管理',
|
|
155
|
-
menuUrl: '/system/menu',
|
|
156
|
-
icon: 'menu',
|
|
157
|
-
closable: true,
|
|
158
|
-
isDefault: false,
|
|
159
|
-
isOut: false
|
|
160
|
-
}
|
|
161
|
-
]
|
|
162
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 动态路由模板
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
6
|
+
|
|
7
|
+
// 布局路由(包含默认子路由)
|
|
8
|
+
export const layoutRoute: RouteRecordRaw = {
|
|
9
|
+
path: '/',
|
|
10
|
+
name: 'Layout',
|
|
11
|
+
component: () => import('@/components/Layout/index.vue'),
|
|
12
|
+
redirect: '/dashboard',
|
|
13
|
+
children: [
|
|
14
|
+
{
|
|
15
|
+
path: '/dashboard',
|
|
16
|
+
name: 'Dashboard',
|
|
17
|
+
component: () => import('@/views/dashboard/index.vue'),
|
|
18
|
+
meta: {
|
|
19
|
+
title: '仪表盘',
|
|
20
|
+
icon: 'dashboard',
|
|
21
|
+
keepAlive: true,
|
|
22
|
+
affix: true
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
path: '/system/user',
|
|
27
|
+
name: 'SystemUser',
|
|
28
|
+
component: () => import('@/views/system/user/index.vue'),
|
|
29
|
+
meta: {
|
|
30
|
+
title: '用户管理',
|
|
31
|
+
icon: 'user',
|
|
32
|
+
keepAlive: true
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
path: '/system/role',
|
|
37
|
+
name: 'SystemRole',
|
|
38
|
+
component: () => import('@/views/system/role/index.vue'),
|
|
39
|
+
meta: {
|
|
40
|
+
title: '角色管理',
|
|
41
|
+
icon: 'role',
|
|
42
|
+
keepAlive: true
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: '/system/menu',
|
|
47
|
+
name: 'SystemMenu',
|
|
48
|
+
component: () => import('@/views/system/menu/index.vue'),
|
|
49
|
+
meta: {
|
|
50
|
+
title: '菜单管理',
|
|
51
|
+
icon: 'menu',
|
|
52
|
+
keepAlive: true
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// 默认路由(用于开发,后续由后端返回)
|
|
59
|
+
export const defaultDynamicRoutes: RouteRecordRaw[] = [
|
|
60
|
+
{
|
|
61
|
+
path: '/dashboard',
|
|
62
|
+
name: 'Dashboard',
|
|
63
|
+
component: () => import('@/views/dashboard/index.vue'),
|
|
64
|
+
meta: {
|
|
65
|
+
title: '仪表盘',
|
|
66
|
+
icon: 'dashboard',
|
|
67
|
+
keepAlive: true,
|
|
68
|
+
affix: true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
path: '/system',
|
|
73
|
+
name: 'System',
|
|
74
|
+
redirect: '/system/user',
|
|
75
|
+
meta: {
|
|
76
|
+
title: '系统管理',
|
|
77
|
+
icon: 'setting'
|
|
78
|
+
},
|
|
79
|
+
children: [
|
|
80
|
+
{
|
|
81
|
+
path: 'user',
|
|
82
|
+
name: 'SystemUser',
|
|
83
|
+
component: () => import('@/views/system/user/index.vue'),
|
|
84
|
+
meta: {
|
|
85
|
+
title: '用户管理',
|
|
86
|
+
icon: 'user',
|
|
87
|
+
keepAlive: true
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
path: 'role',
|
|
92
|
+
name: 'SystemRole',
|
|
93
|
+
component: () => import('@/views/system/role/index.vue'),
|
|
94
|
+
meta: {
|
|
95
|
+
title: '角色管理',
|
|
96
|
+
icon: 'role',
|
|
97
|
+
keepAlive: true
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
path: 'menu',
|
|
102
|
+
name: 'SystemMenu',
|
|
103
|
+
component: () => import('@/views/system/menu/index.vue'),
|
|
104
|
+
meta: {
|
|
105
|
+
title: '菜单管理',
|
|
106
|
+
icon: 'menu',
|
|
107
|
+
keepAlive: true
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
// Mock 菜单数据(参考 tineco-ui 格式)
|
|
115
|
+
export const mockMenuData = [
|
|
116
|
+
{
|
|
117
|
+
menuCode: 'dashboard',
|
|
118
|
+
menuName: '仪表盘',
|
|
119
|
+
menuUrl: '/dashboard',
|
|
120
|
+
icon: 'dashboard',
|
|
121
|
+
closable: true,
|
|
122
|
+
isDefault: true,
|
|
123
|
+
isOut: false
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
menuCode: 'system',
|
|
127
|
+
menuName: '系统管理',
|
|
128
|
+
menuUrl: '/system',
|
|
129
|
+
icon: 'setting',
|
|
130
|
+
closable: false,
|
|
131
|
+
isDefault: false,
|
|
132
|
+
isOut: false,
|
|
133
|
+
children: [
|
|
134
|
+
{
|
|
135
|
+
menuCode: 'system_user',
|
|
136
|
+
menuName: '用户管理',
|
|
137
|
+
menuUrl: '/system/user',
|
|
138
|
+
icon: 'user',
|
|
139
|
+
closable: true,
|
|
140
|
+
isDefault: false,
|
|
141
|
+
isOut: false
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
menuCode: 'system_role',
|
|
145
|
+
menuName: '角色管理',
|
|
146
|
+
menuUrl: '/system/role',
|
|
147
|
+
icon: 'role',
|
|
148
|
+
closable: true,
|
|
149
|
+
isDefault: false,
|
|
150
|
+
isOut: false
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
menuCode: 'system_menu',
|
|
154
|
+
menuName: '菜单管理',
|
|
155
|
+
menuUrl: '/system/menu',
|
|
156
|
+
icon: 'menu',
|
|
157
|
+
closable: true,
|
|
158
|
+
isDefault: false,
|
|
159
|
+
isOut: false
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
163
|
]
|