。
使用drawImage绘制图片,图片显示不全?代码片段:https://https://developers.weixin.qq.com/s/itksKBmF7lfd 使用drawImage绘制图片,图片仅显示一小部分,原始图片: [图片] 显示状态: [图片] 实在找不到原因了,非常简单的代码: JS: const app = getApp() Page({ data: { isShowImage: true, clientwidth: 360, clientheight: 640, pixelratio: 3, ratio: 0, src: '/index/1.jpg' }, onLoad: function () { var that = this; that.canvas = wx.createCanvasContext("image-canvas", that) that.canvas.drawImage(that.data.src, 0, 0, that.data.clientwidth, that.data.clientheight) that.canvas.draw() } }) wxml: <canvas canvas-id="image-canvas" style='width:{{clientidth}}px; height:{{clientHeight}}px;'></canvas>
2020-03-04+1,有时还会闪退
为什么开发者工具经常卡死?打开后电脑风扇就嗡嗡的响[图片] [图片] [图片] [图片]
2020-03-04