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

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://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)化
九九免费在线视频观看| 少妇高潮喷水下面的水| 十八禁在线观看国产一区| 欧美aⅴ一区二区三区| 夫妻性生活一级片视频| 日韩av一区二区三区在线| 欧美日韩在线不卡一区| 日韩视频播放一区二区| 亚洲老司机深夜福利| 在线激情av中文字幕| av影片在线观看不卡| av毛片在线播放免费| 天堂av在线一区二区三区| av天堂黄色在线观看| 18以下的人禁止看的视频| 亚洲成人av在线直播| 密臀av一区二区三区| 成人永久免费播放平台| 中文成人无字幕乱码精品| 亚洲国产偷拍在线观看| 99热这里有精品久久| 国产午夜福利视频合集| 日韩国产一区二区三区精品 | 国产亚洲视频一区二区观看| 国产三级精品三线在线观看| 久久中文字幕一区二区三区| 国产精品欧美久久久久无| 99热这里只有精品中文| 97精品久久九九中文字幕| 少妇高潮特黄在线观看| 久久91亚洲精品中文字幕| 国产精品一区二区三区播放| 宫部凉花中文字幕在线| 人妻少妇中文字幕一区| 伊人欧美一区二区三区| 亚洲av天堂天天天堂色| 性知音国产精品粉色视频| 久久婷婷国产综合色啪| 日本韩国国产三级在线| 国产av剧情精品亚洲| 加勒比久草免费在线观看|