All Projects → cgygd → Vue2 Countdown

cgygd / Vue2 Countdown

Licence: mit
基于vue2.0的活动倒计时组件

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Vue2 Countdown

Vue Cli Multipage Bootstrap
vue-cli-multipage-bootstrap demo with vue2+vue-router+vuex+bootstrap+markdown for learning vue2.0
Stars: ✭ 105 (-23.91%)
Mutual labels:  vue2
Vue Datatables Net
Vue jQuery DataTables.net wrapper component
Stars: ✭ 119 (-13.77%)
Mutual labels:  vue2
Gustavo
👨 A (mostly) headless blogging platform built atop Nuxt & Gist.
Stars: ✭ 131 (-5.07%)
Mutual labels:  vue2
Seemusic
Vue 云音乐播放器,网易云音乐API,可听网易云高品质付费歌曲。 Vue music player
Stars: ✭ 112 (-18.84%)
Mutual labels:  vue2
Vue Clipboard2
A simple vue2 binding to clipboard.js
Stars: ✭ 1,617 (+1071.74%)
Mutual labels:  vue2
Vue2 Scaffold
The best scaffold for Vue 2.x based on vue-cli#vuejs-templates/webpack
Stars: ✭ 125 (-9.42%)
Mutual labels:  vue2
Seppf
普兰能效平台开源版(前端)
Stars: ✭ 104 (-24.64%)
Mutual labels:  vue2
Vue.imagesloaded
Vue.js 2.0 directive to detect images loading
Stars: ✭ 134 (-2.9%)
Mutual labels:  vue2
Vuetify Swipeout
👆 A swipe out example built with Vue CLI 3 + Vuetify + Swiper.
Stars: ✭ 117 (-15.22%)
Mutual labels:  vue2
Vue Antd Pro
vue+ant-design-vue创建后台管理系统模板
Stars: ✭ 131 (-5.07%)
Mutual labels:  vue2
Vue Easy Toast
A Toast widget for Vue 1 & 2
Stars: ✭ 112 (-18.84%)
Mutual labels:  vue2
Vue Ruby China
使用Vue.js框架搭建的ruby china山寨版,集成vue-router+vuex等
Stars: ✭ 113 (-18.12%)
Mutual labels:  vue2
Semantic Ui Vue2
Semantic UI Integration for Vue 2
Stars: ✭ 128 (-7.25%)
Mutual labels:  vue2
Vue2 Element
基于vue2 + vue-router2 + element-ui + vuex2 + fetch + webpack2 企业级后台管理系统最佳实践
Stars: ✭ 112 (-18.84%)
Mutual labels:  vue2
Vue Scroll Behavior
Customize the scrolling position on route navigation. Especially hash mode.
Stars: ✭ 132 (-4.35%)
Mutual labels:  vue2
Multivisor
Centralized supervisor WebUI and CLI
Stars: ✭ 104 (-24.64%)
Mutual labels:  vue2
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (-12.32%)
Mutual labels:  vue2
Vue Element Quick Start
Vue2, Vuex 3, Vue Router 3, Element-ui and Typescript SPA project quick start kit(Vue element ui 快速开始脚手架)
Stars: ✭ 135 (-2.17%)
Mutual labels:  vue2
Vuelidate Error Extractor
Vuelidate form-group helper that extracts errors easily.
Stars: ✭ 133 (-3.62%)
Mutual labels:  vue2
Vue Online
A reactive offline indicator component for vue.js
Stars: ✭ 130 (-5.8%)
Mutual labels:  vue2

vue2-countdown

基于vue2.0的活动倒计时组件
可以使用服务端当前时间
在倒计时开始或者结束的时候,可以自定义回调.
文档:https://cgygd.github.io/vue2-countdown/
demo:https://cgygd.github.io/vue2-countdown/example/index.html

Install

npm install vue2-countdown --save

Usage

import CountDown from 'vue2-countdown'
components: {
    CountDown
},
methods: {
  countDownS_cb: function (x) {
    console.log(x)
  },
  countDownE_cb: function (x) {
    console.log(x)
  }
}
<count-down v-on:start_callback="countDownS_cb(1)" v-on:end_callback="countDownE_cb(1)" :currentTime="1481450106" :startTime="1481450110" :endTime="1481450115" :tipText="'距离开始文字1'" :tipTextEnd="'距离结束文字1'" :endText="'结束自定义文字2'" :dayTxt="'天'" :hourTxt="'小时'" :minutesTxt="'分钟'" :secondsTxt="'秒'"></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: String
    • required : false
    • default : 距离开始
  5. tipTextEnd - 开始倒计时之后的提示文字
    • type: String
    • required : false
    • default : 距离结束
  6. endText - 倒计时结束之后的提示文字
    • type: String
    • required : false
    • default : 已结束
  7. dayTxt - 自定义显示的天数文字
    • type: String
    • required : false
    • default : :
  8. hourTxt - 自定义显示的小时文字
    • type: String
    • required : false
    • default : :
  9. secondsTxt - 自定义显示的分钟文字
    • type: String
    • required : false
    • default : :
  10. secondsFixed - 自定义显示的秒数文字
    • type: String
    • required : false
    • default : :

callBack

  1. start_callback - 开始倒计时结束之后的回调方法
    • type: Function
    • required : false
  2. end_callback - 活动倒计时结束之后的回调方法
    • type: Function
    • required : false
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].