循环轮播显示有问题,还有如果把.wrapper里的样式取消注释,小圆点就不显示了

<template>
<div class="wrapper">
<swiper :options="swiperOption" v-for="item of swiperList" :key="item.id">
<!-- slides -->
<swiper-slide>
<img :src="item.imgUrl" alt="" class="img-list">
</swiper-slide>
<!-- Optional controls -->
<div class="swiper-pagination" slot="pagination"></div>
</swiper>
</div>
</template>
<script>
export default {
name: 'HomeSwiper',
data () {
return {
swiperOption: {
pagination: '.swiper-pagination'
},
swiperList: [{
id: '0001',
imgUrl: 'https://cdn.pixabay.com/photo/2014/07/30/02/00/iceberg-404966__340.jpg'
}, {
id: '0002',
imgUrl: 'https://cdn.pixabay.com/photo/2018/03/12/20/07/maldives-3220702__340.jpg'
}, {
id: '0003',
imgUrl: 'https://cdn.pixabay.com/photo/2015/01/08/15/48/creek-593146__340.jpg'
}]
}
}
}
</script>
<style lang="stylus" scoped>
.wrapper >>> .swiper-pagination-bullet-active
background :#fff
// .wrapper
// overflow :hidden
// width :100%
// height :0
// padding-bottom :32.05%
// background-color #CCC
.img-list
width :100%
height :2.34rem
</style>25
收起
正在回答 回答被采纳积分+1
3回答
4.Vue与React高级框架开发
- 参与学习 人
- 提交作业 239 份
- 解答问题 10739 个
本阶段带你深入前端开发的肌理,通过ES6基础知识和前端主流高级框架的学习,助你快速构建企业级移动webAPP应用,进入职场的终极battle
了解课程




恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星