Home > Web Front-end > JS Tutorial > body text

The verification condition implementation code is cleared after the dialog is closed in element-ui

小云云
Release: 2018-02-27 09:19:49
Original
1576 people have browsed it

This article mainly shares with you a method to clear the verification conditions after closing the dialog in element ui. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to take a look, I hope it can help everyone.

Close dialog trigger event

//vue
 <!--添加用户dialog begin-->
   <el-dialog title="编辑用户" :visible.sync="dialogFormVisible"
     custom-class="editDialog"
     :close-on-click-modal="false"
     :before-close = "cleanContent"
     :show-close = "false"
     size=&#39;tiny&#39;>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm">
 <el-form-item label="账户名" prop="account" label-width="100px" >
 <el-col :span="20">
 <el-input v-model="ruleForm.account" ></el-input>
 </el-col>
 </el-form-item>
 </el-form>
 <p slot="footer" class="dialog-footer">
 <el-button @click="cancledialog(&#39;ruleForm&#39;)">取 消</el-button>
 </p>
</el-dialog>

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

Related recommendations:

Easyui uses Dialog inline button layout

Detailed explanation of the use and shutdown of jQuery plug-in artDialog.js

jQuery UI tutorial on using dialog

The above is the detailed content of The verification condition implementation code is cleared after the dialog is closed in element-ui. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!