diff --git a/src/components/layout/TopBar.vue b/src/components/layout/TopBar.vue
index d41493c..f0e6373 100644
--- a/src/components/layout/TopBar.vue
+++ b/src/components/layout/TopBar.vue
@@ -6,27 +6,26 @@
-
-
-
+
+
{{ userStore.userInfo.nickname || '用户' }}
-
+
-
+
个人中心
-
+
设置
-
+
退出登录
@@ -67,8 +66,9 @@ onMounted(async () => {
}
})
-// 处理下拉菜单命令
+// 处理菜单点击
const handleCommand = async (command: string) => {
+ console.log('Menu clicked:', command) // 添加调试日志
switch (command) {
case 'profile':
router.push('/profile')
@@ -126,6 +126,7 @@ const handleCommand = async (command: string) => {
padding: 2px 8px;
border-radius: 4px;
transition: background-color 0.3s;
+ user-select: none; /* 防止文本被选中 */
}
.user-info:hover {