0.3.4 • Published 2 years ago

vue3-captcha v0.3.4

Weekly downloads
29
License
MIT
Repository
-
Last release
2 years ago

About

A canvas captcha built in Vue3 with TypeScript

Install

npm i -S vue3-captcha

Use

<script setup lang="ts">
import {ref} from "vue"
import Captcha,{CaptchaInstance}  from 'vue3-captcha';
let value=ref('')
let refCode=ref<CaptchaInstance>(null)
const handleCheck=()=>{
  if(refCode.value?.check(value.value)){
    console.log("check success")
  }
}

</script>

<template>
 <Captcha ref="refCode" />
 <input v-model="value">
 <button @click="handleCheck">校验</button>
</template>

Props

attrtypedefaultremark
widthNumber|String120width
heightNumber|String40height
borderColorStringrgba(0,0,0,0.1)border-color
bgColorString#ffffffbackground-color
clickRefreshBooleantrueclick refresh
failRefreshBooleanfalseverification failed, refresh

Methods

methodparamsreturnremark
refreshvoidrefresh
checkvaluetrue/falseverification value
0.3.0

2 years ago

0.2.1

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.3.2

2 years ago

0.2.3

2 years ago

0.3.1

2 years ago

0.2.2

2 years ago

0.3.4

2 years ago

0.2.5

2 years ago

0.3.3

2 years ago

0.2.4

2 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago