initCanvas() {
let ctx = uni.createCanvasContext('imsgs',this); //获取canvas环境
console.log(ctx)
// 绘制白色边框
ctx.setStrokeStyle("blue")
ctx.setLineWidth(16)
ctx.rect(0, 0, 519, 997)
ctx.stroke()
ctx.draw()
生成的小程序, 传this会报错
Converting circular structure to JSON
--> starting at object with constructor 'Object'
--- property '_renderProxy' closes the circle
at JSON.stringify (<anonymous>)
at Object.sync (VM16 asdebug.js:1)
at Object.u [as beforeinvoke] (VM16 asdebug.js:1)
at r (VM16 asdebug.js:1)
at Proxy.value (instanceframe?s=1598102778823&preload:1)
at VueComponent.initCanvas (VM62 posterimg.js:310)
at VueComponent.onReady (VM62 posterimg.js:304)
at invokeWithErrorHandling (VM39 vendor.js:3954)
at VueComponent.Vue.__call_hook (VM39 vendor.js:7978)
at Xe.ready (VM39 vendor.js:1640)
9***@qq.com
你好,有解决方案了吗?
2020-09-02 20:45