ant design vue <s-table>使用问题

ant design vue 中 s-table,在点编辑按钮时希望将之前勾选的数据(这个勾选的数据是从数据库中查询出来的)前面的多选框再次勾选上

具体实现效果看下图:
这是新增时图片

img

点击下图中的编辑弹出第三幅图

img

希望圈红圈的那里可以勾选上

img

应该怎么做?
有没有小伙伴提供一个类似的简单的模板借用参考一下

你只需要 把
selectedRowKeys 指定选中项的 key 数组,需要和 onChange 进行配合

把selectedRowKeys的值 赋值给 编辑里的 selectedRowKeys

https://www.antdv.com/components/table-cn#components-table-demo-row-selection

1.table中加入:row-selection="rowSelection"
2.需要在computed中定义 rowSelection()
例如:
computed: {
//保存选中
rowSelection() {
return {
// 默认绑定项
getCheckboxProps: (record) => ({
props: {
disabled: false,
name: '',
defaultChecked: this.selectedKeys&&this.selectedKeys.length>0?this.selectedKeys.includes(record.id):false,
},
}),
}
}