1. 程式人生 > >element ui裏dialog關閉後清除驗證條件

element ui裏dialog關閉後清除驗證條件

() item eset before body lose 添加 style label

//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(); }

element ui裏dialog關閉後清除驗證條件