vue send event plus variable

  1. Use the $emit method to send an event from the child component.
  2. Pass the event name as the first argument to $emit.
  3. Pass the variable as the second argument to $emit.
  4. In the parent component, use v-on directive to listen for the event.
  5. Handle the event in the method specified in v-on directive.
  6. Access the variable passed with the event using the event object.