如何解决echarts 导入数据后跨域报错的问题呢 HELP #3303
-
把网页部署在github pages上,开始使用github 链接没有问题,估计是后台允许跨域访问了(https://raw.githubusercontent.com/hikergoo/checkhot/main/result/line_plot_data.json) vuepress-hope-theme 导入的echarts 代码如下:
:::
|
Beta Was this translation helpful? Give feedback.
Answered by
Mister-Hope
Sep 5, 2023
Replies: 1 comment
-
你把上面的资源自托管一下,确保不会出现cors问题就好了。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Mister-Hope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你把上面的资源自托管一下,确保不会出现cors问题就好了。
只要你用脚本获取网络资源,你就绕不开cors的