mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 新增侧边栏和首页
This commit is contained in:
@@ -40,7 +40,6 @@ export const HttpErrorPage: RouteRecordRaw[] = [
|
||||
},
|
||||
]
|
||||
|
||||
// 404 on a page
|
||||
export const ErrorPageRoute: AppRouteRecordRaw = {
|
||||
path: '/:path(.*)*',
|
||||
name: 'ErrorPage',
|
||||
|
||||
@@ -1,14 +1,50 @@
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import { PageEnum } from '@/enums/pageEnum'
|
||||
|
||||
// 引入路径
|
||||
const importPath = {
|
||||
'PageEnum.BASE_HOME_NAME': () => import('@/views/project/index.vue'),
|
||||
'PageEnum.BASE_HOME_ITEMS_NAME': () => import('@/views/project/items/index.vue'),
|
||||
'PageEnum.BASE_HOME_TEMPLATE_NAME': () => import('@/views/project/mtTemplate/index.vue'),
|
||||
'PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME': () => import('@/views/project/templateMarket/index.vue')
|
||||
}
|
||||
|
||||
const projectRoutes: RouteRecordRaw = {
|
||||
path: PageEnum.BASE_HOME,
|
||||
name: PageEnum.BASE_HOME_NAME,
|
||||
component: () => import('@/views/project/index.vue'),
|
||||
component: importPath['PageEnum.BASE_HOME_NAME'],
|
||||
redirect: PageEnum.BASE_HOME_ITEMS,
|
||||
meta: {
|
||||
title: '项目',
|
||||
isRoot: true
|
||||
}
|
||||
},
|
||||
// todo 可采用循环动态插入
|
||||
children: [
|
||||
{
|
||||
path: PageEnum.BASE_HOME_ITEMS,
|
||||
name: PageEnum.BASE_HOME_ITEMS_NAME,
|
||||
component: importPath['PageEnum.BASE_HOME_ITEMS_NAME'],
|
||||
meta: {
|
||||
title: PageEnum.BASE_HOME_ITEMS_NAME
|
||||
}
|
||||
},
|
||||
{
|
||||
path: PageEnum.BASE_HOME_TEMPLATE,
|
||||
name: PageEnum.BASE_HOME_TEMPLATE_NAME,
|
||||
component: importPath['PageEnum.BASE_HOME_TEMPLATE_NAME'],
|
||||
meta: {
|
||||
title: PageEnum.BASE_HOME_TEMPLATE_NAME
|
||||
}
|
||||
},
|
||||
{
|
||||
path: PageEnum.BASE_HOME_TEMPLATE_MARKET,
|
||||
name: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME,
|
||||
component: importPath['PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME'],
|
||||
meta: {
|
||||
title: PageEnum.BASE_HOME_TEMPLATE_MARKET_NAME
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default projectRoutes
|
||||
|
||||
Reference in New Issue
Block a user