bug
This commit is contained in:
		| @@ -165,6 +165,7 @@ | |||||||
|         ) |         ) | ||||||
|       }, |       }, | ||||||
|       handleSliderOption(e) { |       handleSliderOption(e) { | ||||||
|  |         console.log(e) | ||||||
|         this.selected = { |         this.selected = { | ||||||
|           command: e.type, |           command: e.type, | ||||||
|           ...e.node |           ...e.node | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ | |||||||
|                @onConfirm="handleConfirm"> |                @onConfirm="handleConfirm"> | ||||||
|       <div id="amap" v-if="dialog"/> |       <div id="amap" v-if="dialog"/> | ||||||
|       <div class="poi"> |       <div class="poi"> | ||||||
|         <el-input ref="poiInput" v-model="search" size="small" clearable @change="handleSearch" placeholder="请输入地点"/> |         <el-input ref="poiInput" v-model="search" size="small" clearable v-throttle="handleSearch" placeholder="请输入地点"/> | ||||||
|       </div> |       </div> | ||||||
|       <el-form class="selected" v-if="!!selected.location" id="result" size="mini" label-suffix=":" |       <el-form class="selected" v-if="!!selected.location" id="result" size="mini" label-suffix=":" | ||||||
|                label-position="left"> |                label-position="left"> | ||||||
| @@ -55,7 +55,6 @@ export default { | |||||||
|         plugins: ['AMap.PlaceSearch', 'AMap.Marker', 'AMap.Geolocation'], |         plugins: ['AMap.PlaceSearch', 'AMap.Marker', 'AMap.Geolocation'], | ||||||
|       }).then(AMap => { |       }).then(AMap => { | ||||||
|         this.AMap = AMap |         this.AMap = AMap | ||||||
|         console.log(this.latlng) |  | ||||||
|         this.map = new AMap.Map('amap', { |         this.map = new AMap.Map('amap', { | ||||||
|           zoom: 14, |           zoom: 14, | ||||||
|           center: this.latlng ? [this.latlng.lng, this.latlng.lat] : '' |           center: this.latlng ? [this.latlng.lng, this.latlng.lat] : '' | ||||||
| @@ -93,9 +92,9 @@ export default { | |||||||
|         this.map.addControl(this.geo) |         this.map.addControl(this.geo) | ||||||
|       }) |       }) | ||||||
|     }, |     }, | ||||||
|     handleSearch(v) { |     handleSearch() { | ||||||
|       if (v) { |       if (this.search) { | ||||||
|         this.poi.searchNearBy(v, this.map.getCenter(), 50000) |         this.poi.searchNearBy(this.search, this.map.getCenter(), 50000) | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     handleConfirm() { |     handleConfirm() { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user