From 72936bc553b886abdd9de2f6c8467854eec9116e Mon Sep 17 00:00:00 2001 From: gaoyunqi Date: Sat, 24 Feb 2024 12:52:09 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E8=B0=83=E6=95=B4=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=AD=90=E7=B3=BB=E7=BB=9F=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E7=9A=84=E6=A0=B7=E5=BC=8F=EF=BC=8C=E7=95=A5=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=B3=BB=E7=BB=9F=E5=AF=BC=E8=88=AA=E6=A0=8F?= =?UTF-8?q?=E7=9A=84=E9=AB=98=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 6 +++--- src/design/var/index.less | 2 +- src/hooks/web/useTitle.ts | 8 +++---- .../default/header/components/childSystem.vue | 21 ++----------------- .../components/user-dropdown/DropDown.vue | 2 +- src/logics/initAppConfig.ts | 3 +-- src/settings/designSetting.ts | 2 +- 7 files changed, 13 insertions(+), 31 deletions(-) diff --git a/.env b/.env index 331d76c..3ba6f1a 100644 --- a/.env +++ b/.env @@ -2,10 +2,10 @@ VITE_PORT = 3100 # spa-title -VITE_GLOB_APP_TITLE = Learun Pro +VITE_GLOB_APP_TITLE = 全代码平台 # spa shortname -VITE_GLOB_APP_SHORT_NAME = learun_admin +VITE_GLOB_APP_SHORT_NAME = 全代码平台 # 应用名称 -VITE_SYSTEM_NAME = 数字新能源 +VITE_SYSTEM_NAME = 全代码平台 diff --git a/src/design/var/index.less b/src/design/var/index.less index 56b94b2..0df3d79 100644 --- a/src/design/var/index.less +++ b/src/design/var/index.less @@ -8,7 +8,7 @@ @multiple-height: 40px; // headers -@header-height: 60px; +@header-height: 50px; // logo width @logo-width: 36px; diff --git a/src/hooks/web/useTitle.ts b/src/hooks/web/useTitle.ts index 3b43f2d..46517ca 100644 --- a/src/hooks/web/useTitle.ts +++ b/src/hooks/web/useTitle.ts @@ -1,4 +1,4 @@ -import { watch, unref } from 'vue'; +import { watch, unref, ref } from 'vue'; import { useI18n } from '/@/hooks/web/useI18n'; import { useTitle as usePageTitle } from '@vueuse/core'; import { useGlobSetting } from '/@/hooks/setting'; @@ -11,7 +11,7 @@ import { REDIRECT_NAME } from '/@/router/constant'; * Listening to page changes and dynamically changing site titles */ export function useTitle() { - const { title } = useGlobSetting(); + const title = import.meta.env.VITE_SYSTEM_NAME; const { t } = useI18n(); const { currentRoute } = useRouter(); const localeStore = useLocaleStore(); @@ -29,8 +29,8 @@ export function useTitle() { const tTitle = t(route?.meta?.title as string); pageTitle.value = tTitle - ? ` ${tTitle} - ${appStore.getLogoConfig.shortName || title} ` - : `${appStore.getLogoConfig.shortName || title}`; + ? ` ${tTitle} - ${title} ` + : `${title}`; }, { immediate: true }, ); diff --git a/src/layouts/default/header/components/childSystem.vue b/src/layouts/default/header/components/childSystem.vue index c6a7165..ea8f68e 100644 --- a/src/layouts/default/header/components/childSystem.vue +++ b/src/layouts/default/header/components/childSystem.vue @@ -3,22 +3,9 @@ v-if="getShowContent && getShowBread" :selectedKeys="cur" mode="horizontal" - :theme="Mtheme" :class="[prefixCls, `${prefixCls}--${theme}`]" > - - + {{ item.name }} @@ -143,7 +130,7 @@ border: 0; .ant-menu-item { - padding: 0; + padding: 0 10px; &:hover { background: none; @@ -158,10 +145,6 @@ margin: 0 5px; padding: 6px; } - - .ant-menu-title-content { - display: none; - } } .ant-menu-item-selected { diff --git a/src/layouts/default/header/components/user-dropdown/DropDown.vue b/src/layouts/default/header/components/user-dropdown/DropDown.vue index 817ac70..789ab7f 100644 --- a/src/layouts/default/header/components/user-dropdown/DropDown.vue +++ b/src/layouts/default/header/components/user-dropdown/DropDown.vue @@ -2,7 +2,7 @@ -
+
diff --git a/src/logics/initAppConfig.ts b/src/logics/initAppConfig.ts index a186450..1e83385 100644 --- a/src/logics/initAppConfig.ts +++ b/src/logics/initAppConfig.ts @@ -34,7 +34,6 @@ export function initAppConfigStore() { grayMode, themeColor, - headerSetting: { bgColor: headerBgColor } = {}, menuSetting: { bgColor } = {}, } = projCfg; try { @@ -55,7 +54,7 @@ export function initAppConfigStore() { updateHeaderBgColor(); updateSidebarBgColor(); } else { - headerBgColor && updateHeaderBgColor(headerBgColor); + updateHeaderBgColor('#ffffff'); // 强制顶部使用白色 bgColor && updateSidebarBgColor(bgColor); } // init store diff --git a/src/settings/designSetting.ts b/src/settings/designSetting.ts index 07aa06a..1fa969b 100644 --- a/src/settings/designSetting.ts +++ b/src/settings/designSetting.ts @@ -5,7 +5,7 @@ export const prefixCls = 'vben'; export const darkMode = ThemeEnum.LIGHT; // app theme preset color -export const APP_PRESET_COLOR_LIST: string[] = ['#5e95ff', '#0960bd', '#0084f4', '#009688', '#536dfe', '#ff5c93', '#ee4f12', '#0096c7', '#9c27b0', '#ff9800']; +export const APP_PRESET_COLOR_LIST: string[] = ['#1179FF', '#0960bd', '#0084f4', '#009688', '#536dfe', '#ff5c93', '#ee4f12', '#0096c7', '#9c27b0', '#ff9800']; // header preset color export const HEADER_PRESET_BG_COLOR_LIST: string[] = ['#07093E', '#ffffff', '#151515', '#009688', '#5172DC', '#018ffb', '#409eff', '#e74c3c', '#24292e', '#394664', '#001529', '#383f45'];