@官方,我用的Taro框架,使用了async/await,不可能移除的,什么时候解决这个bug
canvasToTempFilePath: fail canvas is empty"data: { // 图标数据 doubleColumnCanvasData: { canvasId: 'doubleColumn', }, doubleColumnTitle: "近半年已获得认可", doubleColumnUnit: [{ color: "#94df87", title: "认可我的" }, { color: "#81bdfd", title: "认可币数" } ], // 图标数据 corpId: '', authCode: '', userId: '', // 悬赏点击按钮的参考值 tankk: 1, // 点击页面切换 qiehuan: 1, // 弹出框 qqt: '', // 轮播图配置 imgUrls: [], indicatorDots: true, autoplay: true, interval: 2000, duration: 1000, // 轮播图配置 user:'', ownBadge: 0, ownCoin: 0, ownPoint: 0, starUsers: [], stDatas: '', notices: [], sessionId:'' }, /** * 组件的方法列表 */ methods: { // 图表转图片 zhuantu(){ setTimeout(function () { wx.canvasToTempFilePath({ canvasId: 'doubleColumn', success: function (res) { var tempFilePath = res.tempFilePath; console.log(tempFilePath); }, fail: function (res) { console.log(res); } }); }, 500); }, onload直接调用的 [图片] 页面图表显示正常就转不了图片
2020-03-25