解决方法1:使用this.$set()
data(){
return{
companyForm:{
detailedAddress:""
},
editValue:"编辑的值"
}
},
methods:{
handleEdit(){
this.$set(
this.companyForm,//要修改的对象或数组
'detailedAddress',//要修改的具体值
this.editValue//重新赋的值
)
}
}
解决方法2:使用this.$forceUpdate()
<el-input v-model="companyForm.detailedAddress" @input="changeFn"/>
changeFn(){
this.$forceUpdate();
}
以上方法亲测有效,可以试试