地图重置调整
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="fdMap">
|
<section class="fdMap">
|
||||||
<div ref="content" class="w100 h100"/>
|
<div ref="content" class="w100 h100"/>
|
||||||
<div class="reset" @click="handleReset"/>
|
<div class="reset" @click.stop="handleReset"/>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -116,9 +116,16 @@ export default {
|
|||||||
} else if (c < 5) setTimeout(() => this.init(++c), 500)
|
} else if (c < 5) setTimeout(() => this.init(++c), 500)
|
||||||
},
|
},
|
||||||
handleReset() {
|
handleReset() {
|
||||||
const options = this.map.getOption()
|
const {series = []} = this.map.getOption()
|
||||||
this.map.clear()
|
this.map.clear()
|
||||||
this.map.setOption(options)
|
this.init()
|
||||||
|
if (series[0]?.markPoint) {
|
||||||
|
this.map.setOption({
|
||||||
|
series: {
|
||||||
|
markPoint: series[0].markPoint
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -139,6 +146,7 @@ export default {
|
|||||||
height: 64px;
|
height: 64px;
|
||||||
z-index: 202310241633;
|
z-index: 202310241633;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user