opt: 优化代码,更新logo展示

This commit is contained in:
yanps
2025-02-24 17:56:40 +08:00
parent df1795cbbd
commit 0b9c855c17
21 changed files with 391 additions and 460 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@@ -2,11 +2,11 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : 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" />
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 v-else class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo" />
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
</router-link>
</transition>
@@ -14,7 +14,7 @@
</template>
<script>
import Logo from '@/assets/images/logo.png'
import Logo from '@/assets/images/ximenzi.png'
import variables from '@/assets/styles/variables.scss'
export default {
name: 'SidebarLogo',
@@ -24,6 +24,13 @@ export default {
required: true
}
},
data() {
return {
title: '诺力开发平台',
logo: Logo,
title_param: 'platform'
}
},
computed: {
variables() {
return variables
@@ -32,13 +39,6 @@ export default {
return this.$store.state.settings.sideTheme
}
},
data() {
return {
title: '诺力开发平台',
logo: Logo,
title_param: 'platform'
}
},
created() {
this.getValueByCode(this.title_param).then(res => {
this.title = res.value
@@ -70,8 +70,8 @@ export default {
width: 100%;
& .sidebar-logo {
width: 32px;
height: 32px;
width: 64px;
height: 64px;
vertical-align: middle;
margin-right: 6px;
}