小程序点击图片放大预览
wxml
!-- 个图片添加点击事件 bindtap/catchtap--!-- 这里使用catchtap是为了防止冒泡到父级标签的跳转链接 --view bindtap="into_case" wx:for="{{caselist}}"image src="{{item.img}}" data-src="{{item.img}}" catchtap="previmg"/imageview查看更多/view/viewwxs
previmg: function (e) { var picUrl = e.target.dataset.src; wx.previewImage({ current: picUrl, // 当前显示图片的http链接 urls: // 需要预览的图片http链接列表 }) },小程序













