From b08d79abe870d5cf0725ff6f3d34f4afb57b8992 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Fri, 7 Feb 2025 09:24:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E9=94=80=E9=87=8D=E5=81=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mapPage/realTimeMap/editMap.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue index c5cbf1b3..cfa27b08 100644 --- a/src/views/mapPage/realTimeMap/editMap.vue +++ b/src/views/mapPage/realTimeMap/editMap.vue @@ -152,7 +152,7 @@ const addEditHistory = () => { //要判断是不是在最新的记录上修改 如果不是 要把currentIndex之后的记录都删掉 保持当前修改是最新的 if (currentIndex.value !== allHistoryList.value.length - 1) { allHistoryList.value = allHistoryList.value.splice(0, currentIndex.value) - currentIndex.value++ + currentIndex.value = allHistoryList.value.length allHistoryList.value.push(JSON.parse(JSON.stringify(imgList.value))) } else { currentIndex.value++ @@ -165,6 +165,7 @@ const addEditHistory = () => { const backPreviousStep = () => { if (currentIndex.value > 0) { currentIndex.value-- + imgList.value = allHistoryList.value[currentIndex.value] console.log('撤销', allHistoryList.value[currentIndex.value]) } else { message.warning('没了老铁') @@ -174,6 +175,7 @@ const backPreviousStep = () => { const backNextStep = () => { if (currentIndex.value < allHistoryList.value.length - 1) { currentIndex.value++ + imgList.value = allHistoryList.value[currentIndex.value] console.log('重做', allHistoryList.value[currentIndex.value]) } else { message.warning('没了老铁')