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

This commit is contained in:
Nixevol
2026-09-30 15:12:16 +08:00
parent eff4bd53be
commit 898b9d2934
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 };
});