Authored by 沈志敏

Swiper 懒加载

... ... @@ -5,7 +5,7 @@
{{# list}}
<li class="swiper-slide">
<a href="javascript:;">
<img src="{{image img 450 600}}" alt="">
<img class="swiper-lazy" data-src="{{image img 450 600}}" alt="">
</a>
</li>
{{/ list}}
... ...
... ... @@ -5,8 +5,10 @@ var $ = require('yoho-jquery'),
// 顶部swiper
new Swiper('.banner-swiper', {
preloadImages: false,
lazyLoading: true,
lazyLoadingInPrevNext: true,
lazyLoadingOnTransitionStart: true,
paginationClickable: true,
pagination: '.banner-top .pagination-inner',
nextButton: '.my-swiper-button-next',
... ...