From 4a7320edaa70f60e693335b08472d40596e0244f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 29 Apr 2019 23:05:18 +0800 Subject: [PATCH] fix style error --- src/components/GlobalHeader/index.less | 54 +++++++++++--------------- src/layouts/BasicLayout.tsx | 7 +++- 2 files changed, 27 insertions(+), 34 deletions(-) diff --git a/src/components/GlobalHeader/index.less b/src/components/GlobalHeader/index.less index e66510b9..75b450bf 100644 --- a/src/components/GlobalHeader/index.less +++ b/src/components/GlobalHeader/index.less @@ -2,14 +2,6 @@ @pro-header-hover-bg: rgba(0, 0, 0, 0.025); -.header { - position: relative; - height: @layout-header-height; - padding: 0; - background: #fff; - box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); -} - .logo { display: inline-block; height: @layout-header-height; @@ -100,30 +92,28 @@ } @media only screen and (max-width: @screen-md) { - .header { - :global(.ant-divider-vertical) { - vertical-align: unset; - } - .name { - display: none; - } - i.trigger { - padding: 22px 12px; - } - .logo { - position: relative; - padding-right: 12px; - padding-left: 12px; - } - .right { - position: absolute; - top: 0; - right: 12px; - background: #fff; - .account { - .avatar { - margin-right: 0; - } + :global(.ant-divider-vertical) { + vertical-align: unset; + } + .name { + display: none; + } + i.trigger { + padding: 22px 12px; + } + .logo { + position: relative; + padding-right: 12px; + padding-left: 12px; + } + .right { + position: absolute; + top: 0; + right: 12px; + background: #fff; + .account { + .avatar { + margin-right: 0; } } } diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx index a28d8348..67dbcd4f 100644 --- a/src/layouts/BasicLayout.tsx +++ b/src/layouts/BasicLayout.tsx @@ -1,6 +1,5 @@ import { ConnectState, ConnectProps } from '@/models/connect'; import RightContent from '@/components/GlobalHeader/RightContent'; -import { formatMessage } from 'umi-plugin-react/locale'; import { connect } from 'dva'; import React, { useState } from 'react'; import logo from '../assets/logo.svg'; @@ -12,6 +11,7 @@ import { Settings, SettingDrawer, } from '@ant-design/pro-layout'; +import Link from 'umi/link'; export interface BasicLayoutProps extends BasicLayoutComponentsProps, ConnectProps { breadcrumbNameMap: { [path: string]: MenuDataItem }; @@ -43,7 +43,10 @@ const BasicLayout: React.FC = props => { } + menuItemRender={(menuItemProps, defaultDom) => { + return {defaultDom}; + }} + rightContentRender={rightProps => } {...props} {...settings} > -- GitLab