feat 监听消息队列

This commit is contained in:
Ironsp
2026-05-26 17:20:56 +08:00
parent d840737c5e
commit d6a59b5ebb
2 changed files with 4 additions and 4 deletions

View File

@@ -79,9 +79,9 @@
</div> </div>
<template #dropdown> <template #dropdown>
<el-dropdown-menu> <el-dropdown-menu>
<router-link v-if="!dynamic" to="/user/profile"> <!-- <router-link v-if="!dynamic" to="/user/profile">
<el-dropdown-item>{{ proxy.$t('navbar.personalCenter') }}</el-dropdown-item> <el-dropdown-item>{{ proxy.$t('navbar.personalCenter') }}</el-dropdown-item>
</router-link> </router-link> -->
<el-dropdown-item v-if="settingsStore.showSettings" command="setLayout"> <el-dropdown-item v-if="settingsStore.showSettings" command="setLayout">
<span>{{ proxy.$t('navbar.layoutSetting') }}</span> <span>{{ proxy.$t('navbar.layoutSetting') }}</span>
</el-dropdown-item> </el-dropdown-item>

View File

@@ -11,7 +11,7 @@
<div class="item-conten"> <div class="item-conten">
<div>{{ v.message }}</div> <div>{{ v.message }}</div>
<div class="content-box-msg"></div> <div class="content-box-msg"></div>
<div class="content-box-time">{{ v.time }}</div> <!-- <div class="content-box-time">{{ v.time }}</div> -->
</div> </div>
<!-- 已读/未读 --> <!-- 已读/未读 -->
<!-- <span v-if="v.read" class="el-tag el-tag--success el-tag--mini read">已读</span> --> <!-- <span v-if="v.read" class="el-tag el-tag--success el-tag--mini read">已读</span> -->
@@ -118,7 +118,6 @@ const getTableData = async () => {
// 过滤消息 // 过滤消息
const filteredNotices = filterMessages(allNotices); const filteredNotices = filterMessages(allNotices);
newsList.value = filteredNotices; newsList.value = filteredNotices;
state.loading = false; state.loading = false;
}; };
@@ -128,6 +127,7 @@ watch(
(newNotices) => { (newNotices) => {
const filteredNotices = filterMessages([...newNotices]); const filteredNotices = filterMessages([...newNotices]);
newsList.value = filteredNotices; newsList.value = filteredNotices;
console.log('监听消息队列', newsList.value);
}, },
{ deep: true } { deep: true }
); );