Selaa lähdekoodia

fix:GPS设置地图延时加载

jinx 4 vuotta sitten
vanhempi
commit
7119de6683
1 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 6 3
      locat/addDataSet.html

+ 6 - 3
locat/addDataSet.html

@@ -321,9 +321,12 @@
             mounted() {
                 this.getContorlPoint()
                 this.sceneNum = window.location.pathname.split('/')[2]
-                let t = setTimeout(() => {
-                    this.map = this.initMap('map');
-                }, 0)
+                this.$nextTick(() => {
+                    let t = setTimeout(() => {
+                        this.map = this.initMap('map');
+                    }, 100)
+                })
+
 
 
             },