elementui table组建的表格把横向滚动条固定在屏幕最下方显示
在table标签加上:height=“tableMaxHeight”
<el-table
v-loading="listLoading"
:data="listData"
highlight-current-row
default-expand-all
element-loading-text="正在加载数据"
border
size="mini"
style="width: 100%;"
:row-class-name="tableRowClassName"
@current-change="handleCurrentChange"
:height="tableMaxHeight"
>
然后计算:height="tableMaxHeight"的高度
computed: {
tableMaxHeight() {
return window.innerHeight - 170 + 'px';
}
},
监控tableMaxHeight的值
图片示例: