[Vuejs]-Trigger a function after modify select value in children component โ€“ VueJs

0๐Ÿ‘

โœ…

I managed to do it by adding the function in the "v-on" in @currencyType, and passing as parameter the values โ€‹โ€‹i received from the children in "$emit".:

<app-select-coin
  @coin="body.value = $event"
  @currencyType="myFunction(body.currencyType = $event)"
  :data="body"
/>
methods :{
   myFunction(ct) {

   }
}

Leave a comment