版权声明:转载请评论留言 https://blog.csdn.net/solocao/article/details/86628628
在mpvue
中,onPullDownRefresh
直接能用
1、首先要保证配置
{
path: 'pages/user',
config: {
navigationBarTitleText: '个人中心',
navigationBarBackgroundColor: theme['@primary-color'],
enablePullDownRefresh: true
}
}
2、和methods
同层级写
onPullDownRefresh() {
wx.showNavigationBarLoading()
console.log('pull')
wx.stopPullDownRefresh()
}