From 6f4cbcc24aa286f1e7f731a06abb2aaa9f984c21 Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Fri, 18 Aug 2023 12:10:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/map/MapContainer.vue | 26 +++++++++++++-------------
src/views/task/editTow.vue | 4 ++--
src/views/task/taskCalendar.vue | 8 ++------
src/views/task_template/map.vue | 11 ++++++++++-
4 files changed, 27 insertions(+), 22 deletions(-)
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 @@
-->
+
+
+