1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-05-01 06:39:01 +08:00

fix: 捕获退出登录异常,不阻止退出登录

This commit is contained in:
zclzone 2023-12-18 22:32:53 +08:00
parent 925c0afba7
commit 4448ccf111

View File

@ -72,7 +72,11 @@ function handleSelect(key) {
type: 'info', type: 'info',
content: '确认退出?', content: '确认退出?',
async confirm() { async confirm() {
try {
await api.logout() await api.logout()
} catch (error) {
console.error(error)
}
authStore.logout() authStore.logout()
$message.success('已退出登录') $message.success('已退出登录')
}, },