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

os-verify

v0.1.19

Published

针对于pc和移动端的滑动验证

Readme

os-verify 滑动验证

安装

npm i os-verify -S

引入

import OsVerify from 'os-verify'
import 'os-verify/lib/os-verify.css'
Vue.use(OsVerify)

案例

<template>
  <div>
    <os-verify :acquire="captchasGet" :verify="loginCaptcha"></os-verify>
  </div>
</template>

<script>
    import {Captcha} from "../api/verify.js"; //封装接口
    export default {
        methods: {
            /**
             * 获取验证码
             */
            async captchasGet (data) {
                return await Captcha.getCaptchas(data)
            },
            /**
             * 拼图校验
             */
            async loginCaptcha (data) {
                return await Captcha.captchaCheck(data)
            },
        },
    }
</script>

参数

参数           类型        说明

mode           String      显示方式 弹出框 pop(默认)  固定 fixed

explain        String      滑动条提示文字 默认:向右滑动完成验证

captchaType    String      验证类型 滑动 blockPuzzle(默认) 文字clickWord

vSpace         Number      验证码图片和移动条容器的间隔,默认:5 (px)

imgSize        Object      其中包含了width、height两个参数,分别代表图片的宽度和高度 默认:{width:'310px',height:'155px'}

defaultImg     String      设置默认背景图片

方法(必须)

事件名称         说明

captchasGet      获取验证码方法 post请求

loginCaptcha     校验验证码方法 post请求

回调方法

回调方法        参数                      说明

checkout        (e)获取验证码返回的参数   获取滑动验证码的回调方法

success         (e)验证成功返回的参数     拼图校验成功回调方法

closeClick       -                        关闭滑动验证