Clear form content and clear form validation messages
this.$nextTick(() => {
this.$refs['formData'].resetFields();
})
Only clear the form validation message, not the form content
this.$nextTick(() => {
this.$refs['formData'].clearValidate()
})
When clearing the form validation message does not work, you can try the following
setTimeout(() => {
this.$refs['formData'].clearValidate();
}, 30);
formData refers to the object <el-form ref="
formData " :model="
formData bound to the current form"/>