<el-dialog title="充值/冲帐页面" :visible.sync="dialogFormVisible" @close="closeDialog" >
<el-form :model="ruleForm" :rules="rules" ref="contentForm">
添加一个close事件,通过给form一个ref值找到该表单重置
closeDialog(){
this.$refs['contentForm'].resetFields();
},
2. <div slot="footer" class="dialog-footer">
<el-button @click="cancelRecharge('contentForm')">取 消</el-button>
<el-button type="primary" @click="sureRecharge('contentForm')">确 定</el-button>
</div>
点击取消重置
cancelRecharge(formname){
this.dialogFormVisible =false;
this.$refs[formname].resetFields();
},