vue怎么阻止冒泡事件(两种vue阻止冒泡的方法)
vue怎么阻止冒泡事件,分享vue中两种阻止冒泡事件的方法如下:
第1种:(推荐)
自带事件修饰符
<span @mousemove.stop="">stop moving</span>
第2种:
使用方法,跟js相同的阻止事件的方法
<span @mousemove="stopmoving($event)">stop moving</span>
methods:{
stopmoving:function(event){
event.stopPropagation();
}
} 除注明外的文章,均为来源:老汤博客,转载请保留本文地址!
原文地址:https://tangjiusheng.cn/web/ask/761.html
原文地址:https://tangjiusheng.cn/web/ask/761.html
