feat: 路由管理

This commit is contained in:
anonymous
2024-12-27 14:37:17 +08:00
parent 8d6a9f3eec
commit 06679d50e2
15 changed files with 208 additions and 43 deletions
+1 -5
View File
@@ -15,10 +15,7 @@ export const useUserStore = defineStore(
const clearUserInfo = () => {
userInfo.value = { ...initState }
}
// 一般没有reset需求,不需要的可以删除
const reset = () => {
userInfo.value = { ...initState }
}
const isLogged = computed(() => !!userInfo.value.token)
return {
@@ -26,7 +23,6 @@ export const useUserStore = defineStore(
setUserInfo,
clearUserInfo,
isLogged,
reset,
}
},
{