# wk-countdown

> react的一款倒计时组件,支持按钮和文字

Latest version **1.0.6** (published 2020-12-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install wk-countdown
pnpm add wk-countdown
yarn add wk-countdown
bun add wk-countdown
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2020-12-07 |
| First published | 2020-11-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | a443028159 |
| Maintainers | a443028159 |

## Links

- npm: https://www.npmjs.com/package/wk-countdown
- npm.io page: https://npm.io/package/wk-countdown

## Recent versions

- 1.0.6 (latest) — 2020-12-07
- 1.0.5 — 2020-12-07
- 1.0.4 — 2020-12-07
- 1.0.3 — 2020-11-16
- 1.0.2 — 2020-11-16

## README

react的一款短信倒计时组件,有按钮型和文字型,需安装antd

### 使用方法:
``` 
npm i -S wk-countdown
```

## 简单示例:
``` javascript
import CountDown from "wk-countdown";

function Test(){

  const callback = () => {
    /* 发送短信的操作 */
  }
  
  return <CountDown callback={callback}/>
}
```
## 参数说明

name|type|required|default|description
--|--|--|--|--
callback|function|true||如发送短信的操作
time|number|false|60|倒计时多少秒
title|string|false|"获取验证码"|用于修改按钮标题:"如重发验证码"
type|string|false||默认为antd按钮, 如需展示文字,设置type="text"
&emsp;
### 如:
``` javascript
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

---
_Source: https://npm.io/package/wk-countdown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
