接入vue3子应用

This commit is contained in:
2026-06-21 10:57:32 +08:00
parent 2499043df4
commit b14e3d1186
6 changed files with 1280 additions and 0 deletions

View File

@@ -10,12 +10,23 @@ const routes = [
name: 'home',
component: () => import('@/views/Home.vue')
},
{
path: '/about',
name: 'about',
component: () => import('@/views/About.vue')
},
{
// 子应用路由 — `:page*` 通配符匹配子应用内部所有路由
// 例如:/child-app、/child-app/page1、/child-app/page2/xxx
path: '/child-app/:page*',
name: 'childApp',
component: () => import('@/views/ChildApp.vue')
},
{
// Vue3 子应用路由
path: '/vue3-app/:page*',
name: 'vue3App',
component: () => import('@/views/ChildApp.vue')
}
]