von kliknij
<div id="example-1">
<button v-on:click="counter += 1">Add 1</button>
<!-- Or -->
<button @click="counter += 1">Add 1</button>
<p>The button above has been clicked {{ counter }} times.</p>
</div>
var example1 = new Vue({
el: '#example-1',
data: {
counter: 0
}
})
Wide-eyed Wolf