JS.VUE.USE.V.ON.EXACT
Enforce usage of 'exact' modifier on 'v-on'
Rule Details
This rule enforce usage of exact
modifier on v-on
when there is another v-on
with modifier.
{'vue/use-v-on-exact': ['error']}
Copy
<template>
<!-- GOOD -->
<button @click="foo" :click="foo"></button>
<button v-on:click.exact="foo" v-on:click.ctrl="foo"></button>
<!-- BAD -->
<button v-on:click="foo" v-on:click.ctrl="foo"></button>
</template>
Options
Copy
{
"vue/use-v-on-exact": ["error"]
}
Further Reading
- Guide - .exact Modifier (https://v3.vuejs.org/guide/events.html#exact-modifier)