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 🙏

© 2026 – Pkg Stats / Ryan Hefner

myluckywheel

v1.0.28

Published

this is a luckywheel

Readme

大转盘组件

1.转盘描述

1.1 转盘样式描述

luckywheel     转盘是由转盘标题,转盘背景图,奖品鱼片,抽奖按钮,转盘圆盘背景图,奖品文字说明,剩余抽奖次数以及神域抽奖次数背景图组成,其中奖品图片,奖品说明文字,抽奖次数,转盘圆盘背景图可以由用户自定义。 wheeltoast     在转盘旋转结束时,会根据结果弹出中奖弹窗或未中奖弹窗。

1.2 转盘功能描述

    用户点击抽奖按钮,转盘旋转,停止后,根据返回中奖ID值,转盘停留在中奖奖品或者未中奖处,弹出中奖或未中奖说明弹窗,抽奖次数减1,待次数用尽时,点击关闭弹窗时,页面跳转到指定页面。

2.使用教程

2.1 安装

2.2 方法定义及参数说明

参数说明:

参数|类型|默认值|说明 --|--|--|-- total|Number|8|奖品数目 change|Number|5|抽奖次数 wheelUrl|Array|-|圆盘背景URL newUrl|String| "http://www.longfor.com/"|抽奖结束跳转URL,默认龙湖官网 prizeIdFn|Function|-|返回获奖ID prizeInfo|Array(:Object)|-|奖品列表

wheelUrl中的值需以require()形式传入:

 wheelUrl: [
                require("./assets/img/draw_six.png")
            ],

prizeInfo中元素的结构:

元素|类型|说明 ---|---|--- icon||奖品图片URL name|String|奖品名称 isPrize|0或1|0表示不是奖品(未中奖)1表示是奖品 id|String|ID prizeDes|String|奖品的描述性语言

具体如下所示:

 prizeInfo: [{
                icon: require("./img.png"),//奖品图片url
                name: "龙小湖玩偶",  // 奖品名称
                isPrize: 1,      // 该奖项是否为奖品
                id: 'pig',      // 奖品id
                prizeDes:'恭喜获得玩偶一只'//获奖描述
                },
                ……]

Event

事件名|说明|参数 --|--|-- endPrize|点击抽奖按钮时触发|true

注意:

1, 传入的奖品数目应与传入奖品列表的长度一致。

2, 传入圆盘背景图的分割线应有一条与抽奖按钮指针方向重合,即指向12点方向。

正确的图片方向: wheeltoast

错误的图片方向: wheeltoast