I've been struggling to find a solution for this problem. I have developed a function that is triggered when a component is clicked using v-on:click. My goal is to pass a value into the function to access a specific array from backend data.
Within the component, the function looks like this:
<v-card
@click="getContent('topSellers')"
>
The 'topSellers' value is then passed as an "id" parameter in the function to target the desired array:
getContent(id) {
this.accordion = this.data.id;
console.log("data", id);
}
Currently, this.data.topSellers
is functioning correctly. However, since the id is treated as a string, the method is not working properly. I am unsure of how to resolve this issue. Any assistance would be highly appreciated!