Update route.ts

如果 `next({ path: from.fullPath, replace: true, query: from.query, hash: to.hash });` 的意图是取消跳转的话

使用 next(false) 更准确。 

而使用replace ,也许会和用户代码 一起产生 非预期的可能
This commit is contained in:
lightnoway 2024-10-15 16:58:34 +08:00 committed by GitHub
parent 8dcda38560
commit 94ec6fab5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,7 +189,7 @@ function handleRouteSwitch(to: RouteLocationNormalized, from: RouteLocationNorma
if (to.meta.href) {
window.open(to.meta.href, '_blank');
next({ path: from.fullPath, replace: true, query: from.query, hash: to.hash });
next(false);
return;
}