From 0488cc32d225a28289ba6c70a2a297f347cacdad Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期一, 16 三月 2026 17:34:18 +0800
Subject: [PATCH] 2026.3.16
---
src/components/map/BaseMap.vue | 27 ++++++++++++++++++++-------
1 files changed, 20 insertions(+), 7 deletions(-)
diff --git a/src/components/map/BaseMap.vue b/src/components/map/BaseMap.vue
index 3da7233..485f248 100644
--- a/src/components/map/BaseMap.vue
+++ b/src/components/map/BaseMap.vue
@@ -3,17 +3,30 @@
</template>
<script setup>
-import { onMounted, onUnmounted } from 'vue';
-import { createMap, map, destroyMap } from '@/utils/map/index';
+import { onMounted, onUnmounted } from 'vue'
+import { onMapMounted, createMap, satellite, map, destroyMap } from '@/utils/map/index'
+const props = defineProps({
+ showSatellite: {
+ type: Boolean,
+ default: false,
+ },
+})
onMounted(() => {
// 楂樺痉鍦板浘鍒濆鍖�
setTimeout(() => {
- createMap('container');
- }, 1000);
-});
+ createMap('container')
+ onMapMounted(() => {
+ if (props.showSatellite) {
+ satellite.show()
+ } else {
+ satellite.hide()
+ }
+ })
+ }, 1000)
+})
onUnmounted(() => {
- destroyMap();
-});
+ destroyMap()
+})
</script>
<style>
#container {
--
Gitblit v1.9.3