diff --git a/src/router/modules.ts b/src/router/modules.ts index aea0fed..45f2284 100644 --- a/src/router/modules.ts +++ b/src/router/modules.ts @@ -99,9 +99,9 @@ const routeModuleList: Array = [ path: '/editNickname', name: 'EditNickname', meta: { - title: '修改昵称', + title: '修改昵称(该页面已缓存)', innerPage: true, - keepAlive: false, + keepAlive: true, }, component: () => import('@/views/my/EditNickname.vue'), }, diff --git a/src/views/example/index.vue b/src/views/example/index.vue index 5e905a7..562dce8 100644 --- a/src/views/example/index.vue +++ b/src/views/example/index.vue @@ -9,6 +9,9 @@ + @@ -32,6 +35,11 @@ function toggle() { toggleDark() designStore.setDarkMode(isDark.value ? 'dark' : 'light') } + +const menuItems = [ + { title: '🐗 keep-alive', route: '/editNickname' }, + { title: '🦘 404 页演示', route: '/404' }, +]