Browse Source

fix:小屏幕显示不完全 (#3726)

* 修复小屏幕显示不完全问题

屏幕尺寸小于1200时,顶部菜单右侧内容被遮挡

* Update index.js

* 格式化代码
pull/3749/head
yaphet 7 years ago
committed by 陈帅
parent
commit
3708b6f92f
  1. 6
      src/components/TopNavHeader/index.js

6
src/components/TopNavHeader/index.js

@ -13,7 +13,11 @@ export default class TopNavHeader extends PureComponent {
static getDerivedStateFromProps(props) { static getDerivedStateFromProps(props) {
return { return {
maxWidth: (props.contentWidth === 'Fixed' ? 1200 : window.innerWidth) - 280 - 165 - 40, maxWidth:
(props.contentWidth === 'Fixed' && window.innerWidth > 1200 ? 1200 : window.innerWidth) -
280 -
120 -
40,
}; };
} }

Loading…
Cancel
Save