0.0.4 • Published 6 years ago

vue-iscroll-component v0.0.4

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

vue-iscroll-component

A vue iScroll component

Build Setup

# install dependencies
npm install

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

# build for production with minification
npm run build

Todo

  • 移动端模拟浏览器滚动

Install

npm install vue-iscroll-component --save

Run example

cd example/

# install example dependencies
npm install

# serve with hot reload at localhost:9000
npm run dev

Usage

<template>
  <vueIScroll v-model="IScroll">
    <ul>
      <li v-for="item in 30" :key="item">{{item}}</li>
    </ul>
  </vueIScroll>
</template>

<script>
import vueIScroll from 'vue-iscroll-component'

new Vue({
  el: '#app',
  components: {
    vueIScroll
  }
});
</script>

Options

Props

PropsTypeDefaultDescription
optionsObject{}Almost options is base on iscroll
disabledBooleanfalseif true, it like never existed, but slot content can show
containerStyleObject{}scroll view container style
contentStyleObject{}scroll view content style
topBounceHString, Numbernullwhat's the distance it have to emit handleTopBounce
bottomBounceHString, Numbernullwhat's the distance it have to emit handleBottomBounce

Events

NameParamsDescription
handleScrolliScrollTochmove event
handleTopBounceiScrollDrag the top event
handleBottomBounceiScrollDrag the bottom event
0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago