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;