当前位置:   article > 正文

Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘resetFields‘)“

Error in v-on handler “TypeError Cannot read properties of undefined (reading ‘resetFields‘)“

在做vue element 项目中,做了一个新增 打开弹框的功能,想每次点击新增的时候表单项重置。
1.使用了
this.KaTeX parse error: Undefined control sequence:

atposition5:refs[̲formName
.rese…refs并没有获取到dom元素导致 ‘resetFields’ of undefined
3.解决办法:

添加代码

this.$nextTick(()=>{
  this.$refs.addForm.resetFields();
})
  • 1
  • 2
  • 3

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/983912
推荐阅读
相关标签
  

闽ICP备14008679号