frontend/src/components/tools/Logo.vue
(完整代码) 1KB<template>
<div class="logo">
<router-link :to="{name:'Console'}">
<LogoSvg alt="logo" />
<h1 v-if="showTitle">{{ this.titles }}</h1>
</router-link>
</div>
</template>
<script>
import LogoSvg from '@/assets/logo.svg?inline'
import { mixin, mixinDevice } from '@/utils/mixin'
export default {
name: 'Logo',
components: {
LogoSvg
},
mixins: [mixin, mixinDevice],
data () {
return {
titles: ''
}
},
props: {
title: {
type: String,
default: 'Magic.NET',
required: false
},
showTitle: {
type: Boolean,
default: true,
required: false
}
},
created () {
if (this.layoutMode === 'topmenu') {
if (this.title.length > 8) {
this.titles = this.title.substring(0, 8) + '...'
} else {
this.titles = this.title
}
} else {
if (this.title.length > 10) {
this.titles = this.title.substring(0, 8) + '...'
} else {
this.titles = this.title
}
}
}
}
</script>
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
