screen/src/components/percent.vue
对比新文件 @@ -0,0 +1,28 @@ <template> <div class="plan_wrap"> <div class="plan" :style="{ background: 'linear-gradient(to right, #1e3c48 0%, #6feef1 100%)', width: `${rate}%` }"></div> </div> </template> <script setup> const props = defineProps({ rate: Number, color: String }) </script> <style lang="scss" scoped> .plan_wrap{ width: 100%; background-color: #172630; padding: 4px; height: 18px; overflow: hidden; .plan{ height: 10px; } } </style>