普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
734 B

<template>
<view class="progress__view">
<view class="bar" :style="{ width: `${progress * 100 / total}%` }"></view>
</view>
</template>
<script>
export default {
props: {
progress: {
type: Number,
default: 0
},
total: {
type: Number,
default: 0
},
},
}
</script>
<style scoped lang="scss">
.progress__view {
font-size: 0;
width: 100%;
height: 28rpx;
background: #E1E0E6;
border-radius: 14rpx;
.bar {
display: inline-block;
height: 100%;
background-image: linear-gradient(to right, #7451DE, #B1A4FF);
border-top-left-radius: 14rpx;
border-bottom-left-radius: 14rpx;
box-shadow: 2rpx 2rpx 6rpx 0 #4000FF40;
}
}
</style>