This project was reconstructed into TypeScript based on jigsaw
- Local Image
- Use TypeScript
- Randomly select network pictures from picsum.photos
install captcha
npm install @ldzn/js-captcha
# or
yarn add @ldzn/js-captcha
# or
pnpm install @ldzn/js-captcha
import captcha
import { captcha } from '@ldzn/js-captcha'
captcha({
el: DOM,
width: 100,
height: 100,
imgSrc:'',
onSuccess() {
console.log('success')
},
onFail() {
console.log('err')
},
onRefresh() {
console.log('refresh')
}
})
then import style
import '@ldzn/js-captcha/style.css'
OR
@import '@ldzn/js-captcha/style.css';