vue element-ui表格关闭时,清空表单

1,344 阅读1分钟

1.在html( <el-dialog)中 添加 @close="resetForm('datadialogsell')"
2.在methods中 添加
resetForm(formName) { this.$refs[formName].resetFields();},
3.在使用resetFields 失效的解决方法在,打开弹出框并给弹出框赋值的使用使用
this.$nextTick(() => {})
例如:

截图.png