verify-code-box

0.1.0 • Public • Published

CodeBox

React 验证码输入组件

截图

screenshot

安装

npm install verify-code-box

基本用法

const codeRef = useRef()

// 清空
const clear = () => {
  codeRef.current.clear()
}

const onChange = val => {
  console.log('val:', val)
}

<CodeBox ref={codeRef} onChange={onChange} />

Attributes

参数 说明 类型 可选值 默认值
ref 实例 func ——— ———
onChange change事件 func ——— ———

实例方法

方法名 说明 参数
clear 清除 ———

Package Sidebar

Install

npm i verify-code-box

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

8.78 kB

Total Files

4

Last publish

Collaborators

  • liruifengv