Code Monkey home page Code Monkey logo

vue-scroll-mobile's Introduction

vue-scroll H5 滚动组件支持下拉刷新和上拉加载更多

Project setup

npm install

Compiles and hot-reloads for development

npm run dev

npm download

npm install vue-scroll-m -S

示例

* 手机打开微信或QQ二维码扫码查看示例

使用方法

<template>
  <div id="app">
    <scroll ref="scroll"
            :data="listData"
            :top="40"
            :bottom="40"
            @onScroll="onScroll"
            @pullingUp="onScrollBottom"
            @pullingDown="onPullingDown">
      <div class="list">
        <div class="item" v-for="(item, index) in listData" :key="index">
        </div>
      </div>
    </scroll>
  </div>
</template>

import Scroll from 'vue-scroll-m'

export default {
  components: {
    Scroll
  },
}

配置说明

参数 类型 描述 必需 默认值
data array 滚动列表渲染的数据 []
top number或string 滚动列表相对顶部位置 0
bottom number或string 滚动列表相对底部位置 0
triggerHeight number或string 触发pullingUp事件高度 200
onScroll function 监听列表滚动
pullingUp function 滚动到底部加载更多触发
pullingDown function 下拉刷新回调方法

vue-scroll-mobile's People

Contributors

crazyboy008 avatar

Stargazers

 avatar  avatar  avatar

Forkers

singod godyyyyy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.