使用 ES Module 引入echarts后 初始化时报错:echarts.init is not a function

新手上路,请多包涵

import echarts from 'pool/echarts/dist/echarts';
echarts.init(document.getElementById('userChart'))
已经取到js,但是echarts对象好像不对
clipboard.png

阅读 9.6k
2 个回答
import echarts from "echarts/lib/echarts";

这样吧

推荐问题