From 0fed10b60d05c8228aa159f483e674d111130bb3 Mon Sep 17 00:00:00 2001 From: SunCheng Date: Wed, 11 Feb 2026 17:05:18 +0800 Subject: [PATCH] 1 --- Web/src/App.vue | 15 +++++++++++++++ Web/src/views/BalanceView.vue | 14 -------------- Web/src/views/BudgetView.vue | 13 ------------- Web/src/views/CalendarView.vue | 14 -------------- Web/src/views/SettingView.vue | 14 -------------- Web/src/views/calendarV2/Index.vue | 13 ------------- Web/src/views/statisticsV1/Index.vue | 14 -------------- Web/src/views/statisticsV2/Index.vue | 13 ------------- 8 files changed, 15 insertions(+), 95 deletions(-) diff --git a/Web/src/App.vue b/Web/src/App.vue index 14decad..297079c 100644 --- a/Web/src/App.vue +++ b/Web/src/App.vue @@ -16,6 +16,10 @@ /> + + + + { return route.path === '/' || route.path === '/balance' || route.path === '/message' || route.path === '/calendar' || route.path === '/calendar-v2' }) +// 需要显示底部导航栏的路由 +const showNav = computed(() => { + return [ + '/', '/statistics-v2', + '/calendar', '/calendar-v2', + '/balance', '/message', + '/budget', '/setting' + ].includes(route.path) +}) + onUnmounted(() => { if (mediaQuery) { mediaQuery.removeEventListener('change', updateTheme) diff --git a/Web/src/views/BalanceView.vue b/Web/src/views/BalanceView.vue index 9572e7e..3d0bfb4 100644 --- a/Web/src/views/BalanceView.vue +++ b/Web/src/views/BalanceView.vue @@ -55,12 +55,6 @@ ref="messageViewRef" :is-component="true" /> - - - @@ -70,17 +64,9 @@ import { useRoute } from 'vue-router' import TransactionsRecord from './TransactionsRecord.vue' import EmailRecord from './EmailRecord.vue' import MessageView from './MessageView.vue' -import GlassBottomNav from '@/components/GlassBottomNav.vue' const route = useRoute() -// 底部导航栏 -const activeNavTab = ref('balance') -const handleNavTabClick = (item, index) => { - console.log('Tab clicked:', item.name, index) - // 导航逻辑已在组件内部处理 -} - const tabActive = ref(route.query.tab || 'balance') // 监听路由参数变化,用于从 tabbar 点击时切换 tab diff --git a/Web/src/views/BudgetView.vue b/Web/src/views/BudgetView.vue index e10a8b1..2bef2d8 100644 --- a/Web/src/views/BudgetView.vue +++ b/Web/src/views/BudgetView.vue @@ -497,12 +497,6 @@ @cancel="showDatePicker = false" /> - - - @@ -524,15 +518,8 @@ import BudgetEditPopup from '@/components/Budget/BudgetEditPopup.vue' import SavingsConfigPopup from '@/components/Budget/SavingsConfigPopup.vue' import BudgetChartAnalysis from '@/components/Budget/BudgetChartAnalysis.vue' import PopupContainer from '@/components/PopupContainer.vue' -import GlassBottomNav from '@/components/GlassBottomNav.vue' // 底部导航栏 -const navActiveTab = ref('budget') -const handleNavTabClick = (item, index) => { - console.log('Tab clicked:', item.name, index) - // 导航逻辑已在组件内部处理 -} - const activeTab = ref(BudgetCategory.Expense) const selectedDate = ref(new Date()) const showDatePicker = ref(false) diff --git a/Web/src/views/CalendarView.vue b/Web/src/views/CalendarView.vue index 5abfd71..21139fc 100644 --- a/Web/src/views/CalendarView.vue +++ b/Web/src/views/CalendarView.vue @@ -44,12 +44,6 @@ :transaction="currentTransaction" @save="onDetailSave" /> - - - @@ -62,14 +56,6 @@ import TransactionList from '@/components/TransactionList.vue' import TransactionDetail from '@/components/TransactionDetail.vue' import SmartClassifyButton from '@/components/SmartClassifyButton.vue' import PopupContainer from '@/components/PopupContainer.vue' -import GlassBottomNav from '@/components/GlassBottomNav.vue' - -// 底部导航栏 -const activeTab = ref('calendar') -const handleTabClick = (item, index) => { - console.log('Tab clicked:', item.name, index) - // 导航逻辑已在组件内部处理 -} const dailyStatistics = ref({}) const listVisible = ref(false) diff --git a/Web/src/views/SettingView.vue b/Web/src/views/SettingView.vue index 351fb9b..01afb08 100644 --- a/Web/src/views/SettingView.vue +++ b/Web/src/views/SettingView.vue @@ -139,12 +139,6 @@
- - - @@ -157,19 +151,11 @@ import { useAuthStore } from '@/stores/auth' import { useVersionStore } from '@/stores/version' import { getVapidPublicKey, subscribe, testNotification } from '@/api/notification' import { updateServiceWorker } from '@/registerServiceWorker' -import GlassBottomNav from '@/components/GlassBottomNav.vue' const router = useRouter() const authStore = useAuthStore() const versionStore = useVersionStore() -// 底部导航栏 -const activeTab = ref('setting') -const handleTabClick = (item, index) => { - console.log('Tab clicked:', item.name, index) - // 导航逻辑已在组件内部处理 -} - const fileInputRef = ref(null) const currentType = ref('') const notificationEnabled = ref(false) diff --git a/Web/src/views/calendarV2/Index.vue b/Web/src/views/calendarV2/Index.vue index 2f31ebf..7e20834 100644 --- a/Web/src/views/calendarV2/Index.vue +++ b/Web/src/views/calendarV2/Index.vue @@ -70,12 +70,6 @@ @cancel="onDatePickerCancel" /> - - - @@ -88,7 +82,6 @@ import CalendarModule from './modules/Calendar.vue' import StatsModule from './modules/Stats.vue' import TransactionListModule from './modules/TransactionList.vue' import TransactionDetailSheet from '@/components/Transaction/TransactionDetailSheet.vue' -import GlassBottomNav from '@/components/GlassBottomNav.vue' import { getTransactionDetail } from '@/api/transactionRecord' // 定义组件名称(keep-alive 需要通过 name 识别) @@ -99,12 +92,6 @@ defineOptions({ // 路由 const router = useRouter() -// 底部导航栏 -const activeTab = ref('calendar') -const handleTabClick = () => { - // 导航逻辑已在组件内部处理 -} - // 下拉刷新状态 const refreshing = ref(false) diff --git a/Web/src/views/statisticsV1/Index.vue b/Web/src/views/statisticsV1/Index.vue index 0efe513..7278aab 100644 --- a/Web/src/views/statisticsV1/Index.vue +++ b/Web/src/views/statisticsV1/Index.vue @@ -318,12 +318,6 @@ :transaction="currentTransaction" @save="onBillSave" /> - - - @@ -339,18 +333,10 @@ import TransactionList from '@/components/TransactionList.vue' import TransactionDetail from '@/components/TransactionDetail.vue' import SmartClassifyButton from '@/components/SmartClassifyButton.vue' import PopupContainer from '@/components/PopupContainer.vue' -import GlassBottomNav from '@/components/GlassBottomNav.vue' import { getCssVar } from '@/utils/theme' const router = useRouter() -// 底部导航栏 -const activeTab = ref('statistics') -const handleTabClick = (item, index) => { - console.log('Tab clicked:', item.name, index) - // 导航逻辑已在组件内部处理 -} - // 响应式数据 const loading = ref(true) const firstLoading = ref(true) diff --git a/Web/src/views/statisticsV2/Index.vue b/Web/src/views/statisticsV2/Index.vue index 5bec4e8..2e5f400 100644 --- a/Web/src/views/statisticsV2/Index.vue +++ b/Web/src/views/statisticsV2/Index.vue @@ -108,12 +108,6 @@ /> - - - messageStore.isDarkMode ? 'dark' : 'light') -// 底部导航栏 -const activeTab = ref('statistics') -const handleTabClick = (_item, _index) => { - // 导航逻辑已在组件内部处理 -} - // 状态管理 const loading = ref(false) const refreshing = ref(false)