DarkMode 模块重命名

This commit is contained in:
tangly1024
2022-03-03 15:08:19 +08:00
parent ba45f11d55
commit 7a46c08131
6 changed files with 33 additions and 34 deletions

View File

@@ -27,7 +27,7 @@ export default function Header () {
)
}
})
const { theme } = useGlobal()
const { isDarkMode } = useGlobal()
const autoScrollEnd = () => {
if (autoScroll) {
@@ -61,7 +61,7 @@ export default function Header () {
}
const updateTopNav = () => {
if (theme !== 'dark') {
if (!isDarkMode) {
const stickyNavElement = document.getElementById('sticky-nav')
if (window.scrollY < window.innerHeight) {
stickyNavElement.classList.add('dark')