F2
F2 copied to clipboard
[Vue warn]: Error in nextTick: "TypeError: canvas.getContext is not a function"
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?
`
`
为方便问题排查,请使用 codesandbox、 codepen 等 webIDE 提供最小可复现问题的 example。
由于我不清楚如何在codesandbox,codepen等webIDE提供uniapp示例,我已经创建了一个demo,烦请使用Hbuiderx编辑器运行,链接如下 https://github.com/Yan1513149392/antv-f2-demo
为方便问题排查,请使用codesandbox,codepen等webIDE提供最小可复现问题的示例。
由于我不清楚如何在codesandbox,codepen等webIDE提供uniapp示例,我已经创建了一个demo,烦请使用Hbuiderx编辑器运行,链接如下 https://github.com/Yan1513149392/antv-f2-demo
为方便问题排查,请使用codesandbox,codepen等webIDE提供最小可复现问题的示例。
由于我不清楚如何在codesandbox,codepen等webIDE提供uniapp示例,我已经创建了一个demo,烦请使用Hbuiderx编辑器运行,链接如下 https://github.com/Yan1513149392/antv-f2-demo
你的canvas标签没有绑定canvas-id, 应该是这问题