添加预算管理功能,重构账单和消息视图,优化路由和组件交互
This commit is contained in:
@@ -9,11 +9,17 @@
|
||||
<van-tabbar-item name="statistics" icon="chart-trending-o" to="/" @click="handleTabClick('/statistics')">
|
||||
统计
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item name="balance" icon="balance-list" to="/balance" @click="handleTabClick('/balance')">
|
||||
账单
|
||||
<van-tabbar-item name="budget" icon="bill-o" to="/budget" @click="handleTabClick('/budget')">
|
||||
预算
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item name="message" icon="comment" to="/message" @click="handleTabClick('/message')" :badge="messageStore.unreadCount || null">
|
||||
消息
|
||||
<van-tabbar-item
|
||||
name="balance"
|
||||
icon="balance-list"
|
||||
:to="messageStore.unreadCount > 0 ? '/balance?tab=message' : '/balance'"
|
||||
@click="handleTabClick('/balance')"
|
||||
:badge="messageStore.unreadCount || null"
|
||||
>
|
||||
账单
|
||||
</van-tabbar-item>
|
||||
<van-tabbar-item name="setting" icon="setting" to="/setting">
|
||||
设置
|
||||
@@ -69,7 +75,8 @@ const showTabbar = computed(() => {
|
||||
route.path === '/calendar' ||
|
||||
route.path === '/message' ||
|
||||
route.path === '/setting' ||
|
||||
route.path === '/balance'
|
||||
route.path === '/balance' ||
|
||||
route.path === '/budget'
|
||||
})
|
||||
|
||||
const active = ref('')
|
||||
@@ -105,11 +112,12 @@ const setActive = (path) => {
|
||||
case '/calendar':
|
||||
return 'ccalendar'
|
||||
case '/balance':
|
||||
return 'balance'
|
||||
case '/message':
|
||||
return 'message'
|
||||
return 'balance'
|
||||
case '/setting':
|
||||
return 'setting'
|
||||
case '/budget':
|
||||
return 'budget'
|
||||
default:
|
||||
return 'statistics'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user