Browse Source

修改cesium 重复应用问题

BAI 5 ngày trước cách đây
mục cha
commit
6cd2145be2
2 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 0 2
      src/App.vue
  2. 2 3
      src/views/HomeView.vue

+ 0 - 2
src/App.vue

@@ -1,10 +1,8 @@
 <template>
   <router-view />
-  <CesiumMap />
 </template>
 <script setup>
 import { onMounted, onBeforeUnmount } from 'vue'
-import CesiumMap from './components/CesiumMap.vue'
 import autofit from 'autofit.js'
 
 const initAutoFit = () => {

+ 2 - 3
src/views/HomeView.vue

@@ -205,9 +205,8 @@ export default {
 /* 地图容器样式 */
 .map-container {
   position: absolute;
-  left: 0;
-  right: 0;
-  top: 0;
+  width: 100%;
+  height: 100%;
   bottom: 0;
   z-index: 1;
   overflow: hidden;