退出登录

This commit is contained in:
李志鹏
2026-05-22 13:53:07 +08:00
parent ecf53c8353
commit 49cec0ee28
3 changed files with 35 additions and 16 deletions

View File

@@ -9,7 +9,10 @@
:key="v.path"
class="nav-item"
:class="{
active: v.path === '/' ? activePath === v.path : new RegExp(`^${v.path}`).test(activePath)
active:
v.path === '/'
? activePath === v.path
: new RegExp(`^${v.path}`).test(activePath)
}"
@click="onNavItemClick(v.path)"
>
@@ -141,8 +144,7 @@
hideProfilePopover()
ElMessageBox.confirm('Are you sure to log off?')
.then(() => {
userInfoStore.logout()
router.go(0)
userInfoStore.logout(true)
})
.catch(() => {})
}