From ff7b8abe9dbe41b9d1c9a823001613f5007da927 Mon Sep 17 00:00:00 2001 From: zdl <3489966805@qq.com> Date: Wed, 5 Nov 2025 17:02:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=E4=B8=8D=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Community/components/DynamicNewsCard.js | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/views/Community/components/DynamicNewsCard.js b/src/views/Community/components/DynamicNewsCard.js index 16c2f9b4..47d4e428 100644 --- a/src/views/Community/components/DynamicNewsCard.js +++ b/src/views/Community/components/DynamicNewsCard.js @@ -55,6 +55,7 @@ let dynamicNewsCardRenderCount = 0; const DynamicNewsCard = forwardRef(({ allCachedEvents = [], loading, + error, total = 0, cachedCount = 0, filters = {}, @@ -178,20 +179,6 @@ const DynamicNewsCard = forwardRef(({ const selectedEventInCurrentPage = currentPageEvents.find( e => e.id === selectedEvent?.id ); - - if (selectedEvent && !selectedEventInCurrentPage) { - console.log('%c📄 [翻页] 选中的事件不在当前页', 'color: #F59E0B; font-weight: bold;'); - - // 单排/双排/纵向模式:自动选中当前页第一个事件(保持详情显示) - // 四排模式:清空选中状态(不需要底部详情) - if (mode === 'carousel' || mode === 'grid' || mode === 'vertical') { - console.log('%c📄 [翻页] 自动选中当前页第一个事件', 'color: #10B981; font-weight: bold;'); - setSelectedEvent(currentPageEvents[0]); - } else { - console.log('%c📄 [翻页] 清空选中状态(四排模式)', 'color: #F59E0B; font-weight: bold;'); - setSelectedEvent(null); - } - } } }, [currentPageEvents, selectedEvent?.id, mode]); @@ -255,6 +242,7 @@ const DynamicNewsCard = forwardRef(({ onPageChange={handlePageChange} loading={loadingPage !== null} loadingPage={loadingPage} + error={error} mode={mode} onModeChange={handleModeToggle} eventFollowStatus={eventFollowStatus} @@ -277,14 +265,6 @@ const DynamicNewsCard = forwardRef(({ )} - - {/* 详情面板 - 仅在单排/双排模式下显示(四排模式不显示,纵向模式已在右侧显示) */} - {currentPageEvents && currentPageEvents.length > 0 && selectedEvent && - (mode === 'carousel' || mode === 'grid') && ( - - - - )} {/* 四排模式详情弹窗 - 未打开时不渲染 */}