fix: the content in the chunk card will overflow #1628 (#1629)

### What problem does this PR solve?
fix: the content in the chunk card will overflow #1628
### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
balibabu 2024-07-22 13:54:07 +08:00 committed by GitHub
parent a4d230f12b
commit eb42adc818
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -17,6 +17,9 @@
.contentEllipsis { .contentEllipsis {
.multipleLineEllipsis(3); .multipleLineEllipsis(3);
} }
.contentText {
word-break: break-all;
}
.chunkCard { .chunkCard {
width: 100%; width: 100%;

View File

@ -81,7 +81,7 @@ const ChunkCard = ({
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(item.content_with_weight), __html: DOMPurify.sanitize(item.content_with_weight),
}} }}
className={classNames({ className={classNames(styles.contentText, {
[styles.contentEllipsis]: textMode === ChunkTextMode.Ellipse, [styles.contentEllipsis]: textMode === ChunkTextMode.Ellipse,
})} })}
></div> ></div>