网站如果实现微信支付,江西省城乡建设网站,做一个商城网站需要多少钱,网站建设_聊城如果是单选那么全新的按钮应该隐藏或者不可编辑的状态。但是我没找到改变成不可编辑的方法#xff0c;只能采取隐藏
template!-- 注意要包一层div根元素#xff0c;否则css样式可能会不生效#xff0c;原因不详 --divel-table refproTab…如果是单选那么全新的按钮应该隐藏或者不可编辑的状态。但是我没找到改变成不可编辑的方法只能采取隐藏
template!-- 注意要包一层div根元素否则css样式可能会不生效原因不详 --divel-table refproTable classtable_wrapper:datatableData selectselectClickel-table-column typeselection width55 /el-table-column propname label名称 //el-table/div
/templatescript setup langts
import { ref, reactive, toRefs } from vue
const taskTableRef ref(); // 表格ref// 变量定义
const state reactive({tableData: [{name: 啦啦啦},{name: 嘻嘻嘻},{name: 哈哈哈}],
});
const selectClick (selection: any, row: any) {if (selection.length 1) {let del_row selection.shift();proTable.value.toggleRowSelection(del_row, false); // 用于多选表格切换某一行的选中状态如果使用了第二个参数则是设置这一行选中与否selected 为 true 则选中}console.log(勾选的是数组,selection)
}
style langscss
// 隐藏全选按钮。注意这里我没有加scoped
.table_wrapper th.el-table__cell:nth-child(1) .cell{visibility: hidden;
}
/style