用惯了组件 到自己去实现一些东西 会手忙脚乱 我也是看了其他博主的文章参考实现的
![](https://img-blog.csdnimg.cn/img_convert/5c38c6c7c82e447cbaccc283236a8e52.png)
通过css控制进度当前进度/总进度*100
<view class="progressBox">
<view class="progress-wrap">
<!-- 进度条的百分比 -->
<view class="progress" :style="'width:'+(0/10)*100+'%'"></view>
</view>
<view class="percentage em">0</view>
<view class="percentage">/10</view>
</view>
.progressBox{
display: flex;
}
.progress-wrap {
width: 150rpx;
height: 8rpx;
background: #FEEDEC;
border-radius: 20rpx;
overflow: hidden;
position: relative;
margin-top: 14rpx;
}
.progress {
height: 30rpx;
background-color: #F84B3C;
}
.percentage {
font-size: 22rpx;
color: #000000 ;
}
.percentage.em{
font-size: 22rpx;
color: #F84B3C;
margin-left: 16rpx;
}
样式可自行修改