feat: 优化股票卡片显示

d670b0a feat: 历史股票增加相关度数据
     02c03ab feat: 修改列表默认状态
     8bdc2aa feat: 处理mock数据
This commit is contained in:
zdl
2025-11-07 20:04:54 +08:00
parent 4860cac3ca
commit f01eff6eb7

View File

@@ -126,7 +126,7 @@ const StockListItem = ({
>
{/* 单行紧凑布局:名称+涨跌幅 | 分时图 | K线图 | 关联描述 */}
<HStack spacing={3} align="stretch">
{/* 左侧:股票名称 + 涨跌幅(垂直排列) - 收窄 */}
{/* 左侧:股票代码 + 名称 + 涨跌幅(垂直排列) - 收窄 */}
<VStack
align="stretch"
spacing={1}
@@ -143,10 +143,21 @@ const StockListItem = ({
color="white"
fontSize="xs"
>
<VStack spacing={0} align="stretch">
<Text
fontSize="xs"
color={codeColor}
noOfLines={1}
cursor="pointer"
onClick={handleViewDetail}
_hover={{ textDecoration: 'underline' }}
>
{stock.stock_code}
</Text>
<Text
fontSize="sm"
fontWeight="bold"
color={codeColor}
color={nameColor}
noOfLines={1}
cursor="pointer"
onClick={handleViewDetail}
@@ -154,6 +165,7 @@ const StockListItem = ({
>
{stock.stock_name}
</Text>
</VStack>
</Tooltip>
<HStack spacing={1} align="center">
<Text
@@ -180,6 +192,8 @@ const StockListItem = ({
{/* 分时图 - 固定宽度 */}
<Box
w="160px"
maxH="50px"
h="auto"
borderWidth="1px"
borderColor={useColorModeValue('blue.100', 'blue.700')}
borderRadius="md"
@@ -191,6 +205,7 @@ const StockListItem = ({
}}
cursor="pointer"
flexShrink={0}
alignSelf="center"
_hover={{
borderColor: useColorModeValue('blue.300', 'blue.500'),
boxShadow: 'sm'
@@ -214,6 +229,8 @@ const StockListItem = ({
{/* K线图 - 固定宽度 */}
<Box
w="160px"
maxH="50px"
h="auto"
borderWidth="1px"
borderColor={useColorModeValue('purple.100', 'purple.700')}
borderRadius="md"
@@ -225,6 +242,7 @@ const StockListItem = ({
}}
cursor="pointer"
flexShrink={0}
alignSelf="center"
_hover={{
borderColor: useColorModeValue('purple.300', 'purple.500'),
boxShadow: 'sm'