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
59
60
61
62
63
64
| <template>
| <div class="logo">
| <!-- 此页面已做修改 如需查看原版请查看 项目上级目录下的Admin.NET.orgin -->
| <!-- wys 20220722 11:22 修改 使其跳回首页不是欢迎页 -->
| <!-- <router-link :to="{ name: 'Console' }"> -->
| <router-link to="/">
| <img :style="`background-color:${pcolor}`" :src="logo" alt="" srcset="">
| <a-tooltip v-if="title.length>6&&showTitle" :title="title">
| <h1>{{ titles }}</h1>
| </a-tooltip>
| <h1 v-if="title.length<=6&&showTitle">{{ titles }}</h1>
| </router-link>
| </div>
| </template>
|
| <script>
| import logo from '@/assets/images/logo.png'
| import lodash from 'lodash'
| import { mixin, mixinDevice } from '@/utils/mixin'
| export default {
| name: 'Logo',
| components: {
| },
| mixins: [mixin, mixinDevice],
| data() {
| return {
| titles: '',
| logo,
| }
| },
| props: {
| title: {
| type: String,
| default: lodash.get(globalConfig,'Site.title',"义维科技"),
| required: false,
| },
| showTitle: {
| type: Boolean,
| default: true,
| required: false,
| },
| },
| computed:{
| pcolor(){
| return this.$store.getters.color;
| }
| },
| created() {
| if (this.layoutMode === 'topmenu') {
| if (this.title.length > 6) {
| this.titles = this.title.substring(0, 6) + '...'
| } else {
| this.titles = this.title
| }
| } else {
| if (this.title.length > 6) {
| this.titles = this.title.substring(0, 6) + '...'
| } else {
| this.titles = this.title
| }
| }
| },
| }
| </script>
|
|