Git Product home page Git Product logo

vue-count-to's Introduction

vue3-count-to

基于 vue-count-to 升级改造

预览

在线预览

目的

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

兼容

  • v1.1.* 仅支持vue3;
  • v1.0.* 同时兼容vue2、vue3,亦能在ts下使用(可能存在ts识别不太对的问题)

版本

如果需要vue2-ts版本,请使用 vue-count-to-ts 包;

如果仅需要vue2版本,请直接使用 vue-count-to

运行环境

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

vitewebpack

安装 && 引入

安装

npm install vue3-count-to --save
#
yarn add vue3-count-to --save

全局注册

import countTo from 'vue3-count-to';
import { createApp } from 'vue';

const app = createApp(...);

app.use(countTo);

局部引入

<template>
  <count-to></count-to>
</template>

<script>
import { CountTo } from 'vue3-count-to';

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

浏览器引用

<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/vue3-count-to"></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 文档。

vue-count-to's People

Contributors

weirshi avatar xiaofan9 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.