Fix (web): Optimize text display effect #3221 (#9594)

### What problem does this PR solve?

Fix (web): Optimize text display effect
-Add text ellipsis and overflow hidden classes to the HomeCard component
to achieve text overflow hiding and ellipsis effects
-Add text ellipsis and overflow hidden classes to the DatasetSidebar
component to improve the display of dataset names

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-08-20 15:42:21 +08:00
committed by GitHub
parent c66dbbe433
commit 830cda6a3a
2 changed files with 3 additions and 3 deletions

View File

@ -31,7 +31,7 @@ export function HomeCard({ data, onClick, moreDropdown }: IProps) {
</div>
<div className="flex flex-col justify-between gap-1 flex-1 h-full w-[calc(100%-50px)]">
<section className="flex justify-between">
<div className="text-[20px] font-bold w-80% leading-5">
<div className="text-[20px] font-bold w-80% leading-5 text-ellipsis overflow-hidden">
{data.name}
</div>
{moreDropdown}

View File

@ -62,8 +62,8 @@ export function SideBar({ refreshCount }: PropType) {
name={data.name}
className="size-16"
></RAGFlowAvatar>
<div className=" text-text-secondary text-xs space-y-1">
<h3 className="text-lg font-semibold line-clamp-1 text-text-primary">
<div className=" text-text-secondary text-xs space-y-1 overflow-hidden">
<h3 className="text-lg font-semibold line-clamp-1 text-text-primary text-ellipsis overflow-hidden">
{data.name}
</h3>
<div className="flex justify-between">