73 lines
1.4 KiB
Vue
73 lines
1.4 KiB
Vue
<template>
|
|
<view class="donation-summary">
|
|
<view class="summary-item">
|
|
<text class="summary-label">总造价(元)</text>
|
|
<text class="summary-value">{{ totalAmount.toLocaleString() }}</text>
|
|
</view>
|
|
<view class="summary-item">
|
|
<text class="summary-label">参与捐款人次</text>
|
|
<text class="summary-value">{{ participantCount.toLocaleString() }}</text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: 'DonationSummary',
|
|
props: {
|
|
totalAmount: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
participantCount: {
|
|
type: Number,
|
|
default: 0,
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.donation-summary {
|
|
width: 100%;
|
|
padding: 40rpx 24rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
position: relative;
|
|
}
|
|
|
|
.summary-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
flex: 1;
|
|
position: relative;
|
|
}
|
|
|
|
.summary-item:first-child::after {
|
|
content: '';
|
|
position: absolute;
|
|
right: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
width: 1rpx;
|
|
height: 100%;
|
|
background: #ffffff;
|
|
}
|
|
|
|
.summary-label {
|
|
font-size: 28rpx;
|
|
color: #c7a26d;
|
|
margin-bottom: 20rpx;
|
|
text-align: center;
|
|
}
|
|
|
|
.summary-value {
|
|
font-size: 48rpx;
|
|
font-weight: bold;
|
|
color: #c7a26d;
|
|
text-align: center;
|
|
}
|
|
</style>
|