123456789101112131415161718192021222324252627282930313233 |
- import { createRouter, createWebHistory, createWebHashHistory } from "vue-router";
- const router = createRouter({
- // history: createWebHistory(import.meta.env.BASE_URL),
- history: createWebHashHistory(),
- routes: [
- {
- path: "/",
- name: "main",
- component: () => import("../views/main/index.vue"),
- children: [
- {
- path: "map3d",
- name: "map3d",
- component: () => import("../views/map3d/index.vue"),
- meta: {
- keepAlive: true // 需要缓存
- }
- },
- {
- path: "transiton",
- name: "transiton",
- component: () => import("../views/transiton/index.vue"),
- meta: {
- keepAlive: false // 需要缓存
- }
- },
- ],
- },
- ],
- });
- export default router;
|