Skip to content

Commit

Permalink
fix(projects): 修复页面切换动画无变化
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Feb 25, 2022
1 parent 5b401a7 commit c4546bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/layouts/common/GlobalContent/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
class="h-full bg-[#f6f9f8] dark:bg-[#101014] transition duration-300 ease-in-out"
>
<router-view v-slot="{ Component, route }">
<transition name="fade-slide" mode="out-in" appear>
<transition :name="theme.page.animateMode" mode="out-in" appear>
<keep-alive :include="routeStore.cacheRoutes">
<component :is="Component" v-if="app.reloadFlag" :key="route.path" />
</keep-alive>
Expand All @@ -14,7 +14,7 @@
</template>

<script setup lang="ts">
import { useAppStore, useRouteStore } from '@/store';
import { useAppStore, useThemeStore, useRouteStore } from '@/store';
interface Props {
/** 显示padding */
Expand All @@ -26,6 +26,7 @@ withDefaults(defineProps<Props>(), {
});
const app = useAppStore();
const theme = useThemeStore();
const routeStore = useRouteStore();
</script>
<style scoped></style>

0 comments on commit c4546bd

Please sign in to comment.