This commit is contained in:
汪少伟
2025-03-19 20:20:37 +08:00
parent 2953efb0f9
commit 3458dfe353
2 changed files with 16 additions and 9 deletions

View File

@@ -10,7 +10,7 @@
</div>
<div class="g-user-drawer-info-list">
<div class="g-user-drawer-info-list-name">
<span class="break-all">{{ accountInfo.username?accountInfo.username[0]:'' }}</span>
<span class="break-all">{{ accountInfo.username ? accountInfo.username[0] : '' }}</span>
<GIcon class="close-icon" name="gt-close" size="12" @click="handleClose" />
</div>
<div class="g-user-drawer-info-list-id break-all">@{{ accountInfo.username }}</div>
@@ -69,6 +69,10 @@ const logout = async () => {
router.go(0);
}
}
// 退出系统刷新页面
setTimeout(() => {
location.reload();
}, 100);
};
const handleClick = (item) => {
@@ -107,9 +111,7 @@ const getRouterLink = (params) => {
};
const blockList = ref([
[
{ id: 'myPage', label: '个人中心', to: getRouterLink('PersonalCenter') }
],
[{ id: 'myPage', label: '个人中心', to: getRouterLink('PersonalCenter') }],
// [
// // { id: 'dashboard', label: '工作台', icon: 'gt-member-c', to: getRouterLink('dashboard') },
// // { id: 'myIssues', label: '我的 Issue', icon: 'gt-issue-c', to: getRouterLink('issues') },
@@ -126,9 +128,7 @@ const blockList = ref([
// { id: 'personalSetting', label: '个人设置', icon: 'gt-setting-c', to: getRouterLink('setting') },
// { id: 'help', label: '帮助文档', icon: 'gt-file-c', href: 'https://gitcode.com/Gitcode-offical-team/GitCode-Docs/wiki' }
// ],
[
{ id: 'logout', label: '退出登录', icon: 'gt-exit', action: logout }
]
[{ id: 'logout', label: '退出登录', icon: 'gt-exit', action: logout }]
]);
</script>