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组件如果只想清除某一字段的校验结果怎么做?resetFields 会清空值,而我只想清空校验信息 #256

Open
Youweiyoyo opened this issue Mar 23, 2023 · 0 comments

Comments

@Youweiyoyo
Copy link

问题描述:
Form 包裹 Table , Table 中 写插槽 写 Input 框,现在 有 A B 两个字段 ,我想 A 字段输入完成 去校验 B 字段信息。 经过百度之后,解决,但是校验的触发事件是 blur 事件,导致我的 B 字段存在值得时候 A 字段显示 校验信息还存在,使用 FormItem 自身的 resetFields 方法,会连同该字段的值一起清除,而我只想清除校验条件
this.$refs.formValidate.fields.forEach((item) => { if(item.prop === device.${idx}.deviceList.${index}.thresholdValueStart) { item.resetFields() } })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant