From 69665852a126bd4a4ef085a46a3145108e4aa29c Mon Sep 17 00:00:00 2001 From: 7thlayer Date: Tue, 4 Nov 2025 07:44:39 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DFaImagePreview?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=9B=B4=E6=94=B9src=E5=80=BC=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E9=87=8D=E7=BD=AE=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/components/FaImagePreview/index.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/components/FaImagePreview/index.vue b/src/ui/components/FaImagePreview/index.vue index 02e8d25f..9ebb4430 100644 --- a/src/ui/components/FaImagePreview/index.vue +++ b/src/ui/components/FaImagePreview/index.vue @@ -21,6 +21,12 @@ const isLoading = ref(true) const isError = ref(false) const isOpen = ref(false) +// 监听 src 变化,重置加载状态 +watch(() => props.src, () => { + isLoading.value = true + isError.value = false +}, { immediate: false }) + function handleLoad() { isLoading.value = false emits('load')