dmr 发表于 2024-9-25 17:14:39

echarts:Cannot read property ‘init‘ of undefined

var myChart = echarts.init(document.getElementById('mywordcloud'));

报错:
Cannot read property ‘init‘ of undefined

解决:

在导入包的时候添加上 * as 即可
import * as echarts from echarts
页: [1]
查看完整版本: echarts:Cannot read property ‘init‘ of undefined