feat: 事件中心详情面板Ui调整
This commit is contained in:
@@ -13,13 +13,21 @@ import DynamicNewsDetailPanel from '../DynamicNewsDetail';
|
||||
* @param {string} scrollbarTrackBg - 滚动条轨道背景色
|
||||
* @param {string} scrollbarThumbBg - 滚动条滑块背景色
|
||||
* @param {string} scrollbarThumbHoverBg - 滚动条滑块悬浮背景色
|
||||
* @param {string} detailMode - 详情模式:'full' | 'no-header'(默认 'full')
|
||||
* @param {boolean} showHeader - 是否显示头部(可选,优先级高于 detailMode)
|
||||
*/
|
||||
const EventDetailScrollPanel = ({
|
||||
selectedEvent,
|
||||
scrollbarTrackBg,
|
||||
scrollbarThumbBg,
|
||||
scrollbarThumbHoverBg,
|
||||
detailMode = 'full',
|
||||
showHeader,
|
||||
}) => {
|
||||
// 计算是否显示头部:showHeader 显式指定时优先,否则根据 detailMode 判断
|
||||
const shouldShowHeader = showHeader !== undefined
|
||||
? showHeader
|
||||
: detailMode === 'full';
|
||||
return (
|
||||
<Box
|
||||
pl={2}
|
||||
@@ -47,7 +55,7 @@ const EventDetailScrollPanel = ({
|
||||
}}
|
||||
>
|
||||
{selectedEvent ? (
|
||||
<DynamicNewsDetailPanel event={selectedEvent} />
|
||||
<DynamicNewsDetailPanel event={selectedEvent} showHeader={shouldShowHeader} />
|
||||
) : (
|
||||
<Center h="100%" minH="400px">
|
||||
<VStack spacing={4}>
|
||||
|
||||
@@ -161,6 +161,7 @@ const VerticalModeLayout = ({
|
||||
{/* 详情面板 */}
|
||||
<EventDetailScrollPanel
|
||||
key={detailPanelKey}
|
||||
detailMode="no-header"
|
||||
selectedEvent={selectedEvent}
|
||||
/>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user