upper PageTransition
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user