// 全局挂载echarts app.config.globalProperties.echarts = echarts
import echarts from 'echarts'
npm install --save echarts #或 cnpm install --save echarts import * as echarts from 'echarts' ... mounted(){ var myChart = echarts.init(document.getElementById('main')) //... }