浏览代码

修改cesium 重复应用问题

BAI 5 天之前
父节点
当前提交
6cd2145be2
共有 2 个文件被更改,包括 2 次插入5 次删除
  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;