feat: logo组件长度限制

This commit is contained in:
wang_fan_w 2024-05-12 23:33:58 +08:00
parent 6087ae2b4e
commit 84835f4e26
2 changed files with 11 additions and 1 deletions

View File

@ -36,8 +36,12 @@ const isDark = computed(() => {
}
.logo_title {
max-width: 150px;
font-weight: bold;
font-size: $font-size-title-2;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.dark {
color: #fff;

View File

@ -2,7 +2,10 @@
<div class="layout-head">
<div class="layout-head-top">
<a-layout-header class="header">
<Logo />
<div class="header-logo">
<Logo />
</div>
<a-menu mode="horizontal" :selected-keys="[currentRoute.name]" @menu-item-click="onMenuItem">
<template v-for="item in routeTree" :key="item.name">
<a-sub-menu v-if="item.children && item.children.length > 0" :key="item.name">
@ -69,6 +72,9 @@ const onMenuItem = (key: string) => {
display: flex;
align-items: stretch; //
overflow: hidden;
.header-logo {
width: 150px;
}
&-top {
flex: 1; //
display: flex;