Answer the question
In order to leave comments, you need to log in
How to pass parameter to computed function?
I want to sort the list, but for this I need to pass a parameter to the computed function, in order to filter depending on the selected parameter.
computed: {
goodsList() {
switch (this.activeButtonSort) {
case 0:
return this.goods.filter(
item => item.name_categories.indexOf(this.openBreadcrumbText) !== -1
);
}
}
},
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