20260726225220
This commit is contained in:
1 parent
e3c7c6f8da
commit
a8478d60ed
170 files changed
+6786
-1678
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<script setup>
|
||||
import { computed, defineAsyncComponent } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { Minimize2 } from "@lucide/vue";
|
||||
import { useAppStore } from "@/stores/app";
|
||||
@@ -8,6 +9,12 @@ import AppToolbar from "./components/AppToolbar.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const appStore = useAppStore();
|
||||
const FpsMonitor = import.meta.env.DEV
|
||||
? defineAsyncComponent(() => import("@/components/FpsMonitor.vue"))
|
||||
: null;
|
||||
const routeInstanceKey = computed(
|
||||
() => `${route.fullPath}:${appStore.getRouteRefreshKey(route.fullPath)}`,
|
||||
);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -21,8 +28,8 @@ const appStore = useAppStore();
|
||||
<a-layout-content class="app-content">
|
||||
<router-view v-slot="{ Component }">
|
||||
<transition name="slide" mode="out-in">
|
||||
<keep-alive>
|
||||
<component :is="Component" :key="route.fullPath + ':' + appStore.routeRefreshKey" />
|
||||
<keep-alive :max="8">
|
||||
<component :is="Component" :key="routeInstanceKey" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
</router-view>
|
||||
@@ -39,6 +46,11 @@ const appStore = useAppStore();
|
||||
<Minimize2 />
|
||||
<span>退出最大化</span>
|
||||
</button>
|
||||
|
||||
<FpsMonitor
|
||||
v-if="FpsMonitor"
|
||||
style="position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 1000"
|
||||
/>
|
||||
</a-layout>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -16,7 +16,8 @@ const menuItems = computed(() => {
|
||||
const systemPages = [
|
||||
{ key: "/system/module-management", label: "模块管理", moduleCode: "m_metadata" },
|
||||
{ key: "/system/i18n-type", label: "多语言类型", moduleCode: "m_i18n_type" },
|
||||
].filter((item) => permissionStore.canModule(item.moduleCode));
|
||||
{ key: "/system/login-log", label: "登录日志" },
|
||||
].filter((item) => !item.moduleCode || permissionStore.canModule(item.moduleCode));
|
||||
const items = [{ key: "/dashboard", icon: menuIcon(House), label: "工作台" }];
|
||||
if (systemPages.length)
|
||||
items.push({
|
||||
|
||||
@@ -155,7 +155,7 @@ function goBack() {
|
||||
}
|
||||
|
||||
function refreshCurrentRoute() {
|
||||
appStore.refreshRoute();
|
||||
appStore.refreshRoute(route.fullPath);
|
||||
}
|
||||
|
||||
function toggleMaximize() {
|
||||
|
||||
Reference in new issue
Block a user