import { createRouter, createWebHashHistory, createWebHistory, } from "vue-router"; export const routes = [ // 根路由 { path: "/", redirect: "Login", hidden: true, }, // 登录 { path: "/login", name: "Login", hidden: true, component: () => import("../views/account/Login.vue"), }, // 路由中转 { path: "/history", name: "history", meta: { title: "数据管理", }, component: () => import("../layout/Index.vue"), children: [ { path: "/history", name: "history", meta: { title: "数据管理", }, component: () => import("../views/history/Index.vue"), }, ], }, ]; const router = createRouter({ history: createWebHashHistory(), routes, }); export default router;