ソースを参照

fix(map): unable to display suspended components after refreshing

Casper Dai 2 年 前
コミット
ac11facd3d
1 ファイル変更6 行追加5 行削除
  1. 6 5
      src/views/dashboard/map/index.vue

+ 6 - 5
src/views/dashboard/map/index.vue

@@ -53,10 +53,11 @@
           @click="onRefresh"
         />
       </div>
-      <div
-        ref="map"
-        class="l-flex__fill u-relative"
-      >
+      <div class="l-flex__fill l-flex u-relative">
+        <div
+          ref="map"
+          class="l-flex__fill"
+        />
         <i
           v-if="deviceOptions.loaded"
           class="o-place el-icon-place has-active"
@@ -291,7 +292,7 @@ export default {
       })
     },
     onPlace () {
-      this.map.setFitView()
+      this.map?.setFitView()
     },
     activeDevice (id, marker) {
       this.map.setFitView(marker)