标题可能有点拗口,意思是这样:
<Form.Item name='total_list'>
<ChildrenCom />
</Form.Item>
function InputGroup({ onChange }){ // 注意:这个参数onChange是接收的name='total_list'的onChange事件
const handleChange(e, index) => {
onChange(44444) // 这里传什么参数进去,则你最后获取的name='total_list'的值就是啥
}
return (<>
<Form.Item name={`jurisdiction__0`}>
<Input id={`jurisdiction__0`} onChange={e => handleChange(e, 0)} />
</Form.Item>
<Form.Item name={`jurisdiction__1`}>
<Input id={`jurisdiction__1`} onChange={e => handleChange(e, 1)} />
</Form.Item>
<Form.Item name={`jurisdiction__2`}>
<Input id={`jurisdiction__2`} onChange={e => handleChange(e, 2)} />
</Form.Item>
</>)
}