From 784d71e2fff34b598b7b55f152011b815aaee09e Mon Sep 17 00:00:00 2001 From: Sean Bao Date: Thu, 2 Aug 2018 15:19:17 +0800 Subject: [PATCH] Fix PageHeader Tabs Display Issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 对`PageHeader`中的`tabList`展示逻辑做了更新,原本的实现会在外部传入一个空数组`tabList`时展现一个0出来(`tabList.length`的返回值) --- src/components/PageHeader/index.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/PageHeader/index.js b/src/components/PageHeader/index.js index 8afc1024..59d56fc5 100644 --- a/src/components/PageHeader/index.js +++ b/src/components/PageHeader/index.js @@ -221,17 +221,16 @@ export default class PageHeader extends PureComponent { - {tabList && - tabList.length && ( - - {tabList.map(item => )} - - )} + {(tabList && tabList.length) ? ( + + {tabList.map(item => )} + + ) : null} ); } -- GitLab