如题,无论是我自己引入的echarts,还是用echarts的官方dome,手机端和开发者工具都没问题,就是PC端不行,报错。
发布体验版测试也不行。
报错如下:
VM13:2 MiniProgramError
Cannot read property 'getContext' of null
TypeError: Cannot read property 'getContext' of null
at t.eval (weapp:///utils/ec-canvas/ec-canvas.js:156:30)
at Function.eval (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:1797421)
at <SelectorQuery callback function>
at eval (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:109783)
at eval (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:1797583)
at Array.forEach (<anonymous>)
at eval (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:1797555)
at eval (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:1796881)
at eval (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:2733913)
at v (eval at n.call.document (http://127.0.0.1:35334/remote-debug/runtime.js?devtools_ignore=true:1:14662), <anonymous>:2:2635767)
奇怪的是!echarts的官方线上dome竟然可以。
各位大佬有没有解决方案?谢谢
pc不支持canvas2d ec-canvas 组件中加一行 force-use-old-canvas="true"
你好,请问解决了吗?