feat:添加组件实例

This commit is contained in:
zhangchuanlong
2022-03-07 12:18:42 +08:00
parent 8bcbcac531
commit 5fcc47816c
10 changed files with 1251 additions and 839 deletions

View 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'],
},
},
],
},
],
},
]

View File

@@ -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'],
},
},
],
},
]