mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(ImagePreview): fix loading when previewing images (#11376)
This commit is contained in:
parent
7f834d57eb
commit
851c967ad9
@ -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 () => (
|
||||
|
Loading…
x
Reference in New Issue
Block a user