一、 ui表现
修复前
修复后
二、未生效方案
样式覆盖
/deep/.el-table--border th.gutter:last-of-type {
display: table-cell !important;
}
重新渲染
//拿到数据请求结果后,重新渲染
this.$nextTick(() => {
this.$refs.table.doLayout()
})
三、生效方案
//拿到数据请求结果后
this.$nextTick(() => {
setTimeout(() => {
document.querySelector('.el-table__header colgroup col:last-child').width =
Number(document.querySelector('.el-table__header colgroup col:last-child').width) + 15
document.querySelector('.el-table__fixed-body-wrapper tr:last-child td').style.padding = '15px 0'
}, 1000)
})