例如在修改属性值的时候

 this.$set(this.curPlayList[this.curClickDevice.wndNum], 'description', rsp.Message.returnMsg || '播放异常')
 
页面数据curPlayList并没有发生变化,最后解决方案是在后面添加this.$forceUpdate(),进行强制更新。
 
 
VUE项目中使用this.$forceUpdate(),解决页面v-for中修改item属性值后视图数据不更新问题

  

VUE项目中使用this.$forceUpdate(),解决页面v-for中修改item属性值后视图数据不更新问题

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
  • 2022-12-23
  • 2021-05-28
  • 2022-12-23
  • 2021-04-28
猜你喜欢
  • 2021-04-22
  • 2022-12-23
  • 2022-01-23
  • 2021-04-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案