美文网首页
VUE阻止父级点击事件

VUE阻止父级点击事件

作者: 不想熬夜Juan | 来源:发表于2018-11-11 15:08 被阅读0次

    <div @click="test1()">   

        <span @click.stop="test2()">按钮1</span>   

        <span>按钮2</span>

    </div>

    点击按钮1则不会触发test1()

    相关文章

      网友评论

          本文标题:VUE阻止父级点击事件

          本文链接:https://www.haomeiwen.com/subject/htwxfqtx.html