6***@qq.com
6***@qq.com
  • 发布:2019-08-21 12:43
  • 更新:2019-09-19 10:52
  • 阅读:19770

uni-app怎么阻止冒泡事件的发生

分类:uni-app

<view class="flex-r" style="flex-wrap:wrap;margin-top: 10upx;margin-bottom: 10upx;" @click="comdetail(data)">
<view class="flex-r" style="flex-wrap:wrap;" v-if="data.showmoreimg">
<view style="width: 25%;padding: 4upx 10upx;margin-right:30upx;"
v-for="(img,indx) in data.imgs" :key="indx">
<image :src="img" style="width: 210upx;height: 210upx;" @click="lookMe(index,indx);"></image>
</view>
</view>
<view class="flex-r" v-if="!data.showmoreimg">
<image :src="data.imgs[0]" style="width: 400upx;height: 400upx;" @click="lookMe(index,0)"></image>
</view>
</view>

我想点击lookMe的时候不触发comdetail事件

2019-08-21 12:43 负责人:无 分享
已邀请:
skybright

skybright

<image :src="data.imgs[0]" style="width: 400upx;height: 400upx;" @click="lookMe(index,0)"></image>
调整为:<image :src="data.imgs[0]" style="width: 400upx;height: 400upx;" @click.stop="lookMe(index,0)"></image>
试试

该问题目前已经被锁定, 无法添加新回复