fix: 修复Community页面事件卡片显示,替换StockChangeIndicators为EventPriceDisplay
- HorizontalDynamicNewsEventCard 使用 EventPriceDisplay 替换 StockChangeIndicators - 移除周涨幅、平均涨幅,改为显示最大超额和超预期得分 - 点击最大超额可切换显示平均超额
This commit is contained in:
@@ -22,7 +22,7 @@ import dayjs from 'dayjs';
|
|||||||
import ImportanceStamp from './ImportanceStamp';
|
import ImportanceStamp from './ImportanceStamp';
|
||||||
import EventTimeline from './EventTimeline';
|
import EventTimeline from './EventTimeline';
|
||||||
import EventFollowButton from './EventFollowButton';
|
import EventFollowButton from './EventFollowButton';
|
||||||
import StockChangeIndicators from '../../../../components/StockChangeIndicators';
|
import EventPriceDisplay from './EventPriceDisplay';
|
||||||
import KeywordsCarousel from './KeywordsCarousel';
|
import KeywordsCarousel from './KeywordsCarousel';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +38,6 @@ import KeywordsCarousel from './KeywordsCarousel';
|
|||||||
* @param {Function} props.onToggleFollow - 切换关注事件
|
* @param {Function} props.onToggleFollow - 切换关注事件
|
||||||
* @param {Object} props.timelineStyle - 时间轴样式配置
|
* @param {Object} props.timelineStyle - 时间轴样式配置
|
||||||
* @param {string} props.borderColor - 边框颜色
|
* @param {string} props.borderColor - 边框颜色
|
||||||
* @param {string} props.indicatorSize - 涨幅指标尺寸 ('default' | 'comfortable' | 'large')
|
|
||||||
* @param {string} props.layout - 布局模式 ('vertical' | 'four-row'),影响时间轴竖线高度
|
* @param {string} props.layout - 布局模式 ('vertical' | 'four-row'),影响时间轴竖线高度
|
||||||
*/
|
*/
|
||||||
const HorizontalDynamicNewsEventCard = React.memo(({
|
const HorizontalDynamicNewsEventCard = React.memo(({
|
||||||
@@ -52,7 +51,6 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
|||||||
onToggleFollow,
|
onToggleFollow,
|
||||||
timelineStyle,
|
timelineStyle,
|
||||||
borderColor: timelineBorderColor,
|
borderColor: timelineBorderColor,
|
||||||
indicatorSize = 'comfortable',
|
|
||||||
layout = 'vertical',
|
layout = 'vertical',
|
||||||
}) => {
|
}) => {
|
||||||
const importance = getImportanceConfig(event.importance);
|
const importance = getImportanceConfig(event.importance);
|
||||||
@@ -245,12 +243,12 @@ const HorizontalDynamicNewsEventCard = React.memo(({
|
|||||||
</Box>
|
</Box>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
|
|
||||||
{/* 第二行:涨跌幅数据 */}
|
{/* 第二行:最大超额 + 超预期得分 */}
|
||||||
<StockChangeIndicators
|
<EventPriceDisplay
|
||||||
avgChange={event.related_avg_chg}
|
avgChange={event.related_avg_chg}
|
||||||
maxChange={event.related_max_chg}
|
maxChange={event.related_max_chg}
|
||||||
weekChange={event.related_week_chg}
|
expectationScore={event.expectation_surprise_score}
|
||||||
size={indicatorSize}
|
compact={false}
|
||||||
/>
|
/>
|
||||||
</VStack>
|
</VStack>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
|||||||
Reference in New Issue
Block a user