赞
踩
在table中添加class = "table-style"
在style里添加 样式
- .table-style /deep/ .el-table-column--selection.is-leaf .el-checkbox {
- display: none;
- }
以上可以将table中表头的勾选框隐藏!!!
在table中添加事件 @select="selectCur"。
在methods中编写事件
- selectCur(selection, row){
- console.log('selection, row',selection, row);
- this.$refs.multipleTable.clearSelection();
- if (selection.length == 0) return;
- this.$refs.multipleTable.toggleRowSelection(row, true);
- },
以上就是将table的多选改成单选!!!
前端小白,纯手搓。
如果对各位有用,请点赞,谢谢激励。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。