<a-table
ref="table"
:columns="columns"
:row-key="(record) => record.id"
:dataSource="dataSource"
:pagination="pagination"
:row-selection="rowSelection"
:scroll="{ x: 'max-content' }"
>
</a-table>
let selectedRowKeysId = ref([])
let OldselectedRowKeysId = ref([])
let ids = ref([])
const rowSelection = ref({
checkStrictly: false,
selectedRowKeys: OldselectedRowKeysId,
onChange: (selectedRowKeys, selectedRows) => {
selectedRowKeysId.value = selectedRowKeys
selectedRowKeys.forEach((ol) => {
OldselectedRowKeysId.value.includes(ol) ? '' : OldselectedRowKeysId.value.push(ol)
})
}
onSelect:(record,selected,selectedRows,nativeEvent) =>{
if(!selected){
OldselectedRowKeysId.value.splice(OldselectedRowKeysId.value.index0f(record.id),}1)
}
}
getCheckboxProps: (record) => ({
disabled: ids.value.includes(record.id),
})
})