mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-02-19 22:30:49 +08:00
- 新增 useWrappedTheme:主题状态全局共享、localStorage 持久化,支持 F1-F4 快捷键与循环切换 - 新增主题切换器组件(Modern/Game Boy/DOS/VHS)与主题化年份选择器 - 年度总结页接入 themeClass/currentBg;CRT 叠加层支持 VHS 效果(REC/时间戳/跟踪线) - 补充主题全局样式与卡片/控制面板主题适配
19 lines
523 B
Vue
19 lines
523 B
Vue
<template>
|
|
<component :is="themeSwitcherComponent" />
|
|
</template>
|
|
|
|
<script setup>
|
|
const { theme } = useWrappedTheme()
|
|
|
|
// 根据当前主题动态选择对应的切换器组件
|
|
const themeSwitcherComponent = computed(() => {
|
|
const map = {
|
|
off: resolveComponent('WrappedThemeSwitcherModern'),
|
|
gameboy: resolveComponent('WrappedThemeSwitcherGameboy'),
|
|
dos: resolveComponent('WrappedThemeSwitcherDos'),
|
|
vhs: resolveComponent('WrappedThemeSwitcherVhs')
|
|
}
|
|
return map[theme.value] || map.off
|
|
})
|
|
</script>
|