json里加这个
"enablePullDownRefresh": true
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
console.log('下拉刷新?')
// 显示标题栏进度条效果
wx.showNavigationBarLoading();
this.setlist()
setTimeout(function () {
wx.hideNavigationBarLoading();
wx.stopPullDownRefresh();
}, 2000);
// 取消页面刷新动画
},
缓慢回显样式
.row {
animation: listfadeIn 1s;
}
@keyframes listfadeIn {
from {
margin-top: 50px;
}
to {
margin-top: 0px;
}
}