fix(components): 页面跳转被拦截, 则会出现 tab 页签与页面不一致的问题

This commit is contained in:
刘璐
2023-02-08 22:29:54 +08:00
parent da521b35e6
commit bd5dd2cf28
2 changed files with 21 additions and 13 deletions

View File

@@ -19,9 +19,9 @@ export function useRouterPush(inSetup = true) {
if (newTab) {
const routerData = router.resolve(to);
window.open(routerData.href, '_blank');
} else {
router.push(to);
return Promise.resolve();
}
return router.push(to);
}
/** 返回上一级路由 */