首页 > 代码库 > vue中引入swiper
vue中引入swiper
import { swiper, swiperSlide } from ‘vue-awesome-swiper‘
data () {
return {
swiperOption: {
height: 160,
speed: 2000,
autoplay: 3000,
direction: ‘vertical‘,
autoHeight: true,
loop: true
}
}
},
swiper(:options=‘swiperOption‘ v-loading=‘loading‘ element-loading-text=‘数据加载中,请稍候...‘)
swiper-slide(v-for=‘rows in recs‘)
ul
li(v-for=‘item in rows‘)
a(:href=http://www.mamicode.com/‘item.profileUrl‘ target=‘_blank‘)
img(:src=http://www.mamicode.com/‘item.icon‘)
span.item
h3 {{item.nick}}
p.desc {{item.desc}}
p.statis
span 粉丝量:{{item.fans >= 1000000 ? Math.floor(item.fans / 10000) + ‘万‘ : item.fans}}
span 上周播放量:{{item.plays}}次
vue中引入swiper
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。