改變vxe-table或element-ui 表格第一行或某一行樣式
阿新 • • 發佈:2020-12-13
關鍵點:給表格新增屬性 :cell-style=“cellStyle”
cellStyle(row, column, rowIndex, columnIndex) {
// console.log(row, column, rowIndex, columnIndex);
if (row.seq == '1') {//判斷條件,如果想要改變其他行樣式,就寫那一行的下標
return `background-color: #ffe5bb !important;fontSize: 16px; color: #777777`;
} else {
return `fontSize: 16px; color: #777777`;
}
},