fix auto theme

This commit is contained in:
Louis Lam 2021-08-12 22:17:20 +08:00 committed by GitHub
parent 6a8ccf627a
commit 7ca80fc086
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ export default {
data() {
return {
system: (window.matchMedia("(prefers-color-scheme: dark)")) ? "dark" : "light",
system: (window.matchMedia("(prefers-color-scheme: dark)").matches) ? "dark" : "light",
userTheme: localStorage.theme,
};
},