Skip to content

Instantly share code, notes, and snippets.

@dobromir-hristov
Created January 27, 2019 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dobromir-hristov/570d0e0387b64307ca2aa2ebfd374cd9 to your computer and use it in GitHub Desktop.
Save dobromir-hristov/570d0e0387b64307ca2aa2ebfd374cd9 to your computer and use it in GitHub Desktop.
the resetDelayed method on the auto awiating promises button
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