在使用 ant design 的表格时候使用默认选中项, 需要配置的 Table 的 rowSelection
const rowSelection = {
type: 'checkbox',
getCheckboxProps(record) {
return {
defaultChecked: record.id == 0 // 配置默认勾选的列
}
}
}
可以参考 ant design 的 GitHub 回复 链接