Cannot read property 'clearValidate' of undefined
Cannot read property 'clearValidate' of undefined
这个错误是因为你的dom元素还没有加载完,你就想使用resetFields置空。也就是你写的this.$refs['form'].resetFields();这个里面的form还没有加载出来呢。
Vue.nextTick用于延迟执行一段代码
this.$nextTick(()=>{
this.$refs['form'].clearValidate();
})