mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-12-25 05:50:18 +08:00
feat(projects): 添加svg logo自适应主题颜色
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
<template>
|
||||
<a href="/" class="logo-height nowrap-hidden flex-center cursor-pointer">
|
||||
<img src="@/assets/img/common/logo.png" alt="" class="w-32px h-32px" />
|
||||
<h2 v-show="showTitle" class="pl-8px text-16px text-primary font-bold">{{ title }}</h2>
|
||||
<system-logo class="w-32px h-32px" :color="primaryColor" />
|
||||
<h2 v-show="showTitle" class="pl-8px text-16px font-bold" :style="{ color: primaryColor }">{{ title }}</h2>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
import { SystemLogo } from '@/components';
|
||||
import { useAppStore, useThemeStore } from '@/store';
|
||||
import { useAppTitle } from '@/hooks';
|
||||
|
||||
@@ -17,6 +18,8 @@ const title = useAppTitle();
|
||||
const showTitle = computed(
|
||||
() => !theme.isVerticalNav || (!app.menu.collapsed && theme.navStyle.mode !== 'vertical-mix')
|
||||
);
|
||||
|
||||
const primaryColor = computed(() => theme.themeColor);
|
||||
const headerHeight = computed(() => {
|
||||
const { height } = theme.headerStyle;
|
||||
return `${height}px`;
|
||||
|
||||
Reference in New Issue
Block a user