<div id="example-2"> <!-- `greet` is the name of a method defined below --> <button v-on:click="greet">Greet</button> </div>
<button @click="doSumthin"> Do Something </button> <script> module.exports { methods: { doSumthin() { console.log('did something!'); } }, }; </script>