fix: 修复在列表中未找到当前图像时的处理逻辑

This commit is contained in:
kuaifan 2025-09-20 07:30:45 +08:00
parent 5e1f3c5564
commit 7660164583

View File

@ -3919,7 +3919,11 @@ export default {
//
const current = $A.thumbRestore(currentUrl)
if (!list.find(item => $A.thumbRestore(item.src) == current)) {
return false
list.unshift({
src: currentUrl,
width: 0,
height: 0,
})
}
//
this.$store.dispatch("previewImage", {index: currentUrl, list})