mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 07:43:42 +08:00 
			
		
		
		
	Merge pull request #11 from yanbowe/main
fix(projects): 修复在暗黑模式下第一次进入网页不会触发暗黑模式监听
This commit is contained in:
		@@ -51,9 +51,15 @@ const primaryWithAlpha = computed(() => {
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
// 操作系统的暗黑模式
 | 
			
		||||
watch(osDark, newValue => {
 | 
			
		||||
  handleDarkMode(newValue);
 | 
			
		||||
});
 | 
			
		||||
watch(
 | 
			
		||||
  osDark,
 | 
			
		||||
  newValue => {
 | 
			
		||||
    handleDarkMode(newValue);
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    immediate: true
 | 
			
		||||
  }
 | 
			
		||||
);
 | 
			
		||||
</script>
 | 
			
		||||
<style>
 | 
			
		||||
/* 全局与主题颜色相关 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user