Antd Table 固定高度及超過高度時滾動

antd logo

超過高度時滾動

Table 設置 scroll.y ,y 可以是數值也可以使用 calc

<Table
  scroll={{ y: 'calc(100vh - 380px)' }}
  columns={columns}
  dataSource={data}
/>

固定高度

需要修改 CSS,min-height 設置固定高度

.ant-table-body {
  min-height: calc(100vh - 380px);
  background-color: #fff;
}
guest

0 評論
內聯回饋
查看全部評論