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

@callmesoul/js-reward

v0.0.1

Published

nices user reward component/美观,易用,可定制的js打赏组件

Downloads

6

Readme

js-reward

美观,易用,可定制的js打赏组件

修改自Playing-reward 主要Playing-reward好像不维护了,也不可定制,使用麻烦等各种无问题,于是自己封装一个。

特点

  • [x] 使用简单
  • [x] 可定制

安装

  1. npm 安装

    npm install @callmesoul/js-reward --save

  2. 手动下载

    dist/js-reward.js

使用

  1. 简单示例

     <div id="js-reward-warp"></div>
    import JsReward from '@callmesoul/js-reward'
    new JsReward(
        'js-reward-warp',
         [
             // 预设了微信支付和阿里支付图标,使用预设图标时 name 要对应,还原贡献图标
             { name: 'wechatpay', src: '../src/images/WeChanQR.png' },
             { name: 'alipay', src: '../src/images/AliPayQR.png'}
         ]
     )
  2. 定制

     new JsReward(
         '${DomId}',
         // 支付列表定义
         [
             // type === 1 跳转 2 图片 src:二维码图片/跳转地址 
             // icon 定制图标最好统一比例,不然不好看
             { name: 'wechatpay', src: '${qrcodeImg}', icon: '${icon}', type: 1},
         ],
         // 自定义参数
         {
             iconWidth: '80px', // 图标宽度
             iconHeight: '30px', // 图标高度
             QRWidth: '200px', // 二维码宽度,高度自适应
             text: '感谢打赏' // 显示文字
         }
     )
     ``
    

贡献

欢迎贡献代码或提建议

| | | |