This commit is contained in:
GGJ
2024-01-03 14:50:26 +08:00
parent 6e6717d23c
commit 956c235e82
4 changed files with 111 additions and 131 deletions

View File

@@ -29,9 +29,8 @@ const GetEchar = async (name: string) => {
let chartDom = document.getElementById('chartMap')
myCharts.value?.dispose()
myCharts.value = echarts.init(chartDom)
if (name != '中国') {
showCircle.value = true
}
name == '中国' ? (showCircle.value = false) : (showCircle.value = true)
echarts.registerMap(name, await fetchConfig(name)) //注册可用的地图
let option = {
title: {
@@ -127,7 +126,7 @@ const GetEchar = async (name: string) => {
shadowOffsetY: 0,
borderWidth: 0
}
},
}
// regions: [
// {
// name: '南海诸岛',
@@ -161,11 +160,9 @@ const GetEchar = async (name: string) => {
}
const MapReturn = (name: string) => {
let area = dictData.state.area[0].children
let area = dictData.state.area?.[0]?.children ?? []
let list = {}
let flag = true
for (let i = 0; i < area.length; i++) {
if (area[i].name == name) {
console.log(11111)