We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24a2887 commit 31ab568Copy full SHA for 31ab568
1 file changed
src/ui/components/FaImagePreview/index.vue
@@ -21,6 +21,12 @@ const isLoading = ref(true)
21
const isError = ref(false)
22
const isOpen = ref(false)
23
24
+// 监听 src 变化,重置加载状态
25
+watch(() => props.src, () => {
26
+ isLoading.value = true
27
+ isError.value = false
28
+}, { immediate: false })
29
+
30
function handleLoad() {
31
isLoading.value = false
32
emits('load')
0 commit comments