<template>
<div class="share">
<div class="header">
<div class="top-content">
<span class="iconfont icon-fanhui1" @click="back"></span>
<span>在线客服</span>
<span class="iconfont"></span>
</div>
</div>
<!-- width:23.5rem;height:38.75rem -->
<div class="myScroll">
<mt-loadmore
auto-fill='false'
topPullText='' topDropText='' topLoadingText='刷新数据' topDistance='50' bottomPullText='' bottomDropText='' bottomDistance='50'
:top-method="loadTop" :bottom-method="loadBottom" :bottom-all-loaded="allLoaded" ref="loadmore">
<ul>
<li v-for="item in list">{{ item }}</li>
</ul>
</mt-loadmore>
<div class="loadingStyle" v-show="allLoaded==true">
<loading-pull></loading-pull>
</div>
</div>
</div>
</template>
<script>
import Vue from 'vue'
import headx from 'base/head/head-back'
import {mixins} from 'assets/js/mixins'
import { DatetimePicker } from 'mint-ui';
Vue.component(DatetimePicker.name, DatetimePicker);
import { Loadmore } from 'mint-ui';
Vue.component(Loadmore.name, Loadmore);
import i18n from 'assets/js/vi18n/i18n.js'
import searchNew from 'base/search_new/search'
import loadingPull from 'base/loading/loadingPull'
export default {
mixins: [mixins],
i18n,
data() {
return {
timeNow:new Date().getFullYear(),
valueYear:new Date(),
startDate: new Date('2017'),
listData: [],
selectItemData: null,
cancelText:'',
confirmText:'',
list:[],
loading:false,
allLoaded:false
}
},
components: {
headx,
searchNew,
loadingPull
},
props: {
appMenuName: {
type: null
}
},
methods: {
back() {
this.$router.go(-1);
},
loadTop() {
// load more data
console.log(1);
this.list = [1,2,3,4,5,6,7,8,9,10];
this.$refs.loadmore.onTopLoaded();
},
loadBottom() {
// load more data
console.log(2);
this.allLoaded = true;// if all data are loaded
setTimeout(() => {
let last = this.list[this.list.length - 1];
for (let i = 1; i <= 10; i++) {
this.list.push(last + i);
}
this.allLoaded = false;
}, 1500);
this.$refs.loadmore.onBottomLoaded();
}
},
mounted() {
this.list = [1,2,3,4,5,6,7,8,9,10];
},
}
</script>
<style scoped lang="stylus">
@import '~assets/stylus/veriable.styl'
@import "~assets/stylus/mixin.styl"
.share
position absolute
top 0
bottom 0
left 0
right 0
z-index 15
background $color-background
.header
width 100%
background $color-background-head
border-bottom .0625rem solid #dadada
text-align: center
color #000
.top-content
height 3.125rem
padding-top .625rem
width 100%
display flex
justify-content space-between
align-items center
.iconfont
padding 0.625rem
width 3.75rem
color #bfbfbf
font-size .875rem
font-weight normal
.myScroll
position absolute
overflow hidden
width 100%
top 3.2rem
bottom 0
background #f7f8f8
overflow-y: auto;
-webkit-overflow-scrolling: touch;
ul
li
line-height 5rem
li:nth-child(even)
background #ccc
.loadingStyle
background white
text-align center
font-size .75rem
line-height 1.875rem
</style>

