feat: 退出登录时清除缓存页面
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, computed } from 'vue'
|
||||
import { removeLocal, setLocal } from '@/utils/local'
|
||||
import MyEvent from '@/utils/myEvent'
|
||||
export const useUserInfoStore = defineStore('userInfo', () => {
|
||||
const state = ref({
|
||||
userInfo: {},
|
||||
@@ -47,6 +48,8 @@ export const useUserInfoStore = defineStore('userInfo', () => {
|
||||
state.value.userInfo = {}
|
||||
removeLocal('token')
|
||||
resetGenerateParams()
|
||||
MyEvent.emit('clear-generate-state')
|
||||
MyEvent.emit('clearAllCache')
|
||||
resolve('')
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user