Jelajahi Sumber

地图默认初始化

Shannon_mu 3 tahun lalu
induk
melakukan
431cf3641b
2 mengubah file dengan 3 tambahan dan 2 penghapusan
  1. 2 1
      commandCenter/src/App.vue
  2. 1 1
      commandCenter/src/utils/AmapSearch.js

+ 2 - 1
commandCenter/src/App.vue

@@ -1,12 +1,13 @@
 <template>
     <div id="app">
-          <router-view></router-view>
+        <router-view></router-view>
         <xk-modal></xk-modal>
         <div class="dmp-alert" v-if="popupsList.length !== 0">
             <div class="dmp-alert-body" v-for="item in popupsList" :key="item.id">
                 <alert-modal :params="item"></alert-modal>
             </div>
         </div>
+        <div id="container"></div>
     </div>
 </template>
 <script>

+ 1 - 1
commandCenter/src/utils/AmapSearch.js

@@ -18,7 +18,7 @@ let times = setInterval(() => {
 }, 1000)
 
 window.onLoad = function () {
-	// var map = new AMap.Map('container');
+	var map = new AMap.Map('container');
 }
 
 /**