【Vue-bug】[Vue warn]: Computed property "isCheckedAll" was assigned to but it has no setter.


    isCheckedAll: function() {
      if (this.cartList.length === 0) {
        return false;
      } else {
        return !this.cartList.find(item => !item.checked);
      }
    },

改正,加入get()、set()

    isCheckedAll: {
      get: function() {
        if (this.cartList.length === 0) {
          return false;
        } else {
          return !this.cartList.find(item => !item.checked);
        }
      },
      set: function() {}
    },
posted @ 2020-08-05 21:36  Wayhome'  阅读(1163)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css