"takeSnapshot:fail webview renderer is not support
稳定版 Stable Build (1.06.2401020) // pages/share/share.js const app = getApp() Page({ data: { }, onLoad() { }, tap() { this.createSelectorQuery().select("#view") .node().exec(res => { const node = res[0].node node.takeSnapshot({ // type: 'file' 且 format: 'png' 时,可直接导出成临时文件 type: 'arraybuffer', format: 'png', success: (res) => { const f = `${wx.env.USER_DATA_PATH}/hello.png` const fs = wx.getFileSystemManager(); fs.writeFileSync(f, res.data, 'binary') wx.showToast({ title: '保存成功' }) wx.saveImageToPhotosAlbum({ filePath: f, complete(res) { console.log("saveImageToPhotosAlbum:", res) } }) }, fail(res) { console.log("takeSnapshot fail:", res) } }) }) } })