在mpvue
中,onPullDownRefresh
直接能用
1、首先要保证配置
{path: 'pages/user',config: {navigationBarTitleText: '个人中心',navigationBarBackgroundColor: theme['@primary-color'],enablePullDownRefresh: true}}
2、和methods
同层级写
onPullDownRefresh() {wx.showNavigationBarLoading()console.log('pull')wx.stopPullDownRefresh()
}