Former-commit-id: d009fa0f663f2b7664af06e4145eb4f5378d6a73 [formerly 8f9c01536ef4a3ca08bb3748701386110c2d8ea2] [formerly d009fa0f663f2b7664af06e4145eb4f5378d6a73 [formerly 8f9c01536ef4a3ca08bb3748701386110c2d8ea2] [formerly d009fa0f663f2b7664af06e4145eb4f5378d6a73 [formerly 8f9c01536ef4a3ca08bb3748701386110c2d8ea2] [formerly 8f9c01536ef4a3ca08bb3748701386110c2d8ea2 [formerly 40082eb66b073a0210c319efb825d8e2ae5d9395 [formerly 163984d5d800002566d5786c1a9208bc7510ddee]]]]] Former-commit-id: 5648ca2139a3afb28c175f8f27f2c8d9795a6477 Former-commit-id: cb08d3616c4256748cc7f8a7aeaa890827abf352 Former-commit-id: 2b76bf9ddd8166b47f9dec5275baf2fa09f5b82f [formerly e0ec8a7e3d8189c6067842d1ad61e943eefbc2ec] Former-commit-id: f8b49ece9798cc72c3757c6e0527a7af234ae86e Former-commit-id: f6d5e4de14a194e3bf23eb29c5eb27be99049728 Former-commit-id: e3bfd6aad4ed5d573b6a8a94c21bbab34df4bc7d Former-commit-id: 4f54ba5c2ee7c8a71ede1ca8cc835782c25337de Former-commit-id: b982ab172bcf73fa784067855b4c20f6a2756b03
99 lines
1.9 KiB
JavaScript
99 lines
1.9 KiB
JavaScript
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 = { auth: true }
|
|
|
|
/**
|
|
* 在主框架内显示
|
|
*/
|
|
const frameIn = [
|
|
{
|
|
path: '/',
|
|
redirect: { name: 'index' },
|
|
component: layoutHeaderAside,
|
|
children: [
|
|
// 首页 必须 name:index
|
|
{
|
|
path: 'index',
|
|
name: 'index',
|
|
meta,
|
|
component: () => import('@/pages/index')
|
|
},
|
|
// 刷新页面 必须保留
|
|
{
|
|
path: 'refresh',
|
|
name: 'refresh',
|
|
hidden: true,
|
|
component: {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => vm.$router.replace(from.fullPath))
|
|
},
|
|
render: h => h()
|
|
}
|
|
},
|
|
// 页面重定向 必须保留
|
|
{
|
|
path: 'redirect/:route*',
|
|
name: 'redirect',
|
|
hidden: true,
|
|
component: {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => vm.$router.replace(JSON.parse(from.params.route)))
|
|
},
|
|
render: h => h()
|
|
}
|
|
}
|
|
]
|
|
},
|
|
playground,
|
|
frame,
|
|
d2Crud,
|
|
plugins,
|
|
charts,
|
|
components,
|
|
element,
|
|
business
|
|
]
|
|
|
|
/**
|
|
* 在主框架之外显示
|
|
*/
|
|
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
|
|
]
|