list-scroll
v1.0.2
Published
列表滚动效果
Downloads
2
Readme
list-scroll
列表滚动效果
Author
zhangyj [email protected]
下载模块
npm i list-scroll
使用方式
单个引入
import listScroll from 'list-scroll'
全局引入
import listScroll from 'list-scroll'
Vue.use(listScroll);
<list-scroll :listOption="option" :listData="list">
<div class="listbox">
<div class="item" v-for="(item,index) in list">{{item}}</div>
</div>
</list-scroll>
list:[
1,2,3,4,5,6,7,8,9
],
option:{
loop:true,//是否循环滚动
interval:2000,//滚动时长
scrollHeight:30 //滚动高度
}
直接引入js
<script src="list-scroll.min.js"></script>
<list-scroll :list-option="option" :list-data="list">
<div class="listbox">
<div class="item" v-for="(item,index) in list">{{item}}</div>
</div>
</list-scroll>
list:[
1,2,3,4,5,6,7,8,9
],
option:{
loop:true,
interval:2000,
scrollHeight:30
}