vue 中 @click.native.prevent 事件

 

1.给vue组件绑定事件时候,必须加上native ,否则会认为监听的是来自Item组件自定义的事件,

2.prevent 是用来阻止默认的 ,相当于原生的event.preventDefault()

 

posted @ 2020-11-16 22:16  方诚  阅读(505)  评论(0编辑  收藏  举报