mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 19:06:36 +08:00
fix(ImagePreview): fix loading when previewing images (#11376)
This commit is contained in:
parent
7f834d57eb
commit
851c967ad9
@ -204,10 +204,12 @@ export default defineComponent({
|
|||||||
// so the initial complete state should be checked.
|
// so the initial complete state should be checked.
|
||||||
// https://github.com/youzan/vant/issues/11335
|
// https://github.com/youzan/vant/issues/11335
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
nextTick(() => {
|
||||||
if (imageRef.value?.complete) {
|
if (imageRef.value?.complete) {
|
||||||
onLoad();
|
onLoad();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
return () => (
|
return () => (
|
||||||
<div
|
<div
|
||||||
|
Loading…
x
Reference in New Issue
Block a user