2025-11-28 11:37:33 +08:00
|
|
|
|
<script setup>
|
2025-11-25 17:12:09 +08:00
|
|
|
|
import { onMounted } from 'vue'
|
2025-11-24 17:23:46 +08:00
|
|
|
|
import { RouterView } from 'vue-router'
|
|
|
|
|
|
import BottomDock from './components/BottomDock.vue'
|
2025-12-02 16:22:46 +08:00
|
|
|
|
import AddEntryView from './views/AddEntryView.vue'
|
2025-11-25 17:12:09 +08:00
|
|
|
|
import { useTransactionStore } from './stores/transactions'
|
2025-12-02 16:22:46 +08:00
|
|
|
|
import { useUiStore } from './stores/ui'
|
2025-11-25 17:12:09 +08:00
|
|
|
|
|
|
|
|
|
|
const transactionStore = useTransactionStore()
|
2025-12-02 16:22:46 +08:00
|
|
|
|
const uiStore = useUiStore()
|
2025-11-25 17:12:09 +08:00
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
transactionStore.ensureInitialized()
|
|
|
|
|
|
})
|
2025-11-24 17:23:46 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-11-28 11:37:33 +08:00
|
|
|
|
<!-- 整体应用容器:居中展示移动端画布,配合沉浸式状态栏使用安全区域内边距 -->
|
2025-11-24 17:23:46 +08:00
|
|
|
|
<div class="min-h-screen bg-warmOffwhite text-stone-800 flex items-center justify-center">
|
|
|
|
|
|
<div
|
|
|
|
|
|
class="h-screen max-h-[844px] max-w-md w-full mx-auto bg-warmOffwhite shadow-2xl relative overflow-hidden flex flex-col"
|
2025-11-28 11:37:33 +08:00
|
|
|
|
style="padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom);"
|
2025-11-24 17:23:46 +08:00
|
|
|
|
>
|
|
|
|
|
|
<!-- 主内容区域:由 vue-router 控制具体页面 -->
|
|
|
|
|
|
<main class="flex-1 overflow-y-auto hide-scrollbar px-5 pt-2 pb-28 relative">
|
|
|
|
|
|
<RouterView />
|
|
|
|
|
|
</main>
|
|
|
|
|
|
|
2025-11-28 11:37:33 +08:00
|
|
|
|
<!-- 底部 Dock 导航 -->
|
2025-11-24 17:23:46 +08:00
|
|
|
|
<BottomDock />
|
2025-12-02 16:22:46 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 新增记录底部弹窗:在任意 Tab 上浮层显示 -->
|
|
|
|
|
|
<AddEntryView v-if="uiStore.addEntryVisible" />
|
2025-11-24 17:23:46 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|