Skip to content

Commit bb6e613

Browse files
authoredMar 24, 2022
fix(Descriptions): 非中文不会自动换行 #707 (#710)
1 parent 443f356 commit bb6e613

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎packages/react-descriptions/src/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function InternalDescriptions(props: DescriptionsProps, ref: React.ForwardedRef<
8484
<div className={cls} ref={ref}>
8585
<table {...other}>
8686
{title && <caption className={`${prefixCls}-title`}>{title}</caption>}
87-
<tbody>
87+
<tbody className={`${prefixCls}-tbody`}>
8888
{childs.map((child, index) => (
8989
<Row key={index} prefixCls={prefixCls} bordered={bordered} colon={colon} column={column} layout={layout}>
9090
{child}

‎packages/react-descriptions/src/style/index.less

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
font-size: 16px;
2121
line-height: 1.5;
2222
}
23+
&-tbody {
24+
word-wrap: break-word;
25+
}
2326
& &-row:nth-child(2n) {
2427
background-color: transparent;
2528
}

0 commit comments

Comments
 (0)
Please sign in to comment.