fix(ImagePreview): fix loading when previewing images (#11376)

This commit is contained in:
Gavin
2022-12-13 10:26:22 +08:00
committed by GitHub
parent 7f834d57eb
commit 851c967ad9
+5 -3
View File
@@ -204,9 +204,11 @@ export default defineComponent({
// so the initial complete state should be checked.
// https://github.com/youzan/vant/issues/11335
onMounted(() => {
if (imageRef.value?.complete) {
onLoad();
}
nextTick(() => {
if (imageRef.value?.complete) {
onLoad();
}
});
});
return () => (