Skip to content

Instantly share code, notes, and snippets.

@shailen-naidoo
Created December 13, 2018 06:34
Show Gist options
  • Save shailen-naidoo/b2b507ec03cb6ed3424feaf20f621262 to your computer and use it in GitHub Desktop.
Save shailen-naidoo/b2b507ec03cb6ed3424feaf20f621262 to your computer and use it in GitHub Desktop.
Parent receive events
<template>
<my-button-counter v-on:clicked="updateClickedNum"></my-button-counter>
</template>
<script>
import MyButtonCounter from "./MyButtonCounter.vue";
export default {
data() {
return {
clicked_num: 0
}
},
methods: {
updateClickedNum(e) {
this.clicked_num = e;
}
},
components: {
MyButtonCounter
}
}
</script>
<style>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment