From 31bc616ad716daf2ba0ec7fa38352644b6293dfc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 07 四月 2026 11:36:16 +0800
Subject: [PATCH] 1.整体样式修改
---
src/layout/components/Sidebar/Logo.vue | 94 +++++++++++++++++++++++++++--------------------
1 files changed, 54 insertions(+), 40 deletions(-)
diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue
index f8f1da3..7f9c969 100644
--- a/src/layout/components/Sidebar/Logo.vue
+++ b/src/layout/components/Sidebar/Logo.vue
@@ -3,11 +3,11 @@
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logoUrl" :src="logoUrl" class="sidebar-logo" @error="handleImageError" alt="鍏徃Logo" />
- <h1 class="sidebar-title">{{ title }}</h1>
+ <h1 v-if="!logoUrl" class="sidebar-title">{{ title }}</h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logoUrl" :src="logoUrl" class="sidebar-logo" @error="handleImageError" alt="鍏徃Logo" />
- <h1 class="sidebar-title">{{ title }}</h1>
+ <h1 v-if="!logoUrl" class="sidebar-title">{{ title }}</h1>
</router-link>
</transition>
</div>
@@ -87,43 +87,57 @@
opacity: 0;
}
-.sidebar-logo-container {
- position: relative;
- width: 100% !important;
- height: 50px !important;
- line-height: 50px;
- background: #fff;
- text-align: center;
- overflow: hidden;
-
- & .sidebar-logo-link {
- height: 100%;
- width: 100%;
-
- & .sidebar-logo {
- width: 100%;
- height: 100%;
- // height: 32px;
- vertical-align: middle;
- margin-right: 12px;
- }
-
- & .sidebar-title {
- display: inline-block;
- margin: 0;
- color: v-bind(getLogoTextColor);
- font-weight: 600;
- line-height: 50px;
- font-size: 14px;
- font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
- vertical-align: middle;
- }
- }
+.sidebar-logo-container {
+ position: relative;
+ width: 100% !important;
+ height: 56px !important;
+ line-height: 56px;
+ background: rgba(255, 255, 255, 0.78);
+ border: 1px solid var(--surface-border);
+ border-radius: 0 22px 22px 0;
+ text-align: center;
+ overflow: hidden;
+ box-shadow: var(--shadow-sm);
+
+ & .sidebar-logo-link {
+ height: 100%;
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 0 18px 0 14px;
+
+ & .sidebar-logo {
+ width: auto;
+ max-width: 132px;
+ max-height: 34px;
+ height: auto;
+ vertical-align: middle;
+ object-fit: contain;
+ object-position: center;
+ }
+
+ & .sidebar-title {
+ display: inline-block;
+ margin: 0;
+ color: var(--text-primary);
+ font-weight: 600;
+ line-height: 1.2;
+ font-size: 14px;
+ font-family: "Segoe UI", "PingFang SC", sans-serif;
+ vertical-align: middle;
+ }
+ }
&.collapse {
- .sidebar-logo {
- margin-right: 0px;
- }
- }
-}
-</style>
+ .sidebar-logo-link {
+ padding: 0;
+ }
+
+ .sidebar-logo {
+ max-width: 30px;
+ max-height: 30px;
+ }
+ }
+}
+</style>
--
Gitblit v1.9.3