减少不必要的代码

Former-commit-id: 8c704c1c9e29c1f8887eb3b899977b35b8a5e4bd
This commit is contained in:
liyang
2018-07-25 10:50:19 +08:00
parent e31f16dbfa
commit 0b058339ab
126 changed files with 7401 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
// layout
import layoutHeaderAside from '@/layout/header-aside'
const meta = { requiresAuth: true }
/**
* 在主框架内显示
*/
const frameIn = [
// 首页
{
path: '/',
redirect: { name: 'index' },
component: layoutHeaderAside,
children: [
{
path: 'index',
name: 'index',
meta,
component: () => import('@/pages/index')
}
]
}
]
/**
* 在主框架之外显示
*/
const frameOut = [
// 登陆
{
path: '/login',
name: 'login',
component: () => import('@/pages/login')
}
]
/**
* 错误页面
*/
const errorPage = [
// 404
{
path: '*',
name: '404',
component: () => import('@/pages/error-page-404')
}
]
// 导出需要显示菜单的
export const frameInRoutes = frameIn
// 重新组织后导出
export default [
...frameIn,
...frameOut,
...errorPage
]