keep newest background removal history at front

This commit is contained in:
jingrow 2025-11-19 17:27:41 +08:00
parent ebc898c375
commit 6fab8c6830

View File

@ -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