
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
seamless-scroll-v3
Advanced tools
基于 Vue3 的无缝衔接滚动组件
yarn add seamless-scroll-v3
# 或者使用 npm
npm install seamless-scroll-v3
<script lang="ts" setup>
import { ref } from "vue";
import SeamlessScroll from "seamless-scroll-v3";
const scrollRef = ref(null);
const classOption = ref({
direction: "top",
step: 1,
limitMoveNum: 5,
hoverStop: false
});
const listData = ref([{
title: "无缝滚动第一行无缝滚动第一行!!!!!!!!!!"
}, {
title: "无缝滚动第二行无缝滚动第二行!!!!!!!!!!"
}, {
title: "无缝滚动第三行无缝滚动第三行!!!!!!!!!!"
}, {
title: "无缝滚动第四行无缝滚动第四行!!!!!!!!!!"
}, {
title: "无缝滚动第五行无缝滚动第五行!!!!!!!!!!"
}, {
title: "无缝滚动第六行无缝滚动第六行!!!!!!!!!!"
}, {
title: "无缝滚动第七行无缝滚动第七行!!!!!!!!!!"
}, {
title: "无缝滚动第八行无缝滚动第八行!!!!!!!!!!"
}, {
title: "无缝滚动第九行无缝滚动第九行!!!!!!!!!!"
}, {
title: "无缝滚动第十行无缝滚动第十行!!!!!!!!!!"
}]);
const handleReset = (val) => {
scrollRef.value.reset();
classOption.value.direction = val;
};
</script>
<template>
<button @click="handleReset('top')">向上</button>
<button @click="handleReset('bottom')">向下</button>
<button @click="handleReset('left')">向左</button>
<button @click="handleReset('right')">向右</button>
<div style="height: 300px;">
<SeamlessScroll ref="scrollRef" :data="listData" :class-option="classOption" class="warp">
<ul class="item">
<li v-for="(item, index) in listData" :key="index">
<span v-text="item.title" />
</li>
</ul>
</SeamlessScroll>
</div>
</template>
<style scoped lang="scss">
.warp {
width: 360px;
height: 100%;
margin: 0 auto;
overflow: hidden;
background: #e6e6e6;
ul {
padding: 0;
margin: 0 auto;
li {
display: flex;
justify-content: space-between;
height: 50px;
font-size: 15px;
line-height: 50px;
}
}
}
</style>
| 属性名 | 说明 | 类型 | 默认 |
|---|---|---|---|
| data | 无缝滚动 list 数据 | Array | — |
| classOption | 配置项 | classOption | - |
| 方法名 | 说明 | 返回值 |
|---|---|---|
| scrollEnd | 回调 | — |
| 方法名 | 说明 | 参数 | 返回值 |
|---|---|---|---|
| reset | 重置 | - | — |
非常欢迎您的加入!提一个 Issue 或者提交一个 Pull Request
Pull Request:
git checkout -b feat/xxxxgit commit -am 'feat(function): add xxxxx'git push origin feat/xxxxpull requestGit 贡献提交规范feat 增加新功能fix 修复问题/BUGstyle 代码风格相关无影响运行结果的perf 优化/性能提升refactor 重构revert 撤销修改test 测试相关docs 文档/注释chore 依赖更新/脚手架配置修改等workflow 工作流改进ci 持续集成types 类型定义文件更改wip 开发中Star非常感谢留下星星的好心人,感谢您的支持 ❤️
Fork瞧,那些 小哥哥 、小姐姐 认真 学习 的样子真滴是 哎呦不错哦 ❤️
FAQs
The npm package seamless-scroll-v3 receives a total of 17 weekly downloads. As such, seamless-scroll-v3 popularity was classified as not popular.
We found that seamless-scroll-v3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.