Related: VueJS: @click.native.stop = "" possible?
I've went through Vue's event modifiers, I've tried every combination and cannot understand why none of the chained examples work.
I've tried: click.native.prevent.stop, click.native.prevent, click.native.stop, click.native.self and so forth.
It does not stop the event from propagating.
Vue.component('btn', {
data: function(){
return {
count: 0
}
},
template: '<button v-on:click="count++">click me: {{ count }}</button>',
});
new Vue({
el: "#app",
data: function() {
return {
value: 0
}
},
methods: {
valPlus: function(){
this.value++;
}
}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="app">
{{ value }}
<br>
<btn @click.native.stop="valPlus"></btn>
</div>