GithubHelp home page GithubHelp logo

zqderek / vue-seamless-scroll Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenxuan0000/vue-seamless-scroll

0.0 2.0 0.0 715 KB

:beginner:A simple, seamless scrolling for Vue.js vue无缝滚动component

License: MIT License

JavaScript 14.89% Vue 75.17% HTML 9.94%

vue-seamless-scroll's Introduction

vue-seamless-scroll

A simple, Seamless scrolling for Vue.js

Build Status LICENSE MIT

🐾online demo | 🌾 sample demo | 📘 中文文档

Browser support

IE
IE
Firefox
Firefox
Chrome
Chrome
Safari
Safari
iOS Safari
iOS
Chrome for Android
Android
IE9+

Installation

NPM

npm install vue-seamless-scroll --save

Usage

ES6

Specific reference example-src/App.vue

// **main.js**
import Vue from 'vue'
import scroll from 'vue-seamless-scroll'
Vue.use(scroll)

<template>
  <vue-seamless-scroll></vue-seamless-scroll>
</template>

//or you can set componentName default componentName is vue-seamless-scroll
Vue.use(scroll,{componentName: 'scroll-seamless'})

<template>
  <scroll-seamless></scroll-seamless>
</template>

normal use (script tag)

Example:

Specific reference test/test.html

<html>
<head>
  ...
</head>
<body>
  <div id="app">
    <vue-seamless-scroll></vue-seamless-scroll>
  </div>
  <script src="vue.js"></script>
  <script src="vue-seamless-scroll"></script>
  <script>
    new Vue({
      el: '#app'
    })
  </script>
</body>
</html>

Configure

      defaultOption () {
        return {
          step: 1, //the faster the rolling speed is faster
          limitMoveNum: 5, //start seamless scrolling minimum data  //this.dataList.length
          hoverStop: true, //mouse hover control is enabled
          direction: 1, // 0 down || 1 up || 2 left || 3 right
          openWatch: true, //open data realTime monitoring
          singleHeight: 0, //one single stop height(default zero is seamless) => direction 0/1
          singleWidth: 0, //one single stop width(default zero is seamless) => direction 2/3
          waitTime: 1000 //one single data stop wait time
        }
      }

Changelog

See the GitHub release history.

Cares

If you want js to scroll seamlessly (without dependencies) you can switch to here.seamscroll

Contribution

Welcome to give some Suggestions and optimizations, and look forward to your Pull Request.

License

vue-seamless-scroll is open source and released under the MIT License.

vue-seamless-scroll's People

Watchers

 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.