Ant-Design-Vue 动态修改table行高
动态绑定<a-table:columns="columns":dataSource="data":pagination="pagination"rowKey="id":scroll="{ x: 0, y: tableStyle.state != 'small' && tableStyle.state != 'full' ?
·
动态绑定
<a-table
:columns="columns"
:dataSource="data"
:pagination="pagination"
rowKey="id"
:scroll="{ x: 0, y: tableStyle.state != 'small' && tableStyle.state != 'full' ? 181 : 0 }"
:class="{ table_info: tableStyle.state != 'full' }"
>
</a-table>
修改padding参数以减小每一行高
添加/deep/对antd的样式进行覆盖
.table_info {
&/deep/.ant-table-tbody > tr > td {
padding: 6px 16px;
overflow-wrap: break-word;
}
}
更多推荐
已为社区贡献3条内容
所有评论(0)