<el-table :header-cell-style="tableHeaderColor"></el-table> // 更改表頭樣式 tableHeaderColor ({ row, column, rowIndex, columnIndex }) { if (rowIndex === 0) { return 'background-color: #373F52;color: white;font-weight: 700;' } }
// 給el-table設置高度,可以固定表頭 例如: height="200"
// 修改table的行高 :row-style="{height:0+'px'}" :cell-style="{padding:0+'px'}