Computed property "isShowDialog" was assigned to but it has no setter.

沂蒙趙發表於2019-03-14

Computed property "isShowDialog" was assigned to but it has no setter. 今天在進行vue開發 使用了vuex中的值 然後給v-model 賦值控制顯示隱藏發現報錯後來改成下邊這樣就可以了

computed: {  isShowDialog: {    get: function() {      return this.$store.state.isShowDialog    },    set: function() { //因為我這裡並不需要其他屬性也跟著一起改變 所以就這樣寫了      console.log('1')    }  }},複製程式碼


相關文章