feat: 移除预算摘要中的预算数量显示
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 17s
Docker Build & Deploy / Deploy to Production (push) Successful in 7s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 1s

This commit is contained in:
孙诚
2026-01-08 20:56:02 +08:00
parent b05248fc7b
commit c5363efc0e
3 changed files with 12 additions and 3 deletions

View File

@@ -12,7 +12,7 @@
plain
class="status-tag"
>
{{ budget.type === BudgetPeriodType.Year ? '年度预算' : '月度预算' }}
{{ budget.type === BudgetPeriodType.Year ? '年度' : '月度' }}
</van-tag>
</slot>
</div>
@@ -92,6 +92,7 @@
plain
size="small"
style="width: 50px;"
:disabled="isNextDisabled"
@click="handleSwitch(1)"
/>
</div>
@@ -130,6 +131,11 @@ const emit = defineEmits(['toggle-stop', 'switch-period', 'click'])
const transitionName = ref('slide-left')
const showDescription = ref(false)
const isNextDisabled = computed(() => {
if (!props.budget.periodEnd) return false
return new Date(props.budget.periodEnd) > new Date()
})
const handleSwitch = (direction) => {
transitionName.value = direction > 0 ? 'slide-left' : 'slide-right'
emit('switch-period', direction)

View File

@@ -16,7 +16,11 @@
/>
<van-field name="type" label="统计周期">
<template #input>
<van-radio-group v-model="form.type" direction="horizontal">
<van-radio-group
v-model="form.type"
direction="horizontal"
:disabled="isEdit"
>
<van-radio :name="BudgetPeriodType.Month"></van-radio>
<van-radio :name="BudgetPeriodType.Year"></van-radio>
</van-radio-group>

View File

@@ -6,7 +6,6 @@
<div class="value" :class="getValueClass(stats[key].rate)">
{{ stats[key].rate }}<span class="unit">%</span>
</div>
<div class="sub-label">{{ stats[key].count }}个预算</div>
</div>
<div v-if="config.showDivider" class="divider"></div>
</template>