mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [form] clear validate after resetFields (#6758)
This commit is contained in:
@@ -282,12 +282,14 @@ const clearValidate: FormItemContext['clearValidate'] = () => {
|
||||
validateMessage.value = ''
|
||||
}
|
||||
|
||||
const resetField: FormItemContext['resetField'] = () => {
|
||||
const resetField: FormItemContext['resetField'] = async () => {
|
||||
const model = formContext.model
|
||||
if (!model || !props.prop) return
|
||||
|
||||
getProp(model, props.prop).value = initialValue
|
||||
nextTick(() => clearValidate())
|
||||
await nextTick()
|
||||
await nextTick()
|
||||
clearValidate()
|
||||
}
|
||||
|
||||
watch(
|
||||
|
||||
Reference in New Issue
Block a user