-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
使用useForm的setProps设置表单的 props 参数schemas时,根据一个判断值切换会不更新页面,会一直以第二次设置的为准 #688
Comments
if (modelType.value === 3) { |
这个可以直接使用一个computed,传入Form组件即可 const getSchemas=computed(()=>{
return modelType.value === 3? resetPsdformSchema: accountFormSchema
})
<Form schemas="getSchemas"></Form>
|
我昨天描述问题没说好,问题应该是动态设置schemas 后,再updateSchema更新会造成视图不会更新 |
Hello @IFnGSiYu. Please provide the complete reproduction steps and code. Issues labeled by |
这样设置不同的schemas |
你给的代码片段不足以重现问题,请提供足够的可以重现问题的演示代码。我再加一个onBtn2Click设置schemas2也没能出现问题。 |
已找到问题。 |
期待解决方案 |
model 其实也会出现这个问题,最后我直接放到了 template 内 ,使用useForm()会出现这个问题,目测是响应性的问题。。。(但是我看内部具有对 props 的整体watch,当formDataRef变更时,这个watch并没有被触发【P.s有时候莫名其妙就好了。。】) |
Describe the bug
A clear and concise description of what the bug is..
Reproduction
Please describe the steps of the problem in detail to ensure that we can restore the correct problem
System Info
The text was updated successfully, but these errors were encountered: