Vue countdown progress bar problem

what does the vue countdown progress bar do? the remaining time and total time of the countdown are obtained from the backend

.
<div class="progress_bg" >
   <div class="progress" ></div>
</div>
//300125
this.openTime.Seconds = 300
this.openTime.NextSeconds = 125
Aug.17,2021

.progress _ bg width = 100
.progress width equals NextSeconds/Seconds

just update state

< hr >

after knowing this, you can use computed to calculate properties, and it is more elegant to update progress width, automatically


<div class="progress_bg" >
   <div class="progress" :style="{width:openTime.NextSeconds}"></div>
</div>

add style to progress transition: 0.2s; there will be transition animation

Menu