[Vuejs]-How to pass my own parameter to function of update:model-value?

0👍

Use the click event on the v-card to call a method where you can send category as a parameter. You can also send the given toggle function of the slot and still call it from your method.

<v-card @click="itemClick(category, toggle)">
itemClick(category, toggle) {
  console.log(category)
  toggle()
}

You can also send item to the method as well, if needed, just make sure to always include toggle and call it.

Leave a comment