seamless-scrolling
0.0.5 • Public • Published 使用
安装npm i seamless-scrolling 或者 yarn add seamless-scrolling
<script setup>
import { SeamlessScrolling } from 'seamless-scrolling'
</script>
API
props
参数 |
说明 |
类型 |
默认值 |
必填 |
modelValue |
是否开启自动滚动 |
Boolean |
true |
- |
list |
原始数据列表 |
Array |
[] |
是 |
step |
速度,step 需是单步大小的约数,大于0 |
Number |
1 |
- |
limitScrollNum |
开启滚动的数据量 |
Number |
1 |
- |
hover |
是否开启鼠标悬停, tips:这个开启会与移动端的touchend冲突 |
Boolean |
false |
- |
direction |
方向 |
String |
'up' |
- |
singleWidth |
单步运动停止的宽度 |
Number |
0 |
- |
singleWaitTime |
单步停止等待时间 (默认值 1000ms) |
Number |
1000 |
- |
isWatch |
开启数据更新监听 |
Boolean |
true |
- |
delay |
动画延迟时间 |
Number |
0 |
- |
ease |
动画方式 |
[String, Object] |
'linear' |
- |
count |
动画次数-1 表示一直动画 |
Number |
-1 |
- |
copyNum |
拷贝几份滚动列表 |
Number |
1 |
- |
wheel |
开启鼠标悬停时支持滚轮滚动 |
Boolean |
false |
- |
singleLine |
启用单行滚动 |
Boolean |
false |
- |
lessVisibleAreaScrolling |
单行滚动,少于可视区域是否滚动 |
Boolean |
false |
- |
event
Package Sidebar
Install
Weekly Downloads