From c5363efc0e14539b36b939111eb9519707fe2c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=AF=9A?= Date: Thu, 8 Jan 2026 20:56:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=BB=E9=99=A4=E9=A2=84=E7=AE=97?= =?UTF-8?q?=E6=91=98=E8=A6=81=E4=B8=AD=E7=9A=84=E9=A2=84=E7=AE=97=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Web/src/components/Budget/BudgetCard.vue | 8 +++++++- Web/src/components/Budget/BudgetEditPopup.vue | 6 +++++- Web/src/components/Budget/BudgetSummary.vue | 1 - 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Web/src/components/Budget/BudgetCard.vue b/Web/src/components/Budget/BudgetCard.vue index 28faa58..e563bd3 100644 --- a/Web/src/components/Budget/BudgetCard.vue +++ b/Web/src/components/Budget/BudgetCard.vue @@ -12,7 +12,7 @@ plain class="status-tag" > - {{ budget.type === BudgetPeriodType.Year ? '年度预算' : '月度预算' }} + {{ budget.type === BudgetPeriodType.Year ? '年度' : '月度' }} @@ -92,6 +92,7 @@ plain size="small" style="width: 50px;" + :disabled="isNextDisabled" @click="handleSwitch(1)" /> @@ -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) diff --git a/Web/src/components/Budget/BudgetEditPopup.vue b/Web/src/components/Budget/BudgetEditPopup.vue index 11b6b12..e76ed0f 100644 --- a/Web/src/components/Budget/BudgetEditPopup.vue +++ b/Web/src/components/Budget/BudgetEditPopup.vue @@ -16,7 +16,11 @@ />