Merge pull request #11 from yanbowe/main

fix(projects): 修复在暗黑模式下第一次进入网页不会触发暗黑模式监听
This commit is contained in:
Soybean 2021-11-10 20:01:45 +08:00 committed by GitHub
commit 6a543422ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,9 +51,15 @@ const primaryWithAlpha = computed(() => {
}); });
// //
watch(osDark, newValue => { watch(
handleDarkMode(newValue); osDark,
}); newValue => {
handleDarkMode(newValue);
},
{
immediate: true
}
);
</script> </script>
<style> <style>
/* 全局与主题颜色相关 */ /* 全局与主题颜色相关 */