ElementUI表单报错Cannot read property 'clearValidate' of undefined"
文章目录
因为Dom没有加载完成,导致获取不到refs元素,报错
可用以下方法解决
this.$nextTick(()=>{
this.$refs['addForm'].clearValidate();
})
因为Dom没有加载完成,导致获取不到refs元素,报错
可用以下方法解决
this.$nextTick(()=>{
this.$refs['addForm'].clearValidate();
})
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论