vue-pull-refresh

a pull down refresh component implements by vuejs
31,975 143
Install
npm install vue-pull-refresh
Latest Version:0.2.7
Vue:2
License:ISC
Last Updated:Aug 27, 2020
Links: GitHub  ·  npm
Maintainer: lakb248

vue-pull-refresh

Build Status

A pull down refresh component implements by vuejs 2.0 for mobile.

Demo

Demo

PS: Please use browsers that support Promise

Usage

Install

npm install vue-pull-refresh --save

CommonJS

var VuePullRefresh = require('vue-pull-refresh');

new Vue({
    components: {
        'vue-pull-refresh': VuePullRefresh
    },
    data: function () {
        return {};
    },
    methods: {
        onRefresh: function() {
            return new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve();
                }, 1000);
            });
        }
    },
    template: '<vue-pull-refresh :on-refresh="onRefresh"></vue-pull-refresh>'
});

ES6

import VuePullRefresh from 'vue-pull-refresh';

new Vue({
    components: {
        'vue-pull-refresh': VuePullRefresh
    },
    data: function () {
        return {};
    },
    methods: {
        onRefresh: function() {
            return new Promise(function (resolve, reject) {
                setTimeout(function () {
                    resolve();
                }, 1000);
            });
        }
    },
    template: '<vue-pull-refresh :on-refresh="onRefresh"></vue-pull-refresh>'
});

Props

Property Description
onRefresh refresh event;Should return a promise.
config {errorLabel: label shows when errorstartLabel: label shows when pull down startreadyLabel: label shows when ready to refreshloadingLabel: label shows when loadingpullDownHeight: the height toggle pull down refresh action}

Contribution

First, install dependencies

npm install

Second, setup development environment

npm run dev

License

MIT

Related Packages

vue-json-tree-view

a JSON Tree View Component in Vue.js

380,792 473
@v-c/picker

picker ui component for vue

57,185 32
vue-frame-crm

vue components for crm system

15,005
kokk

A beautiful way to create a documentation from markdown, and insert a vue compon...

10,142 49
vue-desktop

A UI library for building admin panel website.

4,851 540

Version History

Version Released License
0.2.7 ISC
0.2.6 ISC
0.2.5 ISC
0.2.4 ISC
0.2.3 ISC