From 3708b6f92fd9f773b34f21875159d3cf5039a172 Mon Sep 17 00:00:00 2001 From: yaphet Date: Thu, 14 Mar 2019 09:31:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=B0=8F=E5=B1=8F=E5=B9=95=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=8D=E5=AE=8C=E5=85=A8=20(#3726)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复小屏幕显示不完全问题 屏幕尺寸小于1200时,顶部菜单右侧内容被遮挡 * Update index.js * 格式化代码 --- src/components/TopNavHeader/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/TopNavHeader/index.js b/src/components/TopNavHeader/index.js index 2d0e0656..0b6440e6 100644 --- a/src/components/TopNavHeader/index.js +++ b/src/components/TopNavHeader/index.js @@ -13,7 +13,11 @@ export default class TopNavHeader extends PureComponent { static getDerivedStateFromProps(props) { return { - maxWidth: (props.contentWidth === 'Fixed' ? 1200 : window.innerWidth) - 280 - 165 - 40, + maxWidth: + (props.contentWidth === 'Fixed' && window.innerWidth > 1200 ? 1200 : window.innerWidth) - + 280 - + 120 - + 40, }; } -- GitLab