vue中引入swiper

Posted 世界,太精彩

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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=‘item.profileUrl‘ target=‘_blank‘)
img(:src=‘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的主要内容,如果未能解决你的问题,请参考以下文章

Vue自学笔记(1)引入vue.js步骤

vue3中引入本地图片

vue项目中引入外部资源js

vue组件中怎么引入html文件

vue引入图片的方式

vue 引入自定义js 并使用