更新代码和文档

This commit is contained in:
q
2026-01-03 21:11:04 +08:00
parent 93835bd990
commit 047a8eab89
25 changed files with 789 additions and 161 deletions

View File

@@ -61,12 +61,16 @@ export default {
}
},
toggleTheme(isDark) {
if (isDark) {
document.body.classList.add('dark-theme')
document.documentElement.classList.add('dark-theme')
} else {
document.body.classList.remove('dark-theme')
document.documentElement.classList.remove('dark-theme')
const html = document.documentElement;
const body = document.body;
if (html && body && html.classList && body.classList) {
if (isDark) {
body.classList.add('dark-theme')
html.classList.add('dark-theme')
} else {
body.classList.remove('dark-theme')
html.classList.remove('dark-theme')
}
}
}
},