Created
December 13, 2018 06:34
-
-
Save shailen-naidoo/b2b507ec03cb6ed3424feaf20f621262 to your computer and use it in GitHub Desktop.
Parent receive events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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