After I introduced the map/china.js file in echarts into vue, I reported an error 'ECharts is not Loaded'

is there any great god who knows why? I really can"t find out.

Mar.03,2021

import 'echarts/map/js/china.js';

try quoting like this



this is because if introduced in the vue component, the this pointing problem in the map's js file will cause echarts not to be introduced. My solution is to introduce


.

is introduced directly in index.html. If you import'.. /.. / china.js' in the page again, you will report this error. Just delete this from the page, just need

.
import echarts from 'echarts'

I forcibly introduced but this error. My this in china.js is undefind. Does anyone know why


has it been solved? how to introduce


import'.. /. / node_modules/echarts/map/js/china.js' into the package in node_modules

Menu