All Projects → stackjie → Vue Pull To

stackjie / Vue Pull To

Licence: mit
⚡️ A pull-down refresh and pull-up load more and infinite scroll component for Vue.js --Vue下拉刷新组件

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue Pull To

tulip-scroll
📜 多场景的下拉组件和更多,https://artiely.gitee.io/scroll-docs/
Stars: ✭ 44 (-93.79%)
Mutual labels:  infinite-scroll, pull-to-refresh
Pull To Refresh
ESPullToRefresh is developed and maintained by Vincent Li. If you have any questions or issues in using ESPullToRefresh, welcome to issue. If you want to contribute to ESPullToRefresh, Please submit Pull Request, I will deal with it as soon as possible.
Stars: ✭ 1,591 (+124.72%)
Mutual labels:  infinite-scroll, pull-to-refresh
vue-data-loading
Another component for infinite scroll and pull down/up to load data.
Stars: ✭ 63 (-91.1%)
Mutual labels:  infinite-scroll, pull-to-refresh
Vue Scroller
Scroller Component for Vue.js
Stars: ✭ 1,775 (+150.71%)
Mutual labels:  infinite-scroll, pull-to-refresh
React Native Ultimate Listview
A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row.
Stars: ✭ 497 (-29.8%)
Mutual labels:  infinite-scroll, pull-to-refresh
Swiftpulltorefresh
An easy way to implement pull-to-refresh feature based on UIScrollView extension, written in Swift 4.
Stars: ✭ 451 (-36.3%)
Mutual labels:  pull-to-refresh
Vue Star Rating
⭐️ A simple, highly customisable star rating component for Vue 2.x. / 3.x
Stars: ✭ 509 (-28.11%)
Mutual labels:  vue-component
Vue Touch Ripple
👆 Touch ripple component for @vuejs
Stars: ✭ 443 (-37.43%)
Mutual labels:  vue-component
Vue Multipane
Resizable split panes for Vue.js.
Stars: ✭ 427 (-39.69%)
Mutual labels:  vue-component
Vue Typer
Vue component that simulates a user typing, selecting, and erasing text.
Stars: ✭ 691 (-2.4%)
Mutual labels:  vue-component
Smartrefreshlayout
🔥下拉刷新、上拉加载、二级刷新、淘宝二楼、RefreshLayout、OverScroll,Android智能下拉刷新框架,支持越界回弹、越界拖动,具有极强的扩展性,集成了几十种炫酷的Header和 Footer。
Stars: ✭ 23,185 (+3174.72%)
Mutual labels:  pull-to-refresh
Pulltomakeflight
Custom animated pull-to-refresh that can be easily added to UIScrollView
Stars: ✭ 497 (-29.8%)
Mutual labels:  pull-to-refresh
React Native Pull Refresh
Custom pull to refresh component for Android
Stars: ✭ 456 (-35.59%)
Mutual labels:  pull-to-refresh
Web Pull To Refresh
A native-like JavaScript pull to refresh implementation for the web.
Stars: ✭ 530 (-25.14%)
Mutual labels:  pull-to-refresh
Vue Slick Carousel
🚥Vue Slick Carousel with True SSR Written for ⚡Faster Luxstay
Stars: ✭ 447 (-36.86%)
Mutual labels:  vue-component
Pullrefreshlayout
下拉刷新,上拉加载,真实的回弹(overscroll)效果(媲美qq),且大小只有37KB(是其他主流刷新库或回弹库的1/2,1/3,甚至是1/4),同时,自定义header和footer,可以实现任何你想的到的功能(例如:自动触发加载更多、二级刷新等)
Stars: ✭ 639 (-9.75%)
Mutual labels:  pull-to-refresh
Pdfvuer
A PDF viewer for Vue using Mozilla's PDF.js
Stars: ✭ 443 (-37.43%)
Mutual labels:  vue-component
Vegile
This tool will setting up your backdoor/rootkits when backdoor already setup it will be hidden your spesisifc process,unlimited your session in metasploit and transparent. Even when it killed, it will re-run again. There always be a procces which while run another process,So we can assume that this procces is unstopable like a Ghost in The Shell
Stars: ✭ 478 (-32.49%)
Mutual labels:  infinite-scroll
Pulltorefreshkit
【Deprecated】Pull to refresh in Swift, easy to use, easy to customize(下拉刷新/QQ/淘宝/优酷/雅虎天气/大众点评)
Stars: ✭ 533 (-24.72%)
Mutual labels:  pull-to-refresh
Vue2 Calendar
vue 2.x calendar component
Stars: ✭ 477 (-32.63%)
Mutual labels:  vue-component

