ant-design-vue
ant-design-vue copied to clipboard
高度适配问题
- [x] I have searched the issues of this repository and believe that this is not a duplicate.
Version
4.2.6
Environment
win11
Reproduction link
https://codepen.io/sweetwisdom/pen/azNzOxr
Steps to reproduce
能不能像el-table那样 自动适配高度(flex),我尝试了:scroll="{y:'calc( 100% )'}"和 :scroll="{y:'max-content'}",都不行
如下图:
What is expected?
如上文
What is actually happening?
如上文
感觉你这个和适配高度没啥关联,设置header吸顶就好了
我尝试使用css 解决了这个问题:
.ant-table-wrapper,
.ant-spin-container,
.ant-spin-nested-loading,
.ant-table {
height: 100%;
}
.ant-table-container {
height: 100%;
display: flex;
flex-direction: column;
}
.ant-table-body {
flex: 1;
}
参考:demo