vue-zh-scroll
v1.0.1
Published
vue plugins
Downloads
4
Readme
效果
安装
npm i vue-zh-scroll
引入使用main.js
import zhScroll from 'vue-zh-scroll'
Vue.use(zhScroll)
参数
| scrollData | animentionTime | timer | classItem | | :--------------------: | :----------------: | :--------------------: | :--------------: | | 需要滚动的数组(必须) | 动画时间(默认1s) | 定时器时间(默认1000) | 循环类名(必须) |
实例
<zh-scroll
:scrollData="list"
:animentionTime="1"
:timer="1000"
classItem="app_cursor_scroll"
>
<div
v-for="(item, index) in list"
:key="index"
@click="onScroll(item,index)"
class="app_cursor_scroll"
>
{{item.title}}
</div>
</zh-scroll>
当移动到盒子上的时候会停止;移出则开始