当前位置:网站首页>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>
如下图:每次只能勾选一个,不能全选。
边栏推荐
- 2022-2028 global small batch batch batch furnace industry research and trend analysis report
- Report on research and investment prospects of polyglycolic acid industry in China (2022 Edition)
- Global and Chinese market of planar waveguide optical splitter 2022-2028: Research Report on technology, participants, trends, market size and share
- Development trend and market demand analysis report of high purity tin chloride in the world and China Ⓔ 2022 ~ 2027
- What is permission? What is a role? What are users?
- Global and Chinese market of wheel hubs 2022-2028: Research Report on technology, participants, trends, market size and share
- 《网络是怎么样连接的》读书笔记 - FTTH
- Opencv environment construction (I)
- A subclass must use the super keyword to call the methods of its parent class
- Launchpad x | mode
猜你喜欢

2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
![C language - Introduction - Foundation - syntax - [operators, type conversion] (6)](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C language - Introduction - Foundation - syntax - [operators, type conversion] (6)
](/img/3f/4d8f4c77d9fde5dd3f53ef890ecfa8.png)
C语言-入门-基础-语法-[运算符,类型转换](六)

Some points needing attention in PMP learning

【LeetCode 42】501. Mode in binary search tree

2022-2028 global small batch batch batch furnace industry research and trend analysis report

Daughter love: frequency spectrum analysis of a piece of music

Solve the problem of "Chinese garbled MySQL fields"

ArrayBuffer

How to ensure the uniqueness of ID in distributed environment
随机推荐
Mac platform forgets the root password of MySQL
Report on research and investment prospect prediction of China's electronic grade sulfuric acid industry (2022 Edition)
Ultimate bug finding method - two points
Flutter 小技巧之 ListView 和 PageView 的各種花式嵌套
[untitled] forwarding least square method
2022-2028 global industry research and trend analysis report on anterior segment and fundus OTC detectors
Investment analysis and future production and marketing demand forecast report of China's paper industry Ⓥ 2022 ~ 2028
[on February 11, 2022, the latest and most fully available script library collection of the whole network, a total of 23]
Dynamic analysis and development prospect prediction report of high purity manganese dioxide in the world and China Ⓡ 2022 ~ 2027
Summary of the most comprehensive CTF web question ideas (updating)
Implementation principle of redis string and sorted set
Global and Chinese market of wheel hubs 2022-2028: Research Report on technology, participants, trends, market size and share
保姆级JDEC增删改查练习
Global and Chinese trisodium bicarbonate operation mode and future development forecast report Ⓢ 2022 ~ 2027
什么是uid?什么是Auth?什么是验证器?
2022-2028 global gasket plate heat exchanger industry research and trend analysis report
2022-2028 global special starch industry research and trend analysis report
Explanation of closures in golang
AMLOGIC gsensor debugging
C语言-入门-基础-语法-数据类型(四)