vue-captcha-code

基于Vue和canvas的验证码
2,309
Install
npm install vue-captcha-code
Latest Version:1.0.2
Vue:2
License:ISC
Last Updated:Jan 14, 2021
Links: GitHub  ·  npm
Maintainer: motoka

vue-captcha-code

基于 vue 和 canvas 的一个验证码组件

安装

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

Related Packages

vue-sliding-puzzle

基于 Vue 3 的滑动拼图验证码组件,支持干扰图、时间判定等安全特性

3,102 0

Version History

Version Released Vue License
1.0.2 ^2.6.11 ISC
1.0.1 ^2.6.11 ISC
1.0.0 ^2.6.11 ISC