|
|
@ -44,15 +44,13 @@ function onClick(item: Record<string, any>) { |
|
|
|
selectedImage.value = item |
|
|
|
selectedImage.value = item |
|
|
|
modalVisible.value = false |
|
|
|
modalVisible.value = false |
|
|
|
|
|
|
|
|
|
|
|
const stopHandle = watch(selectedImage, (nextImage, _, onCleanup) => { |
|
|
|
const stopHandle = watch(selectedImage, (nextImage) => { |
|
|
|
if (!nextImage) { |
|
|
|
if (!nextImage) { |
|
|
|
setTimeout(() => { |
|
|
|
setTimeout(() => { |
|
|
|
modalVisible.value = true |
|
|
|
modalVisible.value = true |
|
|
|
}, 50) |
|
|
|
}, 50) |
|
|
|
stopHandle?.() |
|
|
|
stopHandle?.() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onCleanup(() => stopHandle?.()) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|