zdl
|
e8c21f7863
|
refactor: DynamicNewsDetailPanel 组件优化
- 使用 useReducer 整合 7 个折叠状态为统一的 sectionState
- 提取自选股逻辑到 useWatchlist Hook,移除 70 行重复代码
- 扩展 useWatchlist 添加 handleAddToWatchlist、isInWatchlist 方法
- 清理未使用的导入(HStack、useColorModeValue)
- 移除调试 console.log 日志
- RelatedStocksSection 改用 isInWatchlist 函数替代 watchlistSet
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-12-04 13:29:59 +08:00 |
|
|
|
9a6230e51e
|
update pay ui
|
2025-12-03 13:06:23 +08:00 |
|
|
|
5042d1ee46
|
update pay ui
|
2025-12-03 12:52:27 +08:00 |
|
zdl
|
b30cbd6c62
|
RelatedStocksSection 重构为纯详细模式组件
|
2025-11-07 19:32:36 +08:00 |
|
|
|
2a122b0013
|
事件中心UI优化
|
2025-11-07 10:31:42 +08:00 |
|
|
|
67c7fa49e8
|
事件中心UI优化
|
2025-11-07 09:45:42 +08:00 |
|
zdl
|
4e7fcaad5c
|
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>
|
2025-11-05 09:54:50 +08:00 |
|
zdl
|
3b8b749eb1
|
feat: 添加相关股票模块
|
2025-11-01 12:19:47 +08:00 |
|