el-table 设置最大高度且能刚好撑满
设置el-card属性
<div class="app-container" style="height:100%;">
<el-card style="height:100%;min-height: 600px;overflow:scroll;">
同时设置:外层高100%,el-card高100%;
补充:
<div class="app-container" style="height:100vh;min-height: 100vh;">
<el-card class="box-card" style="height:100%;min-height: 100%;">
绑定tableheight
<template>
<el-table ref="table" :height="tableHeight"
<script>
computed: {
tableHeight(){
// top:60, tab:60, btn:60, 分页:60 ;
return window.innerHeight - 60 - 10 - 60 - 60 - 80;
},
},