获得过 0 次赞
回答过的问题获得 0 次赞
分享过的文章/案例获得 0 次赞
评论与回复获得 0 次赞
没人回答啊?
Canvas draw(reserve,callback)中回调只能调一次var ctx; onLoad: function (options) { ctx = wx.createCanvasContext('myCanvas'); this.Draw(); }, Draw: function () { debugger let colors = ["#6A0000", "#900000", "#902B2B", "#A63232", "#A62626", "#FD5039", "#C12F2A", "#FF6540", "#f93801"]; let colornum = colors[~~(Math.random() * colors.length)]; ctx.setFillStyle(colornum) ctx.fillRect(10, 10, 150, 100) ctx.draw(false, this.Draw); }, 这时Draw()方法调用2次后停止,请问这是啥问题?应该无限调用啊!
2018-07-17