当前位置:网站首页>数组无缝滚动demo
数组无缝滚动demo
2022-06-24 09:32:00 【Time202051】
https://github.com/chenxuan0000/vue-seamless-scroll
<template>
<div>
<vue-seamless-scroll
:data="alarmdata"
class="seamless-warp"
:class-option="classOption"
>
<div v-for="(item, index) in alarmdata" :key="index">
<div>{
{
item.name }}</div>
</div>
</vue-seamless-scroll>
</div>
</template>
<script>
import Singletion from "@/utils/indexedDB";
export default {
data() {
return {
state: null,
alarmdata: [
{
name: "zs", age: 12 },
{
name: "zs1", age: 12 },
{
name: "zs2", age: 12 },
{
name: "zs3", age: 12 },
{
name: "zs4", age: 12 },
{
name: "zs6", age: 12 },
{
name: "zs7", age: 12 },
{
name: "zs8", age: 12 },
{
name: "zs9", age: 12 },
{
name: "zs10", age: 12 },
],
};
},
computed: {
classOption() {
return {
step: 0.8, // 数值越大速度滚动越快
// isSingleRemUnit:true,
limitMoveNum: this.alarmdata.length, // 开始无缝滚动的数据量 this.dataList.length
hoverStop: true, // 是否开启鼠标悬停stop
direction: 1, // 0向下 1向上 2向左 3向右
openWatch: true, // 开启数据实时监控刷新dom
singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
};
},
},
};
</script>
<style>
.seamless-warp {
margin: 0 auto;
width: 40%;
/* height: calc(100% - 80px); */
height: 200px;
line-height: 45px;
overflow: hidden;
border: 2px solid #ccc;
}
</style>
边栏推荐
- Codeforces Round #392 (Div. 2) D. Ability To Convert
- Prct-1400: failed to execute getcrshome resolution
- 20、 Processor scheduling (RR time slice rotation, mlfq multi-level feedback queue, CFS fully fair scheduler, priority reversal; multiprocessor scheduling)
- 使用Live Chat促進業務銷售的驚人技巧
- Algorithm -- find and maximum length k subsequence (kotlin)
- Servlet快速筑基
- ThinkPHP 5.0 模型关联详解
- 正则匹配手机号
- Latex formula and table recognition
- 【自定义Endpoint 及实现原理】
猜你喜欢
随机推荐
Why is LNX of e equal to X
每周推荐短视频:计算的终极形态是“元宇宙”?
记录一下MySql update会锁定哪些范围的数据
Prct-1400: failed to execute getcrshome resolution
LeetCode: 240. 搜索二维矩阵 II
获取带参数的微信小程序二维码-以及修改二维码LOGO源码分享
Zero foundation self-study SQL course | syntax sequence and execution sequence of SQL statements
Nlp-d59-nlp game D28 - I think it's OK - stage summary - mentality adjustment
针对《VPP实现策略路由》的修正
Analysis of 43 cases of MATLAB neural network: Chapter 32 time series prediction of wavelet neural network - short-term traffic flow prediction
深度学习论文阅读目标检测篇(七)中英对照版:YOLOv4《Optimal Speed and Accuracy of Object Detection》
十大证券公司哪个佣金最低,最安全可靠?有知道的吗
Ora-28000 error after upgrading Oracle 12C to 19C
LeetCode: 137. 只出现一次的数字 II
leetcode--字符串
Oracle数据文件头SCN不一致处理方法
Netrca: an effective network fault cause localization
Talking about the knowledge of digital transformation
Threejs point light + ambient light
Time series data augmentation for deep learning: paper reading of a survey









