最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

vue-awesome-swiper滑塊插件使用方法詳解

 更新時(shí)間:2022年01月27日 17:15:29   作者:大灰狼的小綿羊哥哥  
這篇文章主要為大家詳細(xì)介紹了vue-awesome-swiper滑塊插件的使用方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

本文實(shí)例為大家分享了vue-awesome-swiper滑塊插件的使用方法,供大家參考,具體內(nèi)容如下

github地址

1.進(jìn)入項(xiàng)目目錄,安裝swiper

npm install vue-awesome-swiper --save

2.引入資源

//vue滑塊
import VueAwesomeSwiper from 'vue-awesome-swiper'
Vue.use(VueAwesomeSwiper)

3.編輯組件

<template>
<swiper :options="swiperOption" ref="mySwiper">
 <!-- slides -->
 <swiper-slide>I'm Slide 1</swiper-slide>
 <swiper-slide>I'm Slide 2</swiper-slide>
 <swiper-slide>I'm Slide 3</swiper-slide>
 <swiper-slide>I'm Slide 4</swiper-slide>
 <swiper-slide>I'm Slide 5</swiper-slide>
 <swiper-slide>I'm Slide 6</swiper-slide>
 <swiper-slide>I'm Slide 7</swiper-slide>
 <!-- Optional controls -->
 <div class="swiper-pagination" slot="pagination"></div>
 <div class="swiper-button-prev" slot="button-prev"></div>
 <div class="swiper-button-next" slot="button-next"></div>
 <div class="swiper-scrollbar" slot="scrollbar"></div>
</swiper>
</template>
<script>
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
 name: 'carrousel',
 data() {
 return {
  swiperOption: {
  // NotNextTick is a component's own property, and if notNextTick is set to true, the component will not instantiate the swiper through NextTick, which means you can get the swiper object the first time (if you need to use the get swiper object to do what Things, then this property must be true)
  // notNextTick是一個(gè)組件自有屬性,如果notNextTick設(shè)置為true,組件則不會(huì)通過(guò)NextTick來(lái)實(shí)例化swiper,也就意味著你可以在第一時(shí)間獲取到swiper對(duì)象,假如你需要?jiǎng)偧虞d遍使用獲取swiper對(duì)象來(lái)做什么事,那么這個(gè)屬性一定要是true
  notNextTick: true,
  // swiper configs 所有的配置同swiper官方api配置
  autoplay: 3000,
  // direction : 'vertical',
  effect:"coverflow",
  grabCursor : true,
  setWrapperSize :true,
  // autoHeight: true,
  // paginationType:"bullets",
  pagination : '.swiper-pagination',
  paginationClickable :true,
  prevButton:'.swiper-button-prev',
  nextButton:'.swiper-button-next',
  // scrollbar:'.swiper-scrollbar',
  mousewheelControl : true,
  observeParents:true,
  // if you need use plugins in the swiper, you can config in here like this
  // 如果自行設(shè)計(jì)了插件,那么插件的一些配置相關(guān)參數(shù),也應(yīng)該出現(xiàn)在這個(gè)對(duì)象中,如下debugger
  // debugger: true,
  // swiper callbacks
  // swiper的各種回調(diào)函數(shù)也可以出現(xiàn)在這個(gè)對(duì)象中,和swiper官方一樣
  // onTransitionStart(swiper){
  // console.log(swiper)
  // },
  // more Swiper configs and callbacks...
  // ...
  }
 }
 },components: {
 swiper,
 swiperSlide
},
 // you can find current swiper instance object like this, while the notNextTick property value must be true
 // 如果你需要得到當(dāng)前的swiper對(duì)象來(lái)做一些事情,你可以像下面這樣定義一個(gè)方法屬性來(lái)獲取當(dāng)前的swiper對(duì)象,同時(shí)notNextTick必須為true
 computed: {
 swiper() {
  return this.$refs.mySwiper.swiper
 }
 },
 mounted() {
 // you can use current swiper instance object to do something(swiper methods)
 // 然后你就可以使用當(dāng)前上下文內(nèi)的swiper對(duì)象去做你想做的事了
 // console.log('this is current swiper instance object', this.swiper)
 // this.swiper.slideTo(3, 1000, false)
 }
}
</script>

