Giter Site home page Giter Site logo

vue1-countdown's Introduction

vue1-countdown

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

Install

npm install vue1-countdown --save

Usage

import CountDown from 'vue1-countdown'
components: {
    CountDown
}
<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

vue1-countdown's People

Contributors

gala-1024 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.