1. 在 el-table組件中添加屬性
<el-table :cell-style="changeCellStyle"> ......... </el-table>
2. 方法中: 進行相應修改
changeCellStyle (row, column, rowIndex, columnIndex) {
if(row.column.label === "列標題"){
return 'color: blue' // 修改的樣式
}else{
return ''
}
}
