1.需求页面列表需要下拉刷新功能
2.在page.json 配置enablePullDownRefresh:true 无效
3.解决方案
1.查看支付宝开发文档
pp.json 的 window 选项中配置 “allowsBounceVertical”: “YES”,并且在页面对应的 .json 文件中配置 “pullRefresh”: true,
4.修改配置
{
"path": "pages/allSite/index",//全部站点
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor":"#FFFFFF",
"navigationBarTextStyle": "black",
"pullRefresh": true,
// "navigationStyle": "custom",
"mp-alipay": {
"transparentTitle": "none",
"pullRefresh": true
}
}
}
],
"easycom": {
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
},
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"mp-alipay": {
"allowsBounceVertical": "NO",
"allowsBounceVertical": "YES"
}
},
5.效果