vue 翻頁組件vue-flip-page效果
更新時間:2020年02月05日 16:47:38 作者:Harriet嘉
這篇文章主要介紹了vue 翻頁組件vue-flip-page,本文通過實例代碼給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下
方法
change (改變頁面)
tap (點擊)
turning (正在翻頁)
prev (前一頁)
next (后一頁)
翻到指定頁面:
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; },
傳入參數(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ù)據 | npm包 npm install vue-flip-page
在需要用到的頁面中(注意 一個頁面目前只能引入一次)
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; }
總結
以上所述是小編給大家介紹的vue 翻頁組件vue-flip-page效果,希望對大家有所幫助!
相關文章
vue安裝和使用scss及sass與scss的區(qū)別詳解
這篇文章主要介紹了vue安裝和使用教程,用了很久css預編譯器,但是一直不太清楚到底用的sass還是scss,直到有天被問住了有點尷尬,感興趣的朋友一起看看吧2018-10-10ElementUI中el-form組件的rules參數(shù)舉例詳解
Form組件提供了表單驗證的功能,只需要通過rules屬性傳入約定的驗證規(guī)則,并將Form-Item的prop屬性設置為需校驗的字段名即可,下面這篇文章主要給大家介紹了關于ElementUI中el-form組件的rules參數(shù)的相關資料,需要的朋友可以參考下2023-10-10vue-cli項目使用mock數(shù)據的方法(借助express)
現(xiàn)如今前后端分離開發(fā)越來越普遍,前端人員寫好頁面后可以自己模擬一些數(shù)據進行代碼測試,這樣就不必等后端接口,提高了我們開發(fā)效率。今天就來分析下前端常用的mock數(shù)據的方式是如何實現(xiàn)的,需要的朋友可以參考下2019-04-04Vue3中ref和reactive的基本使用及區(qū)別詳析
這篇文章主要給大家介紹了關于Vue3中ref和reactive的基本使用及區(qū)別的相關資料,需要的朋友可以參考下2022-07-07解決electron打包vue-element-admin項目頁面無法跳轉的問題小結
這篇文章主要介紹了解決electron打包vue-element-admin項目頁面無法跳轉的問題小結,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友參考下吧2024-03-03