[Vue]双向绑定不生效

el-input框修改了内容但页面显示延迟

解决方案:给input绑定一个@input方法,使用 this.$forceUpdate();

 

<el-input v-model.number="form.order_id" placeholder="编号" @input="orderChange"></el-input>
 
orderChange() {
   this.$forceUpdate();
},

 

posted @ 2024-01-07 16:30  夕苜19  阅读(129)  评论(0编辑  收藏  举报