element表格取消全选_修改elementUI、table复选框的全选功能禁用或者隐藏(去掉全选checkBox换成汉字)...

使用header-cell-class-name 给表头单元格设置一个className用于修改样式:

ref="mulChoose"

:data="chooseList"

style="width: 100%"

:row-style="{height:'46px'}"

:cell-style="{padding:'0'}"

:header-cell-class-name="cellClass"

highlight-current-row

height="500"

tooltip-effect="dark"

@select="selectRow">

type="selection"

width="50">

判断是否是表头:

cellClass(row){

console.log(row)

if (row.columnIndex === 0) {

return 'DisableSelection'

}

},

添加样式

.el-table .DisableSelection .cell .el-checkbox__inner{

display: none;

position: relative;

}

.el-table .DisableSelection .cell:before{

content: "";

position: absolute;

// right: 11px;

}

最终实现:

粥萌_

发布了3 篇原创文章 · 获赞 0 · 访问量 33

私信

关注

标签:el,checkBox,DisableSelection,elementUI,表头,cell,全选,table,row

来源: https://blog.csdn.net/weixin_44735916/article/details/104009571


版权声明:本文为weixin_39594296原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。