# xcountdown

> 基于 Vue 的倒计时组件

Latest version **0.1.2** (published 2020-08-29) · 0 weekly downloads

## Install

```sh
npm install xcountdown
pnpm add xcountdown
yarn add xcountdown
bun add xcountdown
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2020-08-29 |
| First published | 2020-08-29 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | xiaozhu188 |

## Links

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

## Dependencies (2)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5

## Recent versions

- 0.1.2 (latest) — 2020-08-29
- 0.1.1 — 2020-08-29
- 0.1.0 — 2020-08-29

## README

# usage
```
import countdown from './components/countdown.vue'

<countdown :time="2000*1000" :interval="3000" @progress="handleProgress" @end="handleEnd" />
```
# 参数
```
// 是否自动倒计时
autoStart: {
    type: Boolean,
    default: true
},
// 是否分发事件
emitEvents: {
    type: Boolean,
    default: true
},
// 倒计时步数
interval: {
    type: Number,
    default: 1000,
    validator: value => value >= 0
},
// 当前客户端时间戳(毫秒级)
now: {
    type: Number,
    default: () => Date.now()
},
// 倒计时时长(毫秒级)
time: {
    type: Number,
    default: 0,
    validator: value => value >= 0
}
```

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