遇到的坑,记录一下,
问题.onReachBottom,onPullDownRefresh无法触发
解决办法:需要将onReachBottom,onPullDownRefresh放到与methods同级的位置,否则无法触发。
具体使用方法:
第一步:定义enablePullDownRefresh,backgroundTextStyle
如果单独引用,则在对应的main.json文件中添加
"enablePullDownRefresh": true,
"backgroundTextStyle": "dark", // 或者light,看自己需求

如果在全局中引入,则在app.json中引入

第二步: 在需要使用的.vue文件中引入onReachBottom,onPullDownRefresh。记得与methods同级!


本文详细介绍了在使用onReachBottom和onPullDownRefresh时遇到的常见问题及解决办法。通过调整其在.vue文件中的位置,确保与methods同级,可以有效解决无法触发的问题。同时,文章还提供了如何在main.json或app.json中正确配置enablePullDownRefresh和backgroundTextStyle的方法。
1468





