ElementUI表单报错Cannot read property 'clearValidate' of undefined"

由于Dom没有加载完成,致使获取不到refs元素,报错
image.png
可用如下方法解决javascript

this.$nextTick(()=>{
    this.$refs['addForm'].clearValidate();
})

详细讲解:
https://www.jianshu.com/p/a75...java

相关文章
相关标签/搜索