src/components/map/BaseMap.vue
@@ -3,12 +3,15 @@ </template> <script setup> import { onMounted } from 'vue'; import { createMap } from '@/utils/map/index_old'; import { onMounted, onUnmounted } from 'vue'; import { createMap, map } from '@/utils/map/index'; onMounted(() => { // 高德地图初始化 createMap('container'); }); onUnmounted(() => { map?.destroy(); }); </script> <style> #container {