fix 优化警告弹出框

This commit is contained in:
Ironsp
2026-06-10 17:07:25 +08:00
parent 93b97a1571
commit 5fe9342bbf
2 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@
<!-- 消息 -->
<el-tooltip content="警报" effect="dark" placement="bottom">
<div style="display: flex; align-items: center" class="mr-[30px]">
<el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="300" :persistent="false">
<el-popover placement="bottom" trigger="click" transition="el-zoom-in-top" :width="400" :persistent="false">
<template #reference>
<el-badge :value="newNotice > 0 ? newNotice : ''" :max="99">
<div class="right-menu-item hover-effect" @click="goToWarningList">

View File

@@ -127,7 +127,7 @@ const getTableData = async () => {
const allNotices = [...noticeStore.state.notices]; // 复制数组避免直接修改原数据
// 过滤消息并解析 message/videoId
const filteredNotices = filterMessages(allNotices).map(parseNoticeItem);
const filteredNotices = allNotices.map(parseNoticeItem);
newsList.value = filteredNotices;
state.loading = false;
};
@@ -136,7 +136,7 @@ const getTableData = async () => {
watch(
() => noticeStore.state.notices,
(newNotices) => {
const filteredNotices = filterMessages([...newNotices]).map(parseNoticeItem);
const filteredNotices = [...newNotices].map(parseNoticeItem);
newsList.value = filteredNotices;
console.log('监听消息队列', newsList.value);
},
@@ -159,7 +159,7 @@ const onNewsClick = (item: any) => {
// 辅助函数:找到原始索引
const findOriginalIndex = (filteredIndex: number) => {
const filteredNotices = filterMessages([...noticeStore.state.notices]).map(parseNoticeItem);
const filteredNotices = [...noticeStore.state.notices].map(parseNoticeItem);
const currentMessage = filteredNotices[filteredIndex];
// 在原始数组中查找对应消息的索引