1.1.1 • Published 5 years ago

lm-verify-code v1.1.1

Weekly downloads
67
License
-
Repository
-
Last release
5 years ago

verify_code

  • 作者:zhangjunkai
  • 邮箱:zjkdragon@163.com
  • 版本:1.1.0

介绍

verify code


安装

lm-* 组件使用 npm 进行管理,命名空间统一为 lm-,请使用以下命令进行组件安装。

npm i lm-verify-code --save
  • 如果你还没有安装 npm,可通过以下方式进行 安装
  • 安装cnpm npm install -g cnpm --registry=https://registry.npm.taobao.org

使用

样例文档

  • 待开发

使用

最少配置参数为:

<VerifyCode
    mobile="12345***456"
    //prompt={this.props.prompt ? this.props.prompt : null}
    couldConfirm={true}
    codeLenth={6}
    verifyLength={4}
    confirmBtnText="确认发送"
    closeHandle={this.closeHandle}
    sendVerifyHandle={this.sendVerifyHandle}
    confirmHandle={this.confirmHandle}
/>

配置参数

PropTypeDefaultDescription
classNamestringundefined追加类名
mobilestringundefined默认提示发送手机号
promptnodeundefined提示
couldConfirmbooltrue确认按钮是否可用
confirmBtnTextstring确认确认按钮显示文字
confirmHandlefuncundefined确认按钮功能函数
codeLengthnumber6验证码长度
verifyLengthnumber4验证码激活长度
autoTimingnumbertrue是否自动倒计时
closeHandlefuncundefined关闭按钮功能函数
sendVerifyHandlefuncundefined重发按钮功能函数

 /**
  * @function closeHandle 关闭按钮功能函数
  * @param {function} cb 清除验证码回调
  */
 /**
  * @function sendVerifyHandle 重发按钮功能函数
  * @param {function} cb1 发送验证码计时回调
  * @param {function} cb2 清除验证码回调     
  */
 /**
  * @function confirmHandle 确认按钮功能函数
  * @param {string} val 验证码
  * @param {function} cb 清除验证码回调     
  */

注意事项

  • 组件注意事项

开发调试

进入项目目录后,使用 node 命令启动服务

npm run start

打包发布可通过 node 命令执行

npm run build
npm publish

相关资料


Changelog

1.0.1

  1. init

1.1.0

update react version


1.1.1

5 years ago

1.0.1

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago