circle-progress组件调整和未来规划页面应用

This commit is contained in:
WindowBird 2025-08-30 18:03:45 +08:00
parent 155b2bb399
commit 33352da106
2 changed files with 15 additions and 12 deletions

View File

@ -53,7 +53,7 @@ export default {
},
content: {
type: String,
default: "进度",
default: "",
},
},
mounted() {
@ -121,7 +121,7 @@ export default {
}
.percent {
font-size: 36rpx;
font-size: 28rpx;
font-weight: bold;
color: #333;
display: block;

View File

@ -21,7 +21,14 @@
<view class="donorContainer">
<text>项目筹款情况</text>
<view class="donorData">
<view class="CircleProgress"></view>
<view class="CircleProgress">
<circle-progress
:canvas-size="65"
:progress="getProgressPercentage"
progress-color="#A24242"
strokeWidth="5"
></circle-progress>
</view>
<view class="data-info">
<view class="data-row">
@ -39,10 +46,6 @@
</view>
</view>
<u-circle-progress :percent="getProgressPercentage">
<text class="u-progress-info">查找中</text>
</u-circle-progress>
<view class="record" @click="goDonationRecord"
>查看捐款记录
<u-icon name="arrow-right"></u-icon>
@ -250,7 +253,7 @@ export default {
}
const percentage =
(this.projectDetails.amountSum / this.projectDetails.totalAmount) * 100;
return Math.min(Math.round(percentage), 100); // 100%
return Math.min(parseFloat(percentage.toFixed(2)), 100); // 100%
},
},
};
@ -387,12 +390,12 @@ export default {
margin-top: 30rpx;
display: flex;
//.CircleProgress {
// flex: 1;
//}
.CircleProgress {
flex: 1;
}
.data-info {
flex: 9;
flex: 3;
.data-row {
display: flex;