Created
January 27, 2019 09:29
-
-
Save dobromir-hristov/570d0e0387b64307ca2aa2ebfd374cd9 to your computer and use it in GitHub Desktop.
the resetDelayed method on the auto awiating promises button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resetDelayed(property) { | |
// if loading prop is passed, dont set the internal states | |
if(this.$options.propsData.hasOwnProperty('loading')) { | |
return | |
} | |
this[property] = true; | |
setTimeout(() => { | |
this[property] = false; | |
}, this.time); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment