Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -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 },
|
||||
|
@@ -271,7 +271,7 @@ export const useTabbarStore = defineStore('core-tabbar', {
|
||||
*/
|
||||
async openTabInNewWindow(tab: TabDefinition) {
|
||||
const { hash, origin } = location;
|
||||
const path = tab.fullPath;
|
||||
const path = tab.fullPath || tab.path;
|
||||
const fullPath = path.startsWith('/') ? path : `/${path}`;
|
||||
const url = `${origin}${hash ? '/#' : ''}${fullPath}`;
|
||||
openWindow(url, { target: '_blank' });
|
||||
|
Reference in New Issue
Block a user