feat:添加组件实例
This commit is contained in:
46
src/router/routes/modules/example.js
Normal file
46
src/router/routes/modules/example.js
Normal file
@@ -0,0 +1,46 @@
|
||||
import Layout from '@/layout/index.vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
name: 'EXAMPLE',
|
||||
path: '/example',
|
||||
component: Layout,
|
||||
redirect: '/example/table',
|
||||
meta: {
|
||||
title: '组件示例',
|
||||
role: ['admin'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'EXAMPLE-TABLE',
|
||||
path: 'table',
|
||||
component: () => import('@/views/examples/table/index.vue'),
|
||||
redirect: '/example/table/post',
|
||||
meta: {
|
||||
title: '表格',
|
||||
role: ['admin'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'POST-LIST',
|
||||
path: 'post',
|
||||
component: () => import('@/views/examples/table/post/index.vue'),
|
||||
meta: {
|
||||
title: '文章列表',
|
||||
role: ['admin'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'POST-CREATE',
|
||||
path: 'post-create',
|
||||
component: () => import('@/views/examples/table/post/post-create.vue'),
|
||||
meta: {
|
||||
title: '创建文章',
|
||||
role: ['admin'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
@@ -1,34 +0,0 @@
|
||||
import Layout from '@/layout/index.vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
name: 'USER_MANAGER',
|
||||
path: '/user',
|
||||
component: Layout,
|
||||
redirect: '/user/management',
|
||||
meta: {
|
||||
title: '用户中心',
|
||||
role: ['admin'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'USER',
|
||||
path: 'management',
|
||||
component: () => import('@/views/user/index.vue'),
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
role: ['admin'],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'PERMISSION',
|
||||
path: 'permission',
|
||||
component: () => import('@/views/user/UserPermission.vue'),
|
||||
meta: {
|
||||
title: '权限管理',
|
||||
role: ['admin'],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
Reference in New Issue
Block a user