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

sms-check-code

v1.0.5

Published

一个仿原生效果的短信验证码组件,vue2.6插件,无依赖。验证失败时动画加标红颜色显示,点击手机验证码平铺填充等

Downloads

14

Readme

sms-check-code

license npm

演示


1,npm install sms-check-code --save

2,import VueSmsCode from 'sms-check-code'

3,vue.use(VueSmsCode)

<sms-check-code
    title='请输入验证码' 
    :code-num='6'
    :is-error='isError'
    error-color='#D81A1A'
    @finish='getSmsCode'
/>

| 事件 | 说明 | 默认 | 类型 |:----: |:----: |:----: | :----: | title | 组件标题 | 请输入验证码 | string | code-num | 验证码个数 | 6 | number | is-error | 验证码是否错误 | false | boolean | error-color | 验证码错误时显示的错误颜色 | #D81A1A | string

| 方法 | 说明 | 默认 | 类型 |:----: |:----: |:----: | :----: | finish | 验证码值 | '' | string

<template>
  <div id="app">
    <sms-check-code
        title='请输入验证码'
        :codeNum='6'
        :is-error='isError'
        error-color='#D81A1A'
        @finish='getSmsCode'
    />
    {{msg}}
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      isError: false, // 验证码错误
      msg: ''
    }
  },
  methods: {
    getSmsCode(val) {
      this.isError = false
      this.msg = val
      setTimeout(() => {
        this.isError = val !== '888888';
        if(val === '888888') {
          this.msg = '验证码输入成功'
        }
      }, 1000)
    }
  }
}
</script>

<style>
html, body {
  padding: 0;
  margin: 0;
}
</style>

github地址

gitee地址

1.0.4

解决 短信发送后 ios 软键盘不关闭的bug

1.0.5

解决 短信发送后 软键盘不关闭的bug