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

draw-lottery

v1.0.1

Published

一个老虎机抽奖,可以XY切换的插件,可以循环多个使用

Downloads

8

Readme

draw lottery

一个横向竖向滚动抽奖,用到import TweenMax from 'gsap',TweenMax的插件 let webUrl = 网址:https://www.tweenmax.com.cn/api/tweenmax/TweenMax()

<draw-lottery/>

props

| 描述 | 名称 | 类型 | 例子 | 解释 | 是否必传 | | :----- | :-----:| :-----: | :----- | :----- | :----- | | 动画时间 | animationTime | Number:10 | 10 | 10秒 | no | | 列表数据 | multiDataArr | Array | {drawData:[{src:'',name:''},drawDataSuccess:{}],} | 包含全部数据以及中将数据 | yes | | 中奖位置 | winPrizeIndex | String:-2000 | -2000 | 多少px,总长 | yes | | 中奖前留几个 | winIndex | Number:0 | 1 | (是第1个) | yes | | 滚动方式 | drawXY | Boolean:true | Y:true X:false | Y:true X:false | no | | 模型数据 | resData | Object | resData 定义样式 | 下方resData | yes | | 动画初始化 | TweenMaxInit | Object | {ease:""} | webUrl上方地址 | no | | 开始动画 | getStart | Function | 收不到参数(bug) | webUrl上方地址 | no | | 进行中 | getUpdate | Function | 收不到参数(bug) | webUrl上方地址 | no | | 已结束 | getComplete | Function | 收不到参数(bug) | webUrl上方地址 | no | | Repeat | getRepeat | Function | 收不到参数(bug) | webUrl上方地址 | no |

multiDataArr

   multiDrawData: [
        {
            // 全部数据
          drawData: [
            {
              src: "https://asset.yskins.com/9frg4EpbifmM1FjkvQtu3hvSMoEF0h9JjjpzfeLv.png",
              name: "1",
            },
            {
              src: "https://asset.yskins.com/Ke4T4zu8wQTmHWdHGFuqwarAzIAe9wPlaMAasu76.png",
              name: "2",
            },
            {
              src: "https://asset.yskins.com/9frg4EpbifmM1FjkvQtu3hvSMoEF0h9JjjpzfeLv.png",
              name: "3",
            },
            {
              src: "https://asset.yskins.com/Ke4T4zu8wQTmHWdHGFuqwarAzIAe9wPlaMAasu76.png",
              name: "4",
            },
          ],
          // 中将
          drawDataSuccess: {
            src: "https://asset.yesskins.com/pvzZR7bOvTkf9jPYlDo1d6rnrA3x7u6RPbCv0Ljm.png",
            name: "中奖1",
          },
        },
       ],

resData 定义样式

  • WH:定义宽高必填,其他样式随便,定义在style内的样式,(必传宽高),要加入溢出隐藏属性
  • IdBox:最外层div添加类,可以添加背景,
  • Flex:套在滚动的外框添加类,这个控制横竖想滚动,
  • classBox:每一个滚动的小item添加类,
  • classImg:内部图片添加类,
  • 名称使用div包裹,可使用.XX div{}定义
{
    WH:{
    width:'110',
    height:"110",
    overflow:"hidden",
    },
    IdBox:[''],
    classBox:['',''],
    classImg:[''],Flex:['']
}