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

vue-scroll-ad

v1.1.0

Published

A Vue.js project

Downloads

13

Readme

vue-scroll-ad

Ad scrolling plugin for VUE 基于vue的广告滚动插件

效果图

效果图

Build Setup 使用步骤
#安装
npm install --save vue-scroll-ad

#使用
main.js中
import scrollAd from 'vue-scroll-ad'
Vue.use(scrollAd)

html中
<scroll-ad :dataList = "adList"></scroll-ad>
配置

| props | describe | type | default | | ------------ | ------------ | ------------ | ------------ | | dataList | 数据 | Array | [] | | inhoverColor | 显示的颜色 | String | #b4a078 | | hoverColor | 鼠标悬浮时的颜色 | String | #fff | | height | 高度 | String | 10px | | hasLine | 是否有下划线 | Boolean | false | | hasBorder | 横向多数据是否有分割线 | Boolean | false | | speed | 速度 | Number | 5000 | | valueList | 横线显示的子数据参数名 | String | list | | valueContent | 显示的内容的参数名 | String | content | | valueLink | 跳转的链接的参数名 | String | link |

使用示例
单列有下划线
<scroll-show class="ad"
	:dataList="adList"
	hover-color="#b4a078"
	inhover-color="#000"
	:hasLine="true"
></scroll-show>

adList: [
   { content: "广告内容1", link: "xxx.com" },
   { content: "广告内容2", link: "xxx.com" },
   { content: "广告内容3", link: "xxx.com" },
   { content: "广告内容4", link: "xxx.com" },
   { content: "广告内容5", link: "xxx.com" },
   { content: "广告内容6", link: "xxx.com" }
],

list的格式如果是: [{ content: "xxx", link: "xxx.com" }],则不需要传valueContent和valueLink,否则需要制定内容和链接的自定义参数名

多列无下划线
<scroll-show class="ad"
 	:dataList="adList2"
 	:speed="3000"
 	hover-color="#b4a078"
 	inhover-color="#969696"
 	value-list="subList"
 	value-content="adContent"
 	value-link="adLink"
></scroll-show>
 
adList2: [
 	{
		subList: [ 
			{ adContent: "第1条广告的第1条内容", adLink: "xxx.com" },
			{ adContent: "第1条广告的第2条内容", adLink: "xxx.com" },
			{ adContent: "第1条广告的第3条内容", adLink: "xxx.com" },
			{ adContent: "第1条广告的第4条内容", adLink: "xxx.com" }
		]
	},
	{
		subList: [
			{ adContent: "第2条广告的第1条内容", adLink: "xxx.com" },
			{ adContent: "第2条广告的第2条内容", adLink: "xxx.com" },
			{ adContent: "第2条广告的第3条内容", adLink: "xxx.com" },
			{ adContent: "第2条广告的第4条内容", adLink: "xxxx.com" }
		]
	},
	{
		subList: [
			{ adContent: "第3条广告的第1条内容", adLink: "xxx.com" },
			{ adContent: "第3条广告的第2条内容", adLink: "xxx.com" },
			{ adContent: "第3条广告的第3条内容", adLink: "xxx.com" },
			{ adContent: "第3条广告的第4条内容", adLink: "xxx.com" }
		]
	}
],

多列展示需要list数据中还有subList数据,默认的sub参数名为list,如果不一致,则需要传value-list=""进行自定义命名

GitHub地址(https://github.com/SaltedFishHPP/vue-scroll-ad).