Last active
March 7, 2019 18:56
-
-
Save jonabasque/57005f6ae05d58cdc9d48c597d80bdd6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<template lang="html"> | |
<v-progress-circular :rotate="360" | |
:size="100" | |
:width="15" | |
:value="value" | |
color="teal" | |
> | |
{{ value }} | |
</v-progress-circular> | |
</template> | |
<script> | |
export default { | |
name: 'sidebar', | |
data: () => ({ | |
interval: {}, | |
value: 0 | |
}), | |
beforeDestroy () { | |
clearInterval(this.interval) | |
}, | |
mounted () { | |
this.interval = setInterval(() => { | |
if (this.value === 100) { | |
return (this.value = 0) | |
} | |
this.value += 10 | |
}, 1000) | |
} | |
} | |
</script> | |
<style lang="css" scoped> | |
.v-progress-circular { | |
margin: 1rem; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment