fix: use correct route data in tabbar, fixed: #4107 (#4110)

This commit is contained in:
Netfan 2024-08-10 16:33:38 +08:00 committed by GitHub
parent 4d4327cb25
commit ec49a04151
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -104,9 +104,10 @@ export function useTabbar() {
const routes = router.getRoutes();
const currentRoute = routes.find((item) => item.path === route.path);
if (currentRoute) {
tabbarStore.addTab(
currentRoute as unknown as RouteLocationNormalizedGeneric,
);
tabbarStore.addTab({
...route,
meta: currentRoute.meta,
} as unknown as RouteLocationNormalizedGeneric);
}
},
{ immediate: true },