[Vue warn]: Computed property "tabs" was assigned to but it has no setter.

为什么80%的码农都做不了架构师?>>>   hot3.png

这种问题一般是tabs这个计算属性没有设置set方法导致该报错,因为在methods方法里面有对tabs赋值的操作。只要添加一个 set方法就可以解决此报错

tabs:  {
  get: function () {
    return this.$store.state.tabList.tabs
  },
  set: function (newValue) {
    this.$store.state.tabList.tabs = newValue
  }
},

转载于:https://my.oschina.net/dawd/blog/1490462

你可能感兴趣的:([Vue warn]: Computed property "tabs" was assigned to but it has no setter.)