在Antd中有一种方法可以将表格单元格中的文本显示为多行。
我尝试将</br>
,\ n,\ r放入文本中。
是否有人已经找到办法做到这一点?
答案 0 :(得分:2)
Finally here is my solution.
The text for each column contains an \n when there is necessary to have a new line.
After into the table definition I put the style whiteSpace: 'pre':
<Table style={{ whiteSpace: 'pre'}} columns={columns} dataSource={data} title={title} .../>
Thats seems to work as expected.