keep newest background removal history at front
This commit is contained in:
parent
ebc898c375
commit
6fab8c6830
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user