-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Bug Report] Vue2 中使用 SchemaField 会阻止页面更新 #3015
Comments
用法问题,template变化的时候可能formGraph还未清除,建议联动整体采用formEffect来实现,否则需要加scheduler https://codesandbox.io/s/tender-lucy-vmu9q7?file=/src/App.vue |
请问具体是指下面这种方式吗?
|
嗯,直接在effects里面,通过hook去变更field的component |
@MisicDemone 我这边发现是在 https://codesandbox.io/s/jovial-waterfall-fkpt5p?file=/src/components/HelloWorld.vue |
Reproduction link
Steps to reproduce
由于 vue2 版本的 codesanbox 会报错,因此我建了一个 git 仓库
业务逻辑设计的思路为: 通过切换 name 为 template 的字段,页面会渲染 tmpl1 和 tmpl2 两个组件。
复现路径
先切换为 tmpl1 组件,此时能渲染出 tmpl1 组件的表单。
再切换成 tmpl2 的字段,会发现页面没有更新
What is expected?
页面能展示 tmpl2 组件的表单
What is actually happening?
页面没有响应
Package
@formily/[email protected]
如果去掉 SchemaField ,页面能正常更新,查看 form.fields 也正常
The text was updated successfully, but these errors were encountered: