fix: bug#10781

This commit is contained in:
leiqiaochu 2023-03-29 21:57:36 +08:00
parent e9f84f959a
commit 922624cbc2
1 changed files with 11 additions and 1 deletions

View File

@ -25,7 +25,7 @@
:params="queryParams"
:rowSelection="{
selectedRowKeys: selectedRowKeys,
onChange: (keys:string[])=>selectedRowKeys = keys,
onSelect: changeSelect,
}"
@cancelSelect="selectedRowKeys = []"
>
@ -99,4 +99,14 @@ const confirm = () => {
});
}
};
const changeSelect = (item: any, state: boolean) => {
const arr = new Set(selectedRowKeys.value);
console.log(item,state);
if(state){
arr.add(item.id)
}else{
arr.delete(item.id)
}
selectedRowKeys.value = [...arr.values()];
};
</script>