Code Monkey home page Code Monkey logo

vue-iosscroller's Introduction

安装

npm i vue-iosscroller

main.js 安装全局指令 v-scroll

import vueIosScroller from 'vue-iosScroller'

Vue.use(vueIosScroller,{
    name:scroller, //可改变指令名称 这里使用v-scroller调用
    vertical:false //是否禁用垂直触顶/触顶滑动,默认false
});

Tips

本组件主要是通过 touchmove 的{passive:false}参数,禁用掉左右滑动,可选参数vertical来控制是否加入禁止触顶/触底滑动

可传入参数 false/true 来控制 开启/关闭 插件的功能

关闭插件功能:

<container v-scroller='true'>

开启插件功能

<container v-scroller>
或者 
<container v-scroller='false'>

container必须有固定的高度,并且需要加可的滑动样式

overflow-y scroll
-webkit-overflow-scrolling touch

vue-iosscroller's People

Contributors

pengkai0113 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.