mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2026-03-25 07:47:22 +08:00
fix(projects): fix wrong new tab opening for external link navigation.
This commit is contained in:
@@ -38,8 +38,7 @@ export function createRouteGuard(router: Router) {
|
|||||||
|
|
||||||
// if the route does not need login, then it is allowed to access directly
|
// if the route does not need login, then it is allowed to access directly
|
||||||
if (!needLogin) {
|
if (!needLogin) {
|
||||||
handleRouteSwitch(to, from);
|
return handleRouteSwitch(to, from);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// the route need login but the user is not logged in, then switch to the login page
|
// the route need login but the user is not logged in, then switch to the login page
|
||||||
@@ -53,7 +52,7 @@ export function createRouteGuard(router: Router) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// switch route normally
|
// switch route normally
|
||||||
handleRouteSwitch(to, from);
|
return handleRouteSwitch(to, from);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user