vue 翻頁(yè)組件vue-flip-page效果
方法
change (改變頁(yè)面)
tap (點(diǎn)擊)
turning (正在翻頁(yè))
prev (前一頁(yè))
next (后一頁(yè))
翻到指定頁(yè)面:
handleSwitchManual(index) { if (index === this.currentIndex) return; this.$refs["turn"].toPage(index); this.currentIndex = index; this.goods_id = this.manuals[this.currentIndex].goods_id; this.show = false; },
傳入?yún)?shù):
| 參數(shù) | type | example | describe | | ------ | ---- | -------- | ---------- | | width | number | 375 | 寬度 | | height | number | 667 | 高度 | | data | Array | [ { "picture_image": "https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2600216442,2384386498&fm=15&gp=0.jpg", }, { "picture_image": "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1580807703833&di=0ab054549c3ea050dc0bd49e146b20e9&imgtype=0&src=http%3A%2F%2Fwww.thatsmags.com%2Fimage%2Fview%2F201703%2Fvue-cover.jpg", }] | 傳入的數(shù)據(jù) | npm包 npm install vue-flip-page
在需要用到的頁(yè)面中(注意 一個(gè)頁(yè)面目前只能引入一次)
import turn from "vue-flip-page"; components: { turn }
例子:
效果:
樣式:
.manual-wrap { position: relative; z-index: 0; width: 100%; height: 100%; opacity: 0; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-transform: scale(0.95); transform: scale(0.95); -webkit-transition: opacity ease 0.5s; transition: opacity ease 0.5s; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; -o-user-select: none; } .manual-wrap.active { -webkit-transform: scale(1); transform: scale(1); opacity: 1; }
總結(jié)
以上所述是小編給大家介紹的vue 翻頁(yè)組件vue-flip-page效果,希望對(duì)大家有所幫助!
相關(guān)文章
VUE設(shè)置和清除定時(shí)器的方式及遇到的問題
?最近需要再頁(yè)面里做個(gè)倒計(jì)時(shí),發(fā)現(xiàn)用clearInterval()清除定時(shí)器失效,下面這篇文章主要給大家介紹了關(guān)于VUE設(shè)置和清除定時(shí)器的方式及遇到的問題的相關(guān)資料,需要的朋友可以參考下2022-10-10vue安裝和使用scss及sass與scss的區(qū)別詳解
這篇文章主要介紹了vue安裝和使用教程,用了很久css預(yù)編譯器,但是一直不太清楚到底用的sass還是scss,直到有天被問住了有點(diǎn)尷尬,感興趣的朋友一起看看吧2018-10-10ElementUI中el-form組件的rules參數(shù)舉例詳解
Form組件提供了表單驗(yàn)證的功能,只需要通過rules屬性傳入約定的驗(yàn)證規(guī)則,并將Form-Item的prop屬性設(shè)置為需校驗(yàn)的字段名即可,下面這篇文章主要給大家介紹了關(guān)于ElementUI中el-form組件的rules參數(shù)的相關(guān)資料,需要的朋友可以參考下2023-10-10vue-cli項(xiàng)目使用mock數(shù)據(jù)的方法(借助express)
現(xiàn)如今前后端分離開發(fā)越來越普遍,前端人員寫好頁(yè)面后可以自己模擬一些數(shù)據(jù)進(jìn)行代碼測(cè)試,這樣就不必等后端接口,提高了我們開發(fā)效率。今天就來分析下前端常用的mock數(shù)據(jù)的方式是如何實(shí)現(xiàn)的,需要的朋友可以參考下2019-04-04Vue3搭建組件庫(kù)開發(fā)環(huán)境的示例詳解
這篇文章給大家分享Vue3搭建組件庫(kù)開發(fā)環(huán)境,給大家講解依次搭建組件庫(kù)、example、文檔、cli,本文內(nèi)容是搭建組件庫(kù)的開發(fā)環(huán)境的過程,感興趣的朋友跟隨小編一起看看吧2022-11-11Vue3中ref和reactive的基本使用及區(qū)別詳析
這篇文章主要給大家介紹了關(guān)于Vue3中ref和reactive的基本使用及區(qū)別的相關(guān)資料,需要的朋友可以參考下2022-07-07解決electron打包vue-element-admin項(xiàng)目頁(yè)面無法跳轉(zhuǎn)的問題小結(jié)
這篇文章主要介紹了解決electron打包vue-element-admin項(xiàng)目頁(yè)面無法跳轉(zhuǎn)的問題小結(jié),本文通過實(shí)例代碼給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下吧2024-03-03