const initialValues = {
upload_method: 1,
labeled: 0,
data_type: 'common',
upload_type: DatasetUploadType.PACKAGE,
labeled_type: pageType,
labeled_format: 'default',
source: DatasetSource.AUTO_LEARNING,
need_unpack: true,
label_source: 'preset',
promot: {
customLabalType: 1,
},
customLabalType: 1,
}
// name={['promot', 'customLabalType']}这样绑定,而不能promot.customLabelType,
<ProFormRadio.Group
label="标注状态"
name={['promot', 'customLabalType']}
radioType="button"
valueEnum={label_other_enum}
rules={[
{
required: true,
},
]}
onChange={val => {
console.log(val, initialValues)
}}
/>
<ProFormSelect
width={400}
name="dataset"
label="选择数据集"
fieldProps={
{
showSearch: true,
}}
options={[]}
rules={[
{
required: true,
message: '请选择数据集',
},
]}
/>
antd form 绑定嵌套对象里的一个值
猜你喜欢
转载自blog.csdn.net/qq_41885295/article/details/133940775
今日推荐
周排行