v-on DOM ईवेंट्स (क्लिक्स, इनपुट, कीप्रेस) को सुनता है और एक हैंडलर चलाता है। इसका संक्षिप्त नाम @ है।
<script setup>
import { ref } from "vue";
const count = ref(0);
function increment() { count.value++; }
</script>
<template>
<button v-on:click="increment">Full syntax</button>
<button @click="increment">Shorthand (idiomatic)</button>
<button @click="count++">Inline expression</button>
<button @click="increment($event, 'extra')">Pass args + the event</button>
</template>
आप एक मेथड नाम, एक इनलाइन एक्सप्रेशन, या आर्गुमेंट्स के साथ एक मेथड कॉल कर सकते हैं। नेटिव ईवेंट ऑब्जेक्ट के रूप में उपलब्ध है।
