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

[Form]form还要使用field管理,反人类操作 #4823

Open
ming001 opened this issue Apr 18, 2024 · 6 comments
Open

[Form]form还要使用field管理,反人类操作 #4823

ming001 opened this issue Apr 18, 2024 · 6 comments
Labels
💬 Discussion Stale not active for a lone time

Comments

@ming001
Copy link

ming001 commented Apr 18, 2024

Component

Form

Feature Description

@eternalsky
Copy link
Contributor

eternalsky commented Apr 19, 2024

antd 也是类似的方式来管理的,因为表单值的操作很多,包括设置、重置、校验等等,不通过一个对象实例来管理感觉也没有更简单的办法。如果你有,可以提 RFC,我们可以考虑支持。如果你只是为了赋值,也可以使用 Form 的 value 属性,你不传入 field 的时候,Form 内部自己也会初始化 Field,可以通过 saveField 回调拿到这个内部自己初始化的。

@lxzy-yun
Copy link

建议使用formily2.0

@eternalsky
Copy link
Contributor

建议使用formily2.0

formily 也要初始化 form 实例,在这个 issue 讨论的范围内没有看到有什么不同。

@ming001
Copy link
Author

ming001 commented Apr 25, 2024

我想使用的场景很简单,给表单一个初始值,用户填写信息后,提交给接口,这么简单的动作,还要再初始化一个field,太复杂了

@eternalsky
Copy link
Contributor

我想使用的场景很简单,给表单一个初始值,用户填写信息后,提交给接口,这么简单的动作,还要再初始化一个field,太复杂了

看上面的第一条回复,可以不用初始化 field。

Copy link

你好,该 issue 已 30 天没有活动,因此被标记为 stale,如果之后的 7 天仍然没有活动,该 issue 将被自动关闭

@github-actions github-actions bot added the Stale not active for a lone time label May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💬 Discussion Stale not active for a lone time
Projects
None yet
Development

No branches or pull requests

3 participants