<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. flutter 自定义tabbar 给tabbar添加背景功能

    flutter 自带的tabbar BottomNavigationBar有长按水波纹效果,不可以添加背景图片功能,如果有这方面的需求,就需要自定义tabbar了 自定义图片 我们使用BottomAp ...

  2. PCL中有哪些可用的PointT类型(4)

    博客转载自:http://www.pclcn.org/study/shownews.php?lang=cn&id=269 PointWithViewpoint - float x, y, z, ...

  3. 004-tomcat优化-Catalina中JVM优化、Connector优化、NIO化

    一.服务端web层 涉及内容Nginx.Varnish.JVM.Web服务器[Tomcat.Web应用开发(Filter.spring mvc.css.js.jsp)] 1.1.基本优化思路 1.尽量 ...

  4. 指定JSON.toJSONString中实体类属性的输出顺序

    最近在使用JSON.toJSONString过程中出现实体类的属性与转换之前的顺序不一致 public static void main(String[] args) { Person person ...

  5. jsp+UEditor粘贴word

    最近公司做项目需要实现一个功能,在网页富文本编辑器中实现粘贴Word图文的功能. 我们在网站中使用的Web编辑器比较多,都是根据用户需求来选择的.目前还没有固定哪一个编辑器 有时候用的是UEditor ...

  6. Linux(centos)安装vim

    当在Linux环境下使用vim提示: vim command not found时,说明系统还没有安装vim. 安装步骤: 1.检查是否已安装 查看一下你本机已经存在的包,确认一下你的VIM是否已经安 ...

  7. 2.React 生命周期函数

    什么是生命周期函数:在某一时刻组件会自动调用执行的函数. import React,{ Component,Fragment } from 'react' class Note extends Com ...

  8. bzoj 4736: 温暖会指引我们前行 (LCT 维护最大生成树)

    链接:https://www.lydsy.com/JudgeOnline/problem.php?id=4736 题面: 寒冬又一次肆虐了北国大地 无情的北风穿透了人们御寒的衣物 可怜虫们在冬夜中发出 ...

  9. Idea 控制台Tomcat乱码设置

    找到tomcat安装目录,进入conf目录,找到logging.properties文件 把默认的 java.util.logging.ConsoleHandler.encoding = UTF-8 ...

  10. 有关java5以后的线程

    创建线程的方式 方式一 继承于Thread类 /** * 多线程的创建,方式一:继承于Thread类 * 1. 创建一个继承于Thread类的子类 * 2. 重写Thread类的run() --> ...