F2 icon indicating copy to clipboard operation
F2 copied to clipboard

[Vue warn]: Error in nextTick: "TypeError: canvas.getContext is not a function"

Open Yan1513149392 opened this issue 3 years ago • 4 comments

Hi, I use all components in uniapp to report errors, and hbuilderx will report errors. I tried to use it // const el = document.querySelector('#' + that.chartId) // const myChart = el.querySelector('canvas') This is normal in hbuiderx editor preview and Google browser, but there is another error in the applet. How should I solve this problem?

`

`

Yan1513149392 avatar Oct 27 '20 03:10 Yan1513149392

为方便问题排查,请使用 codesandboxcodepen 等 webIDE 提供最小可复现问题的 example。

benvirus avatar Oct 27 '20 08:10 benvirus

由于我不清楚如何在codesandbox,codepen等webIDE提供uniapp示例,我已经创建了一个demo,烦请使用Hbuiderx编辑器运行,链接如下 https://github.com/Yan1513149392/antv-f2-demo

Yan1513149392 avatar Oct 27 '20 11:10 Yan1513149392

为方便问题排查,请使用codesandboxcodepen等webIDE提供最小可复现问题的示例。

由于我不清楚如何在codesandbox,codepen等webIDE提供uniapp示例,我已经创建了一个demo,烦请使用Hbuiderx编辑器运行,链接如下 https://github.com/Yan1513149392/antv-f2-demo

Yan1513149392 avatar Oct 27 '20 11:10 Yan1513149392

为方便问题排查,请使用codesandboxcodepen等webIDE提供最小可复现问题的示例。

由于我不清楚如何在codesandbox,codepen等webIDE提供uniapp示例,我已经创建了一个demo,烦请使用Hbuiderx编辑器运行,链接如下 https://github.com/Yan1513149392/antv-f2-demo

你的canvas标签没有绑定canvas-id, 应该是这问题

CallMeLowry avatar Mar 24 '22 13:03 CallMeLowry