[Vuejs]-How to retrieve value passed to a prop from an array VueJS/NuxtJs

0👍

You can either use two separate events or just pass an object with multiple values.

two events:

select() {
  this.$emit("selectId", this.id);
  this.$emit("selectNum", this.randomNum);
} 

or pass object with multiple values

  this.$emit("select", {id:this.id, randomNum:this.randomNum});

Leave a comment