diff --git a/src/App.vue b/src/App.vue index a244fa9..205c8e4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,12 @@ @@ -12,9 +14,14 @@ import { computed } from 'vue'; import { useDesignSettingStore } from '@/store/modules/designSetting'; import { darken, lighten } from '@/utils/index'; + import { useRouteStore } from '@/store/modules/route'; + const routeStore = useRouteStore(); const designStore = useDesignSettingStore(); + // 需要缓存的路由组件 + const keepAliveComponents = computed(() => routeStore.keepAliveComponents); + const getDarkMode = computed(() => designStore.getDarkMode); const getThemeVars = computed(() => { diff --git a/src/layout/DefaultLayout.vue b/src/layout/DefaultLayout.vue deleted file mode 100644 index fb62d1f..0000000 --- a/src/layout/DefaultLayout.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/src/layout/components/Header.vue b/src/layout/components/Header.vue deleted file mode 100644 index 1c1b583..0000000 --- a/src/layout/components/Header.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - diff --git a/src/layout/components/Main.vue b/src/layout/components/Main.vue deleted file mode 100644 index 92336f2..0000000 --- a/src/layout/components/Main.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/src/layout/components/Menu.vue b/src/layout/components/Menu.vue deleted file mode 100644 index 536be0f..0000000 --- a/src/layout/components/Menu.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - - - diff --git a/src/layout/index.vue b/src/layout/index.vue index de3c5c8..fe59085 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -3,6 +3,14 @@