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}
/>
配置参数
Prop | Type | Default | Description |
---|---|---|---|
className |
string |
undefined |
追加类名 |
mobile |
string |
undefined |
默认提示发送手机号 |
prompt |
node |
undefined |
提示 |
couldConfirm |
bool |
true |
确认按钮是否可用 |
confirmBtnText |
string |
确认 |
确认按钮显示文字 |
confirmHandle |
func |
undefined |
确认按钮功能函数 |
codeLength |
number |
6 |
验证码长度 |
verifyLength |
number |
4 |
验证码激活长度 |
autoTiming |
number |
true |
是否自动倒计时 |
closeHandle |
func |
undefined |
关闭按钮功能函数 |
sendVerifyHandle |
func |
undefined |
重发按钮功能函数 |
/** * @function closeHandle 关闭按钮功能函数 * @param */ /** * @function sendVerifyHandle 重发按钮功能函数 * @param * @param */ /** * @function confirmHandle 确认按钮功能函数 * @param * @param */
注意事项
- 组件注意事项
开发调试
进入项目目录后,使用 node
命令启动服务
npm run start
打包发布可通过 node
命令执行
npm run build
npm publish
相关资料
Changelog
1.0.1
- init
1.1.0
update react version