vue-awesome-swiper组件不能自动播放和导航器小圆点不显示问题
from:
https://blog.csdn.net/osdfhv/article/details/79062427
<template>
<div class="swiper-container">
<div class="swiper-wrapper">
<swiper :options="swiperOption" ref="mySwiper">
<!-- 幻灯内容 -->
<swiper-slide :key="i" v-for="(str, i) in bannerList">
<img :src="str.picUrl" style="height:100%"/>
</swiper-slide>
<!-- 以下控件元素均为可选 -->
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
</div>
</div>
</template>
<script type="text/ecmascript-6">
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
props: ['bannerList'],
data () {
return {
data: {},
swiperOption: {
// 所有配置均为可选(同Swiper配置)
initialSlide: 0,
pagination:'.swiper-pagination',//这里修改
// pagination: {
// el: '.swiper-pagination'
// },
loop: true,
speed: 400,
direction: 'horizontal',
paginationClickable: true,
mousewheelControl: true,
autoplay: 1000,//这里修改
//autoplay: true,
autoplayDisableOnInteraction: false,
observer: true,
observeParents: true,
debugger: true,
onTransitionStart (swiper) {
console.log(swiper)
}
}
}
},
mounted () {
// 这边就可以使用swiper这个对象去使用swiper官网中的那些方法
this.swiper.slideTo(1, 1000, false)
},
computed: {
swiper () {
return this.$refs.mySwiper.swiper
}
},
components: {
swiper,
swiperSlide
}
}
</script>
<style lang="stylus" rel="stylesheet/stylus">
.swiper-container {
width: 100%
height: 10rem
.swiper-wrapper {
width: 100%
height: 100%
}
.swiper-slide {
background-position: center;
background-size: cover;
width: 100%
height: 100%
img {
width: 100%
height: 100%
}
}
}
</style>
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
结果发现:不能自动轮播和导航器小圆点不显示
vue-awesome-swiper组件不能自动播放和导航器小圆点不显示问题的更多相关文章
- vue中解决chrome浏览器自动播放音频 和MP3语音打包到线上
一.vue中解决chrome浏览器自动播放音频 需求 有新订单的时候,页面自动语音提示和弹出提示框: 问题 chrome浏览器在18年4月起,就在桌面浏览器全面禁止了音视频的自动播放功能.严格地来说, ...
- swf自动播放时如何全屏全部显示
在QQ Show里面看到一个很可爱的挂件,很想把它弄下来.弄下来的方法很简单,直接去网页缓存文件里面找.找到了之后,按下面的方法插入到网页中: 1 <object height="10 ...
- Bootstrap之Carousel不能自动播放的解决办法(转)
Bootstrap是一个非常好的css/javaScript框架,尤其对于移动端的自适应和适配能力都比较强. 用Bootstrap自带的Carousel写了一个图片轮播的广告部分,用js调用后却出现了 ...
- AdapterViewFlipper功能 自动播放的图片库
案例中有"上一个""下一个""自动播放",但是我觉得可以更加完善一下,点击自动播放,按钮变成"停止播放",在按" ...
- 小程序实践(二):swiper组件实现轮播图效果
swiper组件类似于Android中的ViewPager,实现类似轮播图的效果,相对于Android的Viewpager,swiper实现起来更加方便,快捷. 效果图: 首先看下swiper支持的属 ...
- Vue中怎样使用swiper组件?
我用的VS Code编译器,首先打开终端,进入项目(我是在13-vue文件夹下面的elem中使用) D:\study\web\13-vue\elem> cnpm install vue-awes ...
- 在vue中使用swiper组件
第一步:在终端的项目根目录下载安装swiper: cnpm/npm install vue-awesome-swiper --save; 第二步:在程序入口文件main.js中引用: import V ...
- vue轮播组件及去掉路由#
最近公司要我去实现vue知识的系统讲解,总结一番,大致需要7节课,今天大致说一下我们使用vue需要学会的基本技能.vue是一个渐进性视图渲染框架,使用vue核心是数据出发,数据一般是我们前台从后台获取 ...
- vue 使用swiper的一些问题(页面渲染问题)
//Swiper上下滚动初始化 swiper_init(){ this.$nextTick(function(){ var mySwiper = new Swiper ('.swiper-contai ...
随机推荐
- 加速Windows 2003关机速度的设置方法
indows 2003是目前版本最高的Windows操作系统,虽然其功能比历史上任何一个版都要强,但是其关机操作却给大家带来了一些小麻烦.其实我们完全可以解除这些麻烦,让关机加速 一.关闭关机事件 ...
- 前端Js框架 UI框架汇总 特性 适用范围 选择
身为一个资深后端工程师,面对层出不穷的前端框架,总让人眼花缭乱,做一个综合解析贴,从全局着眼,让我们明白各种前端框架的应用范围,为如何选择前端框架,从不同的维度提供一些线索,做为一个长期优化贴,欢迎指 ...
- DeBug Python代码全靠print函数?换用这个一天2K+Star的工具吧,改进版
pysnooper是代码debug神器,比无限low print好很多和也比日志debug好一些,比断点调试也好一些,这个很犀利的装饰器. https://www.toutiao.com/a66829 ...
- [pig] pig 基础使用
1.pig运行模式 本地模式: pig -x local 直接访问本地磁盘 集群模式: pig 或者 pig -x mapreduce 2.pig latin 交互 帮助信息 help 上传本地文件 ...
- Thread类的join()方法
public class Demo { /** * Thread类的join()方法 * -------------------------------- * 1)join() * 2)join(lo ...
- linux/nginx命令
1.ps查看服务器所有的进程: -aux 显示所有状态 -ef 简洁信息 ps -aux | grep node 第二列是pid,杀掉程序使用kill. ps -ef | grep node 第一列是 ...
- D5 F
最近见到了好多跟排列有关的状压dp,好像略微会了一点,用 dp[i][s][j]表示第i位状态为s选择j的方案数,然后递推. 早起大概可以提高人的智商但是会导致人甚至不清,初始化写错了自闭了半个小时 ...
- 无网络 使用pip安装mxnet
# 在有网络的同系统机器上运行以下命令:pip download mxnet# 目前mxnet版本为1.3.0,执行后当前目录得到以下文件: # . # ├── certifi--py2.py3-no ...
- pushd和popd
[原文地址] 其实,很早就知道pushd和popd在linux中可以用来方便地在多个目录之间切换.那时比较浮躁,感觉切换目录没必要这么复杂.在实际中,发现通过使用pushd和popd能够极大地提高 ...
- jQuery 基本选择器 层次选择器 过滤选择器 内容过滤选择器 可见过滤选择器 属性过滤选择器 表单对象属性过滤选择器