小程序版:

Taro 版:

用原生的是OK的,但是 改成 Taro 就无效了!
createCanvasContext 有两个参数,如果你在组件里使用,第二个参数必传
https://developers.weixin.qq.com/miniprogram/dev/api/canvas/wx.createCanvasContext.html

这样加了也无效

this.$scope,看文档要仔细啊
https://nervjs.github.io/taro/docs/wx-relations.html
给了我继续 玩 Taro 的信心!
Most helpful comment
this.$scope,看文档要仔细啊https://nervjs.github.io/taro/docs/wx-relations.html