go-captcha-vue3
v2.0.0-beta.1
Published
This is the vue package for go-captcha
Downloads
35
Maintainers
Readme
Go Captcha Vue Package
vue2
Greater than or equal to 2.7.14 and less than 3.0
yarn add go-captcha-vue
# or
npm install go-captcha-vue
# or
pnpm install go-captcha-vue
Use Go Captcha
import "go-captcha-vue/dist/style.css"
import GoCaptcha from "go-captcha-vue"
Vue.use(GoCaptcha)
vue3
Greater than 3.0
yarn add go-captcha-vue3
# or
npm install go-captcha-vue3
# or
pnpm install go-captcha-vue3
Use Go Captcha
import "go-captcha-vue3/dist/style.css"
import GoCaptcha from "go-captcha-vue3"
Vue.use(GoCaptcha)
🖖 Click Mode Captcha
<gocaptcha-click
:config="{}"
:data="{}"
:events="{}"
/>
params
// config = {}
interface Config {
width?: number;
height?: number;
thumbWidth?: number;
thumbHeight?: number;
verticalPadding?: number;
horizontalPadding?: number;
showTheme?: boolean;
}
// data = {}
interface Data {
image: string;
thumb: string;
}
// events = {}
interface Events {
click?: (x: number, y: number) => void;
refresh?: () => void;
close?: () => void;
confirm?: (dots: Array<CaptchaDot>) => boolean;
}
🖖 Slide Mode Captcha
<gocaptcha-slide
:config="{}"
:data="{}"
:events="{}"
/>
<gocaptcha-slide-region
:config="{}"
:data="{}"
:events="{}"
/>
params
// config = {}
interface Config {
width?: number;
height?: number;
thumbWidth?: number;
thumbHeight?: number;
verticalPadding?: number;
horizontalPadding?: number;
showTheme?: boolean;
}
// data = {}
interface Data {
thumbX: number;
thumbY: number;
thumbWidth: number;
thumbHeight: number;
image: string;
thumb: string;
}
// events = {}
interface Events {
move?: (x: number, y: number) => void;
refresh?: () => void;
close?: () => void;
confirm?: (point: CaptchaPoint) => boolean;
}
🖖 Rotate Mode Captcha
<gocaptcha-rotate
:config="{}"
:data="{}"
:events="{}"
/>
params
// config = {}
interface Config {
width?: number;
height?: number;
thumbWidth?: number;
thumbHeight?: number;
verticalPadding?: number;
horizontalPadding?: number;
showTheme?: boolean;
}
// data = {}
interface Data {
angle: number;
image: string;
thumb: string;
}
// events = {}
interface Events {
rotate?: (angle: number) => void;
refresh?: () => void;
close?: () => void;
confirm?: (angle: number) => boolean;
}