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