fix: 统一管理后台 401 与加载失败处理

This commit is contained in:
Nixevol
2026-09-30 16:22:48 +08:00
parent 1cb562fb71
commit ed788fbb74
17 changed files with 473 additions and 47 deletions
+5 -1
View File
@@ -32,5 +32,9 @@ export const useAuthStore = defineStore("auth", () => {
}
}
return { username, ready, isLoggedIn, hydrate, login, logout };
function clearSession() {
username.value = null;
}
return { username, ready, isLoggedIn, hydrate, login, logout, clearSession };
});