fix: 🐛 主题首次切换无效问题修复
Former-commit-id: 1a5028c4e94d8ed28ca567ac2767fdbc8a8516f1
This commit is contained in:
@@ -45,7 +45,9 @@ export const useSettingsStore = defineStore("setting", () => {
|
||||
break;
|
||||
case "theme":
|
||||
theme.value = value;
|
||||
if (theme.value !== "dark") {
|
||||
if (theme.value === "dark") {
|
||||
document.documentElement.classList.add("dark");
|
||||
} else {
|
||||
document.documentElement.classList.remove("dark");
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user