M
M
marselabdullin2020-07-13 19:24:18
Vue.js
marselabdullin, 2020-07-13 19:24:18

How to pass variable to adjacent vue component?

App.vue is the parent component that calls the EventList:

<template>
  <div id="app">
    <Filters
        v-bind: events="events"
     />
    <br>
    <Form 
        v-bind: event="event"
        v-on:
    />
    <EventList
        v-bind: events="events"
        v-on: deleteEvent="deleteEvent"
    />
  </div>
</template>


The EventList has a @dbclick action that should send an event to the Form component to change:
<div class="d-flex justify-content-around shadow p-3 my-3" v-for="event in eventsByFilters" :key="event.id" @dblclick="$emit(event)">

And I need to pass only a variable without a method and not to the parent component, but to the neighboring one, how to do this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question