安装插件
npm install react-captcha-code -S//oryarn add react-captcha-code -S
属性和方法
样例
import React, {useCallback } from 'react';import Captcha from 'react-captcha-code';export default {title: 'Basic' };export const Basic = () => {const handleClick = useCallback((captcha) => {console.log('captcha:', captcha);}, []);return <Captcha charNum={4} onChange={handleClick} />;};export default Basic;