默认情况下,事件在h5页面会穿透传递,比如一div里面套一个div,点击上层div,下层div也会响应
要阻止事件穿透,使用event.stopPropagation();
代码示例:

<div @click="testout($event)>
<div @click="testin($event)"></div>
</div>
.......

testin(event) {
      ......
      event.stopPropagation();
    },

相关文章:

  • 2021-09-23
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-15
  • 2021-06-08
  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案