小程序 scroll-view 無法觸發 onReachBottom 解決辦法


<scroll-view bindscrolltolower="YourFunction" lower-threshold="50"></scroll-view>

 

1 YoourFunction(){
2     console.log("觸底了");
3     wx.showToast({
4       title: '加載中...',
5       icon: 'loading',
6       duration: 2000
7     })
8 }

 

bindscrolltolower eventhandle  滾動到底部/右邊時觸發

lower-threshold number/string 距底部/右邊多遠時,觸發 scrolltolower 事件

文檔:https://developers.weixin.qq.com/miniprogram/dev/component/scroll-view.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM