用echarts的地图组件时,需要用到全国省市数据GeoJson,数据量也不小,2Mb,影响到了主页面加载速度
可以使用按需加载,因为使用tab栏加载不同内容的
可以使用vue3自带方法:defineAsyncComponent
const GeoChart = defineAsyncComponent(() => import("@/components/EchartsCmp/GeoChart.vue"))
const json = await import("./china.json")