From 9183ef0ede3bc9b79ff16479a7816869e6425119 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 24 Nov 2016 17:21:49 +0800 Subject: [PATCH] Fix Transfer notFound, close #3996 --- components/transfer/list.tsx | 7 ++++--- components/transfer/style/index.less | 22 +++++++++++++++------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index 0e85ee9508..3276af09b6 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -208,10 +208,11 @@ export default class TransferList extends React.Component - {showItems.length > 0 - ? showItems - :
{notFoundContent || 'Not Found'}
} + {showItems} +
+ {notFoundContent || 'Not Found'} +
} {footerDom ?
{footerDom} diff --git a/components/transfer/style/index.less b/components/transfer/style/index.less index cd73ce100a..bd32d15c79 100644 --- a/components/transfer/style/index.less +++ b/components/transfer/style/index.less @@ -77,13 +77,6 @@ padding: 4px; width: 100%; } - - &-not-found { - padding-top: 24px; - color: #ccc; - text-align: center; - height: 100%; - } } &-body-with-search { @@ -118,6 +111,21 @@ } } + &-body-not-found { + padding-top: 0; + color: #ccc; + text-align: center; + display: none; + position: absolute; + top: 50%; + width: 100%; + margin-top: -10px; + } + + &-content:empty + &-body-not-found { + display: block; + } + &-footer { border-top: 1px solid @border-color-split; border-radius: 0 0 @border-radius-base @border-radius-base;