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