New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vuejs-countdown-timer

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuejs-countdown-timer

Vue 2 countdown and timer component

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
721
decreased by-45.42%
Maintainers
1
Weekly downloads
 
Created
Source

Vue-countdown-timer Component

Build Status Github starts License Npm downloads Npm version

一 Vue 2 countdown and timer component

Demo 📙中文文档 📙Changelog

Installation

npm i vuejs-countdown-timer -S

Usage

Support

Supported PackageVersion
Vue2.5+

Install component

Javascript

// global register
import VueCountdownTimer from 'vuejs-countdown-timer'
Vue.use(VueCountdownTimer)

methods: {
  startCallBack: function (x) {
    console.log(x)
  },
  endCallBack: function (x) {
    console.log(x)
  }
}

Vue template

<vue-countdown-timer
  @start_callback="startCallBack('event started')"
  @end_callback="endCallBack('event ended')"
  :start-time="'2018-10-10 00:00:00'"
  :end-time="1481450115"
  :interval="1000"
  :start-label="'Until start:'"
  :end-label="'Until end:'"
  label-position="begin"
  :end-text="'Event ended!'"
  :day-txt="'days'"
  :hour-txt="'hours'"
  :minutes-txt="'minutes'"
  :seconds-txt="'seconds'">
</vue-countdown-timer>

Props

start-time

  • type: Number|String
  • required : true

end-time

  • type: Number|String
  • required : true

interval

  • type: Number
  • required : false
  • default : 1000

start-label

  • type: String
  • required : false
  • default : ''

end-label

  • type: String
  • required : false
  • default : ''

label-position - begin (before countdown) / end (after countdown)

  • type: String
  • required : false
  • default : 'begin'

end-text

  • type: String
  • required : false
  • default : 'Event ended!'

day-txt

  • type: String
  • required : false
  • default : ':'

hour-txt

  • type: String
  • required : false
  • default : ':'

seconds-txt

  • type: String
  • required : false
  • default : ':'

seconds-fixed

  • type: String
  • required : false
  • default : ':'

Events

start_callback - Event started callback

  • type: Function
  • required : false

end_callback - Event ended callback

  • type: Function
  • required : false

Liscense

MIT License

Copyright (c) 2018 TriDiamond

Keywords

FAQs

Package last updated on 04 Sep 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc