From 3458dfe353776717a26f2d1df83ca3e362b01823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=AA=E5=B0=91=E4=BC=9F?= Date: Wed, 19 Mar 2025 20:20:37 +0800 Subject: [PATCH] fix: bug --- src/components/Header/UserAvatar.vue | 14 +++++++------- src/views/Jyh/Home/index.vue | 11 +++++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/components/Header/UserAvatar.vue b/src/components/Header/UserAvatar.vue index 742b353..c83f31a 100644 --- a/src/components/Header/UserAvatar.vue +++ b/src/components/Header/UserAvatar.vue @@ -10,7 +10,7 @@
- {{ accountInfo.username?accountInfo.username[0]:'' }} + {{ accountInfo.username ? accountInfo.username[0] : '' }}
@{{ accountInfo.username }}
@@ -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 }] ]); diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index 7b4ce3a..d207fa8 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -66,7 +66,11 @@ 预警公告
- 更多 > + +
@@ -109,10 +113,13 @@