<div @click="test1()"> <span @click.stop="test2()">按钮1</span> <span>按钮2</span> </div>
<div @click="test1()">
<span @click.stop="test2()">按钮1</span>
<span>按钮2</span>
</div>
点击按钮1则不会触发test1()
本文标题:VUE阻止父级点击事件
本文链接:https://www.haomeiwen.com/subject/htwxfqtx.html
网友评论