gmsmile

<view>

  <image src=\'{{v.content}}\' mode=\'aspectFit\' bindtap="enlarge" data-list="{{pictures}}" data-src="{{v.content}}"></image>
</view> 
Page({
  data:{ },
 
  //图片点击事件
  enlarge: function (event) {
    var src = event.currentTarget.dataset.src;//获取data-src
    var imgList = event.currentTarget.dataset.list;//获取data-list
    //图片预览
    wx.previewImage({
      current: src, // 当前显示图片的http链接
      urls: imgList // 需要预览的图片http链接列表
    })
  },
 
 
})

分类:

技术点:

相关文章:

  • 2021-12-26
  • 2021-12-26
  • 2021-11-27
  • 2022-02-03
  • 2021-11-28
  • 2022-01-01
  • 2021-10-18
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2021-11-17
  • 2021-05-20
  • 2021-04-29
  • 2021-08-06
  • 2021-09-13
  • 2021-12-26
相关资源
相似解决方案