mirror of
https://github.com/qaiu/netdisk-fast-download.git
synced 2026-02-24 22:25:22 +00:00
更新代码和文档
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user