zoukankan      html  css  js  c++  java
  • uni-app下拉刷新加载刷新数据

    onPullDownRefresh监听该页面用户下拉刷新事件需要在 pages.json 里开启 enablePullDownRefresh

    "globalStyle": {
    }

    当处理完数据刷新后,uni.stopPullDownRefresh 可以停止当前页面的下拉刷新

    uni.startPullDownRefresh(OBJECT)

    success Function 否 接口调用成功的回调fail Function 否 接口调用失败的回调函数complete Function 否 接口调用结束的回调函数

    uni.stopPullDownRefresh()停止当前页面下拉刷新

    page.json 开启下拉刷新

    {
     "pages": [
      {
       "path": "pages/index/index",
       "style": {
        "navigationBarTitleText": "hi uni",
        "enablePullDownRefresh": true
       }
      }, 

    index.vue

    <view v-for="(item, index) in newsList" class="newslist">{{item}}</view>
    
    onPullDownRefresh:function(){
      this.getList();
     },

    导航

    uni.navigateTo

    uni.redirectTo

    uni.reLaunch

    uni.switchTab

    uni.navigateBack

    uni.navigateTo(OBJECT)

    保留当前页面,跳转到应用内的某个页面,使用uni.navigateBack可以返回到原页面。

    uni.redirectTo(OBJECT)

    关闭当前页面,跳转到应用内的某个页面。

    uni.reLaunch关闭所有页面,打开到应用内的某个页面。

    uni.switchTab跳转到 tabBar 页面,并关闭其他所有非 tabBar 页面。

    uni.navigateBack关闭当前页面,返回上一页面或多级页面

    设置导航条uni.setNavigationBarTitleuni.showNavigationBarLoadinguni.hideNavigationBarLoadinguni.setNavigationBarColor

    uni.showToastuni.showLoadinguni.hideToastuni.hideLoadinguni.showModaluni.showActionSheethttps://uniapp.dcloud.io/api/system/info

    1、系统信息

    2、网络状态

    3、加速度计

    4、拨打电话

    5、剪贴板

    6、屏幕亮度

    7、振动

    若本号内容有做得不到位的地方(比如:涉及版权或其他问题),请及时联系我们进行整改即可,会在第一时间进行处理。

    请点赞!因为你们的赞同/鼓励是我写作的最大动力!

    欢迎关注达达的简书!

    这是一个有质量,有态度的博客

    博客

  • 相关阅读:
    C# 隐式转换 显示转换
    C# 枚举几种写法细节
    C# System.Int32 与 int 区别
    JavaScript中的闭包
    JS Arguments对象
    分页存储过程 sql
    JS Select 选项清空
    WebGL学习笔记三
    WebGL学习笔记二
    WebGL学习笔记一
  • 原文地址:https://www.cnblogs.com/dashucoding/p/11932287.html
Copyright © 2011-2022 走看看