ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
  <div class="logo">
    <router-link :to="{name:'Console'}">
      
      
      <img src="@/assets/logo4.png" alt="Logo" class="logo-img">
 
      <h1 v-if="showTitle">{{ this.titles }}</h1>
    </router-link>
  </div>
</template>
 
<script>
//import LogoSvg from '@/assets/logo2.jpg'
import { mixin, mixinDevice } from '@/utils/mixin'
 
export default {
  name: 'Logo',
  mixins: [mixin, mixinDevice],
  data () {
    return {
      titles: ''
    }
  },
  props: {
    title: {
      type: String,
      default: '一汽解放青岛汽车有限公司',
      required: false
    },
    showTitle: {
      type: Boolean,
      default: true,
      required: false
    }
  },
  created () {
    if (this.layoutMode === 'topmenu') {
      if (this.title.length > 100) {
        this.titles = this.title.substring(0, 8) + '...'
      } else {
        this.titles = this.title
      }
    } else {
      if (this.title.length > 100) {
        this.titles = this.title.substring(0, 8) + '...'
      } else {
        this.titles = this.title
      }
    }
  }
}
</script>
<style lang="less" scoped>
.logo-img{
  height: auto !important;
}
</style>