【问题标题】:Show Ant Design Table's data Vertically垂直显示 Ant Design Table 的数据
【发布时间】:2022-07-07 18:28:41
【问题描述】:

我正在尝试使用 React JS 中的 Ant Design 创建一个表。其中行设置表标题而不是列。换句话说,我正在尝试转置默认表。

默认情况下,ant-design 表显示如下:

 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 

欢迎任何指导!

【问题讨论】:

标签: reactjs datatables antd ant-design-pro


【解决方案1】:

我不认为 antd 提供了一个 api 来转置表格。但是如果你的表很简单,又不想要排序、过滤等功能,那么你可以看看 antd Description https://ant.design/components/descriptions/

【讨论】:

    猜你喜欢
    • 2019-08-22
    • 1970-01-01
    • 1970-01-01
    • 2018-08-30
    • 2020-12-04
    • 2022-01-22
    • 2020-11-14
    • 1970-01-01
    • 2021-05-04
    相关资源
    最近更新 更多