解决element table列错位问题

2,556 阅读1分钟

源地址:https://www.cnblogs.com/lily-sblog666/p/12915068.html

方法一

在css中设置

/deep/.el-table--border th.gutter:last-of-type {
    display: table-cell !important;
}

方法二

数据获取后执行doLayout强制渲染

setTimeout(() => {
    this.$nextTick(() => {
        this.$refs.table.doLayout()
    })
}, 300)