This commit is contained in:
Ray.Hao
2026-05-11 12:38:17 +08:00
2 changed files with 9 additions and 3 deletions

View File

@@ -160,7 +160,9 @@ function logout() {
lockScroll: false,
}).then(() => {
userStore.logout().then(() => {
router.push(`/login?redirect=${route.fullPath}`);
// 若当前已在 404/401 等错误页,退出后不再跳回错误页
const redirect = ["/404", "/401"].includes(route.path) ? "/" : route.fullPath;
router.push(`/login?redirect=${encodeURIComponent(redirect)}`);
});
});
}
@@ -191,8 +193,8 @@ function handleSettingsClick() {
cursor: pointer;
transition: all 0.3s;
// 确保子元素居中
> * {
// 只对需要居中的子元素生效,不使用通配符避免影响选择器组件
> [class^="i-svg:"] {
display: flex;
align-items: center;
justify-content: center;