chore: add example

This commit is contained in:
xiangshu233 2024-03-17 20:06:22 +08:00
parent 18c7ec1a32
commit 752b8ee8ca
2 changed files with 10 additions and 2 deletions

View File

@ -99,9 +99,9 @@ const routeModuleList: Array<RouteRecordRaw> = [
path: '/editNickname',
name: 'EditNickname',
meta: {
title: '修改昵称',
title: '修改昵称(该页面已缓存)',
innerPage: true,
keepAlive: false,
keepAlive: true,
},
component: () => import('@/views/my/EditNickname.vue'),
},

View File

@ -9,6 +9,9 @@
<van-switch v-model="checked" size="22" @click="toggle()" />
</template>
</van-cell>
<template v-for="item in menuItems" :key="item.route">
<van-cell :title="item.title" :to="item.route" is-link />
</template>
</van-cell-group>
</div>
</template>
@ -32,6 +35,11 @@ function toggle() {
toggleDark()
designStore.setDarkMode(isDark.value ? 'dark' : 'light')
}
const menuItems = [
{ title: '🐗 keep-alive', route: '/editNickname' },
{ title: '🦘 404 页演示', route: '/404' },
]
</script>
<style scoped lang="less">