Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@albertisernalvarez/pulltorefresh-vue

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@albertisernalvarez/pulltorefresh-vue

vue 版本的 pull to refresh

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

pulltorefresh-vue 版本

pull to refresh for Vue.js

screenshot

screenshot

Requirements

  • Vue.js ^1.0.0

Installation

npm

npm install pullToRefresh-vue

parameters

down: if open pull down to refresh function
up: if open pull up to loadmore function
addNew: refresh callback, used to refresh or insert data to the lists
addMore: loadmore callback, used to loadmore data to the lists
hasMore: if there has more data, used to show pull up icon or 'nomore' message

Usage

<template>
    <PullToRefresh
        :down="1"
        :up="1"
        :pulldownOffset="80"
        :pullupOffset="20"
        :addNew="addNew"
        :addMore="addMore"
        :hasMore="hasMore"
        ref="wrapItems"
        >
            <div>here is the content of what you want to pull down to refresh or pull up to loadmore</div>
            <div>may be some ul list</div>
    </PullToRefresh>
</template>
<script>
import PullToRefresh from 'pulltorefresh-vue';
export default {
    /* other code */
    name: 'pullDemo',
    methods: {
            addNew() {
                return new Promise((resolve, reject) => {
                    this.getNewData().then(() => {
                        resolve();
                    });
                });
            },
            addMore() {
                let self = this;
                return new Promise((resolve, reject)=> {
                    this.getMoreData().then(() => {
                        resolve();
                    });
                });
            },
    }
    /* other code */
}
</script>

Keywords

FAQs

Package last updated on 27 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc