forked from epicmaxco/vuestic-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress bars hacky fixes (epicmaxco#200)
* Progress bars hacky fixes * Remove blinking on 100%
- Loading branch information
Showing
5 changed files
with
153 additions
and
115 deletions.
There are no files selected for viewing
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
57 changes: 57 additions & 0 deletions
57
src/components/statistics/progress-bars/Widgets/ColorfulBars.vue
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<vuestic-widget headerText="Colorful Bars"> | ||
<div class="row"> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.basic' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar ref="chBasic" colorName="danger"/> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.thin' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar size="thin" ref="chThin" colorName="info"/> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.thick' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar size="thick" ref="chThick" colorName="warning"/> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.basicVertical' | translate}} | ||
<div class="pb-container"> | ||
<div> | ||
<vuestic-progress-bar type="vertical" ref="cvBasic" | ||
colorName="success"/> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.thinVertical' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar size="thin" type="vertical" ref="cvThin" | ||
colorName="black"/> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.circle' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar type="circle" ref="ccircle"/> | ||
</div> | ||
</div> | ||
</div> | ||
</vuestic-widget> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'standard-bars', | ||
mounted () { | ||
for (let ref in this.$refs) { | ||
this.$refs[ref].value = 100 | ||
} | ||
}, | ||
} | ||
</script> |
75 changes: 75 additions & 0 deletions
75
src/components/statistics/progress-bars/Widgets/StandardBars.vue
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<template> | ||
<vuestic-widget headerText="Progress Bars"> | ||
<div class="row"> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.basic' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar ref="hBasic"> | ||
</vuestic-progress-bar> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.thin' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar size="thin" ref="hThin"> | ||
</vuestic-progress-bar> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.thick' | translate}} | ||
<div class="pb-container"> | ||
<vuestic-progress-bar size="thick" ref="hThick"> | ||
</vuestic-progress-bar> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.basicVertical' | translate}} | ||
<div class="pb-container"> | ||
<div> | ||
<vuestic-progress-bar type="vertical" | ||
ref="vBasic"></vuestic-progress-bar> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.thinVertical' | translate}} | ||
<div> | ||
<vuestic-progress-bar size="thin" type="vertical" ref="vThin"> | ||
</vuestic-progress-bar> | ||
</div> | ||
</div> | ||
<div class="col-sm-4 col-12"> | ||
{{'progressBars.circle' | translate}} | ||
<div> | ||
<vuestic-progress-bar type="circle" | ||
ref="circle"></vuestic-progress-bar> | ||
</div> | ||
</div> | ||
</div> | ||
</vuestic-widget> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'standard-bars', | ||
data () { | ||
return { | ||
valueAnimationInterval: 3000 | ||
} | ||
}, | ||
mounted () { | ||
let delay = 0 | ||
for (let ref in this.$refs) { | ||
this.$refs[ref].$data.valueAnimationInterval = this.valueAnimationInterval | ||
let timeout = setTimeout(() => { | ||
if (!this.$refs[ref]) { | ||
clearTimeout(timeout) | ||
return | ||
} | ||
this.$refs[ref].$data.value = 100 | ||
}, delay) | ||
delay += this.valueAnimationInterval | ||
} | ||
}, | ||
} | ||
</script> |
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
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