在 el-table 上添加 :header-cell-class-name="HeaderCellClassName"
HeaderCellClassName({ row, column, rowIndex, columnIndex }) { if (columnIndex === 0) { return 'custom-style' } if (columnIndex === 3) { return 'box-style' } },
就会在表头索引为0和3上添加对应的class
标签:style,return,HeaderCellClassName,表头,element,className,columnIndex,table From: https://www.cnblogs.com/tlfe/p/17225809.html