This commit is contained in:
		
							parent
							
								
									534baec75d
								
							
						
					
					
						commit
						ce846cc58f
					
				| 
						 | 
				
			
			@ -70,6 +70,7 @@ export default {
 | 
			
		|||
  watch: {
 | 
			
		||||
    positionPoint: {
 | 
			
		||||
      handler(newVal) {
 | 
			
		||||
        if (newVal) {
 | 
			
		||||
          if (newVal && this.latitude && this.longitude && window.olMap) {
 | 
			
		||||
            const newLocation = fromLonLat(
 | 
			
		||||
              [this.longitude, this.latitude],
 | 
			
		||||
| 
						 | 
				
			
			@ -81,10 +82,12 @@ export default {
 | 
			
		|||
              center: newLocation,
 | 
			
		||||
              zoom: 13
 | 
			
		||||
            });
 | 
			
		||||
          this.$store.commit("SET_POSITIONPOINT", false);
 | 
			
		||||
        } else {
 | 
			
		||||
          }
 | 
			
		||||
          if (this.latitude === "" && this.longitude === "") {
 | 
			
		||||
            this.$message.error("定位失败,请稍后重试");
 | 
			
		||||
          }
 | 
			
		||||
          this.$store.commit("SET_POSITIONPOINT", false);
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      deep: true
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue