fix(StockChart): 图表组件使用 aspect-ratio 保持宽高比,统一弹窗大小

- KLineChartModal: 日K线图使用 aspectRatio 替代固定高度
- StockChartKLineModal: K线图高度改为响应式 min(400px, 60vh)
- TimelineChartModal: 分时图弹窗大小与日K线统一,maxWidth: 1400px

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
zdl
2025-12-15 15:19:51 +08:00
parent 4e5f999881
commit 7be35d7bb8
3 changed files with 18 additions and 7 deletions

View File

@@ -705,7 +705,7 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
</div>
)}
<div style={{ position: 'relative', height: isMobile ? '450px' : '680px', width: '100%' }}>
<div style={{ position: 'relative', width: '100%' }}>
{loading && (
<div
style={{
@@ -736,7 +736,8 @@ const KLineChartModal: React.FC<KLineChartModalProps> = ({
<span style={{ color: '#e0e0e0' }}>K线数据...</span>
</div>
)}
<div ref={chartRef} style={{ width: '100%', height: '100%' }} />
{/* 使用 aspect-ratio 保持图表宽高比K线图推荐 2.5:1 */}
<div ref={chartRef} style={{ width: '100%', aspectRatio: isMobile ? '1.8 / 1' : '2.5 / 1', minHeight: isMobile ? '280px' : '400px' }} />
</div>
</div>
</div>