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