Form.Item 有两种模式✅ 1️⃣ 受控字段模式只能一个子节点Form.Item namexxx Input / // ✅ 只能一个 /Form.Item 这里 Form.Item 会接管 value / onChange做数据绑定所以 ❗必须只有一个“表单控件”✅ 2️⃣ 展示/布局模式可以多个节点Form.List namecategories rules{[ { validator: async (_, value) { if (!value || value.length 1) { return Promise.reject(new Error(至少添加一个检测类别)); } }, }, ]} {(fields, { add, remove }, { errors }) ( Form.Item label数据标注类别 classNameaaa required validateStatus{errors.length ? error : } help{errors.length ? errors[0] : null} {fields.map((field) ( div key{field.key} style{{ display: flex, alignItems: center, marginBottom: 8, gap: 8, }} span style{{ fontSize: 14, color: var(--colorTextSecondary) }} 检测类别 /span Form.Item key{field.key} name{[field.name]} rules{[{ required: true, message: 请输入检测类别 }]} style{{ flex: 1, marginBottom: 0 }} Input placeholder请输入检测类别 maxLength{10} showCount variantfilled / /Form.Item span style{{ cursor: pointer }} onClick{() remove(field.name)} IconFont fontSize{16} colorvar(--colorTextSecondary) nameicon-deleteshanchu-1 / /span /div ))} Button typedashed classNamemark_list_add_btn onClick{() add()} icon{IconFont nameicon-plusjiahao fontSize{16} /} style{{ marginTop: 8 }} 添加检测类别 /Button /Form.Item )} /Form.List