Files
FileCodeBoxFronted/src/router/index.ts
T
2024-11-23 16:39:42 +08:00

51 lines
1.2 KiB
TypeScript

import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'Retrieve',
component: () => import('@/views/RetrievewFileView.vue')
},
{
path: '/send',
name: 'Send',
component: () => import('@/views/SendFileView.vue')
},
{
path: '/admin',
name: 'Manage',
component: () => import('@/layout/AdminLayout/AdminLayout.vue'),
redirect: '/admin/dashboard',
children: [
{
path: '/admin/dashboard',
name: 'Dashboard',
component: () => import('@/views/manage/DashboardView.vue')
},
{
path: '/admin/files',
name: 'FileManage',
component: () => import('@/views/manage/FileManageView.vue')
},
{
path: '/admin/settings',
name: 'Settings',
component: () => import('@/views/manage/SystemSettingsView.vue')
}
]
},
{
path: '/login',
name: 'Login',
component: () => import('@/views/LoginView.vue')
}
]
})
// 预加载 SendFileView 组件
import('../views/SendFileView.vue')
export default router