[Vuejs]-How to pass v-model to child component with change event

0๐Ÿ‘

do not use @chenge in v-btn you need use @click

this is the answer:

Child component

<v-sheet elevation="1" height="100%" outlined rounded width="100%">
<h3 style="margin: 10px">Game providers</h3>
<v-btn-toggle
  :value="value.allPset"
  block
  @click="$emit('set-all-provider-filter')"
  style="display: block"
>
  <v-btn block dark style="margin-top: 10px">
    All providers
    <v-spacer />
    <v-chip>{{ vallGamesSum }}</v-chip>
  </v-btn>
</v-btn-toggle>
<v-btn-toggle
  :value="value.vendorFilter"
  @click="$emit('set-provider-filter')"
  block
  multiple
  style="display: block"
>
  <v-btn
    v-for="(item, i) in vendorList"
    :key="i"
    :value="item.name"
    height="30px"
    block
    dark
    style="margin-top: 1px"
    ><img style="background-color: transparent" :src="item.src" />
    <v-spacer />
    <v-chip small>{{ item.gameSum }}</v-chip>
  </v-btn>
</v-btn-toggle>

Leave a comment