🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

vue-countdown

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-countdown

基于vuejs的倒计时组件

1.0.4
latest
npm
Version published
Weekly downloads
282
54.1%
Maintainers
1
Weekly downloads
 
Created
Source

vue-countdown

一款基于 vuejs 的倒计时组件

安装

npm install --save vue-countdown

options

  • time 倒计时时间,默认60s
  • normalText 常规(未进入倒计时)状态下的提示文字,默认获取验证码
  • waitingText 倒计时状态下的提示文字,默认重新获取

events

  • plan 用户点击后触发,向父级派发该事件
  • ready 触发组件开始进入倒计时状态,由父级触发

在你的vue项目中进行使用(with ES6)

  import countdown from 'vue-countdown';
  export default {
     components:{
       	countdown
     },
     methods:{
        	plan:function(){    //用户点击后准备进入倒计时状态
        		
        		//父级逻辑校验
        		/**
        		* some code
        		*/
        		
        		//校验通过后广播ready事件
        		this.$broadcast("ready");
        		
        	}
       }
  }
    <countdown @plan="plan"></countdown>

Keywords

countdown

FAQs

Package last updated on 29 Aug 2016

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