<template>
<view class="progressContainer" :style="{ background: cbackground }">
<view
class="progress"
:style="{ background: tbackground, width: value + '%' }"
>
<view
class="progress-view"
:style="{
background: sbackground,
width: width,
height: '100%',
position: 'absolute',
right: 0,
}"
></view>
</view>
</view>
</template>
<script>
export default {
name: "details",
data() {
return {
// progress: 80,
};
},
props: {
value: {
type: Number,
},
cbackground: {
type: String,
default: "#f00",
},
sbackground: {
type: String,
default: "#090",
},
tbackground: {
type: String,
default: "#6BCB39",
},
width: {
type: String,
default: "20rpx",
},
},
methods: {},
};
</script>
<style scoped>
.progressContainer {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.progress {
position: absolute;
height: 100%;
}
</style>