添加系统设置跳转功能
This commit is contained in:
parent
4654e4c5ec
commit
08a1e5d6cb
@ -58,10 +58,8 @@
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item>{{ $t('topbar.center') }}</el-dropdown-item>
|
||||
<el-dropdown-item>{{ $t('topbar.password') }}</el-dropdown-item>
|
||||
<lock-modal />
|
||||
<el-dropdown-item @click="logout">
|
||||
<el-dropdown-item @click="goSettings">系统设置</el-dropdown-item>
|
||||
<el-dropdown-item divided @click="logout">
|
||||
{{ $t('topbar.logout') }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@ -84,6 +82,11 @@ export default defineComponent({
|
||||
|
||||
const { userinfo } = useUserinfo()
|
||||
|
||||
const goSettings = () => {
|
||||
// 跳转到原有的 vue-admin 主页
|
||||
router.push('/')
|
||||
}
|
||||
|
||||
// 退出
|
||||
const logout = () => {
|
||||
// 清除token
|
||||
@ -93,6 +96,7 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
userinfo,
|
||||
goSettings,
|
||||
logout,
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user