Skip to content

Instantly share code, notes, and snippets.


uno-de-piera/countdown.vue Secret

Created May 28, 2018
What would you like to do?
<div class="card text-white bg-info mb-3" v-if="seconds">
<div class="card-body">
<h2>{{ countdown }}</h2>
import * as moment from 'moment';
export default {
name: 'CountDown',
props: {
seconds: {
type: Number,
required: true
data () {
return {
countdown: null,
expires_in: null,
interval: null,
mounted () {
this.countdown = moment.utc(this.seconds).format('HH:mm:ss');
this.expires_in = this.seconds;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.