element ui el-table 表头字体加粗

  :header-cell-style="  { background: '#F0F0F1', height: '40px' ,fontSize:'18px',color:'black',fontweight:400}"

刚开始是这样写的,发现fontweight不管设置成神魔都不生效,所以这种写法是错误的

 :header-cell-style="tableHeaderColor"


methods:{
  tableHeaderColor({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0) {
        return 'background-color: #F0F0F1;color:black;font-size:18px;font-weight: 900;'
      }
      },
}

正确的写法是这样的


版权声明:本文为xiaodanda原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。