SoFunction
Updated on 2025-04-06

The method of clearing verification conditions after the dialog in ui is closed

Close dialog trigger event

//vue
 <!--Add a userdialog begin-->
   <el-dialog title="Edit User" :="dialogFormVisible"
     custom-class="editDialog"
     :close-on-click-modal="false"
     :before-close = "cleanContent"
     :show-close = "false"
     size='tiny'>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm">
 <el-form-item label="Account Name" prop="account" label-width="100px" >
 <el-col :span="20">
 <el-input v-model="" ></el-input>
 </el-col>
 </el-form-item>
 </el-form>
 <div slot="footer" class="dialog-footer">
 <el-button @click="cancledialog('ruleForm')">Pick remove</el-button>
 </div>
</el-dialog>

//js
cancledialog(formRule){
   this.$refs[formRule].resetFields();
 }

The above element in ui's element, the method of clearing the verification conditions after the dialog is closed is all the content I have shared with you. I hope you can give you a reference and I hope you can support me more.