fix: comment dark

This commit is contained in:
pengzhanbo 2023-06-30 01:15:14 +08:00
parent ae4496d591
commit 7f1fb3906a

View File

@ -23,5 +23,11 @@ export const useDarkMode = (): DarkModeRef => {
*/
export const setupDarkMode = (): void => {
const isDark = ref<boolean>(false)
if (
typeof document !== 'undefined' &&
document.documentElement.classList.contains('dark')
) {
isDark.value = true
}
provide(darkModeSymbol, isDark)
}