From 2b7ffc75309fc66e71658fb2897895712d58b7ab Mon Sep 17 00:00:00 2001 From: "wenbo.dong" Date: Wed, 23 Aug 2017 22:04:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BA=8C=E7=BA=A7=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E5=81=8F=E7=A7=BB=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Header/Header.scss | 3 ++- client/components/Subnav/Subnav.js | 4 ++++ client/components/Subnav/Subnav.scss | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/components/Header/Header.scss b/client/components/Header/Header.scss index fa9b7b2a..c3446dfa 100644 --- a/client/components/Header/Header.scss +++ b/client/components/Header/Header.scss @@ -13,7 +13,8 @@ .logo { position: relative; float: left; - line-height: .54rem; + line-height: .56rem; + height: .56rem; .href { text-decoration: none; } diff --git a/client/components/Subnav/Subnav.js b/client/components/Subnav/Subnav.js index 99e19916..a25d8f98 100644 --- a/client/components/Subnav/Subnav.js +++ b/client/components/Subnav/Subnav.js @@ -24,6 +24,10 @@ class Subnav extends Component { className="g-row m-subnav-menu" > {this.props.data.map((item, index) => { + // 若导航标题为两个字,则自动在中间加个空格 + if (item.name.length === 2) { + item.name = item.name[0] + ' ' + item.name[1]; + } return ( {this.props.data[index].name} diff --git a/client/components/Subnav/Subnav.scss b/client/components/Subnav/Subnav.scss index 0708b3c1..27f958e7 100644 --- a/client/components/Subnav/Subnav.scss +++ b/client/components/Subnav/Subnav.scss @@ -8,6 +8,7 @@ border: none; .m-subnav-menu { border: none; + padding: 0 .24rem; .item { line-height: .54rem; padding: 0 .36rem;