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

getFieldDecorator 第一个参数 id,可以写嵌套的,我想问源码中哪里是解析成 'a[0].b' => {d:[{b}]} 这种的方法 #18944

Closed
1 task
crazyair opened this issue Sep 23, 2019 · 7 comments

Comments

@crazyair
Copy link
Member

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

想知道怎么具体用的哪个方法

What does the proposed API look like?

@zombieJ
Copy link
Member

zombieJ commented Sep 23, 2019

@zombieJ zombieJ closed this as completed Sep 23, 2019
@crazyair
Copy link
Member Author

https://lodash.com/docs/4.17.11#get

我说的不清楚吗?不是 get ,是反过来的。

@yoyo837
Copy link
Contributor

yoyo837 commented Sep 23, 2019

@qq645381995 Table组件只取值,当然只与get相关,我猜你需要这个

import lodashGet from 'lodash/get';
import lodashSet from 'lodash/set';

他俩一对

@crazyair
Copy link
Member Author

@qq645381995 Table组件只取值,当然只与get相关,我猜你需要这个

import lodashGet from 'lodash/get';
import lodashSet from 'lodash/set';

他俩一对

不是,我要的是 Form 提交方法 validateFields 或者调用 getFieldsValue 得到的值。

a[0].b.c =>  { 'a': [{ 'b': { 'c': 3 } }] }

@yoyo837
Copy link
Contributor

yoyo837 commented Sep 23, 2019

那就是上面@zombieJ 的回答。

@crazyair
Copy link
Member Author

那就是上面@zombieJ 的回答。

他的是

{ 'a': [{ 'b': { 'c': 3 } }] } =>  a[0].b.c

@yoyo837
Copy link
Contributor

yoyo837 commented Sep 23, 2019

抱歉,可能没理解你的意思,爱莫能助。🤷‍♂️

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

4 participants