SimonZhangITer/DataVisualization

echarts图表没有显现

liuchang567 opened this issue · 8 comments

我安装了依赖,启动项目,在edge浏览器下没有图表,也没有报错

在chrome下面呢?如果chrome可以的话,或许在edge浏览器下面存在兼容性问题吧,我没有具体去测试,抱歉

chrome下是可以的,可是我用edge访问你的在线demo是可以出来的

如果访问我的在线demo是可以的话 那或许就是你本地配置的问题了 看看报错信息?

浏览器没报错,启动也没有,就是在npm install时弹出下面的警告
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN eslint-config-standard@6.2.1 requires a peer of eslint-plugin-promise@>=3.3.0 but none was installed.

你的依赖没有安装好吧
npm WARN eslint-config-standard@6.2.1 requires a peer of eslint-plugin-promise@>=3.3.0 but none was installed.

确定已经装完依赖,然后真的是有报错,不是很理解报错,是echarts的不兼容?
2

你在main.js的里面修改一下代码吧:

new Vue({
  router,
  store,
  template: '<App>',
  components: {
    App
  },
  data: {
    eventHub: new Vue(),
    charts: []
  }
}).$mount('#app')

<App>修改成<App/>

修改了app has no maching end tag,第一个报错解决,其他还在
貌似这个vue+echarts在ie下都普遍有遇到这种出不来的情况
补充一下,npm下来的echarts不行,我自己引入的就可以了,为啥会这样呢