# vue-count-to2

> vue-count-to vue3版本

Latest version **1.0.6** (published 2021-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-count-to2
pnpm add vue-count-to2
yarn add vue-count-to2
bun add vue-count-to2
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2021-09-22 |
| First published | 2021-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 30.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 76 |
| Author | sifan |
| Maintainers | xiaofan9 |
| Keywords | vue-count, vue-count-to, vue-count-to2, vue, component, vue-component |

## Links

- npm: https://www.npmjs.com/package/vue-count-to2
- Repository: https://github.com/xiaofan9/vue-count-to
- Homepage: https://github.com/xiaofan9/vue-count-to#readme
- Issues: https://github.com/xiaofan9/vue-count-to/issues
- npm.io page: https://npm.io/package/vue-count-to2

## Dependencies (2)

- [core-js](https://npm.io/package/core-js.md) ^3.8.1
- [vue-count-to](https://npm.io/package/vue-count-to.md) ^1.0.13

## Recent versions

- 1.0.6 (latest) — 2021-09-22
- 1.0.5 — 2021-09-08
- 1.0.4 — 2021-04-09
- 1.0.3 — 2021-04-09
- 1.0.2 — 2021-02-12
- 1.0.1 — 2021-02-12

## README

# vue-count-to2

> 基于 vue-count-to 升级改造

## 预览

[在线预览](https://codepen.io/xiaofan9/pen/QWGGdKJ)

## 目的

- 由于原有作者好像没打算升级版本，故而自己升级维护一下。

## 兼容

- v1.1.* 仅支持vue3；
- v1.0.* 同时兼容vue2、vue3，亦能在ts下使用（可能存在ts识别不太对的问题）

## 版本

如果需要vue2-ts版本，请使用 [vue-count-to-ts](https://npmjs.org/package/vue-count-to-ts) 包；

如果仅需要vue2版本，请直接使用 [vue-count-to](https://npmjs.org/package/vue-count-to) 包

## 运行环境

> 已经测试的运行环境，vite建议使用2.0+，webpack建议使用4.0+

[vite](https://vitejs.dev/)、[webpack](https://webpack.docschina.org/)

## 安装 && 引入

> 安装

``` bash
npm install vue-count-to2 --save
# 或
yarn add vue-count-to2 --save
```

> 全局注册

```javascript
import countTo from 'vue-count-to2';
```

```javascript
import { createApp } from 'vue';

const app = createApp(...);

app.use(countTo);
```

> 局部引入

```javascript
<template>
  <count-to></count-to>
</template>

<script>
import { CountTo } from 'vue-count-to2';

export default {
  components: {
    CountTo
  }
}
</script>
```

> 浏览器引用

```html
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/vue-count-to2"></script>

<body>
  <div id="app">
    <count-to></count-to>
  </div>
</body>

<script>
const app = window.Vue.createApp();

app.use(window.countTo).mount('#app');
</script>
```

## 文档

参看 [vue-count-to](https://github.com/PanJiaChen/vue-countTo) 文档。

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