赞
踩
<div @click="test1()">
<span @click.stop="test2()">按钮1</span>
<span>按钮2</span>
</div>
这样点击div里面的按钮1,就不会触发div绑定时间test1()方法。
@click="_stopPropagation($event)"
methods:{
_stopPropagation(ev){
var _this = this;
ev.stopPropagation();
},
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。