Skip to content

Commit 7e9a46b

Browse files
author
liuchenchen
committed
fix: 修复路由跳转的页面出现空白
1 parent 6a85b3a commit 7e9a46b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

apps/web-antd/src/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const tokenTheme = computed(() => {
3333
<template>
3434
<ConfigProvider :locale="antdLocale" :theme="tokenTheme">
3535
<App>
36-
<RouterView />
36+
<RouterView :key="$route.fullPath" />
3737
</App>
3838
</ConfigProvider>
3939
</template>

apps/web-ele/src/app.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ useElementPlusDesignTokens();
1212

1313
<template>
1414
<ElConfigProvider :locale="elementLocale">
15-
<RouterView />
15+
<!-- <RouterView /> -->
16+
<RouterView :key="$route.fullPath" />
1617
</ElConfigProvider>
1718
</template>

apps/web-naive/src/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const themeOverrides = computed((): GlobalThemeOverrides => {
4949
>
5050
<NNotificationProvider>
5151
<NMessageProvider>
52-
<RouterView />
52+
<RouterView :key="$route.fullPath" />
5353
</NMessageProvider>
5454
</NNotificationProvider>
5555
</NConfigProvider>

0 commit comments

Comments
 (0)