Files
WeChatDataAnalysis/frontend/components/wrapped/shared/WrappedThemeSwitcher.vue
2977094657 b6295071b8 feat(wrapped-ui): 引入多主题系统与切换器(Modern/Game Boy/DOS/VHS)
- 新增 useWrappedTheme:主题状态全局共享、localStorage 持久化,支持 F1-F4 快捷键与循环切换

- 新增主题切换器组件(Modern/Game Boy/DOS/VHS)与主题化年份选择器

- 年度总结页接入 themeClass/currentBg;CRT 叠加层支持 VHS 效果(REC/时间戳/跟踪线)

- 补充主题全局样式与卡片/控制面板主题适配
2026-01-31 19:59:41 +08:00

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>