uniapp:scroll | 您所在的位置:网站首页 › uniapp上拉刷新加载下一页 › uniapp:scroll |
1. swiper禁止滑动
//禁止swiper滑动
stopTouchMove() {
return false
},
2. scroll-view触底加载
uniapp-scrollView 顺便解决了ios下拉,顶部和底部有白屏的问题 { "path": "pages/index/index", "style": { "enablePullDownRefresh": false, "disableScroll": true//pages.json里面加这个 } }, 内容 export default { data(){ return { isloading: false, } }, methods:{ // 触底加载 touchBottom() { if (this.isloading) return if (!this.anhuiCheck) { if (this.totalPage > this.pageNum) { this.pageNum++; this.searchGoods(this.queryGoods.parentCatId, this.typeCheck); } else { uni.$showMsg('暂无其他商品') } } }, } } .body { width: 100%; height: 100vh; } 3. scroll-view下拉刷新的问题选择uniapp自带的下拉刷新还是scroll-view看场景 选择哪一个,点这个链接 scroll-view下拉刷新 4. scroll-view回顶部场景:从首页跳转到别的页面再返回来的时候,直接返回首页顶部 点击跳转文章 |
今日新闻 |
推荐新闻 |
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 |