当前位置:网站首页>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>
如下图:每次只能勾选一个,不能全选。
边栏推荐
- At the age of 30, I changed to Hongmeng with a high salary because I did these three things
- [untitled] forwarding least square method
- Sword finger offer 30 contains the stack of Min function
- Problems encountered by scan, scanf and scanln in golang
- Solve the problem of "Chinese garbled MySQL fields"
- If you can quickly generate a dictionary from two lists
- 【LeetCode 42】501. Mode in binary search tree
- Awk from entry to earth (15) awk executes external commands
- Global and Chinese market of sampler 2022-2028: Research Report on technology, participants, trends, market size and share
- Multilingual Wikipedia website source code development part II
猜你喜欢

Sword finger offer 30 contains the stack of Min function

2022-2028 global special starch industry research and trend analysis report

Implementation principle of redis string and sorted set
![Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]](/img/3f/a71b56a62d2a0d64749a6af05384f5.jpg)
Reload CUDA and cudnn (for tensorflow and pytorch) [personal sorting summary]

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

2022-2028 research and trend analysis report on the global edible essence industry

2022-2028 global edible probiotic raw material industry research and trend analysis report

2022-2028 global intelligent interactive tablet industry research and trend analysis report

Daughter love: frequency spectrum analysis of a piece of music

ArrayBuffer
随机推荐
How to ensure the uniqueness of ID in distributed environment
Flutter 小技巧之 ListView 和 PageView 的各種花式嵌套
Dede plug-in (multi-function integration)
2022-2028 global edible probiotic raw material industry research and trend analysis report
Target detection -- intensive reading of yolov3 paper
Explain TCP protocol in detail three handshakes and four waves
How to display √ 2 on the command line terminal ̅? This is actually a blog's Unicode test article
2022-2028 global visual quality analyzer industry research and trend analysis report
Global and Chinese markets of water heaters in Saudi Arabia 2022-2028: Research Report on technology, participants, trends, market size and share
Awk from entry to earth (15) awk executes external commands
How does idea withdraw code from remote push
【LeetCode 42】501. Mode in binary search tree
C language - Introduction - Foundation - syntax - [identifier, keyword, semicolon, space, comment, input and output] (III)
Explanation of for loop in golang
Development trend and market demand analysis report of high purity tin chloride in the world and China Ⓔ 2022 ~ 2027
2022-2028 research and trend analysis report on the global edible essence industry
Four common methods of copying object attributes (summarize the highest efficiency)
Research Report on research and investment prospects of China's testing machine industry (2022 Edition)
2022-2028 global seeder industry research and trend analysis report
2022-2028 global tensile strain sensor industry research and trend analysis report