From ac997998e1b62b148a77a3c7e5345ff79125c876 Mon Sep 17 00:00:00 2001 From: Ironsp <1522278303@qq.com> Date: Thu, 11 Jun 2026 08:42:53 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BC=98=E5=8C=96=E6=8A=A5=E8=AD=A6?= =?UTF-8?q?=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 10 +++++-- src/layout/components/notice/index.vue | 18 ++++++++++--- src/store/modules/warnningList.ts | 36 ++++++++++++++++++++++++++ 3 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 src/store/modules/warnningList.ts diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 864d37a..12e63e3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -39,14 +39,14 @@
@@ -113,12 +113,15 @@ import { NavTypeEnum } from '@/enums/NavTypeEnum'; import Logo from '@/layout/components/Sidebar/Logo.vue'; import TopBar from './TopBar'; import { getDemo } from '@/api/systemList/index'; +import { useWarningListStore } from '@/store/modules/warnningList'; const appStore = useAppStore(); +const warningListStore = useWarningListStore(); const userStore = useUserStore(); const settingsStore = useSettingsStore(); const noticeStore = storeToRefs(useNoticeStore()); const newNotice = ref(0); +const { warningList, warningListTotal } = storeToRefs(warningListStore); const { proxy } = getCurrentInstance() as ComponentInternalInstance; @@ -235,6 +238,9 @@ onMounted(() => { logoUrl.value = res.data.url; }); }); +onMounted(() => { + warningListStore.getWarningList(); +});