GithubHelp home page GithubHelp logo

eno-auto-scroll's Introduction

eno-auto-scroll

自动循环滚动

Plugin example

example.gif

Plugin install

npm install --save eno-auto-scroll

Plugin setup

src/main.js

import EnoAutoScroll from 'eno-auto-scroll';

Vue.use(EnoAutoScroll);

Component usage

<EnoAutoScroll style="height: 100px;">
    <div>第1行</div>
    <div>第2行</div>
    <div>第3行</div>
    <div>第4行</div>
    <div>第...行</div>
</EnoAutoScroll>

Component Props

name type default describe
duration Number 3000 经过scrollScope范围,过程时间(ms)
scroll-scope Number, String 'component' 在duration时间内滚动的范围。('component':组件可视区域 , 'content':整个列表 , Number:指定(px))
is-mouse-stop Boolean true 鼠标划过是否暂停
is-daemon Boolean false 是否以守护程序方式继续后台运行。当页面隐藏的时候,不会滚动
is-mousewheel-control Boolean true 是否支持鼠标滑轮控制,必须开启[:isMouseStop],这个操作的设置才有效
is-scroll-from-bottom Boolean true 是否从末尾开始滚动

Component Event

name type describe
on-progress Number 进度改变值(0 - 100)
on-scroll-end 滚动到了底部,需要重新开始滚动,即可触发

Component Ref function

<EnoAutoScroll ref="enoAutoScroll" style="height: 100px;">
</EnoAutoScroll>
name params default describe
startScroll - - 重新计算内容高度,并重新开始滚动
stopScroll - - 停止滚动,并且重置滚动位置
keepScroll - - 继续滚动
pauseScroll - - 暂停滚动

eno-auto-scroll's People

Contributors

dependabot[bot] avatar genophy avatar qq853695231 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

eno-auto-scroll's Issues

Component Props

hi
thank you your library is helping me
but I have problem your component props don't work with v-for
only <div></div> manually
work only auto scroll and duration
my code is:
<EnoAutoScroll :duration="20000"> <div class="li" v-for="news in navNews" :key="news.id"> {{ news.data }} <span class="date">{{ news.date }}</span> </div> </EnoAutoScroll>
I will happy if you can you fix it?
thank you.

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.