1.一开始有数据可以通过css样式解决
这边是全局样式哦
body .el-table th.gutter{
display: table-cell !important;
}
body .el-table colgroup.gutter{
display: table-cell !important;
}
2.一开始没数据有底部左右滚动条后通过JS解决
重新渲染表格
getList().then(res=>{
this.list=res.data.rows;
this.$nextTick(()=>{
this.$refs.table.doLayout();
//给table加一个ref
})
})