element-ui 设置table 单元格某一列className

在 el-table 上添加 :cell-class-name="cellClassName"

 

 cellClassName({row, column, rowIndex, columnIndex}){
            if(columnIndex === 5){
                return 'custom-style'
            }
        },

 

设置第五列样式

 

posted @ 2023-08-03 10:55  龙卷风吹毁停车场  阅读(770)  评论(0)    收藏  举报