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

FormSchema 的 field 能否支持复杂字段(对象嵌套)? #550

Closed
zuihou opened this issue Apr 27, 2021 · 3 comments
Closed

FormSchema 的 field 能否支持复杂字段(对象嵌套)? #550

zuihou opened this issue Apr 27, 2021 · 3 comments

Comments

@zuihou
Copy link
Collaborator

zuihou commented Apr 27, 2021

假设有一个新增接口,入参格式为:

{
   "name": "姓名",
   "roles": [{
         title: '角色名1',
         describe: '描述'
     }],
    "dept": {
        name: ”部门名“,
       filed1: "其他字段" 
    }
}

在使用BasicForm时, 该如何配置?

能否按照如下配置,或者其他的方式(希望提供个例子)来实现:

export const connectionFormSchema = (): FormSchema[] => {
  return [
    {
      field: 'name',
      label: 'name',
      component: 'Input',
    },
    {
      field: 'dept.name',
      label: '部门名',
      component: 'Input',
    },
    {
      field: 'dept.filed1',
      label: '其他字段',
      component: 'Input',
    },
  ];
};
@hyperq
Copy link
Contributor

hyperq commented May 14, 2021

#591 已经调整了

@anncwb anncwb closed this as completed May 18, 2021
@wuchongde
Copy link

#591 已经调整了

大神,方便给个示例参考吗

@flyingfishzxf
Copy link

#591 已经调整了

大神,方便给个示例参考吗

请问你解决这个问题了吗?

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

5 participants