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>
તમે મેથોડ નામ, ઇનલાઇન એક્સપ્રેશન અથવા આર્ગ્યુમેન્ટ્સ સાથે મેથોડ કૉલ કરી શકો છો. નેટિવ ઇવેન્ટ ઑબ્જેક્ટ તરીકે ઉપલબ્ધ છે.
