JavaScript/vue.js/mounted

来自康健生活
Kangkk​(留言 | 贡献)2020年9月1日 (二) 04:21的版本 (→error)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

引言

生命周期

error

  • vue.runtime.esm.js?2b0e:619 [Vue warn]: Computed property "whetherMyself" was assigned to but it has no setter.
    computed: {
      route () {
       // getter
        get: function () {
          return this.$store.state.user.token
        },
        // setter
        set: function (newValue) {
          this.$store.state.user.token = newToken
        }
      },
      whetherMyself: {
        get: function () {
          return this.myselfStatus;
        }, // setter
        set: function (boo) {
          this.myselfStatus = boo;
        }
      }
    }