When I tap the element, the callback function is called two times.
I did try with a click event and there are no problems
<template>
<div>
<div v-on:click="tap()">Click</div>
<a v-hammer:tap="tap">Tap</a>
</div>
</template>
<script>
export default{
name: 'say',
beforeUpdate(){
console.log('beforeUpdate')
},
updated(){
console.log('updated')
},
methods: {
tap(){
console.log('Say',Date())
}
}
}
</script>
I expect the callback function is called once
You should to use
@click.native.preventfor avoid propagation, like docs explains: https://v2.vuejs.org/v2/guide/events.html