在数组的对象里面,自己手动添加的属性是不具备响应式的,所以在添加的时候要用$set,如

         this.noticeList = requestParams.page === 1 ? rlist : this.noticeList.concat(rlist)
          this.noticeList.forEach((item) => {
            this.$set(item, 'isCheck', false)
          })
          

如果你没有用set ,而是直接 item.isCheck = false这样
到后面你更改数据的时候要用forceUpdate

     this.$set(this.noticeList[index], 'isCheck', !this.noticeList[index].isCheck)
      this.$forceUpdate('noticeList', this.noticeList)

所以记住要用set哦

posted on 2019-08-10 17:10  周小姐你好  阅读(291)  评论(0编辑  收藏  举报