Skip to content

Commit

Permalink
fix: migrate to Swiper Element from Swiper Vue
Browse files Browse the repository at this point in the history
Co-authored-by: bessyhuang <[email protected]>
  • Loading branch information
rileychh and bessyhuang committed Dec 8, 2024
1 parent 6d34255 commit 819b774
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions components/FlickrCarousel.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup>
import { Swiper, SwiperSlide } from 'swiper/vue'
import 'swiper/css'
import 'swiper/swiper-bundle.css'
import { register } from 'swiper/element/bundle'
Expand All @@ -24,24 +23,24 @@ const images = [image1, image2, image3, image4, image5, image6, image7, image8,
</script>

<template>
<Swiper
<swiper-container
:autoplay="{ delay: 2500, disableOnInteraction: false }"
:loop="true"
:pagination="{ clickable: true }"
:slides-per-view="3"
:space-between="10"
:speed="500"
>
<SwiperSlide
<swiper-slide
v-for="src in images"
:key="src"
>
<img
alt="Image slide"
:src="src"
>
</SwiperSlide>
</Swiper>
</swiper-slide>
</swiper-container>
</template>

<style>
Expand Down

0 comments on commit 819b774

Please sign in to comment.