const [registerTable, { getSelectRows, clearSelectedRowKeys, getRawDataSource }] = useTable({
api: getSystems,
columns,
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
pagination: true,
striped: false,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
canResize: false,
showSelectionBar: false, // 显示多选状态栏
clickToRowSelect: false, // 默认选中,关闭选择行选中
rowSelection: {
type: 'radio',
},
afterFetch: () => {
const result = getRawData();
// tableData.value = result;
return result;
},
beforeFetch: (t) => {
t.pid = 0;
},
});
const getRawData = () => {
let getFormData = getRawDataSource();
// console.log('🚀 ~ getRawData ~ getFormData:', getFormData.items);
return getFormData.items;
};
rowSelection: {
type: 'checkbox',
getCheckboxProps: (record) => ({
disabled: record.formName === '无人机服务', // 根据需要设置禁用条件
name: record.name,
}),
}, //勾选框
禁用勾选
不要勾选 rowSelection: false,
不要搜索重置按钮 useSearchForm: false,