Former-commit-id: f423b58687a0d65ce70a95ce1593b429704775f5 [formerly 664e42ad888903b010ec1a8e7cbda762b17cdc4a] [formerly f423b58687a0d65ce70a95ce1593b429704775f5 [formerly 664e42ad888903b010ec1a8e7cbda762b17cdc4a] [formerly f423b58687a0d65ce70a95ce1593b429704775f5 [formerly 664e42ad888903b010ec1a8e7cbda762b17cdc4a] [formerly 664e42ad888903b010ec1a8e7cbda762b17cdc4a [formerly a3bbfc1f94606188ed35a2457ad9c151f2a4cedd [formerly ed00257f4f4147114d7aeea450a2d6945b4e7545]]]]] Former-commit-id: 3c329a9dabe00f428051d837e130c1ce71b26036 Former-commit-id: e04dd339ec94fde93518c07ba78374faad70efba Former-commit-id: 4a4af4b9bf562edd65993d9d0eff80116da621fc [formerly 4b8c811d1b2ab5e5bedf583eb374c0819d918d48] Former-commit-id: 67b88726e79a45834e33b9c92a68685da3e6127d Former-commit-id: f6b13db93efe29cea7ad6870f8f8db323ad9898a Former-commit-id: 440e1db752d5dbe6d1a069a7b2a7711d82f640cf Former-commit-id: 19dbd962aa57656bcf29310761b4505ce8df7031 Former-commit-id: 053b5d58aaa43c007bad159603ec7966e99c53cf
101 lines
1.9 KiB
JavaScript
101 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 filters from './modules/filters'
|
|
import business from './modules/business'
|
|
|
|
import layoutHeaderAside from '@/layout/header-aside'
|
|
|
|
/**
|
|
* 在主框架内显示
|
|
*/
|
|
const frameIn = [
|
|
{
|
|
path: '/',
|
|
redirect: { name: 'index' },
|
|
component: layoutHeaderAside,
|
|
children: [
|
|
// 首页 必须 name:index
|
|
{
|
|
path: 'index',
|
|
name: 'index',
|
|
meta: {
|
|
auth: true
|
|
},
|
|
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,
|
|
filters,
|
|
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
|
|
]
|