当前位置:网站首页>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>
如下图:每次只能勾选一个,不能全选。
边栏推荐
- Awk from getting started to digging in (4) user defined variables
- 老掉牙的 synchronized 锁优化,一次给你讲清楚!
- Langage C - démarrer - base - syntaxe - [opérateur, conversion de type] (vi)
- What is uid? What is auth? What is a verifier?
- Global and Chinese trisodium bicarbonate operation mode and future development forecast report Ⓢ 2022 ~ 2027
- Investment analysis and prospect prediction report of global and Chinese high purity tin oxide Market Ⓞ 2022 ~ 2027
- Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]
- Talk about single case mode
- Global and Chinese markets of water heaters in Saudi Arabia 2022-2028: Research Report on technology, participants, trends, market size and share
- 什么是权限?什么是角色?什么是用户?
猜你喜欢

Sword finger offer 30 contains the stack of Min function

Ultimate bug finding method - two points
![C language - Introduction - Foundation - syntax - [main function, header file] (II)](/img/5a/c6a3c5cd8038d17c5b0ead2ad52764.png)
C language - Introduction - Foundation - syntax - [main function, header file] (II)

2022-2028 global tensile strain sensor industry research and trend analysis report

2022-2028 global probiotics industry research and trend analysis report

2022-2028 global gasket metal plate heat exchanger industry research and trend analysis report

2022-2028 global visual quality analyzer industry research and trend analysis report

2022-2028 global elastic strain sensor industry research and trend analysis report

Nurse level JDEC addition, deletion, modification and inspection exercise

How should PMP learning ideas be realized?
随机推荐
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
Write a jison parser from scratch (2/10): learn the correct posture of the parser generator parser generator
Reading notes of how the network is connected - understanding the basic concepts of the network (I)
Research Report on research and investment prospects of China's testing machine industry (2022 Edition)
Global and Chinese market of planar waveguide optical splitter 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese PCB function test scale analysis and development prospect planning report Ⓑ 2022 ~ 2027
At the age of 30, I changed to Hongmeng with a high salary because I did these three things
UML sequence diagram [easy to understand]
20220701 barbarat lemma proof
C语言-入门-基础-语法-[标识符,关键字,分号,空格,注释,输入和输出](三)
Opencv environment construction (I)
Fatal error in golang: concurrent map writes
"How to connect the network" reading notes - Web server request and response (4)
Dynamic analysis and development prospect prediction report of high purity manganese dioxide in the world and China Ⓡ 2022 ~ 2027
如何编写单元测试用例
2022-2028 research and trend analysis report on the global edible essence industry
Solve the problem of "Chinese garbled MySQL fields"
The old-fashioned synchronized lock optimization will make it clear to you at once!
Awk from entry to earth (14) awk output redirection
Flutter 小技巧之 ListView 和 PageView 的各種花式嵌套