标签部分
<el-table :header-cell-class-name = 'this.must'>
</el-table>
函数部分
第几列加上 *
must(){
if(obj.columnIndex !=0 && obj.columnIndex !=11 && obj.columnIndex !=12 ){
return 'must'
}
}
样式部分
/deep/.el-table th.must > .cell:before{
content: '*';
color: #f56c6c
}
转载于CSDN:[原文链接](element之给table表头的添加红色星号_QWJ-JIE的博客-CSDN博客_element table 列加星号)