Skip to content

Commit

Permalink
[Update] adaptive swiper
Browse files Browse the repository at this point in the history
  • Loading branch information
JunyaoHu committed Aug 7, 2023
1 parent 725ee29 commit 1eb66ff
Showing 1 changed file with 31 additions and 29 deletions.
60 changes: 31 additions & 29 deletions src/components/sections/Carousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,37 @@ export default {

<template>
<div>

<swiper
:loop="true"
:slidesPerView="1"
:breakpoints="{
600: {
slidesPerView: 2,
},
800: {
slidesPerView: 3,
},
}"
:modules="modules"
:navigation="{ }"
:pagination="{
clickable:true,
type:'bullets'
}"
:autoplay="{
delay:5000,
disableOnInteraction:false,
pauseOnMouseEnter:true,
}"
>
<swiper-slide v-for="path in image_paths">
<el-image :src="path"/>
</swiper-slide>
</swiper>

<el-row>
<el-col :lg="24" :xl="16">
<swiper
:loop="true"
:slidesPerView="1"
:breakpoints="{
600: {
slidesPerView: 2,
},
800: {
slidesPerView: 3,
},
}"
:modules="modules"
:navigation="{ }"
:pagination="{
clickable:true,
type:'bullets'
}"
:autoplay="{
delay:5000,
disableOnInteraction:false,
pauseOnMouseEnter:true,
}"
>
<swiper-slide v-for="path in image_paths">
<el-image :src="path"/>
</swiper-slide>
</swiper>
</el-col>
</el-row>
</div>
</template>

Expand Down

0 comments on commit 1eb66ff

Please sign in to comment.