Answer the question
In order to leave comments, you need to log in
Vuex mapState is not a function?
https://vuex.vuejs.org/guide/getters.html#method-s...
computed: {
...mapState(LISTS, {
human (state, getters) {
return getters[`user_list/${GET_ELEMENT_BY_FILED_NAME_AND_VALUE}`];
// or
return getters[`user_list/${GET_ELEMENT_BY_FILED_NAME_AND_VALUE}`]('id', 1);
},
}),
},
mounted () {
console.log(this.human({id: 1}));
},
human is not a function
client.js?06a0:77 TypeError: getters["".concat(...).concat(...)] is not a function
at VueComponent.human (index.js?2400:19)
at VueComponent.mappedState (vuex.esm.js?2f62:854)
at Watcher.get (vue.runtime.esm.js?2b0e:4479)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question