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>
మీరు పద్ధతి పేరు, ఇన్లైన్ ఎక్స్ప్రెషన్, లేదా ఆర్గ్యుమెంట్లతో పద్ధతిని కాల్ చేయవచ్చు. నేటివ్ ఈవెంట్ ఆబ్జెక్ట్ గా అందుబాటులో ఉంది.
