大飞_dafei

导航

vue 异步更新队列 this.$nextTick();

vue 异步更新队列 this.$nextTick();

解决IE中回显

vue 项目在 IE 中经常遇到回显不出来, 比入有if 判断表单赋值, modal 弹窗赋值,
解决办法: 
this.isShow = !this.isShow;  // 在这样的代码后面使用
this.$nextTick(() => {
    // 这里是要回显的数据
    //  data.books="孔孟",
    //  data.name="DaFei",
});

或者
this.isShow = !this.isShow;  // 在这样的代码后面使用
await this.$nextTick();
// 这里是要回显的数据
//  data.books="孔孟",
//  data.name="DaFei",
 

官方地址: 异步更新队列 this.$nextTick();

 

posted on 2020-11-05 16:39  大飞_dafei  阅读(272)  评论(0编辑  收藏  举报