src/components/map/leafletMap.vue
@@ -74,6 +74,11 @@ }, locationMap() { debugger if (this.map_point && this.map_point.y) { this.map.setView([eval(this.map_point.y), eval(this.map_point.x)], this.map_zoom); } if (this.mark && this.map) { // 创建一个 Marker 实例: var marker = L.marker([eval(this.map_point.y), eval(this.map_point.x)]).addTo( @@ -82,7 +87,6 @@ let that = this // 将创建的点标记添加到已有的地图实例: marker.on("click", function (e) { console.log("666"); that.$emit("fatherMethod"); }); }