修改右上角显示用户名称
This commit is contained in:
parent
2bfebe75ff
commit
e06df98ce9
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<a-dropdown v-if="currentUser && currentUser.userName" placement="bottomRight">
|
||||
<a-dropdown v-if="currentUser && currentUser.name" placement="bottomRight">
|
||||
<span class="ant-pro-account-avatar">
|
||||
<a-avatar size="small" src="https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png" class="antd-pro-global-header-index-avatar" />
|
||||
<span>{{ currentUser.userName }}</span>
|
||||
<span>{{ currentUser.name }}</span>
|
||||
</span>
|
||||
<template v-slot:overlay>
|
||||
<a-menu class="ant-pro-drop-down menu" :selected-keys="[]">
|
||||
|
@ -43,13 +43,13 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
handleToCenter () {
|
||||
handleToCenter() {
|
||||
this.$router.push({ path: '/account/center' })
|
||||
},
|
||||
handleToSettings () {
|
||||
handleToSettings() {
|
||||
this.$router.push({ path: '/account/settings' })
|
||||
},
|
||||
handleLogout (e) {
|
||||
handleLogout(e) {
|
||||
Modal.confirm({
|
||||
title: this.$t('layouts.usermenu.dialog.title'),
|
||||
content: this.$t('layouts.usermenu.dialog.content'),
|
||||
|
@ -61,7 +61,7 @@ export default {
|
|||
this.$router.push({ name: 'login' })
|
||||
})
|
||||
},
|
||||
onCancel () {}
|
||||
onCancel() { }
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue