Socket
Socket
Sign inDemoInstall

vue-captcha-code

Package Overview
Dependencies
11
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-captcha-code

基于Vue和canvas的验证码


Version published
Maintainers
1
Install size
18.1 MB
Created

Readme

Source

vue-captcha-code

基于 vuecanvas 的一个验证码组件

安装

npm install vue-captcha-code --save

APIS

点这里

基本用法

import VueCaptcha from 'vue-captcha-code';

const Template = (args, { argTypes }) => ({
  props: Object.keys(argTypes),
  data: function() {
    return {
      code: '',
    };
  },
  components: { VueCaptcha },
  methods: {
    handleChange(code) {
      console.log('code: ', code);
    },
    refresh() {
      this.$refs.captcha.refreshCaptcha();
    },
  },
  template: `
    <div>
      <vue-captcha 
        ref="captcha" 
        :captcha.sync="code"
        @on-change="handleChange">
      </vue-captcha>
      <div>
        <button @click="refresh">刷新</button>
      </div>
    </div>
  `,
});

在线示例

Edit vue-captcha s

Keywords

FAQs

Last updated on 14 Jan 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc