当前位置:网站首页>el-table单选并隐藏全选框
el-table单选并隐藏全选框
2022-07-04 09:32:00 【喵酱睡着了】
<el-table
@selection-change="handleSelectionChange"
ref="tableRef"
:header-cell-class-name="cellClass"
>
单选功能:
handleSelectionChange(selection) {
if (selection.length > 1) {
this.$refs.tableRef.clearSelection();
this.$refs.tableRef.toggleRowSelection(selection.pop());
}
},
隐藏全选框:
cellClass(row){
if (row.columnIndex === 0 && row.rowIndex === 0) {
return 'disableheadselection'
}
}
<style lang="scss" scoped>
/deep/ .disableheadselection > .cell .el-checkbox__inner {
display: none;
}
<style>
如下图:每次只能勾选一个,不能全选。
边栏推荐
- UML sequence diagram [easy to understand]
- Lauchpad X | 模式
- Awk from entry to earth (18) GAW K line manual
- MySQL transaction mvcc principle
- How to display √ 2 on the command line terminal ̅? This is actually a blog's Unicode test article
- Explanation of closures in golang
- 2022-2028 global protein confectionery industry research and trend analysis report
- Launchpad x | mode
- Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]
- Daughter love: frequency spectrum analysis of a piece of music
猜你喜欢
MySQL foundation 02 - installing MySQL in non docker version
2022-2028 global probiotics industry research and trend analysis report
C语言-入门-基础-语法-[变量,常亮,作用域](五)
2022-2028 global edible probiotic raw material industry research and trend analysis report
2022-2028 global seeder industry research and trend analysis report
Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310
HMS core helps baby bus show high-quality children's digital content to global developers
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
ArrayBuffer
You can see the employment prospects of PMP project management
随机推荐
《网络是怎么样连接的》读书笔记 - 集线器、路由器和路由器(三)
In depth research and investment strategy report on China's hydraulic parts industry (2022 Edition)
The child container margin top acts on the parent container
《网络是怎么样连接的》读书笔记 - WEB服务端请求和响应(四)
The old-fashioned synchronized lock optimization will make it clear to you at once!
C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)
Rules for using init in golang
C语言-入门-基础-语法-数据类型(四)
There are 100 people eating 100 apples, one adult eating 4 apples, and four children eating 1 apple. How can they eat exactly 100 apples? Use any high-level language you are familiar with
Simulate EF dbcontext with MOQ - mocking EF dbcontext with MOQ
Summary of the most comprehensive CTF web question ideas (updating)
PMP registration process and precautions
Service call feign of "micro service"
Function comparison between cs5261 and ag9310 demoboard test board | cost advantage of cs5261 replacing ange ag9310
Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)
Some points needing attention in PMP learning
Ultimate bug finding method - two points
Write a jison parser from scratch (1/10):jison, not JSON
[untitled] forwarding least square method
Tkinter Huarong Road 4x4 tutorial II