uni-app阻止事件冒泡
<view class="imgItem" @tap="previewImg(index)"><image :src="item" mode='aspectFill'></image><view @tap.stop="deleteImg(index)" class="delete"><u-icon name="minus" color="whi
·
<view class="imgItem" @tap="previewImg(index)">
<image :src="item" mode='aspectFill'></image>
<view @tap.stop="deleteImg(index)" class="delete">
<u-icon name="minus" color="white" size="24"></u-icon>
</view>
</view>
使用@tap.stop绑定事件,将会阻止事件冒泡
更多推荐
已为社区贡献4条内容
所有评论(0)