Skip to content

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

@zbw920529

Description

@zbw920529

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

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: '工商管理'
          }
      }

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions