Scroll

移动端触摸物理滚动模拟,基于phy-scroll支持的物理特性包括(加速、惯性、摩擦力、回弹)。

→ Touch Me

Usage

  1. <m-scroll min={-1000} max={0} step={40} onEnd={this.onEnd}>
  2. <div id="wrapper">
  3. <div id="scroller">
  4. <ul>
  5. <li>Pretty row 1</li>
  6. <li>Pretty row 2</li>
  7. <li>Pretty row 3</li>
  8. ...
  9. ...
  10. </ul>
  11. </div>
  12. </div>
  13. </m-scroll>

API

Props

  1. {
  2. vertical: boolean
  3. min: number
  4. max: number
  5. sensitivity: number
  6. factor: number
  7. step: number
  8. bindSelf: boolean
  9. preventDefault: boolean
  10. onChange: () => void
  11. onTouchStart: () => void
  12. onTouchMove: () => void
  13. onTouchEnd: () => void
  14. onTap: () => void
  15. onPressMove: () => void
  16. onAnimationEnd: () => void
  17. }