,可能是因为renderFormItem返回的是一个函数而不是一个React组件。你可以将renderFormItem改为一个React组件,像这样:

const CustomRadio = () => { const [radioValue, setRadioValue] = useState(1);

const handleRadioChange = (event) => { setRadioValue(event.target.value); };

return ( <Radio.Group value={radioValue} onChange={handleRadioChange}> 已关注 已取消关注 </Radio.Group> ); };

const column = { title: '操作', width: 140, render: () => , };

这样设置应该可以正常工作了。注意在CustomRadio中使用useState和onChange来管理和更新radio的状态。在column中的render方法中返回CustomRadio组件


原文地址: https://www.cveoy.top/t/topic/fINd 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录