feat: 纵向列表(HorizontalDynamicNewsEventCard.js:105-133) - 添加 Tooltip 提示
平铺列表(DynamicNewsEventCard.js:232) - 修改行数限制
This commit is contained in:
@@ -229,7 +229,7 @@ const DynamicNewsEventCard = ({
|
|||||||
fontWeight="semibold"
|
fontWeight="semibold"
|
||||||
color={linkColor}
|
color={linkColor}
|
||||||
lineHeight="1.4"
|
lineHeight="1.4"
|
||||||
noOfLines={2}
|
noOfLines={3}
|
||||||
_hover={{ textDecoration: 'underline' }}
|
_hover={{ textDecoration: 'underline' }}
|
||||||
>
|
>
|
||||||
{event.title}
|
{event.title}
|
||||||
|
|||||||
@@ -101,24 +101,36 @@ const HorizontalDynamicNewsEventCard = ({
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<VStack align="stretch" spacing={1.5}>
|
<VStack align="stretch" spacing={1.5}>
|
||||||
{/* 标题 - 最多两行,添加左右边距避免与横向徽章和关注按钮重叠 */}
|
{/* 标题 - 最多两行,hover 显示完整内容 */}
|
||||||
<Box
|
<Tooltip
|
||||||
cursor="pointer"
|
label={event.title}
|
||||||
onClick={(e) => onTitleClick?.(e, event)}
|
placement="top"
|
||||||
mt={1}
|
hasArrow
|
||||||
paddingRight="10px"
|
bg="gray.700"
|
||||||
|
color="white"
|
||||||
|
fontSize="sm"
|
||||||
|
p={2}
|
||||||
|
borderRadius="md"
|
||||||
|
isDisabled={event.title.length < 40}
|
||||||
>
|
>
|
||||||
<Text
|
<Box
|
||||||
fontSize="md"
|
cursor="pointer"
|
||||||
fontWeight="semibold"
|
onClick={(e) => onTitleClick?.(e, event)}
|
||||||
color={linkColor}
|
mt={1}
|
||||||
lineHeight="1.4"
|
paddingRight="10px"
|
||||||
noOfLines={2}
|
|
||||||
_hover={{ textDecoration: 'underline' }}
|
|
||||||
>
|
>
|
||||||
{event.title}
|
<Text
|
||||||
</Text>
|
fontSize="md"
|
||||||
</Box>
|
fontWeight="semibold"
|
||||||
|
color={linkColor}
|
||||||
|
lineHeight="1.4"
|
||||||
|
noOfLines={2}
|
||||||
|
_hover={{ textDecoration: 'underline' }}
|
||||||
|
>
|
||||||
|
{event.title}
|
||||||
|
</Text>
|
||||||
|
</Box>
|
||||||
|
</Tooltip>
|
||||||
|
|
||||||
{/* 第二行:涨跌幅数据 */}
|
{/* 第二行:涨跌幅数据 */}
|
||||||
<StockChangeIndicators
|
<StockChangeIndicators
|
||||||
|
|||||||
Reference in New Issue
Block a user