import { createRouter, createWebHashHistory } from "vue-router"; import layout from "@/layout/index.vue"; const routerList: any = [ { path: "/", component: layout, children: [ { path: "", name: "Home", component: () => import("@/views/largeDataScreen/home.vue"), }, { path: "designRoute", name: "DesignRoute", component: () => import("@/views/designRoute/index.vue"), }, { path: "program", name: "Program", component: () => import("@/views/program/index.vue"), }, { path: "compiler", name: "Compiler", component: () => import("@/views/compiler/index.vue"), }, { path: "experimentalData", name: "ExperimentalData", component: () => import("@/views/experimentalData/index.vue"), } ], }, { path: '/subjectTest', // 题目测试页面 name: 'SubjectTest', component: () => import('@/views/subjectTest/index.vue'), }, { path: '/target', // 实验目标(简介) name: 'Target', component: () => import('@/views/target/index.vue'), }, { path: '/login', name: 'Login', component: () => import('@/layout/loginPage.vue') }, { path:'/studyPage', name:'StudyPage', component: () => import('@/layout/studyPage.vue') },{ path: '/spacePage', name: 'SpacePage', component:()=>import('@/layout/spacePage.vue') },{ path: '/knowledgePage', name: 'KnowledgePage', component: () => import('@/layout/knowledgePage.vue') },{ path:'/passwordPage', name:'PasswordPage', component:()=>import('@/layout/passwordPage.vue') } ]; const router: any = createRouter({ history: createWebHashHistory(), routes: routerList, scrollBehavior() { return { left: 0, top: 0, }; }, }); export default router;