npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

seamless-scroll-v3

v1.3.0

Published

无缝衔接滚动组件

Downloads

20

Readme

seamless-scroll-v3

基于 Vue3 的无缝衔接滚动组件

Install

 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>

seamless-scroll 参数

| 属性名 | 说明 | 类型 | 默认 | | --- | --- | --- | --- | | data | 无缝滚动 list 数据 | Array | — | | classOption | 配置项 | classOption | - |

Events 事件

| 方法名 | 说明 | 返回值 | | --- | --- | --- | | scrollEnd | 回调 | — |

Exposes

| 方法名 | 说明 | 参数 | 返回值 | | --- | --- | --- | --- | | reset | 重置 | - | — |

如何贡献

非常欢迎您的加入!提一个 Issue 或者提交一个 Pull Request

Pull Request:

  1. Fork 代码!
  2. 创建自己的分支: git checkout -b feat/xxxx
  3. 提交您的修改: git commit -am 'feat(function): add xxxxx'
  4. 推送您的分支: git push origin feat/xxxx
  5. 提交pull request

Git 贡献提交规范

参考 vue 规范 (Angular)

  • feat 增加新功能
  • fix 修复问题/BUG
  • style 代码风格相关无影响运行结果的
  • perf 优化/性能提升
  • refactor 重构
  • revert 撤销修改
  • test 测试相关
  • docs 文档/注释
  • chore 依赖更新/脚手架配置修改等
  • workflow 工作流改进
  • ci 持续集成
  • types 类型定义文件更改
  • wip 开发中

Star

非常感谢留下星星的好心人,感谢您的支持 ❤️

Stargazers repo roster for Yolo-00/seamless-scroll

Fork

瞧,那些 小哥哥小姐姐 认真 学习 的样子真滴是 哎呦不错哦 ❤️

Forkers repo roster for Yolo-00/seamless-scroll