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: '/subjectTest', // 题目测试页面 name: 'SubjectTest', component: () => import('@/views/subjectTest/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') } ]; const router: any = createRouter({ history: createWebHashHistory(), routes: routerList, scrollBehavior() { return { left: 0, top: 0, }; }, }); export default router;