<el-form label-width="130px" :model="jfbzzhForm" :rules="jfbzzhFormRules" ref="jfbzzhForm">
<el-form-item label="名称:" prop="oppAccDepict">
<el-input v-model="jfbzzhForm.oppAccDepict" ></el-input>
</el-form-item>
<el-form-item label="类型:" prop="type">
<el-radio-group v-model="jfbzzhForm.type" @change="chooseTyp">
<el-radio label="0" >类型1</el-radio>
<el-radio label="1">类型2</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
chooseTyp(val){
this.$refs['jfbzzhForm'].resetFields("oppAccDepict");
console.log(val);
}
想在 jfbzzhForm.type 改变的时候将 oppAccDepict 重置(只重置 oppAccDepict,或者不重置type)
实际运行中 jfbzzhForm 中所有元素都被重置了,点击类型2的时候,console出来的是1 0两个值
UYOU
相关分类