代码:(项目中有引入Adapter,小游戏getSavedFileList, 返回为空Array! 微信小程序开发。也是一样的结果)
const canvas = wx.createCanvas();
const context = canvas.getContext('2d');
context.fillStyle = '#CCC';
context.fillRect(0, 0, canvas.width, canvas.height);
context.setLineDash([5,5]);
context.moveTo(100,100);
context.lineTo(200,200);
context.stroke();
工具效果:
真机效果:
本文网址:http://www.91bianli.com/kaifazhinan/70166.html