alibaba / alibaba/formily

[Feature Request] vue3 form change 监听

Open
#3,970 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

- [ ] I have searched the [issues](https://github.com/alibaba/formily/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
如果可以提供这个方法,我在vue3中使用formily 就不需要每一个组件都包裹observer

直接在change回调中 修改传入的vue响应式对象

因为我可能只需要formily json渲染表单的功能

我在 formily的文档里没有找到相关的实现 如果是我疏忽了没看见的话 希望给一个传送门 感激不尽

### What does the proposed API look like?
`const form = createForm({
values: data,
change:(e: typeof data)=>{
// 在这里去获取最新的值
}
})
`

类似这样或者 有watch也行

Contributor guide

Open the contributing guide

Research direction

Start with the Vue 3 integration and the createForm API described in the issue, then compare the existing form change and watch behavior. Clarify whether the intended result is a change callback or watch API and define how the latest value updates the Vue reactive object; completion should include agreed behavior and coverage for it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.