flat: 修改字体和添加图标

This commit is contained in:
史典卓
2025-07-09 15:15:37 +08:00
parent 36798d3054
commit 645c2552f6
45 changed files with 518 additions and 164 deletions

View File

@@ -113,10 +113,7 @@
v-for="(item, index) in matchingDegree"
:key="index"
class="progress-item"
:class="{
active: index < currentStep - 1,
half: index < currentStep && currentStep < index + 1, // 半条
}"
:class="getClass(index)"
/>
</view>
</view>
@@ -263,6 +260,21 @@ function jobCollection() {
});
}
}
function getClass(index) {
const current = currentStep.value;
const floorIndex = Math.floor(current);
if (index < floorIndex) {
return 'active';
} else if (index === floorIndex) {
const decimal = current % 1;
const percent = Math.round(decimal * 100);
return `half${percent}`;
} else {
return '';
}
}
</script>
<style lang="stylus" scoped>
@@ -313,17 +325,19 @@ image {
}
/* 当前进度进行中的格子 */
.progress-item.half::before {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 100%; /* 根据 currentStep 小数动态控制 */
// background: linear-gradient(to right, #256bfa, #8c68ff);
background: linear-gradient(to right, #256bfa 50%, #eaeaea 50%);
border-radius: 24rpx;
}
for i in 0..100
.progress-item.half{i}::before
content ''
position absolute
left 0
top 0
bottom 0
width 100%
background linear-gradient(to right, #256bfa (i)%, #eaeaea (i)%)
border-radius 24rpx
.card-footer{
.footer-title{
font-weight: 600;