import echarts from 'echarts'
Vue.prototype.$echarts = echarts
 
 

解决方案:
import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
 
结果:

在vue中引入echarts ,应用报错, “TypeError Cannot read properties of undefined (reading ‘init‘)“
阅读 47
2022-02-23
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
 
 

import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
 

相关推荐
精彩评论(0)