2020-10-02 07:13:14 +00:00
|
|
|
import { RouteConfig } from 'vue-router';
|
|
|
|
|
|
|
|
const routes: RouteConfig[] = [
|
|
|
|
{
|
|
|
|
path: '/',
|
2020-10-10 21:02:32 +00:00
|
|
|
redirect: 'login',
|
|
|
|
component: () => import('layouts/OutLayout.vue'),
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
name: 'login',
|
|
|
|
path: 'login',
|
|
|
|
component: () => import('pages/Login.vue')
|
2020-10-13 21:13:42 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'about_out',
|
|
|
|
path: 'about',
|
|
|
|
component: () => import('pages/about/About.vue')
|
2020-10-10 21:02:32 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: '/main',
|
2020-11-10 00:33:55 +00:00
|
|
|
redirect: 'dashboard',
|
2020-10-02 07:13:14 +00:00
|
|
|
component: () => import('layouts/MainLayout.vue'),
|
|
|
|
children: [
|
2020-11-10 00:33:55 +00:00
|
|
|
{
|
|
|
|
name: 'dashboard',
|
|
|
|
path: 'dashboard',
|
|
|
|
meta: { permission: 'user' },
|
|
|
|
component: () => import('pages/Dashboard.vue')
|
|
|
|
},
|
2020-10-10 21:02:32 +00:00
|
|
|
{
|
|
|
|
name: 'about',
|
|
|
|
path: 'about',
|
2020-11-04 22:53:10 +00:00
|
|
|
meta: { permission: 'user' },
|
2020-10-13 21:13:42 +00:00
|
|
|
component: () => import('pages/about/About.vue')
|
2020-10-10 21:02:32 +00:00
|
|
|
}
|
2020-10-02 07:13:14 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
// Always leave this as last one,
|
|
|
|
// but you can also remove it
|
|
|
|
{
|
|
|
|
path: '*',
|
2020-10-10 21:02:32 +00:00
|
|
|
redirect: 'login',
|
2020-10-02 07:13:14 +00:00
|
|
|
component: () => import('pages/Error404.vue')
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
export default routes;
|