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>
तपाईं विधि नाम, इनलाइन अभिव्यक्ति, वा तर्कहरू सहित विधि कल गर्न सक्नुहुन्छ। मूल घटना वस्तु को रूपमा उपलब्ध छ।
