feat: 股票涨跌幅指标组件

This commit is contained in:
zdl
2025-11-05 16:49:04 +08:00
parent ca52d3bd87
commit 4c08ef57ff

View File

@@ -95,7 +95,6 @@ const StockChangeIndicators = ({
flexDirection={isLarge ? "column" : "row"}
alignItems={isLarge ? "flex-start" : "center"}
gap={isLarge ? 2 : 1}
flex="1"
maxW={isLarge ? "200px" : "none"}
>
{/* Large 模式:标签单独一行 */}
@@ -118,7 +117,7 @@ const StockChangeIndicators = ({
{/* 数字 */}
<Text
fontSize={isLarge ? "2xl" : "xs"}
fontSize={isLarge ? "2xl" : "lg"}
fontWeight="bold"
color={numberColor}
lineHeight="1.2"
@@ -126,7 +125,7 @@ const StockChangeIndicators = ({
>
{/* Default 模式:标签和数字在同一行 */}
{!isLarge && (
<Text as="span" color={labelColor} fontWeight="medium" fontSize="xs">
<Text as="span" color={labelColor} fontWeight="medium" fontSize="sm">
{label}
</Text>
)}
@@ -143,7 +142,7 @@ const StockChangeIndicators = ({
}
return (
<Flex width="100%" justify="space-between" align="center" gap={isLarge ? 4 : 1}>
<Flex width="fit-content" justify="flex-start" align="center" gap={isLarge ? 4 : 1}>
{renderIndicator('平均涨幅', avgChange)}
{renderIndicator('最大涨幅', maxChange)}
{renderIndicator('周涨幅', weekChange)}