From 6fab8c6830089cd692ad4950fdef698058e62377 Mon Sep 17 00:00:00 2001 From: jingrow Date: Wed, 19 Nov 2025 17:27:41 +0800 Subject: [PATCH] keep newest background removal history at front --- apps/jingrow/frontend/src/views/tools/RemoveBackground.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/jingrow/frontend/src/views/tools/RemoveBackground.vue b/apps/jingrow/frontend/src/views/tools/RemoveBackground.vue index fe6b21a..813d0c7 100644 --- a/apps/jingrow/frontend/src/views/tools/RemoveBackground.vue +++ b/apps/jingrow/frontend/src/views/tools/RemoveBackground.vue @@ -427,8 +427,8 @@ const handleRemoveBackground = async () => { resultImage: firstResult.image_content, timestamp: Date.now() } - historyList.value.push(historyItem) - currentHistoryIndex.value = historyList.value.length - 1 + historyList.value.unshift(historyItem) + currentHistoryIndex.value = 0 } else if (currentHistoryIndex.value >= 0) { // 如果是从历史记录中选择的,更新该历史记录项的结果 historyList.value[currentHistoryIndex.value].resultImage = firstResult.image_content