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

global-tool

v0.0.8

Published

一个开源的前端工具类函数库

Downloads

1

Readme

vue-pay-keyboard

A Vue component to pay-keyboard 一个虚拟数字支付键盘插件

vue插件开发与发布

安装

npm install global-tool -S

使用

// ES6 main.js 全局使用组件
import vuePayKeyboard from 'global-tool'

Vue.use(vuePayKeyboard)

// 组件内使用
import {vuePayKeyboard} from 'global-tool'

components{
    'vue-pay-keyboard':vuePayKeyboard
}

配置

   <vue-pay-keyboard
   ref="pay"
   :is-pay='isPay'
   @pas-end='pasEnd'
   @close='isPay=false'>
    <!-- 自定义支付动画 -->
      <div slot="loading-ani">
        <svg></svg>
      </div>
    </vue-pay-keyboard>
methods:{
    pasEnd(val) {
      console.log(val);  //得到密码 可能会进行一些加密动作
      setTimeout(() => { // 模拟请求接口验证密码中 ..
        if (val === '111111') { // 密码正确
          this.$refs.pay.$payStatus(true) // 拿到子组件的事件
        } else {
          this.$refs.pay.$payStatus(false)
        }
      }, 1000)
    }
}

Props

| name | Description | type |default| | ----------------- | ---------------- | :--------: | :----------: | | highlight-color | 点击时高亮颜色 |String| #000 | pas-digits | 密码位数 |Number | 6 | is-pay | 显示键盘 |Boolean | false | pay-title | 支付标题 |String | 请输入支付密码

Slots 支持自定义插槽

| name | Description | type |default| | ----------------- | ---------------- | :--------: | :----------: | | loading-ani | 支付请求中 || loading | pay-status | 支付成功或者失败|| 支付成功

Events

| name | Description | | :--------: | ----- | | pas-end | 密码输入完毕后触发事件,接收所输密码 | close | 关闭键盘