为了账号安全,请及时绑定邮箱和手机立即绑定

vue.js swiper最简单的例子跑不同

vue.js swiper最简单的例子跑不同

swiper的最简单例子跑不通,所有slide都堆在一起了,这个问题困扰我很久了,查网上发现并没有少写什么啊,求明眼人提示一下,多谢。效果图:代码: <template>   <div class="lasted-books">     <div class="content">       <div class="lasted-list">         <div class="list-title">           <p class="title-text">最新上架</p>         </div>         <swiper :options="swiperOptionIn" class="swiper-position">           <swiper-slide>Slide 1</swiper-slide>           <swiper-slide>Slide 2</swiper-slide>           <swiper-slide>Slide 3</swiper-slide>           <swiper-slide>Slide 4</swiper-slide>           <swiper-slide>Slide 5</swiper-slide>           <swiper-slide>Slide 6</swiper-slide>           <swiper-slide>Slide 7</swiper-slide>           <swiper-slide>Slide 8</swiper-slide>           <swiper-slide>Slide 9</swiper-slide>           <swiper-slide>Slide 10</swiper-slide>           <div class="swiper-pagination-white swiper-pagination-position" slot="pagination"></div>       </swiper>     </div>   </div></div></template><script type="text/ecmascript-6">   import {swiper, swiperSlide} from 'vue-awesome-swiper'   import { mapGetters } from 'vuex'   export default {    components: {       swiper,       swiperSlide     },     data () {      return {        swiperOptionIn: {          centeredSlides:true,          pagination: '.swiper-pagination-white',          paginationClickable: true,          slidesPerView:'auto',          grabCursor : true,         }       }     },    computed: {       ...mapGetters({        bookList: 'books'       })     }   }</script><style scoped lang="less" rel="stylesheet/less">   .lasted-books {     margin-top: 50px;     .content {       .lasted-list {         background: #fff;         margin-top: 10px;         box-shadow: 0 0 10px #DDD;         .list-title {           height: 50px;           text-align: center;           line-height: 50px;         }         .swiper-position {           position: relative;           cursor: pointer;           .swiper-slide {             width:100%;             display: flex;             text-align:center;             font-size:28px;             justify-content:center;             align-items:center;             background:#F2F2F2;           }         }         .swiper-pagination-position {           position: absolute;           z-index: 1;           display: flex;           flex-direction: row;           justify-content: center;         }       }     }   }
查看完整描述

2 回答

?
qq_1_123

TA贡献1条经验 获得超0个赞

最近install下来的这个vue-awesome-swiper好像没有css了 我跑之前的项目样式还能加上去 重新install样式就加不上了 

查看完整回答
反对 回复 2017-09-07
  • 2 回答
  • 0 关注
  • 4388 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信