antd vue3版本,全选时,将禁用的也给选上了,如何全选时去掉禁用的?
代码如下
<div>
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand"/>
</div>
<script lang="ts" name="production-salesOrder" setup>
//注册table数据
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
title: '销售订单',
api: list,
columns,
canResize:false,
formConfig: {
//labelWidth: 120,
schemas: searchFormSchema,
autoSubmitOnEnter:true,
showAdvancedButton:true,
fieldMapToNumber: [
],
fieldMapToTime: [
],
},
actionColumn: {
width: 160,
fixed:'right'
},
beforeFetch(params) {
params.code = mainId.value;
},
rowSelection:{
type: 'checkbox',
getCheckboxProps(record: Recordable) {
if (record.approveStatus !== '1' || record.orderStatus !=='1') {
return { disabled: true };
} else {
return { disabled: false };
}
},
}
},
exportConfig: {
name:"销售订单",
url: getExportUrl,
},
importConfig: {
url: getImportUrl,
success: handleSuccess
},
})
</script>