Bladeren bron

!245 update 页面中的标题都从配置项获取
* update 规范环境变量命名
* update 将页面中的标题都从配置项获取

Lau 6 maanden geleden
bovenliggende
commit
53e7d03a1c
4 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 1 0
      .env.development
  2. 1 0
      .env.production
  3. 1 1
      index.html
  4. 1 1
      src/layout/components/Sidebar/Logo.vue

+ 1 - 0
.env.development

@@ -1,5 +1,6 @@
 # 页面标题
 VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统
+VITE_APP_LOGO_TITLE = RuoYi-Vue-Plus
 
 # 开发环境配置
 VITE_APP_ENV = 'development'

+ 1 - 0
.env.production

@@ -1,5 +1,6 @@
 # 页面标题
 VITE_APP_TITLE = RuoYi-Vue-Plus多租户管理系统
+VITE_APP_LOGO_TITLE = RuoYi-Vue-Plus
 
 # 生产环境配置
 VITE_APP_ENV = 'production'

+ 1 - 1
index.html

@@ -6,7 +6,7 @@
     <meta name="renderer" content="webkit" />
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
     <link rel="icon" href="/favicon.ico" />
-    <title>RuoYi-Vue-Plus多租户管理系统</title>
+    <title>%VITE_APP_TITLE%</title>
     <!--[if lt IE 11
       ]><script>
         window.location.href = '/html/ie.html';

+ 1 - 1
src/layout/components/Sidebar/Logo.vue

@@ -34,7 +34,7 @@ defineProps({
   }
 });
 
-const title = ref('RuoYi-Vue-Plus');
+const title = import.meta.env.VITE_APP_LOGO_TITLE;
 const settingsStore = useSettingsStore();
 const sideTheme = computed(() => settingsStore.sideTheme);
 </script>