<div class="delete" @click.stop="deleteItem($event,item.id)">
.stop 我们可以用.stop修饰符绑定在子元素上面,阻止其向父元素冒泡,从而达到不会触发冒泡事件
vue如何阻止冒泡事件
最新推荐文章于 2024-08-15 19:36:37 发布
<div class="delete" @click.stop="deleteItem($event,item.id)">
.stop 我们可以用.stop修饰符绑定在子元素上面,阻止其向父元素冒泡,从而达到不会触发冒泡事件