//去掉dataIndex后只要dataSource变化,则dom就一定会渲染
// dataIndex: ‘value’,
{
title: '按单处理',
//去掉dataIndex后只要dataSource变化,则dom就一定会渲染
// dataIndex: 'value',
width: 120,
editable: false,
render: (_: any, record: any) => {
return (
<ProFormSelect
allowClear
formItemProps={{
className: styles['no-margin-bottom'],
}}
fieldProps={{
value: record.value,
options: huiDanOptions,
onChange(e) {
console.log('fatafa', e);
if (e) {
record.value = e;
record.boxs.forEach((o: any) => (o.value = e));
} else {
record.value = null;
record.boxs.forEach((o: any) => (o.value = null));
}
setDataSource((val: []) => [...val]);
},
getPopupContainer() {
return document.body;
},
}}
/>
)
);
},
},