Skip to content

Commit

Permalink
fix(projects): fix multi tab page only render once
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Jun 6, 2024
1 parent f298388 commit b98b075
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/layouts/modules/global-content/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { computed } from 'vue';
import { useAppStore } from '@/store/modules/app';
import { useThemeStore } from '@/store/modules/theme';
import { useRouteStore } from '@/store/modules/route';
import { useTabStore } from '@/store/modules/tab';
defineOptions({
name: 'GlobalContent'
Expand All @@ -20,6 +21,7 @@ withDefaults(defineProps<Props>(), {
const appStore = useAppStore();
const themeStore = useThemeStore();
const routeStore = useRouteStore();
const tabStore = useTabStore();
const transitionName = computed(() => (themeStore.page.animate ? themeStore.page.animateMode : ''));
</script>
Expand All @@ -36,7 +38,7 @@ const transitionName = computed(() => (themeStore.page.animate ? themeStore.page
<component
:is="Component"
v-if="appStore.reloadFlag"
:key="route.path"
:key="tabStore.getTabIdByRoute(route)"
:class="{ 'p-16px': showPadding }"
class="flex-grow bg-layout transition-300"
/>
Expand Down

0 comments on commit b98b075

Please sign in to comment.