mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-04 12:17:37 +08:00
fix(components): [el-form] reset form validate error (#3759)
This commit is contained in:
parent
07353a13e1
commit
9aa03ac774
@ -49,6 +49,7 @@ import {
|
||||
ref,
|
||||
toRefs,
|
||||
watch,
|
||||
nextTick,
|
||||
} from 'vue'
|
||||
import { NOOP } from '@vue/shared'
|
||||
import AsyncValidator from 'async-validator'
|
||||
@ -245,8 +246,6 @@ export default defineComponent({
|
||||
validateMessage.value = ''
|
||||
}
|
||||
const resetField = () => {
|
||||
validateState.value = ''
|
||||
validateMessage.value = ''
|
||||
const model = elForm.model
|
||||
const value = fieldValue.value
|
||||
let path = props.prop
|
||||
@ -259,6 +258,9 @@ export default defineComponent({
|
||||
} else {
|
||||
prop.o[prop.k] = initialValue
|
||||
}
|
||||
nextTick(() => {
|
||||
clearValidate()
|
||||
})
|
||||
}
|
||||
|
||||
const getRules = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user