vuex-class
vuex-class copied to clipboard
Setting up getters with parameters passed
Is it possible to setup @Getter to get the following output?
computed: {
collectionCategoryObjects() {
return this.$store.getters["entities/collections/getCollectionCategoryObjects"]({
department: this.department,
collectionTitle: this.collectionTitle
})
}
}
How can I create @Getter in a compact format? Is there a way to setup a getter that is less verbose than this?
const Ncollection = namespace('entities/collections')
// ... class .. {
@Ncollection@Getter("getCollectionCategoryObjects") getterCollection: any
get Collection() {
return this.getterCollection({
department: this.department,
collectionTitle: this.collectionTitle
})
}
In other words, please support curry getter
this.$store.getters['curryGetter'](someParam)
in vuex-class.
See details in How to pass parameters to the function in getters