mint-ui下拉加载min和上拉刷新(demo实例)的更多相关文章

  1. XListView下拉刷新和上拉加载更多详解

    转载本专栏每一篇博客请注明转载出处地址,尊重原创.博客链接地址:小杨的博客 http://blog.csdn.net/qq_32059827/article/details/53167655 市面上有 ...

  2. PullToRefreshListView上拉加载、下拉刷新

    说明:此项目使用studio完成的.需要导入library作为依赖,使用了xuitls获得网络请求.使用Pull解析了XML eclipse中的项目: //注意:此刷新功能是使用的第三方的PullTo ...

  3. MaterialRefreshLayout+ListView 下拉刷新 上拉加载

    效果图是这样的,有入侵式的,非入侵式的,带波浪效果的......就那几个属性,都给出来了,自己去试就行. 下拉刷新 上拉加载 关于下拉刷新-上拉加载的效果,有许许多多的实现方式,百度了一下竟然有几十种 ...

  4. Flutter实战视频-移动电商-20.首页_火爆专区上拉加载效果

    20.首页_火爆专区上拉加载效果 上拉加载的插件比较都.没有一个一枝独秀的 可以自定义酷炫的header和footer 一直在更新 推荐使用这个插件: https://github.com/xuelo ...

  5. Vue mint ui用在消息页面上拉加载下拉刷新loadmore 标记

    之前总结过一个页面存在多个下拉加载的处理方式,今天再来说一下在消息页面的上拉加载和下拉刷新,基本上每个app都会有消息页面,会遇到这个需求 需求:每次加载十条数据,上拉加载下拉刷新,并且没有点击查看过 ...

  6. iscroll.js 下拉刷新和上拉加载

    html代码如下 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> < ...

  7. H5下拉刷新和上拉加载实现原理浅析

    前言 在移动端H5网页中,下拉刷新和上拉加载更多数据的交互方式出现频率很高,开源社区也有很多类似的解决方案,如iscroll,pulltorefresh.js库等.下面是对这两种常见交互基本实现原理的 ...

  8. iOS:延迟加载和上拉刷新/下拉加载的实现

    lazy懒加载(延迟加载)UITableView 举个例子,当我们在用网易新闻App时,看着那么多的新闻,并不是所有的都是我们感兴趣的,有的时候我们只是很快的滑过,想要快速的略过不喜欢的内容,但是只要 ...

  9. listview下拉刷新和上拉加载更多的多种实现方案

    listview经常结合下来刷新和上拉加载更多使用,本文总结了三种常用到的方案分别作出说明. 方案一:添加头布局和脚布局        android系统为listview提供了addfootview ...

随机推荐

  1. jQuery.extend函数

    http://www.cnblogs.com/luckboy/archive/2009/06/25/1510870.html 1.扩展jQuery静态方法. 1$.extend({ 2test:fun ...

  2. VUE中v-for和v-if不能同时使用的问题

    摘抄自:https://www.cnblogs.com/showjs/p/11376446.html 在开发时候碰到了一个问题:v-if和v-for不能同时使用: <h-tab-pane v-f ...

  3. 时间复杂度O(n)

    时间复杂度 算法分析 同一问题可用不同算法解决,而一个算法的质量优劣将影响到算法乃至程序的效率.算法分析的目的在于选择合适算法和改进算法.一个算法的评价主要从时间复杂度和空间复杂度来考虑. 一.时间复 ...

  4. k8s组件批量启动、查看状态

    查看所有master节点kube-apiserver ansible k8s -m shell -a 'systemctl status kube-apiserver' 重启所有master节点kub ...

  5. phpfpm开启pm.status_path配置,查看fpm状态参数

    php-fpm配置 pm.status_path = /phpfpm_status nginx配置 server {    root /data/www;    listen 80;    serve ...

  6. gdb调试caffe工程

    环境:UBUNTU 16.04 CMake caffe 1.0.0-rc3 1.首先编译caffe为debug版本: 在caffe根目录下编辑CMakeFileList.txt,加入如下几行: SET ...

  7. 一台物理机器一个IP配置多个域名多套程序的方法

    1.安装nginx cd /usr/local/ wget http://nginx.org/download/nginx-1.2.8.tar.gz tar -zxvf nginx-1.2.8.tar ...

  8. .NET Core WebApi中返回 json 数据首字母大小写问题

    public void ConfigureServices(IServiceCollection services) { services.AddMvc().AddJsonOptions(opt =& ...

  9. uni-app 使用本地打包配置安卓原生插件

    在使用 uni-app 开发的时候,遇到了一个很棘手的问题.即获取设备参数的时候 uni-app 并没有相关方法,而安卓开发是可以做到的,因为接的是三方推广,所以功能必须实现,所以求助了安卓的大佬帮我 ...

  10. Windows命令行工具cmder配置

    简介 cmder是一个增强型命令行工具,不仅可以使用windows下的所有命令,更爽的是可以使用linux的命令,shell命令. 下载 官网地址:http://cmder.net/ 下载的时候,会有 ...