1、安装
npm install vue-awesome-swiper --save-dev
2、在vue中引入
进入maim.js文件
import vueSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
Vue.use(vueSwiper)
3、页面调用
<template>
<swiper :options="swiperOption">
<swiper-slide class="swiper-slide" v-for="(item,index) in carouselArr" :key="index">
<img :src="item"/>
</swiper-slide>
<!-- 分页器 -->
<div class="swiper-pagination" slot="pagination"></div>
<!-- 左右箭头 -->
<div class="swiper-button-prev" slot="button-prev"></div>
<div class="swiper-button-next" slot="button-next"></div>
</swiper>
</template>
<script>
export default {
data(){
return {
swiperOption:{
//显示分页
pagination: {
el: '.swiper-pagination'
},
//设置点击箭头
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
},
//自动轮播
autoplay: {
delay: 2000,
//当用户滑动图片后继续自动轮播
disableOnInteraction: false,
},
//开启循环模式
loop: true
}
}
}
}
</script>
上面是“vue-awesome-swiper插件的使用”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_100.html
workflows工作流
一个男孩在吃西瓜ComfyUI工作流
一只可爱的草莓味冰淇淋卷筒
乡村枯树黄花comfyui工作流
图生图工作流:一键转换成高清动漫照片
1个粉红色头发可爱的女孩ComfyUI工作流
一对葫芦ComfyUI工作流
一朵染血的白玫瑰ComfyUI工作流
一个女孩骑着一辆生锈的现代摩托车
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

用ascii字符画图像
SVG路径动画效果
3d空间行走效果
纯css3绘制的小鸟
canvas经线动画走到效果
js导出excel插件(兼容mac电脑Numbers表格)
2023年程序猿如何给自己开启一场烟花盛会
数字滚动效果(兼容IE6/IE8)







