fare clic su vue
<button @click="setComponent('manage')">manage</button>
v-on di vuejs
<div v-on:javascriptEvent = "method"></div>
<!-- v-on:click <=> @click -->
fare clic su vue
<button v-on:click="warn('Form cannot be submitted yet.', $event)">
Submit
</button>
// ...
methods: {
warn: function (message, event) {
// now we have access to the native event
if (event) {
event.preventDefault()
}
alert(message)
}
}
clic del pulsante vue js
<div id="example-2">
<!-- `greet` is the name of a method defined below -->
<button v-on:click="greet">Greet</button>
</div>