circle-progress组件调整和未来规划页面应用
This commit is contained in:
parent
155b2bb399
commit
33352da106
|
|
@ -53,7 +53,7 @@ export default {
|
||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "进度",
|
default: "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -121,7 +121,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.percent {
|
.percent {
|
||||||
font-size: 36rpx;
|
font-size: 28rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333;
|
color: #333;
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,14 @@
|
||||||
<view class="donorContainer">
|
<view class="donorContainer">
|
||||||
<text>项目筹款情况</text>
|
<text>项目筹款情况</text>
|
||||||
<view class="donorData">
|
<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-info">
|
||||||
<view class="data-row">
|
<view class="data-row">
|
||||||
|
|
@ -39,10 +46,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<u-circle-progress :percent="getProgressPercentage">
|
|
||||||
<text class="u-progress-info">查找中</text>
|
|
||||||
</u-circle-progress>
|
|
||||||
|
|
||||||
<view class="record" @click="goDonationRecord"
|
<view class="record" @click="goDonationRecord"
|
||||||
>查看捐款记录
|
>查看捐款记录
|
||||||
<u-icon name="arrow-right"></u-icon>
|
<u-icon name="arrow-right"></u-icon>
|
||||||
|
|
@ -250,7 +253,7 @@ export default {
|
||||||
}
|
}
|
||||||
const percentage =
|
const percentage =
|
||||||
(this.projectDetails.amountSum / this.projectDetails.totalAmount) * 100;
|
(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;
|
margin-top: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
//.CircleProgress {
|
.CircleProgress {
|
||||||
// flex: 1;
|
flex: 1;
|
||||||
//}
|
}
|
||||||
|
|
||||||
.data-info {
|
.data-info {
|
||||||
flex: 9;
|
flex: 3;
|
||||||
|
|
||||||
.data-row {
|
.data-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user