upper PageTransition

This commit is contained in:
Timi
2026-09-22 16:17:01 +08:00
parent 8681af531d
commit 18ec0c4dc2
4 changed files with 16 additions and 229 deletions
+16 -2
View File
@@ -2,7 +2,12 @@
<div class="main-layout">
<app-nav-bar @height-change="onChangeNavBarHeight" />
<div class="router-view">
<page-transition />
<page-transition
:keep-alive="shouldKeepAlive"
:page-background="globalUIStore.bodyBackground"
page-class="page"
:respect-reduced-motion="false"
/>
</div>
<t-tab-bar
v-model="tabVal"
@@ -33,16 +38,25 @@
<script setup lang="ts">
import AppNavBar from "@/components/navbar/index.vue";
import PageTransition from "@/components/PageTransition.vue";
import { useGlobalUIStore } from "@/store/globalUI";
import { useTabBarStore } from "@/store/tabBarStore";
import { permissionCodes } from "@/utils/permission";
import { PageTransition } from "timi-tdesign-mobile";
import { useUserStore } from "timi-web-api/store";
import type { RouteLocationNormalizedLoaded } from "vue-router";
const route = useRoute();
const router = useRouter();
const globalUIStore = useGlobalUIStore();
const tabBarStore = useTabBarStore();
const userStore = useUserStore();
const cachedRouteNames = new Set(["SalesOrderList", "ProductList", "ProductStockList"]);
function shouldKeepAlive(sourceRoute: RouteLocationNormalizedLoaded): boolean {
return cachedRouteNames.has(String(sourceRoute.name));
}
// ---------- 导航边距 ----------
const navBarHeight = ref("0px");