上拉加载底部转圈圈动画并文字提示

<block>
    <view class="listFooterLoading" wx:if="{{loadStatus==1}}">
    <!-- 转圈圈 -->
      <view class="m-load2">
        <view class="line"><view></view><view></view><view></view><view></view><view></view><view></view></view>
        <view class="circlebg"></view>
      </view>
      <view class=‘load-word‘>加载中</view>
    </view>
    <text class="listFooter" wx:elif="{{loadStatus==2}}">没有更多数据了!</text>
    <text class="listFooter" wx:elif="{{loadStatus==-1}}">数据加载失败,请检查网络</text>
    <text class="listFooter" wx:elif="{{loadStatus==-2}}" >没有任何数据!</text>
</block>
.listFooter{
    color: #888888;
    background: #EFEFF4;
    display: block;
    text-align: center;
    width: 100%;
    font-size: 28rpx;
    height:104rpx;
    padding-top: 46rpx;
}
/* 加载中 */
.listFooterLoading{
    color: #888888;
    background: #EFEFF4;
    text-align: center;
    width: 100%;
    font-size: 28rpx;
    height:104rpx;
    padding-top: 46rpx;
    display: flex;
    justify-content: center;
}
.load-word{
  margin-left: 23rpx;
}
/************* 上拉加载的转圈圈 **************/
.m-load2{width:36rpx;height:36rpx;}
.m-load2{background:#EFEFF4;}
/** 加载动画的静态样式 **/
.m-load2{position:relative;}
.m-load2 .line view{position:absolute;left:16rpx;top:0;width:3rpx;height:36rpx;}
.m-load2 .line view:before,.m-load2 .line view:after{content:‘‘;display:block;height:50%;background:#96969C;border-radius:5rpx;}
.m-load2 .line view:nth-child(2){transform:rotate(30deg);}
.m-load2 .line view:nth-child(3){transform:rotate(60deg);}
.m-load2 .line view:nth-child(4){transform:rotate(90deg);}
.m-load2 .line view:nth-child(5){transform:rotate(120deg);}
.m-load2 .line view:nth-child(6){transform:rotate(150deg);}
.m-load2 .circlebg{position:absolute;left:50%;top:50%;width:18rpx;height:18rpx;margin:-9rpx 0 0 -9rpx;background:#EFEFF4;border-radius:18rpx;}
/** 加载动画 **/
@keyframes load{
    0%{opacity:0;}
    100%{opacity:1;}
}
.m-load2 .line view:nth-child(1):before{animation:load 1.2s linear 0s infinite;}
.m-load2 .line view:nth-child(2):before{animation:load 1.2s linear 0.1s infinite;}
.m-load2 .line view:nth-child(3):before{animation:load 1.2s linear 0.2s infinite;}
.m-load2 .line view:nth-child(4):before{animation:load 1.2s linear 0.3s infinite;}
.m-load2 .line view:nth-child(5):before{animation:load 1.2s linear 0.4s infinite;}
.m-load2 .line view:nth-child(6):before{animation:load 1.2s linear 0.5s infinite;}
.m-load2 .line view:nth-child(1):after{animation:load 1.2s linear 0.6s infinite;}
.m-load2 .line view:nth-child(2):after{animation:load 1.2s linear 0.7s infinite;}
.m-load2 .line view:nth-child(3):after{animation:load 1.2s linear 0.8s infinite;}
.m-load2 .line view:nth-child(4):after{animation:load 1.2s linear 0.9s infinite;}
.m-load2 .line view:nth-child(5):after{animation:load 1.2s linear 1s infinite;}
.m-load2 .line view:nth-child(6):after{animation:load 1.2s linear 1.1s infinite;}

wxml页面底部引入

<!-- 上拉加载提示状态 -->
<include src="/views/listFooter/listFooter.wxml"/>

根据js赋值 loadStatus ,来控制显示什么状态。

原文地址:https://www.cnblogs.com/XUYIYUAN/p/11407328.html

时间: 2024-08-02 12:08:59

上拉加载底部转圈圈动画并文字提示的相关文章

上拉加载下拉刷新控件WaterRefreshLoadMoreView

效果: 源码: // // SRSlimeView // @author SR // Modified by JunHan on 13-9-18. // #import <UIKit/UIKit.h> #define kStartTo 0.7f #define kEndTo 0.15f #define kAnimationInterval (1.0f / 50.0f) NS_INLINE CGFloat distansBetween(CGPoint p1 , CGPoint p2) { ret

dropload.js(上拉加载插件使用过程中遇到的坑)

dropload.js相关介绍和使用以及demo下载详见:https://github.com/ximan/dropload (原文出处) 之前因为项目需要一个上拉加载的效果,然后无意中看到了此插件,用了之后感觉挺好用的,就是坑太多,下面列出一些我在实际使用中遇到的问题. 注:如果在使用该插件的时候遇到问题,确实无法解决,也没有人能帮你解决,建议换插件或者加群,群号也在上面的链接里面. 问题1:给某个元素(比如查询按钮)加上onclick事件以后,不管点几次,加载效果也会增加几个,如下图所示 解

自定义(下拉刷新、上拉加载)帧动画

前些天搞了个系统的下拉刷新跟上拉加载,由于效果一般所以才会有了今天这篇博文 对于大多数的码农来说,能弄出些自己感兴趣的好东西还是比较开心的.-- package com.example.administrator.xlistview; import android.content.Context; import android.graphics.drawable.AnimationDrawable; import android.util.AttributeSet; import android

使用MJRefresh自定义下拉刷新,上拉加载动画

有时候我们需要自己设置下拉刷新,上拉加载动画的实现,这里主要是记录下使用MJRefresh自定义下拉刷新,上拉加载动画..... 下拉刷新我们只需要继承MJRefreshGifHeader即可: 实现代码如下: - (void)prepare{ [super prepare]; self.stateLabel.hidden = NO; self.lastUpdatedTimeLabel.hidden = YES; [self setImages:@[[UIImage imageNamed:@"v

结合SwipeRefreshLayout可以上拉加载更多下拉刷新的RecyclerView

源码下载地址:http://download.csdn.net/detail/zhou_anzhuojinjie/9661542 话不多说直接上代码 dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.supp

vue之better-scroll的封装,包含下拉刷新,上拉加载功能及UI(核心为借鉴,我仅仅是给轮子套上了外胎...)

先发原文作者.地址等信息.我把内容全部搬过来了,也可以去看原文.内容绝对是满满的干货,给原作者点赞!(我添加的内容在转载过来的后面,内容不多) 作者: ustbhuangyi 链接:http://www.imooc.com/article/18232 来源:慕课网 在我们日常的移动端项目开发中,处理滚动列表是再常见不过的需求了,以滴滴为例,可以是这样竖向滚动的列表,如图所示: 也可以是横向滚动的导航栏,如图所示: 可以打开"微信 -> 钱包->滴滴出行"体验效果. 我们在实

android 安卓 listview 支持下拉刷新 上拉加载更多

[1]重写listView import java.text.SimpleDateFormat; import java.util.Date; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.view.ViewGrou

Maxwin-z/XListView-Android(下拉刷新上拉加载)源码解析(二)

转载请注明出处http://blog.csdn.net/crazy__chen/article/details/45980399 源文件下载地址http://download.csdn.net/detail/kangaroo835127729/8736887 本文主要是贴出xlistview的源代码和一个使用实例,没有过多讲解 使用实例,MainActivity public class MainActivity extends Activity { private LinkedList<Str

下拉刷新与上拉加载更多

代码如下: /** * ListView下拉刷新和加载更多 * <p> * * <strong>变更说明:</strong> * <p> * 默认如果设置了OnRefreshListener接口和OnLoadMoreListener接口 * <p> * 剩余三个Flag: <br> * mIsAutoLoadMore(是否自动加载更多) <br> * mIsMoveToFirstItemAfterRefresh(下拉刷新后