fix:topmenu shake & change logo (#459)

This commit is contained in:
dagongren 2024-04-01 15:11:24 +08:00 committed by GitHub
parent cf594f04ba
commit 976c6cfe91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -1,15 +1,11 @@
<template>
<div class="top-menu" v-if="routes.length > 2">
<!-- <a-menu v-model="current" mode="horizontal">
<a-menu-item :key="route.name" v-for="route in routes.slice(0, routes.length - 1)">
<router-link :to="{ name: route.name }">{{ route.meta.title }}</router-link>
</a-menu-item>
</a-menu>-->
<span
:class="current === route.name ? 'top-menu-selected' : ''"
v-for="route in defaultShowRoutes"
:key="route.name"
@click="() => handleClick(route)"
:title="$t(route.meta.title)"
>
{{ route.meta.title }}
</span>
@ -102,15 +98,6 @@ export default {
<style lang="less">
@import '../../style/static.less';
// .top-menu {
// display: inline-block;
// }
// .ant-menu-horizontal {
// border-bottom: 0 !important;
// }
// .ant-menu-horizontal > .ant-menu-item {
// border-bottom: 0;
// }
.top-menu {
display: inline-flex;
@ -129,14 +116,22 @@ export default {
margin: 0 5px;
color: @layout-header-font-color;
height: @layout-header-height;
display: inline-flex;
align-items: center;
line-height: @layout-header-line-height;
display: inline-block;
}
> span:hover,
.top-menu-selected {
font-weight: bold;
color: @layout-header-font-selected-color;
}
> span::before {
display: block;
content: attr(title);
font-weight: bold;
height: 0;
overflow: hidden;
visibility: hidden;
}
}
.top-menu-dropdown.ant-popover-placement-bottom .ant-popover-content {

View File

@ -32,6 +32,7 @@
@layout-content-background: @primary-color_7;
@layout-header-background: #fff;
@layout-header-height: 40px;
@layout-header-line-height: 32px;
@layout-header-icon-height: 34px;
@layout-header-font-color: #020000;
@layout-header-font-selected-color: @primary-color;