修复用户退出登录时,把 LANG、THEME、LAYOUT、IS_DARK 给清空的问题

This commit is contained in:
YunaiV
2024-02-29 22:23:10 +08:00
parent f413556c73
commit 560a336f8c
4 changed files with 27 additions and 10 deletions

View File

@ -25,3 +25,9 @@ export const useCache = (type: CacheType = 'localStorage') => {
wsCache
}
}
export const deleteUserCache = () => {
const { wsCache } = useCache()
wsCache.delete(CACHE_KEY.USER)
wsCache.delete(CACHE_KEY.ROLE_ROUTERS)
}