43 lines
781 B
Vue
Raw Normal View History

2022-12-27 18:11:19 +08:00
<template>
2022-12-28 17:40:30 +08:00
<div class="logo" :style="style">
2022-12-27 18:11:19 +08:00
<img alt="logo" src="@/assets/logo.svg" />
<span class="title" v-if="!collapsed">Plusone Admin</span>
</div>
</template>
<script lang="ts" setup>
2022-12-28 17:40:30 +08:00
import { computed } from 'vue'
2022-12-27 18:11:19 +08:00
const props = defineProps({
collapsed: Boolean,
2022-12-28 17:40:30 +08:00
inverted: Boolean,
})
const style = computed(() => {
return props.inverted ? { color: '#ffffff' } : { color: 'unset' }
2022-12-27 18:11:19 +08:00
})
</script>
<style scoped>
.logo {
padding: 20px 16px;
display: inline-flex;
2022-12-28 17:40:30 +08:00
background-color: var(--n-color);
2022-12-27 18:11:19 +08:00
color: #ffffff;
2022-12-28 17:40:30 +08:00
height: 32px;
2022-12-27 18:11:19 +08:00
}
.logo > img {
width: 32px;
}
.logo > .title {
font-size: 22px;
height: 32px;
line-height: 32px;
text-align: center;
width: 100%;
font-weight: 500;
}
</style>