样式:
/* 表格 */
/*.table 为全局表格自定义样式*/
.table .ant-table-body,.table .ant-table-header{
overflow-y: auto !important;
}
html代码:
<a-table class="table" :scroll="{ y: 550 }"></a-table>
这篇博客介绍了如何使用 CSS 对 Ant Design 的表格组件 `.ant-table` 进行样式定制,特别是设置 `overflow-y: auto!important;` 实现 Y 轴滚动效果。示例代码展示了在 HTML 中应用这些样式到 `<a-table>` 元素上,设置了滚动高度为 550 像素。
样式:
/* 表格 */
/*.table 为全局表格自定义样式*/
.table .ant-table-body,.table .ant-table-header{
overflow-y: auto !important;
}
html代码:
<a-table class="table" :scroll="{ y: 550 }"></a-table>

被折叠的 条评论
为什么被折叠?