思路:将height px 手动计算成rem
HTML:
<el-table class="tableBox" :data="tableData" v-loading="tableloading" stripe border ref="multipleTable" :height="tableheight">
</el-table>
JS:
mounted () {
window.onresize = () => {
return () => {
this.tableheight = this.initHeight();
};
};
},
methods: {
initHeight () {
this.$nextTick(() => {
this.tableheight = "calc(100vh - 26.25rem)";
});
},
}