mirror of
https://github.com/kubesphere/website.git
synced 2025-12-25 15:32:54 +00:00
fix: Meetup slide problem
Signed-off-by: TheYoungManLi <cjl@kubesphere.io>
This commit is contained in:
parent
e2bd653466
commit
9b66c0c125
|
|
@ -241,6 +241,7 @@
|
|||
current: null,
|
||||
create: function () {
|
||||
const documentWidth = $(document).width()
|
||||
const childNum = $('#swiper-wrapper').children().length
|
||||
const option = {
|
||||
autoplay: {
|
||||
running: true,
|
||||
|
|
@ -249,11 +250,12 @@
|
|||
},
|
||||
delay: autoplayTime,
|
||||
speed: 500,
|
||||
loop: true,
|
||||
loop: childNum > 3 ? true : false,
|
||||
}
|
||||
if (documentWidth > 800) {
|
||||
option.slidesPerView = 3
|
||||
option.spaceBetween = 20
|
||||
hideSlideButton(childNum <= 3)
|
||||
}
|
||||
|
||||
if (documentWidth < 800) {
|
||||
|
|
@ -310,6 +312,16 @@
|
|||
})
|
||||
}
|
||||
|
||||
var hideSlideButton = function (hide) {
|
||||
if (hide) {
|
||||
$('.prev-button').hide()
|
||||
$('.next-button').hide()
|
||||
} else {
|
||||
$('.prev-button').show()
|
||||
$('.next-button').show()
|
||||
}
|
||||
}
|
||||
|
||||
bindClickVideoTabLi()
|
||||
bindClickVideoLi()
|
||||
initVideos()
|
||||
|
|
|
|||
Loading…
Reference in New Issue