<image style="width: {{imgWidth}}px;height: {{imgWidth}}px;" src="{{subitem}}" lazy-load="{{true}}" mode="aspectFit" class="image" bindtap="previewImg" data-imgindex="{{index}}" data-currentsrc="{{subitem}}"></image>
previewImg(e) {
const {albumList} = this.data
console.log(albumList[e.currentTarget.dataset.imgindex])
console.log(e.currentTarget.dataset.currentsrc)
wx.previewImage({
current: e.currentTarget.dataset.currentsrc,
urls: albumList[e.currentTarget.dataset.imgindex]
})
}
图片尺寸和屏幕宽高不适配
换张图片试试,正常是全屏的
图片尺寸不够大