formily
formily copied to clipboard
[Feature Request] vue3 form change 监听
- [ ] I have searched the 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也行
我在core里看到onFormValuesChange 但是在vue3中报错
提供个codesandbox 吧