diff --git a/frontend/front/src/views/pages/regionalManage/components/regionManage.vue b/frontend/front/src/views/pages/regionalManage/components/regionManage.vue index 1901eff..826070a 100644 --- a/frontend/front/src/views/pages/regionalManage/components/regionManage.vue +++ b/frontend/front/src/views/pages/regionalManage/components/regionManage.vue @@ -364,9 +364,12 @@ export default { }).then((AMap)=>{ console.log('打印AMap====>',AMap); let that = this; - this.map = new T.Map('mapContainer',{ - projection: 'EPSG:900913' - }); + if(!this.map){ + // 防止二次初始化导致拖拽失效 + this.map = new T.Map('mapContainer',{ + projection: 'EPSG:900913' + }); + } this.map.centerAndZoom(new T.LngLat(this.centerPoint[0], this.centerPoint[1]), 16); //允许鼠标双击放大地图 this.map.enableScrollWheelZoom(); -- libgit2 0.21.2