Ver código fonte

[Style 0000] 修复APP logo样式、注氮泵气泡样式及默认主题回退问题

houzekong 6 dias atrás
pai
commit
8a13f5f9cc

+ 5 - 0
src/components/Application/src/AppLogo.vue

@@ -83,11 +83,16 @@
       color: @white;
     }
 
+    &.vent1 &__title {
+      color: @white;
+    }
+
     &__title {
       font-size: 18px;
       font-weight: 700;
       transition: all 0.5s;
       line-height: normal;
+      color: @white;
     }
   }
 </style>

+ 7 - 1
src/layouts/default/header/components/user-dropdown/HomeStyleSelect.vue

@@ -40,6 +40,7 @@
   import { getPermissionList } from '/@/api/sys/menu';
   import { getSavedHomeStyle, saveHomeStyle } from '/@/utils/homeStyle';
   import type { HomeStyleOption } from '/@/utils/homeStyle';
+  import projectSetting from '/@/settings/projectSetting';
 
   const visible = ref(false);
   const selectedId = ref<string>('');
@@ -51,6 +52,10 @@
   const glob = useGlobSetting();
   const { setDarkMode } = useRootSetting();
 
+  function getSystemDefaultTheme(): ThemeEnum {
+    return (projectSetting.headerSetting?.theme as ThemeEnum) || ThemeEnum.VENT1;
+  }
+
   /** 递归展平菜单树(兼容 children 嵌套) */
   function flattenMenu(nodes: any[], list: any[] = []): any[] {
     nodes?.forEach((node) => {
@@ -164,7 +169,8 @@
     const defaultOption = options.value.find((o) => o.route === glob.homePath);
     saveHomeStyle(null);
     selectedId.value = defaultOption?.id || '';
-    applyTheme(defaultOption ?? { theme: ThemeEnum.VENT1 });
+    // 系统默认首页未在可选列表中注册时,主题退回生效的项目配置,而不是写死 vent1
+    applyTheme(defaultOption || { theme: getSystemDefaultTheme() });
     createMessage.success('已恢复默认首页风格,正在应用系统默认首页…');
     visible.value = false;
     go(glob.homePath || PageEnum.BASE_HOME);

+ 2 - 2
src/views/vent/monitorManager/compressor/nitrogen.flex.threejs.ts

@@ -27,8 +27,8 @@ class NitrogenFlex {
   cssSprites: CSS3DSprite[] = [];
   /** 当前机数 */
   nitrogenNum = 0;
-  /** css 精灵世界缩放(模型为原位摆放,无需再补偿父级缩放) */
-  private spriteScale = 0.008;
+  /** css 精灵世界缩放 */
+  private spriteScale = 0.0062;
   /** 模型是否加载完成 */
   private loaded = false;