this.$refs.xxx.resetFields() 重置清处表单内容

 <el-form :model="addUserForm" ref="addUserFormRef" :rules="addUserFormRules" label-width="100px">
        <el-form-item label="名称" prop="name" size="medium">
          <el-input v-model="addUserForm.name" placeholder="请输入" clearable></el-input>
        </el-form-item>
        <el-form-item label="联系人" prop="username" size="medium">
          <el-input v-model="addUserForm.username" placeholder="请输入" clearable></el-input>
        </el-form-item>
        <el-form-item label="联系方式" prop="mobile" size="medium">
          <el-input v-model="addUserForm.mobile" placeholder="请输入" clearable></el-input>
        </el-form-item>
      </el-form>
//        this.$refs.addUserFormRef.resetFields()   清除form表单的数据。 
  

你可能感兴趣的:(学习阶段,javascript,vue.js,html5)