方式1:

    直接在标签上添加上属性值:

<el-table
    :header-cell-style="{background:'#F3F4F7',color:'#555'}"
></el-table>

 

方式2:

    在method里面写上方法:

rowClass({ row, rowIndex}) {
    console.log(rowIndex) //表头行下标
    return 'background:#F3F4F7;color:#555' 
}

    然后在el-table标签中使用方法:

<el-table :header-cell-style="rowClass"></el-table>

 

相关文章:

  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
猜你喜欢
  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-11
  • 2023-01-29
  • 2021-11-19
  • 2021-11-30
相关资源
相似解决方案