根據(jù)官方api進(jìn)行調(diào)整

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • nuxt.js寫項(xiàng)目時(shí)增加錯(cuò)誤提示頁(yè)面操作

    nuxt.js寫項(xiàng)目時(shí)增加錯(cuò)誤提示頁(yè)面操作

    這篇文章主要介紹了nuxt.js寫項(xiàng)目時(shí)增加錯(cuò)誤提示頁(yè)面操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧
    2020-11-11
  • VueJS全面解析

    VueJS全面解析

    Vue.js(讀音 /vju&#720;/, 類似于 view) 是一套構(gòu)建用戶界面的漸進(jìn)式框架。與其他重量級(jí)框架不同的是,Vue 采用自底向上增量開(kāi)發(fā)的設(shè)計(jì)。這篇文章主要介紹了VueJS全面解析的相關(guān)資料,需要的朋友可以參考下
    2016-11-11
  • 使用Vue完成一個(gè)簡(jiǎn)單的todolist的方法

    使用Vue完成一個(gè)簡(jiǎn)單的todolist的方法

    本篇文章主要介紹了使用Vue完成一個(gè)簡(jiǎn)單的todolist的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-12-12
  • 用vue和node寫的簡(jiǎn)易購(gòu)物車實(shí)現(xiàn)

    用vue和node寫的簡(jiǎn)易購(gòu)物車實(shí)現(xiàn)

    這篇文章主要介紹了用vue和node寫的簡(jiǎn)易購(gòu)物車實(shí)現(xiàn),小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-04-04
  • webpack4打包vue前端多頁(yè)面項(xiàng)目

    webpack4打包vue前端多頁(yè)面項(xiàng)目

    這篇文章主要介紹了webpack4打包vue前端多頁(yè)面項(xiàng)目的相關(guān)知識(shí),非常不錯(cuò),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2018-09-09
  • Vue3+Vite使用雙token實(shí)現(xiàn)無(wú)感刷新

    Vue3+Vite使用雙token實(shí)現(xiàn)無(wú)感刷新

    本文主要介紹了Vue3+Vite使用雙token實(shí)現(xiàn)無(wú)感刷新,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-04-04
  • VUE解決微信簽名及SPA微信invalid signature問(wèn)題(完美處理)

    VUE解決微信簽名及SPA微信invalid signature問(wèn)題(完美處理)

    這篇文章主要介紹了VUE解決微信簽名及SPA微信invalid signature問(wèn)題(完美處理),小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2019-03-03
  • vue vantUI tab切換時(shí) list組件不觸發(fā)load事件的問(wèn)題及解決方法

    vue vantUI tab切換時(shí) list組件不觸發(fā)load事件的問(wèn)題及解決方法

    這篇文章主要介紹了vue vantUI tab切換時(shí) list組件不觸發(fā)load事件的解決辦法,本文給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2020-02-02
  • vue?elementUI?處理文件批量上傳方式

    vue?elementUI?處理文件批量上傳方式

    這篇文章主要介紹了vue?elementUI?處理文件批量上傳方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-04-04
  • Vue+Element ui實(shí)現(xiàn)樹(shù)形控件右鍵菜單

    Vue+Element ui實(shí)現(xiàn)樹(shù)形控件右鍵菜單

    這篇文章主要為大家詳細(xì)介紹了Vue+Element ui實(shí)現(xiàn)樹(shù)形控件右鍵菜單,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2022-07-07

最新評(píng)論

深圳市| 南木林县| 武定县| 称多县| 上蔡县| 孙吴县| 沐川县| 鲜城| 分宜县| 娱乐| 诸城市| 承德县| 滕州市| 隆林| 睢宁县| 南召县| 马山县| 平乐县| 永胜县| 林周县| 昭苏县| 黑山县| 拜泉县| 扬中市| 尉氏县| 仪征市| 土默特左旗| 汉阴县| 荔浦县| 寿光市| 绥滨县| 海兴县| 嘉义市| 罗定市| 安仁县| 泰宁县| 朔州市| 营山县| 平阳县| 泾川县| 芷江|