Open zhang1024899756 opened 1 year ago
主应用路由代码
import { createRouter, createWebHashHistory } from 'vue-router' import Vue2 from "@/views/Vue2.vue" import Vue3 from "@/views/Vue3.vue" const router = createRouter({ history: createWebHashHistory(), routes: [ { path: '/', name: 'Home', component: () => import('@/layout/index.vue'), children: [ { path: "/vue2", name: "vue2", component: Vue2, }, { path: "/vue3", name: "vue3", component: Vue3, }, ] } ] })
来回切换两个子应用路径会乱掉 http://localhost:9528/?vue3=%2F%23%2F#/vue3
http://localhost:9528/?vue3=%2F%23%2F#/vue3
官方文档有解释,开启了路由同步
路由同步的方案目前不是很成熟, 请考虑关闭路由同步
主应用路由代码
来回切换两个子应用路径会乱掉
http://localhost:9528/?vue3=%2F%23%2F#/vue3