1 <el-dialog :title="addForm.title" :visible.sync="dialogFormVisible" width="900px" @close="closeDialog"> 2 <el-form :model="addForm" :rules="rules" ref="addForm" label-width="100px" class="demo-ruleForm"> 3 </ el-form> 4 </el-dialog>
1 methods:{ 2 closeDialog(){ 3 //关闭时表单重置表单 4 this.$refs.addForm.resetFields(); 5 } 6 }
form 表单里 model和addForm的值一定要一致!!来自小白的...
原文地址:https://www.cnblogs.com/2001-/p/10916491.html
时间: 2024-10-26 19:21:10