All Projects → bedlate → vue-data-loading

bedlate / vue-data-loading

Licence: other
Another component for infinite scroll and pull down/up to load data.

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
HTML
75241 projects

Projects that are alternatives of or similar to vue-data-loading

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 (+2425.4%)
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 (+688.89%)
Mutual labels:  infinite-scroll, pull-to-refresh
Vue Scroller
Scroller Component for Vue.js
Stars: ✭ 1,775 (+2717.46%)
Mutual labels:  infinite-scroll, pull-to-refresh
Vue Pull To
⚡️ A pull-down refresh and pull-up load more and infinite scroll component for Vue.js --Vue下拉刷新组件
Stars: ✭ 708 (+1023.81%)
Mutual labels:  infinite-scroll, pull-to-refresh
tulip-scroll
📜 多场景的下拉组件和更多,https://artiely.gitee.io/scroll-docs/
Stars: ✭ 44 (-30.16%)
Mutual labels:  infinite-scroll, pull-to-refresh
vm-markdown
Example
Stars: ✭ 96 (+52.38%)
Mutual labels:  vue-components
vue-mobiledoc-editor
A lightweight and customizable editor that allows you to embed rich content using Vuejs components.
Stars: ✭ 73 (+15.87%)
Mutual labels:  vue-components
vexip-ui
A Vue 3 UI library, Highly customizable property values, Full TypeScript, Performance should be good.
Stars: ✭ 488 (+674.6%)
Mutual labels:  vue-components
bee-ui
VUE组件库
Stars: ✭ 16 (-74.6%)
Mutual labels:  vue-components
vue-skeleton-loader
A simple and easily customizable skeleton loader plugin for you Vue application.
Stars: ✭ 74 (+17.46%)
Mutual labels:  vue-components
shadow
Shadow dom support for Vue
Stars: ✭ 46 (-26.98%)
Mutual labels:  vue-components
infinite-carousel-flutter
Carousel in flutter. Supports infinite looping and gives control over anchor and velocity.
Stars: ✭ 24 (-61.9%)
Mutual labels:  infinite-scroll
mui-vue1.0
mui商城 ->mui+vue1.0打造的多页面应用,最终打包成app项目
Stars: ✭ 35 (-44.44%)
Mutual labels:  vue-components
unique-ui
一个用于Vue2.x的移动端组件库
Stars: ✭ 43 (-31.75%)
Mutual labels:  vue-components
smart-react-native-app
React Native 下拉刷新, 分页加载, 侧边栏, Tab导航学习(Android Studio, ES6语法)
Stars: ✭ 56 (-11.11%)
Mutual labels:  pull-to-refresh
vue-word-highlighter
The word highlighter library for Vue 2 and Vue 3.
Stars: ✭ 112 (+77.78%)
Mutual labels:  vue-components
vuejs-loadmore
A pull-down refresh and pull-up loadmore scroll component for Vue.js. Vue上拉加载下拉刷新组件
Stars: ✭ 62 (-1.59%)
Mutual labels:  infinite-scroll
vue-scroll-snap
A super simple Vue component that allows fullscreen and horizontal scroll snapping.
Stars: ✭ 25 (-60.32%)
Mutual labels:  vue-components
Scroller
React版iScroll并且集成下拉刷新,上拉加载更多,Sticky等功能
Stars: ✭ 52 (-17.46%)
Mutual labels:  pull-to-refresh
void-ui
A UI toolkit for Vue.js.
Stars: ✭ 20 (-68.25%)
Mutual labels:  vue-components

vue-data-loading

中文文档

Another component for infinite scroll and pull down/up to load data.

Here is a demo: HackNews

vue-data-loading

Install

npm install vue-data-loading --save

Usage

Import first:

import VueDataLoading from 'vue-data-loading'

Register as a component:

components: {
    VueDataLoading
},

The only you need to do is wrapping your data with vue-data-loading tag.

<vue-data-loading>
    <ul>
        <li v-for="(item, index) in list" :key="index">Item: {{item}}</li>
    </ul>
</vue-data-loading>

However, you can pass some props or events to the component.

<vue-data-loading :loading="loading" :listens="['pull-down', 'infinite-scroll']" @infinite-scroll="infiniteScroll" @pull-down="pullDown">
    <!--your data here-->
</vue-data-loading>

Sometimes, you may want to change the default style or text(html), that is easy, just edit the slot:

Here is a example for infinite-scroll-loading slot:

default:

<slot :name="infinite-scroll-loading">加载中...</slot>

edit:

<div slot="infinite-scroll-loading" class="some-style-you-like">
    <img src="https://github.com/path/to/your-icon.png">
    <span>loading...</span>
</div>

Here is a full example

API

Props

loading

Type: boolean

Default: false

The component will not trigger any events while loading is true.

It should be true when data are downloading, and false when finished.

completed

Type: boolean

Default: false

The component will not trigger infinite-scroll if true.

It should be true when all data have be loaded.

init-scroll

Type: boolean

Default: false

The component will trigger infinite-scroll once if true when it has be mounted.

It uses to bootstrap when page first-time loads.

distance

Type: number

Default: 60

Unit: px

Only available for touch* event, when pull distance is not less than it, pull-down or pull-up will be triggered.

offset

Type: number

Default: 0

Unit: px

Sometimes you want to change bottom offset to trigger infinite-scroll in advance.

listens

Type: array

Default: ['infinite-scroll', 'pull-down', 'pull-up']

The component will not trigger the event if it not in the list.

container

Type: string

Required: false

All events bind on window if it is not set, or you need to specify a container ref to it.

Events

infinite-scroll

Emit when container has already scrolled to bottom of window

pull-down

Emit when container has already pulled down

pull-up

Emit when container has already pulled up

Slots

infinite-scroll-loading

Display when container has already scrolled to bottom of window and data is loading

pull-down-before

Display when distance of pull-down is less then distance prop

pull-down-ready

Display when distance of pull-down is not less then distance prop

pull-down-loading

Display when container has already pull-down and data is loading

pull-up-before

Display when distance of pull-up is less then distance prop

pull-up-ready

Display when distance of pull-up is not less then distance prop

pull-up-loading

Display when container has already pull-up and data is loading

completed

Display when data is completed and not loading

Develop

# install dependencies
npm install

# serve example with hot reload at localhost:8080
npm run dev

# build vue-data-loading component
npm run dist
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].