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

请问有能够解析schame,并且获取全部表单name的api嘛 #4033

Closed
dlspacezero opened this issue Nov 27, 2023 Discussed in #4032 · 5 comments
Closed

请问有能够解析schame,并且获取全部表单name的api嘛 #4033

dlspacezero opened this issue Nov 27, 2023 Discussed in #4032 · 5 comments
Labels
invalid This doesn't seem right

Comments

@dlspacezero
Copy link

Discussed in #4032

Originally posted by dlspacezero November 23, 2023
业务需要获取到schema渲染出来的表单name,并且保存到服务端上,请问有没有相关api,如果没有,能否提供一个思路

Copy link
Contributor

Hello @dlspacezero, your issue has been closed because it does not conform to our issue requirements. Please use the Issue Helper to create an issue, thank you!
你好 @dlspacezero,为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 issue 助手 来创建 issue 以方便我们定位错误。谢谢配合!

@github-actions github-actions bot added the invalid This doesn't seem right label Nov 27, 2023
@fwgood
Copy link

fwgood commented Dec 11, 2023

getFormGraph

@purple-force
Copy link

getFormGraph
通过 getFormGraph 获得的值的key,比实际的表单字段 name 多了一些前缀(Address),这些前缀去掉之后才是真正的name。这些前缀怎么判定?

@fwgood
Copy link

fwgood commented Jan 24, 2024

getFormGraph
通过 getFormGraph 获得的值的key,比实际的表单字段 name 多了一些前缀(Address),这些前缀去掉之后才是真正的name。这些前缀怎么判定?

你如果是嵌套的字段,那肯定会拼上父级的name呀,不然怎么区分层级呢?

@purple-force
Copy link

getFormGraph
通过 getFormGraph 获得的值的key,比实际的表单字段 name 多了一些前缀(Address),这些前缀去掉之后才是真正的name。这些前缀怎么判定?

你如果是嵌套的字段,那肯定会拼上父级的name呀,不然怎么区分层级呢?

并不是嵌套的字段。getFormGraph 会把VoidField,布局等组件的 key 一股脑都拼上去,而 form.values 的 key 只有表单项相关的name。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants