Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR]: Form增加对象结构 #2650

Open
zbw920529 opened this issue Oct 21, 2024 · 0 comments
Open

[FR]: Form增加对象结构 #2650

zbw920529 opened this issue Oct 21, 2024 · 0 comments

Comments

@zbw920529
Copy link

这个功能解决了什么问题?

image
如上图,我想将数据进行分类,比如基础信息保存在 baseinfo字段里面,baseinfo是一个对象,里面有身高、体重等信息,教育信息我想要保存在education字段里面,education也是一个对象,里面有school、speciality、idNo等字段。

你期望的组件设计是怎样的?

   <Form.Item name='name' label='姓名'>
        <Input align='right' placeholder='请输入' />
      </Form.Item>

      <Form.Item name={['education', 'school']} label='大学'>
        <Input align='right' placeholder='请输入' />
      </Form.Item>

      <Form.Item name='education.speciality' label='专业'>
        <Input align='right' placeholder='请输入' />
      </Form.Item>

     
      // 最终结果
      {
          name: '张三',
          education: {
            school: '清华大学',
            speciality: '工商管理'
          }
      }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant