<avue-crud
row-key="id"
reserve-selection
@selection-change="selectionChange" >
</avue-crud>
data(){
return{
maxSelectionCount: 10, // 设定最大勾选条数
}
},
//选中的数据 list是全部的数据,数组,
// 拿取数据的唯一id并赋值,批量删除使用
selectionChange (list) {
this.selectionList = list
this.minNumber = list.length
if (list.length > this.maxSelectionCount) {
const newVal = list.pop()
this.$refs.crud.toggleRowSelection(newVal, false);
}
},
标签:表格,勾选,maxSelectionCount,list,newVal,length,数据,avue
From: https://blog.csdn.net/m0_64707449/article/details/137490689