| | |
| | | <template> |
| | | <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="/"> |
| | | <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" :to="indexPage"> |
| | | <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="/"> |
| | | <router-link v-else key="expand" class="sidebar-logo-link" :to="indexPage"> |
| | | <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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import logoImg from '@/assets/logo/logo.png' |
| | | import logoImg from '@/assets/logo/logo1.png' |
| | | import {mapState} from "vuex"; |
| | | import variables from '@/assets/styles/variables.scss' |
| | | |
| | | export default { |
| | |
| | | }, |
| | | sideTheme() { |
| | | return this.$store.state.settings.sideTheme |
| | | } |
| | | }, |
| | | ...mapState({ |
| | | indexPage: state => state.permission.indexPage |
| | | }) |
| | | }, |
| | | data() { |
| | | return { |
| | | title: process.env.VUE_APP_TITLE, |
| | | title: '管理面板', |
| | | logo: logoImg |
| | | } |
| | | } |
| | |
| | | .sidebar-logo-container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 50px; |
| | | line-height: 50px; |
| | | height: 66px; |
| | | line-height: 66px; |
| | | background: #2b2f3a; |
| | | text-align: center; |
| | | overflow: hidden; |
| | |
| | | width: 100%; |
| | | |
| | | & .sidebar-logo { |
| | | width: 32px; |
| | | height: 32px; |
| | | width: 43px; |
| | | height: 38px; |
| | | vertical-align: middle; |
| | | margin-right: 12px; |
| | | margin: 20px 0; |
| | | } |
| | | |
| | | & .sidebar-title { |
| | | display: inline-block; |
| | | margin: 0; |
| | | //margin: 0; |
| | | margin-left: 5px; |
| | | color: #fff; |
| | | font-weight: 600; |
| | | line-height: 50px; |
| | | font-size: 14px; |
| | | font-size: 24px; |
| | | font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; |
| | | vertical-align: middle; |
| | | } |