冰冰点灯
照亮我的家门

  出现以下问题是在mounted()中使用官方示例的时候报了以下错误:
Error in mounted hook: “TypeError: Cannot read property ‘init’ of undefined”
或 Cannot read property ‘init’ of undefined

解决方案:
放弃import,改用require的方式引入库

解决方案:
放弃import,改用require的方式引入库
这里是引用 import echarts from 'echarts //把这种引入方式改为下面的方式 let echarts = require('echarts')

  

posted on 2022-12-02 10:09  冰冰点灯  阅读(424)  评论(0编辑  收藏  举报