From 752b8ee8cadf762fba40d7cee932aedbc498e82c Mon Sep 17 00:00:00 2001 From: xiangshu233 Date: Sun, 17 Mar 2024 20:06:22 +0800 Subject: [PATCH] chore: :rewind: add example --- src/router/modules.ts | 4 ++-- src/views/example/index.vue | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) 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' }, +]