from:

https://blog.csdn.net/osdfhv/article/details/79062427

  1. <template>
  2. <div class="swiper-container">
  3. <div class="swiper-wrapper">
  4. <swiper :options="swiperOption" ref="mySwiper">
  5. <!-- 幻灯内容 -->
  6. <swiper-slide :key="i" v-for="(str, i) in bannerList">
  7. <img :src="str.picUrl" style="height:100%"/>
  8. </swiper-slide>
  9. <!-- 以下控件元素均为可选 -->
  10. <div class="swiper-pagination" slot="pagination"></div>
  11. </swiper>
  12. </div>
  13. </div>
  14. </template>
  15. <script type="text/ecmascript-6">
  16. import { swiper, swiperSlide } from 'vue-awesome-swiper'
  17. export default {
  18. props: ['bannerList'],
  19. data () {
  20. return {
  21. data: {},
  22. swiperOption: {
  23. // 所有配置均为可选(同Swiper配置)
  24. initialSlide: 0,
  25. pagination:'.swiper-pagination',//这里修改
  26. // pagination: {
  27. // el: '.swiper-pagination'
  28. // },
  29. loop: true,
  30. speed: 400,
  31. direction: 'horizontal',
  32. paginationClickable: true,
  33. mousewheelControl: true,
  34. autoplay: 1000,//这里修改
  35. //autoplay: true,
  36. autoplayDisableOnInteraction: false,
  37. observer: true,
  38. observeParents: true,
  39. debugger: true,
  40. onTransitionStart (swiper) {
  41. console.log(swiper)
  42. }
  43. }
  44. }
  45. },
  46. mounted () {
  47. // 这边就可以使用swiper这个对象去使用swiper官网中的那些方法
  48. this.swiper.slideTo(1, 1000, false)
  49. },
  50. computed: {
  51. swiper () {
  52. return this.$refs.mySwiper.swiper
  53. }
  54. },
  55. components: {
  56. swiper,
  57. swiperSlide
  58. }
  59. }
  60. </script>
  61. <style lang="stylus" rel="stylesheet/stylus">
  62. .swiper-container {
  63. width: 100%
  64. height: 10rem
  65. .swiper-wrapper {
  66. width: 100%
  67. height: 100%
  68. }
  69. .swiper-slide {
  70. background-position: center;
  71. background-size: cover;
  72. width: 100%
  73. height: 100%
  74. img {
  75. width: 100%
  76. height: 100%
  77. }
  78. }
  79. }
  80. </style>
  81.  
    • 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组件不能自动播放和导航器小圆点不显示问题的更多相关文章

  1. vue中解决chrome浏览器自动播放音频 和MP3语音打包到线上

    一.vue中解决chrome浏览器自动播放音频 需求 有新订单的时候,页面自动语音提示和弹出提示框: 问题 chrome浏览器在18年4月起,就在桌面浏览器全面禁止了音视频的自动播放功能.严格地来说, ...

  2. swf自动播放时如何全屏全部显示

    在QQ Show里面看到一个很可爱的挂件,很想把它弄下来.弄下来的方法很简单,直接去网页缓存文件里面找.找到了之后,按下面的方法插入到网页中: 1 <object height="10 ...

  3. Bootstrap之Carousel不能自动播放的解决办法(转)

    Bootstrap是一个非常好的css/javaScript框架,尤其对于移动端的自适应和适配能力都比较强. 用Bootstrap自带的Carousel写了一个图片轮播的广告部分,用js调用后却出现了 ...

  4. AdapterViewFlipper功能 自动播放的图片库

    案例中有"上一个""下一个""自动播放",但是我觉得可以更加完善一下,点击自动播放,按钮变成"停止播放",在按" ...

  5. 小程序实践(二):swiper组件实现轮播图效果

    swiper组件类似于Android中的ViewPager,实现类似轮播图的效果,相对于Android的Viewpager,swiper实现起来更加方便,快捷. 效果图: 首先看下swiper支持的属 ...

  6. Vue中怎样使用swiper组件?

    我用的VS Code编译器,首先打开终端,进入项目(我是在13-vue文件夹下面的elem中使用) D:\study\web\13-vue\elem> cnpm install vue-awes ...

  7. 在vue中使用swiper组件

    第一步:在终端的项目根目录下载安装swiper: cnpm/npm install vue-awesome-swiper --save; 第二步:在程序入口文件main.js中引用: import V ...

  8. vue轮播组件及去掉路由#

    最近公司要我去实现vue知识的系统讲解,总结一番,大致需要7节课,今天大致说一下我们使用vue需要学会的基本技能.vue是一个渐进性视图渲染框架,使用vue核心是数据出发,数据一般是我们前台从后台获取 ...

  9. vue 使用swiper的一些问题(页面渲染问题)

    //Swiper上下滚动初始化 swiper_init(){ this.$nextTick(function(){ var mySwiper = new Swiper ('.swiper-contai ...

随机推荐

  1. 加速Windows 2003关机速度的设置方法

    indows 2003是目前版本最高的Windows操作系统,虽然其功能比历史上任何一个版都要强,但是其关机操作却给大家带来了一些小麻烦.其实我们完全可以解除这些麻烦,让关机加速   一.关闭关机事件 ...

  2. 前端Js框架 UI框架汇总 特性 适用范围 选择

    身为一个资深后端工程师,面对层出不穷的前端框架,总让人眼花缭乱,做一个综合解析贴,从全局着眼,让我们明白各种前端框架的应用范围,为如何选择前端框架,从不同的维度提供一些线索,做为一个长期优化贴,欢迎指 ...

  3. DeBug Python代码全靠print函数?换用这个一天2K+Star的工具吧,改进版

    pysnooper是代码debug神器,比无限low print好很多和也比日志debug好一些,比断点调试也好一些,这个很犀利的装饰器. https://www.toutiao.com/a66829 ...

  4. [pig] pig 基础使用

    1.pig运行模式 本地模式: pig -x local 直接访问本地磁盘 集群模式: pig  或者 pig -x mapreduce 2.pig latin 交互 帮助信息 help 上传本地文件 ...

  5. Thread类的join()方法

    public class Demo { /** * Thread类的join()方法 * -------------------------------- * 1)join() * 2)join(lo ...

  6. linux/nginx命令

    1.ps查看服务器所有的进程: -aux 显示所有状态 -ef 简洁信息 ps -aux | grep node 第二列是pid,杀掉程序使用kill. ps -ef | grep node 第一列是 ...

  7. D5 F

    最近见到了好多跟排列有关的状压dp,好像略微会了一点,用 dp[i][s][j]表示第i位状态为s选择j的方案数,然后递推. 早起大概可以提高人的智商但是会导致人甚至不清,初始化写错了自闭了半个小时 ...

  8. 无网络 使用pip安装mxnet

    # 在有网络的同系统机器上运行以下命令:pip download mxnet# 目前mxnet版本为1.3.0,执行后当前目录得到以下文件: # . # ├── certifi--py2.py3-no ...

  9. pushd和popd

    [原文地址]   其实,很早就知道pushd和popd在linux中可以用来方便地在多个目录之间切换.那时比较浮躁,感觉切换目录没必要这么复杂.在实际中,发现通过使用pushd和popd能够极大地提高 ...

  10. jQuery 基本选择器 层次选择器 过滤选择器 内容过滤选择器 可见过滤选择器 属性过滤选择器 表单对象属性过滤选择器