1.0.6 • Published 3 years ago

wk-countdown v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

react的一款短信倒计时组件,有按钮型和文字型,需安装antd

使用方法:

npm i -S wk-countdown

简单示例:

import CountDown from "wk-countdown";

function Test(){

  const callback = () => {
    /* 发送短信的操作 */
  }
  
  return <CountDown callback={callback}/>
}

参数说明

nametyperequireddefaultdescription
callbackfunctiontrue如发送短信的操作
timenumberfalse60倒计时多少秒
titlestringfalse"获取验证码"用于修改按钮标题:"如重发验证码"
typestringfalse默认为antd按钮, 如需展示文字,设置type="text"

如:

import CountDown from "wk-countdown";

function Test(){
  let tableList = [{},{},{},{}]

  const callback = () => {
    /* 发送短信的操作 */
  }
  
  return <div>
    {
      tableList.map(item => {
        return <CountDown callback={callback} title='重发验证码' time={30} type='text'/>
      })
    }
  </div>
}

问题反馈: 443028159@qq.com

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago