Files
hejiu/common/theme-mixin.js
T
cg 06ec10cf10 ```
refactor(theme): 统一应用深色主题替换日夜切换功能

- 移除白天主题相关样式定义和切换逻辑
- 将主题系统固定为深色主题(琥珀夜光)
- 更新页面背景色设置为统一深色
- 简化导航栏和标签栏主题应用逻辑
- 移除白天主题的颜色变量和样式类
- 更新主题混入文件以支持单一深色主题
```
2026-08-16 22:45:10 +08:00

29 lines
573 B
JavaScript

/* 碰盏日记 - 主题混入 (Theme Mixin)
* 全局统一深色主题(琥珀夜光),已移除白天主题
* 页面根视图需绑定 :class="themeClass"
*/
import { applyTheme } from './utils'
export default {
data() {
return {
themeClass: 'theme-dark',
currentTheme: 'dark'
}
},
created() {
this._refreshTheme()
},
onShow() {
this._refreshTheme()
},
methods: {
_refreshTheme() {
// 固定深色主题
this.currentTheme = 'dark'
this.themeClass = 'theme-dark'
applyTheme('dark')
}
}
}