瀏覽代碼

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)
tags/v0.9.0
balibabu 1 年之前
父節點
當前提交
eb42adc818
沒有連結到貢獻者的電子郵件帳戶。

+ 3
- 0
web/src/pages/add-knowledge/components/knowledge-chunk/components/chunk-card/index.less 查看文件

.contentEllipsis { .contentEllipsis {
.multipleLineEllipsis(3); .multipleLineEllipsis(3);
} }
.contentText {
word-break: break-all;
}


.chunkCard { .chunkCard {
width: 100%; width: 100%;

+ 1
- 1
web/src/pages/add-knowledge/components/knowledge-chunk/components/chunk-card/index.tsx 查看文件

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>

Loading…
取消
儲存