mirror of
https://gitee.com/dromara/go-view.git
synced 2025-04-24 02:16:10 +08:00
update src/packages/components/Charts/Maps/MapBase/index.vue.
解决https://gitee.com/dromara/go-view/issues/I6E0JS问题 Signed-off-by: wallellen <wallellen@hotmail.com>
This commit is contained in:
parent
126c7ce5d2
commit
0b89aeca82
@ -59,13 +59,14 @@ const getGeojson = (regionId: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//异步时先注册空的 保证初始化不报错
|
//异步时先注册空的 保证初始化不报错
|
||||||
registerMap(props.chartConfig.option.mapRegion.adcode, { geoJSON: {} as any, specialAreas: {} })
|
registerMap(`${props.chartConfig.option.mapRegion.adcode}`, { geoJSON: {} as any, specialAreas: {} })
|
||||||
|
|
||||||
// 进行更换初始化地图 如果为china 单独处理
|
// 进行更换初始化地图 如果为china 单独处理
|
||||||
const registerMapInitAsync = async () => {
|
const registerMapInitAsync = async () => {
|
||||||
await nextTick()
|
await nextTick()
|
||||||
if (props.chartConfig.option.mapRegion.adcode != 'china') {
|
const adCode = `${props.chartConfig.option.mapRegion.adcode}`;
|
||||||
await getGeojson(props.chartConfig.option.mapRegion.adcode)
|
if (adCode !== 'china') {
|
||||||
|
await getGeojson(adCode)
|
||||||
} else {
|
} else {
|
||||||
await hainanLandsHandle(props.chartConfig.option.mapRegion.showHainanIsLands)
|
await hainanLandsHandle(props.chartConfig.option.mapRegion.showHainanIsLands)
|
||||||
}
|
}
|
||||||
@ -127,7 +128,7 @@ watch(
|
|||||||
|
|
||||||
//监听地图展示区域发生变化
|
//监听地图展示区域发生变化
|
||||||
watch(
|
watch(
|
||||||
() => props.chartConfig.option.mapRegion.adcode,
|
() => `${props.chartConfig.option.mapRegion.adcode}`,
|
||||||
async newData => {
|
async newData => {
|
||||||
try {
|
try {
|
||||||
await getGeojson(newData)
|
await getGeojson(newData)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user