Element header-row-style设置多个属性


方式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>

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM