fix: 优化加载状态和布局
MarketDataView: - 移除重复的 LoadingState,改用 KLineModule 内部骨架屏 - 修复点击股票行情后数据不显示的问题 FinancialPanorama: - 移除表格右上角"显示 6 期"标签 - 优化 loadingTab 状态处理 SubTabContainer: - 重构布局:Tab 区域可滚动,右侧元素固定 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,6 @@ import {
|
||||
UnusualPanel,
|
||||
PledgePanel,
|
||||
} from './components/panels';
|
||||
import LoadingState from '../LoadingState';
|
||||
import type { MarketDataViewProps } from './types';
|
||||
|
||||
/**
|
||||
@@ -61,7 +60,6 @@ const MarketDataView: React.FC<MarketDataViewProps> = ({ stockCode: propStockCod
|
||||
minuteData,
|
||||
minuteLoading,
|
||||
analysisMap,
|
||||
refetch,
|
||||
loadMinuteData,
|
||||
loadDataByType,
|
||||
} = useMarketData(stockCode, selectedPeriod);
|
||||
@@ -133,41 +131,29 @@ const MarketDataView: React.FC<MarketDataViewProps> = ({ stockCode: propStockCod
|
||||
{summary && <StockSummaryCard summary={summary} theme={theme} />}
|
||||
|
||||
{/* 交易数据 - 日K/分钟K线(独立显示在 Tab 上方) */}
|
||||
{!loading && (
|
||||
<TradeDataPanel
|
||||
theme={theme}
|
||||
tradeData={tradeData}
|
||||
minuteData={minuteData}
|
||||
minuteLoading={minuteLoading}
|
||||
analysisMap={analysisMap}
|
||||
onLoadMinuteData={loadMinuteData}
|
||||
onChartClick={handleChartClick}
|
||||
selectedPeriod={selectedPeriod}
|
||||
onPeriodChange={setSelectedPeriod}
|
||||
stockCode={stockCode}
|
||||
/>
|
||||
)}
|
||||
<TradeDataPanel
|
||||
theme={theme}
|
||||
tradeData={tradeData}
|
||||
minuteData={minuteData}
|
||||
minuteLoading={minuteLoading}
|
||||
analysisMap={analysisMap}
|
||||
onLoadMinuteData={loadMinuteData}
|
||||
onChartClick={handleChartClick}
|
||||
selectedPeriod={selectedPeriod}
|
||||
onPeriodChange={setSelectedPeriod}
|
||||
stockCode={stockCode}
|
||||
loading={loading}
|
||||
/>
|
||||
|
||||
{/* 主要内容区域 - Tab */}
|
||||
{loading ? (
|
||||
<Box
|
||||
bg="gray.900"
|
||||
border="1px solid"
|
||||
borderColor="rgba(212, 175, 55, 0.3)"
|
||||
borderRadius="xl"
|
||||
>
|
||||
<LoadingState message="数据加载中..." height="400px" />
|
||||
</Box>
|
||||
) : (
|
||||
<SubTabContainer
|
||||
tabs={tabConfigs}
|
||||
componentProps={componentProps}
|
||||
themePreset="blackGold"
|
||||
index={activeTab}
|
||||
onTabChange={handleTabChange}
|
||||
isLazy
|
||||
/>
|
||||
)}
|
||||
<SubTabContainer
|
||||
tabs={tabConfigs}
|
||||
componentProps={componentProps}
|
||||
themePreset="blackGold"
|
||||
index={activeTab}
|
||||
onTabChange={handleTabChange}
|
||||
isLazy
|
||||
/>
|
||||
</VStack>
|
||||
</Container>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user