@jiumao/rc-send-code
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

rc-send-code

NPM version NPM downloads

发送验证码倒计时组件,基于ant-designButton组件

安装和使用

  • 安装依赖
yarn add @jiumao/rc-send-code
  • 使用示例
import React from 'react';
import SendCode from '@jiumao/rc-send-code';

class App extends React.Component {
  render() {
    return (
      <SendCode
        onCaptcha={() => { return true; }}
      />
    );
  }
}

Props

  • second 倒计时时长(秒)默认60
  • initText 初始化按钮显示文本
  • runText 运行时显示文本
  • resetText 运行结束后显示文本
  • onEnd 倒计时结束执行函数
  • onCaptcha 获取验证码执行函数

/@jiumao/rc-send-code/

    Package Sidebar

    Install

    npm i @jiumao/rc-send-code

    Weekly Downloads

    1

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    16.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • wangxingkang