引入echarts后发现终端有警告信息,
搜了一下好像是因为
最新的5.0版本的echarts中的echarts/lib/echarts.js
里没有module.export ,也没有export default。
所以require(‘echarts’)报错
import echarts from 'echarts’也报错
解决办法
// import echarts from "echarts";
// 修改为
import * as echarts from 'echarts'