68 lines
1.8 KiB
TypeScript
68 lines
1.8 KiB
TypeScript
|
|
import { type RouteRecordRaw } from 'vue-router'
|
||
|
|
import { HOME_URL, LOGIN_URL } from '@/config'
|
||
|
|
|
||
|
|
export const Layout = () => import('@/layouts/index.vue')
|
||
|
|
|
||
|
|
export const staticRouter: RouteRecordRaw[] = [
|
||
|
|
{
|
||
|
|
path: '/',
|
||
|
|
redirect: HOME_URL
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: LOGIN_URL,
|
||
|
|
name: 'login',
|
||
|
|
component: () => import('@/views/login/index.vue'),
|
||
|
|
meta: {
|
||
|
|
title: 'Login'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/layout',
|
||
|
|
name: 'layout',
|
||
|
|
component: Layout,
|
||
|
|
children: [
|
||
|
|
{
|
||
|
|
path: HOME_URL,
|
||
|
|
name: 'home',
|
||
|
|
component: () => import('@/views/home/index.vue'),
|
||
|
|
meta: {
|
||
|
|
title: '首页',
|
||
|
|
icon: 'HomeFilled',
|
||
|
|
isHide: false,
|
||
|
|
isFull: false,
|
||
|
|
isAffix: true,
|
||
|
|
isKeepAlive: false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/403',
|
||
|
|
name: '403',
|
||
|
|
component: () => import('@/components/ErrorMessage/403.vue'),
|
||
|
|
meta: {
|
||
|
|
title: '403'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/404',
|
||
|
|
name: '404',
|
||
|
|
component: () => import('@/components/ErrorMessage/404.vue'),
|
||
|
|
meta: {
|
||
|
|
title: '404'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/500',
|
||
|
|
name: '500',
|
||
|
|
component: () => import('@/components/ErrorMessage/500.vue'),
|
||
|
|
meta: {
|
||
|
|
title: '500'
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{
|
||
|
|
path: '/:pathMatch(.*)*',
|
||
|
|
component: () => import('@/components/ErrorMessage/404.vue')
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
]
|