html:
<ant-table
ref="table"
row-key="id"
:columns="columns"
:loading="loading"
show-select
:select-config="onSelectConfig"
/>
javascript:
computed:{
onSelectConfig(){
return {
onSelect:this.onSelect
}
}
},
// 取消或选中的回调
onselect(record,selscted){
if(selscted){
this.subkeys.push(record.eventcode)
}else {
this.subKeys = this.subkeys.filter(item =>item !== record.eventCode)
}
},