index.js
550 Bytes
import { createRouter, createWebHistory } from "vue-router";
// 示例路由配置
const routes = [
{
path: "/",
name: "Video",
component: () => import("@/views/video/index.vue"),
// component: () => import("@/views/heatMap/index.vue"),
},
{
path: "/heatMap",
name: "HeatMap",
component: () => import("@/views/heatMap/index.vue"),
},
];
const isDev = process.env.NODE_ENV === 'development';
const router = createRouter({
history: createWebHistory(isDev ? '/' : '/apph5'),
routes,
});
export default router;