2017-04-16 11 views
0

내가 내 onRendered 기능에 다음과 같은함으로써 작업 swiper을 얻을 수 있었다 :방법 nolimits4web를 초기화 : 유성 도우미에서 swiper가

var mySwiper = new Swiper ('.swiper-container', { 
// Optional parameters 
direction: 'vertical', 
loop: false, 
scrollbarSnapOnRelease: true, 
watchSlidesProgress: true, 
pagination: '.swiper-pagination', 
paginationHide: false 
//further parameters at http://idangero.us/swiper/api/#.WPMOXt8xA8o 
}); 
$('.block-btn').focus(function() { 
$('.block-btn .cls-1').css({"fill": "#3A3A3A"}); 
}); 
$('.block-btn').blur(function() { 
$('.block-btn .cls-1').css({"fill": "#e2e2e2"}); 
}); 

가 지금은 카드 덱을 갖고 싶어 (예를 들어, 부싯깃)와 슬라이더 각 카드 안에 있습니다. onRendered 함수를 사용하면 슬라이더는 첫 번째 카드에서만 초기화됩니다. 다음 카드에서는 작동하지 않습니다. 변경 될 때마다 초기화 할 수 있습니까 (새 프로파일 카드가 표시됩니까?). 간단한 도우미가 작동하지 않음

답변

0

게시 한 직후, 별도의 도우미에서 mySwiper.update()를 사용하면 문제가 해결되었습니다. 어떤 이유로 든 총알은 생각을 다시 설정하지 않습니다. 누군가가 내 대답을 찾기 위해 오래 걸리는 경우에 대비하여 여기에 남겨 둡니다.)

http://idangero.us/swiper/api/#.WPMZUt8xA8o