May 18, 2021 WeChat Mini Program Development Document
Preview the picture in full screen on the new page. During the preview, users can save pictures, send them to friends, and more.
Property | Type | The default | Required | Description |
---|---|---|---|---|
urls | Array.<string> | Is | A list of picture links that need to be previewed. 2.2.3 Support for cloud file IDs. | |
current | string | The first one of the urls | Whether | The link to the picture is currently displayed |
success | function | Whether | The interface calls a successful callback function | |
fail | function | Whether | The interface calls the failed callback function | |
complete | function | Whether | Callback function at end of interface call (call succeeds, fails are executed) |
wx.previewImage({
current: '', // 当前显示图片的http链接
urls: [] // 需要预览的图片http链接列表
})