Vuex - Computed property “name” was assigned to but it has no setter

后端 未结 4 1380
耶瑟儿~
耶瑟儿~ 2020-12-07 11:41

I have a component with some form validation. It is a multi step checkout form. The code below is for the first step. I\'d like to validate that the user entered some text,

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-07 12:16

    For me it was changing.

    this.name = response.data;
    

    To what computed returns so;

    this.$store.state.name = response.data;
    

提交回复
热议问题