首页 > 其他 > 详细

vue引入echarts报错:Error in mounted hook: "TypeError: Cannot read property 'init' of undefined"

时间:2021-07-24 00:19:22      阅读:12      评论:0      收藏:0      [点我收藏+]

背景

引入echarts后调用报错
[Vue warn]: Error in mounted hook: "TypeError: Cannot read property ‘init‘ of undefined"
技术分享图片

原因

引入方式有误

import echarts from ‘echarts‘

解决办法

换个引入方式
let echarts = require(‘echarts‘)

vue引入echarts报错:Error in mounted hook: "TypeError: Cannot read property 'init' of undefined"

原文:https://www.cnblogs.com/xihailong/p/15054040.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!