浏览器缩放或者拖动表格Y轴滚动条时,表头和内容列发生错位
通过css样式解决
.el-table {
display: table-cell!important;
}
调用elment-ui官方提供的一个方法
在刷新列表后使用
getList().then(res=>{
this.list=res.data.rows;
this.$nextTick(()=>{
this.$refs.table.doLayout();
//给table加一个ref
})
})
浏览器缩放或者拖动表格Y轴滚动条时,表头和内容列发生错位
.el-table {
display: table-cell!important;
}
在刷新列表后使用
getList().then(res=>{
this.list=res.data.rows;
this.$nextTick(()=>{
this.$refs.table.doLayout();
//给table加一个ref
})
})