From dd54ce489ed36d945c1afed5fbac743237ada8b5 Mon Sep 17 00:00:00 2001 From: Ironsp <1522278303@qq.com> Date: Tue, 23 Jun 2026 08:28:35 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E5=BC=B9=E7=AA=97=E4=BC=98=E5=8C=96,=20?= =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=A0=87=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc-auto-import.json | 4 ++++ src/layout/components/Navbar.vue | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.eslintrc-auto-import.json b/.eslintrc-auto-import.json index 2ca3adf..d979925 100644 --- a/.eslintrc-auto-import.json +++ b/.eslintrc-auto-import.json @@ -5,6 +5,10 @@ "ComputedRef": true, "DirectiveBinding": true, "EffectScope": true, + "ElLoading": true, + "ElMessage": true, + "ElMessageBox": true, + "ElNotification": true, "ExtractDefaultPropTypes": true, "ExtractPropTypes": true, "ExtractPublicPropTypes": true, diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 7d246c9..d3e9443 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -271,15 +271,19 @@ watch( { deep: true } ); // 告警数据变化时自动弹出弹窗 +// 当 isNotice 变为 true 时弹出弹窗,并重置为 false let noticeFirstLoad = true; //解决初始化时弹出弹窗问题 watch( - () => warningListStore.warningListTotal, - () => { + () => noticeStore.state.value.isNotice, + (newVal) => { if (noticeFirstLoad) { noticeFirstLoad = false; return; } - popoverVisible.value = true; + if (newVal) { + noticeStore.state.value.isNotice = false; + popoverVisible.value = true; + } }, { deep: true } );