feat 优化处理后的副作用

This commit is contained in:
Ironsp
2026-06-23 08:32:05 +08:00
parent dd54ce489e
commit ced12d5805

View File

@@ -272,14 +272,14 @@ watch(
); );
// 告警数据变化时自动弹出弹窗 // 告警数据变化时自动弹出弹窗
// 当 isNotice 变为 true 时弹出弹窗,并重置为 false // 当 isNotice 变为 true 时弹出弹窗,并重置为 false
let noticeFirstLoad = true; //解决初始化时弹出弹窗问题 // let noticeFirstLoad = true; //解决初始化时弹出弹窗问题
watch( watch(
() => noticeStore.state.value.isNotice, () => noticeStore.state.value.isNotice,
(newVal) => { (newVal) => {
if (noticeFirstLoad) { // if (noticeFirstLoad) {
noticeFirstLoad = false; // noticeFirstLoad = false;
return; // return;
} // }
if (newVal) { if (newVal) {
noticeStore.state.value.isNotice = false; noticeStore.state.value.isNotice = false;
popoverVisible.value = true; popoverVisible.value = true;