no message

Former-commit-id: 33dbb5246eb1c76195908c60a4267997bf48c3ac [formerly 33dbb5246eb1c76195908c60a4267997bf48c3ac [formerly 33dbb5246eb1c76195908c60a4267997bf48c3ac [formerly 33dbb5246eb1c76195908c60a4267997bf48c3ac [formerly 7e3749104a3b9bf002ff4443731fa054bd2daa8d [formerly fb304ebf1a814d17c732be5141a9496835ad27ef]]]]]
Former-commit-id: 032ce71e0fece3eb585936d36f4261475be49237
Former-commit-id: 3d45913b8a557a16512fbcc98503ab667ac17f2c
Former-commit-id: ffdd24eb7784e1bf4f81185dfcd98b4900840cb1 [formerly 622633150ca71c03830dacd01f0e77fbfd08be5e]
Former-commit-id: e6a80912acb26ca21713516e3c6f4afdf5abf077
Former-commit-id: 12a0a80d23798a996c81a9efe138c393161ca9fc
Former-commit-id: b38753fe9ef650c203940edc162c32fff48a7676
Former-commit-id: ace21249def97c394f46b84e8704f2fabbde167e
Former-commit-id: 19c83f81a0e64499fcf7a3788cfc87304a610cef
This commit is contained in:
liyang
2018-10-12 07:10:11 +08:00
parent b1f00ed726
commit 8bdcdcf12a
11 changed files with 381 additions and 2 deletions

86
src/router/routes.js Normal file
View File

@@ -0,0 +1,86 @@
import playground from './modules/playground'
import frame from './modules/frame'
import d2Crud from './modules/d2-crud'
import plugins from './modules/plugins'
import charts from './modules/charts'
import components from './modules/components'
import element from './modules/element'
import business from './modules/business'
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')
}
]
},
playground,
frame,
d2Crud,
plugins,
charts,
components,
element,
business
]
/**
* 在主框架之外显示
*/
const frameOut = [
// 页面重定向使用 必须保留
{
path: '/redirect/:path*',
component: {
beforeCreate () {
const path = this.$route.params.path
this.$router.replace(JSON.parse(path))
},
render: function (h) {
return h()
}
}
},
// 登录
{
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
]