在做vue element 项目中,做了一个新增 打开弹框的功能,想每次点击新增的时候表单项重置。
1.使用了
this.KaTeX parse error: Undefined control sequence: \[ at position 5: refs\̲[̲formName\].rese…refs并没有获取到dom元素导致 ‘resetFields’ of undefined
3.解决办法:
添加代码
this.$nextTick(()=>{
this.$refs.addForm.resetFields();
})