From 9c27f8c9f42d071bbf543678e4e86484be09721f Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 2 Jan 2026 20:11:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=BF=E6=8D=A2=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E4=B8=BA=E7=BB=9F=E4=B8=80=E7=9A=84Icon?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除自定义SVG图标,使用Icon组件的bell图标 - 确保通知图标与系统设置、成就、签到等图标风格统一 - 修复类型检查错误 --- frontend/src/components/NotificationBell.vue | 29 ++++---------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/NotificationBell.vue b/frontend/src/components/NotificationBell.vue index 38d6718..f428900 100644 --- a/frontend/src/components/NotificationBell.vue +++ b/frontend/src/components/NotificationBell.vue @@ -2,19 +2,7 @@
- +
@@ -137,7 +125,7 @@ const handleClick = () => { // 点击通知项 const handleNotificationClick = async (notification: Notification) => { // 标记为已读 - if (notification.isRead === 0) { + if (notification.isRead === 0 && currentUserId.value) { try { await markAsRead(notification.id, currentUserId.value) loadUnreadCount() @@ -160,6 +148,10 @@ const handleViewAll = () => { // 全部已读 const handleMarkAllRead = async () => { + if (!currentUserId.value) { + return + } + try { const count = await markAllAsRead(currentUserId.value) message.success(`已标记 ${count} 条消息为已读`) @@ -278,15 +270,6 @@ onUnmounted(() => { background: $bg-card; color: $text-primary; } - - .bell-icon { - width: 18px; - height: 18px; - display: inline-block; - fill: currentColor; - stroke: currentColor; - stroke-width: 0; - } } .notification-dropdown {