fix: 修复详情面板"相关股票"重复标题的问题
问题描述: - 详情面板中出现两个"相关股票"标题 - 用户反馈截图显示标题重复渲染 根本原因: - DynamicNewsDetailPanel 使用 CollapsibleSection 包裹 RelatedStocksSection - RelatedStocksSection 内部又渲染了 CollapsibleHeader - 导致双重标题渲染 解决方案: 1. RelatedStocksSection.js - 移除内部的 CollapsibleHeader 和 Collapse 组件 - 只保留纯内容部分(股票网格) - 简化组件职责:仅负责渲染股票列表 2. DynamicNewsDetailPanel.js - 移除传递给 RelatedStocksSection 的 isOpen 和 onToggle props - 折叠逻辑由外层的 CollapsibleSection 统一管理 修改文件: - RelatedStocksSection.js - 移除重复的标题和折叠逻辑 - DynamicNewsDetailPanel.js - 清理无用的 props 传递 影响范围: - 事件详情面板的"相关股票"区块 测试建议: 1. 打开事件详情面板 2. 展开"相关股票"区块 3. 确认只有一个标题 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -221,8 +221,6 @@ const DynamicNewsDetailPanel = ({ event }) => {
|
||||
quotes={quotes}
|
||||
eventTime={event.created_at}
|
||||
watchlistSet={watchlistSet}
|
||||
isOpen={true} // 内部始终展开
|
||||
onToggle={() => {}} // 空函数
|
||||
onWatchlistToggle={handleWatchlistToggle}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user