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

ghn-marquee-plugin

v1.0.3

Published

A Vue.js project

Downloads

2

Readme

ghn-marquee-plugin

安装

# 安装
npm install ghn-marquee-plugin --save

使用

  • ghn-marquee-one为不固定长度,内容会全部显示
  • ghn-marquee-two为固定长度,超过长度的使用...代替,且内部实现方式不一样。
# main.js
import GhnMarqueePlugin from "../static/ghn-marquee-plugin.js"
Vue.use(GhnMarqueePlugin);

# 组件内
<ghn-marquee-one :lists="realData" style="width: 400px;" @getTitle="getTitle"></ghn-marquee-one>
<ghn-marquee-two :lists="realData" style="width: 400px;" @getTitle="getTitle"></ghn-marquee-two>

# realData数据格式
realData: [
  { icon: 'el-icon-edit', num: "1", content: '111作家杰罗姆·大卫·塞林格创作的唯一1一部长作家杰罗姆·大卫·塞林格创作的唯一一部长1', },
  { icon: 'icon iconfont icon-xiaoyu', num: "2", content: '22作家杰罗姆·大卫·塞林格创作的唯一2一部长作家杰罗姆·大卫·塞林格创作的唯一一部长2', },
  { icon: '', num: "3", content: '33作家杰罗姆·大卫·塞林格创作的唯一3一部长作家杰罗姆·大卫·塞林格创作的唯一一部长3331', },
  { icon: '', num: "4", content: '44作家杰罗姆·大卫·塞林格创作的唯一4一部长作家杰罗姆·大卫·塞林格创作的唯一一部长44', },
  { icon: '', num: "5", content: '55作家杰罗姆·大卫·塞林格创作的唯一5一部长作家杰罗姆·大卫·塞林格创作的唯一一部长44', },
],

# 返回函数及参数
getTitle(title){
  console.log(title);
},


# ghn-marquee-two 额外参数
<ghn-marquee-two :lists="realData" style="width: 400px;" @getTitle="getTitle" :totalWidth="1200" :amount="4" :height="50"></ghn-marquee-two>

# 默认值
:amount="4" 
:totalWidth="1200" 
:height="50"

amount为不折叠的数组长度,实际数组长度要多于这个数量,才会进行滚动
totalWidth是数组总长度,如果amount为4,则每条占300px,多余的信息会变成...

功能

  • 将列表信息循环滚动展示信息
  • 鼠标悬停暂停滚动
  • 鼠标离开继续滚动
  • 鼠标点击返回当前项
  • 允许添加图标