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