小程序点击查看图片

<block wx:for="{{info.materials}}" wx:key="index">
      <image class="img" mode="aspectFill" src="{{item}}" bindtap="previewImage" data-current="{{item}}"></image>
    </block>
    previewImage(e) {
      const data = e.currentTarget.dataset;
      wx.previewImage({
        current: data.current,
        urls: this.data.info.materials,
      });
      console.log(data,123);
    },

 

 

 

 

posted @ 2022-06-15 17:31  阳菜  阅读(401)  评论(0)    收藏  举报