Welcome 微信登录
编程资源 图片资源库

首页 / 脚本样式 / Vue / 解决vue项目input无法双向绑定的问题

<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="register.xyUrl" style="width: 300px" @input="change($event)">

          </el-input>

 将原来的绑定

this.register.xyUrl = msg;

改成如下

this.$set(this.register,"xyUrl",msg);