第一种:更改样式,直接不显示,就不涉及其他操作了
.table_header .el-checkbox{//找到表头那一行,然后把里面的复选框隐藏掉
display:none !important
}
第二种:可以点击操作,把选中状态清除
<!-- 绑定事件 -->
@select-all="selectAll"
selectAll() {
this.$refs.refTable.clearSelection() //用于多选表格,清空用户的选择
},

.table_header .el-checkbox{//找到表头那一行,然后把里面的复选框隐藏掉
display:none !important
}
<!-- 绑定事件 -->
@select-all="selectAll"
selectAll() {
this.$refs.refTable.clearSelection() //用于多选表格,清空用户的选择
},
本文标题:element UI 表格禁止全选功能
本文链接:https://www.haomeiwen.com/subject/dftphktx.html
网友评论