Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue 3 emits

<template>
  <div>
    <p>{{ text }}</p>
    <button v-on:click="$emit('accepted')">OK</button>
  </div>
</template>
<script>
  export default {
    props: ['text'],
    emits: ['accepted']
  }
</script>
Source by v3.vuejs.org #
 
PREVIOUS NEXT
Tagged: #vue #emits
ADD COMMENT
Topic
Name
2+3 =