当前位置: 首页 > Web前端 > HTML

uni-app下拉刷新加载刷新数据

时间:2023-04-02 15:38:08 HTML

onPullDownRefresh监听本页面用户下拉刷新事件,需要在pages.json中开启enablePullDownRefresh"globalStyle":{}处理数据刷新时,uni.stopPullDownRefresh可以停止当前页面的下拉刷新uni.startPullDownRefresh(OBJECT)successFunction无接口调用成功回调failFunction无接口调用失败回调completeFunction无回调函数uni.stopPullDownRefresh()停止当前页面的下拉刷新page.json开启下拉刷新{"pages":[{"path":"pages/index/index","style":{"navigationBarTitleText":"hiuni","enablePullDownRefresh":true}},index.vue{{item}}onPullDownRefresh:函数(){这个.getList();},navigateuni.navigateTouni.redirectTouni.reLaunchuni.switchTabuni.navigateBackuni.navigateTo(OBJECT)保持当前页面,跳转到应用中的某个页面,使用uni.navigateBack返回原页面。uni.redirectTo(OBJECT)关闭当前页面并跳转到应用程序中的某个页面。uni.reLaunch关闭所有页面并打开到应用程序中的某个页面。uni.switchTab跳转到tabBar页面并关闭所有其他非tabBar页面。uni.navigateBack关闭当前页面并返回上一页或多级页面设置导航栏/api/system/info1、系统信息2、网络状态3、加速度计4、来电5、剪贴板6、屏幕亮度7、震动请及时联系我们整改,我们会尽快处理。请喜欢它!因为您的认可/鼓励是我写作最大的动力!欢迎来到达达简书!这是一个有品质有态度的博客