From cf72973f92cf8a007455f48f098e2ad5384c9140 Mon Sep 17 00:00:00 2001 From: zhitan-cloud <394600+ustcyc@user.noreply.gitee.com> Date: 星期六, 11 一月 2025 21:50:04 +0800 Subject: [PATCH] update README.md. --- zhitan-vue/src/layout/components/Sidebar/Logo.vue | 53 +++++++++++++++++++++++++++++------------------------ 1 files changed, 29 insertions(+), 24 deletions(-) diff --git a/zhitan-vue/src/layout/components/Sidebar/Logo.vue b/zhitan-vue/src/layout/components/Sidebar/Logo.vue index 86a54a6..4831fa2 100644 --- a/zhitan-vue/src/layout/components/Sidebar/Logo.vue +++ b/zhitan-vue/src/layout/components/Sidebar/Logo.vue @@ -1,6 +1,9 @@ <template> - <div class="sidebar-logo-container" :class="{ 'collapse': collapse }" - :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }"> + <div + class="sidebar-logo-container" + :class="{ collapse: collapse }" + :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }" + > <!-- <transition name="sidebarLogoFade"> <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/"> <img v-if="logo" :src="logo" class="sidebar-logo" /> @@ -11,33 +14,35 @@ <h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }}</h1> </router-link> </transition> --> - <!-- <div class="logo"> - <img v-if=" sideTheme === 'theme-dark'" :src="logo" class="sidebar-logo" /> - <img v-else :src="logo2" class="sidebar-logo" /> - </div> --> + <div class="logo" v-if="systemInfo && systemInfo.leftLogo"> + <img v-if="sideTheme === 'theme-dark'" :src="systemInfo.leftLogo" class="sidebar-logo" /> + <img v-else :src="systemInfo.leftLogo" class="sidebar-logo" /> + </div> - <div class="name" v-if="!collapse" :style="{color: sideTheme === 'theme-dark' ? '#fff' : '#487FEE'}">{{ title }}</div> + <div class="name" v-if="!collapse" :style="{ color: sideTheme === 'theme-dark' ? '#fff' : '#487FEE' }"> + {{ title }} + </div> </div> </template> <script setup> -// import Cookies from 'js-cookie' -import variables from '@/assets/styles/variables.module.scss' -import logo from '@/assets/logo/logo-2.png' -import logo2 from '@/assets/logo/logo-3.png' -import useSettingsStore from '@/store/modules/settings' -import { color } from 'echarts'; -// const systemInfo = JSON.parse(sessionStorage.getItem('SystemInfo')) +import Cookies from "js-cookie" +import variables from "@/assets/styles/variables.module.scss" +import logo from "@/assets/logo/logo-2.png" +import logo2 from "@/assets/logo/logo-3.png" +import useSettingsStore from "@/store/modules/settings" +import { color } from "echarts" +const systemInfo = JSON.parse(Cookies.get("SystemInfo")) defineProps({ collapse: { type: Boolean, - required: true - } + required: true, + }, }) -const title = import.meta.env.VITE_APP_TITLE; -const settingsStore = useSettingsStore(); -const sideTheme = computed(() => settingsStore.sideTheme); +const title = systemInfo.systemName || import.meta.env.VITE_APP_TITLE +const settingsStore = useSettingsStore() +const sideTheme = computed(() => settingsStore.sideTheme) </script> <style lang="scss" scoped> @@ -63,8 +68,8 @@ margin-top: 24px; margin-bottom: 15px; .logo { - width: 87px; - height: 30px; + width: 40px; + height: 40px; margin-left: 13px; .sidebar-logo { width: 100%; @@ -72,12 +77,12 @@ } } .name { - width: 100%; + width: 210px; margin-top: 2px; margin-left: 6px; font-family: OPPOSans, OPPOSans; font-weight: bold; - font-size: 24px; + font-size: 20px; color: #ffffff; } @@ -133,4 +138,4 @@ } } } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.3