欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Swiper怎么在Vue中使用

這篇文章給大家介紹Swiper怎么在Vue中使用,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。

創(chuàng)新互聯(lián)建站專注于企業(yè)營(yíng)銷型網(wǎng)站、網(wǎng)站重做改版、范縣網(wǎng)站定制設(shè)計(jì)、自適應(yīng)品牌網(wǎng)站建設(shè)、成都h5網(wǎng)站建設(shè)、商城網(wǎng)站建設(shè)、集團(tuán)公司官網(wǎng)建設(shè)、成都外貿(mào)網(wǎng)站制作、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁(yè)設(shè)計(jì)等建站業(yè)務(wù),價(jià)格優(yōu)惠性價(jià)比高,為范縣等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。

首先使用npm 或者cnpm下載swiper 

cnpm install swiper

引入swiper

import Swiper from ‘swiper'; 
import ‘swiper/dist/css/swiper.min.css';

使用swiper

<div class="swiper-container">
  <div class="swiper-wrapper">
   <div class="swiper-slide">
    <img src="../../static/images/ad1.jpg" alt="">
   </div>
   <div class="swiper-slide">
    <img src="../../static/images/ad2.jpg" alt="">
   </div>
   <div class="swiper-slide">
    <img src="../../static/images/ad3.jpg" alt="">
   </div>
  </div>
 </div>

mounted里面調(diào)用

  mounted(){
    var mySwiper = new Swiper('.swiper-container', {
     autoplay:true,
     loop:true
    })
   },

注意

如果想要從后臺(tái)請(qǐng)求圖片放上去 new Swiper要寫在網(wǎng)絡(luò)請(qǐng)求成功的函數(shù)里面,否則不會(huì)出來數(shù)據(jù)。

slider組件的內(nèi)容如下:

<template>
 <swiper :options="swiperOption" ref="mySwiper">
  <!-- slides -->
  <swiper-slide v-for="(picitem,index) in items" :key="index">
   <img :src="picitem.src" alt="">
  </swiper-slide>
 </swiper>
</template>
<script type="text/ecmascript-6">
 import {swiper, swiperSlider} from 'vue-awesome-swiper'

 export default {
  data() {
   return {
    swiperOption: {
     notNextTick: true,
     loop: true,
     autoplay: true,
     speed: 1000,
     direction: 'horizontal',
     grabCursor: true,
     setWrapperSize: true,
     autoHeight: true,
     pagination: '.swiper-pagination',
     paginationClickable: true,
     mousewheelControl: true,
     observeParents: true,
     debugger: true
    },
    items: [
     {src: 'http://localhost/static/images/1.jpg'},
     {src: 'http://localhost/static/images/2.jpg'},
     {src: 'http://localhost/static/images/3.jpg'},
     {src: 'http://localhost/static/images/4.jpg'},
     {src: 'http://localhost/static/images/5.jpg'}
    ],
   }
  },
  components: {
   swiper,
   swiperSlider
  }
 }
</script>
<style lang="stylus" rel="sheetstylus">

</style>

關(guān)于Swiper怎么在Vue中使用就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。

分享題目:Swiper怎么在Vue中使用
本文URL:http://www.aaarwkj.com/article26/peghcg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站建設(shè)、移動(dòng)網(wǎng)站建設(shè)、微信公眾號(hào)、品牌網(wǎng)站建設(shè)、網(wǎng)站制作建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都seo排名網(wǎng)站優(yōu)化
日韩精品一区免费电影| 婷婷色中文字幕综合在线| 国产精品一区二区av不卡| 人妻中出中文字幕一区二区| 亚洲天堂网免费在线看| 久久这里只有精品伊人网| 日本视频天堂在线不卡| 一本之道高清久久久首页| 免费福利激情在线播放| 欧美日韩国产精品一区二区在线观看| 亚洲视频免费在线一区| 长腿丝袜美女亚洲一区二区| 传媒在线免费观看视频| 日韩亚洲人成网站在线播放| 91精品一区二区三区91人妻| 日本岛国一区二区在线| 亚洲欧美日韩在线第三页| 久久精品亚洲精品国产| 男同午夜视频在线观看| 国产熟乱老女人露脸视频| 久久久国产精品调教网站| 极品人妻视频中文字幕| 色悠悠色综合视频在线| 国产精品自产在线观看一| 不卡一区二区黄色av| 中文精品字幕人妻熟女小妇| 久久国产国内精品国语对白| 日韩av一区二区久久久| 成年人的黄色大片网站| 国产成人国产三级国产精品| 在线观看不卡的黄色地址| 97在线观看免费播放| 国内成人午夜激情视频| 欧美日韩国产福利在线观看| 国产老熟女高潮精品视频网站免费 | 少妇视频资源一区二区三区| 九九九热精品在线视频观看| 在线视频天堂亚洲天堂| 欧美一区二区三区日| 啄木乌法国一区二区三区 | 精品人妻aⅴ一区二区|