请问传入this依旧报错的问题解决了吗
第二次canvasToTempFilePath会报fail canvas is empty的bug第一次canvasToTempFilePath会生成图片 [图片] 第二次canvasToTempFilePath会报fail canvas is empty canvasToTempFilePath里面加上this也没用 [图片]
2020-05-18[图片] 请问一下传了this也还是报错,有解决方法吗
wx.canvasToTempFilePath 到底怎么用?一直报这个错:anvasToTempFilePath: fail canvas is empty [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"Canvas_box"[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{canvasHidden}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]canvas[代码] [代码]class[代码][代码]=[代码][代码]"Canvas"[代码] [代码]canvas-id[代码][代码]=[代码][代码]"myCanvas"[代码] [代码]/>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"save"[代码] [代码]catch:tap[代码][代码]=[代码][代码]"handSaveImg"[代码][代码]>保存图片</[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]createNewImg() {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码] [代码][代码]var[代码] [代码]context = wx.createCanvasContext([代码][代码]'myCanvas'[代码][代码])[代码][代码] [代码][代码]context.setFillStyle([代码][代码]'#fff'[代码][代码])[代码][代码] [代码][代码]context.fillRect(0, 0, 375, 667)[代码][代码] [代码][代码]var[代码] [代码]path = [代码][代码]'/images/bannerbj.png'[代码][代码] [代码][代码]console.log(path)[代码][代码] [代码][代码]context.drawImage(path, 0, 0, 340, 550)[代码][代码] [代码][代码]context.setFontSize(14)[代码][代码] [代码][代码]context.setFillStyle([代码][代码]'#333333'[代码][代码])[代码][代码] [代码][代码]context.setTextAlign([代码][代码]'center'[代码][代码])[代码][代码] [代码][代码]let name = [代码][代码]this[代码][代码].data.name[代码][代码] [代码][代码]context.fillText(name, 175, 235)[代码][代码] [代码][代码]context.stroke()[代码] [代码] [代码][代码]context.setFontSize(50)[代码][代码] [代码][代码]context.setFillStyle([代码][代码]'#333333'[代码][代码])[代码][代码] [代码][代码]context.setTextAlign([代码][代码]'center'[代码][代码])[代码][代码] [代码][代码]let score = [代码][代码]this[代码][代码].data.score[代码][代码] [代码][代码]context.fillText(score, 162, 180)[代码][代码] [代码][代码]context.stroke()[代码][代码] [代码][代码]// context.draw(false, this.saveCanvasToFile())[代码][代码] [代码][代码]context.draw([代码][代码]false[代码][代码], e => {[代码][代码] [代码][代码]wx.canvasToTempFilePath([代码][代码] [代码][代码]{[代码][代码] [代码][代码]canvasId: [代码][代码]'myCanvas'[代码][代码],[代码][代码] [代码][代码]quality: 1,[代码][代码] [代码][代码]success: res => {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]canvasTemImg: res.tempFilePath,[代码][代码] [代码][代码]canvasHidden: [代码][代码]true[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: res => {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码] [代码][代码]this[代码][代码] [代码][代码])[代码][代码] [代码][代码]})[代码][代码]},[代码][代码]saveCanvasToFile() {[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]setTimeout(() => {[代码][代码] [代码][代码]console.log([代码][代码]'123123123'[代码][代码])[代码] [代码] [代码][代码]wx.canvasToTempFilePath([代码][代码] [代码][代码]{[代码][代码] [代码][代码]canvasId: [代码][代码]'myCanvas'[代码][代码],[代码][代码] [代码][代码]quality: 1,[代码][代码] [代码][代码]success: res => {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]canvasTemImg: res.tempFilePath,[代码][代码] [代码][代码]canvasHidden: [代码][代码]true[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: res => {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码] [代码][代码]this[代码][代码] [代码][代码])[代码][代码] [代码][代码]}, 2000)[代码][代码]},[代码]
2020-05-18现在好像还是没有解决呢...
textarea输入文字之后,文字不随视图滚动- 当前 Bug 的表现(可附上截图) textarea输入文字之后,文字不随视图滚动,这也导致不能获取到焦点(这个BUG已经很久了,懒得上图) - 预期表现 textarea应该随着视图滚动 有用户群体确实了不起,有恃无恐,BUG迟迟不解决
2020-05-15请问解决了吗?我也遇到了相同的问题 哭
half Screen Dialog 弹窗中的desc插槽的使用为什么没有显示出来呢?[图片]
2020-05-08