element-ui 表格第一行或某一行样式
https://www.codeleading.com/article/85335047511/
关键点:给表格添加属性 :cell-style=“cellStyle”
cellStyle(row, column, rowIndex, columnIndex) {
console.log(row);
if (row.rowIndex === 0) {//判断条件,如果想要改变其他行样式,就写那一行的下标
return `background-color: #ecf5ff !important;fontWeight: bold;`;
}
},
还没有评论,来说两句吧...