如何在 Antd 中更改字体大小 table
How to change the fontSize in an Antd table
我尝试更改fontSize
,但没有生效:
<Table
style={{overflow: 'hidden', width: '100%', fontSize: '10px'}}
dataSource={data.dataSource}
columns={columns}
size='small'
bordered
pagination={false}
/>
我的 table 也不适合这个街区。仅显示 3 列,其余列消失。如何解决?
这是 您可以使用 sass 或 less.
.booking_information_table {
:global {
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td {
fontSize: '10px';
}
}
其次,您可以使用 Table 的 scroll 属性 并删除 溢出:隐藏
your-stylesheet.scss:
.ant-table table {
font-size: 10px; }
我尝试更改fontSize
,但没有生效:
<Table
style={{overflow: 'hidden', width: '100%', fontSize: '10px'}}
dataSource={data.dataSource}
columns={columns}
size='small'
bordered
pagination={false}
/>
我的 table 也不适合这个街区。仅显示 3 列,其余列消失。如何解决?
这是
.booking_information_table {
:global {
.ant-table-thead > tr > th,
.ant-table-tbody > tr > td {
fontSize: '10px';
}
}
其次,您可以使用 Table 的 scroll 属性 并删除 溢出:隐藏
your-stylesheet.scss:
.ant-table table { font-size: 10px; }