$event in vuejs code example
Example 1: vue js button click
<div id="example-2">
<!-- `greet` is the name of a method defined below -->
<button v-on:click="greet">Greet</button>
</div>
Example 2: event vueks
<div id="example-3">
<button v-on:click="say('salut')">Dire salut</button>
<button v-on:click="say('quoi')">Dire quoi</button>
</div>
Example 3: event vueks
new Vue({
el: '#example-3',
methods: {
say: function (message) {
alert(message)
}
}
})