Path: blob/master/phs/ola-otpbypass/index_files/ow-polling.9b340d56.js.download
996 views
"use strict";Vue.component("ow-polling",{render:function(){var t=this.$createElement;return(this._self._c||t)("div")},staticRenderFns:[],name:"owPolling",props:{interval:{type:Number,default:5e3},maxLimit:{type:Number,default:36e5},count:{type:Number,default:0},active:{type:Boolean,default:!1}},methods:{start:function(){var t=this;t.count=0,t.timer=setInterval(function(){t.count<=t.maxLimit/t.interval?(t.$emit("action"),t.count++):(t.stop(),t.$emit("timeout"))},this.interval)},stop:function(){clearInterval(this.timer)}},beforeDestroy:function(){this.stop()},mounted:function(){this.active&&this.start()},watch:{active:function(){this.active?this.start():this.stop()}}}); //# sourceMappingURL=../sourcemap/ow-components/ow-polling.9b340d56.js.map