|
@@ -3,15 +3,16 @@
|
|
|
<router-link :to="{name:'index'}">
|
|
|
<!-- <LogoSvg alt="logo" /> -->
|
|
|
<!-- <img :src="LogoSvg" /> -->
|
|
|
- <!-- <img :src="logo" alt="logo" /> -->
|
|
|
- <h1 v-if="showTitle">{{ title }}</h1>
|
|
|
+ <img :src="logo" alt="logo" height="42" class="img_box"/>
|
|
|
+ <!-- <h1 v-if="showTitle">{{ title }}</h1> -->
|
|
|
</router-link>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-// import LogoSvg from '@/assets/logo.png'
|
|
|
-
|
|
|
+import LogoMax from '@/assets/normalbtn_login.png'
|
|
|
+import LogoMin from '@/assets/selectedbtn_login.png'
|
|
|
+import { mapState } from 'vuex'
|
|
|
export default {
|
|
|
name: 'Logo',
|
|
|
components: {
|
|
@@ -32,8 +33,28 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
// LogoSvg: LogoSvg,
|
|
|
- // logo: require(process.env.VUE_APP_LOGO) // logo
|
|
|
+ // logo: LogoSvg // logo
|
|
|
}
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ sidebar: state => state.app.sidebar
|
|
|
+ }),
|
|
|
+ logo () {
|
|
|
+ return this.sidebar ? LogoMax : LogoMin
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="less" scoped="scoped">
|
|
|
+ .logo{
|
|
|
+ padding-right: 10px;
|
|
|
+ img{
|
|
|
+ width: auto !important;
|
|
|
+ height: auto !important;
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+</style>
|