GithubHelp home page GithubHelp logo

vue-countdown's Introduction

vue-countdown

vue2中的倒计时组件

使用方式:

<div class="lefttime">
    <i-countdown :endTime="Date.now()+1000000" :diff="1000" :format="'d天hh小时mm分ss秒'"></i-countdown>
</div>
import iCountdown from '@/ui/i-countdown';

export default {
    components: {
        iCountdown
    },
}

i-countdown组件中接收的参数有:

  • endTime: {string | number} 截止时间,格式时间或毫秒级时间戳 '2018/08/08 23:59:59' | 1533743999000
  • diff: number 倒计时的频率,单位毫秒,默认为1000
  • format: string 展示的时间格式, d表示天, h表示时间, m表示分, s表示秒
  • start: boolean 手动开启倒计时
  • stop: boolean 手动结束倒计时

监听的方法:

  • @steps 每次倒计时触发一次
  • @finished 倒计时结束时触发,手动结束倒计时也会触发的

vue-countdown's People

Contributors

wenzi0github avatar

Watchers

James Cloos 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.