修复地图初始化时 echarts 模块导入问题
This commit is contained in:
@@ -238,11 +238,13 @@ async function initMapChart() {
|
||||
}
|
||||
|
||||
try {
|
||||
const [echarts, worldResponse] = await Promise.all([
|
||||
const [echartsModule, worldResponse] = await Promise.all([
|
||||
import('echarts'),
|
||||
fetch('/world.json'),
|
||||
])
|
||||
|
||||
const echarts = echartsModule.default || echartsModule
|
||||
|
||||
if (!mapChart.value) {
|
||||
console.warn('Map chart container was unmounted during initialization')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user