diff --git a/src/components/map/MapContainer.vue b/src/components/map/MapContainer.vue index 4309fb8..7973e98 100644 --- a/src/components/map/MapContainer.vue +++ b/src/components/map/MapContainer.vue @@ -48,7 +48,7 @@ const initMap = async () => { map.value.on("click", (e: any) => { // console.log("点击", e.lnglat); - if (m_index >= 3) return; + if (m_index >= 1) return; // 调用函数并传入经纬度 getDistrictName(e.lnglat.lng, e.lnglat.lat, e); @@ -76,18 +76,18 @@ const initMap = async () => { m_index++; // 添加标记点击事件监听器 - // marker.on("click", (event: any) => { - // console.log("删除", event); - // markerList = markerList.filter((item: any) => { - // item[0] == marker._position.pos[0] && - // item[0] == marker._position.pos[0]; - // }); - // emits("changeMaps", markerList); - // // 在这里可以进行其他自定义逻辑操作 - // map.value.remove(marker); - // m_index--; - // marker = null; - // }); + marker.on("click", (event: any) => { + console.log("删除", event); + markerList = markerList.filter((item: any) => { + item[0] == marker._position.pos[0] && + item[0] == marker._position.pos[0]; + }); + emits("changeMaps", markerList); + // 在这里可以进行其他自定义逻辑操作 + map.value.remove(marker); + m_index--; + marker = null; + }); }); }; diff --git a/src/views/task/editTow.vue b/src/views/task/editTow.vue index b602c80..4faa146 100644 --- a/src/views/task/editTow.vue +++ b/src/views/task/editTow.vue @@ -54,10 +54,10 @@ placeholder="没有任务描述" /> - + diff --git a/src/views/task/taskCalendar.vue b/src/views/task/taskCalendar.vue index 41fc9f6..e618f3e 100644 --- a/src/views/task/taskCalendar.vue +++ b/src/views/task/taskCalendar.vue @@ -1,7 +1,7 @@