|
|
@ -6,10 +6,6 @@ |
|
|
|
:virtual="true" |
|
|
|
:spaceBetween="0" |
|
|
|
:loop="true" |
|
|
|
:autoplay="{ |
|
|
|
delay: 5000, |
|
|
|
disableOnInteraction: false, |
|
|
|
}" |
|
|
|
@swiper="onSwiper" |
|
|
|
@slideChange="onSlideChange" |
|
|
|
:keyboard="{ |
|
|
@ -17,6 +13,10 @@ |
|
|
|
onlyInViewport: false, |
|
|
|
pageUpDown: true, |
|
|
|
}" |
|
|
|
:autoplay="{ |
|
|
|
delay: 5000, |
|
|
|
disableOnInteraction: false, |
|
|
|
}" |
|
|
|
@autoplayTimeLeft="onAutoplayTimeLeft" |
|
|
|
class="header_swiper ignore-min-width" |
|
|
|
> |
|
|
@ -35,13 +35,6 @@ |
|
|
|
<swiper-slide :virtualIndex="5"> |
|
|
|
<SlideThree /> |
|
|
|
</swiper-slide> |
|
|
|
<template #container-end> |
|
|
|
<div class="autoplay-progress"> |
|
|
|
<svg viewBox="0 0 48 48" ref="progressLine"> |
|
|
|
<line x1="-200" y1="2" x2="300" y2="2"></line> |
|
|
|
</svg> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</swiper> |
|
|
|
<div :class="isWhite ? 'down_circle' : 'down_circle bg_b'" @click="toNext"> |
|
|
|
<img |
|
|
@ -93,6 +86,17 @@ export default { |
|
|
|
const { activeIndex, previousIndex } = swiper |
|
|
|
// totalTitleAni(activeIndex, previousIndex) |
|
|
|
swiperStore.updateHeaderIndex(activeIndex) |
|
|
|
console.log(activeIndex) |
|
|
|
if (activeIndex == 4) { |
|
|
|
console.log(swiper.pagination.bullets) |
|
|
|
if (swiper.pagination.bullets.length > 0) { |
|
|
|
swiper.pagination.bullets[3].classList.add('active-class-2') |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (swiper.pagination.bullets.length > 0) { |
|
|
|
swiper.pagination.bullets[3].classList.remove('active-class-2') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
getSrc() { |
|
|
|
if (this.isWhite) { |
|
|
@ -112,17 +116,20 @@ export default { |
|
|
|
}, |
|
|
|
setup() { |
|
|
|
const progressLine = ref(null) |
|
|
|
const onAutoplayTimeLeft = (s, time, progress) => { |
|
|
|
progressLine.value.style.setProperty('--progress', 1 - progress) |
|
|
|
} |
|
|
|
// const onAutoplayTimeLeft = (s, time, progress) => { |
|
|
|
// progressLine.value.style.setProperty('--progress', 1 - progress) |
|
|
|
// } |
|
|
|
return { |
|
|
|
onAutoplayTimeLeft, |
|
|
|
// onAutoplayTimeLeft, |
|
|
|
progressLine, |
|
|
|
Arrow, |
|
|
|
pagination: { |
|
|
|
clickable: true, |
|
|
|
bulletActiveClass: 'active-class-1', |
|
|
|
renderBullet: function (index, className) { |
|
|
|
return '<div class="' + className + '"></div>' |
|
|
|
return `<div class="${className}"><p class="home_swiper_page_num">0${ |
|
|
|
index + 1 |
|
|
|
}<p/></div>` |
|
|
|
}, |
|
|
|
}, |
|
|
|
modules: [Pagination, Autoplay, Keyboard, Virtual], |
|
|
|