element table 动态设置表头className
在 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

浙公网安备 33010602011771号