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组件不能自动播放和导航器小圆点不显示问题的更多相关文章

  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. ViZDoom深度预测(Depth Prediction)

    代码:github.com/huangshiyu13/ViZDoomDepth 图片被分成3x6的区域,利用模型预测每个区域的平均深度,效果如下图:

  2. sip协议中文讲解

    https://blog.csdn.net/qiuchangyong/article/details/50748854

  3. react proxy 报错

    react项目中,package.json中proxy的配置如下 "proxy": { "/api/rjwl": { "target": & ...

  4. centos6上调整lv逻辑卷

    author:headsen chen date:2019-03-18  14:48:17 1,查看分区状态,发现/ 分区不够用./home分区太大了.浪费 [root@localhost ~]# d ...

  5. Assembly.LoadFrom加载程序集类型转换失败解决方法

    为了让我的wcf模块框架支持自定义通道上下文,对代码又进行了一次小型的重构,测试时发现类型转换的错误,最后发现是loadfrom引起的.如果向 loadfrom 上下文中加载了一个程序集,则将激活 l ...

  6. Linux下查看设设置时间date命令

    查看时间 # date "+%Y_%m_%d  %H-%M-%S" 设置时间 #date -s "2018-05-17 09:51:50" //写入到硬件时钟 ...

  7. PHP计算显示平均温度、五个最低及最高温度

    <?php $month_temp = "78, 60, 62, 68, 71, 68, 73, 85, 66, 64, 76, 63, 81, 76, 73, 68, 72, 73, ...

  8. 利用mimikatz破解远程终端凭据,获取服务器密码

    测试环境:windows 10 道友们应该碰到过管理在本地保存远程终端的凭据,凭据里躺着诱人的胴体(服务器密码),早已让我们的XX饥渴难耐了.但是,胴体却裹了一身道袍(加密),待老衲操起法器将其宽衣解 ...

  9. 剑指offer——python【第2题】替换空格

    题目描述 请实现一个函数,将一个字符串中的每个空格替换成“%20”. 例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy. 理解 很容易想到用pytho ...

  10. ThinkPHP缓存技术(S(),F(),查询缓存,静态缓存)

    直接查看原网址 https://blog.csdn.net/u010081689/article/details/47976271