Closed mqqza closed 7 years ago
<template>
<div class="swiper-lazy-box">
<img class="swiper-lazy" :data-src="src" ref="imgEle">
</div>
</template>
<script>
export default {
name: 'lazyImage',
props: {
src: String
},
updated() {
this.$refs.imgEle.src = this.src
}
}
</script>
<div class="swiper-zoom-container">
<lazy-image :src="img"></lazy-image>
<div class="swiper-lazy-preloader"></div>
</div>
I have no better way, if you have, please leave a message.
@surmon-china updated() not work. I used mounted(). swiper-lazy-preloader not deleted.
@surmon-china how to set manually loading is finish?
data () {
return {
swiperOption: {
autoplay: {
delay: 3000,
stopOnLastSlide: false,
disableOnInteraction: false
},
pagination: {
el: '.swiper-pagination'
},
loop: true,
lazy: {
loadPrevNext: true
}
}
};
},
I have code like this. Then i'm update images from props. my thumbnail not update. My lazy load show me infinity loading but date already set.