0.1.0 • Published 2 years ago
vue-rotate-captcha v0.1.0
vue-rotate-captcha
Refer Project: react-slide-captcha
0.Screenshot

1.Usage
(1) Installation
TODO
(2) requirement
1. vue (3) simple example
import RotateCaptcha from 'vue-rotate-captcha';
import 'vue-rotate-captcha/dist/styles.css';
<RotateCaptcha
:imageUrl="state.imageUrl"
@validate="validateCallback"
/>2 Live Demo
TODO
3 API (0.1.0)
RotateCaptcha
| Properties | Descrition | Type | Default | |
|---|---|---|---|---|
| isLoading | loading status(optional) | boolean | false | |
| imageUrl | URL for puzzle image(required) | string | - | |
| @validate | requeset callback(required) | (context: Validation) => void | - | |
| <!-- | containerClassName | container class(optional) | any | - |
| style | container style(optional) | object | - | |
| tipsText | text for tips(optional) | string | - | |
| tipsClassName | tips class(optional) | any | - | |
| tipsStyle | tips style(optional) | object | - | |
| robotValidate | robot validate config(optional) | object: { offsetY: number, handler: () => any,} | - | |
| reset | component reset type auto/manual (optional) | string | auto | |
| resetButton | component reset type none/inline/outline(optional) | JSX.Element | 'auto' | |
| resetButtonElement | component reset type(optional) | string | default button svg | |
| onReset | reset call back(optional) | () => any | - | |
| imagePosition | bg image position type top/bottom (optional) | string | 'bottom' | |
| loadingIcon | loading icon(optional) | JSX.Element | defalut loading svg | |
| displayType | display type hover/static(optional) | string | 'hover' | |
| hoverPanelStyle | hover panel style(optional) | object | - | |
| hoverPanelClassName | hover panel className(optional) | string | - | --> |
ValidationContext
export type ValidationContext = {
readonly widthPercentage: number,
readonly rotationDegree: number,
readonly success: (callback: () => any) => void,
readonly fail: (callback: () => any) => void,
readonly reset: (isReset?: boolean) => void,
}4 License
This entire project are built based on MIT license
MIT
0.1.0
2 years ago