在主域绘制shareCanvas时出现了问题
发布于 6 年前 作者 li93 17372 次浏览 来自 问答

就是按照官方给的例子,开放域:

this.context.fillStyle = 'red';
this.context.fillRect(0, 0, 10, 10);

在主域中:

const sharedCanvas = wx.getOpenDataContext().canvas;
this.datastore.ctx.drawImage(sharedCanvas,0, 0);

结果

不过在开发者工具上是可以预览的。

1 回复

你好,请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

回到顶部