From 7261b78afd7624530057cc219e6805ec098a61f3 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Wed, 26 Nov 2025 16:01:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20H5=20=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=B0=86=E9=9A=90=E8=97=8F"=E5=BC=80=E5=90=AF=E9=80=9A?= =?UTF-8?q?=E7=9F=A5"=E7=BB=84=E4=BB=B6=EF=BC=8C=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=AB=AF=E4=BF=9D=E6=8C=81=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Community/components/DynamicNewsCard.js | 106 +++++++++--------- 1 file changed, 55 insertions(+), 51 deletions(-) diff --git a/src/views/Community/components/DynamicNewsCard.js b/src/views/Community/components/DynamicNewsCard.js index 3832a143..6994afe1 100644 --- a/src/views/Community/components/DynamicNewsCard.js +++ b/src/views/Community/components/DynamicNewsCard.js @@ -47,6 +47,7 @@ import { usePagination } from './DynamicNewsCard/hooks/usePagination'; import { PAGINATION_CONFIG, DISPLAY_MODES, REFRESH_DEBOUNCE_DELAY } from './DynamicNewsCard/constants'; import { PROFESSIONAL_COLORS } from '../../../constants/professionalTheme'; import { debounce } from '../../../utils/debounce'; +import { useDevice } from '@hooks/useDevice'; // 🔍 调试:渲染计数器 let dynamicNewsCardRenderCount = 0; @@ -81,6 +82,7 @@ const DynamicNewsCardComponent = forwardRef(({ // 通知权限相关 const { browserPermission, requestBrowserPermission } = useNotification(); + const { isMobile } = useDevice(); // Refs const cardHeaderRef = useRef(null); @@ -548,59 +550,61 @@ const [currentMode, setCurrentMode] = useState('vertical'); {/* 右侧:通知开关 + 更新时间 */} - {/* 通知开关 */} - - - - - {browserPermission === 'granted' ? '已开启' : '开启通知'} - - - - + + + {browserPermission === 'granted' ? '已开启' : '开启通知'} + + + + + )} {/* 更新时间 */}