欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

element-ui里dialog关闭后清除验证条件实现代码

程序员文章站 2022-04-12 22:16:52
...
本文主要为大家分享一篇element ui里dialog关闭后清除验证条件方法,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧,希望能帮助到大家。

关闭dialog触发事件

//vue
 <!--添加用户dialog begin-->
   <el-dialog title="编辑用户" :visible.sync="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="账户名" 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('ruleForm')">取 消</el-button>
 </p>
</el-dialog>

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

相关推荐:

Easyui使用Dialog行内按钮布局

详解jQuery插件artDialog.js使用与关闭

jQuery UI 使用之dialog的使用教程

以上就是element-ui里dialog关闭后清除验证条件实现代码的详细内容,更多请关注其它相关文章!