Answer the question
In order to leave comments, you need to log in
What is the correct way to use component parameter as getter name (vuex)?
There is a component to which I pass type:
In the component itself, I declare a computed property:<component :type=" 'string' "></compontent>
computed: {
...mapGetters('currency', {
coordinates: this.type,
})
},
Answer the question
In order to leave comments, you need to log in
computed: {
coordinates() {
return this.$store.getters[`currency/${this.type}`];
},
},
type="string"
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question