|
沙发
楼主 |
发表于 2019-1-25 14:41:04
|
只看该作者
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="item swiper-slide" v-for="(item,index) in projectlist">
<div class="con" @click='toDetail(index)'>
<div id="meetings-wap" class="tops-right" :class="{invisable:information.isMeeting!=1}" @click="toMeeting(index);">
<div class="meetings"></div>
</div>
<div class="box-v box-center progress" :style="fnHeights(item_h)">
<canvas v-bind:id="'myCanvas'+index" class="myCanvas" width=250 height=250 :style="fnWh(item_h)"></canvas>
<div class="box-v box-center perw" :style="fnCancasHeights(item_h)">
<div v-bind:id="'per'+index" class="per" v-if="information.elapse_days!=null">0</div>
<div class="per" v-else>0</div>
<div class="txt">Days</div>
</div>
</div>
<div class="mgrname">
{{LimitNumber(item.outline)}}{{index}}
</div>
</div>
</div>
</div>
<!-- <div class="swiper-pagination"></div> swiper-container-->
</div>
methods: {
initSwiper: function(size, num) {
var elooP;
if (size > 3) {
elooP = true;
} else {
elooP = false;
}
var mySwiper = new Swiper('.swiper-container', {
loop: elooP,
observer: true,
observeParents: true,
on: {
slideChangeTransitionStart: function() {
console.log(this.realIndex)
var spans = dbox.getElementsByClassName("swiper-slides");
for (var i in spans) {
var nodo = spans;
i == this.realIndex ? nodo.className = "swiper-slides focus" : nodo.className = "swiper-slides unfocus";
}
onselect(this.realIndex, "{}");
if (size > 3) {
updateNavPosition(this.realIndex);
}
}
},
});
},
求帮忙怎么起开在开启loop又不致使出现复制第一个跟最后一个的问题。或者关闭环路,怎么做到最后一个回滚到第一个 |
|