el-table动态表头,表头不能填满

  .el-table th.gutter{
    display: table-cell !important;
}

 

 如果上面不行,获取数据时

getList().then(res=>{
    this.list=res.data.rows;
    this.$nextTick(()=>{
        this.$refs.table.doLayout();
        //给table加一个ref
    })
})

 

https://blog.csdn.net/weixin_38779534/article/details/103237918

posted @ 2021-05-11 15:28  ThisCall  阅读(441)  评论(0编辑  收藏  举报