vue3SeamlessScroll实现列表的无限循环滚动

安装:

npm install vue3-seamless-scroll 

全局部署:main.ts

import vue3SeamlessScroll from 'vue3-seamless-scroll'
app.use(vue3SeamlessScroll)

到页面使用

<template>
<div class="header">
 <vue3-seamless-scroll
      class="seamless-warp scroll"
      :list="plansData.data" //对应循环的数据
      :step="0.8"  //速度
      :hover="true"  //点击是否暂停
      style="width: 100%"
      v-model="isScroll"
    >
 <div class="box" v-for="(item, index) in plansData.data" :key="index">
</div>
 </vue3-seamless-scroll>
</div>
</template>
<script>
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'
const isScroll = ref(true) //默认true开始滚动
</script>
<style>
.seamless-warp scroll {
  height: 300px;
  width: 100%;
  overflow: scroll;
}
.header {
  height: 100%;
  overflow: hidden;
}
</style>

其它功能可参考利用vue3SeamlessScroll简单实现列表的无限循环滚动,仅需几秒配置_vue3 表格循环滚动-CSDN博客

相关推荐

  1. vue3SeamlessScroll实现列表无限循环滚动

    2024-07-22 16:56:06       20 阅读
  2. 利用vue3SeamlessScroll 简单实现列表无限循环滚动

    2024-07-22 16:56:06       32 阅读
  3. vue3-seamless-scroll实现循环滚动

    2024-07-22 16:56:06       22 阅读
  4. vue实现列表自动滚动效果

    2024-07-22 16:56:06       51 阅读
  5. vue实现文本上下循环滚动

    2024-07-22 16:56:06       44 阅读
  6. Android 循环滚动列表-类似弹幕效果

    2024-07-22 16:56:06       50 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-22 16:56:06       52 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-22 16:56:06       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-22 16:56:06       45 阅读
  4. Python语言-面向对象

    2024-07-22 16:56:06       55 阅读

热门阅读

  1. Ajax学习笔记

    2024-07-22 16:56:06       14 阅读
  2. 前端面试 vue 路由权限控制

    2024-07-22 16:56:06       17 阅读
  3. Vue 3 和 SpringBoot 实现文件分片上传示例

    2024-07-22 16:56:06       17 阅读
  4. ElasticSearch-match_phrase查询

    2024-07-22 16:56:06       14 阅读
  5. 计算机视觉主流框架及其应用方向

    2024-07-22 16:56:06       21 阅读
  6. NLP基础技术

    2024-07-22 16:56:06       18 阅读
  7. Linux的shell编程

    2024-07-22 16:56:06       18 阅读
  8. 【Vue】 组件通信方式

    2024-07-22 16:56:06       13 阅读
  9. Android 各个版本兼容型问题

    2024-07-22 16:56:06       17 阅读
  10. 透彻理解Transformer模型:详解及实用示例(C#版)

    2024-07-22 16:56:06       16 阅读
  11. 商品信息管理系统(C语言)

    2024-07-22 16:56:06       16 阅读
  12. Vue的模板编译:深入理解渲染函数与预编译模板

    2024-07-22 16:56:06       16 阅读
  13. Rust编程- 函数指针与返回闭包

    2024-07-22 16:56:06       17 阅读