工作记录-Element-Ui-在做表单校验和清空表单时遇到的问题

714 阅读1分钟

今天用Element-Ui的表单组件时因为忘记写 :model 属性去绑定表单导致校验功能和重置表单方法调用失败且没有报错提示

Snipaste_2021-08-22_11-26-26.jpg

因为忘在el-form标签上写 :model属性导致调用重置表单方法 this.$refs[formName].resetFields() 时失败:

Snipaste_2021-08-22_11-30-20.jpg