I have some progress bar the width of which are getting from data from the array. The color of this bar depends on the same data. There are 3 colors if progress is 0 the color is grey, more than 0 its blue, and if it 100 its should be green.
<div class="card-item" v-for="item in status" :key="item.id"> // loop
<div class="progress-item">
<span>{{item.progress}}%</span> // data from arr
<div class="progress-bar">
<div class="progress-bar-inner" :style="{width: item.progress}"></div> // width in style should in %
</div>
</div>
</div>
Maybe i should to write the function?