Vue中button绑定一个方法,在绑定方法中输出event,
明明是鼠标点击,为什么打印的event不是MouseEvent,而是PointerEvent?
(怎么才能打印出MouseEvent)
<div id="example-2">
<button v-on:click="greet">Greet</button>
</div>
<script>
var example2 = new Vue({
el: '#example-2',
data: {
name: 'Vue.js'
},
methods: {
greet: function (event) {
console.log(event); 这里打印的是PointerEvent
}
}
})
</script>