json文件中配置 "enablePullDownRefresh":true開啟下拉刷新
{
"usingComponents": {
},
"enablePullDownRefresh":true
}
js文件中 wx.stopPullDownRefresh關(guān)閉小程序刷新動畫(這里我用的是自己的動畫所以關(guān)閉),再執(zhí)行對應(yīng)自己的邏輯即可
// 下拉刷新
onPullDownRefresh(){
wx.stopPullDownRefresh();
},