<template>
<div>
<swiper :options="swiperOption" ref="mySwiper">
<swiper-slide :key="i" v-for="(item, i) in imgList" >
<img :src="item.src" class="home_swiper_img" />
</swiper-slide>
</swiper>
</div>
</template>
<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import SwiperCore, { Autoplay,EffectCube} from 'swiper';
SwiperCore.use([Autoplay,EffectCube]);
export default {
data() {
return {
imgList: [
{ src: require("../assets/timg.jpg")},
{ src: require("../assets/timg.jpg")}
],
swiperOption: {
effect: 'cube',
grabCursor: true,
loop: true,
autoplay: {
delay: 2000,
disableOnInteraction: false,
},
coverflowEffect: {
rotate:
vue中swiper实现3D效果
最新推荐文章于 2024-07-23 14:59:06 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)