fix(@vben/stores): respect base URL when opening route in new window (#7837)

* fix(@vben/stores): respect base URL when opening route in new window

* fix(@vben/stores): respect base URL when opening route in new window
This commit is contained in:
leo
2026-05-01 06:49:05 +08:00
committed by GitHub
parent c0b2ef980e
commit 9a73e961fc
2 changed files with 5 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ import { markRaw, toRaw } from 'vue';
import { preferences } from '@vben-core/preferences';
import {
createStack,
openRouteInNewWindow,
openWindow,
Stack,
startProgress,
stopProgress,
@@ -371,8 +371,9 @@ export const useTabbarStore = defineStore('core-tabbar', {
* @zh_CN 新窗口打开标签页
* @param tab
*/
async openTabInNewWindow(tab: TabDefinition) {
openRouteInNewWindow(tab.fullPath || tab.path);
async openTabInNewWindow(tab: TabDefinition, router: Router) {
const href = router.resolve(tab.fullPath || tab.path).href;
openWindow(new URL(href, location.href).href, { target: '_blank' });
},
/**