diff --git a/web/static/js/dashboard.js b/web/static/js/dashboard.js
index 0ff94f97..a312cce5 100644
--- a/web/static/js/dashboard.js
+++ b/web/static/js/dashboard.js
@@ -730,7 +730,7 @@ function renderRecommendedActions(state) {
if (state.openCriticalCount > 0) {
actions.push({
level: 'urgent',
- icon: '',
+ icon: '',
title: dt('dashboard.recoFixCritical', { count: state.openCriticalCount },
'修复 ' + state.openCriticalCount + ' 个待处理严重漏洞'),
desc: dt('dashboard.recoFixCriticalDesc', null, '严重等级的漏洞应优先处置'),
diff --git a/web/static/js/notifications.js b/web/static/js/notifications.js
index 68886c0b..5c49b302 100644
--- a/web/static/js/notifications.js
+++ b/web/static/js/notifications.js
@@ -287,10 +287,18 @@
closeDropdown();
return;
}
- dropdown.style.display = 'block';
- bellBtn.classList.add('active');
- state.dropdownOpen = true;
- await refreshNotifications();
+ // 从仪表盘「查看全部」等容器外入口打开时,同一 click 会冒泡到 document,
+ // handleDocumentClick 会误判为「点在外面」并立刻关掉。推迟到宏任务再展开即可。
+ const runOpen = async function () {
+ if (dropdown.style.display !== 'none') return;
+ dropdown.style.display = 'block';
+ bellBtn.classList.add('active');
+ state.dropdownOpen = true;
+ await refreshNotifications();
+ };
+ window.setTimeout(function () {
+ void runOpen();
+ }, 0);
}
async function markAllSeen() {