mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-02 11:17:46 +08:00
fix(components): [form] clear validate after resetFields (#6758)
This commit is contained in:
parent
b51c37ad29
commit
8639b58583
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user