element ui里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>
  <div slot="footer" class="dialog-footer">
  <el-button @click="cancledialog('ruleForm')">取 消</el-button>
 </div>
</el-dialog>

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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM