element ui 去除表头全选框
![](https://img2022.cnblogs.com/blog/1898933/202205/1898933-20220525150552094-1964080230.png)
方法
cellClass(row) {
if (row.rowIndex === 0) {
return 'disabledCheck'
}
},
css
<style scoped>
/* 关闭表头全选按钮 */
::v-deep .el-table .disabledCheck .cell .el-checkbox__inner {
display: none;
}
::v-deep .el-table .disabledCheck .cell::before {
content: '';
text-align: center;
line-height: 37px;
}
</style>