add dropdown

This commit is contained in:
AceDataCloud committed 2022-10-08 23:02:21 +08:00
1 parent 04cb03ef7c
commit cf46694f1f
2 files changed
+10 -1

No files matched your search

+8
View File
@@ -22,6 +22,8 @@
<img :src="user.avatar || defaultAvatar" class="avatar" />
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item @click="onProfile">{{ $t('common.button.profile') }}</el-dropdown-item>
<el-dropdown-item @click="onVerify">{{ $t('common.button.verify') }}</el-dropdown-item>
<el-dropdown-item @click="onLogout">{{ $t('common.button.logout') }}</el-dropdown-item>
</el-dropdown-menu>
</template>
@@ -66,6 +68,12 @@ export default defineComponent({
name: 'login'
});
},
onProfile() {
window.location.href = 'https://auth.test.zhishuyun.com/user/profile';
},
onVerify() {
window.location.href = 'https://auth.test.zhishuyun.com/user/verify';
},
onLogout() {
this.$store.dispatch('resetAuth');
this.$router.push('/');