<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. JavaScript中"Uncaught TypeError: Cannot set property 'innerHTML' of null"错误

    写了一个函数,在调用时出错:"Uncaught TypeError: Cannot set property 'innerHTML' of null" 代码如下: <!DOC ...

  2. Netflix Zuul

    Zuul 是在云平台上提供动态路由,监控,弹性,安全等边缘服务的框架.Zuul 相当于是设备和 Netflix 流应用的 Web 网站后端所有请求的前门. ApiGateway服务器 1.pom &l ...

  3. Java集合(7):散列与散列码

    散列的价值在于速度.我们使用数组来保存键的信息,这个信息并不是键本身,而是通过键对象生成一个数字(散列码),作为数组下标.由于数组的容量是固定的,而散列容器的大小是可变的,所以不同的键可以产生相同的数 ...

  4. lua学习笔记4--XLua

    下载XLua:   https://github.com/tencent/xlua 项目中使用XLua只需将Plugins和XLua两个文件夹拷贝到U3D中即可XLua只是核心,用于实现Lua和C#交 ...

  5. oracle+mybatis批量插入踩坑记

    最近在项目中需要使用oracle+mybatis批量插入数据,因为自增主键,遇到问题,现记录如下: 一.常用的两种sql写法报错 1.insert ... values ... <insert ...

  6. Leetcode之动态规划(DP)专题-714. 买卖股票的最佳时机含手续费(Best Time to Buy and Sell Stock with Transaction Fee)

    Leetcode之动态规划(DP)专题-714. 买卖股票的最佳时机含手续费(Best Time to Buy and Sell Stock with Transaction Fee) 股票问题: 1 ...

  7. Fabric1.4 链码开发,开发模式下的测试

    关闭之前已启动的网络环境 sudo docker-compose -f docker-compose-cli.yaml down 进入devmode目录:  cd ~/go/src/github.co ...

  8. Daily Temperatures

    Given a list of daily temperatures T, return a list such that, for each day in the input, tells you ...

  9. [转帖]nginx配置ssl证书实现https访问

    https://www.cnblogs.com/tianhei/p/7726505.html 今天就是如此处理的 感觉挺不错的. 一,环境说明 服务器系统:ubuntu16.04LTS 服务器IP地址 ...

  10. sqarkSQL hiveSql

    查看数据库 show databases; 进入数据库 use 库名 查看表 show tables: select * from 表名 hdfs传输spark sql查询 hive找到指定路径sql ...