fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 26s
Docker Build & Deploy / Deploy to Production (push) Successful in 10s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
This commit is contained in:
@@ -180,7 +180,6 @@
|
||||
type="primary"
|
||||
@click.stop="handleSavingsNav(budget, -1)"
|
||||
>
|
||||
{{ budget.type === BudgetPeriodType.Year ? '上一年' : '上一月' }}
|
||||
</van-button>
|
||||
<span class="current-date-label">
|
||||
{{ getSavingsDateLabel(budget) }}
|
||||
@@ -191,9 +190,9 @@
|
||||
plain
|
||||
type="primary"
|
||||
icon-position="right"
|
||||
:disabled="disabledSavingsNextNav(budget)"
|
||||
@click.stop="handleSavingsNav(budget, 1)"
|
||||
>
|
||||
{{ budget.type === BudgetPeriodType.Year ? '下一年' : '下一月' }}
|
||||
</van-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -613,6 +612,17 @@ const handleSavingsNav = async (budget, offset) => {
|
||||
showToast('切换日期失败')
|
||||
}
|
||||
}
|
||||
|
||||
const disabledSavingsNextNav = (budget) => {
|
||||
if (!budget.periodStart) return true
|
||||
const date = new Date(budget.periodStart)
|
||||
const now = new Date()
|
||||
if (budget.type === BudgetPeriodType.Year) {
|
||||
return date.getFullYear() === now.getFullYear()
|
||||
} else {
|
||||
return date.getFullYear() === now.getFullYear() && date.getMonth() === now.getMonth()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -622,7 +632,7 @@ const handleSavingsNav = async (budget, offset) => {
|
||||
align-items: center;
|
||||
margin-top: 12px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px dashed var(--van-gray-3);
|
||||
border-top: 1px solid var(--van-border-color);
|
||||
}
|
||||
|
||||
.current-date-label {
|
||||
|
||||
Reference in New Issue
Block a user