</template>
<el-table :data="userList" border style="width: 100%" :height="tabHeight">
</el-table>
</template>
<script>
export default {
computed: {
// 表格高度
tabHeight() {
//220 除去表格页面上剩余dom的高度,根据自己的页面进行调节
let height=window.innerHeight - 220 + 'px';
return height;
}
},
};
</script>