feat:重构主题存储逻辑,优化加载背景和颜色设置

This commit is contained in:
jxxghp
2025-02-06 16:00:32 +08:00
parent 2511acfea1
commit 92a0a9fe2f
6 changed files with 24 additions and 17 deletions
+6
View File
@@ -0,0 +1,6 @@
export function saveLocalTheme(name: string, theme: any) {
// 存储主题到本地
localStorage.setItem('theme', name)
localStorage.setItem('materio-initial-loader-bg', theme.current.value.colors.background)
localStorage.setItem('materio-initial-loader-color', theme.current.value.colors.primary)
}