代码提交
This commit is contained in:
27
src/router/index.ts
Normal file
27
src/router/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: "/",
|
||||
name: "Index",
|
||||
component: () => import("@/views/SagTraceResult_WX/index.vue"), // 懒加载组件
|
||||
},
|
||||
{
|
||||
path: "/VoltageSag", //电压暂降监测平台_北京
|
||||
name: "VoltageSag",
|
||||
component: () => import("@/views/VoltageSag_BJ/index.vue"), // 懒加载组件
|
||||
},
|
||||
{
|
||||
path: "/SagTraceResult", //暂降溯源演示平台_无锡
|
||||
name: "SagTraceResult",
|
||||
component: () => import("@/views/SagTraceResult_WX/index.vue"), // 懒加载组件
|
||||
},
|
||||
];
|
||||
|
||||
const base_url = import.meta.env.BASE_URL; //获取vite.config.js配置的base,默认是根目录/
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(base_url),
|
||||
routes,
|
||||
});
|
||||
|
||||
export default router;
|
||||
Reference in New Issue
Block a user