# vue1-countdown

> 基于vue1.0的活动倒计时组件,可以使用服务端当前时间,在倒计时开始或者结束的时候,可以自定义回调.

Latest version **1.0.5** (published 2017-01-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue1-countdown
pnpm add vue1-countdown
yarn add vue1-countdown
bun add vue1-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.5 |
| Published | 2017-01-19 |
| First published | 2016-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | cgygd |
| Maintainers | cgygd |
| Keywords | vuejs, countdown |

## Links

- npm: https://www.npmjs.com/package/vue1-countdown
- Repository: https://github.com/cgygd/vue1-countdown
- Homepage: https://github.com/cgygd/vue2-countdown#readme
- Issues: https://github.com/cgygd/vue2-countdown/issues
- npm.io page: https://npm.io/package/vue1-countdown

## Recent versions

- 1.0.5 (latest) — 2017-01-19
- 1.0.4 — 2016-12-13
- 1.0.3 — 2016-12-13
- 1.0.2 — 2016-12-13
- 1.0.1 — 2016-12-13
- 1.0.0 — 2016-12-13

## README

# vue1-countdown

基于vue1.0的活动倒计时组件  
可以使用服务端当前时间  
在倒计时开始或者结束的时候,可以自定义回调.

## Install
```
npm install vue1-countdown --save

```

## Usage

```js
import CountDown from 'vue1-countdown'
components: {
    CountDown
}
```

```html
<count-down :current-time="1481450106" :start-time="1481450110" :end-time="1481450115" :tip-text="'距离开始文字1'" :tip-text-end="'距离结束文字1'" :end-text="'结束自定义文字2'" v-on:start_callback="countDownS_cb(2)" v-on:end_callback="countDownE_cb(2)"></count-down>
```

### options
1. **currentTime** - 当前时间戳,如果不传,默认获取用户本地的时间(建议传服务器的当前时间) 
    - **type**: Number
    - **required** : false
    - **default** : ( new Date() ).getTime()
2. **startTime** - 开始时间戳
    - **type**: Number
    - **required** : true
3. **endTime** - 结束时间戳
    - **type**: Number
    - **required** : true
4. **tipText** - 开始倒计时之前的提示文字
    - **type**: Number
    - **required** : false
    - **default** : 距离开始
5. **tipTextEnd** - 开始倒计时之后的提示文字
    - **type**: Number
    - **required** : false
    - **default** : 距离结束
6. **endText** - 倒计时结束之后的提示文字
    - **type**: Number
    - **required** : false
    - **default** : 已结束
    
### callBack
1. **start_callback** - 开始倒计时结束之后的回调方法
    - **type**: Function
    - **required** : false
2. **end_callback** - 活动倒计时结束之后的回调方法
    - **type**: Function
    - **required** : false

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