Vue-Pull-To

A pull-down refresh and pull-up load more and infinite scroll component for Vue.js.

zh-CN中文文档

Build Status Coverage Status GitHub issues GitHub stars GitHub license npm

Live Examples

qrcode

examples

Installation

 npm install vue-pull-to --save

Usage

<template>
  <div>
    <pull-to :top-load-method="refresh">
      <ul v-for="item in dataList">
        <li>{{ item }}</li>
      </ul>
    </pull-to>
  </div> 
</template>

<script>
  import PullTo from 'vue-pull-to'
  import { fetchDataList } from 'api'
  
  export default {
    name: 'example',
    components: {
      PullTo
    },
    data() {
      return {
        dataList: []
      }
    },
    methods: {
      refresh(loaded) {
       fetchDataList()
        .then((res) => {
          this.dataList = res.data.dataList
          loaded('done')
        })
      }
    }
  }
</script>

The component will occupy 100% height of the parent element by default. props top-load-method and bottom-load-method will default to a loaded parameter, which is a function that changes the state of the component's load, and must be called once loaded. The component will always be loaded, if loaded('done') The internal state of the component will become a successful state of loading, loaded('fail') for the failure.

More usage examples

API Docs

props

Attribute Description type Default
distance-index Slip the threshold (the greater the value the slower the sliding) Number 2
top-block-height The height of the block element area outside the top of the scroll container Number 50
bottom-block-height The height of the block element area outside the scrolling container Number 50
wrapper-height The height of the scrolling container String '100%'
top-load-method Top drop-down method Function
bottom-load-method Bottom pull-up method Function
is-throttle-top-pull Whether the disable of the top-pull throttle event is triggered to ensure performance if the real-time trigger is set to false Boolean true
is-throttle-bottom-pull Whether the disable of the bottom-pull throttle event is triggered to ensure performance if the real-time trigger is set to false Boolean true
is-throttle-scroll Whether the disable of the scroll throttle event is triggered to ensure performance if the real-time trigger is set to false Boolean true
is-touch-sensitive Whether to handle touch events Boolean true
is-scroll-sensitive Whether to handle scroll events Boolean true
is-top-bounce Whether to enable the pull-down bounce effect Boolean true
is-bottom-bounce Whether to enable the pull-up bounce effect Boolean true
is-bottom-keep-scroll Whether to make the scroll container stay in place after completing the pull-down method Boolean false
top-config Configuration for the topmost part of the scroll container Object default config
bottom-config Configuration for the bottommost part of the scroll container Object default config

topConfig and bottomConfig Configurable options and default configuration item values

const TOP_DEFAULT_CONFIG = {
  pullText: '下拉刷新', // The text is displayed when you pull down
  triggerText: '释放更新', // The text that appears when the trigger distance is pulled down
  loadingText: '加载中...', // The text in the load
  doneText: '加载完成', // Load the finished text
  failText: '加载失败', // Load failed text
  loadedStayTime: 400, // Time to stay after loading ms
  stayDistance: 50, // Trigger the distance after the refresh
  triggerDistance: 70 // Pull down the trigger to trigger the distance
}

const BOTTOM_DEFAULT_CONFIG = {
  pullText: '上拉加载',
  triggerText: '释放更新',
  loadingText: '加载中...',
  doneText: '加载完成',
  failText: '加载失败',
  loadedStayTime: 400,
  stayDistance: 50,
  triggerDistance: 70
}

slots

Name Description scope
default The default slot scrolls the contents of the container
top-block Scroll the contents of the top of the container outer (support the scope slot need to use template tag with scope attribute) state:Current state、state-text:State corresponding to the text
bottom-block Scroll the contents of the bottom of the container outer (support the scope slot need to use template tag with scope attribute) state:Current state、state-text:State corresponding to the text

events

name Description
top-state-change When the top state has changed, the first parameter is the current state
bottom-state-change When the bottom state has changed, the first parameter is the current state
top-pull Pull down the trigger, the first parameter for the current pull of the distance value, the default will be throttle, config isThrottle to real-time trigger
bottom-pull Pull up the trigger, the first parameter for the current pull of the distance value, the default will be throttle, config isThrottle to real-time trigger
infinite-scroll Triggered when the scroll container scrolls to the end
scroll When scrolling, the event callback function, the first parameter, is the native event object
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].