diff --git a/src/components/TradeDatePicker/index.tsx b/src/components/TradeDatePicker/index.tsx index a3df510e..65835426 100644 --- a/src/components/TradeDatePicker/index.tsx +++ b/src/components/TradeDatePicker/index.tsx @@ -31,6 +31,8 @@ export interface TradeDatePickerProps { showIcon?: boolean; /** 是否使用深色模式(强制覆盖 Chakra 颜色模式) */ isDarkMode?: boolean; + /** 是否显示最新交易日期提示,默认 true */ + showLatestTradeDateTip?: boolean; } /** @@ -50,6 +52,7 @@ const TradeDatePicker: React.FC = ({ inputWidth = { base: '100%', lg: '200px' }, showIcon = true, isDarkMode = false, + showLatestTradeDateTip = true, }) => { // 颜色主题 - 支持 isDarkMode 强制覆盖 const defaultLabelColor = useColorModeValue('purple.700', 'purple.300'); @@ -142,21 +145,21 @@ const TradeDatePicker: React.FC = ({ } : undefined} /> - {/* 最新交易日期提示 */} - {latestTradeDate && ( + {/* 最新交易日期提示 - 靠右显示,样式更低调避免误认为按钮 */} + {showLatestTradeDateTip && latestTradeDate && ( - - 最新: {latestTradeDate.toLocaleDateString('zh-CN')} + + 数据更新至 {latestTradeDate.toLocaleDateString('zh-CN')} diff --git a/src/views/Concept/index.js b/src/views/Concept/index.js index a7e61fa9..9ce1b7b5 100644 --- a/src/views/Concept/index.js +++ b/src/views/Concept/index.js @@ -1417,7 +1417,7 @@ const ConceptCenter = () => { align={{ base: 'stretch', lg: 'center' }} gap={4} > - {/* 使用通用日期选择器组件 */} + {/* 使用通用日期选择器组件 - 不显示最新日期提示,由下方单独渲染 */} { @@ -1432,9 +1432,10 @@ const ConceptCenter = () => { latestTradeDate={latestTradeDate} label="交易日期" isDarkMode={true} + showLatestTradeDateTip={false} /> - {/* 快捷按钮 - 深色主题,更有区分度 */} + {/* 快捷按钮 - 紧跟日期选择器 */} + + {/* 最新交易日期提示 - 靠右显示 */} + {latestTradeDate && ( + + + + + 数据更新至 {latestTradeDate.toLocaleDateString('zh-CN')} + + + + )} ); @@ -1752,52 +1773,55 @@ const ConceptCenter = () => { align={{ base: 'stretch', md: 'center' }} gap={4} > - - - 排序方式: - - {searchQuery && sortBy === '_score' && ( - - - - - 智能排序 - - - - )} - + {/* 排序方式 - 仅在列表视图显示 */} + {viewMode === 'list' && ( + + + 排序方式: + + {searchQuery && sortBy === '_score' && ( + + + + + 智能排序 + + + + )} + + )} - + }