Swiper中文论坛
标题:
angularjs中使用swiper延迟加载图片,只显示第一张。
[打印本页]
作者:
dym
时间:
2016-3-31 12:28
标题:
angularjs中使用swiper延迟加载图片,只显示第一张。
<div ng-controller="receiptpreviewController" data-ng-init="initReceiptList()" class="swiper-container" my-main-directive>
<div ng-repeat="receipt in receiptList" class="swiper-wrapper" my-repeat-directive>
<div class="swiper-slide" ng-click="navi.popPage()">
<img data-ng-src="{{receipt.previewSrc}}" width="100%" class="swiper-lazy">
</div>
</div>
</div>
但是在onLazyImageReady中看元素,的确加载到了图片的src
就是显示不出来。这是怎么回事啊 求高手指点。
作者:
jiudan
时间:
2016-3-31 14:49
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img class="pic swiper-lazy" src="images/pic320x166.v2.png" data-src="images/index-banner-v1.jpg" >
<div class="swiper-lazy-preloader"></div>
</div>
<div class="swiper-slide">
<img class="pic swiper-lazy" src="images/pic320x166.v2.png" data-src="images/index-banner-v1.jpg" >
<div class="swiper-lazy-preloader"></div>
</div>
<div class="swiper-slide">
<img class="pic swiper-lazy" src="images/pic320x166.v2.png" data-src="images/index-banner-v1.jpg" >
<div class="swiper-lazy-preloader"></div>
</div>
<div class="swiper-slide">
<img class="pic swiper-lazy" src="images/pic320x166.v2.png" data-src="images/index-banner-v1.jpg" >
<div class="swiper-lazy-preloader"></div>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
//轮番图
var mySwiper = new Swiper('.swiper-container', {
loop:true,
pagination : '.swiper-pagination',
preloadImages: false,
lazyLoading: true
});
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2