Skip to content

Commit

Permalink
fix(Descriptions): 非中文不会自动换行 #707 (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr-z committed Mar 24, 2022
1 parent 443f356 commit bb6e613
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-descriptions/src/index.tsx
Expand Up @@ -84,7 +84,7 @@ function InternalDescriptions(props: DescriptionsProps, ref: React.ForwardedRef<
<div className={cls} ref={ref}>
<table {...other}>
{title && <caption className={`${prefixCls}-title`}>{title}</caption>}
<tbody>
<tbody className={`${prefixCls}-tbody`}>
{childs.map((child, index) => (
<Row key={index} prefixCls={prefixCls} bordered={bordered} colon={colon} column={column} layout={layout}>
{child}
Expand Down
3 changes: 3 additions & 0 deletions packages/react-descriptions/src/style/index.less
Expand Up @@ -20,6 +20,9 @@
font-size: 16px;
line-height: 1.5;
}
&-tbody {
word-wrap: break-word;
}
& &-row:nth-child(2n) {
background-color: transparent;
}
Expand Down

0 comments on commit bb6e613

Please sign in to comment.