Browse Source

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

pull/7837/head
leo 5 months ago
parent
commit
525c00d0ee
  1. 4
      packages/stores/src/modules/tabbar.ts

4
packages/stores/src/modules/tabbar.ts

@ -14,7 +14,7 @@ import { markRaw, toRaw } from 'vue';
import { preferences } from '@vben-core/preferences';
import {
createStack,
openRouteInNewWindow,
openWindow,
Stack,
startProgress,
stopProgress,
@ -373,7 +373,7 @@ export const useTabbarStore = defineStore('core-tabbar', {
*/
async openTabInNewWindow(tab: TabDefinition, router: Router) {
const href = router.resolve(tab.fullPath || tab.path).href;
openRouteInNewWindow(href);
openWindow(new URL(href, location.href).href, { target: '_blank' });
},
/**

Loading…
Cancel
Save