perf: store

This commit is contained in:
xingyu
2022-08-03 12:55:27 +08:00
parent b64261a293
commit 4bf8576dbd
3 changed files with 9 additions and 6 deletions

View File

@ -6,6 +6,7 @@ import { useRouter } from 'vue-router'
import { useDesign } from '@/hooks/web/useDesign'
import avatarImg from '@/assets/imgs/avatar.gif'
import { useUserStore } from '@/store/modules/user'
import { useTagsViewStore } from '@/store/modules/tagsView'
const { t } = useI18n()
@ -15,6 +16,8 @@ const { push, replace } = useRouter()
const userStore = useUserStore()
const tagsViewStore = useTagsViewStore()
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('user-info')
@ -33,6 +36,7 @@ const loginOut = () => {
})
.then(async () => {
userStore.loginOut()
tagsViewStore.delAllViews
replace('/login')
})
.catch(() => {})