垂直显示蚂蚁设计表
我正在尝试使用React JS中的ANT设计创建表。排在其中设置表标题而不是列的地方。换句话说,我正在尝试转移默认表。
默认情况下显示了这样的蚂蚁设计表:
First Name | Last Name | Date of Birth | Address
----------------------------------------------------
Fred | Smith | 1/1/1980 | 123 Main St
----------------------------------------------------
James | Williams | 6/30/1985 | 456 Main St
但是,我想对表进行转换,因此看起来如下:
First Name | Fred | James
-------------------------------------------
Last Name | Smith | Williams
-------------------------------------------
Date of Birth | 1/1/1980 | 6/30/185
-------------------------------------------
Address | 123 Main St | 456 Main St
欢迎任何指导!
I'm trying to create a table using the Ant Design in React JS. where the rows set the table titles rather than the columns. In other words, I'm trying to transpose the default table.
by default ant-design tables are shown like this:
First Name | Last Name | Date of Birth | Address
----------------------------------------------------
Fred | Smith | 1/1/1980 | 123 Main St
----------------------------------------------------
James | Williams | 6/30/1985 | 456 Main St
But instead, I'd like to transpose the table so it looks as follows:
First Name | Fred | James
-------------------------------------------
Last Name | Smith | Williams
-------------------------------------------
Date of Birth | 1/1/1980 | 6/30/185
-------------------------------------------
Address | 123 Main St | 456 Main St
Any guidance is welcomed!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为ANTD不提供API来转移桌子。但是,如果您的表很简单,并且您不需要排序,过滤.. etc等功能,那么您可以查看antd Description https://ant.design/components/descriptions/ 或您可以使用list https://ant.design/components/list/#header
I don't think antd provide an api to transpose the table. But if your table is simple and you don't want features like sorting, filtering..etc, then you can take a look at antd Description https://ant.design/components/descriptions/ or you can use List https://ant.design/components/list/#header
可能是您可以使用
< descriptions> </descriptions>
。官方文档链接是: descriptions组件May be you can use
<Descriptions> </Descriptions>
. Offical document link is: Descriptions Component